{"_id":"@dokieli/web-annotation","_rev":"3-4b5123739177f0ec7958def6eb7b4b87","name":"@dokieli/web-annotation","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@dokieli/web-annotation","version":"1.0.0","keywords":["annotations","annotation tool","data model","json-ld","linked data","rdfa","selectors","states","text annotation","typescript","w3c","web annotation"],"author":{"name":"dokieli"},"license":"Apache-2.0","_id":"@dokieli/web-annotation@1.0.0","maintainers":[{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},{"name":"csarven","email":"info@csarven.ca"}],"dist":{"shasum":"22b3c98a12b840ea876dfc003758d7b8c33db5e5","tarball":"https://registry.npmjs.org/@dokieli/web-annotation/-/web-annotation-1.0.0.tgz","fileCount":51,"integrity":"sha512-/AXpEEUvEu8CtuUfcwm25GKn03bQJMWew5dgKHUMGA0P1nyLPzIENB0oJ9oLR201BQs/SDJOFRHyi3ytsqoe8A==","signatures":[{"sig":"MEQCIGs47o5tuAKH3Br5O/7S+STSTNAg8y48vZp4N94P7fn3AiA1KyCYVRZyG+kBfePwmJQfPtAV/OobGFwI1uXRZ8joMA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140677},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3376ef4cb863927572d5b30b474be738782cd0db","scripts":{"docs":"typedoc","test":"vitest run","build":"tsc","prepare":"tsc","test:all":"vitest run && tsc --noEmit","test:conformance":"vitest run tests/conformance"},"_npmUser":{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},"_npmVersion":"10.9.0","description":"W3C Web Annotation implementation for creating, parsing, and serializing Web Annotations in JSON-LD, with support for HTML+RDFa embedding and DOM-based annotation application.","directories":{},"_nodeVersion":"22.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@4.17.0","devDependencies":{"vitest":"^3.0.0","typedoc":"^0.28.20","happy-dom":"^20.8.9","typescript":"^6.0.2","@types/node":"^25.5.2","ajv-formats":"^3","ajv-draft-04":"^1","rdfa-streaming-parser":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/web-annotation_1.0.0_1783522225505_0.9124012543495179","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dokieli/web-annotation","version":"1.0.1","keywords":["annotations","annotation tool","data model","json-ld","linked data","rdfa","selectors","states","text annotation","typescript","w3c","web annotation"],"author":{"name":"dokieli"},"license":"Apache-2.0","_id":"@dokieli/web-annotation@1.0.1","maintainers":[{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},{"name":"csarven","email":"info@csarven.ca"}],"homepage":"https://dokieli.github.io/web-annotation/","bugs":{"url":"https://github.com/dokieli/web-annotation/issues"},"dist":{"shasum":"3dcba83ed46c9c6ed1f4b6f7f8355a5b9a45b39c","tarball":"https://registry.npmjs.org/@dokieli/web-annotation/-/web-annotation-1.0.1.tgz","fileCount":48,"integrity":"sha512-glJvLvKBv+NWDBtUF1iVAv+UOiwXpL7WlCDsNAOW5h78qFo6kkz756LQK7Zc1cCjh+fyKQeuFjU6L/O1Pc4zIw==","signatures":[{"sig":"MEUCIQCkWFyOEYGk1JXyWLnikioGblwuJDja8wgdKHeQeZz4jQIgPTeBomyJp3ifFJYXjgswT+OKoL6FOC6SJqlCADjAnY0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dokieli%2fweb-annotation@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":161652},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"39601b2e076d1d89c481e3725e4817f96d7a35aa","scripts":{"docs":"typedoc","lint":"eslint .","test":"vitest run","build":"tsc","prepare":"tsc","lint:fix":"eslint . --fix","test:all":"vitest run && tsc --noEmit","test:conformance":"vitest run tests/conformance"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b0024fbc-4731-4b94-b661-300a4def6679"}},"repository":{"url":"git+https://github.com/dokieli/web-annotation.git","type":"git"},"_npmVersion":"11.16.0","description":"W3C Web Annotation implementation for creating, parsing, and serializing Web Annotations in JSON-LD, with support for HTML+RDFa embedding and DOM-based annotation application.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"yarn@4.17.0","devDependencies":{"eslint":"^10.6.0","vitest":"^3.0.0","typedoc":"^0.28.20","happy-dom":"^20.8.9","typescript":"^6.0.2","@types/node":"^25.5.2","ajv-formats":"^3","ajv-draft-04":"^1","rdfa-streaming-parser":"^2.0.0","@typescript-eslint/parser":"^8.63.0","eslint-plugin-license-header":"^0.9.0"},"_npmOperationalInternal":{"tmp":"tmp/web-annotation_1.0.1_1783587548145_0.06250554717781509","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@dokieli/web-annotation","version":"1.1.0","description":"W3C Web Annotation implementation for creating, parsing, and serializing Web Annotations in JSON-LD, with support for HTML+RDFa embedding and DOM-based annotation application.","type":"module","packageManager":"yarn@4.17.0","author":{"name":"dokieli"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/dokieli/web-annotation.git"},"homepage":"https://dokieli.github.io/web-annotation/","bugs":{"url":"https://github.com/dokieli/web-annotation/issues"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","prepare":"tsc","docs":"typedoc","lint":"eslint .","lint:fix":"eslint . --fix","test":"vitest run","test:conformance":"vitest run tests/conformance","test:all":"vitest run && tsc --noEmit"},"keywords":["annotations","annotation tool","data model","json-ld","linked data","rdfa","selectors","states","text annotation","typescript","w3c","web annotation"],"devDependencies":{"@types/jsonld":"^1.5.15","@types/node":"^25.5.2","@typescript-eslint/parser":"^8.63.0","ajv-draft-04":"^1","ajv-formats":"^3","eslint":"^10.6.0","eslint-plugin-license-header":"^0.9.0","happy-dom":"^20.8.9","rdfa-streaming-parser":"^2.0.0","typedoc":"^0.28.20","typescript":"^6.0.2","vitest":"^3.0.0"},"dependencies":{"jsonld":"^9.0.0"},"gitHead":"619ac02bff71460a753301bf51c330d2a8d9b3e0","_id":"@dokieli/web-annotation@1.1.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-unLZOxqVJML1huvBLdZ/VPlMVLekhg82hATVHj0R1wPCqoaa4ZNsPJTEpnPLKK5QuDKjOGdydR1aUxKLyLmiAA==","shasum":"586f546dc6940fa0d811e8fb3640441849d82415","tarball":"https://registry.npmjs.org/@dokieli/web-annotation/-/web-annotation-1.1.0.tgz","fileCount":54,"unpackedSize":185035,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dokieli%2fweb-annotation@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE1F85fZzHI8hJz8FJhec3JpoqmIv1aaN7bKO2kQJx33AiEA1zN/+n6xiKz2M44VH0OgUNLs5V/u/waNvrNC1Svg+kM="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b0024fbc-4731-4b94-b661-300a4def6679"}},"directories":{},"maintainers":[{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},{"name":"csarven","email":"info@csarven.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/web-annotation_1.1.0_1786375231557_0.5454652968536633"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T14:50:25.338Z","modified":"2026-08-10T15:20:32.093Z","1.0.0":"2026-07-08T14:50:25.652Z","1.0.1":"2026-07-09T08:59:08.301Z","1.1.0":"2026-08-10T15:20:31.698Z"},"bugs":{"url":"https://github.com/dokieli/web-annotation/issues"},"author":{"name":"dokieli"},"license":"Apache-2.0","homepage":"https://dokieli.github.io/web-annotation/","keywords":["annotations","annotation tool","data model","json-ld","linked data","rdfa","selectors","states","text annotation","typescript","w3c","web annotation"],"repository":{"type":"git","url":"git+https://github.com/dokieli/web-annotation.git"},"description":"W3C Web Annotation implementation for creating, parsing, and serializing Web Annotations in JSON-LD, with support for HTML+RDFa embedding and DOM-based annotation application.","maintainers":[{"name":"virginiabalseiro","email":"info@virginiabalseiro.com"},{"name":"csarven","email":"info@csarven.ca"}],"readme":"# dokieli Web Annotation\n\nW3C Web Annotation implementation for creating, parsing, and serializing Web Annotations in JSON-LD, with support for HTML+RDFa embedding and DOM-based annotation application.\n\n* [Code of Conduct](https://github.com/dokieli/web-annotation/blob/main/CODE-OF-CONDUCT.md)\n* [Contributing Guide](https://github.com/dokieli/web-annotation/blob/main/CONTRIBUTING.md)\n* [API Reference](https://dokieli.github.io/web-annotation/)\n* [Security Policy](https://github.com/dokieli/web-annotation/blob/main/SECURITY.md)\n\n## License\n\n* Source code is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n* Unless otherwise noted, images and other media assets are licensed under the [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/).\n\n## Installation\n\n```sh\nnpm install @dokieli/web-annotation\n```\n\nor\n\n```sh\nyarn install @dokieli/web-annotation\n```\n\n```js\nimport { createAnnotation, serializeAnnotationToJSONLD, serializeAnnotationToHTML } from '@dokieli/web-annotation';\n\nconst annotation = createAnnotation({\n  motivatedBy: 'oa:commenting',\n  body: { value: 'A note.' },\n  target: { source: 'https://example.org/', selector: { type: 'TextQuoteSelector', exact: 'annotated text' } }\n});\n\nconst jsonld = serializeAnnotationToJSONLD(annotation);\nconst html = serializeAnnotationToHTML(annotation);\n```\n\n## Documentation\n\nSee [API Reference](https://dokieli.github.io/web-annotation/) and [Examples](https://github.com/dokieli/web-annotation/blob/main/examples/).\n\n## Features\n\n* Parsing and serializing annotations in JSON-LD and HTML+RDFa.\n* Built-in JSON-LD processing.\n* Support for selectors and states.\n* Restoring the selection object from a stored selector.\n* Marking the annotated text (the target) in the DOM.\n\n## Specifications\n\n* W3C [Web Annotation Model](https://www.w3.org/TR/annotation-model/)\n* W3C [Web Annotation Vocabulary](https://www.w3.org/TR/annotation-vocab/)\n* W3C [Selectors and States](https://www.w3.org/TR/selectors-states/)\n* W3C [Embedding Web Annotations in HTML](https://www.w3.org/TR/annotation-html)\n\n## Conformance\n\nThe data in JSON-LD this library emits conforms to the W3C Web Annotation Data Model, validated against the official [w3c/web-annotation-tests](https://github.com/w3c/web-annotation-tests) suite (its MUST assertions). Run the checks with `yarn test:conformance`.\n\n## Supported By\n\n* This project was funded by [NLnet](https://nlnet.nl/) (2025-09–2026-06) as part of [NLnet Dokieli Collaborative](https://nlnet.nl/project/Dokieli-Collaborative/).\n\n## Support the project\n\nHelp the project grow by sponsoring it on [Open Collective](https://opencollective.com/dokieli/) or reach out to us.\n","readmeFilename":"README.md"}