{"name":"html-standard","version":"0.0.11","author":{"name":"yeonjuan"},"license":"MIT","_id":"html-standard@0.0.11","maintainers":[{"name":"yeonjuan-joah","email":"yeonjuan93@gmail.com"}],"dist":{"shasum":"ea82d571ab4a6b79d341739091d4aa098dfe016e","tarball":"http://registry-npm.ywwl.com/html-standard/download/html-standard-0.0.11.tgz","fileCount":8,"integrity":"sha512-X5QWANKpR6WNWWqC8Gdhj9QuovKPL0XsPoPMx4XXjpbbOEsUDuARJ9S9bVGn27hrtJM8UlfEghdHkuSu3W8GIg==","signatures":[{"sig":"MEUCIQCDnCD+wNCjEq3w01Z57ywNZR2u6dUY1DEPO/7XKBZBQAIgCp4JKTmXN5ZxSddCluMTJn3hDd5/pjDWjnQ4MNb/1rM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":379042,"size":68832,"noattachment":false,"key":"/html-standard/-/html-standard-0.0.11.tgz"},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"4631ac3dc05a6509a2a9f776398f8774f1551216","scripts":{"ts":"tsc --noEmit","test":"vitest run","build":"tsup","format":"prettier --write .","test:ui":"vitest --ui","test:watch":"vitest","format:check":"prettier --check ."},"_npmUser":{"name":"yeonjuan-joah","email":"yeonjuan93@gmail.com"},"_npmVersion":"10.9.2","description":"A TypeScript library for working with the HTML Living Standard specification.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"vscode-css-languageservice":"^6.3.9"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^4.0.18","prettier":"^3.5.3","@vitest/ui":"^4.0.18"},"_npmOperationalInternal":{"tmp":"tmp/html-standard_0.0.11_1770995230428_0.7496797797387631","host":"s3://npm-registry-packages-npm-production"},"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":1770995230591,"_cnpm_publish_time":1770995230591,"dist-tags":{"latest":"0.0.13"}}