{"_id":"@amband/huduma-accessibility","name":"@amband/huduma-accessibility","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@amband/huduma-accessibility","version":"0.1.0","description":"Self-contained, embeddable Huduma accessibility widget — drop-in <script> tag, served via jsDelivr/unpkg.","license":"UNLICENSED","type":"module","main":"huduma-accessibility.js","unpkg":"huduma-accessibility.js","jsdelivr":"huduma-accessibility.js","publishConfig":{"access":"public"},"keywords":["accessibility","a11y","widget","huduma","embed","jsdelivr"],"repository":{"type":"git","url":"git+https://github.com/AMBAND-LTD/how-frontend.git","directory":"packages/accessibility-widget"},"sideEffects":true,"_id":"@amband/huduma-accessibility@0.1.0","bugs":{"url":"https://github.com/AMBAND-LTD/how-frontend/issues"},"homepage":"https://github.com/AMBAND-LTD/how-frontend#readme","_nodeVersion":"22.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-gn4mZzik/MCvl2R9fGOc/aEhpX0KVdOSepBoEf8aRfbxRfz5v6xR/mwZRMD0G9F+YBgJH+3QUMEAJbI60GbWlg==","shasum":"08dd28dd0376fae3a33bd42c987e4d67113d9fb9","tarball":"https://registry.npmjs.org/@amband/huduma-accessibility/-/huduma-accessibility-0.1.0.tgz","fileCount":3,"unpackedSize":1042114,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEh9F1kQnXl5HKUpKxmCq4IPUA7YeMJ3Ti6jkX0Ug9BmAiEA5GZ4fRqePiNcip/e4wwElxL6aNYXj7sxySPqJFIMPNk="}]},"_npmUser":{"name":"ikky001","email":"trevor@amband.co.ke"},"directories":{},"maintainers":[{"name":"ikky001","email":"trevor@amband.co.ke"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/huduma-accessibility_0.1.0_1781086421804_0.7565553941110563"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T10:13:41.679Z","0.1.0":"2026-06-10T10:13:42.015Z","modified":"2026-06-10T10:13:42.216Z"},"maintainers":[{"name":"ikky001","email":"trevor@amband.co.ke"}],"description":"Self-contained, embeddable Huduma accessibility widget — drop-in <script> tag, served via jsDelivr/unpkg.","homepage":"https://github.com/AMBAND-LTD/how-frontend#readme","keywords":["accessibility","a11y","widget","huduma","embed","jsdelivr"],"repository":{"type":"git","url":"git+https://github.com/AMBAND-LTD/how-frontend.git","directory":"packages/accessibility-widget"},"bugs":{"url":"https://github.com/AMBAND-LTD/how-frontend/issues"},"license":"UNLICENSED","readme":"# @amband/huduma-accessibility\n\nSelf-contained, embeddable **Huduma Accessibility Widget**. A single IIFE bundle that mounts a\nfloating accessibility panel (font scaling, high contrast, dyslexia font, etc.) into any page via\none `<script>` tag. Settings are applied to the **host page's `<html>`** so the whole page becomes\nmore accessible. The widget renders inside a Shadow DOM, so it never leaks styles into the host.\n\n> The bundle is built from `src/embed/accessibility-index.tsx` in\n> [how-frontend](https://github.com/AMBAND-LTD/how-frontend) via `pnpm build:accessibility`.\n\n## Use via jsDelivr (recommended)\n\njsDelivr serves every npm release automatically:\n\n```html\n<!-- Configure before the bundle runs (auto-inits) -->\n<script>\n  window.HUDUMA_A11Y_CONFIG = { locale: \"en\", theme: \"auto\" }; // locale: \"en\" | \"sw\"\n</script>\n<!-- Pin a version for immutable, permanently-cached delivery -->\n<script\n  src=\"https://cdn.jsdelivr.net/npm/@amband/huduma-accessibility@0.1.0/huduma-accessibility.js\"\n  defer\n></script>\n```\n\n`@latest` also works (cached ~7 days); pin an exact version in production.\n\nunpkg works too: `https://unpkg.com/@amband/huduma-accessibility@0.1.0/huduma-accessibility.js`.\n\n## Manual init / cleanup\n\n```js\nwindow.HudumaAccessibility.init({ locale: \"sw\", theme: \"dark\" });\nwindow.HudumaAccessibility.setTheme(\"auto\"); // \"auto\" | \"light\" | \"dark\"\nwindow.HudumaAccessibility.destroy();\n```\n\n## Config\n\n| Key | Type | Default | Description |\n|-----|------|---------|-------------|\n| `locale` | `\"en\" \\| \"sw\"` | `\"en\"` | Widget UI language |\n| `theme` | `\"auto\" \\| \"light\" \\| \"dark\"` | `\"auto\"` | `auto` tracks `prefers-color-scheme`; scoped to the widget's shadow root |\n\n## CSP\n\nThe widget injects one `<style>` into its shadow root, so the host page needs:\n\n```\nstyle-src 'self' 'unsafe-inline';\n```\n\nIt contains no `eval`/`new Function()` and loads no extra scripts (fonts are inlined).\n\n## Publishing a new version\n\nFrom the repo root:\n\n```bash\npnpm build:accessibility:pkg          # builds the bundle + stages it into this package\ncd packages/accessibility-widget\nnpm version patch                      # or minor/major\nnpm publish                            # scoped public package (publishConfig.access = public)\n```\n","readmeFilename":"README.md","_rev":"1-e371786e1e9c47649b9cdb665100a151"}