{"_id":"@affino/tabs-core","name":"@affino/tabs-core","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@affino/tabs-core","version":"0.1.0","author":{"name":"Anton Pavlov","email":"a.pavlov@affino.dev"},"type":"module","description":"Headless tabs controller for Affino primitives","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"main":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"license":"MIT","devDependencies":{"vitest":"^4.0.15"},"repository":{"type":"git","url":"git+https://github.com/affinio/affinio.git#main"},"homepage":"https://affino.dev","bugs":{"url":"https://github.com/affinio/affinio/issues"},"keywords":["affino","core","headless","tabs","accessibility"],"module":"dist/index.js","scripts":{"build":"tsc -p tsconfig.json","test":"vitest run"},"_id":"@affino/tabs-core@0.1.0","_integrity":"sha512-HTUJw77uhrODjeeMOzQKEoOJS/FMcmTi4ZZnV+OdRoODTelBrCUt+m28Iq5fP7w5Z++pysCElvkPKXe5NWYqLQ==","_resolved":"/tmp/2e8516dc468ccea5be412d8866d038ad/affino-tabs-core-0.1.0.tgz","_from":"file:affino-tabs-core-0.1.0.tgz","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-HTUJw77uhrODjeeMOzQKEoOJS/FMcmTi4ZZnV+OdRoODTelBrCUt+m28Iq5fP7w5Z++pysCElvkPKXe5NWYqLQ==","shasum":"9d3949ed425f874f3798faed4bb57d6a5cc0cd30","tarball":"https://registry.npmjs.org/@affino/tabs-core/-/tabs-core-0.1.0.tgz","fileCount":12,"unpackedSize":6422,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCmxlHuI+Einc7bjPRI38phNPHTncS+q9V3tXkPJhRXwgIhALQ1l2H7baczoK+Xs3EN7YG73zZY7zWP1wyegr2+u5ta"}]},"_npmUser":{"name":"affino","email":"anton.pavlov.personal@gmail.com"},"directories":{},"maintainers":[{"name":"affino","email":"anton.pavlov.personal@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tabs-core_0.1.0_1771104575801_0.9825601935710317"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-14T21:29:35.695Z","0.1.0":"2026-02-14T21:29:35.936Z","modified":"2026-02-14T21:29:36.178Z"},"maintainers":[{"name":"affino","email":"anton.pavlov.personal@gmail.com"}],"description":"Headless tabs controller for Affino primitives","homepage":"https://affino.dev","keywords":["affino","core","headless","tabs","accessibility"],"repository":{"type":"git","url":"git+https://github.com/affinio/affinio.git#main"},"author":{"name":"Anton Pavlov","email":"a.pavlov@affino.dev"},"bugs":{"url":"https://github.com/affinio/affinio/issues"},"license":"MIT","readme":"# @affino/tabs-core\n\nHeadless tabs primitive for single-value selection.\n\n## Installation\n\n```bash\npnpm add @affino/tabs-core\n```\n\n## Quick start\n\n```ts\nimport { TabsCore } from \"@affino/tabs-core\"\n\nconst tabs = new TabsCore<string>(\"overview\")\n\ntabs.select(\"settings\")\ntabs.clear()\nconst snapshot = tabs.getSnapshot()\n```\n\n## API\n\n- `new TabsCore(defaultValue?)`\n- `select(value)`\n- `clear()`\n- `getSnapshot()`\n- `subscribe(listener)`\n- `destroy()`\n\n## Behavioral guarantees\n\n- Selecting the same value is a no-op.\n- Clearing when already empty is a no-op.\n- Subscribers are notified only on meaningful state changes.\n- `getSnapshot()` returns a frozen immutable object (runtime-enforced, not type-only).\n\n## Adapter guidance\n\n- Keep one canonical tabs state source in adapter state.\n- Treat snapshots as immutable values.\n- Wire framework events (`click`, keyboard shortcuts) to `select` / `clear` only.\n","readmeFilename":"README.md","_rev":"1-327c4dab264cbce18932a6b80fdcc548"}