@almadar/ui 5.166.0 → 6.1.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, JsonObject, EntityRow, FieldValue, EntityRole, AnimationName, SpriteDirection, AnimationDef, ScenePos, Camera, EntityWith, TraitConfigValue, JsonValue, AssetCatalog, EventPayloadValue, DeclaredTraitConfig, TraitConfig, OrbitalSchema, Trait, OrbitalEntity, FormSubmitPayload, ControlValue, 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-C6Yz2MuW.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-C6Yz2MuW.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;
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
@@ -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 */
@@ -2422,6 +2460,10 @@ declare namespace GameMenu {
2422
2460
  interface StateGraphTransition {
2423
2461
  from: string;
2424
2462
  to: string;
2463
+ /** Deliberately NOT `EventKey`: this is a drawn arrow's caption, not a bus
2464
+ * event. Typing it `EventKey` would tag `transitions` as an `event-list`
2465
+ * and validate the PLAYER's invented state-machine vocabulary against the
2466
+ * orbital's event set. The real bus outlet here is `nodeClickEvent`. */
2425
2467
  event: string;
2426
2468
  guardHint?: string;
2427
2469
  }
@@ -2443,7 +2485,9 @@ interface StateGraphProps {
2443
2485
  /** Graph canvas height. */
2444
2486
  height?: number;
2445
2487
  /** Emits UI:{nodeClickEvent} with { stateId } when a node is clicked. */
2446
- nodeClickEvent?: EventKey;
2488
+ nodeClickEvent?: EventEmit<{
2489
+ stateId: string;
2490
+ }>;
2447
2491
  className?: string;
2448
2492
  }
2449
2493
  declare function StateGraph({ states, transitions, currentState, selectedState, addingFrom, initialState, width, height, nodeClickEvent, className, }: StateGraphProps): React$1.JSX.Element;
@@ -3375,6 +3419,10 @@ declare namespace TransitionArrow {
3375
3419
  interface StateJsonTransition {
3376
3420
  from: string;
3377
3421
  to: string;
3422
+ /** Deliberately NOT `EventKey`: these are JSON.stringify'd into a code
3423
+ * block for display. This component has no event bus and cannot emit;
3424
+ * tagging `transitions` as an `event-list` would police the PLAYER's
3425
+ * invented vocabulary against the orbital's event set. */
3378
3426
  event: string;
3379
3427
  }
3380
3428
  interface StateJsonViewProps {
@@ -3478,7 +3526,7 @@ interface GameShellProps {
3478
3526
  backgroundAsset?: Asset;
3479
3527
  /** Per-call-site 9-sliced panel override. Chrome normally comes from the active theme; most callers leave this unset. */
3480
3528
  hudBackgroundAsset?: Asset;
3481
- /** 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. */
3482
3530
  fontFamily?: string;
3483
3531
  /** Scopes an `@almadar/ui` theme (e.g. "game-sci-fi-dark") to this shell's subtree. */
3484
3532
  "data-theme"?: string;
@@ -3596,6 +3644,16 @@ interface LearningCanvasProps {
3596
3644
  backgroundColor?: string;
3597
3645
  /** Declarative shapes to draw. */
3598
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;
3599
3657
  /**
3600
3658
  * Top-right status chip row (live measurements, scores, counters).
3601
3659
  * @synonyms chips, stats, measurements
@@ -4033,7 +4091,11 @@ interface BreadcrumbProps {
4033
4091
  * `{ label, href, index }` — the trait handles it with
4034
4092
  * `(navigate ?href)`. Without it, stack crumbs navigate directly.
4035
4093
  */
4036
- itemEvent?: EventKey;
4094
+ itemEvent?: EventEmit<{
4095
+ label: string;
4096
+ href?: string;
4097
+ index: number;
4098
+ }>;
4037
4099
  /**
4038
4100
  * Separator icon (canonical kebab-case name or LucideIcon component)
4039
4101
  */
@@ -4117,9 +4179,17 @@ interface FilterGroupProps {
4117
4179
  /** Layer 2 visual treatment — orthogonal to the semantic variant. */
4118
4180
  look?: FilterGroupLook;
4119
4181
  /** Declarative filter event — emits UI:{event} via eventBus on filter change (alongside canonical UI:FILTER) */
4120
- event?: EventKey;
4182
+ event?: EventEmit<{
4183
+ entity: string;
4184
+ field: string;
4185
+ value: string;
4186
+ query?: string;
4187
+ }>;
4121
4188
  /** Declarative clear event — emits UI:{clearEvent} via eventBus on clear-all (alongside canonical UI:CLEAR_FILTERS) */
4122
- clearEvent?: EventKey;
4189
+ clearEvent?: EventEmit<{
4190
+ entity: string;
4191
+ query?: string;
4192
+ }>;
4123
4193
  }
4124
4194
  declare const FilterGroup: React__default.FC<FilterGroupProps>;
4125
4195
 
@@ -4237,7 +4307,9 @@ interface CardProps {
4237
4307
  maxLevel?: number;
4238
4308
  /** Event emitted on long press: UI:{longPressEvent} (payload: longPressPayload spread — variable) */
4239
4309
  longPressEvent?: EventEmit<EventPayload>;
4240
- /** Additional payload for long-press events */
4310
+ /** Additional payload for long-press events
4311
+ * @payloadFor longPressEvent
4312
+ */
4241
4313
  longPressPayload?: EventPayload;
4242
4314
  }
4243
4315
  /**
@@ -4367,6 +4439,7 @@ interface FloatingActionButtonProps {
4367
4439
  action?: EventKey;
4368
4440
  /**
4369
4441
  * Payload to include with the dispatched action event.
4442
+ * @payloadFor action
4370
4443
  */
4371
4444
  actionPayload?: EventPayload;
4372
4445
  /**
@@ -4911,7 +4984,10 @@ interface SearchInputProps extends Omit<React__default.InputHTMLAttributes<HTMLI
4911
4984
  */
4912
4985
  className?: string;
4913
4986
  /** Declarative search event — emits UI:{event} via eventBus on query submit (alongside canonical UI:SEARCH) */
4914
- event?: EventKey;
4987
+ event?: EventEmit<{
4988
+ searchTerm: string;
4989
+ entity?: string;
4990
+ }>;
4915
4991
  /**
4916
4992
  * Entity type for context-aware search.
4917
4993
  * When provided, search events include entity context.
@@ -5508,7 +5584,8 @@ interface CalendarGridProps {
5508
5584
  onSlotClick?: (day: Date, time: string) => void;
5509
5585
  /** Called when a day header is clicked */
5510
5586
  onDayClick?: (day: Date) => void;
5511
- /** Called when an event is clicked */
5587
+ /** Called when an event is clicked
5588
+ * @entityRow event */
5512
5589
  onEventClick?: (event: EntityRow) => void;
5513
5590
  /** Additional CSS classes */
5514
5591
  className?: string;
@@ -5517,7 +5594,9 @@ interface CalendarGridProps {
5517
5594
  date: string;
5518
5595
  time?: string;
5519
5596
  }>;
5520
- /** Additional payload for long-press events */
5597
+ /** Additional payload for long-press events
5598
+ * @payloadFor longPressEvent
5599
+ */
5521
5600
  longPressPayload?: EventPayload;
5522
5601
  /** Event emitted on swipe left (next week): UI:{swipeLeftEvent} */
5523
5602
  swipeLeftEvent?: EventEmit<Record<string, never>>;
@@ -5844,7 +5923,7 @@ interface EmojiPickerProps {
5844
5923
  /**
5845
5924
  * Declarative event name — picking an emoji emits UI:{pickEvent} with { emoji } via eventBus
5846
5925
  */
5847
- pickEvent?: EventKey;
5926
+ pickEvent?: EventEmit<EmojiPickPayload>;
5848
5927
  /**
5849
5928
  * Which side of the trigger the panel opens on
5850
5929
  * @default 'top'
@@ -6183,6 +6262,12 @@ interface MathCanvasProps {
6183
6262
  hops?: MathHop[];
6184
6263
  /** Extra declarative shapes in canvas pixel coordinates. */
6185
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[];
6186
6271
  /** Top-right status chips, forwarded verbatim to LearningCanvas. */
6187
6272
  readouts?: LearningReadout[];
6188
6273
  /** Inset sparkline panels, forwarded verbatim to LearningCanvas. */
@@ -7343,8 +7428,12 @@ interface NumberStepperProps {
7343
7428
  /** Direct onChange callback */
7344
7429
  onChange?: (value: number) => void;
7345
7430
  /** Declarative event name for value changes */
7346
- action?: EventKey;
7347
- /** 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
+ */
7348
7437
  actionPayload?: EventPayload;
7349
7438
  /** Additional CSS classes */
7350
7439
  className?: string;
@@ -7367,8 +7456,12 @@ interface StarRatingProps {
7367
7456
  /** Star size */
7368
7457
  size?: StarRatingSize;
7369
7458
  /** Declarative event name for rating changes */
7370
- action?: EventKey;
7371
- /** 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
+ */
7372
7465
  actionPayload?: EventPayload;
7373
7466
  /** Direct onChange callback */
7374
7467
  onChange?: (value: number) => void;
@@ -7395,8 +7488,17 @@ interface UploadDropZoneProps {
7395
7488
  /** Disabled state */
7396
7489
  disabled?: boolean;
7397
7490
  /** Declarative event name for file selection */
7398
- action?: EventKey;
7399
- /** 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
+ */
7400
7502
  actionPayload?: EventPayload;
7401
7503
  /** Direct onFiles callback */
7402
7504
  onFiles?: (files: File[]) => void;
@@ -7569,7 +7671,7 @@ interface DataGridProps extends DataDndProps {
7569
7671
  /** Enable multi-select with checkboxes */
7570
7672
  selectable?: boolean;
7571
7673
  /** Selection change event name (emits UI:{selectionEvent} with { selectedIds: string[] }) */
7572
- selectionEvent?: EventKey;
7674
+ selectionEvent?: EventEmit<SelectionChangePayload>;
7573
7675
  /** Enable infinite scroll loading */
7574
7676
  infiniteScroll?: boolean;
7575
7677
  /** Event emitted when more items needed: UI:{loadMoreEvent} */
@@ -7665,7 +7767,8 @@ interface DataListProps extends DataDndProps {
7665
7767
  maxInlineActions?: number;
7666
7768
  /** When set, the whole row is clickable and emits UI:{itemClickEvent} with
7667
7769
  * { id, row } (action-button clicks stopPropagation so they still win). */
7668
- itemClickEvent?: EventKey;
7770
+ /** @entityRow row */
7771
+ itemClickEvent?: EventEmit<ItemActionPayload>;
7669
7772
  /** Gap between rows */
7670
7773
  gap?: 'none' | 'sm' | 'md' | 'lg';
7671
7774
  /** Visual variant */
@@ -7829,12 +7932,15 @@ interface TableViewProps extends DataDndProps {
7829
7932
  itemClickEvent?: EventKey;
7830
7933
  /** Render a leading checkbox column. Selection changes emit `selectEvent`. */
7831
7934
  selectable?: boolean;
7832
- /** Event emitted on selection change: UI:{selectEvent} with { ids, rows }. */
7833
- selectEvent?: EventKey;
7935
+ /** Event emitted on selection change: UI:{selectEvent} with { selectedIds }. */
7936
+ selectEvent?: EventEmit<SelectionChangePayload>;
7834
7937
  /** Currently-selected ids (controlled). Falls back to local state when omitted. */
7835
7938
  selectedIds?: readonly string[];
7836
7939
  /** Event emitted on sortable-header click: UI:{sortEvent} with { column, direction }. */
7837
- sortEvent?: EventKey;
7940
+ sortEvent?: EventEmit<{
7941
+ column: string;
7942
+ direction: 'asc' | 'desc';
7943
+ }>;
7838
7944
  /** Current sort column (display hint for the active header arrow). */
7839
7945
  sortColumn?: string;
7840
7946
  /** Current sort direction (display hint). */
@@ -8025,7 +8131,13 @@ interface SortableListProps {
8025
8131
  items: readonly EntityRow[];
8026
8132
  /** Render function for each item. In .lolo: renderItem: (fn item <Component …={@item.field}/>), binding per-item fields via @item.field. */
8027
8133
  renderItem: (item: EntityRow, index: number) => React__default.ReactNode;
8028
- reorderEvent: EventKey;
8134
+ /** @entityRow item */
8135
+ reorderEvent: EventEmit<{
8136
+ fromIndex: number;
8137
+ toIndex: number;
8138
+ item: EntityRow;
8139
+ }>;
8140
+ /** @payloadFor reorderEvent */
8029
8141
  reorderPayload?: EventPayload;
8030
8142
  dragHandlePosition?: 'left' | 'right';
8031
8143
  className?: string;
@@ -8068,7 +8180,9 @@ interface CarouselProps<T = CarouselItem> {
8068
8180
  slideChangeEvent?: EventEmit<{
8069
8181
  index: number;
8070
8182
  }>;
8071
- /** Payload to include with the slide change event */
8183
+ /** Payload to include with the slide change event
8184
+ * @payloadFor slideChangeEvent
8185
+ */
8072
8186
  slideChangePayload?: JsonObject;
8073
8187
  /** Additional CSS classes */
8074
8188
  className?: string;
@@ -8086,7 +8200,9 @@ declare const Carousel: <T = CarouselItem>({ items, renderItem, children, autoPl
8086
8200
  interface PullToRefreshProps {
8087
8201
  /** Event name to emit on refresh (emitted as UI:{refreshEvent}) */
8088
8202
  refreshEvent: EventKey;
8089
- /** Payload to include with the refresh event */
8203
+ /** Payload to include with the refresh event
8204
+ * @payloadFor refreshEvent
8205
+ */
8090
8206
  refreshPayload?: EventPayload;
8091
8207
  /** Pull distance threshold to trigger refresh in px (default: 60) */
8092
8208
  threshold?: number;
@@ -8475,10 +8591,17 @@ interface TagInputProps {
8475
8591
  className?: string;
8476
8592
  /** Event emitted when a tag is added: `UI:{addEvent}` with payload
8477
8593
  * `{ tag: string, value: string[] }`. */
8478
- addEvent?: EventKey;
8594
+ addEvent?: EventEmit<{
8595
+ tag: string;
8596
+ value: string[];
8597
+ }>;
8479
8598
  /** Event emitted when a tag is removed: `UI:{removeEvent}` with
8480
8599
  * payload `{ tag: string, index: number, value: string[] }`. */
8481
- removeEvent?: EventKey;
8600
+ removeEvent?: EventEmit<{
8601
+ tag: string;
8602
+ index: number;
8603
+ value: string[];
8604
+ }>;
8482
8605
  }
8483
8606
  declare const TagInput: React__default.FC<TagInputProps>;
8484
8607
 
@@ -10040,9 +10163,13 @@ interface WizardContainerProps {
10040
10163
  /** Error state */
10041
10164
  error?: UiError | null;
10042
10165
  /** Emits UI:{nextEvent} when advancing to next step */
10043
- nextEvent?: EventKey;
10166
+ nextEvent?: EventEmit<{
10167
+ step: number;
10168
+ }>;
10044
10169
  /** Emits UI:{backEvent} when going to previous step */
10045
- backEvent?: EventKey;
10170
+ backEvent?: EventEmit<{
10171
+ step: number;
10172
+ }>;
10046
10173
  /** Emits UI:{completeEvent} when wizard completes */
10047
10174
  completeEvent?: EventKey;
10048
10175
  }
@@ -11212,8 +11339,12 @@ interface FormProps extends Omit<React__default.FormHTMLAttributes<HTMLFormEleme
11212
11339
  showSubmit?: boolean;
11213
11340
  /** Form title (used by ModalSlot to extract title) */
11214
11341
  title?: string;
11215
- /** Event to dispatch on successful submit (defaults to 'SAVE') */
11216
- 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>;
11217
11348
  /** Event to dispatch on cancel (defaults to 'CANCEL') */
11218
11349
  cancelEvent?: EventKey;
11219
11350
  /** Data for relation fields: { fieldName: RelationOption[] } */
@@ -11236,7 +11367,7 @@ interface FormProps extends Omit<React__default.FormHTMLAttributes<HTMLFormEleme
11236
11367
  /** Callback when any field value changes */
11237
11368
  onFieldChange?: (change: {
11238
11369
  fieldId: string;
11239
- value: FieldValue | undefined;
11370
+ value: ControlValue | undefined;
11240
11371
  formValues: Record<string, FieldValue | undefined>;
11241
11372
  }) => void;
11242
11373
  /** Config path for form configuration (schema-driven) */
@@ -12601,8 +12732,18 @@ interface TopBarAction {
12601
12732
  /** Bus event fired on click. Dispatched as `UI:{event}` with empty payload.
12602
12733
  * Typed as `EventKey` so the pattern-sync detector marks `topBarActions`
12603
12734
  * as `event-list` and the validator checks references against trait
12604
- * emit/listen sets. */
12605
- 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;
12606
12747
  /** Optional badge — number or string rendered in the corner of the icon. */
12607
12748
  badge?: number | string;
12608
12749
  /** Visual variant. Default `"default"`. */