{"name":"html-standard","version":"0.0.13","description":"A TypeScript library for working with the HTML Living Standard specification.","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"scripts":{"build":"tsup","ts":"tsc --noEmit","test":"vitest run","test:watch":"vitest","test:ui":"vitest --ui","format":"prettier --write .","format:check":"prettier --check ."},"author":{"name":"yeonjuan"},"license":"MIT","devDependencies":{"@vitest/ui":"^4.0.18","prettier":"^3.5.3","tsup":"^8.5.1","vitest":"^4.0.18"},"dependencies":{"vscode-css-languageservice":"^6.3.9","vscode-languageserver-textdocument":"^1.0.12"},"_id":"html-standard@0.0.13","gitHead":"fda0975a521cd79891d9bcb41344fbcf2bf8e124","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-6oNfW3c1t44O7jVXu0tp4E5MbHifWlXrHlZBPt6y7vFdgLOUUh8hyzoRhfUgozlBUK6oLLYhqP1uIqbZ8ggcBA==","shasum":"c39742ea94fd3c6e729fd220db470ebe41d7af89","tarball":"http://registry-npm.ywwl.com/html-standard/download/html-standard-0.0.13.tgz","fileCount":8,"unpackedSize":342513,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC6X7QtRHF4RZbCpKRYzBAOl/wGy0AIc+GO9UYEa8HlnAIhAMjrpoAPfBdv3qFAk5sg61jLfK4VTMMVuV18OiHzp9Kx"}],"size":69771,"noattachment":false,"key":"/html-standard/-/html-standard-0.0.13.tgz"},"_npmUser":{"name":"yeonjuan-joah","email":"yeonjuan93@gmail.com"},"directories":{},"maintainers":[{"name":"yeonjuan-joah","email":"yeonjuan93@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html-standard_0.0.13_1771596088991_0.16967571314509544"},"_hasShrinkwrap":false,"readme":"# html-standard\n\nA TypeScript library for working with the HTML Living Standard specification.\n\n> ⚠️ **Experimental**: This project may introduce breaking changes frequently.\n\n## Installation\n\n```bash\nnpm install html-standard\n```\n\n## Usage\n\n### Get Implicit ARIA Roles\n\n```typescript\nimport { element } from \"html-standard\";\n\n// Basic elements\nelement(\"button\").implicitRole(); // 'button'\nelement(\"nav\").implicitRole(); // 'navigation'\n\n// Attribute-dependent roles\nelement(\"a\", {\n  attributes: { get: (key) => (key === \"href\" ? \"https://example.com\" : null) },\n}).implicitRole(); // 'link'\n\nelement(\"a\").implicitRole(); // 'generic' (no href)\n\nelement(\"input\", {\n  attributes: { get: (key) => (key === \"type\" ? \"checkbox\" : null) },\n}).implicitRole(); // 'checkbox'\n```\n\n### Validate Attributes\n\n```typescript\nimport { element } from \"html-standard\";\n\nconst link = element(\"link\");\n\n// Validate 'rel' attribute\nlink.attributes.get(\"rel\")?.validateValue(\"stylesheet\"); // { valid: true, ... }\nlink.attributes.get(\"rel\")?.validateValue(\"invalid-value\"); // { valid: false, ... }\n```\n\n## Features\n\n- Implicit ARIA roles per [HTML-ARIA spec](https://www.w3.org/TR/html-aria/)\n- Attribute validation based on HTML Standard\n- Case-insensitive element names\n- TypeScript support\n\n## License\n\nMIT\n","publish_time":1771596089150,"_cnpm_publish_time":1771596089150,"dist-tags":{"latest":"0.0.13"}}