@almadar/ui 5.70.0 → 5.72.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 (63) hide show
  1. package/dist/avl/index.cjs +2198 -2218
  2. package/dist/avl/index.d.cts +93 -56
  3. package/dist/avl/index.js +931 -951
  4. package/dist/components/avl/molecules/AvlEventWireEdge.d.ts +2 -1
  5. package/dist/components/avl/molecules/AvlTransitionEdge.d.ts +2 -1
  6. package/dist/components/avl/molecules/avl-behavior-compose-converter.d.ts +7 -5
  7. package/dist/components/avl/molecules/avl-behavior-compose-types.d.ts +41 -21
  8. package/dist/components/avl/molecules/avl-canvas-types.d.ts +10 -7
  9. package/dist/components/avl/molecules/avl-preview-converter.d.ts +5 -5
  10. package/dist/components/avl/molecules/avl-preview-types.d.ts +15 -4
  11. package/dist/components/avl/organisms/FlowCanvas.d.ts +2 -2
  12. package/dist/components/avl/organisms/avl-schema-parser.d.ts +18 -16
  13. package/dist/components/core/atoms/Button.d.ts +2 -0
  14. package/dist/components/core/atoms/ConditionalWrapper.d.ts +5 -4
  15. package/dist/components/core/molecules/Carousel.d.ts +2 -2
  16. package/dist/components/core/molecules/OrbitalVisualization.d.ts +4 -3
  17. package/dist/components/core/molecules/PageHeader.d.ts +3 -3
  18. package/dist/components/core/molecules/RepeatableFormSection.d.ts +4 -3
  19. package/dist/components/core/molecules/ViolationAlert.d.ts +2 -0
  20. package/dist/components/core/molecules/WizardContainer.d.ts +23 -22
  21. package/dist/components/core/organisms/CardGrid.d.ts +2 -2
  22. package/dist/components/core/organisms/CustomPattern.d.ts +3 -4
  23. package/dist/components/core/organisms/DataTable.d.ts +2 -2
  24. package/dist/components/core/organisms/DetailPanel.d.ts +1 -1
  25. package/dist/components/core/organisms/Form.d.ts +11 -11
  26. package/dist/components/core/organisms/List.d.ts +3 -5
  27. package/dist/components/core/organisms/StatCard.d.ts +2 -2
  28. package/dist/components/core/organisms/book/types.d.ts +1 -1
  29. package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +2 -1
  30. package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +2 -1
  31. package/dist/components/core/organisms/layout/DashboardGrid.d.ts +0 -2
  32. package/dist/components/core/organisms/types.d.ts +3 -2
  33. package/dist/components/game/atoms/ScoreDisplay.d.ts +3 -3
  34. package/dist/components/game/atoms/Sprite.d.ts +6 -1
  35. package/dist/components/game/atoms/XPBar.d.ts +1 -1
  36. package/dist/components/game/molecules/GameCanvas3D.d.ts +0 -2
  37. package/dist/components/game/molecules/IsometricCanvas.d.ts +4 -2
  38. package/dist/components/game/molecules/PlatformerCanvas.d.ts +4 -1
  39. package/dist/components/game/molecules/StatBadge.d.ts +3 -1
  40. package/dist/components/game/molecules/three/hooks/useSceneGraph.d.ts +2 -1
  41. package/dist/components/game/molecules/three/index.cjs +41 -105
  42. package/dist/components/game/molecules/three/index.js +41 -105
  43. package/dist/components/game/molecules/useUnitSpriteAtlas.d.ts +3 -2
  44. package/dist/components/game/organisms/PinballBoard.d.ts +4 -4
  45. package/dist/components/game/organisms/boardEntity.d.ts +6 -6
  46. package/dist/components/game/organisms/puzzles/debugger/DebuggerBoard.d.ts +16 -2
  47. package/dist/components/game/organisms/puzzles/event-handler/puzzleObject.d.ts +21 -10
  48. package/dist/components/game/organisms/puzzles/state-architect/StateJsonView.d.ts +2 -1
  49. package/dist/components/game/organisms/types/isometric.d.ts +16 -0
  50. package/dist/components/index.cjs +2228 -2251
  51. package/dist/components/index.js +1116 -1139
  52. package/dist/docs/index.cjs +107 -104
  53. package/dist/docs/index.d.cts +2 -0
  54. package/dist/docs/index.js +38 -35
  55. package/dist/lib/getNestedValue.d.ts +2 -13
  56. package/dist/marketing/index.cjs +97 -98
  57. package/dist/marketing/index.d.cts +2 -0
  58. package/dist/marketing/index.js +54 -55
  59. package/dist/providers/index.cjs +1908 -1951
  60. package/dist/providers/index.js +808 -851
  61. package/dist/runtime/index.cjs +1966 -2009
  62. package/dist/runtime/index.js +814 -857
  63. package/package.json +1 -1
@@ -6,7 +6,8 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import { type Edge, type EdgeProps } from '@xyflow/react';
9
- export interface AvlEventWireEdgeData extends Record<string, unknown> {
9
+ export interface AvlEventWireEdgeData {
10
+ [key: string]: string | boolean | undefined;
10
11
  event: string;
11
12
  compatible?: boolean;
12
13
  }
@@ -7,7 +7,8 @@
7
7
  */
8
8
  import React from 'react';
9
9
  import { type Edge, type EdgeProps } from '@xyflow/react';
10
- export interface AvlTransitionEdgeData extends Record<string, unknown> {
10
+ export interface AvlTransitionEdgeData {
11
+ [key: string]: string | boolean | undefined;
11
12
  event: string;
12
13
  hasGuard?: boolean;
13
14
  hasEffects?: boolean;
@@ -39,11 +39,13 @@ export interface BehaviorRegistryRecord {
39
39
  }>;
40
40
  };
41
41
  connectableEvents: string[];
42
- eventPayloads: Record<string, Array<{
43
- name: string;
44
- type: string;
45
- required?: boolean;
46
- }>>;
42
+ eventPayloads: {
43
+ [k: string]: Array<{
44
+ name: string;
45
+ type: string;
46
+ required?: boolean;
47
+ }>;
48
+ };
47
49
  composableWith: string[];
48
50
  }
49
51
  /**
@@ -11,53 +11,73 @@
11
11
  * Overview: One node per orbital showing live UI (OrbPreviewNode)
12
12
  * Expanded: One node per UI state within an orbital (OrbPreviewNode)
13
13
  */
14
- import type { EntityPersistence, EventPayloadField } from '@almadar/core';
15
- import type { BehaviorLevel, BehaviorGlyphChild, BehaviorGlyphConnection } from './AvlBehaviorGlyph';
16
- import type { AvlEffectType } from '../atoms/types';
14
+ import type { JsonObject } from '@almadar/core';
15
+ import type { BehaviorLevel } from './AvlBehaviorGlyph';
16
+ /** Serializable payload field mirrors EventPayloadField from @almadar/core. */
17
+ export interface SerializedPayloadField extends JsonObject {
18
+ name: string;
19
+ type: string;
20
+ required: boolean | null;
21
+ description: string | null;
22
+ }
23
+ /** Serializable behavior glyph child — mirrors BehaviorGlyphChild from AvlBehaviorGlyph. */
24
+ export interface SerializedGlyphChild extends JsonObject {
25
+ name: string;
26
+ fieldCount: number | null;
27
+ stateCount: number | null;
28
+ persistence: string | null;
29
+ effectTypes: string[];
30
+ }
31
+ /** Serializable behavior glyph connection — mirrors BehaviorGlyphConnection from AvlBehaviorGlyph. */
32
+ export interface SerializedGlyphConnection extends JsonObject {
33
+ from: string;
34
+ to: string;
35
+ event: string;
36
+ }
17
37
  /** Extended view level adding 'behavior' to the existing overview/expanded. */
18
38
  export type ComposeViewLevel = 'behavior' | 'overview' | 'expanded';
19
39
  /** An event that can be wired between behaviors. */
20
- export interface ConnectableEvent {
40
+ export interface ConnectableEvent extends JsonObject {
21
41
  /** Event name (e.g., "ADD_TO_CART"). */
22
42
  event: string;
23
43
  /** Typed payload fields if declared. */
24
- payloadFields?: EventPayloadField[];
44
+ payloadFields: SerializedPayloadField[] | null;
25
45
  /** Vertical position hint (0..1) for handle placement on the node. */
26
46
  positionHint: number;
27
47
  }
28
48
  /** Data for a BehaviorComposeNode in React Flow. */
29
- export interface BehaviorComposeNodeData extends Record<string, unknown> {
49
+ export interface BehaviorComposeNodeData extends JsonObject {
30
50
  /** Behavior name from registry (e.g., "std-cart"). */
31
51
  behaviorName: string;
32
52
  /** Composition level: atom, molecule, organism. */
33
- level: BehaviorLevel;
53
+ level: string;
34
54
  /** Domain for color coding (e.g., "commerce"). */
35
- domain?: string;
55
+ domain: string | null;
36
56
  /** Layer classification (e.g., "Domain", "UI Patterns"). */
37
- layer?: string;
57
+ layer: string | null;
38
58
  /** Primary entity name (e.g., "CartItem"). */
39
59
  entityName: string;
40
60
  /** Number of states in the behavior. */
41
61
  stateCount: number;
42
62
  /** Number of entity fields. */
43
- fieldCount?: number;
63
+ fieldCount: number | null;
44
64
  /** Persistence kind. */
45
- persistence?: EntityPersistence;
65
+ persistence: string | null;
46
66
  /** Effect types used by this behavior. */
47
- effectTypes?: AvlEffectType[];
67
+ effectTypes: string[] | null;
48
68
  /** Child behaviors for molecule/organism glyphs. */
49
- children?: BehaviorGlyphChild[];
69
+ children: SerializedGlyphChild[] | null;
50
70
  /** Connections between children (for organism glyphs). */
51
- connections?: BehaviorGlyphConnection[];
71
+ connections: SerializedGlyphConnection[] | null;
52
72
  /** Events this behavior can emit (source handles). */
53
73
  connectableEvents: ConnectableEvent[];
54
74
  /** Behaviors this is composable with (for palette hints). */
55
- composableWith?: string[];
75
+ composableWith: string[] | null;
56
76
  /** Names of orbitals produced by this behavior (for drill-down). */
57
77
  orbitalNames: string[];
58
78
  }
59
79
  /** Edge data for behavior-level wiring. */
60
- export interface BehaviorWireEdgeData extends Record<string, unknown> {
80
+ export interface BehaviorWireEdgeData extends JsonObject {
61
81
  /** The event name displayed on the edge. */
62
82
  event: string;
63
83
  /** Source behavior name. */
@@ -65,7 +85,7 @@ export interface BehaviorWireEdgeData extends Record<string, unknown> {
65
85
  /** Target behavior name. */
66
86
  targetBehavior: string;
67
87
  /** Typed payload fields if declared. */
68
- payloadFields?: EventPayloadField[];
88
+ payloadFields: SerializedPayloadField[] | null;
69
89
  }
70
90
  /** Mapping from behavior name to its metadata + produced orbitals. */
71
91
  export interface BehaviorCanvasEntry {
@@ -84,13 +104,13 @@ export interface BehaviorCanvasEntry {
84
104
  /** Number of entity fields. */
85
105
  fieldCount?: number;
86
106
  /** Persistence kind. */
87
- persistence?: EntityPersistence;
107
+ persistence?: string;
88
108
  /** Effect types used. */
89
- effectTypes?: AvlEffectType[];
109
+ effectTypes?: string[];
90
110
  /** Child behaviors (molecule/organism). */
91
- children?: BehaviorGlyphChild[];
111
+ children?: SerializedGlyphChild[];
92
112
  /** Connections between children (organism). */
93
- connections?: BehaviorGlyphConnection[];
113
+ connections?: SerializedGlyphConnection[];
94
114
  /** Events available for wiring. */
95
115
  connectableEvents: ConnectableEvent[];
96
116
  /** Compatible behavior names. */
@@ -4,6 +4,7 @@
4
4
  * Types for the unified AVL + Flow canvas. These define the data shapes
5
5
  * for React Flow nodes and edges that render AVL primitives.
6
6
  */
7
+ import type { JsonObject } from '@almadar/core';
7
8
  import type { FieldInfo, OrbitalTraitInfo, OrbitalPageInfo, ExternalLink, TraitLevelData } from '../organisms/avl-schema-parser';
8
9
  /** The four zoom bands of the unified AVL canvas. */
9
10
  export type ZoomBand = 'system' | 'module' | 'behavior' | 'detail';
@@ -15,22 +16,24 @@ export declare const ZOOM_BAND_THRESHOLDS: {
15
16
  readonly detail: readonly [2.5, 5];
16
17
  };
17
18
  /** Data carried by every orbital node in the unified canvas. */
18
- export interface AvlNodeData extends Record<string, unknown> {
19
+ export interface AvlNodeData extends JsonObject {
19
20
  orbitalName: string;
20
21
  entityName: string;
21
22
  persistence: string;
22
23
  fields: FieldInfo[];
23
24
  traits: OrbitalTraitInfo[];
24
25
  pages: OrbitalPageInfo[];
25
- traitDetails: Record<string, TraitLevelData>;
26
+ traitDetails: {
27
+ [k: string]: TraitLevelData;
28
+ };
26
29
  externalLinks: ExternalLink[];
27
30
  }
28
31
  /** Edge kind determines visual style. */
29
32
  export type AvlEdgeKind = 'eventWire' | 'page';
30
33
  /** Data carried by edges in the unified canvas. */
31
- export interface AvlEdgeData extends Record<string, unknown> {
32
- edgeKind: AvlEdgeKind;
33
- event?: string;
34
- fromTrait?: string;
35
- toTrait?: string;
34
+ export interface AvlEdgeData extends JsonObject {
35
+ edgeKind: string;
36
+ event: string | null;
37
+ fromTrait: string | null;
38
+ toTrait: string | null;
36
39
  }
@@ -13,13 +13,13 @@
13
13
  * Uses @almadar/core types for schema-level constructs.
14
14
  */
15
15
  import type { Node, Edge } from '@xyflow/react';
16
- import type { OrbitalSchema } from '@almadar/core';
16
+ import type { OrbitalSchema, EntityData } from '@almadar/core';
17
17
  import type { PreviewNodeData, EventEdgeData, ScreenSize } from './avl-preview-types';
18
18
  /**
19
19
  * Build a React Flow graph for the overview level.
20
20
  * Each orbital gets one node showing its INIT transition's UI.
21
21
  */
22
- export declare function schemaToOverviewGraph(schema: OrbitalSchema, mockData?: Record<string, unknown[]>, behaviorMeta?: Record<string, {
22
+ export declare function schemaToOverviewGraph(schema: OrbitalSchema, mockData?: EntityData, behaviorMeta?: Record<string, {
23
23
  layer: string;
24
24
  }>, layoutHint?: 'pipeline' | 'grid', orbitalStatus?: Record<string, PreviewNodeData['status']>, screenSize?: ScreenSize): {
25
25
  nodes: Node<PreviewNodeData>[];
@@ -36,7 +36,7 @@ export declare function schemaToOverviewGraph(schema: OrbitalSchema, mockData?:
36
36
  * anonymous `INIT` peers (STUDIO-1). Drill into a grouped card to reach
37
37
  * L3 (`orbitalAliasToExpandedGraph`).
38
38
  */
39
- export declare function orbitalToExpandedGraph(schema: OrbitalSchema, orbitalName: string, mockData?: Record<string, unknown[]>, screenSize?: ScreenSize): {
39
+ export declare function orbitalToExpandedGraph(schema: OrbitalSchema, orbitalName: string, mockData?: EntityData, screenSize?: ScreenSize): {
40
40
  nodes: Node<PreviewNodeData>[];
41
41
  edges: Edge<EventEdgeData>[];
42
42
  };
@@ -47,7 +47,7 @@ export declare function orbitalToExpandedGraph(schema: OrbitalSchema, orbitalNam
47
47
  * `orbitalToExpandedGraph` but scoped to traits where
48
48
  * `sourceBehavior.alias === alias`. STUDIO-1.
49
49
  */
50
- export declare function orbitalAliasToExpandedGraph(schema: OrbitalSchema, orbitalName: string, alias: string, mockData?: Record<string, unknown[]>, screenSize?: ScreenSize): {
50
+ export declare function orbitalAliasToExpandedGraph(schema: OrbitalSchema, orbitalName: string, alias: string, mockData?: EntityData, screenSize?: ScreenSize): {
51
51
  nodes: Node<PreviewNodeData>[];
52
52
  edges: Edge<EventEdgeData>[];
53
53
  };
@@ -65,7 +65,7 @@ export declare function orbitalAliasToExpandedGraph(schema: OrbitalSchema, orbit
65
65
  * with `data.kind === 'trait-card'` so `FlowCanvas`'s NODE_TYPES routes
66
66
  * them to `TraitCardNode`.
67
67
  */
68
- export declare function orbitalToTraitGraph(schema: OrbitalSchema, orbitalName: string, _mockData?: Record<string, unknown[]>): {
68
+ export declare function orbitalToTraitGraph(schema: OrbitalSchema, orbitalName: string, _mockData?: EntityData): {
69
69
  nodes: Node<PreviewNodeData>[];
70
70
  edges: Edge<EventEdgeData>[];
71
71
  };
@@ -7,7 +7,8 @@
7
7
  *
8
8
  * Uses @almadar/core types for schema-level constructs.
9
9
  */
10
- import type { Expression, UISlot } from '@almadar/core';
10
+ import type { Expression, EntityData, OrbitalSchema, UISlot } from '@almadar/core';
11
+ import type { AnyPatternConfig } from '@almadar/patterns';
11
12
  /**
12
13
  * The navigation levels of the FlowCanvas.
13
14
  *
@@ -84,10 +85,15 @@ export interface PatternEventSource {
84
85
  /** A slot + pattern config pair extracted from a render-ui effect. */
85
86
  export interface RenderUIEntry {
86
87
  slot: UISlot | string;
87
- pattern: Record<string, unknown>;
88
+ pattern: AnyPatternConfig;
88
89
  }
89
90
  /** Data for a preview node (used at both overview and expanded levels). */
90
- export interface PreviewNodeData extends Record<string, unknown> {
91
+ export interface PreviewNodeData {
92
+ [key: string]: string | number | boolean | string[] | Expression | null | RenderUIEntry[] | PatternEventSource[] | Array<{
93
+ event: string;
94
+ fromState: string;
95
+ toState: string;
96
+ }> | OrbitalSchema | EntityData | undefined;
91
97
  /** Orbital this node belongs to. */
92
98
  orbitalName: string;
93
99
  /** Trait name (only at expanded level). */
@@ -202,9 +208,14 @@ export interface PreviewNodeData extends Record<string, unknown> {
202
208
  * trait operates on. Mirrors `Trait.linkedEntity` from the resolved schema.
203
209
  */
204
210
  linkedEntity?: string;
211
+ /** Full parsed schema threaded to node renderers (e.g. TraitCardNode). */
212
+ _fullSchema?: OrbitalSchema;
213
+ /** Mock entity data for the orbital preview. */
214
+ _mockData?: EntityData;
205
215
  }
206
216
  /** Data for event flow edges. */
207
- export interface EventEdgeData extends Record<string, unknown> {
217
+ export interface EventEdgeData {
218
+ [key: string]: string | boolean | undefined;
208
219
  /** The event name displayed on the edge. */
209
220
  event: string;
210
221
  /** Source state name (expanded level). */
@@ -12,12 +12,12 @@
12
12
  * Escape to go back. AVL overlays on hover (future).
13
13
  */
14
14
  import React from 'react';
15
- import type { OrbitalSchema, ThemeDefinition } from '@almadar/core';
15
+ import type { OrbitalSchema, ThemeDefinition, EntityData } from '@almadar/core';
16
16
  import type { ViewLevel, PreviewNodeData } from '../molecules/avl-preview-types';
17
17
  import type { ComposeViewLevel, BehaviorCanvasEntry, BehaviorWireEdgeData } from '../molecules/avl-behavior-compose-types';
18
18
  export interface FlowCanvasProps {
19
19
  schema: OrbitalSchema | string;
20
- mockData?: Record<string, unknown[]>;
20
+ mockData?: EntityData;
21
21
  className?: string;
22
22
  width?: number | string;
23
23
  height?: number | string;
@@ -8,7 +8,11 @@
8
8
  *
9
9
  * @packageDocumentation
10
10
  */
11
- import type { OrbitalSchema } from '@almadar/core';
11
+ import type { OrbitalSchema, JsonValue, JsonObject } from '@almadar/core';
12
+ interface SerializedEffect extends JsonObject {
13
+ type: string;
14
+ args: JsonValue[];
15
+ }
12
16
  export interface ApplicationOrbitalData {
13
17
  name: string;
14
18
  entityName: string;
@@ -32,13 +36,13 @@ export interface ApplicationLevelData {
32
36
  orbitals: ApplicationOrbitalData[];
33
37
  crossLinks: CrossLink[];
34
38
  }
35
- export interface FieldInfo {
39
+ export interface FieldInfo extends JsonObject {
36
40
  name: string;
37
41
  type: string;
38
42
  required: boolean;
39
43
  hasDefault: boolean;
40
44
  }
41
- export interface OrbitalTraitInfo {
45
+ export interface OrbitalTraitInfo extends JsonObject {
42
46
  name: string;
43
47
  stateCount: number;
44
48
  eventCount: number;
@@ -46,14 +50,14 @@ export interface OrbitalTraitInfo {
46
50
  emits: string[];
47
51
  listens: string[];
48
52
  }
49
- export interface OrbitalPageInfo {
53
+ export interface OrbitalPageInfo extends JsonObject {
50
54
  name: string;
51
55
  route: string;
52
56
  }
53
- export interface ExternalLink {
57
+ export interface ExternalLink extends JsonObject {
54
58
  targetOrbital: string;
55
59
  eventName: string;
56
- direction: 'out' | 'in';
60
+ direction: string;
57
61
  traitName: string;
58
62
  }
59
63
  export interface OrbitalLevelData {
@@ -67,23 +71,20 @@ export interface OrbitalLevelData {
67
71
  pages: OrbitalPageInfo[];
68
72
  externalLinks: ExternalLink[];
69
73
  }
70
- export interface TraitStateInfo {
74
+ export interface TraitStateInfo extends JsonObject {
71
75
  name: string;
72
- isInitial?: boolean;
73
- isTerminal?: boolean;
76
+ isInitial: boolean | null;
77
+ isTerminal: boolean | null;
74
78
  }
75
- export interface TraitTransitionInfo {
79
+ export interface TraitTransitionInfo extends JsonObject {
76
80
  from: string;
77
81
  to: string;
78
82
  event: string;
79
- guard?: unknown;
80
- effects: Array<{
81
- type: string;
82
- args: unknown[];
83
- }>;
83
+ guard: JsonValue | null;
84
+ effects: SerializedEffect[];
84
85
  index: number;
85
86
  }
86
- export interface TraitLevelData {
87
+ export interface TraitLevelData extends JsonObject {
87
88
  name: string;
88
89
  linkedEntity: string;
89
90
  states: TraitStateInfo[];
@@ -124,3 +125,4 @@ export declare function parseTraitLevel(schema: OrbitalSchema, orbitalName: stri
124
125
  * Parse a single transition for the detail view.
125
126
  */
126
127
  export declare function parseTransitionLevel(schema: OrbitalSchema, orbitalName: string, traitName: string, transitionIndex: number): TransitionLevelData | null;
128
+ export {};
@@ -25,5 +25,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
25
25
  label?: string;
26
26
  /** Disable the button (greys out, blocks click events) */
27
27
  disabled?: boolean;
28
+ /** Test identifier for automated tests */
29
+ 'data-testid'?: string;
28
30
  }
29
31
  export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -6,14 +6,15 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import { type SExpr } from '@almadar/evaluator';
9
+ import { type JsonObject } from '@almadar/core';
9
10
  /**
10
11
  * Context for conditional evaluation
11
12
  */
12
13
  export type ConditionalContext = {
13
- formValues: Record<string, unknown>;
14
- globalVariables: Record<string, unknown>;
15
- localVariables?: Record<string, unknown>;
16
- entity?: Record<string, unknown>;
14
+ formValues: JsonObject;
15
+ globalVariables: JsonObject;
16
+ localVariables?: JsonObject;
17
+ entity?: JsonObject;
17
18
  };
18
19
  export interface ConditionalWrapperProps {
19
20
  /** The S-expression condition to evaluate */
@@ -6,7 +6,7 @@
6
6
  * Pure UI molecule with no entity binding.
7
7
  */
8
8
  import React from 'react';
9
- import type { AssetUrl, EventEmit } from '@almadar/core';
9
+ import type { AssetUrl, EventEmit, JsonObject } from '@almadar/core';
10
10
  /** Default shape for carousel slide items when no generic is provided. */
11
11
  export interface CarouselItem {
12
12
  id?: string;
@@ -35,7 +35,7 @@ export interface CarouselProps<T = CarouselItem> {
35
35
  index: number;
36
36
  }>;
37
37
  /** Payload to include with the slide change event */
38
- slideChangePayload?: Record<string, unknown>;
38
+ slideChangePayload?: JsonObject;
39
39
  /** Additional CSS classes */
40
40
  className?: string;
41
41
  }
@@ -15,16 +15,17 @@
15
15
  */
16
16
  import React from "react";
17
17
  import type { UiError } from '../atoms/types';
18
+ import type { JsonValue } from '@almadar/core';
18
19
  export interface OrbitalVisualizationProps {
19
20
  /** Full KFlow schema object */
20
21
  schema?: {
21
- dataEntities?: unknown[];
22
+ dataEntities?: JsonValue[];
22
23
  ui?: {
23
24
  pages?: {
24
- sections?: unknown[];
25
+ sections?: JsonValue[];
25
26
  }[];
26
27
  };
27
- traits?: unknown[];
28
+ traits?: JsonValue[];
28
29
  };
29
30
  /** Direct complexity override (1-100+) */
30
31
  complexity?: number;
@@ -27,10 +27,10 @@ export interface PageHeaderStatus {
27
27
  variant?: "default" | "success" | "warning" | "danger" | "info";
28
28
  }
29
29
  export interface PageHeaderProps {
30
- /** Page title - accepts unknown to handle generated code accessing dynamic entity data */
31
- title?: string | number | unknown;
30
+ /** Page title - accepts string or number from generated code accessing dynamic entity data */
31
+ title?: string | number;
32
32
  /** Optional subtitle/description */
33
- subtitle?: string | number | unknown;
33
+ subtitle?: string | number;
34
34
  /** Show back button */
35
35
  showBack?: boolean;
36
36
  /** Event to emit when back is clicked (default: BACK) */
@@ -11,13 +11,14 @@
11
11
  * - Emits: UI:SECTION_REMOVED { sectionType, index, itemId }
12
12
  */
13
13
  import React from "react";
14
+ import type { JsonValue } from "@almadar/core";
14
15
  export type RepeatableItem = {
15
16
  id: string;
16
17
  /** State in which this item was added (for audit trails) */
17
- addedInState?: string;
18
+ addedInState: string | null;
18
19
  /** Timestamp when item was added */
19
- addedAt?: string;
20
- [key: string]: unknown;
20
+ addedAt: string | null;
21
+ [key: string]: JsonValue;
21
22
  };
22
23
  export interface RepeatableFormSectionProps {
23
24
  /** Section type identifier */
@@ -40,5 +40,7 @@ export interface ViolationAlertProps {
40
40
  compact?: boolean;
41
41
  /** Additional CSS classes */
42
42
  className?: string;
43
+ /** Fallback message from playground render-ui */
44
+ message?: string;
43
45
  }
44
46
  export declare const ViolationAlert: React.FC<ViolationAlertProps>;
@@ -7,6 +7,7 @@
7
7
  * Uses wireframe theme styling (high contrast, sharp edges).
8
8
  */
9
9
  import React from "react";
10
+ import type { JsonValue, JsonObject } from "@almadar/core";
10
11
  import type { UiError } from '../atoms/types';
11
12
  /** Form field definition for wizard sections */
12
13
  export interface WizardField {
@@ -20,38 +21,38 @@ export interface WizardField {
20
21
  label: string;
21
22
  isDefault?: boolean;
22
23
  }>;
23
- defaultValue?: unknown;
24
- condition?: unknown[];
24
+ defaultValue?: JsonValue;
25
+ condition?: JsonValue[];
25
26
  placeholder?: string;
26
27
  entityField?: string;
27
28
  minLength?: number;
28
29
  maxLength?: number;
29
- dataSource?: Record<string, unknown>;
30
+ dataSource?: JsonObject;
30
31
  displayFields?: string[];
31
- searchConfig?: Record<string, unknown>;
32
+ searchConfig?: JsonObject;
32
33
  hiddenCalculations?: Array<{
33
34
  variable: string;
34
- expression: unknown;
35
+ expression: string;
35
36
  scope?: string;
36
37
  }>;
37
- signatureConfig?: Record<string, unknown>;
38
- displayTemplate?: Record<string, unknown>;
39
- lawReference?: Record<string, unknown>;
38
+ signatureConfig?: JsonObject;
39
+ displayTemplate?: JsonObject;
40
+ lawReference?: JsonObject;
40
41
  contextMenu?: string[];
41
- calculated?: Record<string, unknown>;
42
+ calculated?: JsonObject;
42
43
  readOnly?: boolean;
43
- minDate?: unknown;
44
+ minDate?: JsonValue;
44
45
  stats?: Array<{
45
46
  label: string;
46
- value: unknown;
47
+ value: JsonValue;
47
48
  icon?: string;
48
49
  }>;
49
50
  items?: Array<{
50
51
  id: string;
51
52
  label: string;
52
- autoCheck?: unknown;
53
+ autoCheck?: JsonValue;
53
54
  }>;
54
- [key: string]: unknown;
55
+ [key: string]: JsonValue | undefined;
55
56
  }
56
57
  /** Section within a wizard step */
57
58
  export interface WizardSection {
@@ -60,18 +61,18 @@ export interface WizardSection {
60
61
  description?: string;
61
62
  fields?: WizardField[];
62
63
  subsections?: WizardSection[];
63
- condition?: unknown[];
64
+ condition?: JsonValue[];
64
65
  repeatable?: boolean;
65
66
  minItems?: number;
66
67
  addButtonLabel?: string;
67
68
  hiddenCalculations?: Array<{
68
69
  variable: string;
69
- expression: unknown;
70
+ expression: string;
70
71
  scope?: string;
71
72
  }>;
72
- dataSource?: Record<string, unknown>;
73
+ dataSource?: JsonObject;
73
74
  readOnly?: boolean;
74
- [key: string]: unknown;
75
+ [key: string]: JsonValue | WizardField[] | WizardSection[] | undefined;
75
76
  }
76
77
  /** Entity mapping configuration */
77
78
  export interface WizardEntityMapping {
@@ -79,11 +80,11 @@ export interface WizardEntityMapping {
79
80
  mode: "search_or_create" | "create_multiple" | "select_one" | "update" | string;
80
81
  parentField?: string;
81
82
  idField?: string;
82
- [key: string]: unknown;
83
+ [key: string]: JsonValue | undefined;
83
84
  }
84
85
  /** Validation rule for wizard steps */
85
86
  export interface WizardValidationRule {
86
- condition: unknown[];
87
+ condition: JsonValue[];
87
88
  message: string;
88
89
  }
89
90
  /** Law reference for compliance */
@@ -128,13 +129,13 @@ export interface WizardStep {
128
129
  /** Context menu actions */
129
130
  contextMenu?: string[];
130
131
  /** Allow additional properties from schema */
131
- [key: string]: unknown;
132
+ [key: string]: JsonValue | React.ReactNode | WizardSection[] | WizardEntityMapping | WizardValidationRule[] | WizardLawReference[] | (() => boolean) | undefined;
132
133
  }
133
134
  export interface WizardContainerProps {
134
135
  /** Wizard steps */
135
136
  steps: WizardStep[];
136
- /** Current step index (controlled) - accepts unknown for generated code compatibility */
137
- currentStep?: number | string | unknown;
137
+ /** Current step index (controlled) - accepts number or string for generated code compatibility */
138
+ currentStep?: number | string;
138
139
  /** Callback when step changes */
139
140
  onStepChange?: (stepIndex: number) => void;
140
141
  /** Callback when wizard is completed */
@@ -9,7 +9,7 @@
9
9
  * for pagination, filtering, or search. All state is owned by the trait state machine.
10
10
  */
11
11
  import React from 'react';
12
- import type { EventKey } from "@almadar/core";
12
+ import type { EventKey, EventPayload } from "@almadar/core";
13
13
  import type { DisplayStateProps } from './types';
14
14
  import type { EntityRow } from '@almadar/core';
15
15
  export type CardGridGap = 'none' | 'sm' | 'md' | 'lg' | 'xl';
@@ -24,7 +24,7 @@ export interface CardItemAction {
24
24
  /** Navigation URL - supports template interpolation like "/products/{{row.id}}" */
25
25
  navigatesTo?: string;
26
26
  /** Callback on click */
27
- onClick?: (item: unknown) => void;
27
+ onClick?: (item: EventPayload) => void;
28
28
  /** Action used by generated code - alternative to event */
29
29
  action?: EventKey;
30
30
  /** Action placement - accepts string for compatibility with generated code */