@almadar/ui 2.20.0 → 2.20.6

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 (41) hide show
  1. package/LICENSE +72 -21
  2. package/dist/avl/index.cjs +1437 -1328
  3. package/dist/avl/index.d.cts +51 -47
  4. package/dist/avl/index.js +1408 -1299
  5. package/dist/components/atoms/avl/Avl3DLabel.d.ts +23 -0
  6. package/dist/components/atoms/avl/Avl3DTooltip.d.ts +25 -0
  7. package/dist/components/atoms/avl/index.d.ts +2 -0
  8. package/dist/components/index.cjs +3 -1
  9. package/dist/components/index.js +3 -1
  10. package/dist/components/molecules/avl/Avl3DCrossWire.d.ts +22 -0
  11. package/dist/components/molecules/avl/Avl3DEntityCore.d.ts +26 -0
  12. package/dist/components/molecules/avl/Avl3DExprTree.d.ts +21 -0
  13. package/dist/components/molecules/avl/Avl3DOrbitalNode.d.ts +29 -0
  14. package/dist/components/molecules/avl/Avl3DStateNode.d.ts +34 -0
  15. package/dist/components/molecules/avl/Avl3DTransitionArc.d.ts +38 -0
  16. package/dist/components/molecules/avl/index.d.ts +6 -0
  17. package/dist/components/organisms/avl/Avl3DApplicationScene.d.ts +19 -0
  18. package/dist/components/organisms/avl/Avl3DEffects.d.ts +18 -0
  19. package/dist/components/organisms/avl/Avl3DOrbitalScene.d.ts +23 -0
  20. package/dist/components/organisms/avl/Avl3DTraitScene.d.ts +19 -0
  21. package/dist/components/organisms/avl/Avl3DTransitionScene.d.ts +17 -0
  22. package/dist/components/organisms/avl/Avl3DViewer.d.ts +40 -0
  23. package/dist/components/organisms/avl/AvlOrbitalScene.d.ts +4 -0
  24. package/dist/components/organisms/avl/avl-3d-context.d.ts +32 -0
  25. package/dist/components/organisms/avl/avl-3d-layout.d.ts +116 -0
  26. package/dist/components/organisms/avl/avl-zoom-state.d.ts +3 -0
  27. package/dist/components/organisms/game/three/index.cjs +2549 -120
  28. package/dist/components/organisms/game/three/index.d.ts +8 -0
  29. package/dist/components/organisms/game/three/index.js +2419 -5
  30. package/dist/illustrations/index.cjs +2880 -109
  31. package/dist/illustrations/index.js +2879 -108
  32. package/dist/providers/OrbitalProvider.d.ts +4 -2
  33. package/dist/providers/index.cjs +263 -284
  34. package/dist/providers/index.js +189 -210
  35. package/dist/runtime/OrbPreview.d.ts +9 -6
  36. package/dist/runtime/ServerBridge.d.ts +23 -0
  37. package/dist/runtime/enrichFromResponse.d.ts +21 -0
  38. package/dist/runtime/index.cjs +31754 -2587
  39. package/dist/runtime/index.d.ts +2 -0
  40. package/dist/runtime/index.js +31735 -2571
  41. package/package.json +5 -2
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Avl3DLabel - Billboard text label for 3D AVL visualizations.
3
+ *
4
+ * Uses drei's Html component to render text that always faces the camera.
5
+ *
6
+ * @packageDocumentation
7
+ */
8
+ import React from 'react';
9
+ export interface Avl3DLabelProps {
10
+ /** 3D position [x, y, z] */
11
+ position: [number, number, number];
12
+ /** Label text */
13
+ text: string;
14
+ /** Text color (CSS) */
15
+ color?: string;
16
+ /** Font size in px */
17
+ fontSize?: number;
18
+ /** CSS class */
19
+ className?: string;
20
+ /** Hide label when behind other objects */
21
+ occlude?: boolean;
22
+ }
23
+ export declare const Avl3DLabel: React.FC<Avl3DLabelProps>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Avl3DTooltip - Styled tooltip card for 3D AVL hover info.
3
+ *
4
+ * Uses drei's Html to render a DOM card in 3D space that always
5
+ * faces the camera. Shows contextual info based on the hovered node.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ export interface Avl3DTooltipProps {
11
+ /** 3D position [x, y, z] */
12
+ position: [number, number, number];
13
+ /** Tooltip title (bold, top line) */
14
+ title: string;
15
+ /** Key-value rows to display */
16
+ rows: Array<{
17
+ label: string;
18
+ value: string;
19
+ }>;
20
+ /** Optional accent color for the left border */
21
+ accentColor?: string;
22
+ /** CSS class */
23
+ className?: string;
24
+ }
25
+ export declare const Avl3DTooltip: React.FC<Avl3DTooltipProps>;
@@ -18,3 +18,5 @@ export { AvlOperator, type AvlOperatorProps } from './AvlOperator';
18
18
  export { AvlSExpr, type AvlSExprProps } from './AvlSExpr';
19
19
  export { AvlLiteral, type AvlLiteralProps } from './AvlLiteral';
20
20
  export { AvlBindingRef, type AvlBindingRefProps } from './AvlBindingRef';
21
+ export { Avl3DLabel, type Avl3DLabelProps } from './Avl3DLabel';
22
+ export { Avl3DTooltip, type Avl3DTooltipProps } from './Avl3DTooltip';
@@ -12257,7 +12257,8 @@ function MapView({
12257
12257
  marker.id
12258
12258
  ))
12259
12259
  ]
12260
- }
12260
+ },
12261
+ `map-${centerLat}-${centerLng}-${zoom}`
12261
12262
  )
12262
12263
  }
12263
12264
  );
@@ -12830,6 +12831,7 @@ var Lightbox = ({
12830
12831
  ),
12831
12832
  onClick: handleClose,
12832
12833
  role: "dialog",
12834
+ "data-pattern": "lightbox",
12833
12835
  "aria-modal": "true",
12834
12836
  "aria-label": currentImage?.alt ?? "Image viewer",
12835
12837
  children: [
@@ -12227,7 +12227,8 @@ function MapView({
12227
12227
  marker.id
12228
12228
  ))
12229
12229
  ]
12230
- }
12230
+ },
12231
+ `map-${centerLat}-${centerLng}-${zoom}`
12231
12232
  )
12232
12233
  }
12233
12234
  );
@@ -12800,6 +12801,7 @@ var Lightbox = ({
12800
12801
  ),
12801
12802
  onClick: handleClose,
12802
12803
  role: "dialog",
12804
+ "data-pattern": "lightbox",
12803
12805
  "aria-modal": "true",
12804
12806
  "aria-label": currentImage?.alt ?? "Image viewer",
12805
12807
  children: [
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Avl3DCrossWire - Inter-orbital event connection tube.
3
+ *
4
+ * Renders a curved tube between two orbitals representing
5
+ * a cross-orbital emit/listen event connection.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ export interface Avl3DCrossWireProps {
11
+ /** Start position [x, y, z] */
12
+ from: [number, number, number];
13
+ /** End position [x, y, z] */
14
+ to: [number, number, number];
15
+ /** Event name to display */
16
+ eventName: string;
17
+ /** Wire color override */
18
+ color?: string;
19
+ /** CSS class */
20
+ className?: string;
21
+ }
22
+ export declare const Avl3DCrossWire: React.FC<Avl3DCrossWireProps>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Avl3DEntityCore - Glowing entity center for the orbital solar system view.
3
+ *
4
+ * Renders an icosahedron with gold emissive glow, surrounded by
5
+ * field indicator particles and a point light.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ export interface Avl3DEntityCoreProps {
11
+ /** Entity name */
12
+ name: string;
13
+ /** Number of fields */
14
+ fieldCount: number;
15
+ /** Persistence type */
16
+ persistence: string;
17
+ /** 3D position [x, y, z] */
18
+ position: [number, number, number];
19
+ /** Field type strings for V5 shape encoding (optional, falls back to spheres) */
20
+ fields?: string[];
21
+ /** Color override */
22
+ color?: string;
23
+ /** CSS class for label */
24
+ className?: string;
25
+ }
26
+ export declare const Avl3DEntityCore: React.FC<Avl3DEntityCoreProps>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Avl3DExprTree - 3D s-expression tree for guard/effect visualization.
3
+ *
4
+ * Renders operators as rounded boxes, literals as small spheres,
5
+ * bindings as wireframe spheres, connected by thin cylinders.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ import type { ExprTreeNode } from '../../organisms/avl/avl-schema-parser';
11
+ export interface Avl3DExprTreeProps {
12
+ /** The expression tree to render */
13
+ expression: ExprTreeNode;
14
+ /** Root position [x, y, z] */
15
+ position: [number, number, number];
16
+ /** Color override */
17
+ color?: string;
18
+ /** CSS class */
19
+ className?: string;
20
+ }
21
+ export declare const Avl3DExprTree: React.FC<Avl3DExprTreeProps>;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Avl3DOrbitalNode - Orbital node for the galaxy view.
3
+ *
4
+ * Shape: TORUS (ring) with entity nucleus floating inside.
5
+ * The ring shape literally represents "orbital" and is visually
6
+ * distinct from all other AVL primitives.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ import React from 'react';
11
+ export interface Avl3DOrbitalNodeProps {
12
+ /** Orbital name */
13
+ name: string;
14
+ /** Entity name */
15
+ entityName: string;
16
+ /** Number of traits (affects ring size and scale) */
17
+ traitCount: number;
18
+ /** Number of pages (affects glow brightness) */
19
+ pageCount?: number;
20
+ /** Entity persistence type */
21
+ persistence?: string;
22
+ /** 3D position [x, y, z] */
23
+ position: [number, number, number];
24
+ /** Click handler */
25
+ onClick?: () => void;
26
+ /** CSS class for label */
27
+ className?: string;
28
+ }
29
+ export declare const Avl3DOrbitalNode: React.FC<Avl3DOrbitalNodeProps>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Avl3DStateNode - State node in the 3D state machine view.
3
+ *
4
+ * Shape: ROUNDED BOX (matches the 2D rounded rectangle).
5
+ * Visually distinct from orbital torus, entity icosahedron, guard octahedron.
6
+ *
7
+ * V3 fix: initial = green arrow cone offset to left, terminal = red stop octahedron offset to right.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ import React from 'react';
12
+ export interface Avl3DStateNodeProps {
13
+ /** State name */
14
+ name: string;
15
+ /** Whether this is the initial state */
16
+ isInitial?: boolean;
17
+ /** Whether this is a terminal state */
18
+ isTerminal?: boolean;
19
+ /** 3D position [x, y, z] */
20
+ position: [number, number, number];
21
+ /** Whether this state is currently active */
22
+ active?: boolean;
23
+ /** Click handler */
24
+ onClick?: () => void;
25
+ /** Number of incoming transitions */
26
+ incomingCount?: number;
27
+ /** Number of outgoing transitions */
28
+ outgoingCount?: number;
29
+ /** Color override */
30
+ color?: string;
31
+ /** CSS class for label */
32
+ className?: string;
33
+ }
34
+ export declare const Avl3DStateNode: React.FC<Avl3DStateNodeProps>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Avl3DTransitionArc - Curved tube between two state nodes.
3
+ *
4
+ * Renders a tube geometry along a Bezier curve with optional guard gate
5
+ * and arrowhead cone. The 3D equivalent of SVG transition arrows.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ export interface Avl3DTransitionArcProps {
11
+ /** Start position [x, y, z] */
12
+ from: [number, number, number];
13
+ /** End position [x, y, z] */
14
+ to: [number, number, number];
15
+ /** Event name */
16
+ event: string;
17
+ /** Whether this transition has a guard */
18
+ hasGuard?: boolean;
19
+ /** Number of effects */
20
+ effectCount: number;
21
+ /** Effect type names for V4 micro-icons */
22
+ effectTypes?: string[];
23
+ /** Index (for fanning parallel transitions) */
24
+ index: number;
25
+ /** Whether this is a self-transition */
26
+ isSelf?: boolean;
27
+ /** Source state name (for tooltip) */
28
+ fromState?: string;
29
+ /** Target state name (for tooltip) */
30
+ toState?: string;
31
+ /** Click handler */
32
+ onClick?: () => void;
33
+ /** Color override */
34
+ color?: string;
35
+ /** CSS class */
36
+ className?: string;
37
+ }
38
+ export declare const Avl3DTransitionArc: React.FC<Avl3DTransitionArcProps>;
@@ -5,3 +5,9 @@ export { AvlEmitListen, type AvlEmitListenProps } from './AvlEmitListen';
5
5
  export { AvlSlotMap, type AvlSlotMapProps, type AvlSlotMapSlot } from './AvlSlotMap';
6
6
  export { AvlExprTree, type AvlExprTreeProps, type AvlExprTreeNode } from './AvlExprTree';
7
7
  export { ringPositions, arcPath, radialPositions, gridPositions, curveControlPoint } from './avl-layout';
8
+ export { Avl3DOrbitalNode, type Avl3DOrbitalNodeProps } from './Avl3DOrbitalNode';
9
+ export { Avl3DCrossWire, type Avl3DCrossWireProps } from './Avl3DCrossWire';
10
+ export { Avl3DEntityCore, type Avl3DEntityCoreProps } from './Avl3DEntityCore';
11
+ export { Avl3DStateNode, type Avl3DStateNodeProps } from './Avl3DStateNode';
12
+ export { Avl3DTransitionArc, type Avl3DTransitionArcProps } from './Avl3DTransitionArc';
13
+ export { Avl3DExprTree, type Avl3DExprTreeProps } from './Avl3DExprTree';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Avl3DApplicationScene - Galaxy view of all orbitals.
3
+ *
4
+ * Positions orbitals on a golden-ratio spiral and renders cross-orbital
5
+ * event wires between them. The 3D equivalent of AvlApplicationScene.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ import type { ApplicationLevelData } from './avl-schema-parser';
11
+ export interface Avl3DApplicationSceneProps {
12
+ /** Parsed application-level data */
13
+ data: ApplicationLevelData;
14
+ /** Click handler for an orbital */
15
+ onOrbitalClick?: (orbitalName: string) => void;
16
+ /** Primary color */
17
+ color?: string;
18
+ }
19
+ export declare const Avl3DApplicationScene: React.FC<Avl3DApplicationSceneProps>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Avl3DEffects - Postprocessing effects and ambient visuals for AVL 3D.
3
+ *
4
+ * Two layers:
5
+ * 1. Ambient visuals (sparkles, starfield) - always rendered via drei
6
+ * 2. Postprocessing (bloom, DOF, vignette) - rendered via @react-three/postprocessing
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ import React from 'react';
11
+ import type { ZoomLevel } from './avl-zoom-state';
12
+ export interface Avl3DEffectsProps {
13
+ /** Current zoom level (effects vary by level) */
14
+ level: ZoomLevel;
15
+ /** Enable/disable all effects */
16
+ enabled?: boolean;
17
+ }
18
+ export declare const Avl3DEffects: React.FC<Avl3DEffectsProps>;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Avl3DOrbitalScene - Solar system view of a single orbital.
3
+ *
4
+ * Renders entity core at center, trait orbit rings, and page portals.
5
+ * The 3D equivalent of AvlOrbitalScene.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ import type { OrbitalLevelData } from './avl-schema-parser';
11
+ export interface Avl3DOrbitalSceneProps {
12
+ /** Parsed orbital-level data */
13
+ data: OrbitalLevelData;
14
+ /** Click handler for a trait */
15
+ onTraitClick?: (traitName: string) => void;
16
+ /** Currently highlighted trait */
17
+ highlightedTrait?: string | null;
18
+ /** Highlight change handler */
19
+ onTraitHighlight?: (traitName: string | null) => void;
20
+ /** Primary color */
21
+ color?: string;
22
+ }
23
+ export declare const Avl3DOrbitalScene: React.FC<Avl3DOrbitalSceneProps>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Avl3DTraitScene - 3D state machine view for a single trait.
3
+ *
4
+ * Positions states on a fibonacci sphere and renders transition arcs
5
+ * between them. The 3D equivalent of AvlTraitScene.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ import type { TraitLevelData } from './avl-schema-parser';
11
+ export interface Avl3DTraitSceneProps {
12
+ /** Parsed trait-level data */
13
+ data: TraitLevelData;
14
+ /** Click handler for a transition */
15
+ onTransitionClick?: (transitionIndex: number) => void;
16
+ /** Primary color */
17
+ color?: string;
18
+ }
19
+ export declare const Avl3DTraitScene: React.FC<Avl3DTraitSceneProps>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Avl3DTransitionScene - 3D expression tree and effect chain view.
3
+ *
4
+ * Renders a detailed view of a single transition with its guard
5
+ * expression tree and effect chain. The 3D equivalent of AvlTransitionScene.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import React from 'react';
10
+ import type { TransitionLevelData } from './avl-schema-parser';
11
+ export interface Avl3DTransitionSceneProps {
12
+ /** Parsed transition-level data */
13
+ data: TransitionLevelData;
14
+ /** Primary color */
15
+ color?: string;
16
+ }
17
+ export declare const Avl3DTransitionScene: React.FC<Avl3DTransitionSceneProps>;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Avl3DViewer - Interactive 3D Orbital Visualization
3
+ *
4
+ * The host organism that owns the R3F Canvas and delegates to 3D scene
5
+ * renderers at each zoom level. The 3D equivalent of AvlCosmicZoom.
6
+ *
7
+ * Reuses avl-schema-parser.ts and avl-zoom-state.ts directly.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ import React from 'react';
12
+ import type { OrbitalSchema } from '@almadar/core';
13
+ import { type ZoomLevel } from './avl-zoom-state';
14
+ import { type Avl3DModelOverrides } from './avl-3d-context';
15
+ export interface Avl3DViewerProps {
16
+ /** The orbital schema (parsed object or JSON string) */
17
+ schema: OrbitalSchema | string;
18
+ /** CSS class for the outer container */
19
+ className?: string;
20
+ /** Enable animations (default: true) */
21
+ animated?: boolean;
22
+ /** Pre-select an orbital on mount */
23
+ initialOrbital?: string;
24
+ /** Pre-select a trait on mount */
25
+ initialTrait?: string;
26
+ /** Callback when zoom level changes */
27
+ onZoomChange?: (level: ZoomLevel, context: {
28
+ orbital?: string;
29
+ trait?: string;
30
+ }) => void;
31
+ /** Container width */
32
+ width?: number | string;
33
+ /** Container height */
34
+ height?: number | string;
35
+ /** Enable postprocessing effects (bloom, DOF, vignette). Default: true */
36
+ effects?: boolean;
37
+ /** Custom 3D model URLs to replace default primitive geometry */
38
+ modelOverrides?: Avl3DModelOverrides;
39
+ }
40
+ export declare const Avl3DViewer: React.FC<Avl3DViewerProps>;
@@ -9,9 +9,13 @@ import type { OrbitalLevelData } from './avl-schema-parser';
9
9
  export interface AvlOrbitalSceneProps {
10
10
  data: OrbitalLevelData;
11
11
  color?: string;
12
+ /** Currently highlighted trait (before zooming in) */
13
+ highlightedTrait?: string | null;
12
14
  onTraitClick?: (traitName: string, position: {
13
15
  x: number;
14
16
  y: number;
15
17
  }) => void;
18
+ /** Called when a trait tab is hovered/selected (highlight without zoom) */
19
+ onTraitHighlight?: (traitName: string | null) => void;
16
20
  }
17
21
  export declare const AvlOrbitalScene: React.FC<AvlOrbitalSceneProps>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * avl-3d-context.ts
3
+ *
4
+ * React context for AVL 3D model overrides and configuration.
5
+ * Allows replacing primitive geometry with custom GLB/GLTF models.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ export interface Avl3DModelOverrides {
10
+ /** GLB URL for orbital nodes (replaces sphere) */
11
+ orbital?: string;
12
+ /** GLB URL for entity core (replaces icosahedron) */
13
+ entity?: string;
14
+ /** GLB URL for state nodes (replaces sphere) */
15
+ state?: string;
16
+ /** GLB URL for guard gates (replaces octahedron) */
17
+ guard?: string;
18
+ /** GLB URL for page portals (replaces plane) */
19
+ page?: string;
20
+ }
21
+ export interface Avl3DConfig {
22
+ /** Custom 3D model URLs to replace default primitive geometry */
23
+ modelOverrides: Avl3DModelOverrides;
24
+ /** Whether postprocessing effects are enabled */
25
+ effectsEnabled: boolean;
26
+ }
27
+ export declare const Avl3DContext: import("react").Context<Avl3DConfig>;
28
+ /**
29
+ * Access the current AVL 3D configuration.
30
+ * Returns model overrides and effect settings.
31
+ */
32
+ export declare function useAvl3DConfig(): Avl3DConfig;
@@ -0,0 +1,116 @@
1
+ /**
2
+ * avl-3d-layout.ts
3
+ *
4
+ * Pure math utilities for 3D positioning of AVL visualization nodes.
5
+ * The 3D equivalent of avl-layout.ts (2D positioning helpers).
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import { QuadraticBezierCurve3 } from 'three';
10
+ export interface Position3D {
11
+ x: number;
12
+ y: number;
13
+ z: number;
14
+ }
15
+ export interface ExprTreeNode3D {
16
+ label: string;
17
+ type: 'operator' | 'literal' | 'binding';
18
+ children?: ExprTreeNode3D[];
19
+ }
20
+ export interface TreeLayoutResult {
21
+ node: ExprTreeNode3D;
22
+ position: Position3D;
23
+ }
24
+ /**
25
+ * Refined palette following Almadar UI Beauty principles:
26
+ * - No pure black: deep navy tint (#0c1222) instead of #0A0A1A
27
+ * - 60-30-10 rule: 60% deep background, 30% muted blues/grays, 10% bright accents
28
+ * - Desaturated for dark backgrounds: softer blues, warmer golds
29
+ * - Depth through color layering: surfaces get progressively lighter
30
+ */
31
+ export declare const AVL_3D_COLORS: {
32
+ readonly orbitalSphere: "#161b2e";
33
+ readonly orbitalRim: "#5b9bd5";
34
+ readonly entityCore: "#f0c040";
35
+ readonly entityCoreGlow: "#ffd866";
36
+ readonly traitOrbit: "#5b9bd5";
37
+ readonly traitOrbitHighlight: "#7ab8f5";
38
+ readonly stateIdle: "#1e2a3a";
39
+ readonly stateEdge: "#5b9bd5";
40
+ readonly stateActive: "#4ecb71";
41
+ readonly transitionArc: "#e0944a";
42
+ readonly transitionArcHover: "#f0a860";
43
+ readonly guardPass: "#4ecb71";
44
+ readonly guardFail: "#f06060";
45
+ readonly crossWire: "#a78bda";
46
+ readonly crossWireGlow: "#c4a8f0";
47
+ readonly pagePortal: "#40c8aa";
48
+ readonly background: "#0c1222";
49
+ readonly backgroundSurface: "#111a2e";
50
+ readonly fog: "#0c1222";
51
+ readonly sparkle: "#7ab8f5";
52
+ readonly sparkleWarm: "#f0c040";
53
+ };
54
+ /**
55
+ * Positions N nodes on a golden-ratio spiral in the XZ plane (y=0).
56
+ * Used as initial positions for the force-directed layout.
57
+ */
58
+ export declare function goldenSpiralPositions(count: number, baseRadius: number): Position3D[];
59
+ interface ForceEdge {
60
+ from: number;
61
+ to: number;
62
+ }
63
+ /**
64
+ * Runs a simple force-directed simulation to cluster connected nodes.
65
+ * Connected nodes attract, all nodes repel. Runs for a fixed number of iterations.
66
+ *
67
+ * @param count Number of nodes
68
+ * @param edges Connections between nodes (indices)
69
+ * @param baseRadius Approximate spread radius
70
+ * @param iterations Simulation steps (default 80)
71
+ */
72
+ export declare function forceDirectedPositions(count: number, edges: ForceEdge[], baseRadius: number, iterations?: number): Position3D[];
73
+ /**
74
+ * Distributes N points on a sphere surface using Fibonacci lattice.
75
+ * Produces near-uniform spacing regardless of count.
76
+ */
77
+ export declare function fibonacciSpherePositions(count: number, radius: number): Position3D[];
78
+ /**
79
+ * Evenly spaces N points on a tilted ring (elliptical orbit).
80
+ * `tilt` is the ring's inclination in radians relative to the XZ plane.
81
+ */
82
+ export declare function orbitRingPositions(count: number, radius: number, tilt: number): Position3D[];
83
+ /**
84
+ * Creates a QuadraticBezierCurve3 between two 3D points with a control
85
+ * point offset perpendicular to the from-to line. The offset direction
86
+ * is computed in 3D using a cross product with the up vector.
87
+ */
88
+ export declare function arcCurve3D(from: [number, number, number], to: [number, number, number], offset: number): QuadraticBezierCurve3;
89
+ /**
90
+ * Creates a loop curve above a point for self-transitions.
91
+ */
92
+ export declare function selfLoopCurve3D(position: [number, number, number], loopRadius: number): QuadraticBezierCurve3;
93
+ /**
94
+ * Recursively positions an expression tree in 3D space.
95
+ * Root at origin, children spread horizontally, depth goes downward (negative Y).
96
+ */
97
+ export declare function treeLayout3D(node: ExprTreeNode3D, origin: Position3D, horizontalSpacing: number, verticalSpacing?: number): TreeLayoutResult[];
98
+ export declare const CAMERA_POSITIONS: {
99
+ readonly application: {
100
+ readonly position: [number, number, number];
101
+ readonly target: [number, number, number];
102
+ };
103
+ readonly orbital: {
104
+ readonly position: [number, number, number];
105
+ readonly target: [number, number, number];
106
+ };
107
+ readonly trait: {
108
+ readonly position: [number, number, number];
109
+ readonly target: [number, number, number];
110
+ };
111
+ readonly transition: {
112
+ readonly position: [number, number, number];
113
+ readonly target: [number, number, number];
114
+ };
115
+ };
116
+ export {};
@@ -47,6 +47,9 @@ export type ZoomAction = {
47
47
  type: 'ANIMATION_COMPLETE';
48
48
  } | {
49
49
  type: 'RESET';
50
+ } | {
51
+ type: 'SWITCH_TRAIT';
52
+ trait: string;
50
53
  };
51
54
  export declare const initialZoomState: ZoomState;
52
55
  export declare function zoomReducer(state: ZoomState, action: ZoomAction): ZoomState;