@daihum/ui-core
v0.1.8
Published
Platform-independent DAIHUM UI contracts, state models, and pure helpers.
Maintainers
Readme
@daihum/ui-core
Platform-independent DAIHUM UI contracts, state models, and pure helpers.
This package is the non-DOM substrate below the web implementation in @daihum/ui. It must not depend on React,
React DOM, Radix, shadcn runtime components, Tailwind CSS, browser APIs, or product runtime policy.
Internal substrate — not a consumer-facing API. External product consumers (Carrel, Ontal, and their
@carrel/ui-web/@ontal/uifacades) must not import@daihum/ui-coredirectly. Every capability they need is re-exported through a@daihum/ui/*subpath (e.g.@daihum/ui/dock-layout,@daihum/ui/data-table-vnext/contracts). Only@daihum/uiitself and other daihum-internal non-React packages (workers, AI catalog/projection code) depend on@daihum/ui-core. This keeps a single consumer surface —@daihum/ui— while the React-free logic lives here as an implementation detail.
The contract/logic modules currently living here (all re-exported through @daihum/ui/*):
| core module | consumer-facing re-export |
|---|---|
| model-picker (+ /contracts /builders /formatters) | @daihum/ui/model-picker (+ subpaths) |
| data-table-vnext (+ /contracts /backend) | @daihum/ui/data-table-vnext (+ subpaths) |
| action-menu | @daihum/ui/action-menu |
| desktop-canvas | @daihum/ui/desktop-canvas |
| dock-layout | @daihum/ui/dock-layout |
| panel-region | @daihum/ui/panel-region |
| settings-registry | @daihum/ui/settings-registry |
| surface-registry | @daihum/ui/surface-registry |
| work-area | @daihum/ui/work-area |
| workspace-file | @daihum/ui/workspace-file |
Each @daihum/ui/<name> subpath is a thin re-export of the matching core module, so consumers get the React-free
contracts/state/helpers without ever naming @daihum/ui-core. The web composed surfaces (@daihum/ui/data-table-vnext
React table, @daihum/ui/shell, the forthcoming workbench/panel surfaces) build on these same contracts; browser
worker setup and React rendering stay in the web package.
Keep this package free of rendered controls, provider catalog authority, gateway policy, settings persistence, and
product copy — those belong in @daihum/ui, the DAIHUM AI packages, or downstream products. This package holds only
the platform-independent contracts, state models, and pure helpers that the web layer and internal non-DOM code share.
Proofs
Run these from the DAIHUM repo root after changing core contracts or helpers:
pnpm --filter @daihum/ui-core typecheckpnpm --filter @daihum/ui-core buildpnpm --filter @daihum/ui-core testnpm run proof:ui-boundariesnpm run proof:ui-downstream-imports
proof:ui-boundaries includes a temporary no-DOM consumer for the model-picker core helpers. The downstream proof
compiles temporary Carrel and Ontal consumers that import every capability through @daihum/ui/* (model-picker,
data-table-vnext, and the headless dock-layout / panel-region / work-area / desktop-canvas /
settings-registry / surface-registry / workspace-file / action-menu re-exports), and it git greps the real
consumer repos to assert zero direct @daihum/ui-core imports (the no-core-leak boundary guard).
