@almadar/ui 6.0.0 → 6.2.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.
@@ -1,18 +1,19 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ReactNode, ErrorInfo } from 'react';
3
- import { Asset, EventKey, EventPayload, EventEmit, AssetUrl, JsonObject, EntityRow, FieldValue, EntityRole, AnimationName, SpriteDirection, AnimationDef, ScenePos, Camera, EntityWith, TraitConfigValue, JsonValue, AssetCatalog, EventPayloadValue, DeclaredTraitConfig, TraitConfig, OrbitalSchema, Trait, OrbitalEntity, UISlot, EditFocus, TraceSubagent, TraceActivity, TraceChatMessage } from '@almadar/core';
3
+ import { Asset, EventKey, EventPayload, EventEmit, AssetUrl, FieldValue, EntityRow, EntityRole, AnimationName, SpriteDirection, AnimationDef, ScenePos, Camera, EntityWith, TraitConfigValue, JsonValue, AssetCatalog, JsonObject, EventPayloadValue, DeclaredTraitConfig, TraitConfig, ControlValue, OrbitalSchema, Trait, OrbitalEntity, FormSubmitPayload, UISlot, EditFocus, TraceSubagent, TraceActivity, TraceChatMessage } from '@almadar/core';
4
4
  export { AnimationDef, AnimationName, BusEvent, BusEventListener, BusEventSource, BusEventListener as EventListener, SpriteDirection, UISlot, Unsubscribe } from '@almadar/core';
5
5
  import { LucideIcon } from 'lucide-react';
6
6
  import { C as ColorToken, U as UiError, P as Point, L as LinkAction, I as ImageSource } from '../types-B3nHgnMG.cjs';
7
7
  export { R as Rect } from '../types-B3nHgnMG.cjs';
8
8
  import { SExpr } from '@almadar/evaluator';
9
- import { U as UnitAnimationState, F as FacingDirection, S as SpriteSheetUrls, g as SpriteFrameDims, R as ResolvedFrame, h as CanvasLighting, i as CanvasPost, a as IsometricUnit, j as CameraState, k as FieldInfo, l as OrbitalTraitInfo, m as OrbitalPageInfo, T as TraitLevelData, E as ExternalLink } from '../avl-schema-parser-Do_LPV1o.cjs';
10
- export { B as BoardTile, G as GameAction, n as GamePhase, o as GameState, p as GameUnit, b as IsometricFeature, I as IsometricTile, P as Position, q as UnitTrait, r as calculateAttackTargets, s as calculateValidMoves, t as createInitialGameState } from '../avl-schema-parser-Do_LPV1o.cjs';
11
- import { D as DrawableNode, F as FxOverlayItem, M as MeshShapeKind, a as MeshMaterial, b as DrawGroupProps, c as DrawTextProps, d as DrawMeshProps } from '../paintDispatch-DgBctxIq.cjs';
12
- export { e as FxOverlayKind } from '../paintDispatch-DgBctxIq.cjs';
9
+ import { U as UnitAnimationState, F as FacingDirection, S as SpriteSheetUrls, g as SpriteFrameDims, R as ResolvedFrame, h as CanvasLighting, i as CanvasPost, a as IsometricUnit, j as CameraState, k as FieldInfo, l as OrbitalTraitInfo, m as OrbitalPageInfo, T as TraitLevelData, E as ExternalLink } from '../avl-schema-parser-Bt4NzAam.cjs';
10
+ export { B as BoardTile, G as GameAction, n as GamePhase, o as GameState, p as GameUnit, b as IsometricFeature, I as IsometricTile, P as Position, q as UnitTrait, r as calculateAttackTargets, s as calculateValidMoves, t as createInitialGameState } from '../avl-schema-parser-Bt4NzAam.cjs';
11
+ import { D as DrawableNode, P as Projector, F as FxOverlayItem, M as MeshShapeKind, a as MeshMaterial, b as DrawGroupProps, c as DrawTextProps, d as DrawMeshProps } from '../paintDispatch-D3R8NNmV.cjs';
12
+ export { e as FxOverlayKind } from '../paintDispatch-D3R8NNmV.cjs';
13
13
  export { A as AudioManifest, G as GameAudioContext, a as GameAudioContextValue, e as GameAudioControls, b as GameAudioProvider, c as GameAudioProviderProps, S as SoundEntry, U as UseGameAudioOptions, f as useGameAudio, u as useGameAudioContext } from '../GameAudioProvider-CQAdPreB.cjs';
14
- import { C as ContentSegment, L as LessonSegment, U as InteractiveOrbitalType, b as DomLayoutData, d as DomStateNode, V as VisualizerConfig, e as DomTransitionLabel } from '../cn-TH-RHihd.cjs';
15
- export { W as BloomLevel, X as BloomQuizBlock, Y as BloomQuizBlockProps, Z as MixedSegment, n as cn, A as parseLessonSegments, _ as parseMarkdownWithCodeBlocks } from '../cn-TH-RHihd.cjs';
14
+ import { EmojiPickPayload, SelectionChangePayload, ItemActionPayload } from '@almadar/core/patterns';
15
+ import { C as ContentSegment, L as LessonSegment, U as InteractiveOrbitalType, b as DomLayoutData, d as DomStateNode, V as VisualizerConfig, e as DomTransitionLabel } from '../cn-DJSBBm5W.cjs';
16
+ export { W as BloomLevel, X as BloomQuizBlock, Y as BloomQuizBlockProps, Z as MixedSegment, n as cn, A as parseLessonSegments, _ as parseMarkdownWithCodeBlocks } from '../cn-DJSBBm5W.cjs';
16
17
  import { b as SlotContent, d as SlotPropValue } from '../useUISlots-GNwGLlW2.cjs';
17
18
  export { D as DEFAULT_SLOTS, S as SlotAnimation, a as SlotChangeCallback, c as SlotRenderConfig, U as UISlotManager, u as useUISlotManager } from '../useUISlots-GNwGLlW2.cjs';
18
19
  export { ALMADAR_DND_MIME, AuthContextValue, AuthUser, CanvasGestureCallbacks, CanvasGestureHandlers, CompileResult, CompileStage, DragReorderResult, DraggablePayload, Extension, ExtensionManifest, FileSystemFile, FileSystemStatus, GitHubRepo, GitHubStatus, HistoryChangeSummary, HistoryTimelineItem, I18nContextValue, I18nProvider, InfiniteScrollOptions, InfiniteScrollResult, LongPressHandlers, LongPressOptions, OpenFile, Positioned, PullToRefreshOptions, PullToRefreshResult, QuerySingletonEntity, QuerySingletonResult, QuerySingletonState, QueryState, RenderInterpolationHandle, RenderInterpolationOptions, RevertResult, SelectedFile, SharedEntityStore, SharedEntityStoreContext, SharedEntitySubscriber, SharedEntityWriter, SwipeGestureOptions, SwipeGestureResult, SwipeHandlers, TapRevealOptions, TapRevealResult, TraitListenSpec, TranslateFunction, UseCanvasGesturesOptions, UseCompileResult, UseDraggableOptions, UseDraggableResult, UseDropZoneOptions, UseDropZoneResult, UseExtensionsOptions, UseExtensionsResult, UseFileEditorOptions, UseFileEditorResult, UseFileSystemResult, UseOrbitalHistoryOptions, UseOrbitalHistoryResult, createSharedEntityStore, createTranslate, parseQueryBinding, runTickFrame, useAgentChat, useAuthContext, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate, useUIEvents, useValidation } from '../hooks/index.cjs';
@@ -287,7 +288,9 @@ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElem
287
288
  iconAsset?: Asset;
288
289
  /** Declarative event name — emits UI:{action} via eventBus on click */
289
290
  action?: EventKey;
290
- /** Payload to include with the action event */
291
+ /** Payload to include with the action event
292
+ * @payloadFor action
293
+ */
291
294
  actionPayload?: EventPayload;
292
295
  /** Button label text (alternative to children for schema-driven rendering) */
293
296
  label?: string;
@@ -312,7 +315,9 @@ interface InputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputEl
312
315
  /** Whether input is disabled */
313
316
  disabled?: boolean;
314
317
  /** Declarative event name for trait dispatch */
315
- action?: EventKey;
318
+ action?: EventEmit<{
319
+ value: string | number;
320
+ }>;
316
321
  /**
317
322
  * Input type — selects the field's data mode. Use 'password' for masked
318
323
  * credentials / secret / passphrase entry (there is no separate password
@@ -337,7 +342,11 @@ interface InputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputEl
337
342
  /** Rows for textarea type */
338
343
  rows?: number;
339
344
  /** onChange handler or declarative event key for trait dispatch */
340
- onChange?: React__default.ChangeEventHandler<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> | EventKey;
345
+ onChange?: React__default.ChangeEventHandler<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> | EventEmit<{
346
+ value: string;
347
+ } | {
348
+ checked: boolean;
349
+ }>;
341
350
  }
342
351
  declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>>;
343
352
 
@@ -365,7 +374,9 @@ interface TextareaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
365
374
  /** Error message */
366
375
  error?: string;
367
376
  /** onChange handler or declarative event key for trait dispatch */
368
- onChange?: React__default.ChangeEventHandler<HTMLTextAreaElement> | EventKey;
377
+ onChange?: React__default.ChangeEventHandler<HTMLTextAreaElement> | EventEmit<{
378
+ value: string;
379
+ }>;
369
380
  }
370
381
  declare const Textarea: React__default.ForwardRefExoticComponent<TextareaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
371
382
 
@@ -406,7 +417,9 @@ interface SelectProps extends Omit<React__default.SelectHTMLAttributes<HTMLSelec
406
417
  /** Show a clear button when a value is selected. */
407
418
  clearable?: boolean;
408
419
  /** onChange handler (native ChangeEvent) or declarative event key for trait dispatch */
409
- onChange?: React__default.ChangeEventHandler<HTMLSelectElement> | EventKey;
420
+ onChange?: React__default.ChangeEventHandler<HTMLSelectElement> | EventEmit<{
421
+ value: string | string[];
422
+ }>;
410
423
  /** Value-based change: a React callback (internal use) OR a declarative event
411
424
  * key that emits `{ value }` on the bus (render-ui / lolo authoring). Mirrors
412
425
  * the `onChange` handler|event convention so it's an event-emitting prop, not a
@@ -426,7 +439,9 @@ interface CheckboxProps extends Omit<React__default.InputHTMLAttributes<HTMLInpu
426
439
  defaultChecked?: boolean;
427
440
  label?: string;
428
441
  /** onChange handler or declarative event key for trait dispatch */
429
- onChange?: React__default.ChangeEventHandler<HTMLInputElement> | EventKey;
442
+ onChange?: React__default.ChangeEventHandler<HTMLInputElement> | EventEmit<{
443
+ checked: boolean;
444
+ }>;
430
445
  }
431
446
  declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
432
447
 
@@ -682,7 +697,9 @@ interface AvatarProps {
682
697
  onClick?: () => void;
683
698
  /** Declarative event name — emits UI:{action} via eventBus on click */
684
699
  action?: EventKey;
685
- /** Payload to include with the action event */
700
+ /** Payload to include with the action event
701
+ * @payloadFor action
702
+ */
686
703
  actionPayload?: EventPayload;
687
704
  }
688
705
  declare const Avatar: React__default.FC<AvatarProps>;
@@ -738,10 +755,14 @@ interface BoxProps extends React__default.HTMLAttributes<HTMLDivElement> {
738
755
  as?: React__default.ElementType;
739
756
  /** Declarative event name — emits UI:{action} via eventBus on click */
740
757
  action?: EventKey;
741
- /** Payload to include with the action event */
758
+ /** Payload to include with the action event
759
+ * @payloadFor action
760
+ */
742
761
  actionPayload?: EventPayload;
743
762
  /** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave */
744
- hoverEvent?: EventKey;
763
+ hoverEvent?: EventEmit<{
764
+ hovered: boolean;
765
+ }>;
745
766
  /** When true (default), a touch/pen tap also fires `hoverEvent` (toggling hovered) so hover-only reveals work on touch. */
746
767
  tapReveal?: boolean;
747
768
  /** Maximum width (CSS value, e.g., "550px", "80rem") */
@@ -895,7 +916,9 @@ interface RadioProps extends Omit<React__default.InputHTMLAttributes<HTMLInputEl
895
916
  /** Current selected value */
896
917
  value?: string;
897
918
  /** Declarative event name for trait dispatch */
898
- action?: EventKey;
919
+ action?: EventEmit<{
920
+ value: string;
921
+ }>;
899
922
  /**
900
923
  * Label text displayed next to the radio button
901
924
  */
@@ -1028,7 +1051,9 @@ interface StackProps {
1028
1051
  tabIndex?: number;
1029
1052
  /** Declarative event name — emits UI:{action} via eventBus on click */
1030
1053
  action?: EventKey;
1031
- /** Payload to include with the action event */
1054
+ /** Payload to include with the action event
1055
+ * @payloadFor action
1056
+ */
1032
1057
  actionPayload?: EventPayload;
1033
1058
  /** When true, horizontal stacks flip to vertical below the md breakpoint (768px) */
1034
1059
  responsive?: boolean;
@@ -1095,9 +1120,14 @@ interface TextHighlightProps {
1095
1120
  */
1096
1121
  children: React__default.ReactNode;
1097
1122
  /** Declarative event name — emits UI:{action} via eventBus on click */
1098
- action?: EventKey;
1099
- /** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } */
1100
- hoverEvent?: EventKey;
1123
+ action?: EventEmit<{
1124
+ annotationId?: string;
1125
+ }>;
1126
+ /** Declarative hover event — emits UI:{hoverEvent} with { hovered, annotationId } */
1127
+ hoverEvent?: EventEmit<{
1128
+ hovered: boolean;
1129
+ annotationId?: string;
1130
+ }>;
1101
1131
  }
1102
1132
  /**
1103
1133
  * TextHighlight component for rendering highlighted text annotations
@@ -1330,10 +1360,10 @@ declare const Aside: React__default.ForwardRefExoticComponent<AsideProps & React
1330
1360
  * Context for conditional evaluation
1331
1361
  */
1332
1362
  type ConditionalContext = {
1333
- formValues: JsonObject;
1334
- globalVariables: JsonObject;
1335
- localVariables?: JsonObject;
1336
- entity?: JsonObject;
1363
+ formValues: Record<string, FieldValue>;
1364
+ globalVariables: Record<string, FieldValue>;
1365
+ localVariables?: Record<string, FieldValue>;
1366
+ entity?: Record<string, FieldValue>;
1337
1367
  };
1338
1368
  interface ConditionalWrapperProps {
1339
1369
  /** The S-expression condition to evaluate */
@@ -1542,8 +1572,12 @@ interface RangeSliderProps extends Omit<React__default.HTMLAttributes<HTMLDivEle
1542
1572
  /** Disabled state */
1543
1573
  disabled?: boolean;
1544
1574
  /** Declarative event name for value changes */
1545
- action?: EventKey;
1546
- /** Payload to include with the action event */
1575
+ action?: EventEmit<{
1576
+ value: number;
1577
+ }>;
1578
+ /** Payload to include with the action event
1579
+ * @payloadFor action
1580
+ */
1547
1581
  actionPayload?: EventPayload;
1548
1582
  /** Direct onChange callback */
1549
1583
  onChange?: (value: number) => void;
@@ -1586,7 +1620,9 @@ declare const AnimatedCounter: React__default.FC<AnimatedCounterProps>;
1586
1620
  interface InfiniteScrollSentinelProps {
1587
1621
  /** Event name to emit when load-more is triggered (emitted as UI:{loadMoreEvent}) */
1588
1622
  loadMoreEvent: EventKey;
1589
- /** Optional payload to include with the load-more event */
1623
+ /** Optional payload to include with the load-more event
1624
+ * @payloadFor loadMoreEvent
1625
+ */
1590
1626
  loadMorePayload?: EventPayload;
1591
1627
  /** Whether a load operation is currently in progress */
1592
1628
  isLoading?: boolean;
@@ -2068,8 +2104,10 @@ declare const SHEET_COLUMNS = 8;
2068
2104
  /**
2069
2105
  * Standard sprite sheet row layout.
2070
2106
  * Row 0 = idle, Row 1 = walk, Row 2 = attack, Row 3 = hit, Row 4 = death.
2107
+ * Partial: platformer names (skate/jump/fall) have no row on this sheet — they
2108
+ * resolve through an atlas manifest, never through this constant fallback.
2071
2109
  */
2072
- declare const SPRITE_SHEET_LAYOUT: Record<AnimationName, AnimationDef>;
2110
+ declare const SPRITE_SHEET_LAYOUT: Partial<Record<AnimationName, AnimationDef>>;
2073
2111
 
2074
2112
  interface HealthBarProps {
2075
2113
  /** Current value */
@@ -2447,7 +2485,9 @@ interface StateGraphProps {
2447
2485
  /** Graph canvas height. */
2448
2486
  height?: number;
2449
2487
  /** Emits UI:{nodeClickEvent} with { stateId } when a node is clicked. */
2450
- nodeClickEvent?: EventKey;
2488
+ nodeClickEvent?: EventEmit<{
2489
+ stateId: string;
2490
+ }>;
2451
2491
  className?: string;
2452
2492
  }
2453
2493
  declare function StateGraph({ states, transitions, currentState, selectedState, addingFrom, initialState, width, height, nodeClickEvent, className, }: StateGraphProps): React$1.JSX.Element;
@@ -3486,7 +3526,7 @@ interface GameShellProps {
3486
3526
  backgroundAsset?: Asset;
3487
3527
  /** Per-call-site 9-sliced panel override. Chrome normally comes from the active theme; most callers leave this unset. */
3488
3528
  hudBackgroundAsset?: Asset;
3489
- /** Game display-font key (future | future-narrow | pixel | blocks | mini) or a CSS font-family. Scoped override of the theme contract's --font-family-display slot: titles and numerics take this face, body text follows the active theme. */
3529
+ /** Game display-font key (pixel | fredoka | future | future-narrow | blocks | mini) or a CSS font-family. Scoped override of the theme contract's --font-family-display slot: titles and numerics take this face, body text follows the active theme. Unset = the theme token decides. */
3490
3530
  fontFamily?: string;
3491
3531
  /** Scopes an `@almadar/ui` theme (e.g. "game-sci-fi-dark") to this shell's subtree. */
3492
3532
  "data-theme"?: string;
@@ -3604,6 +3644,16 @@ interface LearningCanvasProps {
3604
3644
  backgroundColor?: string;
3605
3645
  /** Declarative shapes to draw. */
3606
3646
  shapes?: LearningShape[];
3647
+ /**
3648
+ * Neutral game-canvas drawables (e.g. `draw-sprite`, `draw-fx-layer`) painted
3649
+ * in world coordinates via the supplied `projector`. This lets the learning
3650
+ * canvas reuse the game drawable vocabulary without reimplementing sprites/FX.
3651
+ */
3652
+ drawables?: DrawableNode[];
3653
+ /**
3654
+ * World-to-pixel projector for `drawables`. When absent, `drawables` are ignored.
3655
+ */
3656
+ projector?: Projector;
3607
3657
  /**
3608
3658
  * Top-right status chip row (live measurements, scores, counters).
3609
3659
  * @synonyms chips, stats, measurements
@@ -4041,7 +4091,11 @@ interface BreadcrumbProps {
4041
4091
  * `{ label, href, index }` — the trait handles it with
4042
4092
  * `(navigate ?href)`. Without it, stack crumbs navigate directly.
4043
4093
  */
4044
- itemEvent?: EventKey;
4094
+ itemEvent?: EventEmit<{
4095
+ label: string;
4096
+ href?: string;
4097
+ index: number;
4098
+ }>;
4045
4099
  /**
4046
4100
  * Separator icon (canonical kebab-case name or LucideIcon component)
4047
4101
  */
@@ -4125,9 +4179,17 @@ interface FilterGroupProps {
4125
4179
  /** Layer 2 visual treatment — orthogonal to the semantic variant. */
4126
4180
  look?: FilterGroupLook;
4127
4181
  /** Declarative filter event — emits UI:{event} via eventBus on filter change (alongside canonical UI:FILTER) */
4128
- event?: EventKey;
4182
+ event?: EventEmit<{
4183
+ entity: string;
4184
+ field: string;
4185
+ value: string;
4186
+ query?: string;
4187
+ }>;
4129
4188
  /** Declarative clear event — emits UI:{clearEvent} via eventBus on clear-all (alongside canonical UI:CLEAR_FILTERS) */
4130
- clearEvent?: EventKey;
4189
+ clearEvent?: EventEmit<{
4190
+ entity: string;
4191
+ query?: string;
4192
+ }>;
4131
4193
  }
4132
4194
  declare const FilterGroup: React__default.FC<FilterGroupProps>;
4133
4195
 
@@ -4245,7 +4307,9 @@ interface CardProps {
4245
4307
  maxLevel?: number;
4246
4308
  /** Event emitted on long press: UI:{longPressEvent} (payload: longPressPayload spread — variable) */
4247
4309
  longPressEvent?: EventEmit<EventPayload>;
4248
- /** Additional payload for long-press events */
4310
+ /** Additional payload for long-press events
4311
+ * @payloadFor longPressEvent
4312
+ */
4249
4313
  longPressPayload?: EventPayload;
4250
4314
  }
4251
4315
  /**
@@ -4375,6 +4439,7 @@ interface FloatingActionButtonProps {
4375
4439
  action?: EventKey;
4376
4440
  /**
4377
4441
  * Payload to include with the dispatched action event.
4442
+ * @payloadFor action
4378
4443
  */
4379
4444
  actionPayload?: EventPayload;
4380
4445
  /**
@@ -4919,7 +4984,10 @@ interface SearchInputProps extends Omit<React__default.InputHTMLAttributes<HTMLI
4919
4984
  */
4920
4985
  className?: string;
4921
4986
  /** Declarative search event — emits UI:{event} via eventBus on query submit (alongside canonical UI:SEARCH) */
4922
- event?: EventKey;
4987
+ event?: EventEmit<{
4988
+ searchTerm: string;
4989
+ entity?: string;
4990
+ }>;
4923
4991
  /**
4924
4992
  * Entity type for context-aware search.
4925
4993
  * When provided, search events include entity context.
@@ -5516,7 +5584,8 @@ interface CalendarGridProps {
5516
5584
  onSlotClick?: (day: Date, time: string) => void;
5517
5585
  /** Called when a day header is clicked */
5518
5586
  onDayClick?: (day: Date) => void;
5519
- /** Called when an event is clicked */
5587
+ /** Called when an event is clicked
5588
+ * @entityRow event */
5520
5589
  onEventClick?: (event: EntityRow) => void;
5521
5590
  /** Additional CSS classes */
5522
5591
  className?: string;
@@ -5525,7 +5594,9 @@ interface CalendarGridProps {
5525
5594
  date: string;
5526
5595
  time?: string;
5527
5596
  }>;
5528
- /** Additional payload for long-press events */
5597
+ /** Additional payload for long-press events
5598
+ * @payloadFor longPressEvent
5599
+ */
5529
5600
  longPressPayload?: EventPayload;
5530
5601
  /** Event emitted on swipe left (next week): UI:{swipeLeftEvent} */
5531
5602
  swipeLeftEvent?: EventEmit<Record<string, never>>;
@@ -5852,7 +5923,7 @@ interface EmojiPickerProps {
5852
5923
  /**
5853
5924
  * Declarative event name — picking an emoji emits UI:{pickEvent} with { emoji } via eventBus
5854
5925
  */
5855
- pickEvent?: EventKey;
5926
+ pickEvent?: EventEmit<EmojiPickPayload>;
5856
5927
  /**
5857
5928
  * Which side of the trigger the panel opens on
5858
5929
  * @default 'top'
@@ -6191,6 +6262,12 @@ interface MathCanvasProps {
6191
6262
  hops?: MathHop[];
6192
6263
  /** Extra declarative shapes in canvas pixel coordinates. */
6193
6264
  shapes?: LearningShape[];
6265
+ /**
6266
+ * Game-canvas drawables painted in math world coordinates (e.g. `draw-sprite`
6267
+ * for a character sprite on the graph). The canvas maps their `ScenePos` through
6268
+ * the same x/y world→pixel transform used for curves/points.
6269
+ */
6270
+ drawables?: DrawableNode[];
6194
6271
  /** Top-right status chips, forwarded verbatim to LearningCanvas. */
6195
6272
  readouts?: LearningReadout[];
6196
6273
  /** Inset sparkline panels, forwarded verbatim to LearningCanvas. */
@@ -7351,8 +7428,12 @@ interface NumberStepperProps {
7351
7428
  /** Direct onChange callback */
7352
7429
  onChange?: (value: number) => void;
7353
7430
  /** Declarative event name for value changes */
7354
- action?: EventKey;
7355
- /** Payload to include with the action event */
7431
+ action?: EventEmit<{
7432
+ value: number;
7433
+ }>;
7434
+ /** Payload to include with the action event
7435
+ * @payloadFor action
7436
+ */
7356
7437
  actionPayload?: EventPayload;
7357
7438
  /** Additional CSS classes */
7358
7439
  className?: string;
@@ -7375,8 +7456,12 @@ interface StarRatingProps {
7375
7456
  /** Star size */
7376
7457
  size?: StarRatingSize;
7377
7458
  /** Declarative event name for rating changes */
7378
- action?: EventKey;
7379
- /** Payload to include with the action event */
7459
+ action?: EventEmit<{
7460
+ value: number;
7461
+ }>;
7462
+ /** Payload to include with the action event
7463
+ * @payloadFor action
7464
+ */
7380
7465
  actionPayload?: EventPayload;
7381
7466
  /** Direct onChange callback */
7382
7467
  onChange?: (value: number) => void;
@@ -7403,8 +7488,17 @@ interface UploadDropZoneProps {
7403
7488
  /** Disabled state */
7404
7489
  disabled?: boolean;
7405
7490
  /** Declarative event name for file selection */
7406
- action?: EventKey;
7407
- /** Payload to include with the action event */
7491
+ action?: EventEmit<{
7492
+ files: {
7493
+ name: string;
7494
+ size: number;
7495
+ type: string;
7496
+ content: string;
7497
+ }[];
7498
+ }>;
7499
+ /** Payload to include with the action event
7500
+ * @payloadFor action
7501
+ */
7408
7502
  actionPayload?: EventPayload;
7409
7503
  /** Direct onFiles callback */
7410
7504
  onFiles?: (files: File[]) => void;
@@ -7577,7 +7671,7 @@ interface DataGridProps extends DataDndProps {
7577
7671
  /** Enable multi-select with checkboxes */
7578
7672
  selectable?: boolean;
7579
7673
  /** Selection change event name (emits UI:{selectionEvent} with { selectedIds: string[] }) */
7580
- selectionEvent?: EventKey;
7674
+ selectionEvent?: EventEmit<SelectionChangePayload>;
7581
7675
  /** Enable infinite scroll loading */
7582
7676
  infiniteScroll?: boolean;
7583
7677
  /** Event emitted when more items needed: UI:{loadMoreEvent} */
@@ -7603,7 +7697,7 @@ interface DataGridProps extends DataDndProps {
7603
7697
  */
7604
7698
  look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
7605
7699
  }
7606
- declare function DataGrid({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | React__default.JSX.Element | null | undefined;
7700
+ declare function DataGrid({ entity, fields, columns, itemActions, maxInlineActions, scrollX, cols, gap, minCardWidth, className, isLoading, error, imageField, selectable, selectionEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, renderItem: schemaRenderItem, dragGroup, accepts, sortable, dropEvent, reorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataGridProps): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
7607
7701
  declare namespace DataGrid {
7608
7702
  var displayName: string;
7609
7703
  }
@@ -7673,7 +7767,8 @@ interface DataListProps extends DataDndProps {
7673
7767
  maxInlineActions?: number;
7674
7768
  /** When set, the whole row is clickable and emits UI:{itemClickEvent} with
7675
7769
  * { id, row } (action-button clicks stopPropagation so they still win). */
7676
- itemClickEvent?: EventKey;
7770
+ /** @entityRow row */
7771
+ itemClickEvent?: EventEmit<ItemActionPayload>;
7677
7772
  /** Gap between rows */
7678
7773
  gap?: 'none' | 'sm' | 'md' | 'lg';
7679
7774
  /** Visual variant */
@@ -7756,7 +7851,7 @@ interface DataListProps extends DataDndProps {
7756
7851
  */
7757
7852
  look?: "dense" | "spacious" | "striped" | "borderless" | "card-rows";
7758
7853
  }
7759
- declare function DataList({ entity, fields, columns, itemActions, maxInlineActions, itemClickEvent, gap, variant, groupBy, senderField, senderLabelField, currentUser, emptyMessage, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, sortBy, sortDirection, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataListProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | React__default.JSX.Element | null | undefined;
7854
+ declare function DataList({ entity, fields, columns, itemActions, maxInlineActions, itemClickEvent, gap, variant, groupBy, senderField, senderLabelField, currentUser, emptyMessage, className, isLoading, error, reorderable: _reorderable, reorderEvent: _reorderEvent, swipeLeftEvent: _swipeLeftEvent, swipeLeftActions: _swipeLeftActions, swipeRightEvent: _swipeRightEvent, swipeRightActions: _swipeRightActions, longPressEvent: _longPressEvent, infiniteScroll, loadMoreEvent, hasMore, children, pageSize, sortBy, sortDirection, renderItem: schemaRenderItem, dragGroup, accepts, sortable: sortableProp, dropEvent, reorderEvent: dndReorderEvent, positionEvent, dndItemIdField, dndRoot, look, }: DataListProps): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
7760
7855
  declare namespace DataList {
7761
7856
  var displayName: string;
7762
7857
  }
@@ -7837,12 +7932,15 @@ interface TableViewProps extends DataDndProps {
7837
7932
  itemClickEvent?: EventKey;
7838
7933
  /** Render a leading checkbox column. Selection changes emit `selectEvent`. */
7839
7934
  selectable?: boolean;
7840
- /** Event emitted on selection change: UI:{selectEvent} with { ids, rows }. */
7841
- selectEvent?: EventKey;
7935
+ /** Event emitted on selection change: UI:{selectEvent} with { selectedIds }. */
7936
+ selectEvent?: EventEmit<SelectionChangePayload>;
7842
7937
  /** Currently-selected ids (controlled). Falls back to local state when omitted. */
7843
7938
  selectedIds?: readonly string[];
7844
7939
  /** Event emitted on sortable-header click: UI:{sortEvent} with { column, direction }. */
7845
- sortEvent?: EventKey;
7940
+ sortEvent?: EventEmit<{
7941
+ column: string;
7942
+ direction: 'asc' | 'desc';
7943
+ }>;
7846
7944
  /** Current sort column (display hint for the active header arrow). */
7847
7945
  sortColumn?: string;
7848
7946
  /** Current sort direction (display hint). */
@@ -8033,7 +8131,13 @@ interface SortableListProps {
8033
8131
  items: readonly EntityRow[];
8034
8132
  /** Render function for each item. In .lolo: renderItem: (fn item <Component …={@item.field}/>), binding per-item fields via @item.field. */
8035
8133
  renderItem: (item: EntityRow, index: number) => React__default.ReactNode;
8036
- reorderEvent: EventKey;
8134
+ /** @entityRow item */
8135
+ reorderEvent: EventEmit<{
8136
+ fromIndex: number;
8137
+ toIndex: number;
8138
+ item: EntityRow;
8139
+ }>;
8140
+ /** @payloadFor reorderEvent */
8037
8141
  reorderPayload?: EventPayload;
8038
8142
  dragHandlePosition?: 'left' | 'right';
8039
8143
  className?: string;
@@ -8076,7 +8180,9 @@ interface CarouselProps<T = CarouselItem> {
8076
8180
  slideChangeEvent?: EventEmit<{
8077
8181
  index: number;
8078
8182
  }>;
8079
- /** Payload to include with the slide change event */
8183
+ /** Payload to include with the slide change event
8184
+ * @payloadFor slideChangeEvent
8185
+ */
8080
8186
  slideChangePayload?: JsonObject;
8081
8187
  /** Additional CSS classes */
8082
8188
  className?: string;
@@ -8094,7 +8200,9 @@ declare const Carousel: <T = CarouselItem>({ items, renderItem, children, autoPl
8094
8200
  interface PullToRefreshProps {
8095
8201
  /** Event name to emit on refresh (emitted as UI:{refreshEvent}) */
8096
8202
  refreshEvent: EventKey;
8097
- /** Payload to include with the refresh event */
8203
+ /** Payload to include with the refresh event
8204
+ * @payloadFor refreshEvent
8205
+ */
8098
8206
  refreshPayload?: EventPayload;
8099
8207
  /** Pull distance threshold to trigger refresh in px (default: 60) */
8100
8208
  threshold?: number;
@@ -8483,10 +8591,17 @@ interface TagInputProps {
8483
8591
  className?: string;
8484
8592
  /** Event emitted when a tag is added: `UI:{addEvent}` with payload
8485
8593
  * `{ tag: string, value: string[] }`. */
8486
- addEvent?: EventKey;
8594
+ addEvent?: EventEmit<{
8595
+ tag: string;
8596
+ value: string[];
8597
+ }>;
8487
8598
  /** Event emitted when a tag is removed: `UI:{removeEvent}` with
8488
8599
  * payload `{ tag: string, index: number, value: string[] }`. */
8489
- removeEvent?: EventKey;
8600
+ removeEvent?: EventEmit<{
8601
+ tag: string;
8602
+ index: number;
8603
+ value: string[];
8604
+ }>;
8490
8605
  }
8491
8606
  declare const TagInput: React__default.FC<TagInputProps>;
8492
8607
 
@@ -9916,38 +10031,38 @@ interface WizardField {
9916
10031
  label: string;
9917
10032
  isDefault?: boolean;
9918
10033
  }>;
9919
- defaultValue?: JsonValue;
9920
- condition?: JsonValue[];
10034
+ defaultValue?: ControlValue;
10035
+ condition?: SExpr;
9921
10036
  placeholder?: string;
9922
10037
  entityField?: string;
9923
10038
  minLength?: number;
9924
10039
  maxLength?: number;
9925
- dataSource?: JsonObject;
10040
+ dataSource?: Record<string, FieldValue>;
9926
10041
  displayFields?: string[];
9927
- searchConfig?: JsonObject;
10042
+ searchConfig?: Record<string, FieldValue>;
9928
10043
  hiddenCalculations?: Array<{
9929
10044
  variable: string;
9930
10045
  expression: string;
9931
10046
  scope?: string;
9932
10047
  }>;
9933
- signatureConfig?: JsonObject;
9934
- displayTemplate?: JsonObject;
9935
- lawReference?: JsonObject;
10048
+ signatureConfig?: Record<string, FieldValue>;
10049
+ displayTemplate?: Record<string, FieldValue>;
10050
+ lawReference?: Record<string, FieldValue>;
9936
10051
  contextMenu?: string[];
9937
- calculated?: JsonObject;
10052
+ calculated?: Record<string, FieldValue>;
9938
10053
  readOnly?: boolean;
9939
- minDate?: JsonValue;
10054
+ minDate?: string;
9940
10055
  stats?: Array<{
9941
10056
  label: string;
9942
- value: JsonValue;
10057
+ value: ControlValue;
9943
10058
  icon?: string;
9944
10059
  }>;
9945
10060
  items?: Array<{
9946
10061
  id: string;
9947
10062
  label: string;
9948
- autoCheck?: JsonValue;
10063
+ autoCheck?: boolean;
9949
10064
  }>;
9950
- [key: string]: JsonValue | undefined;
10065
+ [key: string]: JsonValue | SExpr | ControlValue | Record<string, FieldValue> | undefined;
9951
10066
  }
9952
10067
  /** Section within a wizard step */
9953
10068
  interface WizardSection {
@@ -9956,7 +10071,7 @@ interface WizardSection {
9956
10071
  description?: string;
9957
10072
  fields?: WizardField[];
9958
10073
  subsections?: WizardSection[];
9959
- condition?: JsonValue[];
10074
+ condition?: SExpr;
9960
10075
  repeatable?: boolean;
9961
10076
  minItems?: number;
9962
10077
  addButtonLabel?: string;
@@ -9965,9 +10080,9 @@ interface WizardSection {
9965
10080
  expression: string;
9966
10081
  scope?: string;
9967
10082
  }>;
9968
- dataSource?: JsonObject;
10083
+ dataSource?: Record<string, FieldValue>;
9969
10084
  readOnly?: boolean;
9970
- [key: string]: JsonValue | WizardField[] | WizardSection[] | undefined;
10085
+ [key: string]: JsonValue | SExpr | Record<string, FieldValue> | WizardField[] | WizardSection[] | undefined;
9971
10086
  }
9972
10087
  /** Entity mapping configuration */
9973
10088
  interface WizardEntityMapping {
@@ -9979,7 +10094,7 @@ interface WizardEntityMapping {
9979
10094
  }
9980
10095
  /** Validation rule for wizard steps */
9981
10096
  interface WizardValidationRule {
9982
- condition: JsonValue[];
10097
+ condition: SExpr;
9983
10098
  message: string;
9984
10099
  }
9985
10100
  /** Law reference for compliance */
@@ -10048,9 +10163,13 @@ interface WizardContainerProps {
10048
10163
  /** Error state */
10049
10164
  error?: UiError | null;
10050
10165
  /** Emits UI:{nextEvent} when advancing to next step */
10051
- nextEvent?: EventKey;
10166
+ nextEvent?: EventEmit<{
10167
+ step: number;
10168
+ }>;
10052
10169
  /** Emits UI:{backEvent} when going to previous step */
10053
- backEvent?: EventKey;
10170
+ backEvent?: EventEmit<{
10171
+ step: number;
10172
+ }>;
10054
10173
  /** Emits UI:{completeEvent} when wizard completes */
10055
10174
  completeEvent?: EventKey;
10056
10175
  }
@@ -11220,8 +11339,12 @@ interface FormProps extends Omit<React__default.FormHTMLAttributes<HTMLFormEleme
11220
11339
  showSubmit?: boolean;
11221
11340
  /** Form title (used by ModalSlot to extract title) */
11222
11341
  title?: string;
11223
- /** Event to dispatch on successful submit (defaults to 'SAVE') */
11224
- submitEvent?: EventKey;
11342
+ /** Event to dispatch on successful submit (defaults to 'SAVE').
11343
+ * `data` carries the collected field values for the bound entity, so it is
11344
+ * the bound entity's ROW — a compile-time-known type via `linkedEntity`,
11345
+ * unlike the per-field `value` whose type depends on a runtime `fieldId`. */
11346
+ /** @entityRow data */
11347
+ submitEvent?: EventEmit<FormSubmitPayload>;
11225
11348
  /** Event to dispatch on cancel (defaults to 'CANCEL') */
11226
11349
  cancelEvent?: EventKey;
11227
11350
  /** Data for relation fields: { fieldName: RelationOption[] } */
@@ -11244,7 +11367,7 @@ interface FormProps extends Omit<React__default.FormHTMLAttributes<HTMLFormEleme
11244
11367
  /** Callback when any field value changes */
11245
11368
  onFieldChange?: (change: {
11246
11369
  fieldId: string;
11247
- value: FieldValue | undefined;
11370
+ value: ControlValue | undefined;
11248
11371
  formValues: Record<string, FieldValue | undefined>;
11249
11372
  }) => void;
11250
11373
  /** Config path for form configuration (schema-driven) */
@@ -12609,8 +12732,18 @@ interface TopBarAction {
12609
12732
  /** Bus event fired on click. Dispatched as `UI:{event}` with empty payload.
12610
12733
  * Typed as `EventKey` so the pattern-sync detector marks `topBarActions`
12611
12734
  * as `event-list` and the validator checks references against trait
12612
- * emit/listen sets. */
12613
- event: EventKey;
12735
+ * emit/listen sets.
12736
+ *
12737
+ * Optional because an action may navigate instead of dispatching — see
12738
+ * `navigatesTo`. At least one of the two should be set; an entry with
12739
+ * neither renders an inert button. */
12740
+ event?: EventKey;
12741
+ /** Destination URL. Emits `UI:NAVIGATE` on click, the same mechanism
12742
+ * `ButtonGroup` / `PageHeader` / `DocumentViewer` already use for their
12743
+ * action descriptors — the top bar was the odd one out, which forced a
12744
+ * navigation-only button to invent an event nothing listens for. Set
12745
+ * alongside `event` to both dispatch and navigate. */
12746
+ navigatesTo?: string;
12614
12747
  /** Optional badge — number or string rendered in the corner of the icon. */
12615
12748
  badge?: number | string;
12616
12749
  /** Visual variant. Default `"default"`. */