{"_id":"@ariada-org/dracula-agent","name":"@ariada-org/dracula-agent","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@ariada-org/dracula-agent","version":"0.1.1","description":"​Rive + GSAP Dracula character layer for draculascan. Plugs into ScanProgress.characterSlot.","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"},"./assets/*":"./assets/*"},"dependencies":{"@ariada-org/core":"0.1.1"},"peerDependencies":{"@rive-app/webgl":"^2.21.0","gsap":"^3.12.5","react":"^19.0.0","react-dom":"^19.0.0"},"peerDependenciesMeta":{"@rive-app/webgl":{"optional":true},"gsap":{"optional":true}},"devDependencies":{"@types/node":"^22.10.2","@types/react":"^19.0.2","happy-dom":"^20.9.0","react":"^19.0.0","react-dom":"^19.0.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/dracula-agent"},"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/dracula-agent@0.1.1","bugs":{"url":"https://github.com/ariada-org/ariada/issues"},"homepage":"https://github.com/ariada-org/ariada#readme","_integrity":"sha512-jl5SJjf5QM4IO4396kHf73aC2fvGLuLjc/OMbaR0/TcU47GvezFthL1SJH4GD46Z8ynICqKzu/xwJ1Ft2i0JRg==","_resolved":"/private/var/folders/2c/_42xj0l179z8yc7wmp5k91s00000gn/T/969ec987c4c4e09e334fc116be170a12/ariada-org-dracula-agent-0.1.1.tgz","_from":"file:ariada-org-dracula-agent-0.1.1.tgz","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-jl5SJjf5QM4IO4396kHf73aC2fvGLuLjc/OMbaR0/TcU47GvezFthL1SJH4GD46Z8ynICqKzu/xwJ1Ft2i0JRg==","shasum":"8ee643c82c3ac543ae87f072efcd62894f03a979","tarball":"https://registry.npmjs.org/@ariada-org/dracula-agent/-/dracula-agent-0.1.1.tgz","fileCount":44,"unpackedSize":139328,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICucOc/vHsBS/QlXR20fYUxQRxCzRprE4YWb5IQ0jla5AiEArN6slQrGAkebBlrWLImOyviFyzkXwsCVD2PJwjeMpwc="}]},"_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/dracula-agent_0.1.1_1784942575145_0.5570697517877741"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-25T01:22:54.964Z","0.1.1":"2026-07-25T01:22:55.300Z","modified":"2026-07-25T01:22:55.576Z"},"maintainers":[{"name":"agonist","email":"ab@agonist.ai"}],"description":"​Rive + GSAP Dracula character layer for draculascan. Plugs into ScanProgress.characterSlot.","homepage":"https://github.com/ariada-org/ariada#readme","repository":{"type":"git","url":"git+https://github.com/ariada-org/ariada.git","directory":"packages/dracula-agent"},"bugs":{"url":"https://github.com/ariada-org/ariada/issues"},"license":"MIT","readme":"# @ariada-org/dracula-agent\n\nCharacter-themed visualisation library — the proprietary character\nlayer for `draculascan`. Renders `ScanEvent` streams as a visual character\n(vampire / skeleton / zombie / mummy) that reacts to severity transitions.\n\nPlugs into `<ScanProgress characterSlot={...}>` from\n[`@ariada-org/scan-flow-ui`](../scan-flow-ui).\n\n| Field           | Value                                                                |\n| --------------- | -------------------------------------------------------------------- |\n| Package name    | `@ariada-org/dracula-agent`                                              |\n| Version         | 0.1.0                                                                |\n| Licence         | **MIT** (viz-library convention — 2026-05-19 founder decision)       |\n| Runtime         | Browser, React `^19`                                                 |\n| Peer deps       | `react`, `react-dom`, optional `@rive-app/webgl`, optional `gsap`    |\n| REUSE-compliant | yes — `REUSE.toml` + per-file SPDX headers                           |\n\n## Why MIT\n\nVisualisation libraries are a category with very strong MIT-licence\nconvention (e.g. d3, three.js, framer-motion, recharts). TS-distribution is\npractically open by nature (consumers always have the JavaScript anyway), and\nthe patent moat lives in the score-generation pipeline (Patent K covers the\nscan-visualisation concept at a higher level — not the specific render\nimplementation here). Releasing under MIT removes friction for downstream\nembedders without compromising the moat.\n\n## Public API\n\n```tsx\nimport { DraculaScene, HeroDracula, SpeechBubble } from '@ariada-org/dracula-agent';\n\n<DraculaScene events={sseEvents} riveUrl=\"/dracula.riv\" />;\n<HeroDracula reducedMotion />;\n<SpeechBubble locale=\"en\" text=\"Click scan to begin.\" />;\n```\n\nPublic exports:\n\n| Export                | Kind        | Purpose                                                   |\n| --------------------- | ----------- | --------------------------------------------------------- |\n| `DraculaScene`        | Component   | Full scene — character + scene transitions                |\n| `HeroDracula`         | Component   | Hero-page character pose                                  |\n| `SpeechBubble`        | Component   | i18n speech bubble                                        |\n| `PlaceholderDraculaSvg` | Component | SSR-safe SVG used when the `.riv` is the 0-byte placeholder |\n| `deriveState`         | Pure fn     | severity + last event → 1 of 7 named character states     |\n| `severityIntensity`   | Pure fn     | severity → 0..1 intensity                                 |\n| `bboxCenter` / `bezierPath` / `sampleBezier` / `catmullRom` / `pathThroughBBoxes` | Pure fns | bbox → animation path |\n| `prefersReducedMotion` / `watchReducedMotion` | DOM     | reduced-motion preference                                 |\n\n## Character variants\n\n`deriveState` returns one of 7 named states depending on severity input:\n\n| State          | When                                                  |\n| -------------- | ----------------------------------------------------- |\n| `idle`         | no events yet                                         |\n| `searching`    | scan in progress, no findings                         |\n| `discovered`   | first finding emitted (minor / moderate)              |\n| `alerted`      | serious finding                                       |\n| `horrified`    | critical finding                                      |\n| `victorious`   | scan complete, score ≥ 90                             |\n| `defeated`     | scan complete, score < 50                             |\n\n## Reduced motion\n\nThe package respects the user's `prefers-reduced-motion` preference. When\nreduced motion is active, animation timelines collapse to instantaneous\nstate-pose snaps; no Bezier interpolation, no GSAP timeline.\n\n## Character assets\n\n`assets/dracula.riv` is currently a 0-byte placeholder. See `assets/TODO.md`\nfor the commission brief required before production launch. The asset is\n**not** covered by the MIT licence — it is commission-restricted (see\n`REUSE.toml` `assets/**` block). The `PlaceholderDraculaSvg` component\nships an SSR-safe in-code SVG fallback so the package is testable and\nfunctional without the real asset.\n\n## GSAP licence note\n\n`gsap` MotionPathPlugin (used for advanced choreography in production\nbuilds) requires a Club GreenSock commercial licence (≈ $99/yr). The\n**default** rendering path uses an internal `bezierPath` +\n`requestAnimationFrame` loop that is licence-free; consumers can opt into\nGSAP via the `peerDependenciesMeta.optional` channel for heavier\nchoreography in production builds where the GreenSock licence is held.\n\n## Testing\n\n```bash\npnpm --filter @ariada-org/dracula-agent test\n```\n\nFive test files cover state machine, spatial nav, reduced-motion watcher,\nplaceholder SVG, and the top-level scene component (vitest + happy-dom +\ntesting-library).\n\n## Trademark\n\nThe MIT licence covers **code**. It does **not** grant trademark rights to\n\"Ariada\", \"Ariadne\", \"Blamer\", \"Clamper\", \"Reverter\", \"Draculascan\", or\n\"Dracula\" as used in this product context. Re-name the character + package\nin forks. See `TRADEMARK.md`.\n\n## Layout\n\n```\nsrc/\n  index.ts              — public exports\n  DraculaScene.tsx      — top-level scene\n  HeroDracula.tsx       — hero-page pose\n  SpeechBubble.tsx      — i18n bubble\n  placeholder-svg.tsx   — SSR-safe SVG fallback\n  state-machine.ts      — deriveState (pure)\n  spatial-nav.ts        — bezier / catmull-rom (pure)\n  reduced-motion.ts     — prefers-reduced-motion watcher\n  __tests__/            — vitest + happy-dom + RTL\nassets/\n  dracula.riv           — 0-byte placeholder (commission pending)\n  TODO.md               — commission brief\n```\n\n## Licence\n\nMIT — see `LICENSE`. Per-file SPDX headers + `REUSE.toml` keep\nmachine-readable metadata in sync. Character assets under `assets/**` are\n**not** MIT — see `REUSE.toml`.\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-0ae3cd2c57490ff310cbf852d43bdfd5"}