{"_id":"@abrum/react","_rev":"2-f202d91bb9b689522bfad3e320a8d3d3","name":"@abrum/react","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@abrum/react","version":"0.1.0","keywords":["abrum","xp0","react","host-navigation"],"_id":"@abrum/react@0.1.0","maintainers":[{"name":"robinhuse","email":"hello@abrum.ai"}],"homepage":"https://github.com/abrum-ai/abrum-react#readme","bugs":{"url":"https://github.com/abrum-ai/abrum-react/issues"},"dist":{"shasum":"5677469408247b246e56800af74306aabc91f539","tarball":"https://registry.npmjs.org/@abrum/react/-/react-0.1.0.tgz","fileCount":86,"integrity":"sha512-4Tr3DvSpnLzDJNKOeLVxoc7tyhTAkQgQ5kGwxAg96Fs8EVArFPJ8fCGjetqfxe5Z1zzgL5xTk2Z5CVOf+QT54g==","signatures":[{"sig":"MEUCIHXHzD2X7k/xRR92ogAnGymXnrOH1lc9jpxGsWfTV3LbAiEAxCrQ0ZaBjnMdunUKcyK9ZqCzpue/MvwjWbnQrcwQntk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":430584},"main":"./src/index.tsx","type":"module","types":"./src/index.tsx","exports":{".":"./src/index.tsx","./ui":"./src/ui/index.tsx","./chat":"./src/chat/index.tsx","./core":"./src/core.tsx","./scheduler":"./src/scheduler/index.tsx","./theme.css":"./src/ui/theme.css","./navigation":"./src/global-navigation.ts","./tailwind.css":"./src/ui/tailwind.css"},"gitHead":"c18af1cffb279e75781392e2b1e4900f253cb641","scripts":{"test":"node --import jiti/register --test src/*.test.ts src/chat/*.test.ts src/ui/*.test.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"robinhuse","email":"hello@abrum.ai"},"repository":{"url":"git+https://github.com/abrum-ai/abrum-react.git","type":"git"},"_npmVersion":"10.9.8","description":"React framework and host integration hooks for ABRUM and xp0 applications.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"clsx":"^2.1.1","shiki":"^4.4.1","@abrum/wasm":"0.1.0","lucide-react":"^0.552.0","tailwind-merge":"^3.4.0","@abrum/web-runtime":"0.1.0","@oreo-design/avatar":"0.1.0","@radix-ui/react-slot":"^1.1.2","@radix-ui/react-switch":"^1.3.0","@radix-ui/react-popover":"^1.1.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^2.7.0","streamdown":"^2.5.0","typescript":"^5.9.3","@types/react":"^19.2.7","@types/react-dom":"^19.2.3","@assistant-ui/react":"^0.14.16"},"peerDependencies":{"react":"^19.2.3","react-dom":"^19.2.3","streamdown":"^2.5.0","@assistant-ui/react":"^0.14.16"},"peerDependenciesMeta":{"streamdown":{"optional":true},"@assistant-ui/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react_0.1.0_1786036361928_0.08730916889974316","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@abrum/react","version":"0.1.1","description":"React framework and host integration hooks for ABRUM and abrum applications.","keywords":["abrum","react","host-navigation"],"repository":{"type":"git","url":"git+https://github.com/abrum-ai/abrum-react.git"},"homepage":"https://github.com/abrum-ai/abrum-react#readme","bugs":{"url":"https://github.com/abrum-ai/abrum-react/issues"},"type":"module","main":"./src/index.tsx","types":"./src/index.tsx","exports":{".":"./src/index.tsx","./navigation":"./src/global-navigation.ts","./core":"./src/core.tsx","./heads-store":"./src/heads-store.ts","./ui":"./src/ui/index.tsx","./chat":"./src/chat/index.tsx","./scheduler":"./src/scheduler/index.tsx","./theme.css":"./src/ui/theme.css","./tailwind.css":"./src/ui/tailwind.css"},"publishConfig":{"access":"public"},"scripts":{"test":"node --import jiti/register --test src/*.test.ts src/chat/*.test.ts src/ui/*.test.ts","typecheck":"tsc --noEmit"},"dependencies":{"@base-ui/react":"^1.7.0","@oreo-design/avatar":"0.1.0","@radix-ui/react-popover":"^1.1.16","@radix-ui/react-slot":"^1.1.2","@radix-ui/react-switch":"^1.3.0","@abrum/wasm":"0.1.1","@abrum/runtime":"0.1.1","@abrum/web-runtime":"0.1.1","clsx":"^2.1.1","lucide-react":"^0.552.0","shiki":"^4.4.1","tailwind-merge":"^3.4.0"},"peerDependencies":{"@assistant-ui/react":"^0.14.16","react":"^19.2.3","react-dom":"^19.2.3","streamdown":"^2.5.0"},"peerDependenciesMeta":{"@assistant-ui/react":{"optional":true},"streamdown":{"optional":true}},"devDependencies":{"@assistant-ui/react":"^0.14.16","@types/react":"^19.2.7","@types/react-dom":"^19.2.3","jiti":"^2.7.0","streamdown":"^2.5.0","typescript":"^5.9.3"},"gitHead":"3cedb87e86a7f09c45d913a9ca358ce0552acbf9","_id":"@abrum/react@0.1.1","_nodeVersion":"24.19.0","_npmVersion":"11.19.1","dist":{"integrity":"sha512-s8PBcVjel1ner3AyIZnfbOiLX7MuIdX338PwI5lM49wuqmoXDbkBNTkIn7twqJPjnLWTIeXKtEhyU6uIbKkMwg==","shasum":"37b9b29a922eee98223ef33b55740007d6e23b97","tarball":"https://registry.npmjs.org/@abrum/react/-/react-0.1.1.tgz","fileCount":100,"unpackedSize":543174,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHcNNGmiirMrdb37gnImp25Wh4+ffDT/ChpFssasldRuAiBsV45btqvKbwb7F9OFxjEK8516De1M4F2+de3Pw5nKJw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:843e91f9-d436-40a5-99e7-12b85dfe2ab8"}},"directories":{},"maintainers":[{"name":"robinhuse","email":"hello@abrum.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react_0.1.1_1788439662947_0.4022162492591963"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-06T17:12:41.836Z","modified":"2026-09-03T12:47:43.296Z","0.1.0":"2026-08-06T17:12:42.092Z","0.1.1":"2026-09-03T12:47:43.091Z"},"bugs":{"url":"https://github.com/abrum-ai/abrum-react/issues"},"homepage":"https://github.com/abrum-ai/abrum-react#readme","keywords":["abrum","react","host-navigation"],"repository":{"type":"git","url":"git+https://github.com/abrum-ai/abrum-react.git"},"description":"React framework and host integration hooks for ABRUM and abrum applications.","maintainers":[{"name":"robinhuse","email":"hello@abrum.ai"}],"readme":"# @abrum/react\n\nReact framework and host-integration hooks for applications that run both on\nthe open web and inside ABRUM/abrum.\n\n## Installation\n\n```bash\nnpm install @abrum/react\n```\n\nThe package ships typed ESM source. Next.js applications should let Next\ntranspile the framework and its shared host contract:\n\n```ts\n// next.config.ts\nimport type { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n  transpilePackages: [\"@abrum/react\", \"@abrum/web-runtime\"],\n};\n\nexport default nextConfig;\n```\n\n## Native host navigation\n\nAn application declares destinations; the capable ABRUM host renders them in\nits own top bar and sends selected IDs back to the application. In an ordinary\nbrowser the hook returns `false`, so the application keeps its local navigation.\n\n```tsx\n\"use client\";\n\nimport { useAbrumGlobalNavigation } from \"@abrum/react/navigation\";\nimport { usePathname, useRouter } from \"next/navigation\";\n\nconst items = [\n  { id: \"home\", label: \"Home\", icon: \"home\" },\n  { id: \"map\", label: \"Map\", icon: \"map\" },\n  { id: \"chat\", label: \"Chat\", icon: \"chat\" },\n  { id: \"inbox\", label: \"Inbox\", icon: \"inbox\" },\n  { id: \"profile\", label: \"Profile\", icon: \"profile\" },\n];\n\nexport function Navigation() {\n  const pathname = usePathname();\n  const router = useRouter();\n  const hostOwnsNavigation = useAbrumGlobalNavigation({\n    items,\n    activeItemId: pathname === \"/app/map\" ? \"map\" : \"home\",\n    onSelect: (id) => router.push(id === \"map\" ? \"/app/map\" : \"/app\"),\n  });\n\n  return hostOwnsNavigation ? null : <LocalNavigation />;\n}\n```\n\nThe bridge is deliberately narrow: applications publish bounded labels, stable\nIDs and host-known icon tokens. They receive only a selected ID. No Electron,\nfilesystem or general IPC authority is exposed.\n\n## Framework exports\n\n- `@abrum/react` — runtime hooks, app shell, mounting and host integration\n- `@abrum/react/navigation` — lightweight native host-navigation hook\n- `@abrum/react/core` — core React runtime\n- `@abrum/react/ui` — optional shared UI components\n- `@abrum/react/chat` — chat UI and runtime helpers\n- `@abrum/react/scheduler` — scheduler UI\n- `@abrum/react/theme.css` and `@abrum/react/tailwind.css` — design tokens\n\nThe UI layer is optional. `mountAbrumApp`, the data hooks, host navigation and\nother framework APIs do not require an app to use the shared components. New\napps use `@abrum/react/ui` by default so generated apps and Electron begin from\nthe same accessible controls and tokens; replace those components or import\nonly `theme.css` when a product needs its own visual language.\n\n## Entity screens\n\nThe compact path for an ordinary CRUD screen is one collection hook. Queries\nare bounded and realtime by default; successful writes use the same Room and\nauthority metadata carried by each generated record.\n\n```tsx\nimport {\n  useAbrumCanWrite,\n  useAbrumCollection,\n  useAbrumSelectedRecord,\n} from \"@abrum/react\";\nimport { notesApp, type NoteRecord } from \"../generated/twins\";\n\nconst notes = useAbrumCollection(notesApp, \"note\", {\n  order: [\"createdAtMs\", \"desc\"],\n});\nconst canWrite = useAbrumCanWrite();\nconst selected: NoteRecord | null = notes.data[0] ?? null;\nuseAbrumSelectedRecord(selected, { title: selected?.text });\n```\n\n`notes.create`, `notes.update`, and `notes.remove` share `isMutating` and\n`mutationError`; `error` combines query and mutation failures. Complex screens\ncan compose `useAbrumEntityList`, `useAbrumMutations`, or `useAbrumDb` directly.\n\nThe installable **ABRUM UI** gallery (`apps/ui-gallery-web`) is the interactive\nreference. Its coverage test fails whenever a new public UI component has not\nyet been added to the gallery.\n\nSource and issues: <https://github.com/abrum-ai/abrum-react>\n","readmeFilename":"README.md"}