{"_id":"@21stgov/commons-js","_rev":"5-01cb770e3531555017dcf03492febab3","name":"@21stgov/commons-js","dist-tags":{"latest":"0.6.0"},"versions":{"0.3.0":{"name":"@21stgov/commons-js","version":"0.3.0","license":"MIT","_id":"@21stgov/commons-js@0.3.0","maintainers":[{"name":"sethcottle","email":"sethcottle@gmail.com"}],"homepage":"https://commonsui.com","bugs":{"url":"https://github.com/21stGov/commons/issues"},"dist":{"shasum":"fc4b85eb8242da59b8d6f269ca04eaf8919d4f28","tarball":"https://registry.npmjs.org/@21stgov/commons-js/-/commons-js-0.3.0.tgz","fileCount":6,"integrity":"sha512-O/4eVk91oT5hRvy2f2SzlENN0k8XXDyaQv2/7rH3QkSvZubl5oxyE/eHkB47njs8xeqhsaHmbGF+8xuiGGjQZA==","signatures":[{"sig":"MEQCIF0F2QN42cDCG6+Q6UdgJk72dh9FZuo+3d0zgeUTEHOMAiBxJEiuyRX7m1p3UXHATznh+EZRteh7al2rZjqgGGLsZw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":167515},"main":"./dist/index.js","type":"module","_from":"file:21stgov-commons-js-0.3.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./global":"./dist/index.global.js"},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sethcottle","email":"sethcottle@gmail.com"},"//exports":"Dev/workspace resolves to source (Vite HMR); publishConfig.exports below ships dist on publish.","_resolved":"/private/var/folders/cf/wl28lk8s19770tzrdlt63yvw0000gn/T/a7b216694e80a6b8eefcc51326385c07/21stgov-commons-js-0.3.0.tgz","_integrity":"sha512-O/4eVk91oT5hRvy2f2SzlENN0k8XXDyaQv2/7rH3QkSvZubl5oxyE/eHkB47njs8xeqhsaHmbGF+8xuiGGjQZA==","repository":{"url":"git+https://github.com/21stGov/commons.git","type":"git","directory":"packages/js"},"_npmVersion":"11.16.0","description":"Framework-agnostic progressive-enhancement runtime for Commons — makes the .cui-* / data-slot markup interactive (accordion, dialog, menus…) with no framework.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.10","typescript":"~5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/commons-js_0.3.0_1784136087781_0.6578156327404221","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@21stgov/commons-js","version":"0.3.1","license":"MIT","_id":"@21stgov/commons-js@0.3.1","maintainers":[{"name":"sethcottle","email":"sethcottle@gmail.com"}],"homepage":"https://commonsui.com","bugs":{"url":"https://github.com/21stGov/commons/issues"},"dist":{"shasum":"481f9df424f364976bba5456aebf214aa0f19001","tarball":"https://registry.npmjs.org/@21stgov/commons-js/-/commons-js-0.3.1.tgz","fileCount":6,"integrity":"sha512-tL/qyhslRmjUVfFGxXuMVSUfftda+a23q+slfpM9I8jqUJBwwsTzpFWdwdiyUiAoEU5NL0K9g0xrAl+0saC+AA==","signatures":[{"sig":"MEQCIGZEFS5Zwysffkw9MWRlui1tTgP0MmPnuA8JAON0CuPEAiBC+TRHh65L0HOyL9cCjX6kSHG7mAzC0D86afnTAZM5qw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@21stgov%2fcommons-js@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":167539},"main":"./dist/index.js","type":"module","_from":"file:21stgov-commons-js-0.3.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./global":"./dist/index.global.js"},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8d5dfcc7-2264-4782-887a-a9c7d3ffc856"}},"//exports":"Dev/workspace resolves to source (Vite HMR); publishConfig.exports below ships dist on publish.","_resolved":"/tmp/9a9c47191d055d0ddba61376069fe51b/21stgov-commons-js-0.3.1.tgz","_integrity":"sha512-tL/qyhslRmjUVfFGxXuMVSUfftda+a23q+slfpM9I8jqUJBwwsTzpFWdwdiyUiAoEU5NL0K9g0xrAl+0saC+AA==","repository":{"url":"git+https://github.com/21stGov/commons.git","type":"git","directory":"packages/js"},"_npmVersion":"11.16.0","description":"Framework-agnostic progressive-enhancement runtime for Commons — makes the .cui-* / data-slot markup interactive (accordion, dialog, menus…) with no framework.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","jsdom":"^29.1.1","vitest":"^4.1.10","typescript":"~5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/commons-js_0.3.1_1784157919035_0.4474269588263615","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@21stgov/commons-js","version":"0.4.0","license":"MIT","_id":"@21stgov/commons-js@0.4.0","maintainers":[{"name":"sethcottle","email":"sethcottle@gmail.com"}],"homepage":"https://commonsui.com","bugs":{"url":"https://github.com/21stGov/commons/issues"},"dist":{"shasum":"ad4e5cec417357a6e86cf5bdaacc759374595af0","tarball":"https://registry.npmjs.org/@21stgov/commons-js/-/commons-js-0.4.0.tgz","fileCount":6,"integrity":"sha512-waMZyxjDXz0I8PadB3dq3ux65FI8neXgyx5n+JYXuHU0CCtBpmnxc82TwQUwNUx43zeECAy4DchTRG4edHpd0g==","signatures":[{"sig":"MEUCIQDSDd7vHB6oWiUfKvWI+HgDLVnhYeNdJdSwTvQ6tXlaAgIgEC1O6gIgx6U2bHtnMvECRfrofkf5QGWy6n0+DO3Iki8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@21stgov%2fcommons-js@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":169695},"main":"./dist/index.js","type":"module","_from":"file:21stgov-commons-js-0.4.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./global":"./dist/index.global.js"},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8d5dfcc7-2264-4782-887a-a9c7d3ffc856"}},"//exports":"Dev/workspace resolves to source (Vite HMR); publishConfig.exports below ships dist on publish.","_resolved":"/tmp/3f3f0abc26cfbf585ccaf41649f14936/21stgov-commons-js-0.4.0.tgz","_integrity":"sha512-waMZyxjDXz0I8PadB3dq3ux65FI8neXgyx5n+JYXuHU0CCtBpmnxc82TwQUwNUx43zeECAy4DchTRG4edHpd0g==","repository":{"url":"git+https://github.com/21stGov/commons.git","type":"git","directory":"packages/js"},"_npmVersion":"11.16.0","description":"Framework-agnostic progressive-enhancement runtime for Commons — makes the .cui-* / data-slot markup interactive (accordion, dialog, menus…) with no framework.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","jsdom":"^29.1.1","vitest":"^4.1.10","typescript":"~5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/commons-js_0.4.0_1784170192778_0.03377386405369487","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@21stgov/commons-js","version":"0.5.0","license":"MIT","_id":"@21stgov/commons-js@0.5.0","maintainers":[{"name":"sethcottle","email":"sethcottle@gmail.com"}],"homepage":"https://commonsui.com","bugs":{"url":"https://github.com/21stGov/commons/issues"},"dist":{"shasum":"fcc4a6b1060ee5e27671a1142a6e5c588554c875","tarball":"https://registry.npmjs.org/@21stgov/commons-js/-/commons-js-0.5.0.tgz","fileCount":6,"integrity":"sha512-NSQ6vw53Jz1Q4wHYVe8rIcW9NEO82NJ4+jAnXNUCCTad4JXmhA4q17kEJ+iHPgK6mA/CDGsWbGk1p965vrCsyg==","signatures":[{"sig":"MEQCIBEmll+ihlUTMnShCeE3bm6pDihfsHBr0NSZRAIatWYTAiAWs6IEBsZPeVjCiJ8G0XzUqrI7iKOI9wF9khQpkm1ipQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@21stgov%2fcommons-js@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":169695},"main":"./dist/index.js","type":"module","_from":"file:21stgov-commons-js-0.5.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./global":"./dist/index.global.js"},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8d5dfcc7-2264-4782-887a-a9c7d3ffc856"}},"//exports":"Dev/workspace resolves to source (Vite HMR); publishConfig.exports below ships dist on publish.","_resolved":"/tmp/6bbdadef126c66e869592014bf7c43e4/21stgov-commons-js-0.5.0.tgz","_integrity":"sha512-NSQ6vw53Jz1Q4wHYVe8rIcW9NEO82NJ4+jAnXNUCCTad4JXmhA4q17kEJ+iHPgK6mA/CDGsWbGk1p965vrCsyg==","repository":{"url":"git+https://github.com/21stGov/commons.git","type":"git","directory":"packages/js"},"_npmVersion":"11.16.0","description":"Framework-agnostic progressive-enhancement runtime for Commons — makes the .cui-* / data-slot markup interactive (accordion, dialog, menus…) with no framework.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","jsdom":"^29.1.1","vitest":"^4.1.10","typescript":"~5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/commons-js_0.5.0_1784173735839_0.9426084466580966","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@21stgov/commons-js","version":"0.6.0","type":"module","license":"MIT","sideEffects":false,"description":"Framework-agnostic progressive-enhancement runtime for Commons — makes the .cui-* / data-slot markup interactive (accordion, dialog, menus…) with no framework.","homepage":"https://commonsui.com","repository":{"type":"git","url":"git+https://github.com/21stGov/commons.git","directory":"packages/js"},"engines":{"node":">=22"},"//exports":"Dev/workspace resolves to source (Vite HMR); publishConfig.exports below ships dist on publish.","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./global":"./dist/index.global.js"},"publishConfig":{"access":"public"},"devDependencies":{"jsdom":"^29.1.1","tsup":"^8.5.1","typescript":"~5.9.0","vitest":"^4.1.10"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit","test":"vitest run"},"main":"./dist/index.js","types":"./dist/index.d.ts","_id":"@21stgov/commons-js@0.6.0","bugs":{"url":"https://github.com/21stGov/commons/issues"},"_integrity":"sha512-2/ECKMC9uvIEtiupAXZr1x9eLuQvUyf8AMn4CdwxN1sNbwLyouCNM/8oazPMyilhzT7Zz0lj3OCRvVCWbI32cA==","_resolved":"/tmp/10b3464a10e102f3c870ab7051dbe2fa/21stgov-commons-js-0.6.0.tgz","_from":"file:21stgov-commons-js-0.6.0.tgz","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-2/ECKMC9uvIEtiupAXZr1x9eLuQvUyf8AMn4CdwxN1sNbwLyouCNM/8oazPMyilhzT7Zz0lj3OCRvVCWbI32cA==","shasum":"2d39015a47ca068faecea5f86e79ddd989d09aad","tarball":"https://registry.npmjs.org/@21stgov/commons-js/-/commons-js-0.6.0.tgz","fileCount":6,"unpackedSize":173801,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@21stgov%2fcommons-js@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGmwoaVpfCXRbzqDP7zposD6R/S3f6qO9NsMGroc/3RnAiBbKgBrYbPZQZCDoYUU65QTLUl+yydFPeckDKlGbETp6w=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8d5dfcc7-2264-4782-887a-a9c7d3ffc856"}},"directories":{},"maintainers":[{"name":"sethcottle","email":"sethcottle@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/commons-js_0.6.0_1784255084762_0.3877950234616274"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-15T17:21:27.496Z","modified":"2026-07-17T02:24:45.276Z","0.3.0":"2026-07-15T17:21:27.908Z","0.3.1":"2026-07-15T23:25:19.142Z","0.4.0":"2026-07-16T02:49:52.938Z","0.5.0":"2026-07-16T03:48:55.982Z","0.6.0":"2026-07-17T02:24:44.894Z"},"bugs":{"url":"https://github.com/21stGov/commons/issues"},"license":"MIT","homepage":"https://commonsui.com","repository":{"type":"git","url":"git+https://github.com/21stGov/commons.git","directory":"packages/js"},"description":"Framework-agnostic progressive-enhancement runtime for Commons — makes the .cui-* / data-slot markup interactive (accordion, dialog, menus…) with no framework.","maintainers":[{"name":"sethcottle","email":"sethcottle@gmail.com"}],"readme":"# @21stgov/commons-js\n\nThe progressive-enhancement runtime for [Commons](https://commonsui.com), the accessibility-first design system for U.S. local governments by 21st Gov. It brings the interactive behavior of the React components — dialogs, menus, tabs, accordions, carousels, combo boxes, data tables, and more — to the framework-agnostic `.cui-*` markup, so vanilla HTML behaves 1:1 with React. No framework required.\n\n## Usage\n\n**With a bundler** — import `enhance` and call it (optionally scoped to a root element):\n\n```js\nimport { enhance } from \"@21stgov/commons-js\";\nenhance();\n```\n\n**Drop-in `<script>`** — the IIFE build (`@21stgov/commons-js/global`) auto-enhances every `.cui-*` region on the page and exposes `window.Commons`:\n\n```html\n<script src=\"/commons.js\" defer></script>\n```\n\nPair it with [`@21stgov/commons-css`](https://www.npmjs.com/package/@21stgov/commons-css) for the styles. The behaviors follow the same normative accessibility contract published for each component, so keyboard and screen-reader support matches the React version. Both files are also served, versioned, from `cdn.commonsui.com`. MIT licensed.\n","readmeFilename":"README.md"}