@almadar/ui 5.16.4 → 5.17.1

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 (106) hide show
  1. package/dist/avl/index.cjs +191 -153
  2. package/dist/avl/index.js +191 -153
  3. package/dist/components/atoms/Avatar.d.ts +4 -2
  4. package/dist/components/atoms/ConditionalWrapper.d.ts +2 -2
  5. package/dist/components/atoms/Icon.d.ts +6 -2
  6. package/dist/components/atoms/Input.d.ts +3 -2
  7. package/dist/components/atoms/LawReferenceTooltip.d.ts +2 -2
  8. package/dist/components/atoms/game/MiniMap.d.ts +15 -17
  9. package/dist/components/atoms/index.d.ts +1 -0
  10. package/dist/components/atoms/types.d.ts +40 -0
  11. package/dist/components/index.cjs +191 -153
  12. package/dist/components/index.js +191 -153
  13. package/dist/components/molecules/CTABanner.d.ts +3 -8
  14. package/dist/components/molecules/CalendarGrid.d.ts +2 -2
  15. package/dist/components/molecules/CommunityLinks.d.ts +15 -12
  16. package/dist/components/molecules/DataGrid.d.ts +2 -1
  17. package/dist/components/molecules/DataList.d.ts +12 -11
  18. package/dist/components/molecules/GraphView.d.ts +2 -2
  19. package/dist/components/molecules/HeroSection.d.ts +4 -12
  20. package/dist/components/molecules/MapView.d.ts +2 -2
  21. package/dist/components/molecules/MarketingFooter.d.ts +6 -5
  22. package/dist/components/molecules/Meter.d.ts +2 -1
  23. package/dist/components/molecules/OptionConstraintGroup.d.ts +5 -3
  24. package/dist/components/molecules/PricingCard.d.ts +2 -4
  25. package/dist/components/molecules/QrScanner.d.ts +2 -2
  26. package/dist/components/molecules/RepeatableFormSection.d.ts +2 -2
  27. package/dist/components/molecules/ShowcaseCard.d.ts +2 -4
  28. package/dist/components/molecules/SplitSection.d.ts +2 -4
  29. package/dist/components/molecules/StatDisplay.d.ts +2 -1
  30. package/dist/components/molecules/StatsGrid.d.ts +5 -4
  31. package/dist/components/molecules/TableView.d.ts +2 -1
  32. package/dist/components/molecules/ViolationAlert.d.ts +2 -2
  33. package/dist/components/molecules/game/CraftingRecipe.d.ts +11 -7
  34. package/dist/components/molecules/game/DialogueBox.d.ts +2 -2
  35. package/dist/components/molecules/game/HealthPanel.d.ts +6 -5
  36. package/dist/components/molecules/game/IsometricCanvas.d.ts +9 -13
  37. package/dist/components/organisms/Chart.d.ts +2 -1
  38. package/dist/components/organisms/CodeViewer.d.ts +8 -6
  39. package/dist/components/organisms/ComponentPatterns.d.ts +2 -1
  40. package/dist/components/organisms/ConfirmDialog.d.ts +2 -1
  41. package/dist/components/organisms/CustomPattern.d.ts +2 -1
  42. package/dist/components/organisms/DataTable.d.ts +6 -5
  43. package/dist/components/organisms/DetailPanel.d.ts +5 -4
  44. package/dist/components/organisms/DocumentViewer.d.ts +9 -7
  45. package/dist/components/organisms/DrawerSlot.d.ts +2 -1
  46. package/dist/components/organisms/Form.d.ts +5 -4
  47. package/dist/components/organisms/GraphCanvas.d.ts +2 -1
  48. package/dist/components/organisms/Header.d.ts +17 -14
  49. package/dist/components/organisms/JazariStateMachine.d.ts +2 -1
  50. package/dist/components/organisms/LayoutPatterns.d.ts +4 -3
  51. package/dist/components/organisms/List.d.ts +2 -2
  52. package/dist/components/organisms/Meter.d.ts +2 -1
  53. package/dist/components/organisms/ModalSlot.d.ts +2 -1
  54. package/dist/components/organisms/Navigation.d.ts +2 -1
  55. package/dist/components/organisms/OrbitalVisualization.d.ts +2 -1
  56. package/dist/components/organisms/PageHeader.d.ts +7 -5
  57. package/dist/components/organisms/Section.d.ts +2 -1
  58. package/dist/components/organisms/Sidebar.d.ts +2 -1
  59. package/dist/components/organisms/SignaturePad.d.ts +2 -1
  60. package/dist/components/organisms/Split.d.ts +2 -1
  61. package/dist/components/organisms/StateMachineView.d.ts +8 -4
  62. package/dist/components/organisms/Timeline.d.ts +2 -1
  63. package/dist/components/organisms/ToastSlot.d.ts +2 -1
  64. package/dist/components/organisms/UISlotRenderer.d.ts +4 -3
  65. package/dist/components/organisms/WizardContainer.d.ts +2 -1
  66. package/dist/components/organisms/book/types.d.ts +2 -2
  67. package/dist/components/organisms/game/BattleBoard.d.ts +4 -4
  68. package/dist/components/organisms/game/CanvasEffect.d.ts +2 -1
  69. package/dist/components/organisms/game/CastleBoard.d.ts +6 -5
  70. package/dist/components/organisms/game/GameAudioProvider.d.ts +2 -1
  71. package/dist/components/organisms/game/GameAudioToggle.d.ts +2 -1
  72. package/dist/components/organisms/game/TraitSlot.d.ts +4 -3
  73. package/dist/components/organisms/game/TraitStateViewer.d.ts +6 -5
  74. package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +9 -4
  75. package/dist/components/organisms/game/WorldMapBoard.d.ts +11 -9
  76. package/dist/components/organisms/game/physics-sim/SimulationControls.d.ts +8 -7
  77. package/dist/components/organisms/game/puzzles/builder/BuilderBoard.d.ts +3 -3
  78. package/dist/components/organisms/game/puzzles/classifier/ClassifierBoard.d.ts +3 -3
  79. package/dist/components/organisms/game/puzzles/debugger/DebuggerBoard.d.ts +3 -3
  80. package/dist/components/organisms/game/puzzles/event-handler/EventHandlerBoard.d.ts +7 -4
  81. package/dist/components/organisms/game/puzzles/event-handler/ObjectRulePanel.d.ts +2 -2
  82. package/dist/components/organisms/game/puzzles/event-handler/RuleEditor.d.ts +7 -9
  83. package/dist/components/organisms/game/puzzles/negotiator/NegotiatorBoard.d.ts +3 -3
  84. package/dist/components/organisms/game/puzzles/sequencer/SequencerBoard.d.ts +5 -4
  85. package/dist/components/organisms/game/puzzles/simulator/SimulatorBoard.d.ts +3 -3
  86. package/dist/components/organisms/game/puzzles/state-architect/StateArchitectBoard.d.ts +5 -4
  87. package/dist/components/organisms/game/puzzles/state-architect/StateNode.d.ts +2 -4
  88. package/dist/components/organisms/game/puzzles/state-architect/TransitionArrow.d.ts +3 -8
  89. package/dist/components/organisms/game/types/isometric.d.ts +4 -4
  90. package/dist/components/organisms/index.d.ts +1 -1
  91. package/dist/components/organisms/types.d.ts +3 -1
  92. package/dist/components/templates/DashboardLayout.d.ts +6 -5
  93. package/dist/components/templates/GameTemplate.d.ts +7 -6
  94. package/dist/components/templates/GenericAppTemplate.d.ts +1 -7
  95. package/dist/components/templates/types.d.ts +14 -6
  96. package/dist/docs/index.cjs +60 -22
  97. package/dist/docs/index.d.cts +9 -4
  98. package/dist/docs/index.js +58 -20
  99. package/dist/marketing/index.cjs +61 -23
  100. package/dist/marketing/index.d.cts +54 -55
  101. package/dist/marketing/index.js +58 -20
  102. package/dist/providers/index.cjs +191 -153
  103. package/dist/providers/index.js +191 -153
  104. package/dist/runtime/index.cjs +191 -153
  105. package/dist/runtime/index.js +191 -153
  106. package/package.json +1 -1
@@ -26,6 +26,7 @@
26
26
  import * as React from 'react';
27
27
  import type { EventEmit } from '@almadar/core';
28
28
  import type { CombatActionType, EffectAssetManifest } from './types/effects';
29
+ import type { UiError } from '../../atoms/types';
29
30
  export type { CombatActionType } from './types/effects';
30
31
  export type { EffectAssetManifest } from './types/effects';
31
32
  export interface CanvasEffectProps {
@@ -48,7 +49,7 @@ export interface CanvasEffectProps {
48
49
  /** Loading state indicator */
49
50
  isLoading?: boolean;
50
51
  /** Error state */
51
- error?: Error | null;
52
+ error?: UiError | null;
52
53
  /** Sprite URL for the effect (emoji fallback mode).
53
54
  * When set without assetManifest, renders this image instead of emoji. */
54
55
  effectSpriteUrl?: string;
@@ -13,7 +13,7 @@
13
13
  * @packageDocumentation
14
14
  */
15
15
  import React from 'react';
16
- import type { EventEmit } from '@almadar/core';
16
+ import type { EventEmit, EntityRow } from '@almadar/core';
17
17
  import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
18
18
  /** Entity shape consumed by CastleBoard */
19
19
  export interface CastleEntity {
@@ -30,7 +30,7 @@ export interface CastleEntity {
30
30
  backgroundImage?: string;
31
31
  }
32
32
  /** Context exposed to render-prop slots */
33
- export interface CastleSlotContext {
33
+ export type CastleSlotContext = {
34
34
  /** Currently hovered tile coordinates (null when not hovering) */
35
35
  hoveredTile: {
36
36
  x: number;
@@ -51,10 +51,11 @@ export interface CastleSlotContext {
51
51
  };
52
52
  /** Canvas scale */
53
53
  scale: number;
54
- }
54
+ };
55
55
  export interface CastleBoardProps {
56
- /** Castle entity data */
57
- entity: CastleEntity;
56
+ /** Castle entity data. Also accepts the canonical `EntityRow` the compiler
57
+ * binds (and arrays); narrowed to `CastleEntity` internally. */
58
+ entity?: CastleEntity | EntityRow | readonly (CastleEntity | EntityRow)[];
58
59
  /** Canvas render scale */
59
60
  scale?: number;
60
61
  /** Top bar / header */
@@ -18,6 +18,7 @@
18
18
  */
19
19
  import React from 'react';
20
20
  import { type AudioManifest, type GameAudioControls } from './hooks/useGameAudio';
21
+ import type { UiError } from '../../atoms/types';
21
22
  export type GameAudioContextValue = Pick<GameAudioControls, 'muted' | 'setMuted' | 'masterVolume' | 'setMasterVolume' | 'play' | 'playMusic' | 'stopMusic'>;
22
23
  export declare const GameAudioContext: React.Context<GameAudioContextValue | null>;
23
24
  /**
@@ -37,7 +38,7 @@ export interface GameAudioProviderProps {
37
38
  /** Closed-circuit props (unused, accepted for runtime compatibility) */
38
39
  className?: string;
39
40
  isLoading?: boolean;
40
- error?: Error | null;
41
+ error?: UiError | null;
41
42
  entity?: string;
42
43
  }
43
44
  export declare function GameAudioProvider({ manifest, baseUrl, children, initialMuted, }: GameAudioProviderProps): React.JSX.Element;
@@ -9,6 +9,7 @@
9
9
  * @packageDocumentation
10
10
  */
11
11
  import React from 'react';
12
+ import type { UiError } from '../../atoms/types';
12
13
  export interface GameAudioToggleProps {
13
14
  /** Button size */
14
15
  size?: 'sm' | 'md' | 'lg';
@@ -17,7 +18,7 @@ export interface GameAudioToggleProps {
17
18
  /** Loading state (passed through) */
18
19
  isLoading?: boolean;
19
20
  /** Error state (passed through) */
20
- error?: Error | null;
21
+ error?: UiError | null;
21
22
  /** Entity name for schema-driven auto-fetch */
22
23
  entity?: string;
23
24
  }
@@ -20,8 +20,9 @@
20
20
  import React from 'react';
21
21
  import type { EventEmit } from '@almadar/core';
22
22
  import { type TraitStateMachineDefinition } from './TraitStateViewer';
23
+ import type { UiError } from '../../atoms/types';
23
24
  /** Data shape for a slot's equipped item */
24
- export interface SlotItemData {
25
+ export type SlotItemData = {
25
26
  id: string;
26
27
  name: string;
27
28
  category: string;
@@ -32,7 +33,7 @@ export interface SlotItemData {
32
33
  iconUrl?: string;
33
34
  /** Optional state machine for tooltip display */
34
35
  stateMachine?: TraitStateMachineDefinition;
35
- }
36
+ };
36
37
  /** Event Contract:
37
38
  * Emits: UI:CLICK
38
39
  * Emits: UI:REMOVE
@@ -64,7 +65,7 @@ export interface TraitSlotProps {
64
65
  /** Loading state */
65
66
  isLoading?: boolean;
66
67
  /** Error state */
67
- error?: Error | null;
68
+ error?: UiError | null;
68
69
  /** Entity name for schema-driven auto-fetch */
69
70
  entity?: string;
70
71
  /** Called when an item is dropped on this slot */
@@ -11,19 +11,20 @@
11
11
  */
12
12
  import React from 'react';
13
13
  import { type StateStyle } from '../../atoms/game/StateIndicator';
14
- export interface TraitTransition {
14
+ import type { UiError } from '../../atoms/types';
15
+ export type TraitTransition = {
15
16
  from: string;
16
17
  to: string;
17
18
  event: string;
18
19
  guardHint?: string;
19
- }
20
- export interface TraitStateMachineDefinition {
20
+ };
21
+ export type TraitStateMachineDefinition = {
21
22
  name: string;
22
23
  states: string[];
23
24
  currentState: string;
24
25
  transitions: TraitTransition[];
25
26
  description?: string;
26
- }
27
+ };
27
28
  export interface TraitStateViewerProps {
28
29
  /** The trait / state machine to visualize */
29
30
  trait: TraitStateMachineDefinition;
@@ -42,7 +43,7 @@ export interface TraitStateViewerProps {
42
43
  /** Loading state */
43
44
  isLoading?: boolean;
44
45
  /** Error state */
45
- error?: Error | null;
46
+ error?: UiError | null;
46
47
  /** Entity name for schema-driven auto-fetch */
47
48
  entity?: string;
48
49
  }
@@ -13,13 +13,18 @@
13
13
  *
14
14
  * @packageDocumentation
15
15
  */
16
+ import * as React from 'react';
17
+ import type { EntityRow } from '@almadar/core';
16
18
  import { type BattleBoardProps, type BattleUnit } from './BattleBoard';
19
+ /** Uncontrolled entity read-shape: controlled game-state fields are dropped in
20
+ * favor of `initialUnits`, which the internal `useBattleState` hook manages. */
21
+ export type UncontrolledBattleEntity = Omit<BattleBoardProps['entity'], 'units' | 'phase' | 'turn' | 'gameResult' | 'selectedUnitId'> & {
22
+ initialUnits: BattleUnit[];
23
+ };
17
24
  export interface UncontrolledBattleBoardProps extends Omit<BattleBoardProps, 'entity'> {
18
- entity: Omit<BattleBoardProps['entity'], 'units' | 'phase' | 'turn' | 'gameResult' | 'selectedUnitId'> & {
19
- initialUnits: BattleUnit[];
20
- };
25
+ entity?: UncontrolledBattleEntity | EntityRow | readonly (UncontrolledBattleEntity | EntityRow)[];
21
26
  }
22
- export declare function UncontrolledBattleBoard({ entity, ...rest }: UncontrolledBattleBoardProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function UncontrolledBattleBoard({ entity, ...rest }: UncontrolledBattleBoardProps): React.JSX.Element | null;
23
28
  export declare namespace UncontrolledBattleBoard {
24
29
  var displayName: string;
25
30
  }
@@ -19,9 +19,10 @@
19
19
  * @packageDocumentation
20
20
  */
21
21
  import React from 'react';
22
- import type { EventEmit } from '@almadar/core';
22
+ import type { EventEmit, EntityRow, FieldValue } from '@almadar/core';
23
23
  import type { IsometricFeature } from './types/isometric';
24
24
  import type { ResolvedFrame } from './types/spriteAnimation';
25
+ import type { UiError } from '../../atoms/types';
25
26
  /** A hero on the world map */
26
27
  export interface MapHero {
27
28
  id: string;
@@ -43,17 +44,17 @@ export interface MapHero {
43
44
  level?: number;
44
45
  }
45
46
  /** A hex on the map */
46
- export interface MapHex {
47
+ export type MapHex = {
47
48
  x: number;
48
49
  y: number;
49
50
  terrain: string;
50
51
  terrainSprite?: string;
51
52
  feature?: string;
52
- featureData?: Record<string, unknown>;
53
+ featureData?: Record<string, FieldValue | undefined>;
53
54
  passable?: boolean;
54
- }
55
+ };
55
56
  /** Context exposed to render-prop slots */
56
- export interface WorldMapSlotContext {
57
+ export type WorldMapSlotContext = {
57
58
  /** Currently hovered tile */
58
59
  hoveredTile: {
59
60
  x: number;
@@ -79,7 +80,7 @@ export interface WorldMapSlotContext {
79
80
  };
80
81
  /** Canvas scale */
81
82
  scale: number;
82
- }
83
+ };
83
84
  /** Entity shape for the WorldMapBoard */
84
85
  export interface WorldMapEntity {
85
86
  id: string;
@@ -108,9 +109,10 @@ export interface WorldMapBoardProps {
108
109
  /** Loading state indicator */
109
110
  isLoading?: boolean;
110
111
  /** Error state */
111
- error?: Error | null;
112
- /** World map entity data */
113
- entity?: WorldMapEntity | readonly WorldMapEntity[];
112
+ error?: UiError | null;
113
+ /** World map entity data. Also accepts the canonical `EntityRow` the
114
+ * compiler binds; the component narrows to `WorldMapEntity` below. */
115
+ entity?: WorldMapEntity | EntityRow | readonly (WorldMapEntity | EntityRow)[];
114
116
  /** Canvas render scale */
115
117
  scale?: number;
116
118
  /** Unit draw-size multiplier */
@@ -4,16 +4,17 @@
4
4
  * Play/pause/step/reset controls with speed and parameter sliders.
5
5
  */
6
6
  import React from 'react';
7
+ export interface SimulationParameter {
8
+ value: number;
9
+ min: number;
10
+ max: number;
11
+ step: number;
12
+ label: string;
13
+ }
7
14
  export interface SimulationControlsProps {
8
15
  running: boolean;
9
16
  speed: number;
10
- parameters: Record<string, {
11
- value: number;
12
- min: number;
13
- max: number;
14
- step: number;
15
- label: string;
16
- }>;
17
+ parameters: Record<string, SimulationParameter>;
17
18
  onPlay: () => void;
18
19
  onPause: () => void;
19
20
  onStep: () => void;
@@ -9,7 +9,7 @@
9
9
  * Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
10
10
  */
11
11
  import React from 'react';
12
- import type { EventEmit } from '@almadar/core';
12
+ import type { EventEmit, EntityRow } from '@almadar/core';
13
13
  import type { EntityDisplayProps } from '../../../types';
14
14
  export interface BuilderComponent {
15
15
  id: string;
@@ -44,13 +44,13 @@ export interface BuilderPuzzleEntity {
44
44
  };
45
45
  }
46
46
  export interface BuilderBoardProps extends Omit<EntityDisplayProps, 'entity'> {
47
- entity: BuilderPuzzleEntity;
47
+ entity?: BuilderPuzzleEntity | EntityRow | readonly (BuilderPuzzleEntity | EntityRow)[];
48
48
  completeEvent?: EventEmit<{
49
49
  success: boolean;
50
50
  attempts: number;
51
51
  }>;
52
52
  }
53
- export declare function BuilderBoard({ entity, completeEvent, className, }: BuilderBoardProps): React.JSX.Element;
53
+ export declare function BuilderBoard({ entity, completeEvent, className, }: BuilderBoardProps): React.JSX.Element | null;
54
54
  export declare namespace BuilderBoard {
55
55
  var displayName: string;
56
56
  }
@@ -10,7 +10,7 @@
10
10
  * Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
11
11
  */
12
12
  import React from 'react';
13
- import type { EventEmit } from '@almadar/core';
13
+ import type { EventEmit, EntityRow } from '@almadar/core';
14
14
  import type { EntityDisplayProps } from '../../../types';
15
15
  export interface ClassifierItem {
16
16
  id: string;
@@ -45,13 +45,13 @@ export interface ClassifierPuzzleEntity {
45
45
  };
46
46
  }
47
47
  export interface ClassifierBoardProps extends Omit<EntityDisplayProps, 'entity'> {
48
- entity: ClassifierPuzzleEntity;
48
+ entity?: ClassifierPuzzleEntity | EntityRow | readonly (ClassifierPuzzleEntity | EntityRow)[];
49
49
  completeEvent?: EventEmit<{
50
50
  success: boolean;
51
51
  attempts: number;
52
52
  }>;
53
53
  }
54
- export declare function ClassifierBoard({ entity, completeEvent, className, }: ClassifierBoardProps): React.JSX.Element;
54
+ export declare function ClassifierBoard({ entity, completeEvent, className, }: ClassifierBoardProps): React.JSX.Element | null;
55
55
  export declare namespace ClassifierBoard {
56
56
  var displayName: string;
57
57
  }
@@ -9,7 +9,7 @@
9
9
  * Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
10
10
  */
11
11
  import React from 'react';
12
- import type { EventEmit } from '@almadar/core';
12
+ import type { EventEmit, EntityRow } from '@almadar/core';
13
13
  import type { EntityDisplayProps } from '../../../types';
14
14
  export interface DebuggerLine {
15
15
  id: string;
@@ -37,13 +37,13 @@ export interface DebuggerPuzzleEntity {
37
37
  };
38
38
  }
39
39
  export interface DebuggerBoardProps extends Omit<EntityDisplayProps, 'entity'> {
40
- entity: DebuggerPuzzleEntity;
40
+ entity?: DebuggerPuzzleEntity | EntityRow | readonly (DebuggerPuzzleEntity | EntityRow)[];
41
41
  completeEvent?: EventEmit<{
42
42
  success: boolean;
43
43
  attempts: number;
44
44
  }>;
45
45
  }
46
- export declare function DebuggerBoard({ entity, completeEvent, className, }: DebuggerBoardProps): React.JSX.Element;
46
+ export declare function DebuggerBoard({ entity, completeEvent, className, }: DebuggerBoardProps): React.JSX.Element | null;
47
47
  export declare namespace DebuggerBoard {
48
48
  var displayName: string;
49
49
  }
@@ -11,7 +11,7 @@
11
11
  * @packageDocumentation
12
12
  */
13
13
  import React from 'react';
14
- import type { EventEmit } from '@almadar/core';
14
+ import type { EventEmit, EntityRow } from '@almadar/core';
15
15
  import type { EntityDisplayProps } from '../../../types';
16
16
  import { type PuzzleObjectDef } from './ObjectRulePanel';
17
17
  export interface EventHandlerPuzzleEntity {
@@ -40,8 +40,11 @@ export interface EventHandlerPuzzleEntity {
40
40
  };
41
41
  }
42
42
  export interface EventHandlerBoardProps extends Omit<EntityDisplayProps, 'entity'> {
43
- /** Puzzle data */
44
- entity: EventHandlerPuzzleEntity;
43
+ /** Puzzle data. The compiler binds the generic `EntityRow`, so the inlet
44
+ * accepts it (and arrays) as union members; the component narrows to its
45
+ * curated `EventHandlerPuzzleEntity` read-shape below (a valid
46
+ * union-narrow) and renders nothing until a puzzle entity is present. */
47
+ entity?: EventHandlerPuzzleEntity | EntityRow | readonly (EventHandlerPuzzleEntity | EntityRow)[];
45
48
  /** Playback speed in ms per event */
46
49
  stepDurationMs?: number;
47
50
  /** Emits UI:{playEvent} */
@@ -51,7 +54,7 @@ export interface EventHandlerBoardProps extends Omit<EntityDisplayProps, 'entity
51
54
  success: boolean;
52
55
  }>;
53
56
  }
54
- export declare function EventHandlerBoard({ entity, stepDurationMs, playEvent, completeEvent, className, }: EventHandlerBoardProps): React.JSX.Element;
57
+ export declare function EventHandlerBoard({ entity, stepDurationMs, playEvent, completeEvent, className, }: EventHandlerBoardProps): React.JSX.Element | null;
55
58
  export declare namespace EventHandlerBoard {
56
59
  var displayName: string;
57
60
  }
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import React from 'react';
11
11
  import { type RuleDefinition } from './RuleEditor';
12
- export interface PuzzleObjectDef {
12
+ export type PuzzleObjectDef = {
13
13
  id: string;
14
14
  name: string;
15
15
  icon: string;
@@ -27,7 +27,7 @@ export interface PuzzleObjectDef {
27
27
  rules: RuleDefinition[];
28
28
  /** Max rules allowed on this object */
29
29
  maxRules?: number;
30
- }
30
+ };
31
31
  export interface ObjectRulePanelProps {
32
32
  /** The selected object */
33
33
  object: PuzzleObjectDef;
@@ -7,24 +7,22 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
- export interface RuleDefinition {
10
+ export type RuleDefinition = {
11
11
  id: string;
12
12
  whenEvent: string;
13
13
  thenAction: string;
14
+ };
15
+ export interface RuleOption {
16
+ value: string;
17
+ label: string;
14
18
  }
15
19
  export interface RuleEditorProps {
16
20
  /** The current rule */
17
21
  rule: RuleDefinition;
18
22
  /** Available event triggers to listen for */
19
- availableEvents: Array<{
20
- value: string;
21
- label: string;
22
- }>;
23
+ availableEvents: RuleOption[];
23
24
  /** Available actions to perform */
24
- availableActions: Array<{
25
- value: string;
26
- label: string;
27
- }>;
25
+ availableActions: RuleOption[];
28
26
  /** Called when rule changes */
29
27
  onChange: (rule: RuleDefinition) => void;
30
28
  /** Called when rule is removed */
@@ -11,7 +11,7 @@
11
11
  * Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
12
12
  */
13
13
  import React from 'react';
14
- import type { EventEmit } from '@almadar/core';
14
+ import type { EventEmit, EntityRow } from '@almadar/core';
15
15
  import type { EntityDisplayProps } from '../../../types';
16
16
  export interface NegotiatorAction {
17
17
  id: string;
@@ -46,13 +46,13 @@ export interface NegotiatorPuzzleEntity {
46
46
  };
47
47
  }
48
48
  export interface NegotiatorBoardProps extends Omit<EntityDisplayProps, 'entity'> {
49
- entity: NegotiatorPuzzleEntity;
49
+ entity?: NegotiatorPuzzleEntity | EntityRow | readonly (NegotiatorPuzzleEntity | EntityRow)[];
50
50
  completeEvent?: EventEmit<{
51
51
  success: boolean;
52
52
  score: number;
53
53
  }>;
54
54
  }
55
- export declare function NegotiatorBoard({ entity, completeEvent, className, }: NegotiatorBoardProps): React.JSX.Element;
55
+ export declare function NegotiatorBoard({ entity, completeEvent, className, }: NegotiatorBoardProps): React.JSX.Element | null;
56
56
  export declare namespace NegotiatorBoard {
57
57
  var displayName: string;
58
58
  }
@@ -18,7 +18,7 @@
18
18
  * @packageDocumentation
19
19
  */
20
20
  import React from 'react';
21
- import type { EventEmit } from '@almadar/core';
21
+ import type { EventEmit, EntityRow } from '@almadar/core';
22
22
  import type { SlotItemData } from '../../TraitSlot';
23
23
  import type { EntityDisplayProps } from '../../../types';
24
24
  export interface SequencerPuzzleEntity {
@@ -52,8 +52,9 @@ export interface SequencerPuzzleEntity {
52
52
  };
53
53
  }
54
54
  export interface SequencerBoardProps extends Omit<EntityDisplayProps, 'entity'> {
55
- /** Puzzle data */
56
- entity: SequencerPuzzleEntity;
55
+ /** Puzzle data. Also accepts the canonical `EntityRow` the compiler binds
56
+ * (and arrays); narrowed to `SequencerPuzzleEntity` internally. */
57
+ entity?: SequencerPuzzleEntity | EntityRow | readonly (SequencerPuzzleEntity | EntityRow)[];
57
58
  /** Category → color mapping */
58
59
  categoryColors?: Record<string, {
59
60
  bg: string;
@@ -71,7 +72,7 @@ export interface SequencerBoardProps extends Omit<EntityDisplayProps, 'entity'>
71
72
  sequence: string[];
72
73
  }>;
73
74
  }
74
- export declare function SequencerBoard({ entity, categoryColors, stepDurationMs, playEvent, completeEvent, className, }: SequencerBoardProps): React.JSX.Element;
75
+ export declare function SequencerBoard({ entity, categoryColors, stepDurationMs, playEvent, completeEvent, className, }: SequencerBoardProps): React.JSX.Element | null;
75
76
  export declare namespace SequencerBoard {
76
77
  var displayName: string;
77
78
  }
@@ -10,7 +10,7 @@
10
10
  * Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
11
11
  */
12
12
  import React from 'react';
13
- import type { EventEmit } from '@almadar/core';
13
+ import type { EventEmit, EntityRow } from '@almadar/core';
14
14
  import type { EntityDisplayProps } from '../../../types';
15
15
  export interface SimulatorParameter {
16
16
  id: string;
@@ -46,13 +46,13 @@ export interface SimulatorPuzzleEntity {
46
46
  };
47
47
  }
48
48
  export interface SimulatorBoardProps extends Omit<EntityDisplayProps, 'entity'> {
49
- entity: SimulatorPuzzleEntity;
49
+ entity?: SimulatorPuzzleEntity | EntityRow | readonly (SimulatorPuzzleEntity | EntityRow)[];
50
50
  completeEvent?: EventEmit<{
51
51
  success: boolean;
52
52
  attempts: number;
53
53
  }>;
54
54
  }
55
- export declare function SimulatorBoard({ entity, completeEvent, className, }: SimulatorBoardProps): React.JSX.Element;
55
+ export declare function SimulatorBoard({ entity, completeEvent, className, }: SimulatorBoardProps): React.JSX.Element | null;
56
56
  export declare namespace SimulatorBoard {
57
57
  var displayName: string;
58
58
  }
@@ -8,7 +8,7 @@
8
8
  * @packageDocumentation
9
9
  */
10
10
  import React from 'react';
11
- import type { EventEmit } from '@almadar/core';
11
+ import type { EventEmit, EntityRow } from '@almadar/core';
12
12
  import type { EntityDisplayProps } from '../../../types';
13
13
  import { type VariableDef } from './VariablePanel';
14
14
  export interface StateArchitectTransition {
@@ -61,8 +61,9 @@ export interface StateArchitectPuzzleEntity {
61
61
  };
62
62
  }
63
63
  export interface StateArchitectBoardProps extends Omit<EntityDisplayProps, 'entity'> {
64
- /** Puzzle data */
65
- entity: StateArchitectPuzzleEntity;
64
+ /** Puzzle data. Also accepts the canonical `EntityRow` the compiler binds
65
+ * (and arrays); narrowed to `StateArchitectPuzzleEntity` internally. */
66
+ entity?: StateArchitectPuzzleEntity | EntityRow | readonly (StateArchitectPuzzleEntity | EntityRow)[];
66
67
  /** Playback speed */
67
68
  stepDurationMs?: number;
68
69
  /** Emits UI:{testEvent} */
@@ -73,7 +74,7 @@ export interface StateArchitectBoardProps extends Omit<EntityDisplayProps, 'enti
73
74
  passedTests: number;
74
75
  }>;
75
76
  }
76
- export declare function StateArchitectBoard({ entity, stepDurationMs, testEvent, completeEvent, className, }: StateArchitectBoardProps): React.JSX.Element;
77
+ export declare function StateArchitectBoard({ entity, stepDurationMs, testEvent, completeEvent, className, }: StateArchitectBoardProps): React.JSX.Element | null;
77
78
  export declare namespace StateArchitectBoard {
78
79
  var displayName: string;
79
80
  }
@@ -7,6 +7,7 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
+ import { type Point } from '../../../../atoms';
10
11
  export interface StateNodeProps {
11
12
  /** State name */
12
13
  name: string;
@@ -17,10 +18,7 @@ export interface StateNodeProps {
17
18
  /** Whether this is the initial state */
18
19
  isInitial?: boolean;
19
20
  /** Position on the graph canvas */
20
- position: {
21
- x: number;
22
- y: number;
23
- };
21
+ position: Point;
24
22
  /** Click handler */
25
23
  onClick?: () => void;
26
24
  /** Additional CSS classes */
@@ -7,17 +7,12 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
+ import type { Point } from '../../../../atoms/types';
10
11
  export interface TransitionArrowProps {
11
12
  /** Start position (center of from-node) */
12
- from: {
13
- x: number;
14
- y: number;
15
- };
13
+ from: Point;
16
14
  /** End position (center of to-node) */
17
- to: {
18
- x: number;
19
- y: number;
20
- };
15
+ to: Point;
21
16
  /** Event label shown on the arrow */
22
17
  eventLabel: string;
23
18
  /** Guard hint shown below event */
@@ -32,7 +32,7 @@ export interface IsometricTile {
32
32
  elevation?: number;
33
33
  }
34
34
  /** A unit positioned on the isometric grid */
35
- export interface IsometricUnit {
35
+ export type IsometricUnit = {
36
36
  /** Unique unit identifier */
37
37
  id: string;
38
38
  /** Current grid position (2D format) */
@@ -76,9 +76,9 @@ export interface IsometricUnit {
76
76
  };
77
77
  /** Elevation offset for 3D rendering */
78
78
  elevation?: number;
79
- }
79
+ };
80
80
  /** A map feature (resource, building, portal, etc.) */
81
- export interface IsometricFeature {
81
+ export type IsometricFeature = {
82
82
  /** Optional unique identifier (required for 3D rendering) */
83
83
  id?: string;
84
84
  /** Grid x coordinate */
@@ -97,7 +97,7 @@ export interface IsometricFeature {
97
97
  color?: string;
98
98
  /** Elevation offset for 3D rendering */
99
99
  elevation?: number;
100
- }
100
+ };
101
101
  /** Camera state for pan/zoom */
102
102
  export interface CameraState {
103
103
  /** Camera X offset in pixels */
@@ -1,4 +1,4 @@
1
- export { type EntityDisplayProps, EntityDisplayEvents, type SortPayload, type PaginatePayload, type SearchPayload, type FilterPayload, type SelectPayload, } from "./types";
1
+ export { type EntityDisplayProps, type UiError, EntityDisplayEvents, type SortPayload, type PaginatePayload, type SearchPayload, type FilterPayload, type SelectPayload, } from "./types";
2
2
  export { DataTable, type DataTableProps, type Column, type RowAction, } from "./DataTable";
3
3
  export { StatCard, type StatCardProps } from "./StatCard";
4
4
  export { PageHeader, type PageHeaderProps, type PageBreadcrumb, } from "./PageHeader";
@@ -8,6 +8,8 @@
8
8
  * This is the ONE allowed exception — documented here.
9
9
  */
10
10
  import type { EntityRow, EntityInlet } from '@almadar/core';
11
+ import type { UiError } from '../atoms/types';
12
+ export type { UiError };
11
13
  export declare const EntityDisplayEvents: {
12
14
  readonly SORT: "SORT";
13
15
  readonly PAGINATE: "PAGINATE";
@@ -67,7 +69,7 @@ export interface EntityDisplayProps<T extends EntityRow = EntityRow> {
67
69
  /** Loading state indicator */
68
70
  isLoading?: boolean;
69
71
  /** Error state */
70
- error?: Error | null;
72
+ error?: UiError | null;
71
73
  /** Current sort field */
72
74
  sortBy?: string;
73
75
  /** Current sort direction */
@@ -39,6 +39,11 @@ export interface TopBarAction {
39
39
  /** Visual variant. Default `"default"`. */
40
40
  variant?: "default" | "primary" | "danger";
41
41
  }
42
+ export interface DashboardUser {
43
+ name: string;
44
+ email: string;
45
+ avatar?: string;
46
+ }
42
47
  export interface DashboardLayoutProps {
43
48
  /** App name shown in sidebar */
44
49
  appName?: string;
@@ -48,11 +53,7 @@ export interface DashboardLayoutProps {
48
53
  * as a navItems entry, not depend on baked-in chrome. */
49
54
  navItems?: NavItem[];
50
55
  /** Current user info (optional - auto-populated from auth context if not provided) */
51
- user?: {
52
- name: string;
53
- email: string;
54
- avatar?: string;
55
- };
56
+ user?: DashboardUser;
56
57
  /** Header actions (extra slots beyond bell/search/theme). */
57
58
  headerActions?: React.ReactNode;
58
59
  /** Show the top-bar search box. Default `false` — opt in by setting