@almadar/shell-web 0.0.0-stage → 1.0.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-CO_iASBn.d.ts +195 -0
- package/dist/AvlGlyph-EPJKFEO3.js +6 -0
- package/dist/AvlStateMachine-RKZIKNGC.js +9 -0
- package/dist/AvlTransitionDetail-63SD6GZF.js +11 -0
- package/dist/AvlTransitionExplainer-ZBTLOM3T.js +12 -0
- package/dist/BehaviorView-YS5G4GNB.js +11 -0
- package/dist/Canvas3DHost-BkZQB5l2.d.ts +552 -0
- package/dist/EventBusProvider-BFFHfN4O.d.ts +296 -0
- package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
- package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
- package/dist/FlowCanvas-AUMTWMNG.js +26 -0
- package/dist/GameAudioProvider-ceM_n0ey.d.ts +90 -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-CcxGYtlr.d.ts +33 -0
- package/dist/LayersPanel-M2LHWUFF.js +6 -0
- package/dist/ModuleCard-QHDGK5XK.js +7 -0
- package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
- package/dist/OrbInspector-QCPEPUPH.js +26 -0
- package/dist/Select-B-iDdnvE.d.ts +185 -0
- package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
- package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
- package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
- package/dist/UISlotRenderer-C7WWOK43.js +26 -0
- package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
- package/dist/auth/browser/index.d.ts +2 -0
- package/dist/auth/browser/index.js +2 -0
- package/dist/auth/react/index.d.ts +56 -0
- package/dist/auth/react/index.js +157 -0
- package/dist/avl/index.css +1756 -0
- package/dist/avl/index.d.ts +2248 -0
- package/dist/avl/index.js +2693 -0
- package/dist/avl-3d-context-BycmO6tG.d.ts +201 -0
- package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
- package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
- package/dist/chunk-3BBUBJFF.js +339 -0
- package/dist/chunk-3S54FWRC.js +131 -0
- package/dist/chunk-3VZ36ZKO.js +775 -0
- package/dist/chunk-4T3P43NS.js +1133 -0
- package/dist/chunk-4YXBKHHM.js +11488 -0
- package/dist/chunk-57DC34LY.js +525 -0
- package/dist/chunk-5QTYQTPS.js +15 -0
- package/dist/chunk-A2LR6VQQ.js +349 -0
- package/dist/chunk-AB3X7QTE.js +505 -0
- package/dist/chunk-AE7VCQB6.js +561 -0
- package/dist/chunk-AGXD77SL.js +98 -0
- package/dist/chunk-AU7O65OX.js +66 -0
- package/dist/chunk-CPLN6NBQ.js +701 -0
- package/dist/chunk-DZBQA2OW.js +176 -0
- package/dist/chunk-E6KA4J6N.js +227 -0
- package/dist/chunk-EOWMARUB.js +16 -0
- package/dist/chunk-G7DCAZ22.js +19 -0
- package/dist/chunk-GFXCPUMX.js +1334 -0
- package/dist/chunk-HH5KSMH5.js +311 -0
- package/dist/chunk-ILQXJ2AR.js +280 -0
- package/dist/chunk-ILZ7ORX7.js +432 -0
- package/dist/chunk-K4MOPSEL.js +674 -0
- package/dist/chunk-LHP2TK7O.js +47587 -0
- package/dist/chunk-P4ZFUQFF.js +93 -0
- package/dist/chunk-PCR37T3U.js +296 -0
- package/dist/chunk-PRXQGGCO.js +580 -0
- package/dist/chunk-REXYVBUO.js +191 -0
- package/dist/chunk-ROICKAU7.js +24 -0
- package/dist/chunk-SP5CDJ6K.js +338 -0
- package/dist/chunk-TUPZWTRE.js +1051 -0
- package/dist/chunk-TXAUOLWZ.js +490 -0
- package/dist/chunk-TZZBINQY.js +82 -0
- package/dist/chunk-UTDC2NEA.js +14 -0
- package/dist/chunk-UU57VNS2.js +1053 -0
- package/dist/chunk-UXLE3IPR.js +421 -0
- package/dist/chunk-VO2TTLS5.js +94 -0
- package/dist/chunk-X3DMMX27.js +11 -0
- package/dist/chunk-YHMRX6YA.js +455 -0
- package/dist/components/index.css +1756 -0
- package/dist/components/index.d.ts +11299 -0
- package/dist/components/index.js +1110 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.js +8 -0
- package/dist/core.d.ts +2599 -0
- package/dist/core.js +3 -0
- package/dist/design-classes/index.cjs +431 -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 +399 -0
- package/dist/emojiItems-QGSNAABW.js +20 -0
- package/dist/fx-CmQjnHmT.d.ts +371 -0
- package/dist/hooks/index.d.ts +971 -0
- package/dist/hooks/index.js +8 -0
- package/dist/index.d.ts +408 -0
- package/dist/index.js +178 -0
- package/dist/katexPlugin-FA7NX4PE.css +1161 -0
- package/dist/katexPlugin-NCDKOOQY.js +2 -0
- package/dist/kernel-client-TZKGHJRY.js +516 -0
- package/dist/kernel-wire-wNdAPfhJ.d.ts +88 -0
- package/dist/lib/index.d.ts +602 -0
- package/dist/lib/index.js +1289 -0
- package/dist/paintDispatch-CuJLsr9Y.d.ts +688 -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-X5YWKXO5.js +136 -0
- package/dist/providers/index.css +1756 -0
- package/dist/providers/index.d.ts +355 -0
- package/dist/providers/index.js +29 -0
- package/dist/renderer/index.d.ts +465 -0
- package/dist/renderer/index.js +4 -0
- package/dist/runtime/index.css +1756 -0
- package/dist/runtime/index.d.ts +239 -0
- package/dist/runtime/index.js +28 -0
- package/dist/slot-host-CPzrxLo9.d.ts +48 -0
- package/dist/ssr/index.cjs +9739 -0
- package/dist/ssr/index.d.cts +464 -0
- package/dist/ssr/index.d.ts +464 -0
- package/dist/ssr/index.js +9703 -0
- package/dist/storage/browser/index.d.ts +1 -0
- package/dist/storage/browser/index.js +2 -0
- package/dist/test-support.d.ts +42 -0
- package/dist/test-support.js +181 -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 +3908 -0
- package/dist/useUISlots-CiobNFGb.d.ts +211 -0
- package/dist/verification-C5pTeMJv.d.ts +66 -0
- package/dist/verificationRegistry-CVrcxG1s.d.ts +122 -0
- package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
- package/index.css +199 -0
- package/package.json +273 -3
- package/src/core/lib/band-shapes.json +7 -0
- package/src/core/locales/ar.json +1276 -0
- package/src/core/locales/en.json +1276 -0
- package/src/core/locales/index.ts +54 -0
- package/src/core/locales/sl.json +1276 -0
- package/src/core/tokens/native-tokens.json +369 -0
- package/tailwind-compile.cjs +29 -0
- package/tailwind-preset.cjs +1020 -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,239 @@
|
|
|
1
|
+
import { OrbitalSchema, EventPayload, OrbitalDefinition, SchemaMetadata, PersistenceAdapter, ServiceParams, PatternConfig, ResolvedPatternProps, EventSource, SExpr, EntityData, ViewerAuthority } from '@almadar/core';
|
|
2
|
+
import { TraitState } from '@almadar/shell-runtime/client/trait-types';
|
|
3
|
+
import { EventTransport, AccessTokenProvider } from '@almadar/shell-runtime/client/EventTransport';
|
|
4
|
+
export { AccessTokenProvider } from '@almadar/shell-runtime/client/EventTransport';
|
|
5
|
+
import '../verification-C5pTeMJv.js';
|
|
6
|
+
import { S as ServerBridgeTransport } from '../ServerBridge-Bqsj-lOU.js';
|
|
7
|
+
import { EntityBindingSource, AwaitingSkeletonSource } from '../providers/index.js';
|
|
8
|
+
export { a as EntitySchemaContextValue, b as EntitySchemaProvider, c as EntitySchemaProviderProps, d as ServerBridgeContextValue, e as ServerBridgeProvider, u as useEntitySchema, f as useEntitySchemaOptional, g as useServerBridge } from '../ServerBridge-Bqsj-lOU.js';
|
|
9
|
+
import { useUISlots } from '../context/index.js';
|
|
10
|
+
import { PageCircuit } from '@almadar/core/kernel-wire';
|
|
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 { HostSignInRequest, HostSignInAnswer, HostConsentRequest, HostConsentAnswer } from '@almadar/shell-runtime/kernel/host';
|
|
14
|
+
import React__default from 'react';
|
|
15
|
+
import { SchemaLoader } from '@almadar/shell-runtime';
|
|
16
|
+
import { KernelLoader } from '../providers/index.js';
|
|
17
|
+
export { S as SlotHostManifest, a as SlotHostRegion, b as assertUniqueSlotsPerHost } from '../slot-host-CPzrxLo9.js';
|
|
18
|
+
export { p as profilerOnRender, u as usePerfBuffer } from '../perf-CKiBKbkw.js';
|
|
19
|
+
import '../useUISlots-CiobNFGb.js';
|
|
20
|
+
import '@almadar/core/patterns';
|
|
21
|
+
import '@almadar/shell-browser/kv';
|
|
22
|
+
|
|
23
|
+
/** A program's type-contract stamp: the kernel refuses to register a program carrying neither field. */
|
|
24
|
+
type ProgramStamp = Pick<OrbitalSchema, 'resolved' | 'typeContractVersion' | 'theme' | 'themes' | 'locales' | 'messages'>;
|
|
25
|
+
/** The kernel's answer for the page: nothing mounts until it is ready. */
|
|
26
|
+
type CircuitState = {
|
|
27
|
+
status: 'pending';
|
|
28
|
+
} | {
|
|
29
|
+
status: 'ready';
|
|
30
|
+
page: PageCircuit;
|
|
31
|
+
} | {
|
|
32
|
+
status: 'failed';
|
|
33
|
+
error: Error;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
interface TraitStateMachineResult {
|
|
37
|
+
/** Current state for each trait. */
|
|
38
|
+
traitStates: Map<string, TraitState>;
|
|
39
|
+
getTraitState: (traitName: string) => TraitState | undefined;
|
|
40
|
+
/** Live per-trait binding surface for `EntityBindingContext`. */
|
|
41
|
+
entityBindingSource: EntityBindingSource;
|
|
42
|
+
/** Awaiting-server skeletons for `AwaitingSkeletonContext`. */
|
|
43
|
+
awaitingSkeletonSource: AwaitingSkeletonSource;
|
|
44
|
+
/** The kernel's answer for the page: pending until it answers, failed when it cannot. Nothing mounts before it is ready. */
|
|
45
|
+
circuit: CircuitState;
|
|
46
|
+
/** The theme key the server bound to this session with `theme/set`; `undefined` when none is and the declared themes apply. */
|
|
47
|
+
sessionTheme: string | undefined;
|
|
48
|
+
}
|
|
49
|
+
interface UseTraitStateMachineOptions {
|
|
50
|
+
/** The page the kernel answers the circuit of; absent: the initial page (or the page of `routePath`). */
|
|
51
|
+
page?: string;
|
|
52
|
+
onEventProcessed?: (eventKey: string, payload?: EventPayload) => void;
|
|
53
|
+
navigate?: (path: string, params?: Record<string, string>, crumb?: string) => void;
|
|
54
|
+
navigateBack?: () => void;
|
|
55
|
+
initPayload?: EventPayload;
|
|
56
|
+
/** The mounted page's identity; with `initPayload` it keys the once-per-mount lifecycle guard (Runtime Spec Clause 4.1). */
|
|
57
|
+
mountKey?: string;
|
|
58
|
+
/** The route the page is opened at; the kernel's mounts for it are what the hook runs (EXEC-ENDPOINT-3). */
|
|
59
|
+
routePath?: string;
|
|
60
|
+
/** The program's orbitals: the kernel is built from them. */
|
|
61
|
+
orbitals: readonly OrbitalDefinition[];
|
|
62
|
+
/** The program's `_metadata` (a compiled client program's operator sites and dispatch facts), handed to the kernel. */
|
|
63
|
+
metadata?: SchemaMetadata;
|
|
64
|
+
/** The program's type-contract stamp, carried into the browser kernel's registration. */
|
|
65
|
+
stamp?: ProgramStamp;
|
|
66
|
+
/** Caller-owned transport (server bridge). Omitted + `persistence` set =
|
|
67
|
+
* offline preview (plan G7); omitted + no `persistence` = fully local,
|
|
68
|
+
* nothing ever posts. */
|
|
69
|
+
transport?: EventTransport;
|
|
70
|
+
carriesCircuitState?: boolean;
|
|
71
|
+
/** Hold every dispatch until the transport's topology is known. */
|
|
72
|
+
awaitTopology?: boolean;
|
|
73
|
+
persistence?: PersistenceAdapter;
|
|
74
|
+
/** The browser store for `[persistent: x, browser]` entities (see `useCircuitKernel`). */
|
|
75
|
+
browserStore?: PersistenceAdapter;
|
|
76
|
+
callService?: (service: string, action: string, params?: ServiceParams) => Promise<EventPayload>;
|
|
77
|
+
debug?: boolean;
|
|
78
|
+
logContext?: {
|
|
79
|
+
behavior?: string;
|
|
80
|
+
orbitalName?: string;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
declare function useTraitStateMachine(uiSlots: ReturnType<typeof useUISlots>, options: UseTraitStateMachineOptions): TraitStateMachineResult;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* One pattern within a slot's accumulated render-ui set, plus any
|
|
87
|
+
* caller-supplied props that should be merged on top.
|
|
88
|
+
*/
|
|
89
|
+
interface SlotPatternEntry {
|
|
90
|
+
/** `PatternConfig` normally; a bare `@trait.X` string is the
|
|
91
|
+
* G-RUNTIME-025 whole-slot payload (`(render-ui main "@trait.X")`),
|
|
92
|
+
* which `useSlotFlush`'s unwrap routes as a TraitFrame child reference. */
|
|
93
|
+
pattern: PatternConfig | string;
|
|
94
|
+
props: ResolvedPatternProps;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The originating trait + state for a slot write. Embedded in the
|
|
98
|
+
* `useUISlots` SlotContent's metadata so observers (verifier, debugger,
|
|
99
|
+
* cross-orbital tracer) can attribute every render to the trait that
|
|
100
|
+
* caused it.
|
|
101
|
+
*/
|
|
102
|
+
interface SlotSource extends EventSource {
|
|
103
|
+
trait: string;
|
|
104
|
+
state: string;
|
|
105
|
+
transition: string;
|
|
106
|
+
effects: SExpr[];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface OrbPreviewProps {
|
|
110
|
+
/**
|
|
111
|
+
* The orbital schema. Accepts a JSON string or an `OrbitalSchema` object
|
|
112
|
+
* from `@almadar/core` (the validated `.orb` program type).
|
|
113
|
+
*/
|
|
114
|
+
schema: string | OrbitalSchema;
|
|
115
|
+
/**
|
|
116
|
+
* Mock entity rows keyed by entity name. The `EntityData` type from
|
|
117
|
+
* `@almadar/core` is `Record<string, EntityRow[]>` where each row is a
|
|
118
|
+
* `{ id?: string } & Record<string, FieldValue>`.
|
|
119
|
+
*/
|
|
120
|
+
mockData?: EntityData;
|
|
121
|
+
/** Preview container height. Default: '400px'. */
|
|
122
|
+
height?: string;
|
|
123
|
+
/**
|
|
124
|
+
* What the preview's slots lay out against. `contained` (default): the host's box, so overlays stay inside it.
|
|
125
|
+
* `page`: the preview is the host page (a served app), so overlays take the page's fixed layout and the dock pushes
|
|
126
|
+
* the body.
|
|
127
|
+
*/
|
|
128
|
+
frame?: 'contained' | 'page';
|
|
129
|
+
/** CSS class for the outer container. */
|
|
130
|
+
className?: string;
|
|
131
|
+
/** Server URL for dual execution (e.g. "/api/orbitals"). When set, events are forwarded to the server. */
|
|
132
|
+
serverUrl?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Custom transport for in-process execution. Mutually exclusive with
|
|
135
|
+
* `serverUrl`. Used by an in-process host to invoke
|
|
136
|
+
* `OrbitalServerRuntime.processOrbitalEvent` directly without HTTP.
|
|
137
|
+
*/
|
|
138
|
+
transport?: ServerBridgeTransport;
|
|
139
|
+
/** Bearer token for `serverUrl` requests (see `ServerBridgeProviderProps.getAccessToken`). */
|
|
140
|
+
getAccessToken?: AccessTokenProvider;
|
|
141
|
+
/**
|
|
142
|
+
* Loads the initialised `@almadar/kernel`. Given, the preview runs its circuits on the kernel engine and installs the
|
|
143
|
+
* render evaluator from it (`KernelEngineProvider`); keep the function's identity stable across renders. Absent, the
|
|
144
|
+
* preview runs under whatever engine the host's own `KernelEngineProvider` selects.
|
|
145
|
+
*/
|
|
146
|
+
kernelLoader?: KernelLoader;
|
|
147
|
+
/**
|
|
148
|
+
* How long (ms) to wait for the server bridge to connect before assuming
|
|
149
|
+
* it's unreachable and falling back to local-only execution. Default
|
|
150
|
+
* 5000 (unchanged unless you pass this). Widen it for a caller whose
|
|
151
|
+
* schema is large enough that the server's first `register()` genuinely
|
|
152
|
+
* takes longer than 5s (e.g. a 53-orbital organism measured ~14.5s in
|
|
153
|
+
* production) — see `TraitInitializer`'s `localFallbackTimeoutMs` doc.
|
|
154
|
+
*/
|
|
155
|
+
localFallbackTimeoutMs?: number;
|
|
156
|
+
/**
|
|
157
|
+
* Initial page path to render (e.g. `/deals`). Resolves against the
|
|
158
|
+
* schema's `pages[]` to seed `currentPage` so the right orbital's traits
|
|
159
|
+
* mount on first render. Without this the playground falls back to the
|
|
160
|
+
* schema's first page binding (gap #13 Phase 5). runtime-verify uses this
|
|
161
|
+
* to walk DealCreate, NoteCompose, etc. on their owning pages.
|
|
162
|
+
*/
|
|
163
|
+
initialPagePath?: string;
|
|
164
|
+
/**
|
|
165
|
+
* What the host's auth provider has resolved the viewer to be. An
|
|
166
|
+
* `access: authenticated` page mounts only on `authenticated`; any other
|
|
167
|
+
* resolved value sends the viewer to the app's `signIn` route. Omitted → the
|
|
168
|
+
* host offers no sign-in (`unavailable`).
|
|
169
|
+
*/
|
|
170
|
+
authority?: ViewerAuthority;
|
|
171
|
+
/**
|
|
172
|
+
* Sandbox mode, for previews embedded in a host app (e.g. the studio
|
|
173
|
+
* canvas): the event bus stays context-local, navigation stays in memory
|
|
174
|
+
* (the host URL/history are never touched), in-app links are always
|
|
175
|
+
* intercepted, and external links open a new tab. Default false
|
|
176
|
+
* (standalone previews own the global bridge and sync `?page=`).
|
|
177
|
+
*/
|
|
178
|
+
isolated?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Scale the rendered content down (never up) so it fits the container
|
|
181
|
+
* without scrollbars. For fixed-intrinsic-size content (game canvases);
|
|
182
|
+
* leave off for flow layouts, which should keep their internal scroll.
|
|
183
|
+
* `'content'`: fit the rendered component itself (not the page around it)
|
|
184
|
+
* and center it — a thumbnail of one behavior.
|
|
185
|
+
*/
|
|
186
|
+
fit?: boolean | 'content';
|
|
187
|
+
/**
|
|
188
|
+
* Called with the page path on every in-preview page switch (link click,
|
|
189
|
+
* navigate effect, `navigatesTo`), for a host that tracks the page in its
|
|
190
|
+
* own router. When set, it replaces the built-in `?page=` URL sync.
|
|
191
|
+
*/
|
|
192
|
+
onPageChange?: (path: string) => void;
|
|
193
|
+
/**
|
|
194
|
+
* A registry theme key (`"<base>-<light|dark>"`) that replaces every
|
|
195
|
+
* orbital's declared theme — a host's explicit theme pick (the playground
|
|
196
|
+
* picker). Omitted → each page renders in its own orbital's theme.
|
|
197
|
+
*/
|
|
198
|
+
themeOverride?: string;
|
|
199
|
+
/** Hold the preview's client ticks stopped (a canvas card the person has not played); clearing it resumes them. */
|
|
200
|
+
paused?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Loads the behavior behind a `lazyPages` entry (`uses lazy`) when its page
|
|
203
|
+
* is opened. Without it, opening a lazy page shows a load error.
|
|
204
|
+
*/
|
|
205
|
+
lazyLoader?: SchemaLoader;
|
|
206
|
+
/** Where `schema` was loaded from — a lazy page's `orbRef` resolves against it. */
|
|
207
|
+
schemaPath?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Called with a path that matches none of this schema's pages — a lazily
|
|
210
|
+
* loaded behavior hands links back to the schema that imported it.
|
|
211
|
+
*/
|
|
212
|
+
onUnmatchedNavigate?: (path: string) => void;
|
|
213
|
+
/**
|
|
214
|
+
* The host's own sign-in (`HOST_SIGN_IN_ROUTE`, `/login`): navigating there —
|
|
215
|
+
* including an `access: authenticated` page sending its viewer to
|
|
216
|
+
* `signIn: "/login"` — calls this with the return path instead of routing to a
|
|
217
|
+
* page. Omitted → the host offers no sign-in and nothing happens.
|
|
218
|
+
*/
|
|
219
|
+
onSignIn?: (returnTo?: string) => void;
|
|
220
|
+
/**
|
|
221
|
+
* The host's session sign-out, run when the circuit asks `(auth/sign-out)`
|
|
222
|
+
* (a `host-ask` client effect). Omitted → the host offers no sign-out and the ask is refused by name.
|
|
223
|
+
*/
|
|
224
|
+
onSignOut?: () => void;
|
|
225
|
+
/**
|
|
226
|
+
* The host's own sign-in, run when the circuit asks `(auth/sign-in { method … })` (a `host-ask` client effect whose
|
|
227
|
+
* answer returns to the asking trait). Omitted → the host offers no sign-in and the ask fails `unavailable`.
|
|
228
|
+
*/
|
|
229
|
+
onSignInAsk?: (request: HostSignInRequest) => Promise<HostSignInAnswer>;
|
|
230
|
+
/** Answers `auth/consent` in place of the popup the web host opens: the shell's own authorize window. */
|
|
231
|
+
onConsentAsk?: (request: HostConsentRequest) => Promise<HostConsentAnswer>;
|
|
232
|
+
}
|
|
233
|
+
declare function OrbPreview({ schema, mockData, height, frame, className, serverUrl, transport, getAccessToken, kernelLoader, initialPagePath, isolated, fit, onPageChange, authority, localFallbackTimeoutMs, themeOverride, paused, lazyLoader, schemaPath, onUnmatchedNavigate, onSignIn, onSignOut, onSignInAsk, onConsentAsk, }: OrbPreviewProps): React__default.ReactElement;
|
|
234
|
+
declare namespace OrbPreview {
|
|
235
|
+
var displayName: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export { OrbPreview, ServerBridgeTransport, useTraitStateMachine };
|
|
239
|
+
export type { OrbPreviewProps, SlotPatternEntry, SlotSource, TraitStateMachineResult, UseTraitStateMachineOptions };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { assertUniqueSlotsPerHost } from '../chunk-5QTYQTPS.js';
|
|
3
|
+
export { EntitySchemaProvider, OrbPreview, ServerBridgeProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTraitStateMachine } from '../chunk-LHP2TK7O.js';
|
|
4
|
+
import '../chunk-57DC34LY.js';
|
|
5
|
+
import '../chunk-SP5CDJ6K.js';
|
|
6
|
+
import '../chunk-CPLN6NBQ.js';
|
|
7
|
+
import '../chunk-HH5KSMH5.js';
|
|
8
|
+
import '../chunk-REXYVBUO.js';
|
|
9
|
+
import '../chunk-AGXD77SL.js';
|
|
10
|
+
import '../chunk-TXAUOLWZ.js';
|
|
11
|
+
import '../chunk-AB3X7QTE.js';
|
|
12
|
+
import '../chunk-DZBQA2OW.js';
|
|
13
|
+
export { profilerOnRender, usePerfBuffer } from '../chunk-TUPZWTRE.js';
|
|
14
|
+
import '../chunk-TZZBINQY.js';
|
|
15
|
+
import '../chunk-4T3P43NS.js';
|
|
16
|
+
import '../chunk-PCR37T3U.js';
|
|
17
|
+
import '../chunk-UXLE3IPR.js';
|
|
18
|
+
import '../chunk-ILZ7ORX7.js';
|
|
19
|
+
export { PERF_NAMESPACE, clearPerf, perfEnd, perfStart, perfTime, wrapCallbackForEvent } from '../chunk-3VZ36ZKO.js';
|
|
20
|
+
import '../chunk-PRXQGGCO.js';
|
|
21
|
+
import '../chunk-VO2TTLS5.js';
|
|
22
|
+
import '../chunk-AE7VCQB6.js';
|
|
23
|
+
import '../chunk-3BBUBJFF.js';
|
|
24
|
+
import '../chunk-YHMRX6YA.js';
|
|
25
|
+
import '../chunk-4YXBKHHM.js';
|
|
26
|
+
import '../chunk-A2LR6VQQ.js';
|
|
27
|
+
import '../chunk-P4ZFUQFF.js';
|
|
28
|
+
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 };
|