{"_id":"@accessible-react-mentions/core","name":"@accessible-react-mentions/core","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@accessible-react-mentions/core","version":"0.1.0","description":"Headless engine for accessible React mentions: state machine, trigger detection, request lifecycle, value serializer, and adapter interface.","license":"MIT","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"peerDependencies":{"react":"^18.0.0 || ^19.0.0"},"devDependencies":{"@types/react":"^19.0.1","react":"^19.0.0","tsdown":"^0.21.10","typescript":"^6.0.3","vitest":"^4.1.5"},"publishConfig":{"access":"public"},"scripts":{"build":"tsdown","dev":"tsdown --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit"},"_id":"@accessible-react-mentions/core@0.1.0","_integrity":"sha512-i1cj7vHsMdNNqMJIepZIWMxOzEUqpYO4QN5XtFI5HY7ecYTLX7Pnb+QbKSs8Uk8dMFs/fxFNVjxdaBXG1T1zhA==","_resolved":"/private/var/folders/39/9xywyt255_d0vfpsvctvjmz80000gn/T/ca4b9d110ce93fafc5bd729450b893fc/accessible-react-mentions-core-0.1.0.tgz","_from":"file:accessible-react-mentions-core-0.1.0.tgz","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-i1cj7vHsMdNNqMJIepZIWMxOzEUqpYO4QN5XtFI5HY7ecYTLX7Pnb+QbKSs8Uk8dMFs/fxFNVjxdaBXG1T1zhA==","shasum":"4103419c6fe3d75ecf2ab53ae7ce1da69b9dd2ee","tarball":"https://registry.npmjs.org/@accessible-react-mentions/core/-/core-0.1.0.tgz","fileCount":12,"unpackedSize":96104,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGdmNDuqgzEZ0yw16OLd/tSPdhNS23Y7r4w8P7x1a5f3AiBB/ESr71tU/WrYnWnlV5uAhq2rVmCmxaSXt4zU6uRSSA=="}]},"_npmUser":{"name":"karan715","email":"karanthakur715@gmail.com"},"directories":{},"maintainers":[{"name":"karan715","email":"karanthakur715@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.1.0_1777372342319_0.17013007137225022"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-28T10:32:22.247Z","0.1.0":"2026-04-28T10:32:22.470Z","modified":"2026-04-28T10:32:22.700Z"},"maintainers":[{"name":"karan715","email":"karanthakur715@gmail.com"}],"description":"Headless engine for accessible React mentions: state machine, trigger detection, request lifecycle, value serializer, and adapter interface.","license":"MIT","readme":"# @accessible-react-mentions/core\n\nHeadless engine for [accessible-react-mentions](https://github.com/karan-t/accessible-react-mentions) — a strictly WCAG 2.2-compliant React mentions library.\n\nThis package has **zero dependencies** (other than its `react` peer) and ships only the input-surface-agnostic parts: state machine, trigger detection, request lifecycle (debounce + AbortSignal + dedup + LRU cache + pagination), markdown-style value serializer, and the [`Adapter`](#adapter) interface that any input surface plugs into. The hooks consume React; the data + lifecycle code does not.\n\nIf you want a ready-made React component, install [`@accessible-react-mentions/react`](../react) instead.\n\n## Install\n\n```sh\npnpm add @accessible-react-mentions/core\n```\n\nPeer: `react@^18 || ^19`.\n\n## Quick start\n\n```ts\nimport { useMention, createTextareaAdapter } from '@accessible-react-mentions/core';\n```\n\nSee the [`useMention` reference](https://accessible-react-mentions.vercel.app/reference/use-mention/) for the full API.\n\n## Adapter\n\nThe `Adapter` interface is the architectural seam that lets one core power `<textarea>` today and contenteditable / Lexical / Slate later, without breaking changes:\n\n```ts\ninterface Adapter {\n  getValue(): string;\n  getCaret(): number;\n  splice(start: number, end: number, replacement: string): void;\n  subscribe(listener: () => void): () => void;\n}\n```\n\n`createTextareaAdapter(el)` ships with this package. Other adapters land in v1.x.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-4bf9d77523c5fddcc4f2aefa08f54e06"}