@almadar/ui 2.1.2 → 2.1.4

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.
@@ -3,6 +3,7 @@ import React__default, { ReactNode, ErrorInfo } from 'react';
3
3
  import { LucideIcon } from 'lucide-react';
4
4
  import { SExpr } from '@almadar/evaluator';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
+ import { OrbitalEntity } from '@almadar/core';
6
7
  import { b as DomLayoutData, d as DomStateNode, V as VisualizerConfig, e as DomTransitionLabel, C as ContentSegment } from '../cn-BoBXsxuX.js';
7
8
  export { h as cn } from '../cn-BoBXsxuX.js';
8
9
  import { I as IsometricTile, a as IsometricUnit, b as IsometricFeature, C as CameraState } from '../isometric-ynNHVPZx.js';
@@ -13,7 +14,6 @@ import { S as SlotContent, a as UISlot } from '../useUISlots-D0mttBSP.js';
13
14
  export { D as DEFAULT_SLOTS, R as RenderUIConfig, b as SlotAnimation, c as SlotChangeCallback, U as UISlotManager, u as useUISlotManager } from '../useUISlots-D0mttBSP.js';
14
15
  export { Entity, clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../stores/index.js';
15
16
  import 'clsx';
16
- import '@almadar/core';
17
17
  import '@tanstack/react-query';
18
18
 
19
19
  type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "success" | "warning" | "default";
@@ -2543,10 +2543,8 @@ interface SelectPayload {
2543
2543
  ids: (string | number)[];
2544
2544
  }
2545
2545
  interface EntityDisplayProps<T = unknown> {
2546
- /** Entity name for schema-driven integration */
2547
- entity?: string;
2548
- /** Data array provided by the trait via render-ui */
2549
- data?: readonly T[] | T[];
2546
+ /** Entity data injected by the runtime (array for lists, single object for detail) */
2547
+ entity?: T | readonly T[];
2550
2548
  /** Additional CSS classes */
2551
2549
  className?: string;
2552
2550
  /** Loading state indicator */
@@ -2627,7 +2625,7 @@ interface DataTableProps<T extends {
2627
2625
  }
2628
2626
  declare function DataTable<T extends {
2629
2627
  id: string | number;
2630
- }>({ fields, columns, data, entity, itemActions, isLoading, error, emptyIcon, emptyTitle, emptyDescription, emptyAction, selectable, selectedIds, sortBy, sortDirection, searchable, searchValue, searchPlaceholder, page, pageSize, totalCount, rowActions: externalRowActions, bulkActions, headerActions, showTotal, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2628
+ }>({ fields, columns, entity, itemActions, isLoading, error, emptyIcon, emptyTitle, emptyDescription, emptyAction, selectable, selectedIds, sortBy, sortDirection, searchable, searchValue, searchPlaceholder, page, pageSize, totalCount, rowActions: externalRowActions, bulkActions, headerActions, showTotal, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2631
2629
  declare namespace DataTable {
2632
2630
  var displayName: string;
2633
2631
  }
@@ -2648,7 +2646,7 @@ interface MetricDefinition {
2648
2646
  /** Value format (e.g., 'currency', 'percent', 'number') */
2649
2647
  format?: "currency" | "percent" | "number" | string;
2650
2648
  }
2651
- interface StatCardProps {
2649
+ interface StatCardProps extends EntityDisplayProps<Record<string, unknown>> {
2652
2650
  /** Main label */
2653
2651
  label?: string;
2654
2652
  /** Title (alias for label) */
@@ -2683,17 +2681,8 @@ interface StatCardProps {
2683
2681
  /** Legacy onClick callback */
2684
2682
  onClick?: () => void;
2685
2683
  };
2686
- className?: string;
2687
- /** Entity name for schema-driven stats */
2688
- entity?: string;
2689
2684
  /** Metrics to display (schema format) - accepts readonly for compatibility with generated const arrays */
2690
2685
  metrics?: readonly MetricDefinition[];
2691
- /** Data to calculate stats from - accepts readonly for compatibility with generated const arrays */
2692
- data?: readonly Record<string, unknown>[];
2693
- /** Loading state indicator */
2694
- isLoading?: boolean;
2695
- /** Error state */
2696
- error?: Error | null;
2697
2686
  }
2698
2687
  declare const StatCard: React__default.FC<StatCardProps>;
2699
2688
 
@@ -2760,7 +2749,7 @@ declare const PageHeader: React__default.FC<PageHeaderProps>;
2760
2749
  *
2761
2750
  * Composes atoms and molecules to create a professional detail view.
2762
2751
  *
2763
- * Data is provided by the trait via the `data` prop (render-ui effect).
2752
+ * Data is provided by the runtime via the `entity` prop.
2764
2753
  * See EntityDisplayProps in ./types.ts for base prop contract.
2765
2754
  */
2766
2755
 
@@ -2795,7 +2784,7 @@ type FieldDef$2 = string | {
2795
2784
  key: string;
2796
2785
  header?: string;
2797
2786
  };
2798
- interface DetailPanelProps extends Omit<EntityDisplayProps<Record<string, unknown>>, 'data'> {
2787
+ interface DetailPanelProps extends EntityDisplayProps<Record<string, unknown>> {
2799
2788
  title?: string;
2800
2789
  subtitle?: string;
2801
2790
  status?: {
@@ -2812,8 +2801,6 @@ interface DetailPanelProps extends Omit<EntityDisplayProps<Record<string, unknow
2812
2801
  fields?: readonly (FieldDef$2 | DetailField)[];
2813
2802
  /** Alias for fields - backwards compatibility */
2814
2803
  fieldNames?: readonly string[];
2815
- /** Data object provided by the trait via render-ui */
2816
- data?: Record<string, unknown> | unknown;
2817
2804
  /** Initial data for edit mode (passed by compiler) */
2818
2805
  initialData?: Record<string, unknown> | unknown;
2819
2806
  /** Display mode (passed by compiler) */
@@ -3015,8 +3002,8 @@ interface FormProps extends Omit<React__default.FormHTMLAttributes<HTMLFormEleme
3015
3002
  gap?: "sm" | "md" | "lg";
3016
3003
  /** Additional CSS classes */
3017
3004
  className?: string;
3018
- /** Entity type name (schema format) */
3019
- entity?: string;
3005
+ /** Entity type name or schema object. When OrbitalEntity, fields are auto-derived if not provided. */
3006
+ entity?: string | OrbitalEntity;
3020
3007
  /** Form mode - 'create' for new records, 'edit' for updating existing */
3021
3008
  mode?: "create" | "edit";
3022
3009
  /** Fields definition (schema format) - accepts readonly for generated const arrays */
@@ -3293,6 +3280,11 @@ declare const Section: React__default.FC<SectionProps>;
3293
3280
  *
3294
3281
  * A sidebar component with logo, navigation items, user section, and collapse/expand.
3295
3282
  * Styled to match the main Layout component with theme-aware CSS variables.
3283
+ *
3284
+ * Events:
3285
+ * - collapseChangeEvent — emitted when sidebar collapse state changes, payload: { collapsed: boolean }
3286
+ * - closeEvent — emitted when close button clicked (mobile)
3287
+ * - logoClickEvent — emitted when logo/brand area clicked
3296
3288
  */
3297
3289
 
3298
3290
  interface SidebarItem {
@@ -3315,7 +3307,7 @@ interface SidebarItem {
3315
3307
  /** Sub-items (for nested navigation) */
3316
3308
  subItems?: SidebarItem[];
3317
3309
  }
3318
- interface SidebarProps {
3310
+ interface SidebarProps extends EntityDisplayProps<SidebarItem> {
3319
3311
  /** Logo/Brand content - can be a ReactNode or logo config */
3320
3312
  logo?: React__default.ReactNode;
3321
3313
  /** Logo image source */
@@ -3332,24 +3324,16 @@ interface SidebarProps {
3332
3324
  collapsed?: boolean;
3333
3325
  /** Default collapsed state */
3334
3326
  defaultCollapsed?: boolean;
3335
- /** Callback when collapse state changes */
3336
- onCollapseChange?: (collapsed: boolean) => void;
3327
+ /** Event emitted when collapse state changes, payload: { collapsed: boolean } */
3328
+ collapseChangeEvent?: string;
3337
3329
  /** Hide the collapse/expand button */
3338
3330
  hideCollapseButton?: boolean;
3339
3331
  /** Show a close button (for mobile) */
3340
3332
  showCloseButton?: boolean;
3341
- /** Callback when close button is clicked */
3342
- onClose?: () => void;
3343
- /** Callback when logo/brand is clicked */
3344
- onLogoClick?: () => void;
3345
- /** Additional CSS classes */
3346
- className?: string;
3347
- /** Loading state indicator */
3348
- isLoading?: boolean;
3349
- /** Error state */
3350
- error?: Error | null;
3351
- /** Entity name for schema-driven auto-fetch */
3352
- entity?: string;
3333
+ /** Event emitted when close button is clicked */
3334
+ closeEvent?: string;
3335
+ /** Event emitted when logo/brand is clicked */
3336
+ logoClickEvent?: string;
3353
3337
  }
3354
3338
  declare const Sidebar: React__default.FC<SidebarProps>;
3355
3339
 
@@ -3479,7 +3463,7 @@ interface TableProps<T = Record<string, unknown>> extends EntityDisplayProps<T>
3479
3463
  loading?: boolean;
3480
3464
  }
3481
3465
  declare const Table: {
3482
- <T extends Record<string, any>>({ columns, entity, data, className, isLoading, error, sortBy, sortDirection: entitySortDirection, searchValue, page, pageSize, totalCount, selectedIds, selectable, sortable, sortColumn: sortColumnProp, sortDirection: sortDirectionProp, searchable, searchPlaceholder, paginated, currentPage: currentPageProp, totalPages: totalPagesProp, rowActions, emptyMessage, loading, }: TableProps<T>): react_jsx_runtime.JSX.Element;
3466
+ <T extends Record<string, any>>({ columns, entity, className, isLoading, error, sortBy, sortDirection: entitySortDirection, searchValue, page, pageSize, totalCount, selectedIds, selectable, sortable, sortColumn: sortColumnProp, sortDirection: sortDirectionProp, searchable, searchPlaceholder, paginated, currentPage: currentPageProp, totalPages: totalPagesProp, rowActions, emptyMessage, loading, }: TableProps<T>): react_jsx_runtime.JSX.Element;
3483
3467
  displayName: string;
3484
3468
  };
3485
3469
 
@@ -3539,7 +3523,7 @@ type FieldDef$1 = string | {
3539
3523
  key: string;
3540
3524
  header?: string;
3541
3525
  };
3542
- interface ListProps extends EntityDisplayProps {
3526
+ interface ListProps extends EntityDisplayProps<Record<string, unknown>> {
3543
3527
  /** Entity type name for display */
3544
3528
  entityType?: string;
3545
3529
  selectable?: boolean;
@@ -3563,7 +3547,7 @@ declare const List: React__default.FC<ListProps>;
3563
3547
  * A dumb, responsive grid specifically designed for card layouts.
3564
3548
  * Uses CSS Grid auto-fit for automatic responsive columns.
3565
3549
  *
3566
- * Data comes exclusively from the `data` prop (provided by the trait via render-ui).
3550
+ * Data comes exclusively from the `entity` prop (injected by the runtime).
3567
3551
  * All user interactions emit events via useEventBus — never manages internal state
3568
3552
  * for pagination, filtering, or search. All state is owned by the trait state machine.
3569
3553
  */
@@ -3595,7 +3579,7 @@ type FieldDef = string | {
3595
3579
  key: string;
3596
3580
  header?: string;
3597
3581
  };
3598
- interface CardGridProps extends EntityDisplayProps {
3582
+ interface CardGridProps extends EntityDisplayProps<Record<string, unknown>> {
3599
3583
  /** Minimum width of each card (default: 280px) */
3600
3584
  minCardWidth?: number;
3601
3585
  /** Maximum number of columns */
@@ -3604,7 +3588,7 @@ interface CardGridProps extends EntityDisplayProps {
3604
3588
  gap?: CardGridGap;
3605
3589
  /** Align cards vertically in their cells */
3606
3590
  alignItems?: 'start' | 'center' | 'end' | 'stretch';
3607
- /** Children elements (cards) - optional when using entity/data props */
3591
+ /** Children elements (cards) - optional when using entity prop */
3608
3592
  children?: React__default.ReactNode;
3609
3593
  /** Fields to display - accepts string[] or {key, header}[] for unified interface */
3610
3594
  fields?: readonly FieldDef[];
@@ -3622,9 +3606,9 @@ interface CardGridProps extends EntityDisplayProps {
3622
3606
  *
3623
3607
  * Can be used in two ways:
3624
3608
  * 1. With children: <CardGrid><Card>...</Card></CardGrid>
3625
- * 2. With data: <CardGrid entity="Task" fieldNames={['title']} data={tasks} />
3609
+ * 2. With entity data: <CardGrid entity={tasks} fieldNames={['title']} />
3626
3610
  *
3627
- * All data comes from the `data` prop. Pagination display hints come from
3611
+ * All data comes from the `entity` prop. Pagination display hints come from
3628
3612
  * `page`, `pageSize`, and `totalCount` props (set by the trait via render-ui).
3629
3613
  */
3630
3614
  declare const CardGrid: React__default.FC<CardGridProps>;
@@ -3635,9 +3619,7 @@ declare const CardGrid: React__default.FC<CardGridProps>;
3635
3619
  * A layout pattern that shows a list/table of entities.
3636
3620
  * This is a thin wrapper around DataTable that accepts master-detail specific props.
3637
3621
  *
3638
- * When `entity` prop is provided without `data`, automatically fetches data
3639
- * using the useEntityList hook.
3640
- *
3622
+ * The `entity` prop carries the data array (injected by the runtime).
3641
3623
  * The "detail" part is typically rendered separately via another render_ui effect
3642
3624
  * to a sidebar or detail panel when an item is selected.
3643
3625
  */
@@ -3646,28 +3628,18 @@ interface MasterDetailProps<T extends {
3646
3628
  id: string | number;
3647
3629
  } = {
3648
3630
  id: string | number;
3649
- }> {
3650
- /** Entity type name - when provided without data, auto-fetches from API */
3651
- entity?: string;
3631
+ }> extends EntityDisplayProps<T> {
3652
3632
  /** Fields to show in the master list (maps to DataTable columns) */
3653
3633
  masterFields?: readonly string[];
3654
3634
  /** Fields for detail view (passed through but typically handled by separate render_ui) */
3655
3635
  detailFields?: readonly string[];
3656
- /** Data array - if not provided and entity is set, data is auto-fetched */
3657
- data?: readonly T[] | T[];
3658
- /** Loading state */
3636
+ /** Loading state (alias for isLoading) */
3659
3637
  loading?: boolean;
3660
- /** Loading state alias */
3661
- isLoading?: boolean;
3662
- /** Error state */
3663
- error?: Error | null;
3664
- /** Additional class name */
3665
- className?: string;
3666
3638
  }
3667
3639
  declare function MasterDetail<T extends {
3668
3640
  id: string | number;
3669
3641
  }>({ entity, masterFields, detailFields: _detailFields, // Captured but not used here - detail handled separately
3670
- data: externalData, loading: externalLoading, isLoading: externalIsLoading, error: externalError, className, ...rest }: MasterDetailProps<T>): React__default.ReactElement;
3642
+ loading: externalLoading, isLoading: externalIsLoading, error: externalError, className, ...rest }: MasterDetailProps<T>): React__default.ReactElement;
3671
3643
  declare namespace MasterDetail {
3672
3644
  var displayName: string;
3673
3645
  }
@@ -3955,7 +3927,7 @@ interface TransitionBundle {
3955
3927
  isBidirectional: boolean;
3956
3928
  isReverse: boolean;
3957
3929
  }
3958
- interface StateMachineViewProps extends EntityDisplayProps {
3930
+ interface StateMachineViewProps extends EntityDisplayProps<DomLayoutData> {
3959
3931
  layoutData: DomLayoutData;
3960
3932
  /** Custom state node renderer — when provided, replaces the default circle nodes */
3961
3933
  renderStateNode?: (state: DomStateNode, config: VisualizerConfig) => React__default.ReactNode;
@@ -4007,7 +3979,7 @@ interface SmOrbital {
4007
3979
  interface SmSchema {
4008
3980
  orbitals?: SmOrbital[];
4009
3981
  }
4010
- interface JazariStateMachineProps extends EntityDisplayProps {
3982
+ interface JazariStateMachineProps extends EntityDisplayProps<SmSchema> {
4011
3983
  /** Full schema — extracts first trait's state machine */
4012
3984
  schema?: SmSchema;
4013
3985
  /** Or pass a single trait directly */
@@ -4033,7 +4005,7 @@ declare const JazariStateMachine: React__default.FC<JazariStateMachineProps>;
4033
4005
  * - entityAware: false
4034
4006
  */
4035
4007
 
4036
- interface ContentRendererProps extends EntityDisplayProps {
4008
+ interface ContentRendererProps extends EntityDisplayProps<Record<string, unknown>> {
4037
4009
  /** Raw content string — auto-parsed into segments */
4038
4010
  content?: string;
4039
4011
  /** Pre-parsed segments (overrides content) */
@@ -4140,7 +4112,7 @@ declare function mapBookData(raw: Record<string, unknown>, fields?: BookFieldMap
4140
4112
  * - Listens: UI:BOOK_START, UI:BOOK_NAVIGATE, UI:BOOK_PAGE_PREV/NEXT, UI:BOOK_PRINT, UI:BOOK_SHOW_TOC
4141
4113
  */
4142
4114
 
4143
- interface BookViewerProps extends EntityDisplayProps {
4115
+ interface BookViewerProps extends EntityDisplayProps<BookData | Record<string, unknown>> {
4144
4116
  /** Initial page index (default: 0 = cover) */
4145
4117
  initialPage?: number;
4146
4118
  /** Field name translation map — a BookFieldMap object or locale key ("ar") */
@@ -4158,7 +4130,7 @@ declare const BookViewer: React__default.FC<BookViewerProps>;
4158
4130
  * - Delegates to ContentRenderer children
4159
4131
  */
4160
4132
 
4161
- interface BookChapterViewProps extends EntityDisplayProps {
4133
+ interface BookChapterViewProps extends EntityDisplayProps<BookChapter> {
4162
4134
  chapter: BookChapter;
4163
4135
  direction?: 'rtl' | 'ltr';
4164
4136
  }
@@ -4174,7 +4146,7 @@ declare const BookChapterView: React__default.FC<BookChapterViewProps>;
4174
4146
  * - Emits: UI:BOOK_START
4175
4147
  */
4176
4148
 
4177
- interface BookCoverPageProps extends EntityDisplayProps {
4149
+ interface BookCoverPageProps extends EntityDisplayProps<BookData> {
4178
4150
  title: string;
4179
4151
  subtitle?: string;
4180
4152
  author?: string;
@@ -4193,7 +4165,7 @@ declare const BookCoverPage: React__default.FC<BookCoverPageProps>;
4193
4165
  * - Emits: UI:BOOK_NAVIGATE { chapterId }
4194
4166
  */
4195
4167
 
4196
- interface BookTableOfContentsProps extends EntityDisplayProps {
4168
+ interface BookTableOfContentsProps extends EntityDisplayProps<BookPart> {
4197
4169
  parts: BookPart[];
4198
4170
  currentChapterId?: string;
4199
4171
  direction?: 'rtl' | 'ltr';
@@ -4210,7 +4182,7 @@ declare const BookTableOfContents: React__default.FC<BookTableOfContentsProps>;
4210
4182
  * - Emits: UI:BOOK_PAGE_PREV, UI:BOOK_PAGE_NEXT, UI:BOOK_PRINT, UI:BOOK_SHOW_TOC
4211
4183
  */
4212
4184
 
4213
- interface BookNavBarProps extends EntityDisplayProps {
4185
+ interface BookNavBarProps extends EntityDisplayProps<BookData> {
4214
4186
  currentPage: number;
4215
4187
  totalPages: number;
4216
4188
  chapterTitle?: string;
@@ -5465,6 +5437,13 @@ interface BattleUnit {
5465
5437
  unitType?: string;
5466
5438
  heroId?: string;
5467
5439
  sprite?: string;
5440
+ /** Optional sprite sheet for animation (null = use static sprite) */
5441
+ spriteSheet?: {
5442
+ se: string;
5443
+ sw: string;
5444
+ frameWidth: number;
5445
+ frameHeight: number;
5446
+ } | null;
5468
5447
  team: 'player' | 'enemy';
5469
5448
  position: {
5470
5449
  x: number;
@@ -5548,7 +5527,7 @@ interface BattleSlotContext {
5548
5527
  y: number;
5549
5528
  };
5550
5529
  }
5551
- interface BattleBoardProps {
5530
+ interface BattleBoardProps extends Omit<EntityDisplayProps, 'entity'> {
5552
5531
  /** Entity containing all board data */
5553
5532
  entity: BattleEntity;
5554
5533
  /** Canvas render scale */
@@ -5678,6 +5657,13 @@ interface MapHero {
5678
5657
  };
5679
5658
  movement: number;
5680
5659
  sprite?: string;
5660
+ /** Optional sprite sheet for animation (null = use static sprite) */
5661
+ spriteSheet?: {
5662
+ se: string;
5663
+ sw: string;
5664
+ frameWidth: number;
5665
+ frameHeight: number;
5666
+ } | null;
5681
5667
  level?: number;
5682
5668
  }
5683
5669
  /** A hex on the map */
@@ -5733,13 +5719,9 @@ interface WorldMapEntity {
5733
5719
  };
5734
5720
  backgroundImage?: string;
5735
5721
  }
5736
- interface WorldMapBoardProps {
5722
+ interface WorldMapBoardProps extends Omit<EntityDisplayProps, 'entity'> {
5737
5723
  /** World map entity data */
5738
5724
  entity: WorldMapEntity;
5739
- /** Loading state indicator */
5740
- isLoading?: boolean;
5741
- /** Error state */
5742
- error?: Error | null;
5743
5725
  /** Canvas render scale */
5744
5726
  scale?: number;
5745
5727
  /** Unit draw-size multiplier */
@@ -6122,7 +6104,7 @@ declare namespace EditorToolbar {
6122
6104
  * @packageDocumentation
6123
6105
  */
6124
6106
 
6125
- interface ActionTileProps {
6107
+ interface ActionTileProps extends Omit<EntityDisplayProps, 'entity'> {
6126
6108
  /** The action data */
6127
6109
  action: SlotItemData;
6128
6110
  /** Size variant */
@@ -6134,8 +6116,6 @@ interface ActionTileProps {
6134
6116
  bg: string;
6135
6117
  border: string;
6136
6118
  }>;
6137
- /** Additional CSS classes */
6138
- className?: string;
6139
6119
  }
6140
6120
  declare function ActionTile({ action, size, disabled, categoryColors, className, }: ActionTileProps): React__default.JSX.Element;
6141
6121
  declare namespace ActionTile {
@@ -6257,6 +6237,13 @@ interface SequencerPuzzleEntity {
6257
6237
  x: number;
6258
6238
  y: number;
6259
6239
  }>;
6240
+ /** Header image URL displayed above the title */
6241
+ headerImage?: string;
6242
+ /** Visual theme overrides */
6243
+ theme?: {
6244
+ background?: string;
6245
+ accentColor?: string;
6246
+ };
6260
6247
  }
6261
6248
  interface SequencerBoardProps extends Omit<EntityDisplayProps, 'entity'> {
6262
6249
  /** Puzzle data */
@@ -6424,6 +6411,13 @@ interface EventHandlerPuzzleEntity {
6424
6411
  failMessage?: string;
6425
6412
  /** Progressive hint shown after 3 failures */
6426
6413
  hint?: string;
6414
+ /** Header image URL displayed above the title */
6415
+ headerImage?: string;
6416
+ /** Visual theme overrides */
6417
+ theme?: {
6418
+ background?: string;
6419
+ accentColor?: string;
6420
+ };
6427
6421
  }
6428
6422
  interface EventHandlerBoardProps extends Omit<EntityDisplayProps, 'entity'> {
6429
6423
  /** Puzzle data */
@@ -6612,6 +6606,13 @@ interface StateArchitectPuzzleEntity {
6612
6606
  /** Feedback */
6613
6607
  successMessage?: string;
6614
6608
  failMessage?: string;
6609
+ /** Header image URL displayed above the title */
6610
+ headerImage?: string;
6611
+ /** Visual theme overrides */
6612
+ theme?: {
6613
+ background?: string;
6614
+ accentColor?: string;
6615
+ };
6615
6616
  }
6616
6617
  interface StateArchitectBoardProps extends Omit<EntityDisplayProps, 'entity'> {
6617
6618
  /** Puzzle data */
@@ -6665,11 +6666,17 @@ interface SimulatorPuzzleEntity {
6665
6666
  successMessage?: string;
6666
6667
  failMessage?: string;
6667
6668
  hint?: string;
6669
+ /** Header image URL displayed above the title */
6670
+ headerImage?: string;
6671
+ /** Visual theme overrides */
6672
+ theme?: {
6673
+ background?: string;
6674
+ accentColor?: string;
6675
+ };
6668
6676
  }
6669
- interface SimulatorBoardProps {
6677
+ interface SimulatorBoardProps extends Omit<EntityDisplayProps, 'entity'> {
6670
6678
  entity: SimulatorPuzzleEntity;
6671
6679
  completeEvent?: string;
6672
- className?: string;
6673
6680
  }
6674
6681
  declare function SimulatorBoard({ entity, completeEvent, className, }: SimulatorBoardProps): React__default.JSX.Element;
6675
6682
  declare namespace SimulatorBoard {
@@ -6693,11 +6700,15 @@ interface ClassifierItem {
6693
6700
  label: string;
6694
6701
  description?: string;
6695
6702
  correctCategory: string;
6703
+ /** Image URL icon for story-specific visual skin */
6704
+ iconUrl?: string;
6696
6705
  }
6697
6706
  interface ClassifierCategory {
6698
6707
  id: string;
6699
6708
  label: string;
6700
6709
  color?: string;
6710
+ /** Image URL for story-specific category header */
6711
+ imageUrl?: string;
6701
6712
  }
6702
6713
  interface ClassifierPuzzleEntity {
6703
6714
  id: string;
@@ -6708,11 +6719,17 @@ interface ClassifierPuzzleEntity {
6708
6719
  successMessage?: string;
6709
6720
  failMessage?: string;
6710
6721
  hint?: string;
6722
+ /** Header image URL displayed above the title */
6723
+ headerImage?: string;
6724
+ /** Visual theme overrides */
6725
+ theme?: {
6726
+ background?: string;
6727
+ accentColor?: string;
6728
+ };
6711
6729
  }
6712
- interface ClassifierBoardProps {
6730
+ interface ClassifierBoardProps extends Omit<EntityDisplayProps, 'entity'> {
6713
6731
  entity: ClassifierPuzzleEntity;
6714
6732
  completeEvent?: string;
6715
- className?: string;
6716
6733
  }
6717
6734
  declare function ClassifierBoard({ entity, completeEvent, className, }: ClassifierBoardProps): React__default.JSX.Element;
6718
6735
  declare namespace ClassifierBoard {
@@ -6735,6 +6752,8 @@ interface BuilderComponent {
6735
6752
  label: string;
6736
6753
  description?: string;
6737
6754
  iconEmoji?: string;
6755
+ /** Image URL icon (takes precedence over iconEmoji) */
6756
+ iconUrl?: string;
6738
6757
  category?: string;
6739
6758
  }
6740
6759
  interface BuilderSlot {
@@ -6752,11 +6771,17 @@ interface BuilderPuzzleEntity {
6752
6771
  successMessage?: string;
6753
6772
  failMessage?: string;
6754
6773
  hint?: string;
6774
+ /** Header image URL displayed above the title */
6775
+ headerImage?: string;
6776
+ /** Visual theme overrides */
6777
+ theme?: {
6778
+ background?: string;
6779
+ accentColor?: string;
6780
+ };
6755
6781
  }
6756
- interface BuilderBoardProps {
6782
+ interface BuilderBoardProps extends Omit<EntityDisplayProps, 'entity'> {
6757
6783
  entity: BuilderPuzzleEntity;
6758
6784
  completeEvent?: string;
6759
- className?: string;
6760
6785
  }
6761
6786
  declare function BuilderBoard({ entity, completeEvent, className, }: BuilderBoardProps): React__default.JSX.Element;
6762
6787
  declare namespace BuilderBoard {
@@ -6791,11 +6816,17 @@ interface DebuggerPuzzleEntity {
6791
6816
  successMessage?: string;
6792
6817
  failMessage?: string;
6793
6818
  hint?: string;
6819
+ /** Header image URL displayed above the title */
6820
+ headerImage?: string;
6821
+ /** Visual theme overrides */
6822
+ theme?: {
6823
+ background?: string;
6824
+ accentColor?: string;
6825
+ };
6794
6826
  }
6795
- interface DebuggerBoardProps {
6827
+ interface DebuggerBoardProps extends Omit<EntityDisplayProps, 'entity'> {
6796
6828
  entity: DebuggerPuzzleEntity;
6797
6829
  completeEvent?: string;
6798
- className?: string;
6799
6830
  }
6800
6831
  declare function DebuggerBoard({ entity, completeEvent, className, }: DebuggerBoardProps): React__default.JSX.Element;
6801
6832
  declare namespace DebuggerBoard {
@@ -6839,11 +6870,17 @@ interface NegotiatorPuzzleEntity {
6839
6870
  successMessage?: string;
6840
6871
  failMessage?: string;
6841
6872
  hint?: string;
6873
+ /** Header image URL displayed above the title */
6874
+ headerImage?: string;
6875
+ /** Visual theme overrides */
6876
+ theme?: {
6877
+ background?: string;
6878
+ accentColor?: string;
6879
+ };
6842
6880
  }
6843
- interface NegotiatorBoardProps {
6881
+ interface NegotiatorBoardProps extends Omit<EntityDisplayProps, 'entity'> {
6844
6882
  entity: NegotiatorPuzzleEntity;
6845
6883
  completeEvent?: string;
6846
- className?: string;
6847
6884
  }
6848
6885
  declare function NegotiatorBoard({ entity, completeEvent, className, }: NegotiatorBoardProps): React__default.JSX.Element;
6849
6886
  declare namespace NegotiatorBoard {
@@ -7477,25 +7514,15 @@ interface TimelineAction {
7477
7514
  navigatesTo?: string;
7478
7515
  variant?: "primary" | "secondary" | "ghost";
7479
7516
  }
7480
- interface TimelineProps {
7517
+ interface TimelineProps extends EntityDisplayProps<TimelineItem> {
7481
7518
  /** Timeline title */
7482
7519
  title?: string;
7483
7520
  /** Timeline items */
7484
7521
  items?: readonly TimelineItem[];
7485
- /** Schema-driven data */
7486
- data?: readonly Record<string, unknown>[];
7487
7522
  /** Fields to display */
7488
7523
  fields?: readonly string[];
7489
7524
  /** Actions per item */
7490
7525
  itemActions?: readonly TimelineAction[];
7491
- /** Entity name for schema-driven auto-fetch */
7492
- entity?: string;
7493
- /** Loading state */
7494
- isLoading?: boolean;
7495
- /** Error state */
7496
- error?: Error | null;
7497
- /** Additional CSS classes */
7498
- className?: string;
7499
7526
  }
7500
7527
  declare const Timeline: React__default.FC<TimelineProps>;
7501
7528
 
@@ -7534,35 +7561,25 @@ interface MediaGalleryAction {
7534
7561
  navigatesTo?: string;
7535
7562
  variant?: "primary" | "secondary" | "ghost";
7536
7563
  }
7537
- interface MediaGalleryProps {
7564
+ interface MediaGalleryProps extends EntityDisplayProps<MediaItem> {
7538
7565
  /** Gallery title */
7539
7566
  title?: string;
7540
7567
  /** Media items */
7541
7568
  items?: readonly MediaItem[];
7542
- /** Schema-driven data */
7543
- data?: readonly Record<string, unknown>[];
7544
7569
  /** Column count */
7545
7570
  columns?: 2 | 3 | 4 | 5 | 6;
7546
7571
  /** Enable item selection */
7547
7572
  selectable?: boolean;
7548
7573
  /** Selected item IDs */
7549
7574
  selectedItems?: readonly string[];
7550
- /** Selection change callback */
7551
- onSelectionChange?: (ids: string[]) => void;
7575
+ /** Event name emitted when selection changes (emitted as UI:{selectionEvent}) */
7576
+ selectionEvent?: string;
7552
7577
  /** Show upload button */
7553
7578
  showUpload?: boolean;
7554
7579
  /** Actions */
7555
7580
  actions?: readonly MediaGalleryAction[];
7556
7581
  /** Aspect ratio for thumbnails */
7557
7582
  aspectRatio?: "square" | "landscape" | "portrait";
7558
- /** Entity name for schema-driven auto-fetch */
7559
- entity?: string;
7560
- /** Loading state */
7561
- isLoading?: boolean;
7562
- /** Error state */
7563
- error?: Error | null;
7564
- /** Additional CSS classes */
7565
- className?: string;
7566
7583
  }
7567
7584
  declare const MediaGallery: React__default.FC<MediaGalleryProps>;
7568
7585