@almadar/shell-web 0.0.0-stage → 0.1.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/bundling.d.mts +18 -0
- package/bundling.mjs +28 -0
- package/dist/ArbitraryClassCompiler-Mzabq-UB.d.ts +100 -0
- package/dist/AvlGlyph-JKJOAH23.js +6 -0
- package/dist/AvlStateMachine-PI4YGREK.js +8 -0
- package/dist/AvlTransitionDetail-ZH7V24UG.js +12 -0
- package/dist/AvlTransitionExplainer-ZSRT7L6Y.js +13 -0
- package/dist/BehaviorValueFrame-6RUJXT4A.js +29 -0
- package/dist/BehaviorValueFrame-SSEMEBTG.css +1756 -0
- package/dist/BehaviorView-RFEE5J6E.js +10 -0
- package/dist/Canvas3DHost-_Y-5uLM_.d.ts +552 -0
- package/dist/EventBusProvider-CVwjkV_2.d.ts +284 -0
- package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
- package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
- package/dist/FlowCanvas-STDC4OWK.js +27 -0
- package/dist/GameAudioProvider-Cm9BnvmP.d.ts +93 -0
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/KernelEngineContext-BOCQoFwk.d.ts +43 -0
- package/dist/LayersPanel-BBQ54IVG.js +7 -0
- package/dist/ModuleCard-3TT2X7IW.js +7 -0
- package/dist/OrbInspector-K6T6O7GI.js +27 -0
- package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
- package/dist/Select-mDZIwNqN.d.ts +199 -0
- package/dist/ServerBridge-Cm1On51b.d.ts +233 -0
- package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
- package/dist/TraitValueFrame-2PJGLLVI.js +28 -0
- package/dist/TraitValueFrame-4G3KOUBR.css +1756 -0
- package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
- package/dist/UISlotRenderer-JKFSX24W.js +27 -0
- package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
- package/dist/UserContext-DqWeZkUZ.d.ts +100 -0
- package/dist/auth/browser/index.d.ts +2 -0
- package/dist/auth/browser/index.js +1 -0
- package/dist/auth/react/index.d.ts +49 -0
- package/dist/auth/react/index.js +119 -0
- package/dist/avl/index.css +1756 -0
- package/dist/avl/index.d.ts +2238 -0
- package/dist/avl/index.js +2693 -0
- package/dist/avl-3d-context-BIRKWpaL.d.ts +204 -0
- package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
- package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
- package/dist/chunk-2PY54Z44.js +227 -0
- package/dist/chunk-2QOH2HWM.js +95 -0
- package/dist/chunk-3BBUBJFF.js +339 -0
- package/dist/chunk-42FY4RYA.js +191 -0
- package/dist/chunk-5QTYQTPS.js +15 -0
- package/dist/chunk-6P3MWXYE.js +440 -0
- package/dist/chunk-73SRAB4P.js +1053 -0
- package/dist/chunk-A2LR6VQQ.js +349 -0
- package/dist/chunk-AILY3XPS.js +562 -0
- package/dist/chunk-B4BU77LT.js +432 -0
- package/dist/chunk-DFNZUYX4.js +378 -0
- package/dist/chunk-DJ433ET5.js +1327 -0
- package/dist/chunk-DLZF4PVE.js +24 -0
- package/dist/chunk-DYEKAA4L.js +787 -0
- package/dist/chunk-DZ42OJQC.js +176 -0
- package/dist/chunk-EOWMARUB.js +16 -0
- package/dist/chunk-EQAMU2ZC.js +14 -0
- package/dist/chunk-FAJDTHWC.js +98 -0
- package/dist/chunk-FIW6WN23.js +508 -0
- package/dist/chunk-FP3WIKTC.js +303 -0
- package/dist/chunk-G7DCAZ22.js +19 -0
- package/dist/chunk-GAR5TQ5B.js +199 -0
- package/dist/chunk-GKIFONTE.js +131 -0
- package/dist/chunk-GYTPOFVC.js +47155 -0
- package/dist/chunk-KVQS4GXU.js +328 -0
- package/dist/chunk-L2DEKY4J.js +97 -0
- package/dist/chunk-L677XGY3.js +701 -0
- package/dist/chunk-MBQAMMSE.js +11877 -0
- package/dist/chunk-P4LNHAFI.js +1051 -0
- package/dist/chunk-P4ZFUQFF.js +93 -0
- package/dist/chunk-PC7K4SK7.js +1384 -0
- package/dist/chunk-R5O5AUPI.js +573 -0
- package/dist/chunk-SGM3FASH.js +672 -0
- package/dist/chunk-SJGJJKBY.js +502 -0
- package/dist/chunk-TESBIVUA.js +11 -0
- package/dist/chunk-TZZBINQY.js +82 -0
- package/dist/chunk-U6QRZASX.js +280 -0
- package/dist/chunk-VFF5OO47.js +319 -0
- package/dist/chunk-YDNJLLG6.js +516 -0
- package/dist/chunk-YHMRX6YA.js +455 -0
- package/dist/chunk-ZO6MXAS3.js +69 -0
- package/dist/components/index.css +1756 -0
- package/dist/components/index.d.ts +11093 -0
- package/dist/components/index.js +1110 -0
- package/dist/context/index.d.ts +9 -0
- package/dist/context/index.js +7 -0
- package/dist/core.d.ts +2523 -0
- package/dist/core.js +2 -0
- package/dist/design-classes/index.cjs +429 -0
- package/dist/design-classes/index.d.cts +165 -0
- package/dist/design-classes/index.d.ts +165 -0
- package/dist/design-classes/index.js +397 -0
- package/dist/emojiItems-QGSNAABW.js +20 -0
- package/dist/fx-CmQjnHmT.d.ts +371 -0
- package/dist/hooks/index.d.ts +936 -0
- package/dist/hooks/index.js +7 -0
- package/dist/index.d.ts +486 -0
- package/dist/index.js +38 -0
- package/dist/katexPlugin-FA7NX4PE.css +1161 -0
- package/dist/katexPlugin-NCDKOOQY.js +2 -0
- package/dist/kernel-client-ZH4PSMCN.js +367 -0
- package/dist/kernel-wire-B4S8pnP3.d.ts +65 -0
- package/dist/lib/index.d.ts +602 -0
- package/dist/lib/index.js +1288 -0
- package/dist/paintDispatch-ChW5mVuK.d.ts +698 -0
- package/dist/parseLessonSegments-GpCeMrb2.d.ts +334 -0
- package/dist/perf-CKiBKbkw.d.ts +22 -0
- package/dist/perf-Dr28-AgT.d.ts +57 -0
- package/dist/prism-AIWGN2X5.js +134 -0
- package/dist/providers/index.css +1756 -0
- package/dist/providers/index.d.ts +340 -0
- package/dist/providers/index.js +30 -0
- package/dist/renderer/index.d.ts +467 -0
- package/dist/renderer/index.js +3 -0
- package/dist/runtime/index.css +1756 -0
- package/dist/runtime/index.d.ts +440 -0
- package/dist/runtime/index.js +31 -0
- package/dist/slot-host-CPzrxLo9.d.ts +48 -0
- package/dist/ssr/index.cjs +7631 -0
- package/dist/ssr/index.d.cts +487 -0
- package/dist/ssr/index.d.ts +487 -0
- package/dist/ssr/index.js +7599 -0
- package/dist/storage/browser/index.d.ts +1 -0
- package/dist/storage/browser/index.js +1 -0
- package/dist/test-support.d.ts +35 -0
- package/dist/test-support.js +114 -0
- package/dist/themeTokens-CRd8AEDF.d.ts +125 -0
- package/dist/three/index.css +503 -0
- package/dist/three/index.d.ts +1185 -0
- package/dist/three/index.js +3896 -0
- package/dist/useKeyboardRouter-Dsq553Ur.d.ts +42 -0
- package/dist/useUISlots-CiobNFGb.d.ts +211 -0
- package/dist/verification-C5pTeMJv.d.ts +66 -0
- package/dist/verificationRegistry-CabxhfTv.d.ts +122 -0
- package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
- package/index.css +199 -0
- package/package.json +269 -3
- package/src/core/locales/ar.json +1263 -0
- package/src/core/locales/en.json +1263 -0
- package/src/core/locales/index.ts +54 -0
- package/src/core/locales/sl.json +1263 -0
- package/src/core/tokens/native-tokens.json +369 -0
- package/tailwind-compile.cjs +29 -0
- package/tailwind-preset.cjs +991 -0
- package/themes/_base.css +451 -0
- package/themes/_contract.md +307 -0
- package/themes/_fonts-kenney.css +11 -0
- package/themes/_fonts.css +12 -0
- package/themes/_foundation.css +105 -0
- package/themes/_head.css +22 -0
- package/themes/_presets.css +67 -0
- package/themes/almadar-heritage.css +455 -0
- package/themes/almadar-website.css +269 -0
- package/themes/almadar.css +269 -0
- package/themes/aqua.css +455 -0
- package/themes/arabesque.css +459 -0
- package/themes/art-deco.css +457 -0
- package/themes/art-nouveau.css +459 -0
- package/themes/atelier.css +463 -0
- package/themes/bauhaus.css +461 -0
- package/themes/bloomberg-dense.css +463 -0
- package/themes/blueprint.css +457 -0
- package/themes/clay.css +449 -0
- package/themes/comic.css +453 -0
- package/themes/constructivist.css +457 -0
- package/themes/corporate.css +449 -0
- package/themes/cyberpunk.css +453 -0
- package/themes/frutiger-aero.css +458 -0
- package/themes/game-adventure.css +201 -0
- package/themes/game-rpg.css +203 -0
- package/themes/game-sci-fi.css +201 -0
- package/themes/game-ui-pack.css +200 -0
- package/themes/gazette.css +449 -0
- package/themes/glass.css +457 -0
- package/themes/gothic.css +453 -0
- package/themes/index.css +21 -0
- package/themes/ink-wash.css +459 -0
- package/themes/kawaii.css +459 -0
- package/themes/kflow.css +310 -0
- package/themes/kiosk.css +449 -0
- package/themes/linear-clean.css +463 -0
- package/themes/luxury.css +451 -0
- package/themes/mac-classic.css +455 -0
- package/themes/material.css +463 -0
- package/themes/memphis.css +453 -0
- package/themes/mid-century.css +455 -0
- package/themes/minimalist.css +449 -0
- package/themes/mudcloth.css +459 -0
- package/themes/nata.css +310 -0
- package/themes/neon.css +453 -0
- package/themes/neumorphic.css +451 -0
- package/themes/newsprint.css +455 -0
- package/themes/notion-editorial.css +463 -0
- package/themes/orb.css +465 -0
- package/themes/pixel.css +449 -0
- package/themes/prism.css +309 -0
- package/themes/rawi.css +310 -0
- package/themes/retro.css +452 -0
- package/themes/risograph.css +463 -0
- package/themes/scandi.css +469 -0
- package/themes/sketch.css +455 -0
- package/themes/solarpunk.css +469 -0
- package/themes/steampunk.css +451 -0
- package/themes/swiss.css +455 -0
- package/themes/terminal.css +466 -0
- package/themes/trait-wars.css +487 -0
- package/themes/ukiyo-e.css +459 -0
- package/themes/vaporwave.css +455 -0
- package/themes/victorian.css +453 -0
- package/themes/wabi-sabi.css +459 -0
- package/themes/win95.css +455 -0
- package/themes/wireframe.css +439 -0
- package/themes/zine.css +455 -0
- package/README.md +0 -3
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { EventPayload, OrbitalDefinition, SchemaMetadata, PersistenceAdapter, ServiceParams, UserContext, ResolvedTraitBinding, ResolvedPage, ResolvedEntity, ResolvedTrait, ResolvedIR, OrbitalSchema, PatternConfig, ResolvedPatternProps, EventSource, SExpr, EntityData, ViewerAuthority, TraitValue, TraitValueMountResult, BehaviorRef, BehaviorValueMountResult } from '@almadar/core';
|
|
2
|
+
export { ResolvedEntity, ResolvedIR, ResolvedPage, ResolvedTrait, ResolvedTraitBinding } from '@almadar/core';
|
|
3
|
+
import { TraitState } from '@almadar/shell-runtime/client/trait-types';
|
|
4
|
+
import { EventTransport, AccessTokenProvider } from '@almadar/shell-runtime/client/EventTransport';
|
|
5
|
+
export { AccessTokenProvider } from '@almadar/shell-runtime/client/EventTransport';
|
|
6
|
+
import '../verification-C5pTeMJv.js';
|
|
7
|
+
import { S as ServerBridgeTransport } from '../ServerBridge-Cm1On51b.js';
|
|
8
|
+
import { EntityBindingSource, AwaitingSkeletonSource } from '../providers/index.js';
|
|
9
|
+
export { a as EntitySchemaContextValue, b as EntitySchemaProvider, c as EntitySchemaProviderProps, d as ServerBridgeContextValue, e as ServerBridgeProvider, T as TraitContext, f as TraitContextValue, g as TraitInstance, h as TraitProvider, i as TraitProviderProps, u as useEntitySchema, j as useEntitySchemaOptional, k as useServerBridge, l as useTrait, m as useTraitContext } from '../ServerBridge-Cm1On51b.js';
|
|
10
|
+
import { useUISlots } from '../context/index.js';
|
|
11
|
+
export { w as wrapCallbackForEvent } from '../wrapCallbackForEvent-B9QLbhxX.js';
|
|
12
|
+
export { a as PERF_NAMESPACE, P as PerfEntry, c as clearPerf, p as perfEnd, b as perfStart, d as perfTime } from '../perf-Dr28-AgT.js';
|
|
13
|
+
import React__default, { ReactNode } from 'react';
|
|
14
|
+
import { UserData } from '../context/index.js';
|
|
15
|
+
import { SchemaLoader } from '@almadar/shell-runtime/kernel/wire';
|
|
16
|
+
import { KernelLoader, LanguageLoader, SeedProgramLoader } from '../providers/index.js';
|
|
17
|
+
import { KeyCaptureTable } from '../components/index.js';
|
|
18
|
+
export { S as SlotHostManifest, a as SlotHostRegion, b as assertUniqueSlotsPerHost } from '../slot-host-CPzrxLo9.js';
|
|
19
|
+
export { p as profilerOnRender, u as usePerfBuffer } from '../perf-CKiBKbkw.js';
|
|
20
|
+
import '../useUISlots-CiobNFGb.js';
|
|
21
|
+
import '@almadar/core/patterns';
|
|
22
|
+
|
|
23
|
+
interface TraitStateMachineResult {
|
|
24
|
+
/** Current state for each trait. */
|
|
25
|
+
traitStates: Map<string, TraitState>;
|
|
26
|
+
/** Send an event — broadcasts to every currently-mounted trait that can
|
|
27
|
+
* handle it, decomposed into one targeted `kernel.dispatch` per trait
|
|
28
|
+
* (the client role requires exactly one seed trait per call). */
|
|
29
|
+
sendEvent: (eventKey: string, payload?: EventPayload) => void;
|
|
30
|
+
getTraitState: (traitName: string) => TraitState | undefined;
|
|
31
|
+
canHandleEvent: (traitName: string, eventKey: string) => boolean;
|
|
32
|
+
/** Live per-trait binding surface for `EntityBindingContext`. */
|
|
33
|
+
entityBindingSource: EntityBindingSource;
|
|
34
|
+
/** Awaiting-server skeletons for `AwaitingSkeletonContext`. */
|
|
35
|
+
awaitingSkeletonSource: AwaitingSkeletonSource;
|
|
36
|
+
}
|
|
37
|
+
interface UseTraitStateMachineOptions {
|
|
38
|
+
onEventProcessed?: (eventKey: string, payload?: EventPayload) => void;
|
|
39
|
+
navigate?: (path: string, params?: Record<string, string>, crumb?: string) => void;
|
|
40
|
+
navigateBack?: () => void;
|
|
41
|
+
initPayload?: EventPayload;
|
|
42
|
+
/** The mounted page's identity; with `initPayload` it keys the once-per-mount lifecycle guard (Runtime Spec Clause 4.1). */
|
|
43
|
+
mountKey?: string;
|
|
44
|
+
/** The route the page is opened at; the kernel's mounts for it are what the hook runs (EXEC-ENDPOINT-3). */
|
|
45
|
+
routePath?: string;
|
|
46
|
+
/** The resolved schema's full orbital set — `buildTraitIndex`'s one input. */
|
|
47
|
+
orbitals: readonly OrbitalDefinition[];
|
|
48
|
+
/** The program's `_metadata` (a compiled client program's operator sites and dispatch facts), handed to the kernel. */
|
|
49
|
+
metadata?: SchemaMetadata;
|
|
50
|
+
/** Caller-owned transport (server bridge). Omitted + `persistence` set =
|
|
51
|
+
* offline preview (plan G7); omitted + no `persistence` = fully local,
|
|
52
|
+
* nothing ever posts. */
|
|
53
|
+
transport?: EventTransport;
|
|
54
|
+
carriesCircuitState?: boolean;
|
|
55
|
+
/** Hold every dispatch until the transport's topology is known. */
|
|
56
|
+
awaitTopology?: boolean;
|
|
57
|
+
persistence?: PersistenceAdapter;
|
|
58
|
+
/** The browser store for `[persistent: x, browser]` entities (see `useCircuitKernel`). */
|
|
59
|
+
browserStore?: PersistenceAdapter;
|
|
60
|
+
callService?: (service: string, action: string, params?: ServiceParams) => Promise<EventPayload>;
|
|
61
|
+
embeddedTraits?: ReadonlySet<string>;
|
|
62
|
+
callsiteCaptureChildrenByTrait?: ReadonlyMap<string, ReadonlySet<string>>;
|
|
63
|
+
debug?: boolean;
|
|
64
|
+
logContext?: {
|
|
65
|
+
behavior?: string;
|
|
66
|
+
orbitalName?: string;
|
|
67
|
+
};
|
|
68
|
+
/** Explicit viewer override (e.g. a persona switcher's picked identity
|
|
69
|
+
* threaded down as a prop rather than through `UserContext`). Wins over
|
|
70
|
+
* `useUser()`'s context value when supplied. */
|
|
71
|
+
user?: UserContext;
|
|
72
|
+
}
|
|
73
|
+
declare function useTraitStateMachine(traitBindings: ResolvedTraitBinding[], uiSlots: ReturnType<typeof useUISlots>, options: UseTraitStateMachineOptions): TraitStateMachineResult;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* useResolvedSchema Hook
|
|
77
|
+
*
|
|
78
|
+
* Resolves OrbitalSchema to IR for the OrbitalRuntime.
|
|
79
|
+
* Uses the shared resolver to ensure consistency with the compiler.
|
|
80
|
+
*
|
|
81
|
+
* TRAIT-DRIVEN ARCHITECTURE:
|
|
82
|
+
* - Pages have traits, NOT sections
|
|
83
|
+
* - UI is produced by trait effects (render_ui)
|
|
84
|
+
* - No backwards compatibility with legacy formats
|
|
85
|
+
*
|
|
86
|
+
* @packageDocumentation
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
interface ResolvedSchemaResult {
|
|
90
|
+
/** The resolved page (or undefined if not found) */
|
|
91
|
+
page: ResolvedPage | undefined;
|
|
92
|
+
/** Trait bindings for this page */
|
|
93
|
+
traits: ResolvedTraitBinding[];
|
|
94
|
+
/** Entities used by this page */
|
|
95
|
+
entities: Map<string, ResolvedEntity>;
|
|
96
|
+
/** All entities from schema */
|
|
97
|
+
allEntities: Map<string, ResolvedEntity>;
|
|
98
|
+
/** All resolved traits */
|
|
99
|
+
allTraits: Map<string, ResolvedTrait>;
|
|
100
|
+
/** Loading state */
|
|
101
|
+
loading: boolean;
|
|
102
|
+
/** Error message if resolution failed */
|
|
103
|
+
error: string | null;
|
|
104
|
+
/** Full IR (for debugging) */
|
|
105
|
+
ir: ResolvedIR | null;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Hook to resolve an OrbitalSchema to IR.
|
|
109
|
+
*
|
|
110
|
+
* @param schema - The OrbitalSchema to resolve
|
|
111
|
+
* @param pageName - Optional page name (defaults to first page or initial page)
|
|
112
|
+
* @returns Resolved schema data including page, traits, and entities
|
|
113
|
+
*/
|
|
114
|
+
declare function useResolvedSchema(schema: OrbitalSchema | null | undefined, pageName?: string): ResolvedSchemaResult;
|
|
115
|
+
/**
|
|
116
|
+
* Clear the schema resolution cache
|
|
117
|
+
*/
|
|
118
|
+
declare function clearSchemaCache(): void;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* One pattern within a slot's accumulated render-ui set, plus any
|
|
122
|
+
* caller-supplied props that should be merged on top.
|
|
123
|
+
*/
|
|
124
|
+
interface SlotPatternEntry {
|
|
125
|
+
/** `PatternConfig` normally; a bare `@trait.X` string is the
|
|
126
|
+
* G-RUNTIME-025 whole-slot payload (`(render-ui main "@trait.X")`),
|
|
127
|
+
* which `useSlotFlush`'s unwrap routes as a TraitFrame child reference. */
|
|
128
|
+
pattern: PatternConfig | string;
|
|
129
|
+
props: ResolvedPatternProps;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The originating trait + state for a slot write. Embedded in the
|
|
133
|
+
* `useUISlots` SlotContent's metadata so observers (verifier, debugger,
|
|
134
|
+
* cross-orbital tracer) can attribute every render to the trait that
|
|
135
|
+
* caused it.
|
|
136
|
+
*/
|
|
137
|
+
interface SlotSource extends EventSource {
|
|
138
|
+
trait: string;
|
|
139
|
+
state: string;
|
|
140
|
+
transition: string;
|
|
141
|
+
effects: SExpr[];
|
|
142
|
+
traitDefinition: ResolvedTrait;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* OrbPreview Component
|
|
147
|
+
*
|
|
148
|
+
* Renders a live preview of an Orbital schema (.orb program).
|
|
149
|
+
* Uses static imports (no lazy loading) to ensure all providers,
|
|
150
|
+
* hooks, and components share the same module instances.
|
|
151
|
+
*
|
|
152
|
+
* Usage:
|
|
153
|
+
* <OrbPreview schema={orbJsonStringOrObject} />
|
|
154
|
+
* <OrbPreview schema={schema} serverUrl="/api/orbitals" />
|
|
155
|
+
*
|
|
156
|
+
* @packageDocumentation
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
interface OrbPreviewProps {
|
|
160
|
+
/**
|
|
161
|
+
* The orbital schema. Accepts a JSON string or an `OrbitalSchema` object
|
|
162
|
+
* from `@almadar/core` (the validated `.orb` program type).
|
|
163
|
+
*/
|
|
164
|
+
schema: string | OrbitalSchema;
|
|
165
|
+
/**
|
|
166
|
+
* Mock entity rows keyed by entity name. The `EntityData` type from
|
|
167
|
+
* `@almadar/core` is `Record<string, EntityRow[]>` where each row is a
|
|
168
|
+
* `{ id?: string } & Record<string, FieldValue>`. Ignored if `autoMock`
|
|
169
|
+
* is set.
|
|
170
|
+
*/
|
|
171
|
+
mockData?: EntityData;
|
|
172
|
+
/**
|
|
173
|
+
* When true, run the schema through `prepareSchemaForPreview` before
|
|
174
|
+
* rendering: auto-generate mock entity rows and flip two-state INIT
|
|
175
|
+
* machines so the data state is initial. This is the same pipeline the
|
|
176
|
+
* playground uses, so consumers (docs MDX, playground) all share one path.
|
|
177
|
+
*
|
|
178
|
+
* Ignored when `serverUrl` is set — server-driven previews provide their
|
|
179
|
+
* own data.
|
|
180
|
+
*/
|
|
181
|
+
autoMock?: boolean;
|
|
182
|
+
/** Preview container height. Default: '400px'. */
|
|
183
|
+
height?: string;
|
|
184
|
+
/** CSS class for the outer container. */
|
|
185
|
+
className?: string;
|
|
186
|
+
/** Server URL for dual execution (e.g. "/api/orbitals"). When set, events are forwarded to the server. */
|
|
187
|
+
serverUrl?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Custom transport for in-process execution. Mutually exclusive with
|
|
190
|
+
* `serverUrl`. Used by an in-process host to invoke
|
|
191
|
+
* `OrbitalServerRuntime.processOrbitalEvent` directly without HTTP.
|
|
192
|
+
*/
|
|
193
|
+
transport?: ServerBridgeTransport;
|
|
194
|
+
/** Bearer token for `serverUrl` requests (see `ServerBridgeProviderProps.getAccessToken`). */
|
|
195
|
+
getAccessToken?: AccessTokenProvider;
|
|
196
|
+
/**
|
|
197
|
+
* Loads the initialised `@almadar/kernel`. Given, the preview runs its circuits on the kernel engine and installs the
|
|
198
|
+
* render evaluator from it (`KernelEngineProvider`); keep the function's identity stable across renders. Absent, the
|
|
199
|
+
* preview runs under whatever engine the host's own `KernelEngineProvider` selects.
|
|
200
|
+
*/
|
|
201
|
+
kernelLoader?: KernelLoader;
|
|
202
|
+
/** Resolves the language bundle a kernel opened over browser-stored rows needs (forwarded to `KernelEngineProvider`); keep its identity stable. */
|
|
203
|
+
languageLoader?: LanguageLoader;
|
|
204
|
+
/** Resolves the std mock-seed program that seeds a browser store. */
|
|
205
|
+
seedProgramLoader?: SeedProgramLoader;
|
|
206
|
+
/**
|
|
207
|
+
* How long (ms) to wait for the server bridge to connect before assuming
|
|
208
|
+
* it's unreachable and falling back to local-only execution. Default
|
|
209
|
+
* 5000 (unchanged unless you pass this). Widen it for a caller whose
|
|
210
|
+
* schema is large enough that the server's first `register()` genuinely
|
|
211
|
+
* takes longer than 5s (e.g. a 53-orbital organism measured ~14.5s in
|
|
212
|
+
* production) — see `TraitInitializer`'s `localFallbackTimeoutMs` doc.
|
|
213
|
+
*/
|
|
214
|
+
localFallbackTimeoutMs?: number;
|
|
215
|
+
/**
|
|
216
|
+
* Initial page path to render (e.g. `/deals`). Resolves against the
|
|
217
|
+
* schema's `pages[]` to seed `currentPage` so the right orbital's traits
|
|
218
|
+
* mount on first render. Without this the playground falls back to the
|
|
219
|
+
* schema's first page binding (gap #13 Phase 5). runtime-verify uses this
|
|
220
|
+
* to walk DealCreate, NoteCompose, etc. on their owning pages.
|
|
221
|
+
*/
|
|
222
|
+
initialPagePath?: string;
|
|
223
|
+
/**
|
|
224
|
+
* The signed-in viewer — forwarded to `OrbitalProvider`'s `UserProvider` so
|
|
225
|
+
* `@user.x` resolves in client-side guard and effect evaluation exactly as
|
|
226
|
+
* it does on the server. Omitted → anonymous.
|
|
227
|
+
*/
|
|
228
|
+
user?: UserData | null;
|
|
229
|
+
/**
|
|
230
|
+
* What the host's auth provider has resolved the viewer to be. An
|
|
231
|
+
* `access: authenticated` page mounts only on `authenticated`; any other
|
|
232
|
+
* resolved value sends the viewer to the app's `signIn` route. Omitted → the
|
|
233
|
+
* host offers no sign-in (`unavailable`).
|
|
234
|
+
*/
|
|
235
|
+
authority?: ViewerAuthority;
|
|
236
|
+
/**
|
|
237
|
+
* Sandbox mode, for previews embedded in a host app (e.g. the studio
|
|
238
|
+
* canvas): the event bus stays context-local, navigation stays in memory
|
|
239
|
+
* (the host URL/history are never touched), in-app links are always
|
|
240
|
+
* intercepted, and external links open a new tab. Default false
|
|
241
|
+
* (standalone previews own the global bridge and sync `?page=`).
|
|
242
|
+
*/
|
|
243
|
+
isolated?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Scale the rendered content down (never up) so it fits the container
|
|
246
|
+
* without scrollbars. For fixed-intrinsic-size content (game canvases);
|
|
247
|
+
* leave off for flow layouts, which should keep their internal scroll.
|
|
248
|
+
* `'content'`: fit the rendered component itself (not the page around it)
|
|
249
|
+
* and center it — a thumbnail of one behavior.
|
|
250
|
+
*/
|
|
251
|
+
fit?: boolean | 'content';
|
|
252
|
+
/**
|
|
253
|
+
* Called with the page path on every in-preview page switch (link click,
|
|
254
|
+
* navigate effect, `UI:NAVIGATE`), for a host that tracks the page in its
|
|
255
|
+
* own router. When set, it replaces the built-in `?page=` URL sync.
|
|
256
|
+
*/
|
|
257
|
+
onPageChange?: (path: string) => void;
|
|
258
|
+
/**
|
|
259
|
+
* A registry theme key (`"<base>-<light|dark>"`) that replaces every
|
|
260
|
+
* orbital's declared theme — a host's explicit theme pick (the playground
|
|
261
|
+
* picker). Omitted → each page renders in its own orbital's theme.
|
|
262
|
+
*/
|
|
263
|
+
themeOverride?: string;
|
|
264
|
+
/** Hold the preview's client ticks stopped (a canvas card the person has not played); clearing it resumes them. */
|
|
265
|
+
paused?: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Loads the behavior behind a `lazyPages` entry (`uses lazy`) when its page
|
|
268
|
+
* is opened. Without it, opening a lazy page shows a load error.
|
|
269
|
+
*/
|
|
270
|
+
lazyLoader?: SchemaLoader;
|
|
271
|
+
/** Where `schema` was loaded from — a lazy page's `orbRef` resolves against it. */
|
|
272
|
+
schemaPath?: string;
|
|
273
|
+
/**
|
|
274
|
+
* Called with a path that matches none of this schema's pages — a lazily
|
|
275
|
+
* loaded behavior hands links back to the schema that imported it.
|
|
276
|
+
*/
|
|
277
|
+
onUnmatchedNavigate?: (path: string) => void;
|
|
278
|
+
/**
|
|
279
|
+
* The host's own sign-in (`HOST_SIGN_IN_ROUTE`, `/login`): navigating there —
|
|
280
|
+
* including an `access: authenticated` page sending its viewer to
|
|
281
|
+
* `signIn: "/login"` — calls this with the return path instead of routing to a
|
|
282
|
+
* page. Omitted → the host offers no sign-in and nothing happens.
|
|
283
|
+
*/
|
|
284
|
+
onSignIn?: (returnTo?: string) => void;
|
|
285
|
+
/**
|
|
286
|
+
* The host's session sign-out, called on the system event `UI:SIGN_OUT` (a
|
|
287
|
+
* Sign out inside the circuit). Omitted → the host offers no sign-out.
|
|
288
|
+
*/
|
|
289
|
+
onSignOut?: () => void;
|
|
290
|
+
}
|
|
291
|
+
declare function OrbPreview({ schema, mockData, autoMock, height, className, serverUrl, transport, getAccessToken, kernelLoader, languageLoader, seedProgramLoader, initialPagePath, isolated, fit, onPageChange, user, authority, localFallbackTimeoutMs, themeOverride, paused, lazyLoader, schemaPath, onUnmatchedNavigate, onSignIn, onSignOut, }: OrbPreviewProps): React__default.ReactElement;
|
|
292
|
+
declare namespace OrbPreview {
|
|
293
|
+
var displayName: string;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* OrbitalPluginHost — runs an ordinary behavior headless against the
|
|
298
|
+
* AMBIENT event bus + slot provider (Almadar Studio V4 §14 plan, Part F1).
|
|
299
|
+
*
|
|
300
|
+
* A "plugin" is not a new kind of artifact: it is a `.lolo` behavior a host
|
|
301
|
+
* chooses to run on a kernel of its own, wired to the SAME bus and slots every
|
|
302
|
+
* other UI component uses. `mode: 'mock'` runs each plugin as an offline
|
|
303
|
+
* `OrbPreview` circuit does: a client-role kernel (which also runs the plugin's
|
|
304
|
+
* `ticks {}` on the one browser tick driver) over a local kernel whose mock
|
|
305
|
+
* store is seeded by `seedMockStore` (persona roster, owner columns stamped for
|
|
306
|
+
* the dev viewer, the `@create` owner gate); `mode: 'server'` dispatches
|
|
307
|
+
* through the host's transport. Default policy denies nothing — a plugin has the full
|
|
308
|
+
* behavior power a preview has (in-memory persist, default services); `deny`
|
|
309
|
+
* is an opt-in host policy, never a default sandbox.
|
|
310
|
+
*
|
|
311
|
+
* OUTBOUND = the dispatch response. The kernel runs a dispatch's whole
|
|
312
|
+
* `listens {}` cascade before it answers (EXEC semantics), so
|
|
313
|
+
* `response.emittedEvents` carries every emit of the run, direct or cascaded,
|
|
314
|
+
* on both modes, and every trait's state is read back from the kernel after it.
|
|
315
|
+
*
|
|
316
|
+
* RELAY RULE: the plugin's `inbound[]` is its host→plugin vocabulary — one
|
|
317
|
+
* `UI:<busEvent>` bus event per row, dispatching `trigger` at
|
|
318
|
+
* `orbital`/`trait`. Anything a plugin emits under one of those SAME
|
|
319
|
+
* busEvent names (or under an inbound `trigger` name) is a relay for its
|
|
320
|
+
* own siblings' `listens {}` (the runtime's internal event bus already
|
|
321
|
+
* carries that fan-out), never a fresh request back to the host, and must
|
|
322
|
+
* NEVER be re-broadcast — doing so re-fires the very `UI:<busEvent>`
|
|
323
|
+
* listener that produced it, a synchronous self-feeding loop (verified
|
|
324
|
+
* 2026-09-04, see `docs/Almadar_UI_Gaps.md`).
|
|
325
|
+
*
|
|
326
|
+
* @packageDocumentation
|
|
327
|
+
*/
|
|
328
|
+
|
|
329
|
+
/** Verbs a host may deny. Never includes `emit` — it drives the kernel's `listens` cascade. */
|
|
330
|
+
type PluginHostDenyVerb = 'persist' | 'call-service' | 'navigate';
|
|
331
|
+
/** One bus-event → orbital-event wiring: `UI:<busEvent>` dispatches `trigger` at `orbital`/`trait`. */
|
|
332
|
+
interface PluginHostInbound {
|
|
333
|
+
busEvent: string;
|
|
334
|
+
orbital: string;
|
|
335
|
+
trait: string;
|
|
336
|
+
trigger: string;
|
|
337
|
+
}
|
|
338
|
+
interface PluginHostPlugin {
|
|
339
|
+
id: string;
|
|
340
|
+
schema: OrbitalSchema;
|
|
341
|
+
inbound: PluginHostInbound[];
|
|
342
|
+
/** When set, only these events reach the host bus; every other emit stays inside the plugin. */
|
|
343
|
+
outbound?: readonly string[];
|
|
344
|
+
}
|
|
345
|
+
interface OrbitalPluginHostProps {
|
|
346
|
+
plugins: PluginHostPlugin[];
|
|
347
|
+
/** 'mock' (default): a local kernel over in-memory mock rows — full behavior power, as any preview.
|
|
348
|
+
* 'server': dispatch through `transport` instead of a local kernel, as `AlmadarApp`. */
|
|
349
|
+
mode?: 'mock' | 'server';
|
|
350
|
+
/** Required when `mode === 'server'`. */
|
|
351
|
+
transport?: EventTransport;
|
|
352
|
+
/** OPTIONAL policy: verbs listed here are denied with a logged warning, never a throw. Default: none denied. */
|
|
353
|
+
deny?: PluginHostDenyVerb[];
|
|
354
|
+
navigate?: (path: string) => void;
|
|
355
|
+
onTransition?: (pluginId: string, orbital: string, trait: string, state: string) => void;
|
|
356
|
+
children?: ReactNode;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Reads the declared `keymap` config knob off the plugin's own trait and the
|
|
360
|
+
* live `currentState`, so `useKeyboardRouter`'s capture table always follows
|
|
361
|
+
* the trait's actual mode. Re-derives whenever the host records a new
|
|
362
|
+
* transition (the context's `tick`).
|
|
363
|
+
*
|
|
364
|
+
* `target` accepts either one target string (default `'shell'`) or a list of
|
|
365
|
+
* targets — the SAME derived entry (mode + keys) is repeated under every
|
|
366
|
+
* target, for a caller keying its table by several editor ids at once (e.g.
|
|
367
|
+
* one plugin's mode capturing keys for both `'schema'` and `'file:a.md'`).
|
|
368
|
+
*/
|
|
369
|
+
declare function useDeclaredCaptureTable(opts: {
|
|
370
|
+
pluginId: string;
|
|
371
|
+
orbital: string;
|
|
372
|
+
trait: string;
|
|
373
|
+
keymapKnob?: string;
|
|
374
|
+
target?: string | readonly string[];
|
|
375
|
+
}): KeyCaptureTable;
|
|
376
|
+
declare function useOrbitalPluginHost(): {
|
|
377
|
+
getState: (pluginId: string, orbital: string, trait: string) => TraitState | undefined;
|
|
378
|
+
lastEvent: (pluginId: string) => string | undefined;
|
|
379
|
+
errors: Readonly<Record<string, string>>;
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Mounts one headless kernel per plugin against the ambient
|
|
383
|
+
* event bus + slot provider. Renders nothing of its own besides an optional
|
|
384
|
+
* `children` passthrough — MUST be mounted inside `EventBusProvider` +
|
|
385
|
+
* `UISlotProvider`.
|
|
386
|
+
*/
|
|
387
|
+
declare function OrbitalPluginHost({ plugins, mode, transport, deny, navigate, onTransition, children, }: OrbitalPluginHostProps): React__default.ReactElement;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* TraitValueFrame — renders a trait VALUE (a trait of an installed behavior held
|
|
391
|
+
* as data, language trio) where a render tree embeds it, the data-bound sibling
|
|
392
|
+
* of `TraitFrame`'s `@trait.X` lens.
|
|
393
|
+
*
|
|
394
|
+
* The host turns the value into a runnable program (`TraitValueMountProvider`'s
|
|
395
|
+
* `mount`: a validated, resolved one-orbital wrapper — the binding's admission
|
|
396
|
+
* check), and the frame runs it through the plugin host's own runtime, bridged
|
|
397
|
+
* to the ambient event bus, inside a scoped slot provider so the trait's UI
|
|
398
|
+
* paints HERE rather than into the app's shared slots. `INIT` reaches the
|
|
399
|
+
* mounted trait through the plugin host's declared inbound table.
|
|
400
|
+
*
|
|
401
|
+
* @packageDocumentation
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
/** How the host mounts trait values: the resolver plus the plugin-host execution mode. */
|
|
405
|
+
interface TraitValueMountHost {
|
|
406
|
+
mount: (value: TraitValue) => Promise<TraitValueMountResult>;
|
|
407
|
+
/** 'mock' (default): in-memory, as a preview. 'server': through `transport`. */
|
|
408
|
+
mode?: 'mock' | 'server';
|
|
409
|
+
transport?: EventTransport;
|
|
410
|
+
/** Mounts a whole behavior value (`BehaviorValueFrame`); a host without it cannot run behavior values. */
|
|
411
|
+
mountBehavior?: (value: BehaviorRef) => Promise<BehaviorValueMountResult>;
|
|
412
|
+
/** Where a mounted behavior value's events run; in-memory when omitted. */
|
|
413
|
+
behaviorTransport?: ServerBridgeTransport;
|
|
414
|
+
}
|
|
415
|
+
declare function TraitValueMountProvider({ host, children }: {
|
|
416
|
+
host: TraitValueMountHost;
|
|
417
|
+
children: ReactNode;
|
|
418
|
+
}): React__default.ReactElement;
|
|
419
|
+
declare function TraitValueFrame({ value }: {
|
|
420
|
+
value: TraitValue;
|
|
421
|
+
}): React__default.ReactElement;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* BehaviorValueFrame — renders a whole behavior VALUE (`.lolo` type `behavior`,
|
|
425
|
+
* `behavior/ref`) where a render tree embeds it: the host mounts the program
|
|
426
|
+
* (validated at 0/0 and resolved), and the frame runs it in place through an
|
|
427
|
+
* isolated `OrbPreview` — its own event bus, in-memory navigation starting at the
|
|
428
|
+
* program's default page, the host URL untouched. A value carrying a `bridge` runs on
|
|
429
|
+
* the host's bus instead (`OrbitalPluginHost`): the bridge's `listens` reach the traits
|
|
430
|
+
* that handle them, its `emits` come back out, nothing else crosses.
|
|
431
|
+
*
|
|
432
|
+
* @packageDocumentation
|
|
433
|
+
*/
|
|
434
|
+
|
|
435
|
+
declare function BehaviorValueFrame({ value }: {
|
|
436
|
+
value: BehaviorRef;
|
|
437
|
+
}): React__default.ReactElement;
|
|
438
|
+
|
|
439
|
+
export { BehaviorValueFrame, OrbPreview, OrbitalPluginHost, ServerBridgeTransport, TraitValueFrame, TraitValueMountProvider, clearSchemaCache, useDeclaredCaptureTable, useOrbitalPluginHost, useResolvedSchema, useTraitStateMachine };
|
|
440
|
+
export type { OrbPreviewProps, OrbitalPluginHostProps, PluginHostDenyVerb, PluginHostInbound, PluginHostPlugin, ResolvedSchemaResult, SlotPatternEntry, SlotSource, TraitStateMachineResult, TraitValueMountHost, UseTraitStateMachineOptions };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { BehaviorValueFrame } from '../chunk-2QOH2HWM.js';
|
|
2
|
+
export { OrbitalPluginHost, TraitValueFrame, TraitValueMountProvider, useDeclaredCaptureTable, useOrbitalPluginHost } from '../chunk-FIW6WN23.js';
|
|
3
|
+
export { assertUniqueSlotsPerHost } from '../chunk-5QTYQTPS.js';
|
|
4
|
+
export { TraitContext, TraitProvider, useTrait, useTraitContext } from '../chunk-ZO6MXAS3.js';
|
|
5
|
+
export { EntitySchemaProvider, OrbPreview, ServerBridgeProvider, clearSchemaCache, useEntitySchema, useEntitySchemaOptional, useResolvedSchema, useServerBridge, useTraitStateMachine } from '../chunk-GYTPOFVC.js';
|
|
6
|
+
import '../chunk-YDNJLLG6.js';
|
|
7
|
+
import '../chunk-KVQS4GXU.js';
|
|
8
|
+
import '../chunk-L677XGY3.js';
|
|
9
|
+
import '../chunk-FP3WIKTC.js';
|
|
10
|
+
import '../chunk-42FY4RYA.js';
|
|
11
|
+
import '../chunk-FAJDTHWC.js';
|
|
12
|
+
import '../chunk-GAR5TQ5B.js';
|
|
13
|
+
import '../chunk-SJGJJKBY.js';
|
|
14
|
+
import '../chunk-DZ42OJQC.js';
|
|
15
|
+
export { profilerOnRender, usePerfBuffer } from '../chunk-P4LNHAFI.js';
|
|
16
|
+
import '../chunk-TZZBINQY.js';
|
|
17
|
+
import '../chunk-PC7K4SK7.js';
|
|
18
|
+
import '../chunk-VFF5OO47.js';
|
|
19
|
+
import '../chunk-DFNZUYX4.js';
|
|
20
|
+
import '../chunk-B4BU77LT.js';
|
|
21
|
+
import '../chunk-6P3MWXYE.js';
|
|
22
|
+
export { PERF_NAMESPACE, clearPerf, perfEnd, perfStart, perfTime, wrapCallbackForEvent } from '../chunk-DYEKAA4L.js';
|
|
23
|
+
import '../chunk-R5O5AUPI.js';
|
|
24
|
+
import '../chunk-L2DEKY4J.js';
|
|
25
|
+
import '../chunk-AILY3XPS.js';
|
|
26
|
+
import '../chunk-3BBUBJFF.js';
|
|
27
|
+
import '../chunk-YHMRX6YA.js';
|
|
28
|
+
import '../chunk-MBQAMMSE.js';
|
|
29
|
+
import '../chunk-A2LR6VQQ.js';
|
|
30
|
+
import '../chunk-P4ZFUQFF.js';
|
|
31
|
+
import '../chunk-G7DCAZ22.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { UISlot } from '@almadar/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Slot-host manifest types (Studio V4 §14, Part I1/I2).
|
|
5
|
+
*
|
|
6
|
+
* A "slot-host" is any shell that lays out named regions and mounts each
|
|
7
|
+
* one through `UISlotComponent` — e.g. a persona workspace declaring
|
|
8
|
+
* `sidebar`/`main`/`drawer`/... A manifest is the declarative region → slot
|
|
9
|
+
* binding for such a host: which compiler `UISlot` each region mounts, and
|
|
10
|
+
* whether the host's own stock content is replaced by slot content or the
|
|
11
|
+
* two are shown together (`UISlotComponent`'s `mode` prop). Substrate
|
|
12
|
+
* (lives in `@almadar/ui`, re-exported by `@almadar/sdk`) so any host — the
|
|
13
|
+
* studio's three persona shells or an embedding app — describes its
|
|
14
|
+
* regions the same way.
|
|
15
|
+
*
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* One host region's binding to a compiler slot. Mirrors `UISlotComponent`'s
|
|
21
|
+
* `mode` prop exactly — a manifest is just that prop's value, keyed by
|
|
22
|
+
* region, declared as data instead of scattered across JSX call sites.
|
|
23
|
+
*/
|
|
24
|
+
interface SlotHostRegion {
|
|
25
|
+
slot: UISlot;
|
|
26
|
+
mode: "replace" | "append";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A host's full region map, keyed by the host's own region ids (e.g. a
|
|
30
|
+
* persona shell's `activityBar`/`sidebar`/`main`/...). `RegionId` is left
|
|
31
|
+
* generic so each host supplies its own literal union.
|
|
32
|
+
*/
|
|
33
|
+
interface SlotHostManifest<RegionId extends string = string> {
|
|
34
|
+
regions: Record<RegionId, SlotHostRegion>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Guards the invariant a slot-host manifest depends on: each `UISlot` may
|
|
38
|
+
* be mounted by at most one region. Two regions sharing a slot would mount
|
|
39
|
+
* `UISlotComponent` twice for the same slot — the second mount clears/reads
|
|
40
|
+
* the same context entry the first one owns, so one of the two regions
|
|
41
|
+
* silently loses its content (or, for a portal slot, double-portals it).
|
|
42
|
+
* Throws naming the two offending regions so the host can find the
|
|
43
|
+
* conflict without re-deriving it from the manifest.
|
|
44
|
+
*/
|
|
45
|
+
declare function assertUniqueSlotsPerHost<RegionId extends string>(manifest: SlotHostManifest<RegionId>): void;
|
|
46
|
+
|
|
47
|
+
export { assertUniqueSlotsPerHost as b };
|
|
48
|
+
export type { SlotHostManifest as S, SlotHostRegion as a };
|