@almadar/shell-web 1.0.0 → 1.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.
Files changed (70) hide show
  1. package/dist/AvlGlyph-PIXU6QH5.js +5 -0
  2. package/dist/AvlStateMachine-CKGMECMG.js +8 -0
  3. package/dist/{AvlTransitionDetail-63SD6GZF.js → AvlTransitionDetail-QZX6G5KJ.js} +4 -5
  4. package/dist/AvlTransitionExplainer-26WLEIC6.js +11 -0
  5. package/dist/BehaviorView-JLZ4PKWY.js +10 -0
  6. package/dist/{FileTree-BCFnBEuQ.d.ts → FileTree-B3GDAjaQ.d.ts} +131 -4
  7. package/dist/{FlowCanvas-AUMTWMNG.js → FlowCanvas-RPII4V24.js} +10 -13
  8. package/dist/{FlowCanvas-3JRMNJLV.css → FlowCanvas-VWUPMBKB.css} +189 -191
  9. package/dist/{GameAudioProvider-ceM_n0ey.d.ts → GameAudioProvider-D7wo5ryN.d.ts} +1 -1
  10. package/dist/{KernelEngineContext-CcxGYtlr.d.ts → KernelEngineContext-CPeWQMAz.d.ts} +15 -2
  11. package/dist/ModuleCard-NJD6JQGD.js +6 -0
  12. package/dist/{OrbInspector-QCPEPUPH.js → OrbInspector-OWWKPOBF.js} +10 -13
  13. package/dist/{OrbInspector-MHLJ6OEE.css → OrbInspector-VMTMZHNQ.css} +189 -191
  14. package/dist/{Select-B-iDdnvE.d.ts → Select-C2Uq6t86.d.ts} +1 -1
  15. package/dist/{UISlotRenderer-KVFO6J7R.css → UISlotRenderer-BIS6KT7T.css} +189 -191
  16. package/dist/{UISlotRenderer-C7WWOK43.js → UISlotRenderer-PY7FIJXN.js} +10 -13
  17. package/dist/avl/index.css +189 -191
  18. package/dist/avl/index.d.ts +19 -7
  19. package/dist/avl/index.js +157 -26
  20. package/dist/{chunk-TUPZWTRE.js → chunk-2WGR4TDJ.js} +464 -35
  21. package/dist/{chunk-SP5CDJ6K.js → chunk-4YJ53G7S.js} +3 -3
  22. package/dist/{chunk-HH5KSMH5.js → chunk-7N6ZPHQ5.js} +1 -1
  23. package/dist/{chunk-CPLN6NBQ.js → chunk-AGVSO4WY.js} +2 -3
  24. package/dist/{chunk-UXLE3IPR.js → chunk-FAKU5F62.js} +205 -4
  25. package/dist/{chunk-TXAUOLWZ.js → chunk-M74BCDBQ.js} +1 -1
  26. package/dist/{chunk-LHP2TK7O.js → chunk-MS4K3K2R.js} +2908 -4574
  27. package/dist/{chunk-K4MOPSEL.js → chunk-OWNG4JZI.js} +3 -4
  28. package/dist/{chunk-AB3X7QTE.js → chunk-PRLHKBXG.js} +1 -2
  29. package/dist/{chunk-X3DMMX27.js → chunk-VHC2M26B.js} +1 -1
  30. package/dist/{chunk-E6KA4J6N.js → chunk-VUIACGDU.js} +3 -4
  31. package/dist/{chunk-ROICKAU7.js → chunk-YYIHRIDH.js} +1 -1
  32. package/dist/{chunk-3VZ36ZKO.js → chunk-ZDRDJKYB.js} +5 -2
  33. package/dist/components/index.css +189 -191
  34. package/dist/components/index.d.ts +417 -173
  35. package/dist/components/index.js +14 -17
  36. package/dist/core.d.ts +3 -3
  37. package/dist/{fx-CmQjnHmT.d.ts → fx-Br8zjvu9.d.ts} +6 -6
  38. package/dist/index.d.ts +4 -0
  39. package/dist/index.js +2 -2
  40. package/dist/{kernel-client-TZKGHJRY.js → kernel-client-JW6OH5FX.js} +24 -3
  41. package/dist/{kernel-wire-wNdAPfhJ.d.ts → kernel-wire-DGAySGhX.d.ts} +7 -0
  42. package/dist/lib/index.d.ts +2 -3
  43. package/dist/lib/index.js +2 -3
  44. package/dist/providers/index.css +189 -191
  45. package/dist/providers/index.d.ts +6 -8
  46. package/dist/providers/index.js +10 -14
  47. package/dist/runtime/index.css +189 -191
  48. package/dist/runtime/index.d.ts +6 -1
  49. package/dist/runtime/index.js +10 -13
  50. package/dist/test-support.js +2 -2
  51. package/dist/{paintDispatch-CuJLsr9Y.d.ts → verificationRegistry-oopV1J1n.d.ts} +127 -15
  52. package/package.json +8 -36
  53. package/dist/AvlGlyph-EPJKFEO3.js +0 -6
  54. package/dist/AvlStateMachine-RKZIKNGC.js +0 -9
  55. package/dist/AvlTransitionExplainer-ZBTLOM3T.js +0 -12
  56. package/dist/BehaviorView-YS5G4GNB.js +0 -11
  57. package/dist/Canvas3DHost-BkZQB5l2.d.ts +0 -552
  58. package/dist/ModuleCard-QHDGK5XK.js +0 -7
  59. package/dist/avl-3d-context-BycmO6tG.d.ts +0 -201
  60. package/dist/avl-schema-parser-CtJxJ9KU.d.ts +0 -132
  61. package/dist/avl-zoom-state-CKMVuBFg.d.ts +0 -17
  62. package/dist/chunk-4T3P43NS.js +0 -1133
  63. package/dist/chunk-DZBQA2OW.js +0 -176
  64. package/dist/chunk-EOWMARUB.js +0 -16
  65. package/dist/chunk-GFXCPUMX.js +0 -1334
  66. package/dist/chunk-ILZ7ORX7.js +0 -432
  67. package/dist/three/index.css +0 -503
  68. package/dist/three/index.d.ts +0 -1185
  69. package/dist/three/index.js +0 -3908
  70. package/dist/verificationRegistry-CVrcxG1s.d.ts +0 -122
@@ -1,201 +0,0 @@
1
- import * as React from 'react';
2
- import { QuadraticBezierCurve3 } from 'three';
3
-
4
- /**
5
- * avl-3d-layout.ts
6
- *
7
- * Pure math utilities for 3D positioning of AVL visualization nodes.
8
- * The 3D equivalent of avl-layout.ts (2D positioning helpers).
9
- *
10
- * @packageDocumentation
11
- */
12
-
13
- interface Position3D {
14
- x: number;
15
- y: number;
16
- z: number;
17
- }
18
- interface ExprTreeNode3D {
19
- label: string;
20
- type: 'operator' | 'literal' | 'binding';
21
- children?: ExprTreeNode3D[];
22
- }
23
- interface TreeLayoutResult {
24
- node: ExprTreeNode3D;
25
- position: Position3D;
26
- }
27
- /**
28
- * Theme roles for the 3D scenes. three.js cannot evaluate CSS, so scenes read
29
- * these through `useAvl3DPalette()` (resolved against the active theme).
30
- */
31
- declare const AVL_3D_COLORS: {
32
- readonly exprOperatorUnknown: "var(--color-muted-foreground)";
33
- readonly exprBinding: "var(--color-accent)";
34
- readonly exprLiteral: "var(--color-muted-foreground)";
35
- readonly effectUi: string;
36
- readonly effectData: string;
37
- readonly effectCommunication: string;
38
- readonly effectLifecycle: string;
39
- readonly effectControl: string;
40
- readonly effectAsync: string;
41
- readonly effectCompute: string;
42
- readonly effectSystem: string;
43
- readonly effectUnknown: "var(--color-muted-foreground)";
44
- readonly fieldParticle: "var(--color-foreground)";
45
- readonly lightAmbient: "var(--color-info)";
46
- readonly lightDirectional: string;
47
- readonly lightFill: string;
48
- readonly "op:arithmetic": string;
49
- readonly "op:comparison": string;
50
- readonly "op:logic": string;
51
- readonly "op:control": string;
52
- readonly "op:effect": string;
53
- readonly "op:collection": string;
54
- readonly "op:std-math": string;
55
- readonly "op:std-str": string;
56
- readonly "op:std-array": string;
57
- readonly "op:std-object": string;
58
- readonly "op:std-validate": string;
59
- readonly "op:std-json": string;
60
- readonly "op:std-csv": string;
61
- readonly "op:std-time": string;
62
- readonly "op:std-format": string;
63
- readonly "op:std-i18n": string;
64
- readonly "op:std-prob": string;
65
- readonly "op:std-os": string;
66
- readonly "op:std-kv": string;
67
- readonly "op:std-mem": string;
68
- readonly "op:std-mem-read": string;
69
- readonly "op:std-kernel": string;
70
- readonly "op:std-kernel-read": string;
71
- readonly "op:std-ffi": string;
72
- readonly "op:std-browser": string;
73
- readonly "op:std-composition": string;
74
- readonly "op:std-vec": string;
75
- readonly "op:std-geo": string;
76
- readonly "op:std-grid": string;
77
- readonly "op:std-anim": string;
78
- readonly "op:std-ease": string;
79
- readonly "op:std-noise": string;
80
- readonly "op:std-path": string;
81
- readonly "op:std-llm": string;
82
- readonly "op:std-workspace": string;
83
- readonly "op:std-session": string;
84
- readonly "op:std-trace": string;
85
- readonly "op:std-audio": string;
86
- readonly "op:std-auth": string;
87
- readonly "op:std-behavior": string;
88
- readonly "op:std-behavior-value": string;
89
- readonly "op:std-program": string;
90
- readonly "op:std-codec": string;
91
- readonly orbitalSphere: "var(--color-card)";
92
- readonly orbitalRim: "var(--color-info)";
93
- readonly entityCore: "var(--color-warning)";
94
- readonly entityCoreGlow: string;
95
- readonly traitOrbit: "var(--color-info)";
96
- readonly traitOrbitHighlight: "var(--color-primary)";
97
- readonly stateIdle: "var(--color-muted)";
98
- readonly stateEdge: "var(--color-info)";
99
- readonly stateActive: "var(--color-primary)";
100
- readonly transitionArc: "var(--color-muted-foreground)";
101
- readonly transitionArcHover: "var(--color-primary)";
102
- readonly guardPass: "var(--color-success)";
103
- readonly guardFail: "var(--color-error)";
104
- readonly crossWire: "var(--color-accent)";
105
- readonly crossWireGlow: string;
106
- readonly pagePortal: "var(--color-success)";
107
- readonly background: "var(--color-background)";
108
- readonly backgroundSurface: "var(--color-card)";
109
- readonly fog: "var(--color-background)";
110
- readonly sparkle: "var(--color-info)";
111
- readonly sparkleWarm: "var(--color-warning)";
112
- readonly persistencePersistent: "var(--color-info)";
113
- readonly persistenceRuntime: "var(--color-success)";
114
- readonly persistenceUnknown: "var(--color-muted-foreground)";
115
- };
116
- /**
117
- * Positions N nodes on a golden-ratio spiral in the XZ plane (y=0).
118
- * Used as initial positions for the force-directed layout.
119
- */
120
- declare function goldenSpiralPositions(count: number, baseRadius: number): Position3D[];
121
- /**
122
- * Distributes N points on a sphere surface using Fibonacci lattice.
123
- * Produces near-uniform spacing regardless of count.
124
- */
125
- declare function fibonacciSpherePositions(count: number, radius: number): Position3D[];
126
- /**
127
- * Evenly spaces N points on a tilted ring (elliptical orbit).
128
- * `tilt` is the ring's inclination in radians relative to the XZ plane.
129
- */
130
- declare function orbitRingPositions(count: number, radius: number, tilt: number): Position3D[];
131
- /**
132
- * Creates a QuadraticBezierCurve3 between two 3D points with a control
133
- * point offset perpendicular to the from-to line. The offset direction
134
- * is computed in 3D using a cross product with the up vector.
135
- */
136
- declare function arcCurve3D(from: [number, number, number], to: [number, number, number], offset: number): QuadraticBezierCurve3;
137
- /**
138
- * Creates a loop curve above a point for self-transitions.
139
- */
140
- declare function selfLoopCurve3D(position: [number, number, number], loopRadius: number): QuadraticBezierCurve3;
141
- /**
142
- * Recursively positions an expression tree in 3D space.
143
- * Root at origin, children spread horizontally, depth goes downward (negative Y).
144
- */
145
- declare function treeLayout3D(node: ExprTreeNode3D, origin: Position3D, horizontalSpacing: number, verticalSpacing?: number): TreeLayoutResult[];
146
- declare const CAMERA_POSITIONS: {
147
- readonly application: {
148
- readonly position: [number, number, number];
149
- readonly target: [number, number, number];
150
- };
151
- readonly orbital: {
152
- readonly position: [number, number, number];
153
- readonly target: [number, number, number];
154
- };
155
- readonly trait: {
156
- readonly position: [number, number, number];
157
- readonly target: [number, number, number];
158
- };
159
- readonly transition: {
160
- readonly position: [number, number, number];
161
- readonly target: [number, number, number];
162
- };
163
- };
164
-
165
- interface Avl3DModelOverrides {
166
- /** GLB URL for orbital nodes (replaces sphere) */
167
- orbital?: string;
168
- /** GLB URL for entity core (replaces icosahedron) */
169
- entity?: string;
170
- /** GLB URL for state nodes (replaces sphere) */
171
- state?: string;
172
- /** GLB URL for guard gates (replaces octahedron) */
173
- guard?: string;
174
- /** GLB URL for page portals (replaces plane) */
175
- page?: string;
176
- }
177
- interface Avl3DConfig {
178
- /** Custom 3D model URLs to replace default primitive geometry */
179
- modelOverrides: Avl3DModelOverrides;
180
- /** Whether postprocessing effects are enabled */
181
- effectsEnabled: boolean;
182
- /**
183
- * AVL_3D_COLORS resolved against the active theme, for three.js materials
184
- * and lights (which cannot evaluate `var()`/`color-mix()` themselves).
185
- * Null until the viewer has resolved every token — descendants render only
186
- * once the Canvas that provides this context is mounted, so they can treat
187
- * a non-null palette as guaranteed.
188
- */
189
- palette: Readonly<Record<keyof typeof AVL_3D_COLORS, string>> | null;
190
- }
191
- declare const Avl3DContext: React.Context<Avl3DConfig>;
192
- /**
193
- * Access the current AVL 3D configuration.
194
- * Returns model overrides and effect settings.
195
- */
196
- declare function useAvl3DConfig(): Avl3DConfig;
197
- /** The theme-resolved AVL_3D_COLORS palette for three.js materials and lights. */
198
- declare function useAvl3DPalette(): Readonly<Record<keyof typeof AVL_3D_COLORS, string>> | null;
199
-
200
- export { CAMERA_POSITIONS as C, Avl3DContext as a, useAvl3DPalette as c, AVL_3D_COLORS as d, arcCurve3D as e, fibonacciSpherePositions as f, goldenSpiralPositions as g, orbitRingPositions as o, selfLoopCurve3D as s, treeLayout3D as t, useAvl3DConfig as u };
201
- export type { Avl3DConfig as A, Position3D as P, Avl3DModelOverrides as b };
@@ -1,132 +0,0 @@
1
- import { EntityPersistence, JsonObject, SExpr, OrbitalSchema, Trait } from '@almadar/core';
2
-
3
- /**
4
- * AVL Schema Parser
5
- *
6
- * Pure functions that transform an OrbitalSchema into structured data
7
- * for each zoom level of the Cosmic Zoom visualization.
8
- *
9
- * Imports all types from @almadar/core.
10
- *
11
- * @packageDocumentation
12
- */
13
-
14
- interface SerializedEffect extends JsonObject {
15
- type: string;
16
- args: SExpr[];
17
- }
18
- interface ApplicationOrbitalData {
19
- name: string;
20
- entityName: string;
21
- fieldCount: number;
22
- persistence: EntityPersistence;
23
- traitNames: string[];
24
- pageNames: string[];
25
- position: {
26
- x: number;
27
- y: number;
28
- };
29
- }
30
- interface CrossLink {
31
- emitterOrbital: string;
32
- listenerOrbital: string;
33
- eventName: string;
34
- emitterTrait: string;
35
- listenerTrait: string;
36
- }
37
- interface ApplicationLevelData {
38
- orbitals: ApplicationOrbitalData[];
39
- crossLinks: CrossLink[];
40
- }
41
- interface FieldInfo extends JsonObject {
42
- name: string;
43
- type: string;
44
- required: boolean;
45
- hasDefault: boolean;
46
- }
47
- interface OrbitalTraitInfo extends JsonObject {
48
- name: string;
49
- stateCount: number;
50
- eventCount: number;
51
- transitionCount: number;
52
- emits: string[];
53
- listens: string[];
54
- }
55
- interface OrbitalPageInfo extends JsonObject {
56
- name: string;
57
- route: string;
58
- }
59
- interface ExternalLink extends JsonObject {
60
- targetOrbital: string;
61
- eventName: string;
62
- direction: string;
63
- traitName: string;
64
- }
65
- interface OrbitalLevelData {
66
- name: string;
67
- entity: {
68
- name: string;
69
- fields: FieldInfo[];
70
- persistence: EntityPersistence;
71
- };
72
- traits: OrbitalTraitInfo[];
73
- pages: OrbitalPageInfo[];
74
- externalLinks: ExternalLink[];
75
- }
76
- interface TraitStateInfo extends JsonObject {
77
- name: string;
78
- isInitial: boolean | null;
79
- isTerminal: boolean | null;
80
- }
81
- interface TraitTransitionInfo extends JsonObject {
82
- from: string;
83
- to: string;
84
- event: string;
85
- /** `.orb` config data omits the key instead of carrying null. */
86
- guard: SExpr | null;
87
- effects: SerializedEffect[];
88
- index: number;
89
- }
90
- interface TraitLevelData extends JsonObject {
91
- name: string;
92
- linkedEntity: string;
93
- states: TraitStateInfo[];
94
- transitions: TraitTransitionInfo[];
95
- emittedEvents: string[];
96
- listenedEvents: string[];
97
- }
98
- interface ExprTreeNode {
99
- label: string;
100
- type: 'operator' | 'literal' | 'binding';
101
- children?: ExprTreeNode[];
102
- }
103
- interface SlotTarget {
104
- name: string;
105
- pattern: string;
106
- }
107
- interface TransitionLevelData {
108
- from: string;
109
- to: string;
110
- event: string;
111
- guard: ExprTreeNode | null;
112
- effects: ExprTreeNode[];
113
- slotTargets: SlotTarget[];
114
- }
115
- /**
116
- * Parse the application-level view: all orbitals with cross-orbital links.
117
- */
118
- declare function parseApplicationLevel(schema: OrbitalSchema): ApplicationLevelData;
119
- /**
120
- * Parse a single orbital's detail view.
121
- */
122
- declare function parseOrbitalLevel(schema: OrbitalSchema, orbitalName: string): OrbitalLevelData | null;
123
- declare function parseTraitLevel(schema: OrbitalSchema, orbitalName: string, traitName: string): TraitLevelData | null;
124
- /** One trait's state machine as AVL trait data; null when the trait has no state machine. */
125
- declare function traitLevelFromTrait(trait: Trait, linkedEntity: string): TraitLevelData | null;
126
- /**
127
- * Parse a single transition for the detail view.
128
- */
129
- declare function parseTransitionLevel(schema: OrbitalSchema, orbitalName: string, traitName: string, transitionIndex: number): TransitionLevelData | null;
130
-
131
- export { parseOrbitalLevel as e, parseTraitLevel as f, parseTransitionLevel as g, parseApplicationLevel as p, traitLevelFromTrait as t };
132
- export type { ApplicationLevelData as A, CrossLink as C, ExternalLink as E, FieldInfo as F, OrbitalTraitInfo as O, SerializedEffect as S, TraitLevelData as T, OrbitalPageInfo as a, OrbitalLevelData as b, TransitionLevelData as c, TraitTransitionInfo as d };
@@ -1,17 +0,0 @@
1
- /**
2
- * AVL Cosmic Zoom State Machine
3
- *
4
- * useReducer-based state machine managing which zoom level is displayed,
5
- * what is selected, and animation state.
6
- *
7
- * Shared by AvlOrbitalsCosmicZoom (2D) and Avl3DViewer (3D). The 3D
8
- * viewer drills through every level (`application → orbital → trait →
9
- * transition`); the 2D cosmic view skips the `'orbital'` level after
10
- * COSMIC-1 (no Orbital-View screen) by dispatching `JUMP_TO_TRAIT_CIRCUIT`
11
- * to land directly at `'trait'`.
12
- *
13
- * @packageDocumentation
14
- */
15
- type ZoomLevel = 'application' | 'orbital' | 'trait' | 'transition';
16
-
17
- export type { ZoomLevel as Z };