{"_id":"@ariada-org/embed-badge","name":"@ariada-org/embed-badge","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@ariada-org/embed-badge","version":"0.1.0","description":"<ariada-badge> Web Component — shared bundle, brand via data-theme attribute. Shadow-DOM isolated.","license":"MIT","publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"devDependencies":{"@types/node":"^22.10.2","happy-dom":"^20.9.0","rimraf":"^6.0.1","typescript":"^5.7.2","vitest":"^4.1.0"},"engines":{"node":">=22"},"repository":{"type":"git","url":"git+https://github.com/ariada-org/ariada.git","directory":"packages/embed-badge"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","lint":"eslint src","test":"vitest run","clean":"rimraf dist coverage"},"_id":"@ariada-org/embed-badge@0.1.0","bugs":{"url":"https://github.com/ariada-org/ariada/issues"},"homepage":"https://github.com/ariada-org/ariada#readme","_integrity":"sha512-It85k8UlCnSaD9Dd84NqbfWIDyaGk+FR4GF+SB6N6rGt+D7YvALFdSPFyPUAUcUeuJKFMHiiip8xNoOfei4SwQ==","_resolved":"/private/var/folders/2c/_42xj0l179z8yc7wmp5k91s00000gn/T/916c93f204f5549d81018271f96c2967/ariada-org-embed-badge-0.1.0.tgz","_from":"file:ariada-org-embed-badge-0.1.0.tgz","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-It85k8UlCnSaD9Dd84NqbfWIDyaGk+FR4GF+SB6N6rGt+D7YvALFdSPFyPUAUcUeuJKFMHiiip8xNoOfei4SwQ==","shasum":"e47810882e123e43e0111a857bc4f82185ef3cd8","tarball":"https://registry.npmjs.org/@ariada-org/embed-badge/-/embed-badge-0.1.0.tgz","fileCount":18,"unpackedSize":52698,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDldUMTqiTjy2m8C8wSUZDpRpqhluN8DrBdGbB2AEm0QQIgOU5zykOeFKXAsp96h1m1U3YnfinesbeOiymfqr0lFcI="}]},"_npmUser":{"name":"agonist","email":"ab@agonist.ai"},"directories":{},"maintainers":[{"name":"agonist","email":"ab@agonist.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/embed-badge_0.1.0_1784942575019_0.9024025599709702"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-25T01:22:54.838Z","0.1.0":"2026-07-25T01:22:55.157Z","modified":"2026-07-25T01:22:55.497Z"},"maintainers":[{"name":"agonist","email":"ab@agonist.ai"}],"description":"<ariada-badge> Web Component — shared bundle, brand via data-theme attribute. Shadow-DOM isolated.","homepage":"https://github.com/ariada-org/ariada#readme","repository":{"type":"git","url":"git+https://github.com/ariada-org/ariada.git","directory":"packages/embed-badge"},"bugs":{"url":"https://github.com/ariada-org/ariada/issues"},"license":"MIT","readme":"# @ariada-org/embed-badge\n\n`<ariada-badge>` Web Component — a commodity badge that displays an\naccessibility score on any third-party site. One bundle, both brands.\nShadow-DOM isolated so it cannot bleed host-page styles into the badge or\nvice versa.\n\n| Field           | Value                                                  |\n| --------------- | ------------------------------------------------------ |\n| Package name    | `@ariada-org/embed-badge`                                  |\n| Version         | 0.1.0                                                  |\n| Licence         | **MIT** (commodity badge SDK)                          |\n| Runtime         | Browser only; pure DOM, no runtime deps                |\n| Dependencies    | none                                                   |\n| REUSE-compliant | yes — `REUSE.toml` + per-file SPDX headers             |\n\nThe MIT licence is deliberately chosen so downstream sites can embed the\nbadge frictionlessly. Proprietary scan-visualisation technology covers the\nunderlying score-generation pipeline; the badge itself is the commodity\npresentation surface released under the most permissive widely-adopted OSS\nlicence.\n\n## Usage — copy-paste HTML\n\n```html\n<script src=\"https://draculascan.org/embed.js\"></script>\n<ariada-badge\n  data-site=\"example.com\"\n  data-theme=\"dracula\"\n></ariada-badge>\n```\n\nAttributes:\n\n| Attribute       | Required | Default                  | Description                            |\n| --------------- | -------- | ------------------------ | -------------------------------------- |\n| `data-site`     | yes      | —                        | Bare hostname (no scheme, no path)     |\n| `data-theme`    | no       | `\"ariada\"`               | `\"ariada\"` or `\"dracula\"`              |\n| `data-api-base` | no       | brand-default            | Override the API origin                |\n\n## Usage — bundler\n\n```ts\nimport '@ariada-org/embed-badge';\n\n// Insert the element anywhere:\ndocument.body.insertAdjacentHTML(\n  'beforeend',\n  '<ariada-badge data-site=\"example.com\"></ariada-badge>'\n);\n```\n\n## Shadow-DOM isolation\n\nThe component creates a closed shadow root. Host-page CSS cannot override the\nbadge styling and vice versa. Branding is driven by `data-theme` which selects\nbetween two pre-bundled CSS blocks.\n\n## Accessibility\n\nThe badge renders a labelled link to the public scorecard. The score value\nis announced via an `aria-label`; the colour state is duplicated as text\ncontent so it does not rely on hue alone.\n\n## Bundle size\n\nThe bundle is intentionally tiny (< 5 KB minified) and has zero dependencies.\nSites that already include their own CDN can drop the script tag without a\nbuild-system integration.\n\n## Trademark\n\n`ariada-badge` as a DOM element name is reserved for use with the ariada\nscore API. The MIT licence does **not** grant trademark rights to \"Ariada\",\n\"Ariadne\", \"Blamer\", \"Clamper\", \"Reverter\", or \"Draculascan\". If you fork\nthis package, please re-name the custom element to avoid downstream\nconfusion. See `TRADEMARK.md`.\n\n## Layout\n\n```\nsrc/\n  index.ts            — public exports + custom-element registration\n  fetch-score.ts      — score-fetch + cache logic\n  __tests__/\n    badge.test.ts     — vitest + happy-dom smoke tests\n```\n\n## Licence\n\nMIT — see `LICENSE`. Per-file SPDX headers + `REUSE.toml` keep machine-readable\nmetadata in sync.\n\n## Security\n\nVulnerability reports → `https://github.com/ariada-org/ariada/security/advisories/new`\nor `security@ariada.org`. See `SECURITY.md`.\n","readmeFilename":"README.md","_rev":"1-3e53f9932ac889fbb6ca0758b747994b"}