@xemahq/ui-kernel 0.5.0 → 0.6.0
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/dist/lib/biome-host/define-web-biome.d.ts +0 -1
- package/dist/lib/biome-host/define-web-biome.d.ts.map +1 -1
- package/dist/lib/biome-host/define-web-biome.js +0 -1
- package/dist/lib/biome-host/define-web-biome.js.map +1 -1
- package/dist/lib/biome-host/frontend-biome.d.ts +0 -2
- package/dist/lib/biome-host/frontend-biome.d.ts.map +1 -1
- package/dist/lib/biome-host/index.d.ts +0 -1
- package/dist/lib/biome-host/index.d.ts.map +1 -1
- package/dist/lib/biome-host/index.js +0 -1
- package/dist/lib/biome-host/index.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/biome-host/define-web-biome.ts +5 -11
- package/src/lib/biome-host/frontend-biome.ts +2 -14
- package/src/lib/biome-host/index.ts +0 -1
- package/dist/lib/biome-host/composition-validation.d.ts +0 -22
- package/dist/lib/biome-host/composition-validation.d.ts.map +0 -1
- package/dist/lib/biome-host/composition-validation.js +0 -127
- package/dist/lib/biome-host/composition-validation.js.map +0 -1
- package/dist/lib/biome-host/nav.d.ts +0 -17
- package/dist/lib/biome-host/nav.d.ts.map +0 -1
- package/dist/lib/biome-host/nav.js +0 -52
- package/dist/lib/biome-host/nav.js.map +0 -1
- package/dist/registry/lib/composition-validation-host.d.ts +0 -3
- package/dist/registry/lib/composition-validation-host.d.ts.map +0 -1
- package/dist/registry/lib/composition-validation-host.js +0 -10
- package/dist/registry/lib/composition-validation-host.js.map +0 -1
- package/src/lib/biome-host/nav.ts +0 -83
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-web-biome.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/define-web-biome.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EAEpB,WAAW,EAEZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,E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AAG,SAAS,CAAC;IAEnC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAE9B,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAKlE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IAEpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtC,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAE5C,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAExC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAE1C,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAE5C,QAAQ,CAAC,eAAe,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC7D;AAMD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,qBAAqB,GAC7B,oBAAoB,CAsCtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-web-biome.js","sourceRoot":"","sources":["../../../src/lib/biome-host/define-web-biome.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"define-web-biome.js","sourceRoot":"","sources":["../../../src/lib/biome-host/define-web-biome.ts"],"names":[],"mappings":";;AAkHA,wCAwCC;AAlHD,qDAA6C;AA0E7C,SAAgB,cAAc,CAC5B,OAA8B;IAE9B,OAAO,GAAG,EAAE;QACV,MAAM,QAAQ,GAA0B,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAwB,EAAE,CAAC;QAEvC,KAAK,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,CAAC,CAAC,EAAE,CAAC;YACxD,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACrD,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,GAAG,CAAC,OAAO,CAAC,eAAe;gBACzB,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE;gBAC9C,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -9,8 +9,6 @@ export interface NavItemContribution {
|
|
|
9
9
|
className?: string | undefined;
|
|
10
10
|
}>;
|
|
11
11
|
readonly category?: string;
|
|
12
|
-
readonly section?: string;
|
|
13
|
-
readonly weight?: number;
|
|
14
12
|
}
|
|
15
13
|
export type RouteAccess = 'member' | 'org-admin' | 'platform-admin';
|
|
16
14
|
export interface RouteContribution {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend-biome.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/frontend-biome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAYpE,MAAM,WAAW,mBAAmB;IAElC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAQvB,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,GA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C;IAE5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAE5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAQ7B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAOhE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAO/C,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAexC,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;CAClE;AAYD,MAAM,WAAW,0BAA0B;IAOzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAQ5B,QAAQ,CAAC,MAAM,EAAE,MAAM,aAAa,CAAC;QAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACpE;AAaD,MAAM,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,aAAa,CAAC"}
|
|
@@ -10,7 +10,6 @@ export * from './biome-registry';
|
|
|
10
10
|
export * from './session-contributions';
|
|
11
11
|
export * from './session-profiles';
|
|
12
12
|
export * from './host-sources';
|
|
13
|
-
export * from './nav';
|
|
14
13
|
export * from './biome-mode';
|
|
15
14
|
export * from './agent-validation';
|
|
16
15
|
export * from './realtime-port';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/index.ts"],"names":[],"mappings":"AAcA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/index.ts"],"names":[],"mappings":"AAcA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC"}
|
|
@@ -26,7 +26,6 @@ __exportStar(require("./biome-registry"), exports);
|
|
|
26
26
|
__exportStar(require("./session-contributions"), exports);
|
|
27
27
|
__exportStar(require("./session-profiles"), exports);
|
|
28
28
|
__exportStar(require("./host-sources"), exports);
|
|
29
|
-
__exportStar(require("./nav"), exports);
|
|
30
29
|
__exportStar(require("./biome-mode"), exports);
|
|
31
30
|
__exportStar(require("./agent-validation"), exports);
|
|
32
31
|
__exportStar(require("./realtime-port"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/biome-host/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAcA,mDAAiC;AACjC,gDAA8B;AAC9B,qDAAmC;AACnC,gDAA8B;AAC9B,uDAAqC;AACrC,mDAAiC;AACjC,qDAAmC;AACnC,8DAA4C;AAC5C,mDAAiC;AACjC,0DAAwC;AACxC,qDAAmC;AACnC,iDAA+B;AAC/B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/biome-host/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAcA,mDAAiC;AACjC,gDAA8B;AAC9B,qDAAmC;AACnC,gDAA8B;AAC9B,uDAAqC;AACrC,mDAAiC;AACjC,qDAAmC;AACnC,8DAA4C;AAC5C,mDAAiC;AACjC,0DAAwC;AACxC,qDAAmC;AACnC,iDAA+B;AAC/B,+CAA6B;AAC7B,qDAAmC;AACnC,kDAAgC;AAChC,mDAAiC;AACjC,2CAAyB;AACzB,sDAAoC;AACpC,kEAAgD;AAChD,mDAAiC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/ui-kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* `<Suspense fallback={null}>` boundary via {@link lazyRoute}.
|
|
15
15
|
*
|
|
16
16
|
* Authors declare WHAT each surface is (`category`) and let the HOST own WHERE
|
|
17
|
-
* it renders in the global menu
|
|
18
|
-
* `
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* it renders in the global menu. `init`/`dispose`/`panels`/`session`/
|
|
18
|
+
* `outputRenderers` pass through to the `FrontendBiome` untouched, so bespoke
|
|
19
|
+
* biomes (one-shot registrations, slot fillers, session contributions) still
|
|
20
|
+
* use this helper.
|
|
21
21
|
*
|
|
22
22
|
* Host-framework-agnostic: pure React (`lazy`/`Suspense`/`createElement` via
|
|
23
23
|
* `lazyRoute`), no router and no Next.js.
|
|
@@ -70,7 +70,7 @@ export interface WebBiomePage {
|
|
|
70
70
|
/**
|
|
71
71
|
* Host menu category — the biome's INTENT (`primary` | `build` | `operate` |
|
|
72
72
|
* `knowledge` | `admin` | `account`). The host maps it to a concrete rail
|
|
73
|
-
* group + order.
|
|
73
|
+
* group + order.
|
|
74
74
|
*/
|
|
75
75
|
readonly category?: string;
|
|
76
76
|
/**
|
|
@@ -82,11 +82,6 @@ export interface WebBiomePage {
|
|
|
82
82
|
readonly access?: RouteAccess;
|
|
83
83
|
/** Dynamic import of the page module (`() => import('./pages/X')`). */
|
|
84
84
|
readonly load: () => Promise<{ default: ComponentType<unknown> }>;
|
|
85
|
-
/**
|
|
86
|
-
* Optional legacy intra-category sort weight. Prefer host-owned `category`
|
|
87
|
-
* ordering; retained only as a tiebreak for un-migrated taxonomies.
|
|
88
|
-
*/
|
|
89
|
-
readonly weight?: number;
|
|
90
85
|
/**
|
|
91
86
|
* When true the route is registered but NO nav item is emitted — for hidden
|
|
92
87
|
* surfaces such as a `:param` detail route reached only by deeplink.
|
|
@@ -139,7 +134,6 @@ export function defineWebBiome(
|
|
|
139
134
|
route: page.slug,
|
|
140
135
|
...(page.icon ? { icon: page.icon } : {}),
|
|
141
136
|
...(page.category !== undefined ? { category: page.category } : {}),
|
|
142
|
-
...(page.weight !== undefined ? { weight: page.weight } : {}),
|
|
143
137
|
});
|
|
144
138
|
}
|
|
145
139
|
}
|
|
@@ -33,22 +33,10 @@ export interface NavItemContribution {
|
|
|
33
33
|
* information-architecture: it maps a category to a concrete rail group,
|
|
34
34
|
* heading, and order. Authors declare WHAT a surface is, not WHERE in the
|
|
35
35
|
* global menu it renders — so the platform can re-organise the menu without
|
|
36
|
-
* editing every biome.
|
|
37
|
-
*
|
|
38
|
-
* last, to the legacy `section`.
|
|
36
|
+
* editing every biome. When omitted, the host falls back to its own
|
|
37
|
+
* taxonomy (keyed on the nav-item id).
|
|
39
38
|
*/
|
|
40
39
|
readonly category?: string;
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated Legacy direct section-heading placement. The host now owns
|
|
43
|
-
* grouping via `category` + its taxonomy; retained only until every biome
|
|
44
|
-
* declares a `category`. Do NOT use in new biomes.
|
|
45
|
-
*/
|
|
46
|
-
readonly section?: string;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated Legacy intra-section sort weight. Ordering is host-owned per
|
|
49
|
-
* category now. Retained only for un-migrated biomes.
|
|
50
|
-
*/
|
|
51
|
-
readonly weight?: number;
|
|
52
40
|
}
|
|
53
41
|
|
|
54
42
|
/**
|
|
@@ -24,7 +24,6 @@ export * from './biome-registry';
|
|
|
24
24
|
export * from './session-contributions';
|
|
25
25
|
export * from './session-profiles';
|
|
26
26
|
export * from './host-sources';
|
|
27
|
-
export * from './nav';
|
|
28
27
|
export * from './biome-mode';
|
|
29
28
|
export * from './agent-validation';
|
|
30
29
|
export * from './realtime-port';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { FrontendBiome } from './frontend-biome';
|
|
2
|
-
export declare enum CompositionDiagnosticSeverity {
|
|
3
|
-
Error = "error",
|
|
4
|
-
Warning = "warning"
|
|
5
|
-
}
|
|
6
|
-
export declare enum CompositionDiagnosticCode {
|
|
7
|
-
DuplicateRoutePath = "duplicate_route_path",
|
|
8
|
-
DuplicateNavId = "duplicate_nav_id",
|
|
9
|
-
UnknownSlot = "unknown_slot",
|
|
10
|
-
OrphanedPanelSlot = "orphaned_panel_slot"
|
|
11
|
-
}
|
|
12
|
-
export interface CompositionDiagnostic {
|
|
13
|
-
readonly code: CompositionDiagnosticCode;
|
|
14
|
-
readonly severity: CompositionDiagnosticSeverity;
|
|
15
|
-
readonly biomeIds: readonly string[];
|
|
16
|
-
readonly message: string;
|
|
17
|
-
}
|
|
18
|
-
export interface ValidateBiomeCompositionOptions {
|
|
19
|
-
readonly knownSlots: ReadonlySet<string>;
|
|
20
|
-
}
|
|
21
|
-
export declare function validateBiomeComposition(biomes: readonly FrontendBiome[], options: ValidateBiomeCompositionOptions): readonly CompositionDiagnostic[];
|
|
22
|
-
//# sourceMappingURL=composition-validation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composition-validation.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/composition-validation.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,oBAAY,6BAA6B;IAMvC,KAAK,UAAU;IAOf,OAAO,YAAY;CACpB;AAGD,oBAAY,yBAAyB;IAEnC,kBAAkB,yBAAyB;IAE3C,cAAc,qBAAqB;IAKnC,WAAW,iBAAiB;IAK5B,iBAAiB,wBAAwB;CAC1C;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;IAEjD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAErC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,+BAA+B;IAM9C,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC1C;AAwBD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,OAAO,EAAE,+BAA+B,GACvC,SAAS,qBAAqB,EAAE,CA6FlC"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CompositionDiagnosticCode = exports.CompositionDiagnosticSeverity = void 0;
|
|
4
|
-
exports.validateBiomeComposition = validateBiomeComposition;
|
|
5
|
-
var CompositionDiagnosticSeverity;
|
|
6
|
-
(function (CompositionDiagnosticSeverity) {
|
|
7
|
-
CompositionDiagnosticSeverity["Error"] = "error";
|
|
8
|
-
CompositionDiagnosticSeverity["Warning"] = "warning";
|
|
9
|
-
})(CompositionDiagnosticSeverity || (exports.CompositionDiagnosticSeverity = CompositionDiagnosticSeverity = {}));
|
|
10
|
-
var CompositionDiagnosticCode;
|
|
11
|
-
(function (CompositionDiagnosticCode) {
|
|
12
|
-
CompositionDiagnosticCode["DuplicateRoutePath"] = "duplicate_route_path";
|
|
13
|
-
CompositionDiagnosticCode["DuplicateNavId"] = "duplicate_nav_id";
|
|
14
|
-
CompositionDiagnosticCode["UnknownSlot"] = "unknown_slot";
|
|
15
|
-
CompositionDiagnosticCode["OrphanedPanelSlot"] = "orphaned_panel_slot";
|
|
16
|
-
})(CompositionDiagnosticCode || (exports.CompositionDiagnosticCode = CompositionDiagnosticCode = {}));
|
|
17
|
-
function biomeOwnedSlotOwner(slot) {
|
|
18
|
-
const slashIndex = slot.indexOf('/');
|
|
19
|
-
if (slashIndex <= 0)
|
|
20
|
-
return null;
|
|
21
|
-
if (slot.indexOf('/', slashIndex + 1) !== -1)
|
|
22
|
-
return null;
|
|
23
|
-
const owner = slot.slice(0, slashIndex);
|
|
24
|
-
const name = slot.slice(slashIndex + 1);
|
|
25
|
-
if (owner.length === 0 || name.length === 0)
|
|
26
|
-
return null;
|
|
27
|
-
return owner;
|
|
28
|
-
}
|
|
29
|
-
function validateBiomeComposition(biomes, options) {
|
|
30
|
-
const diagnostics = [];
|
|
31
|
-
const biomeIds = new Set(biomes.map((b) => b.id));
|
|
32
|
-
const routeOwners = new Map();
|
|
33
|
-
for (const biome of biomes) {
|
|
34
|
-
for (const route of biome.routes ?? []) {
|
|
35
|
-
const scope = route.projectScoped ? 'project' : 'root';
|
|
36
|
-
const key = `${scope}:${route.path}`;
|
|
37
|
-
const owners = routeOwners.get(key);
|
|
38
|
-
if (owners)
|
|
39
|
-
owners.push(biome.id);
|
|
40
|
-
else
|
|
41
|
-
routeOwners.set(key, [biome.id]);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
for (const [key, owners] of routeOwners) {
|
|
45
|
-
if (owners.length < 2)
|
|
46
|
-
continue;
|
|
47
|
-
const [scope, path] = splitFirst(key, ':');
|
|
48
|
-
diagnostics.push({
|
|
49
|
-
code: CompositionDiagnosticCode.DuplicateRoutePath,
|
|
50
|
-
severity: CompositionDiagnosticSeverity.Error,
|
|
51
|
-
biomeIds: owners,
|
|
52
|
-
message: `Route path '${path}' (${scope}-scoped) is contributed by multiple biomes: ` +
|
|
53
|
-
`${owners.join(', ')}. Each route must be unique within its scope — ` +
|
|
54
|
-
`only one would mount and the others would be unreachable.`,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
const navOwners = new Map();
|
|
58
|
-
for (const biome of biomes) {
|
|
59
|
-
for (const navItem of biome.navItems ?? []) {
|
|
60
|
-
const owners = navOwners.get(navItem.id);
|
|
61
|
-
if (owners)
|
|
62
|
-
owners.push(biome.id);
|
|
63
|
-
else
|
|
64
|
-
navOwners.set(navItem.id, [biome.id]);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
for (const [navId, owners] of navOwners) {
|
|
68
|
-
if (owners.length < 2)
|
|
69
|
-
continue;
|
|
70
|
-
diagnostics.push({
|
|
71
|
-
code: CompositionDiagnosticCode.DuplicateNavId,
|
|
72
|
-
severity: CompositionDiagnosticSeverity.Error,
|
|
73
|
-
biomeIds: owners,
|
|
74
|
-
message: `Nav id '${navId}' is contributed by multiple biomes: ${owners.join(', ')}. ` +
|
|
75
|
-
`Nav ids must be unique — a duplicate silently overwrites the ` +
|
|
76
|
-
`feature-route mapping and collides as a render key.`,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
for (const biome of biomes) {
|
|
80
|
-
for (const panel of biome.panels ?? []) {
|
|
81
|
-
if (options.knownSlots.has(panel.slot))
|
|
82
|
-
continue;
|
|
83
|
-
const owner = biomeOwnedSlotOwner(panel.slot);
|
|
84
|
-
if (owner === null) {
|
|
85
|
-
diagnostics.push({
|
|
86
|
-
code: CompositionDiagnosticCode.UnknownSlot,
|
|
87
|
-
severity: CompositionDiagnosticSeverity.Warning,
|
|
88
|
-
biomeIds: [biome.id],
|
|
89
|
-
message: `Biome '${biome.id}' panel '${panel.id}' targets slot '${panel.slot}', ` +
|
|
90
|
-
`which is neither a known host slot nor a well-formed ` +
|
|
91
|
-
`'<owner>/<name>' biome-owned slot. It will never render — ` +
|
|
92
|
-
`check for a typo against the host slot catalog.`,
|
|
93
|
-
});
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if (!biomeIds.has(owner)) {
|
|
97
|
-
diagnostics.push({
|
|
98
|
-
code: CompositionDiagnosticCode.OrphanedPanelSlot,
|
|
99
|
-
severity: CompositionDiagnosticSeverity.Warning,
|
|
100
|
-
biomeIds: [biome.id],
|
|
101
|
-
message: `Biome '${biome.id}' panel '${panel.id}' targets biome-owned slot ` +
|
|
102
|
-
`'${panel.slot}', but its owner biome '${owner}' is not registered. ` +
|
|
103
|
-
`The panel will never render until '${owner}' is enabled.`,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return sortDiagnostics(diagnostics);
|
|
109
|
-
}
|
|
110
|
-
function splitFirst(value, sep) {
|
|
111
|
-
const idx = value.indexOf(sep);
|
|
112
|
-
if (idx === -1)
|
|
113
|
-
return [value, ''];
|
|
114
|
-
return [value.slice(0, idx), value.slice(idx + sep.length)];
|
|
115
|
-
}
|
|
116
|
-
function sortDiagnostics(diagnostics) {
|
|
117
|
-
return diagnostics.slice().sort((a, b) => {
|
|
118
|
-
if (a.code !== b.code)
|
|
119
|
-
return a.code.localeCompare(b.code);
|
|
120
|
-
const ai = a.biomeIds.join(',');
|
|
121
|
-
const bi = b.biomeIds.join(',');
|
|
122
|
-
if (ai !== bi)
|
|
123
|
-
return ai.localeCompare(bi);
|
|
124
|
-
return a.message.localeCompare(b.message);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=composition-validation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composition-validation.js","sourceRoot":"","sources":["../../../src/lib/biome-host/composition-validation.ts"],"names":[],"mappings":";;;AAkGA,4DAgGC;AA1KD,IAAY,6BAcX;AAdD,WAAY,6BAA6B;IAMvC,gDAAe,CAAA;IAOf,oDAAmB,CAAA;AACrB,CAAC,EAdW,6BAA6B,6CAA7B,6BAA6B,QAcxC;AAGD,IAAY,yBAeX;AAfD,WAAY,yBAAyB;IAEnC,wEAA2C,CAAA;IAE3C,gEAAmC,CAAA;IAKnC,yDAA4B,CAAA;IAK5B,sEAAyC,CAAA;AAC3C,CAAC,EAfW,yBAAyB,yCAAzB,yBAAyB,QAepC;AA0BD,SAAS,mBAAmB,CAAC,IAAY;IACvC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,UAAU,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,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AAK,CAAC,CAAC;QAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9D,CAAC;AAGD,SAAS,eAAe,CACtB,WAAoC;IAEpC,OAAO,WAAW,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACvC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAC3D,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QAC3C,OAAO,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ComponentType } from 'react';
|
|
2
|
-
export interface NavItem {
|
|
3
|
-
readonly key: string;
|
|
4
|
-
readonly label: string;
|
|
5
|
-
readonly icon?: ComponentType<{
|
|
6
|
-
className?: string | undefined;
|
|
7
|
-
}> | undefined;
|
|
8
|
-
readonly weight?: number | undefined;
|
|
9
|
-
readonly fromBiome?: boolean | undefined;
|
|
10
|
-
}
|
|
11
|
-
export interface NavSection {
|
|
12
|
-
readonly heading?: string | undefined;
|
|
13
|
-
readonly items: readonly NavItem[];
|
|
14
|
-
}
|
|
15
|
-
export declare function mergeNavSections(coreSections: readonly NavSection[]): readonly NavSection[];
|
|
16
|
-
export declare function mergeFeatureRouteMap(coreFeatureRoutes: Readonly<Record<string, string>>): Record<string, string>;
|
|
17
|
-
//# sourceMappingURL=nav.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/nav.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC1C;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;CACpC;AAUD,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,UAAU,EAAE,CAsC3F;AAQD,wBAAgB,oBAAoB,CAClC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAClD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQxB"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mergeNavSections = mergeNavSections;
|
|
4
|
-
exports.mergeFeatureRouteMap = mergeFeatureRouteMap;
|
|
5
|
-
const biome_registry_1 = require("./biome-registry");
|
|
6
|
-
function mergeNavSections(coreSections) {
|
|
7
|
-
const sectionMap = new Map();
|
|
8
|
-
const sectionOrder = [];
|
|
9
|
-
for (const section of coreSections) {
|
|
10
|
-
const heading = section.heading ?? '';
|
|
11
|
-
sectionOrder.push(heading);
|
|
12
|
-
sectionMap.set(heading, [...section.items]);
|
|
13
|
-
}
|
|
14
|
-
for (const biome of biome_registry_1.biomeRegistry.list()) {
|
|
15
|
-
for (const navItem of biome.navItems ?? []) {
|
|
16
|
-
const heading = navItem.section ?? '';
|
|
17
|
-
let bucket = sectionMap.get(heading);
|
|
18
|
-
if (!bucket) {
|
|
19
|
-
bucket = [];
|
|
20
|
-
sectionOrder.push(heading);
|
|
21
|
-
sectionMap.set(heading, bucket);
|
|
22
|
-
}
|
|
23
|
-
bucket.push({
|
|
24
|
-
key: navItem.id,
|
|
25
|
-
label: navItem.label,
|
|
26
|
-
icon: navItem.icon,
|
|
27
|
-
weight: navItem.weight,
|
|
28
|
-
fromBiome: true,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return sectionOrder.map((heading) => ({
|
|
33
|
-
heading: heading === '' ? undefined : heading,
|
|
34
|
-
items: (sectionMap.get(heading) ?? []).slice().sort((a, b) => {
|
|
35
|
-
const wa = a.weight ?? 100;
|
|
36
|
-
const wb = b.weight ?? 100;
|
|
37
|
-
if (wa !== wb)
|
|
38
|
-
return wa - wb;
|
|
39
|
-
return a.key.localeCompare(b.key);
|
|
40
|
-
}),
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
function mergeFeatureRouteMap(coreFeatureRoutes) {
|
|
44
|
-
const out = { ...coreFeatureRoutes };
|
|
45
|
-
for (const biome of biome_registry_1.biomeRegistry.list()) {
|
|
46
|
-
for (const navItem of biome.navItems ?? []) {
|
|
47
|
-
out[navItem.id] = navItem.route;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
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,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACpC,OAAO,EAAE,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;QAC7C,KAAK,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAC3D,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC;YAC3B,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC;YAC3B,IAAI,EAAE,KAAK,EAAE;gBAAE,OAAO,EAAE,GAAG,EAAE,CAAC;YAC9B,OAAO,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACpC,CAAC,CAAC;KACH,CAAC,CAAC,CAAC;AACN,CAAC;AAQD,SAAgB,oBAAoB,CAClC,iBAAmD;IAEnD,MAAM,GAAG,GAA2B,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAC7D,KAAK,MAAM,KAAK,IAAI,8BAAa,CAAC,IAAI,EAAE,EAAE,CAAC;QACzC,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;YAC3C,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QAClC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composition-validation-host.d.ts","sourceRoot":"","sources":["../../../src/registry/lib/composition-validation-host.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAEnB,MAAM,aAAa,CAAC;AAkBrB,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,SAAS,qBAAqB,EAAE,CAElC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateHostBiomeComposition = validateHostBiomeComposition;
|
|
4
|
-
const index_1 = require("../../index");
|
|
5
|
-
const extension_points_1 = require("./extension-points");
|
|
6
|
-
const HOST_SLOT_IDS = new Set(Object.values(extension_points_1.HostExtensionSlots));
|
|
7
|
-
function validateHostBiomeComposition(biomes) {
|
|
8
|
-
return (0, index_1.validateBiomeComposition)(biomes, { knownSlots: HOST_SLOT_IDS });
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=composition-validation-host.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composition-validation-host.js","sourceRoot":"","sources":["../../../src/registry/lib/composition-validation-host.ts"],"names":[],"mappings":";;AAgCA,oEAIC;AA1BD,uCAIqB;AAErB,yDAAwD;AAOxD,MAAM,aAAa,GAAwB,IAAI,GAAG,CAChD,MAAM,CAAC,MAAM,CAAC,qCAAkB,CAAC,CAClC,CAAC;AAOF,SAAgB,4BAA4B,CAC1C,MAAgC;IAEhC,OAAO,IAAA,gCAAwB,EAAC,MAAM,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { ComponentType } from 'react';
|
|
2
|
-
|
|
3
|
-
import { biomeRegistry } from './biome-registry';
|
|
4
|
-
|
|
5
|
-
export interface NavItem {
|
|
6
|
-
readonly key: string;
|
|
7
|
-
readonly label: string;
|
|
8
|
-
readonly icon?: ComponentType<{ className?: string | undefined }> | undefined;
|
|
9
|
-
readonly weight?: number | undefined;
|
|
10
|
-
/** True when this item came from a biome contribution. */
|
|
11
|
-
readonly fromBiome?: boolean | undefined;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface NavSection {
|
|
15
|
-
readonly heading?: string | undefined;
|
|
16
|
-
readonly items: readonly NavItem[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Merge the host's core nav sections with biome nav contributions. Biome
|
|
21
|
-
* items are bucketed into the section whose `heading` matches their
|
|
22
|
-
* `section` field; if no match exists, a synthetic section is appended.
|
|
23
|
-
*
|
|
24
|
-
* Sort is deterministic: by `(weight, key)` — every host renders the same
|
|
25
|
-
* order from the same registry state, so tests stay reproducible.
|
|
26
|
-
*/
|
|
27
|
-
export function mergeNavSections(coreSections: readonly NavSection[]): readonly NavSection[] {
|
|
28
|
-
const sectionMap = new Map<string, NavItem[]>();
|
|
29
|
-
const sectionOrder: string[] = [];
|
|
30
|
-
|
|
31
|
-
for (const section of coreSections) {
|
|
32
|
-
const heading = section.heading ?? '';
|
|
33
|
-
sectionOrder.push(heading);
|
|
34
|
-
sectionMap.set(heading, [...section.items]);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
for (const biome of biomeRegistry.list()) {
|
|
38
|
-
for (const navItem of biome.navItems ?? []) {
|
|
39
|
-
const heading = navItem.section ?? '';
|
|
40
|
-
let bucket = sectionMap.get(heading);
|
|
41
|
-
if (!bucket) {
|
|
42
|
-
bucket = [];
|
|
43
|
-
sectionOrder.push(heading);
|
|
44
|
-
sectionMap.set(heading, bucket);
|
|
45
|
-
}
|
|
46
|
-
bucket.push({
|
|
47
|
-
key: navItem.id,
|
|
48
|
-
label: navItem.label,
|
|
49
|
-
icon: navItem.icon,
|
|
50
|
-
weight: navItem.weight,
|
|
51
|
-
fromBiome: true,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return sectionOrder.map((heading) => ({
|
|
57
|
-
heading: heading === '' ? undefined : heading,
|
|
58
|
-
items: (sectionMap.get(heading) ?? []).slice().sort((a, b) => {
|
|
59
|
-
const wa = a.weight ?? 100;
|
|
60
|
-
const wb = b.weight ?? 100;
|
|
61
|
-
if (wa !== wb) return wa - wb;
|
|
62
|
-
return a.key.localeCompare(b.key);
|
|
63
|
-
}),
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Build a `{ navKey: routePath }` map merging core feature-key→route entries
|
|
69
|
-
* with biome nav-item route paths. Biome-contributed entries win over
|
|
70
|
-
* core entries with the same key (intentional — biome authors who pick a
|
|
71
|
-
* conflicting id are signalling override intent).
|
|
72
|
-
*/
|
|
73
|
-
export function mergeFeatureRouteMap(
|
|
74
|
-
coreFeatureRoutes: Readonly<Record<string, string>>,
|
|
75
|
-
): Record<string, string> {
|
|
76
|
-
const out: Record<string, string> = { ...coreFeatureRoutes };
|
|
77
|
-
for (const biome of biomeRegistry.list()) {
|
|
78
|
-
for (const navItem of biome.navItems ?? []) {
|
|
79
|
-
out[navItem.id] = navItem.route;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return out;
|
|
83
|
-
}
|