@xemahq/ui-kernel 0.1.11 → 0.1.12

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.
Files changed (45) hide show
  1. package/dist/lib/biome-host/biome-builders.d.ts +21 -0
  2. package/dist/lib/biome-host/biome-builders.d.ts.map +1 -0
  3. package/dist/lib/biome-host/biome-builders.js +25 -0
  4. package/dist/lib/biome-host/biome-builders.js.map +1 -0
  5. package/dist/lib/biome-host/biome-navigation.d.ts +3 -0
  6. package/dist/lib/biome-host/biome-navigation.d.ts.map +1 -0
  7. package/dist/lib/biome-host/biome-navigation.js +14 -0
  8. package/dist/lib/biome-host/biome-navigation.js.map +1 -0
  9. package/dist/lib/biome-host/biome-scope.d.ts +18 -0
  10. package/dist/lib/biome-host/biome-scope.d.ts.map +1 -0
  11. package/dist/lib/biome-host/biome-scope.js +42 -0
  12. package/dist/lib/biome-host/biome-scope.js.map +1 -0
  13. package/dist/lib/biome-host/biome-scoped-query.d.ts +17 -0
  14. package/dist/lib/biome-host/biome-scoped-query.d.ts.map +1 -0
  15. package/dist/lib/biome-host/biome-scoped-query.js +39 -0
  16. package/dist/lib/biome-host/biome-scoped-query.js.map +1 -0
  17. package/dist/lib/biome-host/host-bridge.d.ts +1 -0
  18. package/dist/lib/biome-host/host-bridge.d.ts.map +1 -1
  19. package/dist/lib/biome-host/host-bridge.js.map +1 -1
  20. package/dist/lib/biome-host/index.d.ts +4 -0
  21. package/dist/lib/biome-host/index.d.ts.map +1 -1
  22. package/dist/lib/biome-host/index.js +4 -0
  23. package/dist/lib/biome-host/index.js.map +1 -1
  24. package/dist/session/shell/SessionWorkspaceShell.js +1 -1
  25. package/dist/session/shell/SessionWorkspaceShell.js.map +1 -1
  26. package/dist/session-kit/display/ThinkingPanel.d.ts.map +1 -1
  27. package/dist/session-kit/display/ThinkingPanel.js +3 -0
  28. package/dist/session-kit/display/ThinkingPanel.js.map +1 -1
  29. package/package.json +4 -4
  30. package/src/lib/biome-host/biome-builders.ts +109 -0
  31. package/src/lib/biome-host/biome-navigation.ts +37 -0
  32. package/src/lib/biome-host/biome-scope.tsx +119 -0
  33. package/src/lib/biome-host/biome-scoped-query.ts +130 -0
  34. package/src/lib/biome-host/host-bridge.ts +13 -0
  35. package/src/lib/biome-host/index.ts +4 -0
  36. package/src/session/shell/SessionWorkspaceShell.tsx +2 -2
  37. package/src/session-kit/display/ThinkingPanel.tsx +3 -0
  38. package/dist/lib/biome-host/composition-validation.d.ts +0 -22
  39. package/dist/lib/biome-host/composition-validation.d.ts.map +0 -1
  40. package/dist/lib/biome-host/composition-validation.js +0 -127
  41. package/dist/lib/biome-host/composition-validation.js.map +0 -1
  42. package/dist/registry/lib/composition-validation-host.d.ts +0 -3
  43. package/dist/registry/lib/composition-validation-host.d.ts.map +0 -1
  44. package/dist/registry/lib/composition-validation-host.js +0 -10
  45. package/dist/registry/lib/composition-validation-host.js.map +0 -1
@@ -0,0 +1,21 @@
1
+ import { type ComponentType, type ReactNode } from 'react';
2
+ import type { FrontendBiome, NavItemContribution, RouteAccess } from './frontend-biome';
3
+ export type LazyComponentImport = () => Promise<{
4
+ default: ComponentType;
5
+ }>;
6
+ export declare function lazyRoute(importFn: LazyComponentImport, fallback?: ReactNode): () => ReactNode;
7
+ export interface SinglePageBiomeRoute {
8
+ readonly path: string;
9
+ readonly page: LazyComponentImport;
10
+ readonly projectScoped: boolean;
11
+ readonly access?: RouteAccess;
12
+ readonly fallback?: ReactNode;
13
+ }
14
+ export interface SinglePageBiomeSpec {
15
+ readonly id: string;
16
+ readonly displayName: string;
17
+ readonly nav: NavItemContribution;
18
+ readonly route: SinglePageBiomeRoute;
19
+ }
20
+ export declare function defineSinglePageBiome(spec: SinglePageBiomeSpec): FrontendBiome;
21
+ //# sourceMappingURL=biome-builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-builders.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/biome-builders.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,WAAW,EAEZ,MAAM,kBAAkB,CAAC;AAG1B,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAe5E,wBAAgB,SAAS,CACvB,QAAQ,EAAE,mBAAmB,EAC7B,QAAQ,GAAE,SAAgB,GACzB,MAAM,SAAS,CAGjB;AAED,MAAM,WAAW,oBAAoB;IAEnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IAKnC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAEhC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAE9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAElC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,QAAQ,CAAC,GAAG,EAAE,mBAAmB,CAAC;IAElC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;CACtC;AAoBD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,GAAG,aAAa,CAc9E"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lazyRoute = lazyRoute;
4
+ exports.defineSinglePageBiome = defineSinglePageBiome;
5
+ const react_1 = require("react");
6
+ function lazyRoute(importFn, fallback = null) {
7
+ const Lazy = (0, react_1.lazy)(importFn);
8
+ return () => (0, react_1.createElement)(react_1.Suspense, { fallback }, (0, react_1.createElement)(Lazy));
9
+ }
10
+ function defineSinglePageBiome(spec) {
11
+ const { route } = spec;
12
+ const contribution = {
13
+ path: route.path,
14
+ projectScoped: route.projectScoped,
15
+ element: lazyRoute(route.page, route.fallback ?? null),
16
+ ...(route.access ? { access: route.access } : {}),
17
+ };
18
+ return {
19
+ id: spec.id,
20
+ displayName: spec.displayName,
21
+ navItems: [spec.nav],
22
+ routes: [contribution],
23
+ };
24
+ }
25
+ //# sourceMappingURL=biome-builders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-builders.js","sourceRoot":"","sources":["../../../src/lib/biome-host/biome-builders.ts"],"names":[],"mappings":";;AAyCA,8BAMC;AA+CD,sDAcC;AAlGD,iCAMe;AAyBf,SAAgB,SAAS,CACvB,QAA6B,EAC7B,WAAsB,IAAI;IAE1B,MAAM,IAAI,GAAG,IAAA,YAAI,EAAC,QAAQ,CAAC,CAAC;IAC5B,OAAO,GAAG,EAAE,CAAC,IAAA,qBAAa,EAAC,gBAAQ,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAA,qBAAa,EAAC,IAAI,CAAC,CAAC,CAAC;AAC1E,CAAC;AA+CD,SAAgB,qBAAqB,CAAC,IAAyB;IAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,MAAM,YAAY,GAAsB;QACtC,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC;QACtD,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClD,CAAC;IACF,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,QAAQ,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC;QACpB,MAAM,EAAE,CAAC,YAAY,CAAC;KACvB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function useSearchParams(): URLSearchParams;
2
+ export declare function useQueryParam(key: string): string | null;
3
+ //# sourceMappingURL=biome-navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-navigation.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/biome-navigation.ts"],"names":[],"mappings":"AAqBA,wBAAgB,eAAe,IAAI,eAAe,CAEjD;AAUD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGxD"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useSearchParams = useSearchParams;
4
+ exports.useQueryParam = useQueryParam;
5
+ const react_1 = require("react");
6
+ const host_bridge_1 = require("./host-bridge");
7
+ function useSearchParams() {
8
+ return (0, host_bridge_1.useHostBridge)().navigation.useSearchParams();
9
+ }
10
+ function useQueryParam(key) {
11
+ const searchParams = useSearchParams();
12
+ return (0, react_1.useMemo)(() => searchParams.get(key), [searchParams, key]);
13
+ }
14
+ //# sourceMappingURL=biome-navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-navigation.js","sourceRoot":"","sources":["../../../src/lib/biome-host/biome-navigation.ts"],"names":[],"mappings":";;AAqBA,0CAEC;AAUD,sCAGC;AA3BD,iCAAgC;AAEhC,+CAA8C;AAU9C,SAAgB,eAAe;IAC7B,OAAO,IAAA,2BAAa,GAAE,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;AACtD,CAAC;AAUD,SAAgB,aAAa,CAAC,GAAW;IACvC,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type ReactElement, type ReactNode } from 'react';
2
+ export interface ProjectScope {
3
+ readonly orgId: string | null;
4
+ readonly projectId: string | null;
5
+ }
6
+ export interface RequiredProjectScope {
7
+ readonly orgId: string;
8
+ readonly projectId: string;
9
+ }
10
+ export declare function useProjectScope(): ProjectScope;
11
+ export declare function useRequiredScope(): RequiredProjectScope;
12
+ export interface ScopeGuardProps {
13
+ readonly fallback?: ReactNode;
14
+ readonly requireProject?: boolean;
15
+ readonly children: ReactNode | ((scope: ProjectScope) => ReactNode);
16
+ }
17
+ export declare function ScopeGuard(props: ScopeGuardProps): ReactElement;
18
+ //# sourceMappingURL=biome-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-scope.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/biome-scope.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAY,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQpE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAOD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAsBD,wBAAgB,eAAe,IAAI,YAAY,CAM9C;AASD,wBAAgB,gBAAgB,IAAI,oBAAoB,CAWvD;AAED,MAAM,WAAW,eAAe;IAK9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAM9B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAKlC,QAAQ,CAAC,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,SAAS,CAAC,CAAC;CACrE;AAQD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAS/D"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useProjectScope = useProjectScope;
4
+ exports.useRequiredScope = useRequiredScope;
5
+ exports.ScopeGuard = ScopeGuard;
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
8
+ const host_bridge_1 = require("./host-bridge");
9
+ function normalize(value) {
10
+ if (typeof value !== 'string')
11
+ return null;
12
+ const trimmed = value.trim();
13
+ return trimmed.length > 0 ? trimmed : null;
14
+ }
15
+ function useProjectScope() {
16
+ const bridge = (0, host_bridge_1.useHostBridge)();
17
+ const params = bridge.navigation.useRouteParams();
18
+ const orgId = normalize(bridge.auth.getOrgId());
19
+ const projectId = normalize(params.projectId) ?? normalize(bridge.auth.getProjectId());
20
+ return { orgId, projectId };
21
+ }
22
+ function useRequiredScope() {
23
+ const { orgId, projectId } = useProjectScope();
24
+ if (!orgId || !projectId) {
25
+ throw new Error(`[xema-ui-kernel] useRequiredScope() requires both orgId and projectId, ` +
26
+ `got orgId=${orgId ?? 'null'} projectId=${projectId ?? 'null'}. ` +
27
+ `Render this component under <ScopeGuard> or use useProjectScope() for ` +
28
+ `org-scoped surfaces.`);
29
+ }
30
+ return { orgId, projectId };
31
+ }
32
+ function ScopeGuard(props) {
33
+ const { fallback = null, requireProject = true, children } = props;
34
+ const scope = useProjectScope();
35
+ const ready = Boolean(scope.orgId) && (!requireProject || Boolean(scope.projectId));
36
+ if (!ready) {
37
+ return (0, jsx_runtime_1.jsx)(react_1.Fragment, { children: fallback });
38
+ }
39
+ const resolved = typeof children === 'function' ? children(scope) : children;
40
+ return (0, jsx_runtime_1.jsx)(react_1.Fragment, { children: resolved });
41
+ }
42
+ //# sourceMappingURL=biome-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-scope.js","sourceRoot":"","sources":["../../../src/lib/biome-host/biome-scope.tsx"],"names":[],"mappings":";;AAwDA,0CAMC;AASD,4CAWC;AA2BD,gCASC;;AAzGD,i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MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACpF,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,uBAAC,gBAAQ,cAAE,QAAQ,GAAY,CAAC;IACzC,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7E,OAAO,uBAAC,gBAAQ,cAAE,QAAQ,GAAY,CAAC;AACzC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type QueryKey, type UseQueryOptions, type UseQueryResult } from '@tanstack/react-query';
2
+ import { type ProjectScope } from './biome-scope';
3
+ export declare function buildScopedRequestInit(scope: ProjectScope): RequestInit;
4
+ export interface ScopedClient {
5
+ readonly scope: ProjectScope;
6
+ reqOpts(): RequestInit;
7
+ }
8
+ export declare function useScopedClient(): ScopedClient;
9
+ export interface UseScopedQueryExtras {
10
+ readonly requireProject?: boolean;
11
+ }
12
+ export type ScopedQueryFn<TData> = (ctx: {
13
+ readonly scope: ProjectScope;
14
+ reqOpts(): RequestInit;
15
+ }) => TData | Promise<TData>;
16
+ export declare function useScopedQuery<TQueryFnData, TError = Error, TData = TQueryFnData>(key: QueryKey, queryFn: ScopedQueryFn<TQueryFnData>, options?: Omit<UseQueryOptions<TQueryFnData, TError, TData>, 'queryKey' | 'queryFn'> & UseScopedQueryExtras): UseQueryResult<TData, TError>;
17
+ //# sourceMappingURL=biome-scoped-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-scoped-query.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/biome-scoped-query.ts"],"names":[],"mappings":"AAaA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAenE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,WAAW,CAKvE;AAED,MAAM,WAAW,YAAY;IAE3B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAK7B,OAAO,IAAI,WAAW,CAAC;CACxB;AAOD,wBAAgB,eAAe,IAAI,YAAY,CAM9C;AAMD,MAAM,WAAW,oBAAoB;IAMnC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;CACnC;AAMD,MAAM,MAAM,aAAa,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE;IACvC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,OAAO,IAAI,WAAW,CAAC;CACxB,KAAK,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAa7B,wBAAgB,cAAc,CAC5B,YAAY,EACZ,MAAM,GAAG,KAAK,EACd,KAAK,GAAG,YAAY,EAEpB,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,EACpC,OAAO,GAAE,IAAI,CACX,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAC5C,UAAU,GAAG,SAAS,CACvB,GACC,oBAAyB,GAC1B,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAmB/B"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildScopedRequestInit = buildScopedRequestInit;
4
+ exports.useScopedClient = useScopedClient;
5
+ exports.useScopedQuery = useScopedQuery;
6
+ const react_query_1 = require("@tanstack/react-query");
7
+ const biome_scope_1 = require("./biome-scope");
8
+ const ORG_HEADER = 'X-Xema-Org-Id';
9
+ const PROJECT_HEADER = 'X-Project-Id';
10
+ function buildScopedRequestInit(scope) {
11
+ const headers = {};
12
+ if (scope.orgId)
13
+ headers[ORG_HEADER] = scope.orgId;
14
+ if (scope.projectId)
15
+ headers[PROJECT_HEADER] = scope.projectId;
16
+ return { headers };
17
+ }
18
+ function useScopedClient() {
19
+ const scope = (0, biome_scope_1.useProjectScope)();
20
+ return {
21
+ scope,
22
+ reqOpts: () => buildScopedRequestInit(scope),
23
+ };
24
+ }
25
+ function useScopedQuery(key, queryFn, options = {}) {
26
+ const scope = (0, biome_scope_1.useProjectScope)();
27
+ const { requireProject = true, enabled, ...rest } = options;
28
+ const scopeReady = Boolean(scope.orgId) && (!requireProject || Boolean(scope.projectId));
29
+ return (0, react_query_1.useQuery)({
30
+ ...rest,
31
+ queryKey: ['scope', scope.orgId, scope.projectId, ...key],
32
+ enabled: scopeReady && (enabled ?? true),
33
+ queryFn: () => Promise.resolve(queryFn({
34
+ scope,
35
+ reqOpts: () => buildScopedRequestInit(scope),
36
+ })),
37
+ });
38
+ }
39
+ //# sourceMappingURL=biome-scoped-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome-scoped-query.js","sourceRoot":"","sources":["../../../src/lib/biome-host/biome-scoped-query.ts"],"names":[],"mappings":";;AAmCA,wDAKC;AAiBD,0CAMC;AAmCD,wCA+BC;AApHD,uDAK+B;AAE/B,+CAAmE;AAOnE,MAAM,UAAU,GAAG,eAAe,CAAC;AACnC,MAAM,cAAc,GAAG,cAAc,CAAC;AAOtC,SAAgB,sBAAsB,CAAC,KAAmB;IACxD,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;IACnD,IAAI,KAAK,CAAC,SAAS;QAAE,OAAO,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;IAC/D,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC;AAiBD,SAAgB,eAAe;IAC7B,MAAM,KAAK,GAAG,IAAA,6BAAe,GAAE,CAAC;IAChC,OAAO;QACL,KAAK;QACL,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,KAAK,CAAC;KAC7C,CAAC;AACJ,CAAC;AAmCD,SAAgB,cAAc,CAK5B,GAAa,EACb,OAAoC,EACpC,UAIyB,EAAE;IAE3B,MAAM,KAAK,GAAG,IAAA,6BAAe,GAAE,CAAC;IAChC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAE5D,MAAM,UAAU,GACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAExE,OAAO,IAAA,sBAAQ,EAA8B;QAC3C,GAAG,IAAI;QACP,QAAQ,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,GAAG,CAAC;QACzD,OAAO,EAAE,UAAU,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC;QACxC,OAAO,EAAE,GAAG,EAAE,CACZ,OAAO,CAAC,OAAO,CACb,OAAO,CAAC;YACN,KAAK;YACL,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,KAAK,CAAC;SAC7C,CAAC,CACH;KACJ,CAAC,CAAC;AACL,CAAC"}
@@ -6,6 +6,7 @@ export interface HostBridgeNavigation {
6
6
  replace(path: string): void;
7
7
  useLocation(): HostLocation;
8
8
  useRouteParams<T extends Record<string, string | undefined> = Record<string, string | undefined>>(): T;
9
+ useSearchParams(): URLSearchParams;
9
10
  }
10
11
  export interface HostLocation {
11
12
  readonly pathname: string;
@@ -1 +1 @@
1
- {"version":3,"file":"host-bridge.d.ts","sourceRoot":"","sources":["../../../src/lib/biome-host/host-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAA6B,KAAK,SAAS,EAAE,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W,GAAG,mBAAmB,CAAC;AAOpD,SAAgB,aAAa;IAC3B,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,yBAAiB,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,gFAAgF;YAC9E,0EAA0E,CAC7E,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"host-bridge.js","sourceRoot":"","sources":["../../../src/lib/biome-host/host-bridge.ts"],"names":[],"mappings":";;;AA2MA,sCASC;AAlND,iCAAkE;AAiMrD,QAAA,iBAAiB,GAAG,IAAA,qBAAa,EAAoB,IAAI,CAAC,CAAC;AACxE,yBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAOpD,SAAgB,aAAa;IAC3B,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,yBAAiB,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,gFAAgF;YAC9E,0EAA0E,CAC7E,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,5 +1,9 @@
1
1
  export * from './frontend-biome';
2
2
  export * from './host-bridge';
3
+ export * from './biome-navigation';
4
+ export * from './biome-scope';
5
+ export * from './biome-scoped-query';
6
+ export * from './biome-builders';
3
7
  export * from './create-biome-orval-config';
4
8
  export * from './biome-registry';
5
9
  export * from './session-contributions';
@@ -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,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,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,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
@@ -16,6 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./frontend-biome"), exports);
18
18
  __exportStar(require("./host-bridge"), exports);
19
+ __exportStar(require("./biome-navigation"), exports);
20
+ __exportStar(require("./biome-scope"), exports);
21
+ __exportStar(require("./biome-scoped-query"), exports);
22
+ __exportStar(require("./biome-builders"), exports);
19
23
  __exportStar(require("./create-biome-orval-config"), exports);
20
24
  __exportStar(require("./biome-registry"), exports);
21
25
  __exportStar(require("./session-contributions"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/biome-host/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAcA,mDAAiC;AACjC,gDAA8B;AAC9B,8DAA4C;AAC5C,mDAAiC;AACjC,0DAAwC;AACxC,qDAAmC;AACnC,iDAA+B;AAC/B,wCAAsB;AACtB,+CAA6B;AAC7B,qDAAmC"}
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,8DAA4C;AAC5C,mDAAiC;AACjC,0DAAwC;AACxC,qDAAmC;AACnC,iDAA+B;AAC/B,wCAAsB;AACtB,+CAA6B;AAC7B,qDAAmC"}
@@ -10,6 +10,6 @@ function SessionWorkspaceShell({ splitContainerRef, chatPanePercent, isResizing,
10
10
  minWidth: `${minLeftPaneWidth}px`,
11
11
  width: `${chatPanePercent}%`,
12
12
  }
13
- : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: [(0, jsx_runtime_1.jsx)("div", { className: "relative min-h-0 flex-1", children: chatSlot }), chatFooterSlot] }) })), !previewFullscreen && hasPreviewSlot && ((0, jsx_runtime_1.jsx)("div", { className: "relative hidden w-px shrink-0 bg-rule/30 lg:block", children: (0, jsx_runtime_1.jsx)("button", { type: "button", onMouseDown: startResize, "aria-label": "Resize chat and preview panels", title: "Drag to resize", className: "group absolute inset-y-0 left-1/2 w-2 -translate-x-1/2 cursor-col-resize", children: (0, jsx_runtime_1.jsx)("span", { "aria-hidden": true, className: "absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors group-hover:bg-primary/40" }) }) })), hasPreviewSlot && ((0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col overflow-hidden bg-paper", children: [rightHeaderSlot, (0, jsx_runtime_1.jsx)("div", { className: "min-h-0 flex-1 overflow-hidden", children: previewSlot })] }))] }));
13
+ : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", children: [(0, jsx_runtime_1.jsx)("div", { className: "relative min-h-0 min-w-0 flex-1", children: chatSlot }), chatFooterSlot] }) })), !previewFullscreen && hasPreviewSlot && ((0, jsx_runtime_1.jsx)("div", { className: "relative hidden w-px shrink-0 bg-rule/30 lg:block", children: (0, jsx_runtime_1.jsx)("button", { type: "button", onMouseDown: startResize, "aria-label": "Resize chat and preview panels", title: "Drag to resize", className: "group absolute inset-y-0 left-1/2 w-2 -translate-x-1/2 cursor-col-resize", children: (0, jsx_runtime_1.jsx)("span", { "aria-hidden": true, className: "absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors group-hover:bg-primary/40" }) }) })), hasPreviewSlot && ((0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col overflow-hidden bg-paper", children: [rightHeaderSlot, (0, jsx_runtime_1.jsx)("div", { className: "min-h-0 flex-1 overflow-hidden", children: previewSlot })] }))] }));
14
14
  }
15
15
  //# sourceMappingURL=SessionWorkspaceShell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SessionWorkspaceShell.js","sourceRoot":"","sources":["../../../src/session/shell/SessionWorkspaceShell.tsx"],"names":[],"mappings":";;AAiEA,sDA2EC;;AA1ID,kCAA+B;AA+D/B,SAAgB,qBAAqB,CAAC,EACpC,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,WAAW,EACX,QAAQ,EACR,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,GAAG,KAAK,EACzB,gBAAgB,GAAG,GAAG,GACK;IAI3B,MAAM,cAAc,GAAG,WAAW,KAAK,IAAI,CAAC;IAC5C,OAAO,CACL,iCACE,GAAG,EAAE,iBAAiB,EACtB,SAAS,EAAE,IAAA,OAAE,EACX,6CAA6C,EAC7C,UAAU,IAAI,mBAAmB,CAClC,aAEA,CAAC,iBAAiB,IAAI,CACrB,gCACE,SAAS,EAAE,IAAA,OAAE,EACX,sDAAsD,EACtD,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CACrC,EACD,KAAK,EACH,cAAc;oBACZ,CAAC,CAAC;wBACE,QAAQ,EAAE,GAAG,gBAAgB,IAAI;wBACjC,KAAK,EAAE,GAAG,eAAe,GAAG;qBAC7B;oBACH,CAAC,CAAC,SAAS,YAGf,iCAAK,SAAS,EAAC,8CAA8C,aAC3D,gCAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,EACxD,cAAc,IACX,GACF,CACP,EAEA,CAAC,iBAAiB,IAAI,cAAc,IAAI,CACvC,gCAAK,SAAS,EAAC,mDAAmD,YAKhE,mCACE,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE,WAAW,gBACb,gCAAgC,EAC3C,KAAK,EAAC,gBAAgB,EACtB,SAAS,EAAC,0EAA0E,YAEpF,sDAEE,SAAS,EAAC,8GAA8G,GACxH,GACK,GACL,CACP,EAEA,cAAc,IAAI,CACjB,iCAAK,SAAS,EAAC,uDAAuD,aACnE,eAAe,EAChB,gCAAK,SAAS,EAAC,gCAAgC,YAAE,WAAW,GAAO,IAC/D,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"SessionWorkspaceShell.js","sourceRoot":"","sources":["../../../src/session/shell/SessionWorkspaceShell.tsx"],"names":[],"mappings":";;AAiEA,sDA2EC;;AA1ID,kCAA+B;AA+D/B,SAAgB,qBAAqB,CAAC,EACpC,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,WAAW,EACX,QAAQ,EACR,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,GAAG,KAAK,EACzB,gBAAgB,GAAG,GAAG,GACK;IAI3B,MAAM,cAAc,GAAG,WAAW,KAAK,IAAI,CAAC;IAC5C,OAAO,CACL,iCACE,GAAG,EAAE,iBAAiB,EACtB,SAAS,EAAE,IAAA,OAAE,EACX,6CAA6C,EAC7C,UAAU,IAAI,mBAAmB,CAClC,aAEA,CAAC,iBAAiB,IAAI,CACrB,gCACE,SAAS,EAAE,IAAA,OAAE,EACX,sDAAsD,EACtD,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CACrC,EACD,KAAK,EACH,cAAc;oBACZ,CAAC,CAAC;wBACE,QAAQ,EAAE,GAAG,gBAAgB,IAAI;wBACjC,KAAK,EAAE,GAA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EAAE,kBAAkB,GAAG,YAAY,CAkDnC"}
1
+ {"version":3,"file":"ThinkingPanel.d.ts","sourceRoot":"","sources":["../../../src/session-kit/display/ThinkingPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAE/B,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;IAEnC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IAElC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;CAClC;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,IAA0B,EAC1B,WAAmB,EACnB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,EAAE,kBAAkB,GAAG,YAAY,CAqDnC"}
@@ -25,6 +25,9 @@ function ThinkingPanel({ text, skin = enums_1.SessionSkin.Minimal, defaultOpen =
25
25
  fontStyle: 'italic',
26
26
  color: 'hsl(var(--ink-3))',
27
27
  whiteSpace: 'pre-wrap',
28
+ overflowWrap: 'anywhere',
29
+ wordBreak: 'break-word',
30
+ minWidth: 0,
28
31
  }, children: text }))] }));
29
32
  }
30
33
  //# sourceMappingURL=ThinkingPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThinkingPanel.js","sourceRoot":"","sources":["../../../src/session-kit/display/ThinkingPanel.tsx"],"names":[],"mappings":";;AAoBA,sCAyDC;;AAzED,iCAAoE;AAEpE,wCAA2C;AAc3C,SAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,IAAI,GAAG,mBAAW,CAAC,OAAO,EAC1B,WAAW,G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IAAI,IAAI,CACP,gCACE,KAAK,EAAE;oBACL,SAAS,EAAE,CAAC;oBACZ,UAAU,EAAE,CAAC;oBACb,WAAW,EAAE,EAAE;oBACf,UAAU,EAAE,iCAAiC;oBAC7C,QAAQ,EAAE,IAAI;oBACd,UAAU,EAAE,GAAG;oBACf,SAAS,EAAE,QAAQ;oBACnB,KAAK,EAAE,mBAAmB;oBAC1B,UAAU,EAAE,UAAU;oBACtB,YAAY,EAAE,UAAU;oBACxB,SAAS,EAAE,YAAY;oBACvB,QAAQ,EAAE,CAAC;iBACZ,YAEA,IAAI,GACD,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/ui-kernel",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
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",
@@ -35,9 +35,9 @@
35
35
  "LICENSE"
36
36
  ],
37
37
  "dependencies": {
38
+ "@xemahq/registry": "^0.1.3",
38
39
  "clsx": "^2.1.1",
39
- "tailwind-merge": "^2.5.4",
40
- "@xemahq/registry": "0.1.3"
40
+ "tailwind-merge": "^2.5.4"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@tanstack/react-query": "^5.0.0",
@@ -56,7 +56,7 @@
56
56
  "prettier": "3.6.2",
57
57
  "react": "^18.3.1",
58
58
  "typescript": "5.9.3",
59
- "@xemahq/kernel-contracts": "^0.13.0"
59
+ "@xemahq/kernel-contracts": "^0.14.0"
60
60
  },
61
61
  "exports": {
62
62
  ".": {
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Frontend-biome route/biome builders.
3
+ *
4
+ * The `createElement(Suspense, { fallback: null }, createElement(LazyPage))`
5
+ * wrapper is hand-repeated ~74× across biome `index.ts` files — once per lazy
6
+ * route. `lazyRoute` collapses it to one call; `defineSinglePageBiome` builds
7
+ * the whole one-page biome (nav item + single route) that the vast majority of
8
+ * biomes are. Host-framework-agnostic: pure React (`lazy` / `Suspense` /
9
+ * `createElement`), no router and no Next.js.
10
+ */
11
+ import {
12
+ Suspense,
13
+ createElement,
14
+ lazy,
15
+ type ComponentType,
16
+ type ReactNode,
17
+ } from 'react';
18
+
19
+ import type {
20
+ FrontendBiome,
21
+ NavItemContribution,
22
+ RouteAccess,
23
+ RouteContribution,
24
+ } from './frontend-biome';
25
+
26
+ /** A dynamic import of a module whose default export is a React component. */
27
+ export type LazyComponentImport = () => Promise<{ default: ComponentType }>;
28
+
29
+ /**
30
+ * Wrap a dynamic page import as a `RouteContribution['element']` factory: lazy
31
+ * import + `<Suspense>` boundary. Replaces the hand-written
32
+ * `createElement(Suspense, { fallback }, createElement(lazy(importFn)))` block.
33
+ *
34
+ * The `lazy(...)` call is hoisted out of the returned thunk so the component is
35
+ * created ONCE (not on every route render), matching how biomes hand-declare
36
+ * `const Page = lazy(() => import('./Page'))` at module scope.
37
+ *
38
+ * @param importFn Dynamic import of the page module (`() => import('./Page')`).
39
+ * @param fallback Suspense fallback. Defaults to `null` (the prevailing biome
40
+ * convention) — pass a skeleton to be explicit.
41
+ */
42
+ export function lazyRoute(
43
+ importFn: LazyComponentImport,
44
+ fallback: ReactNode = null,
45
+ ): () => ReactNode {
46
+ const Lazy = lazy(importFn);
47
+ return () => createElement(Suspense, { fallback }, createElement(Lazy));
48
+ }
49
+
50
+ export interface SinglePageBiomeRoute {
51
+ /** Route path. May include `:param` segments. */
52
+ readonly path: string;
53
+ /** Dynamic import of the page module. */
54
+ readonly page: LazyComponentImport;
55
+ /**
56
+ * Whether the route mounts under `/projects/:projectId` (project-scoped) or
57
+ * at the org root. REQUIRED — mirrors {@link RouteContribution.projectScoped}.
58
+ */
59
+ readonly projectScoped: boolean;
60
+ /** Access tier required to render. Defaults to `'member'`. */
61
+ readonly access?: RouteAccess;
62
+ /** Suspense fallback for the lazy page. Defaults to `null`. */
63
+ readonly fallback?: ReactNode;
64
+ }
65
+
66
+ export interface SinglePageBiomeSpec {
67
+ /** Stable biome id; matches `xema-biome.json` `xema.id`. */
68
+ readonly id: string;
69
+ /** Displayed name. */
70
+ readonly displayName: string;
71
+ /** The single nav item this biome contributes. */
72
+ readonly nav: NavItemContribution;
73
+ /** The single route this biome contributes. */
74
+ readonly route: SinglePageBiomeRoute;
75
+ }
76
+
77
+ /**
78
+ * Build a `FrontendBiome` for the common one-nav-item / one-route biome.
79
+ *
80
+ * Most biomes are exactly this shape — a nav entry plus a single lazy page —
81
+ * yet each re-declares the nav array, the route array, the `lazy(...)`, and the
82
+ * `Suspense` wrapper by hand. This builder centralizes all four.
83
+ *
84
+ * @example
85
+ * const biome: FrontendBiomeFactory = () =>
86
+ * defineSinglePageBiome({
87
+ * id: 'org-databases',
88
+ * displayName: 'Organization Databases',
89
+ * nav: { id: 'org-databases', label: 'Databases', route: 'org-databases',
90
+ * icon: Database, section: 'Organization', weight: 30 },
91
+ * route: { path: 'org-databases', projectScoped: false,
92
+ * page: () => import('./pages/DatabasesListPage') },
93
+ * });
94
+ */
95
+ export function defineSinglePageBiome(spec: SinglePageBiomeSpec): FrontendBiome {
96
+ const { route } = spec;
97
+ const contribution: RouteContribution = {
98
+ path: route.path,
99
+ projectScoped: route.projectScoped,
100
+ element: lazyRoute(route.page, route.fallback ?? null),
101
+ ...(route.access ? { access: route.access } : {}),
102
+ };
103
+ return {
104
+ id: spec.id,
105
+ displayName: spec.displayName,
106
+ navItems: [spec.nav],
107
+ routes: [contribution],
108
+ };
109
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Bridge-backed navigation convenience hooks for frontend biomes.
3
+ *
4
+ * These wrap the host-agnostic `HostBridge.navigation` surface so biome code
5
+ * never imports a router primitive (`next/navigation`, `react-router-dom`)
6
+ * directly — the host wires the concrete implementation once on the bridge and
7
+ * every biome reads it through here. Host-framework-agnostic: no Next.js, no
8
+ * React-Router. React itself IS used (these are React hooks).
9
+ */
10
+ import { useMemo } from 'react';
11
+
12
+ import { useHostBridge } from './host-bridge';
13
+
14
+ /**
15
+ * Current URL query string as a read-only `URLSearchParams`, read through the
16
+ * host-provided navigation adapter (`bridge.navigation.useSearchParams`).
17
+ *
18
+ * The one router primitive biomes could not previously reach through the
19
+ * bridge. Use this INSTEAD of `import { useSearchParams } from
20
+ * 'next/navigation'` so biome code stays portable across hosts.
21
+ */
22
+ export function useSearchParams(): URLSearchParams {
23
+ return useHostBridge().navigation.useSearchParams();
24
+ }
25
+
26
+ /**
27
+ * Read a single query-string parameter by key, or `null` when absent.
28
+ *
29
+ * Sugar over {@link useSearchParams} for the common "one param" case (e.g.
30
+ * `?tab=overview`, `?runId=…`) that otherwise forces a direct
31
+ * `next/navigation` import. Returns the first value when a key repeats,
32
+ * matching `URLSearchParams.get` semantics.
33
+ */
34
+ export function useQueryParam(key: string): string | null {
35
+ const searchParams = useSearchParams();
36
+ return useMemo(() => searchParams.get(key), [searchParams, key]);
37
+ }
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Bridge-backed org/project scope hooks for frontend biomes.
3
+ *
4
+ * Biomes need the active `{ orgId, projectId }` everywhere they call a scoped
5
+ * API or build a scoped query key. Today each biome rolls its own read — some
6
+ * pull `bridge.auth.getOrgId()`, some read `projectId` off route params, some
7
+ * mix both — which drifts and quietly produces null/undefined holes. This
8
+ * module collapses those into ONE normalized read and ONE guard component.
9
+ *
10
+ * Host-framework-agnostic: it only reads the host-implemented bridge surface
11
+ * (`auth.getOrgId` / `auth.getProjectId` and `navigation.useRouteParams`). No
12
+ * Next.js, no React-Router.
13
+ */
14
+ import { Fragment, type ReactElement, type ReactNode } from 'react';
15
+
16
+ import { useHostBridge } from './host-bridge';
17
+
18
+ /**
19
+ * Normalized active scope. Both fields are `null` when absent (never
20
+ * `undefined` and never empty-string) so consumers branch on a single shape.
21
+ */
22
+ export interface ProjectScope {
23
+ readonly orgId: string | null;
24
+ readonly projectId: string | null;
25
+ }
26
+
27
+ /**
28
+ * Like {@link ProjectScope} but with both fields guaranteed present — the
29
+ * resolved shape {@link useRequiredScope} and {@link ScopeGuard} hand to
30
+ * consumers once the scope is known to be complete.
31
+ */
32
+ export interface RequiredProjectScope {
33
+ readonly orgId: string;
34
+ readonly projectId: string;
35
+ }
36
+
37
+ /** Collapse `undefined` / `''` to `null`; trim incidental whitespace. */
38
+ function normalize(value: string | null | undefined): string | null {
39
+ if (typeof value !== 'string') return null;
40
+ const trimmed = value.trim();
41
+ return trimmed.length > 0 ? trimmed : null;
42
+ }
43
+
44
+ /**
45
+ * The active `{ orgId, projectId }` for the current biome render.
46
+ *
47
+ * - `orgId` comes from the host (`bridge.auth.getOrgId()`) — the org is owned
48
+ * by the host shell, never carried in a biome URL.
49
+ * - `projectId` is read from the matcher-bound route params
50
+ * (`bridge.navigation.useRouteParams().projectId`, set on project-scoped
51
+ * routes) and falls back to `bridge.auth.getProjectId()` for org-scoped
52
+ * surfaces that still have an active project selection.
53
+ *
54
+ * Both values are null-normalized. This is the single sanctioned scope read —
55
+ * biomes MUST NOT re-derive org/project from JWT claims or ad-hoc params.
56
+ */
57
+ export function useProjectScope(): ProjectScope {
58
+ const bridge = useHostBridge();
59
+ const params = bridge.navigation.useRouteParams<{ projectId?: string }>();
60
+ const orgId = normalize(bridge.auth.getOrgId());
61
+ const projectId = normalize(params.projectId) ?? normalize(bridge.auth.getProjectId());
62
+ return { orgId, projectId };
63
+ }
64
+
65
+ /**
66
+ * Like {@link useProjectScope} but fail-fast: throws if either `orgId` or
67
+ * `projectId` is absent. Use it in project-scoped components that cannot
68
+ * render without both — wrap them in {@link ScopeGuard} to render a fallback
69
+ * instead of throwing. Returns the {@link RequiredProjectScope} narrowed
70
+ * shape so callers skip null checks.
71
+ */
72
+ export function useRequiredScope(): RequiredProjectScope {
73
+ const { orgId, projectId } = useProjectScope();
74
+ if (!orgId || !projectId) {
75
+ throw new Error(
76
+ `[xema-ui-kernel] useRequiredScope() requires both orgId and projectId, ` +
77
+ `got orgId=${orgId ?? 'null'} projectId=${projectId ?? 'null'}. ` +
78
+ `Render this component under <ScopeGuard> or use useProjectScope() for ` +
79
+ `org-scoped surfaces.`,
80
+ );
81
+ }
82
+ return { orgId, projectId };
83
+ }
84
+
85
+ export interface ScopeGuardProps {
86
+ /**
87
+ * What to render while the scope is incomplete. Defaults to `null` (render
88
+ * nothing) — pass a skeleton or an empty-state to be explicit.
89
+ */
90
+ readonly fallback?: ReactNode;
91
+ /**
92
+ * When `true` (the default) both `orgId` AND `projectId` are required. Set
93
+ * `false` to gate only on `orgId` — for org-scoped surfaces that still want
94
+ * to wait for an active org before rendering.
95
+ */
96
+ readonly requireProject?: boolean;
97
+ /**
98
+ * Children to render once the scope is complete. May be a render-prop that
99
+ * receives the resolved {@link ProjectScope}, or plain nodes.
100
+ */
101
+ readonly children: ReactNode | ((scope: ProjectScope) => ReactNode);
102
+ }
103
+
104
+ /**
105
+ * Gate a subtree on a complete active scope. Renders `fallback` until the
106
+ * required scope fields are present, then renders `children` (passing the
107
+ * resolved scope when `children` is a render-prop). Collapses the repeated
108
+ * `if (!orgId || !projectId) return null` guard biome pages hand-write.
109
+ */
110
+ export function ScopeGuard(props: ScopeGuardProps): ReactElement {
111
+ const { fallback = null, requireProject = true, children } = props;
112
+ const scope = useProjectScope();
113
+ const ready = Boolean(scope.orgId) && (!requireProject || Boolean(scope.projectId));
114
+ if (!ready) {
115
+ return <Fragment>{fallback}</Fragment>;
116
+ }
117
+ const resolved = typeof children === 'function' ? children(scope) : children;
118
+ return <Fragment>{resolved}</Fragment>;
119
+ }
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Bridge-backed scoped-fetch helpers for frontend biomes.
3
+ *
4
+ * Every scoped biome data hook hand-repeats the same three things: build the
5
+ * org/project request headers (`reqOpts`), gate the query on the scope being
6
+ * present (`enabled`), and fold org/project into the query key so cache entries
7
+ * don't bleed across tenants/projects. This module folds those into
8
+ * `useScopedClient()` + `useScopedQuery()` so a biome hook becomes one call.
9
+ *
10
+ * Host-framework-agnostic. TanStack Query is an OPTIONAL peer dependency — it
11
+ * is imported only here, behind the `useScopedQuery` surface, so biomes that
12
+ * don't use it pay nothing and the kernel never hard-requires it.
13
+ */
14
+ import {
15
+ useQuery,
16
+ type QueryKey,
17
+ type UseQueryOptions,
18
+ type UseQueryResult,
19
+ } from '@tanstack/react-query';
20
+
21
+ import { useProjectScope, type ProjectScope } from './biome-scope';
22
+
23
+ /**
24
+ * The canonical Xema-platform tenant header. Every platform biome-api reads it
25
+ * via `RequestContext`. Mirrors the host's `reqOpts` (see
26
+ * `submodules/xema-host-web/src/lib/api/orval/configure-clients.ts`).
27
+ */
28
+ const ORG_HEADER = 'X-Xema-Org-Id';
29
+ const PROJECT_HEADER = 'X-Project-Id';
30
+
31
+ /**
32
+ * Build a `RequestInit` carrying the active org/project headers, to pass as the
33
+ * per-call `options` argument of any Orval endpoint function. Single source of
34
+ * the header names so biomes stop hand-rolling `reqOpts` per package.
35
+ */
36
+ export function buildScopedRequestInit(scope: ProjectScope): RequestInit {
37
+ const headers: Record<string, string> = {};
38
+ if (scope.orgId) headers[ORG_HEADER] = scope.orgId;
39
+ if (scope.projectId) headers[PROJECT_HEADER] = scope.projectId;
40
+ return { headers };
41
+ }
42
+
43
+ export interface ScopedClient {
44
+ /** The resolved active scope (null-normalized). */
45
+ readonly scope: ProjectScope;
46
+ /**
47
+ * Per-call Orval options bound to the active scope. Pass straight into an
48
+ * endpoint function: `await fooControllerList(client.reqOpts())`.
49
+ */
50
+ reqOpts(): RequestInit;
51
+ }
52
+
53
+ /**
54
+ * A scope-bound request-options factory. Reads the active `{ orgId, projectId }`
55
+ * from the bridge and exposes a `reqOpts()` that stamps the canonical tenant
56
+ * headers — the per-biome `reqOpts(orgId, projectId)` helper, centralized.
57
+ */
58
+ export function useScopedClient(): ScopedClient {
59
+ const scope = useProjectScope();
60
+ return {
61
+ scope,
62
+ reqOpts: () => buildScopedRequestInit(scope),
63
+ };
64
+ }
65
+
66
+ /**
67
+ * Extra options accepted by {@link useScopedQuery} on top of the underlying
68
+ * TanStack `useQuery` options.
69
+ */
70
+ export interface UseScopedQueryExtras {
71
+ /**
72
+ * When `true` (the default) the query is gated on `orgId` AND `projectId`.
73
+ * Set `false` to gate only on `orgId` — for org-scoped reads that don't need
74
+ * a project. The gate ANDs with any caller-supplied `enabled`.
75
+ */
76
+ readonly requireProject?: boolean;
77
+ }
78
+
79
+ /**
80
+ * The `queryFn` shape `useScopedQuery` calls — it receives the resolved scope
81
+ * plus the scope-bound `reqOpts()` so the body never re-reads the bridge.
82
+ */
83
+ export type ScopedQueryFn<TData> = (ctx: {
84
+ readonly scope: ProjectScope;
85
+ reqOpts(): RequestInit;
86
+ }) => TData | Promise<TData>;
87
+
88
+ /**
89
+ * Scope-aware `useQuery`. Folds the active org/project into:
90
+ * - the **query key** — `key` is prefixed with `['scope', orgId, projectId]`
91
+ * so cache entries never leak across tenants/projects;
92
+ * - the **`enabled` gate** — ANDed with the scope-present check (and any
93
+ * caller `enabled`), so the query stays idle until the scope resolves;
94
+ * - the **`queryFn` context** — the resolved scope + a bound `reqOpts()`.
95
+ *
96
+ * Everything else (`staleTime`, `select`, `retry`, …) passes through to the
97
+ * underlying `useQuery`.
98
+ */
99
+ export function useScopedQuery<
100
+ TQueryFnData,
101
+ TError = Error,
102
+ TData = TQueryFnData,
103
+ >(
104
+ key: QueryKey,
105
+ queryFn: ScopedQueryFn<TQueryFnData>,
106
+ options: Omit<
107
+ UseQueryOptions<TQueryFnData, TError, TData>,
108
+ 'queryKey' | 'queryFn'
109
+ > &
110
+ UseScopedQueryExtras = {},
111
+ ): UseQueryResult<TData, TError> {
112
+ const scope = useProjectScope();
113
+ const { requireProject = true, enabled, ...rest } = options;
114
+
115
+ const scopeReady =
116
+ Boolean(scope.orgId) && (!requireProject || Boolean(scope.projectId));
117
+
118
+ return useQuery<TQueryFnData, TError, TData>({
119
+ ...rest,
120
+ queryKey: ['scope', scope.orgId, scope.projectId, ...key],
121
+ enabled: scopeReady && (enabled ?? true),
122
+ queryFn: () =>
123
+ Promise.resolve(
124
+ queryFn({
125
+ scope,
126
+ reqOpts: () => buildScopedRequestInit(scope),
127
+ }),
128
+ ),
129
+ });
130
+ }
@@ -42,6 +42,19 @@ export interface HostBridgeNavigation {
42
42
  useRouteParams<
43
43
  T extends Record<string, string | undefined> = Record<string, string | undefined>,
44
44
  >(): T;
45
+ /**
46
+ * Hook returning the current URL query string as a read-only
47
+ * `URLSearchParams`. Must be a stable React hook implemented by the host
48
+ * against its router (`react-router-dom`'s `useSearchParams`, the App
49
+ * Router's `useSearchParams`, …).
50
+ *
51
+ * This is the router primitive biomes could not previously reach through
52
+ * the bridge — without it they were forced to import `next/navigation`
53
+ * directly, defeating the host decoupling that `useLocation` /
54
+ * `useRouteParams` already provide. Read-only on purpose: query mutation
55
+ * goes through `push` / `replace` so the host owns history semantics.
56
+ */
57
+ useSearchParams(): URLSearchParams;
45
58
  }
46
59
 
47
60
  export interface HostLocation {
@@ -14,6 +14,10 @@
14
14
  */
15
15
  export * from './frontend-biome';
16
16
  export * from './host-bridge';
17
+ export * from './biome-navigation';
18
+ export * from './biome-scope';
19
+ export * from './biome-scoped-query';
20
+ export * from './biome-builders';
17
21
  export * from './create-biome-orval-config';
18
22
  export * from './biome-registry';
19
23
  export * from './session-contributions';
@@ -102,8 +102,8 @@ export function SessionWorkspaceShell({
102
102
  : undefined
103
103
  }
104
104
  >
105
- <div className="flex min-h-0 flex-1 flex-col overflow-hidden">
106
- <div className="relative min-h-0 flex-1">{chatSlot}</div>
105
+ <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden">
106
+ <div className="relative min-h-0 min-w-0 flex-1">{chatSlot}</div>
107
107
  {chatFooterSlot}
108
108
  </div>
109
109
  </div>
@@ -68,6 +68,9 @@ export function ThinkingPanel({
68
68
  fontStyle: 'italic',
69
69
  color: 'hsl(var(--ink-3))',
70
70
  whiteSpace: 'pre-wrap',
71
+ overflowWrap: 'anywhere',
72
+ wordBreak: 'break-word',
73
+ minWidth: 0,
71
74
  }}
72
75
  >
73
76
  {text}
@@ -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,s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AACL,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type CompositionDiagnostic, type FrontendBiome } from '../../index';
2
- export declare function validateHostBiomeComposition(biomes: readonly FrontendBiome[]): readonly CompositionDiagnostic[];
3
- //# sourceMappingURL=composition-validation-host.d.ts.map
@@ -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"}