{"name":"html-standard","version":"0.0.2","author":"","license":"ISC","_id":"html-standard@0.0.2","maintainers":[{"name":"yeonjuan-joah","email":"yeonjuan93@gmail.com"}],"dist":{"shasum":"a43820778d6318ba6a2860bd598629af3a0e42d2","tarball":"http://registry-npm.ywwl.com/html-standard/download/html-standard-0.0.2.tgz","fileCount":128,"integrity":"sha512-ce0OteYWmVIKpPbZLAJMXOOyvN4rW6N+e5QLkiLLd1+BwZ3RcVFOUb5tKkTLqVRdbexwH1FrqS3KtWF3bmVI7A==","signatures":[{"sig":"MEUCIQDLYdK+j3B3xcjWEgwQobi+Zrdfx3lIGTca5lw7e/wYBgIgNabGQGHkPBWuliaAuv3WMn2ppsmNFZPQDLRqjob+YQQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68899,"size":11402,"noattachment":false,"key":"/html-standard/-/html-standard-0.0.2.tgz"},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"gitHead":"2cfb118fc03d2c9cabad99c7f9fcea2b751ec5c4","scripts":{"ts":"tsc --noEmit","test":"jest","build":"tsup"},"_npmUser":{"name":"yeonjuan-joah","email":"yeonjuan93@gmail.com"},"_npmVersion":"10.7.0","description":"`html-standard` is a **work-in-progress** JavaScript/TypeScript library that provides structured data from the [HTML Living Standard](https://html.spec.whatwg.org/).","directories":{},"_nodeVersion":"20.15.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.4.0","ts-jest":"^29.3.1","prettier":"^3.5.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/html-standard_0.0.2_1744545874865_0.3848156256355879","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":1744545875087,"_cnpm_publish_time":1744545875087,"dist-tags":{"latest":"0.0.13"}}