@xemahq/ui-kernel 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,6 +53,36 @@ pnpm add @xemahq/ui-kernel
|
|
|
53
53
|
|
|
54
54
|
## Usage
|
|
55
55
|
|
|
56
|
+
Author a web biome with `defineWebBiome` — a declarative page list where each
|
|
57
|
+
`slug` single-sources both the nav route and the route path, and each page
|
|
58
|
+
declares its menu `category` (the host owns where that category renders):
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import { defineWebBiome } from '@xemahq/ui-kernel';
|
|
62
|
+
import { Layers } from 'lucide-react';
|
|
63
|
+
|
|
64
|
+
export default defineWebBiome({
|
|
65
|
+
id: 'spaces-web',
|
|
66
|
+
displayName: 'Spaces',
|
|
67
|
+
pages: [
|
|
68
|
+
{
|
|
69
|
+
slug: 'system/spaces',
|
|
70
|
+
label: 'Spaces',
|
|
71
|
+
icon: Layers,
|
|
72
|
+
category: 'knowledge', // primary | build | operate | knowledge | admin | account
|
|
73
|
+
load: () => import('./pages/SpacesPage'),
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The helper emits the nav item + route (wrapping the lazily-loaded page in a
|
|
80
|
+
`<Suspense>` boundary) and passes through `init`/`panels`/`session` for bespoke
|
|
81
|
+
biomes. Pass a per-page `id` to keep a short nav id distinct from the route
|
|
82
|
+
slug, or `navHidden: true` to register a route with no nav item.
|
|
83
|
+
|
|
84
|
+
Lower-level building blocks are also exported:
|
|
85
|
+
|
|
56
86
|
```ts
|
|
57
87
|
import { buildSystemBus, biomeRegistry } from '@xemahq/ui-kernel';
|
|
58
88
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/ui-kernel",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Host-framework-agnostic UI kernel for the Xema OS. Defines the SystemBus orchestration contract (capability.invoke, cross-biome intents, command palette, xema:// deeplinks, window manager) AND the biome-host contract surface (FrontendBiome/FrontendBiomeFactory, HostBridge, the singleton biomeRegistry, session contributions) that every frontend biome composes against. No Vite, Next.js, or React-Router — React itself IS allowed as the shared component model (the contracts traffic in ReactNode/ComponentType and a React context). Concrete host adapters (router/auth/toast wiring) live in separate packages that consume this kernel. The SystemBus is pure orchestration: it never authorizes, the backend capability-router enforces all policy.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xema",
|