@almadar/ui 1.0.30 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
  2. package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
  3. package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
  4. package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
  5. package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
  6. package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
  7. package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
  8. package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
  9. package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
  10. package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
  11. package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
  12. package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
  13. package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
  14. package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
  15. package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
  16. package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
  17. package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
  18. package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
  19. package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
  20. package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
  21. package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
  22. package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
  23. package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
  24. package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
  25. package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
  26. package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
  27. package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
  28. package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
  29. package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
  30. package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
  31. package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
  32. package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
  33. package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
  34. package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
  35. package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
  36. package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
  37. package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
  38. package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
  39. package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
  40. package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
  41. package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
  42. package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
  43. package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
  44. package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
  45. package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
  46. package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
  47. package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
  48. package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
  49. package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
  50. package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
  51. package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
  52. package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
  53. package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
  54. package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
  55. package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
  56. package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
  57. package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
  58. package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
  59. package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
  60. package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
  61. package/dist/{ThemeContext-lI5bo85E.d.ts → ThemeContext-D9xUORq5.d.ts} +2 -0
  62. package/dist/chunk-45CTDYBT.js +174 -0
  63. package/dist/{chunk-4UFNDD6B.js → chunk-BTXQJGFB.js} +41 -8
  64. package/dist/chunk-N6DJVKZ6.js +747 -0
  65. package/dist/chunk-PE2H3NAW.js +383 -0
  66. package/dist/{chunk-7IYF4RUG.js → chunk-RFD6G3ZR.js} +23 -68
  67. package/dist/chunk-UCXZS2YJ.js +9501 -0
  68. package/dist/chunk-YXZM3WCF.js +222 -0
  69. package/dist/cn-BoBXsxuX.d.ts +194 -0
  70. package/dist/components/index.css +1154 -0
  71. package/dist/components/index.d.ts +1082 -673
  72. package/dist/components/index.js +8935 -16486
  73. package/dist/components/organisms/game/three/index.css +315 -0
  74. package/dist/components/organisms/game/three/index.d.ts +1162 -0
  75. package/dist/components/organisms/game/three/index.js +2378 -0
  76. package/dist/context/index.d.ts +4 -4
  77. package/dist/context/index.js +2 -3
  78. package/dist/{event-bus-types-8-cjyMxw.d.ts → event-bus-types-CjJduURa.d.ts} +8 -0
  79. package/dist/hooks/index.d.ts +120 -106
  80. package/dist/hooks/index.js +4 -3
  81. package/dist/isometric-ynNHVPZx.d.ts +111 -0
  82. package/dist/lib/index.d.ts +117 -153
  83. package/dist/lib/index.js +4 -683
  84. package/dist/providers/index.css +1154 -0
  85. package/dist/providers/index.d.ts +84 -4
  86. package/dist/providers/index.js +165 -8
  87. package/dist/{useUISlots-mnggE9X9.d.ts → useUISlots-D0mttBSP.d.ts} +0 -20
  88. package/package.json +32 -11
  89. package/dist/chunk-HY5EFCOK.js +0 -419
  90. package/dist/chunk-W5YTXLXL.js +0 -29
  91. package/dist/cn-mqkxz8Sd.d.ts +0 -9
@@ -1,18 +1,20 @@
1
1
  import * as React$1 from 'react';
2
- import React__default from 'react';
2
+ 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
- export { AuthContextValue, AuthUser, ChangeSummary, CompileResult, CompileStage, ENTITY_EVENTS, EntityDataAdapter, EntityDataProvider, EntityDataRecord, EntityMutationResult, Extension, ExtensionManifest, FileSystemFile, FileSystemStatus, GitHubRepo, GitHubStatus, HistoryTimelineItem, OpenFile, OrbitalEventPayload, OrbitalEventResponse, QuerySingletonEntity, QuerySingletonResult, QuerySingletonState, QueryState, RevertResult, SelectedFile, UseCompileResult, UseEntityDetailResult, UseEntityListOptions, UseEntityListResult, UseEntityMutationsOptions, UseExtensionsOptions, UseExtensionsResult, UseFileEditorOptions, UseFileEditorResult, UseFileSystemResult, UseOrbitalHistoryOptions, UseOrbitalHistoryResult, entityDataKeys, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEmitEvent, useEntities, useEntitiesByType, useEntity, useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityMutations, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../hooks/index.js';
7
- import { E as EventBusContextType } from '../event-bus-types-8-cjyMxw.js';
8
- export { a as EventListener, K as KFlowEvent, U as Unsubscribe } from '../event-bus-types-8-cjyMxw.js';
9
- import { S as SlotContent, a as UISlot } from '../useUISlots-mnggE9X9.js';
10
- export { D as DEFAULT_SLOTS, R as RenderUIConfig, b as SlotAnimation, c as SlotChangeCallback, U as UISlotManager, u as useUISlotManager } from '../useUISlots-mnggE9X9.js';
11
- export { c as cn } from '../cn-mqkxz8Sd.js';
6
+ import { b as DomLayoutData, d as DomStateNode, V as VisualizerConfig, e as DomTransitionLabel, C as ContentSegment } from '../cn-BoBXsxuX.js';
7
+ export { h as cn } from '../cn-BoBXsxuX.js';
8
+ import { I as IsometricTile, a as IsometricUnit, b as IsometricFeature, C as CameraState } from '../isometric-ynNHVPZx.js';
9
+ export { AuthContextValue, AuthUser, ChangeSummary, CompileResult, CompileStage, ENTITY_EVENTS, EntityDataAdapter, EntityDataProvider, EntityDataRecord, EntityMutationResult, Extension, ExtensionManifest, FileSystemFile, FileSystemStatus, GitHubRepo, GitHubStatus, HistoryTimelineItem, I18nContextValue, I18nProvider, OpenFile, OrbitalEventPayload, OrbitalEventResponse, QuerySingletonEntity, QuerySingletonResult, QuerySingletonState, QueryState, ResolvedEntity, RevertResult, SelectedFile, TranslateFunction, UseCompileResult, UseEntityDetailResult, UseEntityListOptions, UseEntityListResult, UseEntityMutationsOptions, UseExtensionsOptions, UseExtensionsResult, UseFileEditorOptions, UseFileEditorResult, UseFileSystemResult, UseOrbitalHistoryOptions, UseOrbitalHistoryResult, createTranslate, entityDataKeys, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEmitEvent, useEntities, useEntitiesByType, useEntity, useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntityMutations, useEntitySuspense, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useTranslate, useUIEvents, useUpdateEntity, useValidation } from '../hooks/index.js';
10
+ import { E as EventBusContextType } from '../event-bus-types-CjJduURa.js';
11
+ export { a as EventListener, K as KFlowEvent, U as Unsubscribe } from '../event-bus-types-CjJduURa.js';
12
+ import { S as SlotContent, a as UISlot } from '../useUISlots-D0mttBSP.js';
13
+ export { D as DEFAULT_SLOTS, R as RenderUIConfig, b as SlotAnimation, c as SlotChangeCallback, U as UISlotManager, u as useUISlotManager } from '../useUISlots-D0mttBSP.js';
12
14
  export { Entity, clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../stores/index.js';
15
+ import 'clsx';
13
16
  import '@almadar/core';
14
17
  import '@tanstack/react-query';
15
- import 'clsx';
16
18
 
17
19
  type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "success" | "warning" | "default";
18
20
  type ButtonSize = "sm" | "md" | "lg";
@@ -895,11 +897,6 @@ declare namespace ControlButton {
895
897
  var displayName: string;
896
898
  }
897
899
 
898
- /**
899
- * Sprite Component
900
- *
901
- * Renders a single frame from a spritesheet with transform support.
902
- */
903
900
  interface SpriteProps {
904
901
  /** Spritesheet image URL */
905
902
  spritesheet: string;
@@ -957,6 +954,89 @@ declare function Sprite({ spritesheet, frameWidth, frameHeight, frame, x, y, sca
957
954
  */
958
955
  declare function drawSprite(ctx: CanvasRenderingContext2D, image: HTMLImageElement, props: Omit<SpriteProps, 'spritesheet' | 'className' | 'onClick'>): void;
959
956
 
957
+ /**
958
+ * StateIndicator Component
959
+ *
960
+ * Displays a visual indicator for a game entity's current state.
961
+ * Generic — not tied to any specific game. Projects can extend
962
+ * the state styles via the `stateStyles` prop.
963
+ */
964
+ interface StateStyle {
965
+ icon: string;
966
+ bgClass: string;
967
+ }
968
+ interface StateIndicatorProps {
969
+ /** The current state name */
970
+ state: string;
971
+ /** Optional label override (defaults to capitalized state name) */
972
+ label?: string;
973
+ /** Size variant */
974
+ size?: 'sm' | 'md' | 'lg';
975
+ /** Whether to show pulse animation on non-idle states */
976
+ animated?: boolean;
977
+ /** Custom state styles to extend/override defaults */
978
+ stateStyles?: Record<string, StateStyle>;
979
+ /** Additional CSS classes */
980
+ className?: string;
981
+ }
982
+ declare function StateIndicator({ state, label, size, animated, stateStyles, className, }: StateIndicatorProps): JSX.Element;
983
+ declare namespace StateIndicator {
984
+ var displayName: string;
985
+ }
986
+
987
+ interface ErrorBoundaryProps {
988
+ /** Content to render when no error */
989
+ children: ReactNode;
990
+ /** Fallback UI when an error is caught — ReactNode or render function */
991
+ fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode);
992
+ /** Additional CSS classes for the wrapper */
993
+ className?: string;
994
+ /** Called when an error is caught (for logging/telemetry) */
995
+ onError?: (error: Error, errorInfo: ErrorInfo) => void;
996
+ }
997
+ interface ErrorBoundaryState {
998
+ error: Error | null;
999
+ }
1000
+ /**
1001
+ * ErrorBoundary — catches React render errors in child components.
1002
+ *
1003
+ * Uses `getDerivedStateFromError` and `componentDidCatch` to capture errors
1004
+ * and render a fallback UI. Supports both static ReactNode fallbacks and
1005
+ * render-function fallbacks that receive the error and a reset function.
1006
+ *
1007
+ * @example
1008
+ * ```tsx
1009
+ * // Static fallback
1010
+ * <ErrorBoundary fallback={<Alert variant="error">Something broke</Alert>}>
1011
+ * <MyComponent />
1012
+ * </ErrorBoundary>
1013
+ *
1014
+ * // Render function fallback with reset
1015
+ * <ErrorBoundary fallback={(error, reset) => (
1016
+ * <VStack>
1017
+ * <Typography>Error: {error.message}</Typography>
1018
+ * <Button onClick={reset}>Try Again</Button>
1019
+ * </VStack>
1020
+ * )}>
1021
+ * <MyComponent />
1022
+ * </ErrorBoundary>
1023
+ *
1024
+ * // Default fallback (uses ErrorState molecule)
1025
+ * <ErrorBoundary>
1026
+ * <MyComponent />
1027
+ * </ErrorBoundary>
1028
+ * ```
1029
+ */
1030
+ declare class ErrorBoundary extends React__default.Component<ErrorBoundaryProps, ErrorBoundaryState> {
1031
+ static displayName: string;
1032
+ constructor(props: ErrorBoundaryProps);
1033
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
1034
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
1035
+ private reset;
1036
+ render(): ReactNode;
1037
+ private renderFallback;
1038
+ }
1039
+
960
1040
  /**
961
1041
  * FormField Molecule Component
962
1042
  *
@@ -1018,6 +1098,41 @@ interface ErrorStateProps {
1018
1098
  }
1019
1099
  declare const ErrorState: React__default.FC<ErrorStateProps>;
1020
1100
 
1101
+ type SkeletonVariant = 'header' | 'table' | 'form' | 'card' | 'text';
1102
+ interface SkeletonProps {
1103
+ /** The skeleton variant to render */
1104
+ variant?: SkeletonVariant;
1105
+ /** Number of rows for table/text variants */
1106
+ rows?: number;
1107
+ /** Number of columns for table variant */
1108
+ columns?: number;
1109
+ /** Number of fields for form variant */
1110
+ fields?: number;
1111
+ /** Additional CSS classes */
1112
+ className?: string;
1113
+ }
1114
+ /**
1115
+ * Skeleton — loading placeholder with 5 variants for Suspense fallbacks.
1116
+ *
1117
+ * Variants: `header`, `table`, `form`, `card`, `text`.
1118
+ * Used as fallback content inside `<Suspense>` boundaries.
1119
+ *
1120
+ * @example
1121
+ * ```tsx
1122
+ * <Suspense fallback={<Skeleton variant="table" rows={8} columns={5} />}>
1123
+ * <DataTable entity="Task" />
1124
+ * </Suspense>
1125
+ *
1126
+ * <Suspense fallback={<Skeleton variant="form" fields={6} />}>
1127
+ * <Form entity="Task" />
1128
+ * </Suspense>
1129
+ * ```
1130
+ */
1131
+ declare function Skeleton({ variant, rows, columns, fields, className, }: SkeletonProps): React__default.ReactElement;
1132
+ declare namespace Skeleton {
1133
+ var displayName: string;
1134
+ }
1135
+
1021
1136
  /**
1022
1137
  * Accordion Molecule Component
1023
1138
  *
@@ -1320,6 +1435,9 @@ interface CardProps {
1320
1435
  * Card component for displaying content in a contained box
1321
1436
  */
1322
1437
  declare function Card({ title, subtitle, image, actions, children, onClick, className, action, }: CardProps): react_jsx_runtime.JSX.Element;
1438
+ declare namespace Card {
1439
+ var displayName: string;
1440
+ }
1323
1441
 
1324
1442
  /**
1325
1443
  * Container Component
@@ -2146,6 +2264,100 @@ interface WizardNavigationProps {
2146
2264
  */
2147
2265
  declare const WizardNavigation: React__default.FC<WizardNavigationProps>;
2148
2266
 
2267
+ /**
2268
+ * MarkdownContent Molecule Component
2269
+ *
2270
+ * Renders markdown content with support for GFM (GitHub Flavored Markdown)
2271
+ * and math equations (KaTeX). Handles inline code only — fenced code blocks
2272
+ * should be parsed out and rendered with CodeBlock component.
2273
+ *
2274
+ * Event Contract:
2275
+ * - No events emitted (display-only component)
2276
+ * - entityAware: false
2277
+ *
2278
+ * NOTE: react-markdown's `components` override API requires native HTML
2279
+ * elements — this is the same library-boundary exception as `<iframe>` in
2280
+ * DocumentViewer and `<svg>` in JazariStateMachine/StateMachineView.
2281
+ */
2282
+
2283
+ interface MarkdownContentProps {
2284
+ /** The markdown content to render */
2285
+ content: string;
2286
+ /** Text direction */
2287
+ direction?: 'rtl' | 'ltr';
2288
+ /** Additional CSS classes */
2289
+ className?: string;
2290
+ }
2291
+ declare const MarkdownContent: React__default.NamedExoticComponent<MarkdownContentProps>;
2292
+
2293
+ /**
2294
+ * CodeBlock Molecule Component
2295
+ *
2296
+ * A syntax-highlighted code block with copy-to-clipboard functionality.
2297
+ * Preserves scroll position during re-renders.
2298
+ *
2299
+ * Event Contract:
2300
+ * - Emits: UI:COPY_CODE { language, success }
2301
+ */
2302
+
2303
+ interface CodeBlockProps {
2304
+ /** The code content to display */
2305
+ code: string;
2306
+ /** Programming language for syntax highlighting */
2307
+ language?: string;
2308
+ /** Show the copy button */
2309
+ showCopyButton?: boolean;
2310
+ /** Show the language badge */
2311
+ showLanguageBadge?: boolean;
2312
+ /** Maximum height before scrolling */
2313
+ maxHeight?: string;
2314
+ /** Additional CSS classes */
2315
+ className?: string;
2316
+ }
2317
+ declare const CodeBlock: React__default.NamedExoticComponent<CodeBlockProps>;
2318
+
2319
+ /**
2320
+ * QuizBlock Molecule Component
2321
+ *
2322
+ * A collapsible Q&A block for embedded quiz questions in content.
2323
+ * Shows the question with a reveal button for the answer.
2324
+ *
2325
+ * Event Contract:
2326
+ * - No events emitted (self-contained interaction)
2327
+ * - entityAware: false
2328
+ */
2329
+
2330
+ interface QuizBlockProps {
2331
+ /** The quiz question */
2332
+ question: string;
2333
+ /** The quiz answer (revealed on toggle) */
2334
+ answer: string;
2335
+ /** Additional CSS classes */
2336
+ className?: string;
2337
+ }
2338
+ declare const QuizBlock: React__default.FC<QuizBlockProps>;
2339
+
2340
+ /**
2341
+ * ScaledDiagram Molecule
2342
+ *
2343
+ * Wraps a fixed-size diagram (like JazariStateMachine / StateMachineView)
2344
+ * and CSS-scales it to fit the parent container width.
2345
+ *
2346
+ * The diagram renders at its natural (large) size. We observe the content
2347
+ * element and once the diagram is measured we apply transform:scale() with
2348
+ * a corrected container height so surrounding layout flows correctly.
2349
+ *
2350
+ * Event Contract:
2351
+ * - No events emitted (layout-only wrapper)
2352
+ * - entityAware: false
2353
+ */
2354
+
2355
+ interface ScaledDiagramProps {
2356
+ children: React__default.ReactNode;
2357
+ className?: string;
2358
+ }
2359
+ declare const ScaledDiagram: React__default.FC<ScaledDiagramProps>;
2360
+
2149
2361
  /**
2150
2362
  * RepeatableFormSection
2151
2363
  *
@@ -2286,6 +2498,72 @@ interface FormSectionHeaderProps {
2286
2498
  }
2287
2499
  declare const FormSectionHeader: React__default.FC<FormSectionHeaderProps>;
2288
2500
 
2501
+ /**
2502
+ * Shared types for entity-display organisms.
2503
+ *
2504
+ * All entity-display organisms (DataTable, List, Table, CardGrid, DetailPanel)
2505
+ * extend EntityDisplayProps to guarantee a uniform prop contract.
2506
+ *
2507
+ * Exception: Form manages local `formData` state for field input tracking.
2508
+ * This is the ONE allowed exception — documented here.
2509
+ */
2510
+ declare const EntityDisplayEvents: {
2511
+ readonly SORT: "SORT";
2512
+ readonly PAGINATE: "PAGINATE";
2513
+ readonly SEARCH: "SEARCH";
2514
+ readonly FILTER: "FILTER";
2515
+ readonly CLEAR_FILTERS: "CLEAR_FILTERS";
2516
+ readonly SELECT: "SELECT";
2517
+ readonly DESELECT: "DESELECT";
2518
+ };
2519
+ interface SortPayload {
2520
+ field: string;
2521
+ direction: 'asc' | 'desc';
2522
+ }
2523
+ interface PaginatePayload {
2524
+ page: number;
2525
+ pageSize?: number;
2526
+ }
2527
+ interface SearchPayload {
2528
+ query: string;
2529
+ }
2530
+ interface FilterPayload {
2531
+ field: string;
2532
+ operator: string;
2533
+ value: unknown;
2534
+ }
2535
+ interface SelectPayload {
2536
+ ids: (string | number)[];
2537
+ }
2538
+ interface EntityDisplayProps<T = unknown> {
2539
+ /** Entity name for schema-driven integration */
2540
+ entity?: string;
2541
+ /** Data array provided by the trait via render-ui */
2542
+ data?: readonly T[] | T[];
2543
+ /** Additional CSS classes */
2544
+ className?: string;
2545
+ /** Loading state indicator */
2546
+ isLoading?: boolean;
2547
+ /** Error state */
2548
+ error?: Error | null;
2549
+ /** Current sort field */
2550
+ sortBy?: string;
2551
+ /** Current sort direction */
2552
+ sortDirection?: 'asc' | 'desc';
2553
+ /** Current search query value */
2554
+ searchValue?: string;
2555
+ /** Current page number (1-indexed) */
2556
+ page?: number;
2557
+ /** Number of items per page */
2558
+ pageSize?: number;
2559
+ /** Total number of items (for pagination display) */
2560
+ totalCount?: number;
2561
+ /** Active filters */
2562
+ activeFilters?: Record<string, unknown>;
2563
+ /** Currently selected item IDs */
2564
+ selectedIds?: readonly (string | number)[];
2565
+ }
2566
+
2289
2567
  interface Column<T> {
2290
2568
  key: keyof T | string;
2291
2569
  header: string;
@@ -2299,70 +2577,35 @@ interface RowAction<T> {
2299
2577
  onClick: (row: T) => void;
2300
2578
  variant?: "default" | "danger";
2301
2579
  show?: (row: T) => boolean;
2302
- /** Event name for testability (data-event attribute) */
2303
2580
  event?: string;
2304
2581
  }
2305
2582
  interface DataTableProps<T extends {
2306
2583
  id: string | number;
2307
- }> {
2584
+ }> extends EntityDisplayProps<T> {
2308
2585
  /** Fields to display - accepts string[] or Column[] for unified interface. Alias for columns */
2309
2586
  fields?: readonly Column<T>[] | readonly string[];
2310
- /** Columns can be Column objects or simple string field names - accepts readonly for generated const arrays */
2587
+ /** Columns can be Column objects or simple string field names */
2311
2588
  columns?: readonly Column<T>[] | readonly string[];
2312
- /** Data array - primary prop for data. Accepts readonly or mutable arrays, and unknown for generated components */
2313
- data?: readonly T[] | T[] | readonly unknown[] | unknown[] | unknown;
2314
- /** Entity name for auto-fetch OR data array (backwards compatible) */
2315
- entity?: string | readonly T[] | T[];
2316
2589
  /** Item actions from generated code - maps to rowActions */
2317
2590
  itemActions?: readonly {
2318
2591
  label: string;
2319
2592
  event?: string;
2320
- /** Navigation URL - supports template interpolation like "/products/{{id}}" or "/products/:id" */
2321
2593
  navigatesTo?: string;
2322
- /** Action used by generated code - alternative to event */
2323
2594
  action?: string;
2324
- /** Placement accepts string for compatibility with generated code */
2325
2595
  placement?: "row" | "bulk" | string;
2326
2596
  icon?: LucideIcon;
2327
- /** Variant accepts all button variants for compatibility */
2328
2597
  variant?: "default" | "primary" | "secondary" | "ghost" | "danger" | string;
2329
- /** Click handler from generated code */
2330
- onClick?: (row: T) => void;
2331
2598
  }[];
2332
- /** Loading state indicator */
2333
- isLoading?: boolean;
2334
- /** Error state */
2335
- error?: Error | null;
2336
2599
  emptyIcon?: LucideIcon;
2337
2600
  emptyTitle?: string;
2338
2601
  emptyDescription?: string;
2339
2602
  emptyAction?: {
2340
2603
  label: string;
2341
- onClick: () => void;
2604
+ event?: string;
2342
2605
  };
2343
2606
  selectable?: boolean;
2344
- selectedIds?: readonly (string | number)[];
2345
- onSelectionChange?: (ids: (string | number)[]) => void;
2346
- sortBy?: string;
2347
- sortDirection?: "asc" | "desc";
2348
- onSort?: (key: string, direction: "asc" | "desc") => void;
2349
- pagination?: {
2350
- page: number;
2351
- pageSize: number;
2352
- total: number;
2353
- onPageChange: (page: number) => void;
2354
- onPageSizeChange?: (size: number) => void;
2355
- };
2356
- enablePagination?: boolean;
2357
- /** Items per page for automatic pagination (default: 20) */
2358
- defaultPageSize?: number;
2359
- /** Show total count in pagination */
2360
- showTotal?: boolean;
2361
2607
  searchable?: boolean;
2362
- searchValue?: string;
2363
- onSearch?: (value: string) => void;
2364
2608
  searchPlaceholder?: string;
2365
- onRowClick?: (row: T) => void;
2366
2609
  rowActions?: readonly RowAction<T>[];
2367
2610
  bulkActions?: ReadonlyArray<{
2368
2611
  label: string;
@@ -2371,17 +2614,15 @@ interface DataTableProps<T extends {
2371
2614
  variant?: "default" | "danger";
2372
2615
  }>;
2373
2616
  headerActions?: React__default.ReactNode;
2374
- /**
2375
- * Query singleton binding for filter/sort state.
2376
- * When provided, syncs with the query singleton for filtering and sorting.
2377
- * Example: "@TaskQuery"
2378
- */
2379
- query?: string;
2380
- className?: string;
2617
+ /** Show total count in pagination */
2618
+ showTotal?: boolean;
2381
2619
  }
2382
2620
  declare function DataTable<T extends {
2383
2621
  id: string | number;
2384
- }>({ fields, columns, data, entity, itemActions, isLoading, error: externalError, emptyIcon, emptyTitle, emptyDescription, emptyAction, selectable, selectedIds, onSelectionChange, sortBy: externalSortBy, sortDirection: externalSortDirection, onSort, pagination, enablePagination, defaultPageSize, showTotal, searchable, searchValue, onSearch, searchPlaceholder, onRowClick, rowActions: externalRowActions, bulkActions, headerActions, query, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
2622
+ }>({ 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;
2623
+ declare namespace DataTable {
2624
+ var displayName: string;
2625
+ }
2385
2626
 
2386
2627
  /**
2387
2628
  * Schema metric definition
@@ -2488,6 +2729,10 @@ interface PageHeaderProps {
2488
2729
  actions?: readonly Readonly<SchemaAction>[];
2489
2730
  /** Loading state indicator */
2490
2731
  isLoading?: boolean;
2732
+ /** Error state */
2733
+ error?: Error | null;
2734
+ /** Entity name for schema-driven auto-fetch */
2735
+ entity?: string;
2491
2736
  /** Tabs for sub-navigation */
2492
2737
  tabs?: ReadonlyArray<{
2493
2738
  label: string;
@@ -2507,8 +2752,8 @@ declare const PageHeader: React__default.FC<PageHeaderProps>;
2507
2752
  *
2508
2753
  * Composes atoms and molecules to create a professional detail view.
2509
2754
  *
2510
- * When `entity` prop is provided without `data`, automatically fetches data
2511
- * using the useEntityDetail hook with ID from URL params.
2755
+ * Data is provided by the trait via the `data` prop (render-ui effect).
2756
+ * See EntityDisplayProps in ./types.ts for base prop contract.
2512
2757
  */
2513
2758
 
2514
2759
  interface DetailField {
@@ -2542,7 +2787,7 @@ type FieldDef$2 = string | {
2542
2787
  key: string;
2543
2788
  header?: string;
2544
2789
  };
2545
- interface DetailPanelProps {
2790
+ interface DetailPanelProps extends Omit<EntityDisplayProps<Record<string, unknown>>, 'data'> {
2546
2791
  title?: string;
2547
2792
  subtitle?: string;
2548
2793
  status?: {
@@ -2555,20 +2800,16 @@ interface DetailPanelProps {
2555
2800
  actions?: readonly DetailPanelAction[];
2556
2801
  footer?: React__default.ReactNode;
2557
2802
  slideOver?: boolean;
2558
- onClose?: () => void;
2559
- className?: string;
2560
- entity?: string;
2561
2803
  /** Fields to display - accepts string[], {key, header}[], or DetailField[] */
2562
2804
  fields?: readonly (FieldDef$2 | DetailField)[];
2563
2805
  /** Alias for fields - backwards compatibility */
2564
2806
  fieldNames?: readonly string[];
2807
+ /** Data object provided by the trait via render-ui */
2565
2808
  data?: Record<string, unknown> | unknown;
2566
2809
  /** Initial data for edit mode (passed by compiler) */
2567
2810
  initialData?: Record<string, unknown> | unknown;
2568
2811
  /** Display mode (passed by compiler) */
2569
2812
  mode?: string;
2570
- isLoading?: boolean;
2571
- error?: Error | null;
2572
2813
  /** Panel position (for drawer/sidebar placement) */
2573
2814
  position?: "left" | "right";
2574
2815
  /** Panel width (CSS value, e.g., '400px', '50%') */
@@ -2592,6 +2833,12 @@ interface FormSectionProps {
2592
2833
  /** Grid columns for fields */
2593
2834
  columns?: 1 | 2 | 3;
2594
2835
  className?: string;
2836
+ /** Loading state */
2837
+ isLoading?: boolean;
2838
+ /** Error state */
2839
+ error?: Error | null;
2840
+ /** Entity name */
2841
+ entity?: string;
2595
2842
  }
2596
2843
  declare const FormSection$1: React__default.FC<FormSectionProps>;
2597
2844
  /**
@@ -2602,6 +2849,12 @@ interface FormLayoutProps {
2602
2849
  /** Show section dividers */
2603
2850
  dividers?: boolean;
2604
2851
  className?: string;
2852
+ /** Loading state */
2853
+ isLoading?: boolean;
2854
+ /** Error state */
2855
+ error?: Error | null;
2856
+ /** Entity name */
2857
+ entity?: string;
2605
2858
  }
2606
2859
  declare const FormLayout: React__default.FC<FormLayoutProps>;
2607
2860
  /**
@@ -2614,6 +2867,12 @@ interface FormActionsProps {
2614
2867
  /** Alignment */
2615
2868
  align?: "left" | "right" | "between" | "center";
2616
2869
  className?: string;
2870
+ /** Loading state */
2871
+ isLoading?: boolean;
2872
+ /** Error state */
2873
+ error?: Error | null;
2874
+ /** Entity name */
2875
+ entity?: string;
2617
2876
  }
2618
2877
  declare const FormActions: React__default.FC<FormActionsProps>;
2619
2878
 
@@ -2730,13 +2989,18 @@ interface SchemaField {
2730
2989
  /** Whether field is disabled (alternative to readonly for compatibility) */
2731
2990
  disabled?: boolean;
2732
2991
  }
2992
+ /**
2993
+ * Form is the ONE EXCEPTION to the "no internal state" rule for organisms.
2994
+ * It manages local `formData` state for field input tracking.
2995
+ * See EntityDisplayProps in ./types.ts for documentation.
2996
+ */
2733
2997
  interface FormProps extends Omit<React__default.FormHTMLAttributes<HTMLFormElement>, "onSubmit"> {
2734
2998
  /** Form fields (traditional React children) */
2735
2999
  children?: React__default.ReactNode;
2736
- /** Submit handler - receives form data, or event name string for trait dispatch */
2737
- onSubmit?: ((e: React__default.FormEvent<HTMLFormElement>, data?: Record<string, unknown>) => void) | string;
2738
- /** Cancel handler - function or event name string for trait dispatch */
2739
- onCancel?: (() => void) | string;
3000
+ /** Submit event name for trait dispatch (emitted via eventBus as UI:{onSubmit}) */
3001
+ onSubmit?: string;
3002
+ /** Cancel event name for trait dispatch (emitted via eventBus as UI:{onCancel}) */
3003
+ onCancel?: string;
2740
3004
  /** Form layout */
2741
3005
  layout?: "vertical" | "horizontal" | "inline";
2742
3006
  /** Gap between fields */
@@ -2889,6 +3153,18 @@ interface HeaderProps {
2889
3153
  * Additional CSS classes
2890
3154
  */
2891
3155
  className?: string;
3156
+ /**
3157
+ * Loading state indicator (closed circuit)
3158
+ */
3159
+ isLoading?: boolean;
3160
+ /**
3161
+ * Error state (closed circuit)
3162
+ */
3163
+ error?: Error | null;
3164
+ /**
3165
+ * Entity name for schema-driven auto-fetch (closed circuit)
3166
+ */
3167
+ entity?: string;
2892
3168
  }
2893
3169
  declare const Header: React__default.FC<HeaderProps>;
2894
3170
 
@@ -2951,6 +3227,12 @@ interface NavigationProps {
2951
3227
  * Additional CSS classes
2952
3228
  */
2953
3229
  className?: string;
3230
+ /** Loading state indicator */
3231
+ isLoading?: boolean;
3232
+ /** Error state */
3233
+ error?: Error | null;
3234
+ /** Entity name for schema-driven auto-fetch */
3235
+ entity?: string;
2954
3236
  }
2955
3237
  declare const Navigation: React__default.FC<NavigationProps>;
2956
3238
 
@@ -2986,6 +3268,12 @@ interface SectionProps {
2986
3268
  contentClassName?: string;
2987
3269
  /** HTML element to render as */
2988
3270
  as?: React__default.ElementType;
3271
+ /** Loading state indicator */
3272
+ isLoading?: boolean;
3273
+ /** Error state */
3274
+ error?: Error | null;
3275
+ /** Entity name for schema-driven auto-fetch */
3276
+ entity?: string;
2989
3277
  }
2990
3278
  /**
2991
3279
  * Section - Semantic content grouping with header
@@ -3048,6 +3336,12 @@ interface SidebarProps {
3048
3336
  onLogoClick?: () => void;
3049
3337
  /** Additional CSS classes */
3050
3338
  className?: string;
3339
+ /** Loading state indicator */
3340
+ isLoading?: boolean;
3341
+ /** Error state */
3342
+ error?: Error | null;
3343
+ /** Entity name for schema-driven auto-fetch */
3344
+ entity?: string;
3051
3345
  }
3052
3346
  declare const Sidebar: React__default.FC<SidebarProps>;
3053
3347
 
@@ -3081,13 +3375,19 @@ interface SplitProps {
3081
3375
  rightClassName?: string;
3082
3376
  /** Exactly two children: [left, right] */
3083
3377
  children: [React__default.ReactNode, React__default.ReactNode];
3378
+ /** Loading state indicator */
3379
+ isLoading?: boolean;
3380
+ /** Error state */
3381
+ error?: Error | null;
3382
+ /** Entity name for schema-driven auto-fetch */
3383
+ entity?: string;
3084
3384
  }
3085
3385
  /**
3086
3386
  * Split - Two-column layout with flexible ratios
3087
3387
  */
3088
3388
  declare const Split: React__default.FC<SplitProps>;
3089
3389
 
3090
- type SortDirection = "asc" | "desc" | null;
3390
+ type SortDirection = "asc" | "desc";
3091
3391
  interface TableColumn<T = any> {
3092
3392
  /**
3093
3393
  * Column key
@@ -3111,49 +3411,29 @@ interface TableColumn<T = any> {
3111
3411
  */
3112
3412
  width?: string;
3113
3413
  }
3114
- interface TableProps<T = any> {
3414
+ interface TableProps<T = Record<string, unknown>> extends EntityDisplayProps<T> {
3115
3415
  /**
3116
3416
  * Table columns
3117
3417
  */
3118
3418
  columns: TableColumn<T>[];
3119
- /**
3120
- * Table entity data
3121
- */
3122
- entity: T[];
3123
- /**
3124
- * Row key getter
3125
- */
3126
- getRowKey: (row: T, index: number) => string;
3127
3419
  /**
3128
3420
  * Enable row selection
3129
3421
  * @default false
3130
3422
  */
3131
3423
  selectable?: boolean;
3132
- /**
3133
- * Selected row keys
3134
- */
3135
- selectedRows?: string[];
3136
- /**
3137
- * Callback when selection changes
3138
- */
3139
- onSelectionChange?: (selectedKeys: string[]) => void;
3140
3424
  /**
3141
3425
  * Enable sorting
3142
3426
  * @default false
3143
3427
  */
3144
3428
  sortable?: boolean;
3145
3429
  /**
3146
- * Current sort column
3430
+ * Current sort column (display hint, mapped from sortBy)
3147
3431
  */
3148
3432
  sortColumn?: string;
3149
3433
  /**
3150
- * Current sort direction
3434
+ * Current sort direction (display hint)
3151
3435
  */
3152
3436
  sortDirection?: SortDirection;
3153
- /**
3154
- * Callback when sort changes
3155
- */
3156
- onSortChange?: (column: string, direction: SortDirection) => void;
3157
3437
  /**
3158
3438
  * Enable search/filter
3159
3439
  * @default false
@@ -3169,17 +3449,13 @@ interface TableProps<T = any> {
3169
3449
  */
3170
3450
  paginated?: boolean;
3171
3451
  /**
3172
- * Current page
3452
+ * Current page (display hint)
3173
3453
  */
3174
3454
  currentPage?: number;
3175
3455
  /**
3176
- * Total pages
3456
+ * Total pages (display hint)
3177
3457
  */
3178
3458
  totalPages?: number;
3179
- /**
3180
- * Callback when page changes
3181
- */
3182
- onPageChange?: (page: number) => void;
3183
3459
  /**
3184
3460
  * Row actions menu items
3185
3461
  */
@@ -3193,13 +3469,9 @@ interface TableProps<T = any> {
3193
3469
  * @default false
3194
3470
  */
3195
3471
  loading?: boolean;
3196
- /**
3197
- * Additional CSS classes
3198
- */
3199
- className?: string;
3200
3472
  }
3201
3473
  declare const Table: {
3202
- <T extends Record<string, any>>({ columns, entity, getRowKey, selectable, selectedRows, onSelectionChange, sortable, sortColumn, sortDirection, onSortChange, searchable, searchPlaceholder, paginated, currentPage, totalPages, onPageChange, rowActions, emptyMessage, loading, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
3474
+ <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;
3203
3475
  displayName: string;
3204
3476
  };
3205
3477
 
@@ -3215,11 +3487,11 @@ declare const Table: {
3215
3487
  * - Delightful hover micro-interactions
3216
3488
  * - Elegant status indicators
3217
3489
  *
3218
- * Orbital Component Interface Compliance:
3219
- * - Entity binding with auto-fetch when entity is a string
3220
- * - Event emission via useEventBus (UI:* events)
3221
- * - Event listening for UI:SEARCH and UI:CLEAR_SEARCH
3222
- * - isLoading and error state props
3490
+ * Closed Circuit Compliance (Dumb Organism):
3491
+ * - Receives ALL data via props (no internal fetch)
3492
+ * - Emits events via useEventBus (UI:SELECT, UI:DESELECT, UI:VIEW)
3493
+ * - Never listens to events only emits
3494
+ * - No internal search/filter state — trait provides filtered data
3223
3495
  */
3224
3496
 
3225
3497
  interface ListItem {
@@ -3259,55 +3531,33 @@ type FieldDef$1 = string | {
3259
3531
  key: string;
3260
3532
  header?: string;
3261
3533
  };
3262
- interface ListProps {
3263
- /** Entity name for auto-fetch OR data array (backwards compatible) */
3264
- entity?: ListItem[] | readonly {
3265
- id: string;
3266
- }[] | readonly unknown[] | string;
3267
- /** Data array - primary prop for data */
3268
- data?: ListItem[] | readonly {
3269
- id: string;
3270
- }[] | readonly unknown[] | unknown;
3534
+ interface ListProps extends EntityDisplayProps {
3271
3535
  /** Entity type name for display */
3272
3536
  entityType?: string;
3273
- /** Loading state */
3274
- isLoading?: boolean;
3275
- /** Error state */
3276
- error?: Error | null;
3277
3537
  selectable?: boolean;
3278
- selectedItems?: readonly string[];
3279
- onSelectionChange?: (selectedIds: string[]) => void;
3280
3538
  /** Item actions - schema-driven or function-based */
3281
3539
  itemActions?: ((item: ListItem) => MenuItem[]) | readonly SchemaItemAction[];
3282
3540
  showDividers?: boolean;
3283
3541
  variant?: "default" | "card";
3284
3542
  emptyMessage?: string;
3285
- className?: string;
3286
3543
  renderItem?: (item: ListItem, index: number) => React__default.ReactNode;
3287
3544
  children?: React__default.ReactNode;
3288
- onItemAction?: (action: string, item: ListItem, index: number) => void;
3289
- onRowClick?: (item: ListItem) => void;
3290
3545
  /** Fields to display - accepts string[] or {key, header}[] for unified interface */
3291
3546
  fields?: readonly FieldDef$1[];
3292
3547
  /** Alias for fields - backwards compatibility */
3293
3548
  fieldNames?: readonly string[];
3294
- /**
3295
- * Query singleton binding for filter/sort state.
3296
- * When provided, syncs with the query singleton for filtering and sorting.
3297
- * Example: "@TaskQuery"
3298
- */
3299
- query?: string;
3300
3549
  }
3301
3550
  declare const List: React__default.FC<ListProps>;
3302
3551
 
3303
3552
  /**
3304
3553
  * CardGrid Component
3305
3554
  *
3306
- * A responsive grid specifically designed for card layouts.
3555
+ * A dumb, responsive grid specifically designed for card layouts.
3307
3556
  * Uses CSS Grid auto-fit for automatic responsive columns.
3308
3557
  *
3309
- * When `entity` prop is provided without `data`, automatically fetches data
3310
- * using the useEntityList hook. Supports server-side pagination and search.
3558
+ * Data comes exclusively from the `data` prop (provided by the trait via render-ui).
3559
+ * All user interactions emit events via useEventBus never manages internal state
3560
+ * for pagination, filtering, or search. All state is owned by the trait state machine.
3311
3561
  */
3312
3562
 
3313
3563
  type CardGridGap = 'none' | 'sm' | 'md' | 'lg' | 'xl';
@@ -3337,7 +3587,7 @@ type FieldDef = string | {
3337
3587
  key: string;
3338
3588
  header?: string;
3339
3589
  };
3340
- interface CardGridProps {
3590
+ interface CardGridProps extends EntityDisplayProps {
3341
3591
  /** Minimum width of each card (default: 280px) */
3342
3592
  minCardWidth?: number;
3343
3593
  /** Maximum number of columns */
@@ -3346,45 +3596,18 @@ interface CardGridProps {
3346
3596
  gap?: CardGridGap;
3347
3597
  /** Align cards vertically in their cells */
3348
3598
  alignItems?: 'start' | 'center' | 'end' | 'stretch';
3349
- /** Custom class name */
3350
- className?: string;
3351
3599
  /** Children elements (cards) - optional when using entity/data props */
3352
3600
  children?: React__default.ReactNode;
3353
- /** Entity type for data-bound usage */
3354
- entity?: string;
3355
3601
  /** Fields to display - accepts string[] or {key, header}[] for unified interface */
3356
3602
  fields?: readonly FieldDef[];
3357
3603
  /** Alias for fields - backwards compatibility */
3358
3604
  fieldNames?: readonly string[];
3359
3605
  /** Alias for fields - backwards compatibility */
3360
3606
  columns?: readonly FieldDef[];
3361
- /** Data array for data-bound usage - accepts readonly for generated const arrays */
3362
- data?: readonly unknown[] | unknown;
3363
- /** Loading state indicator */
3364
- isLoading?: boolean;
3365
- /** Error state */
3366
- error?: Error | null;
3367
3607
  /** Actions for each card item (schema-driven) */
3368
3608
  itemActions?: readonly CardItemAction[];
3369
- /** Callback when a card is clicked */
3370
- onCardClick?: (item: unknown) => void;
3371
- /** Enable server-side pagination */
3372
- enablePagination?: boolean;
3373
- /** Items per page (default: 20) */
3374
- pageSize?: number;
3375
3609
  /** Show total count in pagination */
3376
3610
  showTotal?: boolean;
3377
- /** Filter configuration for entity data */
3378
- filter?: {
3379
- field: string;
3380
- value?: string;
3381
- };
3382
- /**
3383
- * Query singleton binding for filter/sort state.
3384
- * When provided, syncs with the query singleton for filtering and sorting.
3385
- * Example: "@TaskQuery"
3386
- */
3387
- query?: string;
3388
3611
  }
3389
3612
  /**
3390
3613
  * CardGrid - Responsive card collection layout
@@ -3393,7 +3616,8 @@ interface CardGridProps {
3393
3616
  * 1. With children: <CardGrid><Card>...</Card></CardGrid>
3394
3617
  * 2. With data: <CardGrid entity="Task" fieldNames={['title']} data={tasks} />
3395
3618
  *
3396
- * Supports server-side pagination when enablePagination is true.
3619
+ * All data comes from the `data` prop. Pagination display hints come from
3620
+ * `page`, `pageSize`, and `totalCount` props (set by the trait via render-ui).
3397
3621
  */
3398
3622
  declare const CardGrid: React__default.FC<CardGridProps>;
3399
3623
 
@@ -3429,17 +3653,13 @@ interface MasterDetailProps<T extends {
3429
3653
  isLoading?: boolean;
3430
3654
  /** Error state */
3431
3655
  error?: Error | null;
3432
- /** Row click handler */
3433
- onRowClick?: (row: T) => void;
3434
- /** Selection change handler */
3435
- onSelectionChange?: (ids: (string | number)[]) => void;
3436
3656
  /** Additional class name */
3437
3657
  className?: string;
3438
3658
  }
3439
3659
  declare function MasterDetail<T extends {
3440
3660
  id: string | number;
3441
3661
  }>({ entity, masterFields, detailFields: _detailFields, // Captured but not used here - detail handled separately
3442
- data: externalData, loading: externalLoading, isLoading: externalIsLoading, error: externalError, onRowClick, onSelectionChange, className, ...rest }: MasterDetailProps<T>): React__default.ReactElement;
3662
+ data: externalData, loading: externalLoading, isLoading: externalIsLoading, error: externalError, className, ...rest }: MasterDetailProps<T>): React__default.ReactElement;
3443
3663
  declare namespace MasterDetail {
3444
3664
  var displayName: string;
3445
3665
  }
@@ -3481,6 +3701,10 @@ interface ConfirmDialogProps {
3481
3701
  size?: ModalSize;
3482
3702
  /** Loading state for confirm button */
3483
3703
  isLoading?: boolean;
3704
+ /** Error state */
3705
+ error?: Error | null;
3706
+ /** Entity name for schema-driven auto-fetch */
3707
+ entity?: string;
3484
3708
  /** Additional CSS classes */
3485
3709
  className?: string;
3486
3710
  }
@@ -3637,7 +3861,11 @@ interface WizardContainerProps {
3637
3861
  compact?: boolean;
3638
3862
  /** Additional CSS classes */
3639
3863
  className?: string;
3640
- /** Entity type name (schema-driven) */
3864
+ /** Loading state indicator */
3865
+ isLoading?: boolean;
3866
+ /** Error state */
3867
+ error?: Error | null;
3868
+ /** Entity type name (schema-driven) */
3641
3869
  entity?: string;
3642
3870
  }
3643
3871
  /**
@@ -3684,9 +3912,304 @@ interface OrbitalVisualizationProps {
3684
3912
  onClick?: () => void;
3685
3913
  /** Additional CSS classes */
3686
3914
  className?: string;
3915
+ /** Loading state indicator */
3916
+ isLoading?: boolean;
3917
+ /** Error state */
3918
+ error?: Error | null;
3919
+ /** Entity name for schema-driven auto-fetch */
3920
+ entity?: string;
3687
3921
  }
3688
3922
  declare const OrbitalVisualization: React__default.FC<OrbitalVisualizationProps>;
3689
3923
 
3924
+ /**
3925
+ * StateMachineView - Reusable State Machine Visualizer
3926
+ *
3927
+ * A hybrid DOM/SVG component for visualizing state machines.
3928
+ * Uses SVG for arrow paths, DOM for tooltips.
3929
+ *
3930
+ * Moved from projects/builder to @almadar/ui for reuse across projects.
3931
+ *
3932
+ * BUNDLING: When multiple transitions exist between the same states (same direction),
3933
+ * they are bundled into a single arrow with a badge showing the count.
3934
+ * Hovering shows all events and their effects in a detailed tooltip.
3935
+ *
3936
+ * Events Emitted:
3937
+ * - UI:STATE_CLICK - When a state node is clicked
3938
+ * - UI:TRANSITION_CLICK - When a transition bundle is clicked
3939
+ */
3940
+
3941
+ /** Bundled transitions between same from→to states */
3942
+ interface TransitionBundle {
3943
+ id: string;
3944
+ from: string;
3945
+ to: string;
3946
+ labels: DomTransitionLabel[];
3947
+ isBidirectional: boolean;
3948
+ isReverse: boolean;
3949
+ }
3950
+ interface StateMachineViewProps extends EntityDisplayProps {
3951
+ layoutData: DomLayoutData;
3952
+ /** Custom state node renderer — when provided, replaces the default circle nodes */
3953
+ renderStateNode?: (state: DomStateNode, config: VisualizerConfig) => React__default.ReactNode;
3954
+ }
3955
+ declare const StateMachineView: React__default.FC<StateMachineViewProps>;
3956
+
3957
+ /**
3958
+ * JazariStateMachine — Al-Jazari themed state machine diagram.
3959
+ *
3960
+ * Thin wrapper around StateMachineView that:
3961
+ * 1. Extracts a state machine from an orbital schema (or accepts a trait directly)
3962
+ * 2. Converts it to DomLayoutData via the visualizer lib
3963
+ * 3. Applies Al-Jazari brass/gold/lapis color theme
3964
+ * 4. Renders gear-shaped state nodes via the renderStateNode prop
3965
+ */
3966
+
3967
+ interface SmState {
3968
+ name: string;
3969
+ isInitial?: boolean;
3970
+ isTerminal?: boolean;
3971
+ isFinal?: boolean;
3972
+ }
3973
+ interface SmTransition {
3974
+ from: string;
3975
+ to: string;
3976
+ event: string;
3977
+ guard?: unknown;
3978
+ effects?: unknown[];
3979
+ }
3980
+ interface SmStateMachine {
3981
+ states: SmState[];
3982
+ transitions: SmTransition[];
3983
+ }
3984
+ interface SmTrait {
3985
+ name: string;
3986
+ stateMachine?: SmStateMachine;
3987
+ linkedEntity?: string;
3988
+ }
3989
+ interface SmEntity {
3990
+ name: string;
3991
+ fields?: Array<{
3992
+ name: string;
3993
+ }>;
3994
+ }
3995
+ interface SmOrbital {
3996
+ entity?: SmEntity;
3997
+ traits?: SmTrait[];
3998
+ }
3999
+ interface SmSchema {
4000
+ orbitals?: SmOrbital[];
4001
+ }
4002
+ interface JazariStateMachineProps extends EntityDisplayProps {
4003
+ /** Full schema — extracts first trait's state machine */
4004
+ schema?: SmSchema;
4005
+ /** Or pass a single trait directly */
4006
+ trait?: SmTrait;
4007
+ /** Which trait to visualize (default: 0) */
4008
+ traitIndex?: number;
4009
+ /** Override entity field labels */
4010
+ entityFields?: string[];
4011
+ /** Text direction (default: 'ltr') */
4012
+ direction?: 'ltr' | 'rtl';
4013
+ }
4014
+ declare const JazariStateMachine: React__default.FC<JazariStateMachineProps>;
4015
+
4016
+ /**
4017
+ * ContentRenderer Organism
4018
+ *
4019
+ * Renders rich content as a sequence of typed segments: markdown, code,
4020
+ * orbital diagrams (via JazariStateMachine), and quiz blocks. Accepts
4021
+ * either raw content string (auto-parsed) or pre-parsed segments.
4022
+ *
4023
+ * Event Contract:
4024
+ * - Delegates to child components (CodeBlock -> UI:COPY_CODE)
4025
+ * - entityAware: false
4026
+ */
4027
+
4028
+ interface ContentRendererProps extends EntityDisplayProps {
4029
+ /** Raw content string — auto-parsed into segments */
4030
+ content?: string;
4031
+ /** Pre-parsed segments (overrides content) */
4032
+ segments?: ContentSegment[];
4033
+ /** Text direction for markdown */
4034
+ direction?: 'rtl' | 'ltr';
4035
+ }
4036
+ declare const ContentRenderer: React__default.FC<ContentRendererProps>;
4037
+
4038
+ /**
4039
+ * BookViewer shared types
4040
+ *
4041
+ * Field names are canonical English. When entity data arrives from a
4042
+ * schema with non-English field names (e.g. Arabic .orb), a field map
4043
+ * translates them before passing to BookViewer. See `mapBookData()`.
4044
+ */
4045
+ interface BookData {
4046
+ title: string;
4047
+ subtitle?: string;
4048
+ author?: string;
4049
+ coverImageUrl?: string;
4050
+ direction?: 'rtl' | 'ltr';
4051
+ parts: BookPart[];
4052
+ }
4053
+ interface BookPart {
4054
+ title: string;
4055
+ chapters: BookChapter[];
4056
+ }
4057
+ interface BookChapter {
4058
+ id: string;
4059
+ title: string;
4060
+ content: string;
4061
+ orbitalSchema?: unknown;
4062
+ }
4063
+ /**
4064
+ * Maps raw entity field names to canonical BookData field names.
4065
+ * Each key is a canonical field, each value is the entity field name.
4066
+ *
4067
+ * @example
4068
+ * ```ts
4069
+ * // Arabic schema
4070
+ * const AR_BOOK_FIELDS: BookFieldMap = {
4071
+ * title: 'العنوان',
4072
+ * subtitle: 'العنوان_الفرعي',
4073
+ * author: 'المؤلف',
4074
+ * coverImageUrl: 'صورة_الغلاف',
4075
+ * direction: 'الاتجاه',
4076
+ * parts: 'الأجزاء',
4077
+ * partTitle: 'العنوان',
4078
+ * chapters: 'الفصول',
4079
+ * chapterId: 'المعرف',
4080
+ * chapterTitle: 'العنوان',
4081
+ * chapterContent: 'المحتوى',
4082
+ * chapterOrbitalSchema: 'المخطط_المداري',
4083
+ * };
4084
+ * ```
4085
+ */
4086
+ interface BookFieldMap {
4087
+ title: string;
4088
+ subtitle: string;
4089
+ author: string;
4090
+ coverImageUrl: string;
4091
+ direction: string;
4092
+ parts: string;
4093
+ partTitle: string;
4094
+ chapters: string;
4095
+ chapterId: string;
4096
+ chapterTitle: string;
4097
+ chapterContent: string;
4098
+ chapterOrbitalSchema: string;
4099
+ }
4100
+ /** Identity map — entity already uses canonical English field names */
4101
+ declare const IDENTITY_BOOK_FIELDS: BookFieldMap;
4102
+ /** Arabic field map for الأمة_الرقمية schema */
4103
+ declare const AR_BOOK_FIELDS: BookFieldMap;
4104
+ /**
4105
+ * Resolves a fieldMap prop to a BookFieldMap object.
4106
+ * Accepts a BookFieldMap object directly, a locale string key ("ar"),
4107
+ * or undefined (defaults to identity/English).
4108
+ */
4109
+ declare function resolveFieldMap(fieldMap: BookFieldMap | string | undefined): BookFieldMap;
4110
+ /**
4111
+ * Maps a raw entity record to a typed BookData using a field map.
4112
+ * Pass `IDENTITY_BOOK_FIELDS` for English schemas, `AR_BOOK_FIELDS` for Arabic, etc.
4113
+ */
4114
+ declare function mapBookData(raw: Record<string, unknown>, fields?: BookFieldMap): BookData;
4115
+
4116
+ /**
4117
+ * BookViewer Organism
4118
+ *
4119
+ * Flippable book reader with cover, TOC, chapter views, and navigation.
4120
+ * Supports RTL layout (Arabic), CSS slide transitions, and print mode.
4121
+ *
4122
+ * Page model:
4123
+ * 0 = cover, 1 = TOC, 2+ = chapters (flattened from parts)
4124
+ *
4125
+ * Field mapping:
4126
+ * Entity data may use non-English field names (e.g. Arabic .orb schemas).
4127
+ * Pass a `fieldMap` prop to translate entity fields to canonical BookData.
4128
+ * Default: IDENTITY_BOOK_FIELDS (English field names, no translation).
4129
+ *
4130
+ * Event Contract:
4131
+ * - Emits: UI:BOOK_PAGE_CHANGE { pageIndex, chapterId? }
4132
+ * - Listens: UI:BOOK_START, UI:BOOK_NAVIGATE, UI:BOOK_PAGE_PREV/NEXT, UI:BOOK_PRINT, UI:BOOK_SHOW_TOC
4133
+ */
4134
+
4135
+ interface BookViewerProps extends EntityDisplayProps {
4136
+ /** Initial page index (default: 0 = cover) */
4137
+ initialPage?: number;
4138
+ /** Field name translation map — a BookFieldMap object or locale key ("ar") */
4139
+ fieldMap?: BookFieldMap | string;
4140
+ }
4141
+ declare const BookViewer: React__default.FC<BookViewerProps>;
4142
+
4143
+ /**
4144
+ * BookChapterView Organism
4145
+ *
4146
+ * Renders a single chapter: title + optional orbital diagram +
4147
+ * rich content via ContentRenderer.
4148
+ *
4149
+ * Event Contract:
4150
+ * - Delegates to ContentRenderer children
4151
+ */
4152
+
4153
+ interface BookChapterViewProps extends EntityDisplayProps {
4154
+ chapter: BookChapter;
4155
+ direction?: 'rtl' | 'ltr';
4156
+ }
4157
+ declare const BookChapterView: React__default.FC<BookChapterViewProps>;
4158
+
4159
+ /**
4160
+ * BookCoverPage Molecule
4161
+ *
4162
+ * Renders a book cover with title, subtitle, author, and optional image.
4163
+ * Centered layout suitable for the first "page" of a BookViewer.
4164
+ *
4165
+ * Event Contract:
4166
+ * - Emits: UI:BOOK_START
4167
+ */
4168
+
4169
+ interface BookCoverPageProps extends EntityDisplayProps {
4170
+ title: string;
4171
+ subtitle?: string;
4172
+ author?: string;
4173
+ coverImageUrl?: string;
4174
+ direction?: 'rtl' | 'ltr';
4175
+ }
4176
+ declare const BookCoverPage: React__default.FC<BookCoverPageProps>;
4177
+
4178
+ /**
4179
+ * BookTableOfContents Molecule
4180
+ *
4181
+ * Renders a clickable table of contents grouped by parts.
4182
+ * Highlights the current chapter.
4183
+ *
4184
+ * Event Contract:
4185
+ * - Emits: UI:BOOK_NAVIGATE { chapterId }
4186
+ */
4187
+
4188
+ interface BookTableOfContentsProps extends EntityDisplayProps {
4189
+ parts: BookPart[];
4190
+ currentChapterId?: string;
4191
+ direction?: 'rtl' | 'ltr';
4192
+ }
4193
+ declare const BookTableOfContents: React__default.FC<BookTableOfContentsProps>;
4194
+
4195
+ /**
4196
+ * BookNavBar Molecule
4197
+ *
4198
+ * Navigation bar for the BookViewer with prev/next, page indicator,
4199
+ * print button, and TOC toggle.
4200
+ *
4201
+ * Event Contract:
4202
+ * - Emits: UI:BOOK_PAGE_PREV, UI:BOOK_PAGE_NEXT, UI:BOOK_PRINT, UI:BOOK_SHOW_TOC
4203
+ */
4204
+
4205
+ interface BookNavBarProps extends EntityDisplayProps {
4206
+ currentPage: number;
4207
+ totalPages: number;
4208
+ chapterTitle?: string;
4209
+ direction?: 'rtl' | 'ltr';
4210
+ }
4211
+ declare const BookNavBar: React__default.FC<BookNavBarProps>;
4212
+
3690
4213
  /**
3691
4214
  * SplitPane Component
3692
4215
  *
@@ -3797,116 +4320,6 @@ interface TabbedContainerProps {
3797
4320
  */
3798
4321
  declare const TabbedContainer: React__default.FC<TabbedContainerProps>;
3799
4322
 
3800
- /**
3801
- * Isometric Game Types
3802
- *
3803
- * Type definitions for isometric grid rendering: tiles, units, features.
3804
- * Used by IsometricCanvas and game hooks.
3805
- *
3806
- * @packageDocumentation
3807
- */
3808
- /** A single isometric tile on the grid */
3809
- interface IsometricTile {
3810
- /** Optional unique identifier (required for 3D rendering) */
3811
- id?: string;
3812
- /** Grid x coordinate */
3813
- x: number;
3814
- /** Grid y coordinate (2D) */
3815
- y: number;
3816
- /** Grid z coordinate (3D alternative to y) */
3817
- z?: number;
3818
- /** Terrain type key (e.g., 'grass', 'stone', 'water') - 2D */
3819
- terrain?: string;
3820
- /** Tile type for visual rendering (3D) */
3821
- type?: string;
3822
- /** Direct sprite URL override (bypasses getTerrainSprite resolver) */
3823
- terrainSprite?: string;
3824
- /** Whether units can traverse this tile (default true) */
3825
- passable?: boolean;
3826
- /** Movement cost for pathfinding (default 1) */
3827
- movementCost?: number;
3828
- /** Optional tile type for visual variants */
3829
- tileType?: string;
3830
- /** Elevation offset for 3D rendering */
3831
- elevation?: number;
3832
- }
3833
- /** A unit positioned on the isometric grid */
3834
- interface IsometricUnit {
3835
- /** Unique unit identifier */
3836
- id: string;
3837
- /** Current grid position (2D format) */
3838
- position?: {
3839
- x: number;
3840
- y: number;
3841
- };
3842
- /** Grid x coordinate (3D format) */
3843
- x?: number;
3844
- /** Grid y coordinate (3D format) */
3845
- y?: number;
3846
- /** Grid z coordinate (3D format) */
3847
- z?: number;
3848
- /** Static sprite URL (used when no sprite sheet animation) */
3849
- sprite?: string;
3850
- /** Unit archetype key for sprite resolution */
3851
- unitType?: string;
3852
- /** Hero identifier for sprite sheet lookup */
3853
- heroId?: string;
3854
- /** Display name rendered below the unit */
3855
- name?: string;
3856
- /** Team affiliation for coloring */
3857
- team?: 'player' | 'enemy' | 'neutral';
3858
- /** Faction for 3D rendering (player/enemy/neutral) */
3859
- faction?: 'player' | 'enemy' | 'neutral';
3860
- /** Current health */
3861
- health?: number;
3862
- /** Maximum health */
3863
- maxHealth?: number;
3864
- /** Trait attachments for state display */
3865
- traits?: {
3866
- name: string;
3867
- currentState: string;
3868
- states: string[];
3869
- cooldown: number;
3870
- }[];
3871
- /** Previous position for movement trail ghost */
3872
- previousPosition?: {
3873
- x: number;
3874
- y: number;
3875
- };
3876
- /** Elevation offset for 3D rendering */
3877
- elevation?: number;
3878
- }
3879
- /** A map feature (resource, building, portal, etc.) */
3880
- interface IsometricFeature {
3881
- /** Optional unique identifier (required for 3D rendering) */
3882
- id?: string;
3883
- /** Grid x coordinate */
3884
- x: number;
3885
- /** Grid y coordinate (2D) */
3886
- y: number;
3887
- /** Grid z coordinate (3D alternative to y) */
3888
- z?: number;
3889
- /** Feature type key (e.g., 'goldMine', 'castle', 'portal') */
3890
- type: string;
3891
- /** Direct sprite URL override (bypasses getFeatureSprite resolver) */
3892
- sprite?: string;
3893
- /** 3D model URL (GLB format) for GameCanvas3D */
3894
- assetUrl?: string;
3895
- /** Color override for 3D rendering */
3896
- color?: string;
3897
- /** Elevation offset for 3D rendering */
3898
- elevation?: number;
3899
- }
3900
- /** Camera state for pan/zoom */
3901
- interface CameraState {
3902
- /** Camera X offset in pixels */
3903
- x: number;
3904
- /** Camera Y offset in pixels */
3905
- y: number;
3906
- /** Zoom level (1.0 = 100%) */
3907
- zoom: number;
3908
- }
3909
-
3910
4323
  /**
3911
4324
  * Sprite Sheet Animation Types
3912
4325
  *
@@ -3981,25 +4394,6 @@ interface SpriteSheetUrls {
3981
4394
  sw: string;
3982
4395
  }
3983
4396
 
3984
- /**
3985
- * IsometricCanvas
3986
- *
3987
- * Core isometric game renderer. Maps to the `game-canvas` pattern.
3988
- * Adapted from projects/trait-wars/design-system/organisms/IsometricGameCanvas.tsx
3989
- * with full closed-circuit pattern compliance (className, isLoading, error, entity).
3990
- *
3991
- * Architecture:
3992
- * - 2:1 diamond isometric projection
3993
- * - Painter's algorithm (tile → feature → unit depth sort)
3994
- * - Camera pan/zoom with lerp
3995
- * - Off-screen culling
3996
- * - Minimap on separate canvas
3997
- * - Sprite sheet animation via resolveUnitFrame
3998
- * - Event bus–friendly handlers (onTileClick, onUnitClick, etc.)
3999
- *
4000
- * @packageDocumentation
4001
- */
4002
-
4003
4397
  interface IsometricCanvasProps {
4004
4398
  /** Additional CSS classes */
4005
4399
  className?: string;
@@ -4138,23 +4532,6 @@ interface EffectAssetManifest {
4138
4532
  };
4139
4533
  }
4140
4534
 
4141
- /**
4142
- * CanvasEffect Component
4143
- *
4144
- * Renders animated visual effects using a `<canvas>` element with
4145
- * sprite-based particles, frame-sequence animations, and overlays.
4146
- * This is a render-ui pattern that can be placed in any slot —
4147
- * it renders on top of whatever occupies that slot.
4148
- *
4149
- * Pattern: canvas-effect
4150
- *
4151
- * When an EffectAssetManifest is provided (via assetManifest prop),
4152
- * the component uses the full particle engine with tinted sprites.
4153
- * Without a manifest, it falls back to emoji-based rendering.
4154
- *
4155
- * @packageDocumentation
4156
- */
4157
-
4158
4535
  interface CanvasEffectProps {
4159
4536
  /** The type of combat action to visualise */
4160
4537
  actionType: CombatActionType;
@@ -4194,15 +4571,117 @@ declare namespace CanvasEffect {
4194
4571
  var displayName: string;
4195
4572
  }
4196
4573
 
4574
+ interface SoundEntry {
4575
+ /** Single path or array of paths — array picks randomly on each play */
4576
+ path: string | string[];
4577
+ /** Volume 0–1 (multiplied by masterVolume; default 1) */
4578
+ volume?: number;
4579
+ /** Whether this sound loops (background music) */
4580
+ loop?: boolean;
4581
+ /** Number of concurrent Audio instances in the pool (default 1) */
4582
+ poolSize?: number;
4583
+ /** Start automatically on first user interaction */
4584
+ autostart?: boolean;
4585
+ /** Use crossfade transitions when played via playMusic() */
4586
+ crossfade?: boolean;
4587
+ /** Crossfade duration in ms (default 1500) */
4588
+ crossfadeDurationMs?: number;
4589
+ }
4590
+ type AudioManifest = Record<string, SoundEntry>;
4591
+ interface GameAudioControls {
4592
+ /** Play a sound effect (instant, pooled) */
4593
+ play: (key: string) => void;
4594
+ /** Stop all instances of a sound effect */
4595
+ stop: (key: string) => void;
4596
+ /** Stop all sounds including music */
4597
+ stopAll: () => void;
4598
+ /** Crossfade to a new music track */
4599
+ playMusic: (key: string) => void;
4600
+ /** Fade out and stop the current music */
4601
+ stopMusic: (fadeDurationMs?: number) => void;
4602
+ muted: boolean;
4603
+ setMuted: (muted: boolean) => void;
4604
+ masterVolume: number;
4605
+ setMasterVolume: (volume: number) => void;
4606
+ }
4607
+ interface UseGameAudioOptions {
4608
+ /** Sound definitions keyed by logical name */
4609
+ manifest: AudioManifest;
4610
+ /** Prefix prepended to all `path` values (default '') */
4611
+ baseUrl?: string;
4612
+ /** Start muted (default false) */
4613
+ initialMuted?: boolean;
4614
+ /** Master volume 0–1 (default 1) */
4615
+ initialVolume?: number;
4616
+ }
4617
+ declare function useGameAudio({ manifest, baseUrl, initialMuted, initialVolume, }: UseGameAudioOptions): GameAudioControls;
4618
+ declare namespace useGameAudio {
4619
+ var displayName: string;
4620
+ }
4621
+
4197
4622
  /**
4198
- * useImageCache Hook
4623
+ * GameAudioProvider
4199
4624
  *
4200
- * Preloads and caches images by URL for canvas rendering.
4201
- * Returns a getter function that returns loaded HTMLImageElement instances.
4202
- * Tracks loading progress to support isLoading state.
4625
+ * Context provider that wires the audio system to the Almadar event bus.
4626
+ * Wrap your game organism with this provider, then emit:
4627
+ *
4628
+ * emit('UI:PLAY_SOUND', { key: 'footstep' })
4629
+ *
4630
+ * from anywhere inside the tree and the corresponding sound will play.
4631
+ *
4632
+ * The provider also exposes `muted`/`setMuted` and `masterVolume`/
4633
+ * `setMasterVolume` via the `GameAudioContext` for toggle buttons.
4634
+ *
4635
+ * Closed-circuit props (`className`, `isLoading`, `error`, `entity`) are
4636
+ * accepted but intentionally unused — the provider renders only its children.
4203
4637
  *
4204
4638
  * @packageDocumentation
4205
4639
  */
4640
+
4641
+ type GameAudioContextValue = Pick<GameAudioControls, 'muted' | 'setMuted' | 'masterVolume' | 'setMasterVolume' | 'play' | 'playMusic' | 'stopMusic'>;
4642
+ declare const GameAudioContext: React__default.Context<GameAudioContextValue | null>;
4643
+ /**
4644
+ * Access the game audio context.
4645
+ * Must be called from within a `<GameAudioProvider>` tree.
4646
+ */
4647
+ declare function useGameAudioContext(): GameAudioContextValue;
4648
+ interface GameAudioProviderProps {
4649
+ /** Sound manifest — keys mapped to SoundEntry definitions */
4650
+ manifest: AudioManifest;
4651
+ /** Base URL prepended to all sound paths (default '') */
4652
+ baseUrl?: string;
4653
+ /** Children to render */
4654
+ children: React__default.ReactNode;
4655
+ /** Initial muted state */
4656
+ initialMuted?: boolean;
4657
+ /** Closed-circuit props (unused, accepted for runtime compatibility) */
4658
+ className?: string;
4659
+ isLoading?: boolean;
4660
+ error?: Error | null;
4661
+ entity?: string;
4662
+ }
4663
+ declare function GameAudioProvider({ manifest, baseUrl, children, initialMuted, }: GameAudioProviderProps): JSX.Element;
4664
+ declare namespace GameAudioProvider {
4665
+ var displayName: string;
4666
+ }
4667
+
4668
+ interface GameAudioToggleProps {
4669
+ /** Button size */
4670
+ size?: 'sm' | 'md' | 'lg';
4671
+ /** Additional CSS classes */
4672
+ className?: string;
4673
+ /** Loading state (passed through) */
4674
+ isLoading?: boolean;
4675
+ /** Error state (passed through) */
4676
+ error?: Error | null;
4677
+ /** Entity name for schema-driven auto-fetch */
4678
+ entity?: string;
4679
+ }
4680
+ declare function GameAudioToggle({ size, className, }: GameAudioToggleProps): JSX.Element;
4681
+ declare namespace GameAudioToggle {
4682
+ var displayName: string;
4683
+ }
4684
+
4206
4685
  interface ImageCacheResult {
4207
4686
  /** Get a cached image by URL. Returns undefined if not yet loaded. */
4208
4687
  getImage: (url: string) => HTMLImageElement | undefined;
@@ -4219,15 +4698,6 @@ interface ImageCacheResult {
4219
4698
  */
4220
4699
  declare function useImageCache(urls: string[]): ImageCacheResult;
4221
4700
 
4222
- /**
4223
- * useCamera Hook
4224
- *
4225
- * Manages camera pan/zoom state for canvas rendering.
4226
- * Provides mouse event handlers and coordinate conversion.
4227
- *
4228
- * @packageDocumentation
4229
- */
4230
-
4231
4701
  interface CameraResult {
4232
4702
  /** Mutable camera state ref (x, y, zoom) */
4233
4703
  cameraRef: React.MutableRefObject<CameraState>;
@@ -4268,19 +4738,6 @@ interface CameraResult {
4268
4738
  */
4269
4739
  declare function useCamera(): CameraResult;
4270
4740
 
4271
- /**
4272
- * useSpriteAnimations Hook
4273
- *
4274
- * Manages per-unit sprite sheet animation state for the canvas draw loop.
4275
- * Follows the useCanvasEffects pattern: mutable state in refs, pure functions
4276
- * in utils, no re-renders per frame.
4277
- *
4278
- * Project-agnostic: accepts generic sprite sheet resolution callbacks
4279
- * rather than a project-specific asset manifest.
4280
- *
4281
- * @packageDocumentation
4282
- */
4283
-
4284
4741
  interface UseSpriteAnimationsResult {
4285
4742
  /**
4286
4743
  * Sync unit list and advance all animation timers.
@@ -4426,40 +4883,6 @@ declare class PhysicsManager {
4426
4883
  reset(): void;
4427
4884
  }
4428
4885
 
4429
- /**
4430
- * usePhysics2D Hook
4431
- *
4432
- * React hook for integrating 2D physics with the IsometricCanvas.
4433
- * Provides physics state management and tick synchronization.
4434
- *
4435
- * @example
4436
- * ```tsx
4437
- * const { registerUnit, getPosition, applyForce, tick } = usePhysics2D({
4438
- * gravity: 0.5,
4439
- * groundY: 400
4440
- * });
4441
- *
4442
- * // Register units
4443
- * useEffect(() => {
4444
- * units.forEach(unit => {
4445
- * registerUnit(unit.id, { x: unit.x, y: unit.y, mass: 1 });
4446
- * });
4447
- * }, [units]);
4448
- *
4449
- * // In animation loop
4450
- * useEffect(() => {
4451
- * const animate = (timestamp) => {
4452
- * tick(16); // Run physics
4453
- * draw(); // Render
4454
- * requestAnimationFrame(animate);
4455
- * };
4456
- * requestAnimationFrame(animate);
4457
- * }, []);
4458
- * ```
4459
- *
4460
- * @packageDocumentation
4461
- */
4462
-
4463
4886
  interface UsePhysics2DOptions extends PhysicsConfig {
4464
4887
  /** Enable physics debug visualization */
4465
4888
  debug?: boolean;
@@ -4802,11 +5225,6 @@ declare namespace GameOverScreen {
4802
5225
  var displayName: string;
4803
5226
  }
4804
5227
 
4805
- /**
4806
- * InventoryPanel Component
4807
- *
4808
- * Grid-based inventory UI with item selection and tooltips.
4809
- */
4810
5228
  interface InventoryItem {
4811
5229
  id: string;
4812
5230
  type: string;
@@ -4861,11 +5279,6 @@ interface InventoryPanelProps {
4861
5279
  */
4862
5280
  declare function InventoryPanel({ items, slots, columns, selectedSlot, onSelectSlot, onUseItem, onDropItem, selectSlotEvent, useItemEvent, dropItemEvent, showTooltips, className, slotSize, }: InventoryPanelProps): JSX.Element;
4863
5281
 
4864
- /**
4865
- * DialogueBox Component
4866
- *
4867
- * NPC dialogue display with typewriter effect and choices.
4868
- */
4869
5282
  interface DialogueChoice {
4870
5283
  text: string;
4871
5284
  action?: string;
@@ -4928,13 +5341,19 @@ declare function DialogueBox({ dialogue, typewriterSpeed, position, onComplete,
4928
5341
  /**
4929
5342
  * BattleBoard
4930
5343
  *
4931
- * Core game-logic organism extracted from BattleTemplate.
4932
- * Handles turn-based phase management, movement animation, valid-move/attack-target
4933
- * calculation, screen shake/flash, and game-over detection.
5344
+ * Core rendering organism for turn-based battles.
5345
+ *
5346
+ * This is a **controlled-only** component: all game state (units, phase,
5347
+ * turn, gameResult, selectedUnitId) must be provided via the `entity` prop.
5348
+ * User interactions are communicated via event bus emissions so the parent
5349
+ * (typically an Orbital trait or the `useBattleState` hook) can manage
5350
+ * state transitions.
5351
+ *
5352
+ * For a self-managing version, use `UncontrolledBattleBoard` which
5353
+ * composes this component with the `useBattleState` hook.
4934
5354
  *
4935
- * Accepts a single `entity` prop (BattleEntity) containing all board data,
4936
- * plus optional render-prop slots, callback overrides, and declarative event props
4937
- * that emit via `useEventBus()`.
5355
+ * Animation-only state (movement interpolation, screen shake, hover) is
5356
+ * always managed locally.
4938
5357
  *
4939
5358
  * @packageDocumentation
4940
5359
  */
@@ -4972,10 +5391,20 @@ interface BattleTile {
4972
5391
  terrain: string;
4973
5392
  terrainSprite?: string;
4974
5393
  }
4975
- /** Entity prop containing all board data */
5394
+ /** Entity prop containing all board data.
5395
+ *
5396
+ * BattleBoard is **controlled-only**: all game-state fields (`units`, `phase`,
5397
+ * `turn`, `gameResult`, `selectedUnitId`) must be provided. Mutations are
5398
+ * communicated via event bus emissions — the component never calls `setState`
5399
+ * for game-logic values.
5400
+ *
5401
+ * For a self-managing variant, use `UncontrolledBattleBoard`.
5402
+ *
5403
+ * Animation-only state (`movingPositions`, `isShaking`, `hoveredTile`) is
5404
+ * always managed locally.
5405
+ */
4976
5406
  interface BattleEntity {
4977
5407
  id: string;
4978
- initialUnits: BattleUnit[];
4979
5408
  tiles: IsometricTile[];
4980
5409
  features?: IsometricFeature[];
4981
5410
  boardWidth?: number;
@@ -4988,6 +5417,16 @@ interface BattleEntity {
4988
5417
  effects?: Record<string, string>;
4989
5418
  };
4990
5419
  backgroundImage?: string;
5420
+ /** Current unit state. */
5421
+ units: BattleUnit[];
5422
+ /** Current battle phase. */
5423
+ phase: BattlePhase;
5424
+ /** Current turn number. */
5425
+ turn: number;
5426
+ /** Game result. `null` = still in progress. */
5427
+ gameResult: 'victory' | 'defeat' | null;
5428
+ /** Currently selected unit ID. */
5429
+ selectedUnitId: string | null;
4991
5430
  }
4992
5431
  /** Context exposed to render-prop slots */
4993
5432
  interface BattleSlotContext {
@@ -5064,16 +5503,68 @@ declare namespace BattleBoard {
5064
5503
  var displayName: string;
5065
5504
  }
5066
5505
 
5506
+ interface UncontrolledBattleBoardProps extends Omit<BattleBoardProps, 'entity'> {
5507
+ entity: Omit<BattleBoardProps['entity'], 'units' | 'phase' | 'turn' | 'gameResult' | 'selectedUnitId'> & {
5508
+ initialUnits: BattleUnit[];
5509
+ };
5510
+ }
5511
+ declare function UncontrolledBattleBoard({ entity, ...rest }: UncontrolledBattleBoardProps): react_jsx_runtime.JSX.Element;
5512
+ declare namespace UncontrolledBattleBoard {
5513
+ var displayName: string;
5514
+ }
5515
+
5516
+ interface BattleStateEventConfig {
5517
+ tileClickEvent?: string;
5518
+ unitClickEvent?: string;
5519
+ endTurnEvent?: string;
5520
+ cancelEvent?: string;
5521
+ gameEndEvent?: string;
5522
+ playAgainEvent?: string;
5523
+ attackEvent?: string;
5524
+ }
5525
+ interface BattleStateCallbacks {
5526
+ /** Called when a unit attacks another */
5527
+ onAttack?: (attacker: BattleUnit, target: BattleUnit, damage: number) => void;
5528
+ /** Called when battle ends */
5529
+ onGameEnd?: (result: 'victory' | 'defeat') => void;
5530
+ /** Called after a unit moves */
5531
+ onUnitMove?: (unit: BattleUnit, to: {
5532
+ x: number;
5533
+ y: number;
5534
+ }) => void;
5535
+ /** Custom combat damage calculator */
5536
+ calculateDamage?: (attacker: BattleUnit, target: BattleUnit) => number;
5537
+ }
5538
+ interface BattleStateResult {
5539
+ units: BattleUnit[];
5540
+ selectedUnitId: string | null;
5541
+ phase: BattlePhase;
5542
+ turn: number;
5543
+ gameResult: 'victory' | 'defeat' | null;
5544
+ handleTileClick: (x: number, y: number) => void;
5545
+ handleUnitClick: (unitId: string) => void;
5546
+ handleEndTurn: () => void;
5547
+ handleRestart: () => void;
5548
+ }
5549
+ declare function useBattleState(initialUnits: BattleUnit[], eventConfig?: BattleStateEventConfig, callbacks?: BattleStateCallbacks): BattleStateResult;
5550
+
5067
5551
  /**
5068
5552
  * WorldMapBoard
5069
5553
  *
5070
- * Organism that contains ALL game logic for the strategic world-map view.
5071
- * Renders an isometric hex/iso map with hero selection, movement animation,
5072
- * and encounter callbacks. Game-specific panels (hero detail, hero lists,
5073
- * resource bars) are injected via render-prop slots.
5554
+ * Organism for the strategic world-map view. Renders an isometric hex/iso
5555
+ * map with hero selection, movement animation, and encounter callbacks.
5556
+ * Game-specific panels (hero detail, hero lists, resource bars) are injected
5557
+ * via render-prop slots.
5558
+ *
5559
+ * **State categories (closed-circuit compliant):**
5560
+ * - Game data (hexes, heroes, selectedHeroId, features) → received via
5561
+ * `entity` prop; the Orbital trait owns this state.
5562
+ * - Rendering state (hoveredTile, movingPositions animation) → local only.
5563
+ * - Events → emitted via `useEventBus()` for trait integration.
5074
5564
  *
5075
- * This component is the logic-heavy core; WorldMapTemplate is a thin layout
5076
- * wrapper that delegates to WorldMapBoard.
5565
+ * This component is mostly prop-driven. The only internal state is hover
5566
+ * tracking and movement animation interpolation, both of which are
5567
+ * rendering-only concerns that cannot (and should not) be externalised.
5077
5568
  *
5078
5569
  * @packageDocumentation
5079
5570
  */
@@ -5147,6 +5638,10 @@ interface WorldMapEntity {
5147
5638
  interface WorldMapBoardProps {
5148
5639
  /** World map entity data */
5149
5640
  entity: WorldMapEntity;
5641
+ /** Loading state indicator */
5642
+ isLoading?: boolean;
5643
+ /** Error state */
5644
+ error?: Error | null;
5150
5645
  /** Canvas render scale */
5151
5646
  scale?: number;
5152
5647
  /** Unit draw-size multiplier */
@@ -5185,11 +5680,15 @@ interface WorldMapBoardProps {
5185
5680
  onBattleEncounter?: (attackerId: string, defenderId: string) => void;
5186
5681
  /** Called when hero enters a feature hex (castle, resource, etc.) */
5187
5682
  onFeatureEnter?: (heroId: string, hex: MapHex) => void;
5683
+ /** Override for the diamond-top Y offset within tile sprites (default: 374). */
5684
+ diamondTopY?: number;
5685
+ /** Disable pan/zoom camera (default: true). Set false for fixed maps where overlay labels need stable positions. */
5686
+ enableCamera?: boolean;
5188
5687
  effectSpriteUrls?: string[];
5189
5688
  resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
5190
5689
  className?: string;
5191
5690
  }
5192
- declare function WorldMapBoard({ entity, scale, unitScale, allowMoveAllHeroes, isInRange, heroSelectEvent, heroMoveEvent, battleEncounterEvent, featureEnterEvent, tileClickEvent, header, sidePanel, overlay, footer, onHeroSelect, onHeroMove, onBattleEncounter, onFeatureEnter, effectSpriteUrls, resolveUnitFrame, className, }: WorldMapBoardProps): JSX.Element;
5691
+ declare function WorldMapBoard({ entity, scale, unitScale, allowMoveAllHeroes, isInRange, heroSelectEvent, heroMoveEvent, battleEncounterEvent, featureEnterEvent, tileClickEvent, header, sidePanel, overlay, footer, onHeroSelect, onHeroMove, onBattleEncounter, onFeatureEnter, diamondTopY, enableCamera, effectSpriteUrls, resolveUnitFrame, className, }: WorldMapBoardProps): JSX.Element;
5193
5692
  declare namespace WorldMapBoard {
5194
5693
  var displayName: string;
5195
5694
  }
@@ -5278,6 +5777,111 @@ declare namespace CastleBoard {
5278
5777
  var displayName: string;
5279
5778
  }
5280
5779
 
5780
+ interface TraitTransition {
5781
+ from: string;
5782
+ to: string;
5783
+ event: string;
5784
+ guardHint?: string;
5785
+ }
5786
+ interface TraitStateMachineDefinition {
5787
+ name: string;
5788
+ states: string[];
5789
+ currentState: string;
5790
+ transitions: TraitTransition[];
5791
+ description?: string;
5792
+ }
5793
+ interface TraitStateViewerProps {
5794
+ /** The trait / state machine to visualize */
5795
+ trait: TraitStateMachineDefinition;
5796
+ /** Display variant */
5797
+ variant?: 'linear' | 'compact' | 'full';
5798
+ /** Size variant */
5799
+ size?: 'sm' | 'md' | 'lg';
5800
+ /** Whether to show transition labels */
5801
+ showTransitions?: boolean;
5802
+ /** Click handler for states */
5803
+ onStateClick?: (state: string) => void;
5804
+ /** Custom state styles passed to StateIndicator */
5805
+ stateStyles?: Record<string, StateStyle>;
5806
+ /** Additional CSS classes */
5807
+ className?: string;
5808
+ /** Loading state */
5809
+ isLoading?: boolean;
5810
+ /** Error state */
5811
+ error?: Error | null;
5812
+ /** Entity name for schema-driven auto-fetch */
5813
+ entity?: string;
5814
+ }
5815
+ declare function TraitStateViewer({ trait, variant, size, showTransitions, onStateClick, stateStyles, className, }: TraitStateViewerProps): JSX.Element;
5816
+ declare namespace TraitStateViewer {
5817
+ var displayName: string;
5818
+ }
5819
+
5820
+ /** Data shape for a slot's equipped item */
5821
+ interface SlotItemData {
5822
+ id: string;
5823
+ name: string;
5824
+ category: string;
5825
+ description?: string;
5826
+ /** Emoji or text icon */
5827
+ iconEmoji?: string;
5828
+ /** Image URL icon (takes precedence over iconEmoji) */
5829
+ iconUrl?: string;
5830
+ /** Optional state machine for tooltip display */
5831
+ stateMachine?: TraitStateMachineDefinition;
5832
+ }
5833
+ interface TraitSlotProps {
5834
+ /** Slot index (1-based) */
5835
+ slotNumber: number;
5836
+ /** Currently equipped item, if any */
5837
+ equippedItem?: SlotItemData;
5838
+ /** Whether slot is locked */
5839
+ locked?: boolean;
5840
+ /** Label shown when locked */
5841
+ lockLabel?: string;
5842
+ /** Whether slot is selected */
5843
+ selected?: boolean;
5844
+ /** Size variant */
5845
+ size?: 'sm' | 'md' | 'lg';
5846
+ /** Show tooltip on hover */
5847
+ showTooltip?: boolean;
5848
+ /** Category → color mapping */
5849
+ categoryColors?: Record<string, {
5850
+ bg: string;
5851
+ border: string;
5852
+ }>;
5853
+ /** Optional tooltip frame image URL */
5854
+ tooltipFrameUrl?: string;
5855
+ /** Additional CSS classes */
5856
+ className?: string;
5857
+ /** Loading state */
5858
+ isLoading?: boolean;
5859
+ /** Error state */
5860
+ error?: Error | null;
5861
+ /** Entity name for schema-driven auto-fetch */
5862
+ entity?: string;
5863
+ /** Called when an item is dropped on this slot */
5864
+ onItemDrop?: (item: SlotItemData) => void;
5865
+ /** Whether this slot's equipped item is draggable */
5866
+ draggable?: boolean;
5867
+ /** Called when drag starts from this slot */
5868
+ onDragStart?: (item: SlotItemData) => void;
5869
+ /** Per-slot correctness feedback after a failed attempt */
5870
+ feedback?: 'correct' | 'wrong' | null;
5871
+ /** Click handler */
5872
+ onClick?: () => void;
5873
+ /** Remove handler */
5874
+ onRemove?: () => void;
5875
+ /** Emits UI:{clickEvent} with { slotNumber } */
5876
+ clickEvent?: string;
5877
+ /** Emits UI:{removeEvent} with { slotNumber } */
5878
+ removeEvent?: string;
5879
+ }
5880
+ declare function TraitSlot({ slotNumber, equippedItem, locked, lockLabel, selected, size, showTooltip, categoryColors, tooltipFrameUrl, className, feedback, onItemDrop, draggable, onDragStart, onClick, onRemove, clickEvent, removeEvent, }: TraitSlotProps): JSX.Element;
5881
+ declare namespace TraitSlot {
5882
+ var displayName: string;
5883
+ }
5884
+
5281
5885
  type EditorMode = 'select' | 'paint' | 'unit' | 'feature' | 'erase';
5282
5886
  declare const TERRAIN_COLORS: Record<string, string>;
5283
5887
  declare const FEATURE_TYPES: readonly ["goldMine", "resonanceCrystal", "traitCache", "salvageYard", "portal", "battleMarker", "treasure", "castle"];
@@ -5392,12 +5996,21 @@ declare namespace EditorToolbar {
5392
5996
  * @packageDocumentation
5393
5997
  */
5394
5998
 
5999
+ interface SuspenseConfig {
6000
+ /** Enable Suspense boundaries around slot content */
6001
+ enabled: boolean;
6002
+ /** Custom fallback per slot, overrides default Skeleton variant */
6003
+ slotFallbacks?: Partial<Record<UISlot, React__default.ReactNode>>;
6004
+ }
5395
6005
  interface UISlotComponentProps {
5396
6006
  slot: UISlot;
5397
6007
  portal?: boolean;
5398
6008
  position?: "left" | "right" | "top-right" | "top-left" | "bottom-right" | "bottom-left";
5399
6009
  className?: string;
5400
6010
  draggable?: boolean;
6011
+ isLoading?: boolean;
6012
+ error?: Error | null;
6013
+ entity?: string;
5401
6014
  }
5402
6015
  /**
5403
6016
  * Individual slot renderer.
@@ -5408,6 +6021,10 @@ declare function UISlotComponent({ slot, portal, position, className, }: UISlotC
5408
6021
  interface SlotContentRendererProps {
5409
6022
  content: SlotContent;
5410
6023
  onDismiss: () => void;
6024
+ className?: string;
6025
+ isLoading?: boolean;
6026
+ error?: Error | null;
6027
+ entity?: string;
5411
6028
  }
5412
6029
  /**
5413
6030
  * Renders the actual content of a slot.
@@ -5423,6 +6040,18 @@ interface UISlotRendererProps {
5423
6040
  includeFloating?: boolean;
5424
6041
  /** Additional class name for the container */
5425
6042
  className?: string;
6043
+ /** Loading state indicator */
6044
+ isLoading?: boolean;
6045
+ /** Error state */
6046
+ error?: Error | null;
6047
+ /** Entity name for schema-driven auto-fetch */
6048
+ entity?: string;
6049
+ /**
6050
+ * Enable Suspense boundaries around each slot.
6051
+ * When true, each inline slot is wrapped in `<ErrorBoundary><Suspense>` with
6052
+ * Skeleton fallbacks. Opt-in — existing isLoading prop pattern still works.
6053
+ */
6054
+ suspense?: boolean | SuspenseConfig;
5426
6055
  }
5427
6056
  /**
5428
6057
  * Main UI Slot Renderer component.
@@ -5440,7 +6069,7 @@ interface UISlotRendererProps {
5440
6069
  * }
5441
6070
  * ```
5442
6071
  */
5443
- declare function UISlotRenderer({ includeHud, includeFloating, className, }: UISlotRendererProps): React__default.ReactElement;
6072
+ declare function UISlotRenderer({ includeHud, includeFloating, className, suspense, }: UISlotRendererProps): React__default.ReactElement;
5444
6073
  declare namespace UISlotRenderer {
5445
6074
  var displayName: string;
5446
6075
  }
@@ -5466,6 +6095,12 @@ interface ModalSlotProps {
5466
6095
  size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
5467
6096
  /** Custom class name */
5468
6097
  className?: string;
6098
+ /** Loading state indicator */
6099
+ isLoading?: boolean;
6100
+ /** Error state */
6101
+ error?: Error | null;
6102
+ /** Entity name for schema-driven auto-fetch */
6103
+ entity?: string;
5469
6104
  }
5470
6105
  /**
5471
6106
  * ModalSlot - Wrapper for modal slot content
@@ -5499,6 +6134,12 @@ interface DrawerSlotProps {
5499
6134
  size?: DrawerSize;
5500
6135
  /** Custom class name */
5501
6136
  className?: string;
6137
+ /** Loading state */
6138
+ isLoading?: boolean;
6139
+ /** Error state */
6140
+ error?: Error | null;
6141
+ /** Entity name for schema-driven auto-fetch */
6142
+ entity?: string;
5502
6143
  }
5503
6144
  /**
5504
6145
  * DrawerSlot - Wrapper for drawer slot content
@@ -5531,6 +6172,12 @@ interface ToastSlotProps {
5531
6172
  duration?: number;
5532
6173
  /** Custom class name */
5533
6174
  className?: string;
6175
+ /** Loading state indicator */
6176
+ isLoading?: boolean;
6177
+ /** Error state */
6178
+ error?: Error | null;
6179
+ /** Entity name for schema-driven auto-fetch */
6180
+ entity?: string;
5534
6181
  }
5535
6182
  /**
5536
6183
  * ToastSlot - Wrapper for toast slot content
@@ -6100,15 +6747,23 @@ declare const AuthLayout: React__default.FC<AuthLayoutProps>;
6100
6747
 
6101
6748
  type CounterSize = "sm" | "md" | "lg";
6102
6749
  type CounterVariant = "minimal" | "standard" | "full";
6103
- interface CounterTemplateProps {
6750
+ interface CounterEntity {
6751
+ /** Entity ID */
6752
+ id: string;
6104
6753
  /** Current count value */
6105
6754
  count: number;
6106
- /** Minimum allowed value */
6107
- min?: number;
6108
- /** Maximum allowed value */
6109
- max?: number;
6110
- /** Step size for increment/decrement */
6111
- step?: number;
6755
+ /** Whether decrement button is disabled */
6756
+ decrementDisabled?: boolean;
6757
+ /** Whether increment button is disabled */
6758
+ incrementDisabled?: boolean;
6759
+ /** Step label for decrement button (e.g. "-5") */
6760
+ decrementLabel?: string;
6761
+ /** Step label for increment button (e.g. "+5") */
6762
+ incrementLabel?: string;
6763
+ /** Formatted range text (e.g. "Range: 0 to 100") */
6764
+ rangeText?: string;
6765
+ }
6766
+ interface CounterTemplateProps extends TemplateProps<CounterEntity> {
6112
6767
  /** Called when increment is clicked */
6113
6768
  onIncrement?: () => void;
6114
6769
  /** Called when decrement is clicked */
@@ -6123,266 +6778,9 @@ interface CounterTemplateProps {
6123
6778
  size?: CounterSize;
6124
6779
  /** Template variant */
6125
6780
  variant?: CounterVariant;
6126
- /** Additional class name */
6127
- className?: string;
6128
6781
  }
6129
6782
  declare const CounterTemplate: React__default.FC<CounterTemplateProps>;
6130
6783
 
6131
- /**
6132
- * ListTemplate
6133
- *
6134
- * A presentational template for list-based features like todos, shopping lists, notes.
6135
- * Supports add, toggle, delete, and filter operations.
6136
- */
6137
-
6138
- type FilterValue = "all" | "active" | "completed";
6139
- type ListVariant = "minimal" | "standard" | "full";
6140
- interface ListTemplateItem {
6141
- id: string;
6142
- title: string;
6143
- completed?: boolean;
6144
- [key: string]: unknown;
6145
- }
6146
- interface ListTemplateProps {
6147
- /** Array of list items */
6148
- items: ListTemplateItem[];
6149
- /** Whether data is loading */
6150
- isLoading?: boolean;
6151
- /** Error object if loading failed */
6152
- error?: Error | string | null;
6153
- /** Current filter value */
6154
- filter?: FilterValue;
6155
- /** Called when a new item is added */
6156
- onAdd?: (title: string) => void;
6157
- /** Called when an item is toggled */
6158
- onToggle?: (id: string) => void;
6159
- /** Called when an item is deleted */
6160
- onDelete?: (id: string) => void;
6161
- /** Called when filter changes */
6162
- onFilterChange?: (filter: FilterValue) => void;
6163
- /** Called to retry loading */
6164
- onRetry?: () => void;
6165
- /** Title displayed above the list */
6166
- title?: string;
6167
- /** Placeholder for the input field */
6168
- placeholder?: string;
6169
- /** Whether to show filter buttons */
6170
- showFilters?: boolean;
6171
- /** Whether to show item count */
6172
- showCount?: boolean;
6173
- /** Message shown when list is empty */
6174
- emptyMessage?: string;
6175
- /** Template variant */
6176
- variant?: ListVariant;
6177
- /** Additional class name */
6178
- className?: string;
6179
- }
6180
- declare const ListTemplate: React__default.FC<ListTemplateProps>;
6181
-
6182
- /**
6183
- * FormTemplate
6184
- *
6185
- * A presentational template for form-based features like contact forms, feedback, surveys.
6186
- * Supports submission, validation, and success/error states.
6187
- */
6188
-
6189
- type FormVariant = "minimal" | "standard" | "full";
6190
- interface FormFieldConfig {
6191
- name: string;
6192
- label: string;
6193
- type: "text" | "email" | "password" | "tel" | "url" | "number" | "textarea" | "select" | "checkbox";
6194
- placeholder?: string;
6195
- required?: boolean;
6196
- options?: Array<{
6197
- value: string;
6198
- label: string;
6199
- }>;
6200
- rows?: number;
6201
- }
6202
- interface FormTemplateProps {
6203
- /** Current form field values */
6204
- formData: Record<string, unknown>;
6205
- /** Whether form is being submitted */
6206
- isSubmitting?: boolean;
6207
- /** Whether submission was successful */
6208
- isSuccess?: boolean;
6209
- /** Error object if submission failed */
6210
- error?: Error | string | null;
6211
- /** Field-level validation errors */
6212
- validationErrors?: Record<string, string>;
6213
- /** Called when form is submitted */
6214
- onSubmit?: (formData: Record<string, unknown>) => void;
6215
- /** Called when a field value changes */
6216
- onFieldChange?: (field: string, value: unknown) => void;
6217
- /** Called to reset the form */
6218
- onReset?: () => void;
6219
- /** Called to dismiss success message */
6220
- onDismissSuccess?: () => void;
6221
- /** Form title */
6222
- title?: string;
6223
- /** Form subtitle/description */
6224
- subtitle?: string;
6225
- /** Submit button label */
6226
- submitLabel?: string;
6227
- /** Success message */
6228
- successMessage?: string;
6229
- /** Whether to show reset button */
6230
- showReset?: boolean;
6231
- /** Form field definitions */
6232
- fields?: FormFieldConfig[];
6233
- /** Template variant */
6234
- variant?: FormVariant;
6235
- /** Additional class name */
6236
- className?: string;
6237
- }
6238
- declare const FormTemplate: React__default.FC<FormTemplateProps>;
6239
-
6240
- /**
6241
- * CrudTemplate
6242
- *
6243
- * A presentational template for CRUD (Create, Read, Update, Delete) features.
6244
- * Includes data table, search, and modal forms for create/edit.
6245
- */
6246
-
6247
- type CrudVariant = "minimal" | "standard" | "full";
6248
- interface CrudItem {
6249
- id: string;
6250
- [key: string]: unknown;
6251
- }
6252
- interface ColumnConfig {
6253
- key: string;
6254
- label: string;
6255
- sortable?: boolean;
6256
- width?: string;
6257
- render?: (value: unknown, row: CrudItem) => React__default.ReactNode;
6258
- }
6259
- interface FieldConfig {
6260
- key: string;
6261
- label: string;
6262
- type?: "text" | "email" | "number" | "textarea" | "select";
6263
- required?: boolean;
6264
- placeholder?: string;
6265
- options?: Array<{
6266
- value: string;
6267
- label: string;
6268
- }>;
6269
- }
6270
- interface CrudTemplateProps {
6271
- /** Array of items to display */
6272
- items: CrudItem[];
6273
- /** Whether data is loading */
6274
- isLoading?: boolean;
6275
- /** Error object if loading failed */
6276
- error?: Error | string | null;
6277
- /** Currently selected item for editing */
6278
- selectedItem?: CrudItem | null;
6279
- /** Whether the create/edit modal is open */
6280
- isModalOpen?: boolean;
6281
- /** Current search query */
6282
- searchQuery?: string;
6283
- /** Current sort field */
6284
- sortBy?: string;
6285
- /** Current sort order */
6286
- sortOrder?: "asc" | "desc";
6287
- /** Called to load/refresh items */
6288
- onLoad?: () => void;
6289
- /** Called when creating a new item */
6290
- onCreate?: (data: Record<string, unknown>) => void;
6291
- /** Called when updating an item */
6292
- onUpdate?: (id: string, data: Record<string, unknown>) => void;
6293
- /** Called when deleting an item */
6294
- onDelete?: (id: string) => void;
6295
- /** Called when selecting an item for editing */
6296
- onSelect?: (id: string) => void;
6297
- /** Called when viewing an item */
6298
- onView?: (id: string) => void;
6299
- /** Called when search query changes */
6300
- onSearch?: (query: string) => void;
6301
- /** Called when sort changes */
6302
- onSort?: (field: string, order: "asc" | "desc") => void;
6303
- /** Called to open create/edit modal */
6304
- onOpenModal?: () => void;
6305
- /** Called to close modal */
6306
- onCloseModal?: () => void;
6307
- /** Page title */
6308
- title?: string;
6309
- /** Singular entity name for labels */
6310
- entityName?: string;
6311
- /** Table column definitions */
6312
- columns?: ColumnConfig[];
6313
- /** Form field definitions for create/edit */
6314
- fields?: FieldConfig[];
6315
- /** Whether to show search input */
6316
- showSearch?: boolean;
6317
- /** Search input placeholder */
6318
- searchPlaceholder?: string;
6319
- /** Whether to show view action */
6320
- showViewAction?: boolean;
6321
- /** Template variant */
6322
- variant?: CrudVariant;
6323
- /** Additional class name */
6324
- className?: string;
6325
- }
6326
- declare const CrudTemplate: React__default.FC<CrudTemplateProps>;
6327
-
6328
- /**
6329
- * SettingsTemplate
6330
- *
6331
- * A presentational template for settings/preferences features.
6332
- * Supports sections with various input types and save/reset operations.
6333
- */
6334
-
6335
- type SettingsVariant = "minimal" | "standard" | "full";
6336
- interface SettingsFieldConfig {
6337
- key: string;
6338
- label: string;
6339
- type: "text" | "email" | "number" | "select" | "toggle" | "checkbox";
6340
- description?: string;
6341
- placeholder?: string;
6342
- options?: string[] | Array<{
6343
- value: string;
6344
- label: string;
6345
- }>;
6346
- }
6347
- interface SettingsSectionConfig {
6348
- title: string;
6349
- description?: string;
6350
- fields: SettingsFieldConfig[];
6351
- }
6352
- interface SettingsTemplateProps {
6353
- /** Current settings values */
6354
- settings: Record<string, unknown>;
6355
- /** Whether settings are being saved */
6356
- isSaving?: boolean;
6357
- /** Whether there are unsaved changes */
6358
- hasChanges?: boolean;
6359
- /** Error object if save failed */
6360
- error?: Error | string | null;
6361
- /** Success message after save */
6362
- successMessage?: string | null;
6363
- /** Called when saving settings */
6364
- onSave?: (settings: Record<string, unknown>) => void;
6365
- /** Called when a setting value changes */
6366
- onChange?: (key: string, value: unknown) => void;
6367
- /** Called to reset to default settings */
6368
- onReset?: () => void;
6369
- /** Called to revert unsaved changes */
6370
- onRevert?: () => void;
6371
- /** Called to dismiss success message */
6372
- onDismissSuccess?: () => void;
6373
- /** Page title */
6374
- title?: string;
6375
- /** Settings sections */
6376
- sections?: SettingsSectionConfig[];
6377
- /** Whether to show reset to defaults button */
6378
- showResetToDefaults?: boolean;
6379
- /** Template variant */
6380
- variant?: SettingsVariant;
6381
- /** Additional class name */
6382
- className?: string;
6383
- }
6384
- declare const SettingsTemplate: React__default.FC<SettingsTemplateProps>;
6385
-
6386
6784
  /**
6387
6785
  * GameTemplate
6388
6786
  *
@@ -6391,7 +6789,11 @@ declare const SettingsTemplate: React__default.FC<SettingsTemplateProps>;
6391
6789
  * **Atomic Design**: Composed using Box, Typography, and Layout molecules/atoms.
6392
6790
  */
6393
6791
 
6394
- interface GameTemplateProps {
6792
+ interface GameEntity {
6793
+ id: string;
6794
+ title?: string;
6795
+ }
6796
+ interface GameTemplateProps extends TemplateProps<GameEntity> {
6395
6797
  /** Title of the game */
6396
6798
  title?: string;
6397
6799
  /** The main game canvas or content */
@@ -6422,7 +6824,12 @@ declare const GameTemplate: React__default.FC<GameTemplateProps>;
6422
6824
  * **Atomic Design**: Composed using Box, Typography, and Button atoms.
6423
6825
  */
6424
6826
 
6425
- interface GenericAppTemplateProps {
6827
+ interface GenericAppEntity {
6828
+ id: string;
6829
+ title?: string;
6830
+ subtitle?: string;
6831
+ }
6832
+ interface GenericAppTemplateProps extends TemplateProps<GenericAppEntity> {
6426
6833
  /** Page title */
6427
6834
  title: string;
6428
6835
  /** Subtitle or description */
@@ -6530,12 +6937,14 @@ interface WorldMapTemplateProps extends TemplateProps<WorldMapEntity> {
6530
6937
  scale?: number;
6531
6938
  /** Unit draw-size multiplier */
6532
6939
  unitScale?: number;
6940
+ /** Override for the diamond-top Y offset within tile sprites (default: 374). */
6941
+ diamondTopY?: number;
6533
6942
  /** Allow selecting / moving ALL heroes (including enemy). For testing. */
6534
6943
  allowMoveAllHeroes?: boolean;
6535
6944
  }
6536
- declare function WorldMapTemplate({ entity, scale, unitScale, allowMoveAllHeroes, className, }: WorldMapTemplateProps): JSX.Element;
6945
+ declare function WorldMapTemplate({ entity, scale, unitScale, diamondTopY, allowMoveAllHeroes, className, }: WorldMapTemplateProps): JSX.Element;
6537
6946
  declare namespace WorldMapTemplate {
6538
6947
  var displayName: string;
6539
6948
  }
6540
6949
 
6541
- export { Accordion, type AccordionItem, type AccordionProps, Card as ActionCard, type CardProps as ActionCardProps, Alert, type AlertProps, type AlertVariant, type AnimationDef, type AnimationName, AuthLayout, type AuthLayoutProps, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeVariant, BattleBoard, type BattleBoardProps, type BattleEntity, type BattlePhase, type BattleSlotContext, BattleTemplate, type BattleTemplateProps, type BattleTile, type BattleUnit, Box, type BoxBg, type BoxMargin, type BoxPadding, type BoxProps, type BoxRounded, type BoxShadow, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CameraState, CanvasEffect, type CanvasEffectProps, Card$1 as Card, type CardAction, CardBody, CardContent, CardFooter, CardGrid, type CardGridGap, type CardGridProps, CardHeader, type CardProps$1 as CardProps, CardTitle, CastleBoard, type CastleBoardProps, type CastleEntity, type CastleSlotContext, CastleTemplate, type CastleTemplateProps, Center, type CenterProps, Chart, type ChartDataPoint, type ChartProps, type ChartSeries, type ChartType, Checkbox, type CheckboxProps, CodeViewer, type CodeViewerMode, type CodeViewerProps, CollapsibleSection, type CollapsibleSectionProps, type Column, type ColumnConfig, type CombatActionType, type ConditionalContext, ConditionalWrapper, type ConditionalWrapperProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, Container, type ContainerProps, ControlButton, type ControlButtonProps, type CounterSize, CounterTemplate, type CounterTemplateProps, type CounterVariant, type CrudItem, CrudTemplate, type CrudTemplateProps, type CrudVariant, DIAMOND_TOP_Y, DashboardGrid, type DashboardGridCell, type DashboardGridProps, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, type DetailField, DetailPanel, type DetailPanelProps, type DetailSection, DialogueBox, type DialogueBoxProps, type DialogueChoice, type DialogueNode, type DiffLine, Divider, type DividerOrientation, type DividerProps, type DocumentType, DocumentViewer, type DocumentViewerProps, Drawer, type DrawerPosition, type DrawerProps, type DrawerSize, DrawerSlot, type DrawerSlotProps, EditorCheckbox, type EditorCheckboxProps, type EditorMode, EditorSelect, type EditorSelectProps, EditorSlider, type EditorSliderProps, EditorTextInput, type EditorTextInputProps, EditorToolbar, type EditorToolbarProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, EventBusContextType, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, type FacingDirection, type FieldConfig, type FilterDefinition, FilterGroup, type FilterGroupProps, type FilterValue, Flex, type FlexProps, FloatingActionButton, type FloatingActionButtonProps, Form, FormActions, type FormActionsProps, FormField, type FormFieldConfig, type FormFieldProps, FormLayout, type FormLayoutProps, type FormProps, FormSection$1 as FormSection, FormSectionHeader, type FormSectionHeaderProps, type FormSectionProps, FormTemplate, type FormTemplateProps, type FormVariant, type FrameDimsResolver, GameHud, type GameHudElement, type GameHudProps, type GameHudStat, GameMenu, type GameMenuProps, type GameOverAction, GameOverScreen, type GameOverScreenProps, type GameOverStat, GameShell, type GameShellProps, GameTemplate, type GameTemplateProps, GenericAppTemplate, type GenericAppTemplateProps, GraphCanvas, type GraphCanvasProps, type GraphEdge, type GraphNode, Grid, type GridProps, HStack, type HStackProps, Header, type HeaderProps, Heading, type HeadingProps, HealthBar, type HealthBarProps, type HighlightType, Icon, type IconAnimation, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, type InputProps, type InventoryItem, InventoryPanel, type InventoryPanelProps, IsometricCanvas, type IsometricCanvasProps, type IsometricFeature, type IsometricTile, type IsometricUnit, Label, type LabelProps, type LawReference, LawReferenceTooltip, type LawReferenceTooltipProps, List, type ListItem, type ListProps, ListTemplate, type ListTemplateItem, type ListTemplateProps, type ListVariant, LoadingState, type LoadingStateProps, type MapHero, type MapHex, MasterDetail, type MasterDetailProps, MediaGallery, type MediaGalleryProps, type MediaItem, Menu, type MenuItem, type MenuOption, type MenuProps, Meter, type MeterProps, type MeterThreshold, type MeterVariant, Modal, type ModalProps, type ModalSize, ModalSlot, type ModalSlotProps, type NavItem, Navigation, type NavigationItem, type NavigationProps, OrbitalVisualization, type OrbitalVisualizationProps, Overlay, type OverlayProps, type PageBreadcrumb, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, type Physics2DState, type PhysicsBounds, type PhysicsConfig, PhysicsManager, Popover, type PopoverProps, ProgressBar, type ProgressBarColor, type ProgressBarProps, type ProgressBarVariant, Radio, type RadioProps, type RelationOption, RelationSelect, type RelationSelectProps, RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem, type ResolvedFrame, type RowAction, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScoreDisplay, type ScoreDisplayProps, SearchInput, type SearchInputProps, Section, type SectionProps, Select, type SelectOption, type SelectProps, type SettingsFieldConfig, type SettingsSectionConfig, SettingsTemplate, type SettingsTemplateProps, type SettingsVariant, type SheetUrlResolver, SidePanel, type SidePanelProps, Sidebar, type SidebarItem, type SidebarProps, SignaturePad, type SignaturePadProps, SimpleGrid, type SimpleGridProps, SlotContent, SlotContentRenderer, type SortDirection, Spacer, type SpacerProps, type SpacerSize, Spinner, type SpinnerProps, Split, SplitPane, type SplitPaneProps, type SplitProps, Sprite, type SpriteDirection, type SpriteFrameDims, type SpriteProps, type SpriteSheetUrls, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, StatCard, type StatCardProps, StatusBar, type StatusBarProps, Switch, type SwitchProps, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, type TabDefinition, type TabItem, TabbedContainer, type TabbedContainerProps, Table, type TableColumn, type TableProps, Tabs, type TabsProps, type TemplateProps, TerrainPalette, type TerrainPaletteProps, Text, TextHighlight, type TextHighlightProps, type TextProps, Textarea, type TextareaProps, ThemeSelector, ThemeToggle, type ThemeToggleProps, Timeline, type TimelineItem, type TimelineItemStatus, type TimelineProps, Toast, type ToastProps, ToastSlot, type ToastSlotProps, type ToastVariant, Tooltip, type TooltipProps, Typography, type TypographyProps, type TypographyVariant, UISlot, UISlotComponent, UISlotRenderer, type UISlotRendererProps, type UnitAnimationState, type UsePhysics2DOptions, type UsePhysics2DReturn, type UseSpriteAnimationsOptions, type UseSpriteAnimationsResult, VStack, type VStackProps, ViolationAlert, type ViolationAlertProps, type ViolationRecord, WizardContainer, type WizardContainerProps, WizardNavigation, type WizardNavigationProps, WizardProgress, type WizardProgressProps, type WizardProgressStep, type WizardStep, WorldMapBoard, type WorldMapBoardProps, type WorldMapEntity, type WorldMapSlotContext, WorldMapTemplate, type WorldMapTemplateProps, createUnitAnimationState, drawSprite, getCurrentFrame, inferDirection, isoToScreen, resolveFrame, resolveSheetDirection, screenToIso, tickAnimationState, transitionAnimation, useCamera, useImageCache, usePhysics2D, useSpriteAnimations };
6950
+ export { AR_BOOK_FIELDS, Accordion, type AccordionItem, type AccordionProps, Card as ActionCard, type CardProps as ActionCardProps, Alert, type AlertProps, type AlertVariant, type AnimationDef, type AnimationName, type AudioManifest, AuthLayout, type AuthLayoutProps, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeVariant, BattleBoard, type BattleBoardProps, type BattleEntity, type BattlePhase, type BattleSlotContext, type BattleStateCallbacks, type BattleStateEventConfig, type BattleStateResult, BattleTemplate, type BattleTemplateProps, type BattleTile, type BattleUnit, type BookChapter, BookChapterView, type BookChapterViewProps, BookCoverPage, type BookCoverPageProps, type BookData, type BookFieldMap, BookNavBar, type BookNavBarProps, type BookPart, BookTableOfContents, type BookTableOfContentsProps, BookViewer, type BookViewerProps, Box, type BoxBg, type BoxMargin, type BoxPadding, type BoxProps, type BoxRounded, type BoxShadow, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, CameraState, CanvasEffect, type CanvasEffectProps, Card$1 as Card, type CardAction, CardBody, CardContent, CardFooter, CardGrid, type CardGridGap, type CardGridProps, CardHeader, type CardProps$1 as CardProps, CardTitle, CastleBoard, type CastleBoardProps, type CastleEntity, type CastleSlotContext, CastleTemplate, type CastleTemplateProps, Center, type CenterProps, Chart, type ChartDataPoint, type ChartProps, type ChartSeries, type ChartType, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, CodeViewer, type CodeViewerMode, type CodeViewerProps, CollapsibleSection, type CollapsibleSectionProps, type Column, type CombatActionType, type ConditionalContext, ConditionalWrapper, type ConditionalWrapperProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, Container, type ContainerProps, ContentRenderer, type ContentRendererProps, ControlButton, type ControlButtonProps, type CounterSize, CounterTemplate, type CounterTemplateProps, type CounterVariant, DIAMOND_TOP_Y, DashboardGrid, type DashboardGridCell, type DashboardGridProps, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableProps, type DetailField, DetailPanel, type DetailPanelProps, type DetailSection, DialogueBox, type DialogueBoxProps, type DialogueChoice, type DialogueNode, type DiffLine, Divider, type DividerOrientation, type DividerProps, type DocumentType, DocumentViewer, type DocumentViewerProps, StateMachineView as DomStateMachineVisualizer, Drawer, type DrawerPosition, type DrawerProps, type DrawerSize, DrawerSlot, type DrawerSlotProps, EditorCheckbox, type EditorCheckboxProps, type EditorMode, EditorSelect, type EditorSelectProps, EditorSlider, type EditorSliderProps, EditorTextInput, type EditorTextInputProps, EditorToolbar, type EditorToolbarProps, EmptyState, type EmptyStateProps, EntityDisplayEvents, type EntityDisplayProps, ErrorBoundary, type ErrorBoundaryProps, ErrorState, type ErrorStateProps, EventBusContextType, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, type FacingDirection, type FilterDefinition, FilterGroup, type FilterGroupProps, type FilterPayload, Flex, type FlexProps, FloatingActionButton, type FloatingActionButtonProps, Form, FormActions, type FormActionsProps, FormField, type FormFieldProps, FormLayout, type FormLayoutProps, type FormProps, FormSection$1 as FormSection, FormSectionHeader, type FormSectionHeaderProps, type FormSectionProps, type FrameDimsResolver, GameAudioContext, type GameAudioContextValue, type GameAudioControls, GameAudioProvider, type GameAudioProviderProps, GameAudioToggle, type GameAudioToggleProps, GameHud, type GameHudElement, type GameHudProps, type GameHudStat, GameMenu, type GameMenuProps, type GameOverAction, GameOverScreen, type GameOverScreenProps, type GameOverStat, GameShell, type GameShellProps, GameTemplate, type GameTemplateProps, GenericAppTemplate, type GenericAppTemplateProps, GraphCanvas, type GraphCanvasProps, type GraphEdge, type GraphNode, Grid, type GridProps, HStack, type HStackProps, Header, type HeaderProps, Heading, type HeadingProps, HealthBar, type HealthBarProps, type HighlightType, IDENTITY_BOOK_FIELDS, Icon, type IconAnimation, type IconProps, type IconSize, Input, InputGroup, type InputGroupProps, type InputProps, type InventoryItem, InventoryPanel, type InventoryPanelProps, IsometricCanvas, type IsometricCanvasProps, IsometricFeature, IsometricTile, IsometricUnit, JazariStateMachine, type JazariStateMachineProps, Label, type LabelProps, type LawReference, LawReferenceTooltip, type LawReferenceTooltipProps, List, type ListItem, type ListProps, LoadingState, type LoadingStateProps, type MapHero, type MapHex, MarkdownContent, type MarkdownContentProps, MasterDetail, type MasterDetailProps, MediaGallery, type MediaGalleryProps, type MediaItem, Menu, type MenuItem, type MenuOption, type MenuProps, Meter, type MeterProps, type MeterThreshold, type MeterVariant, Modal, type ModalProps, type ModalSize, ModalSlot, type ModalSlotProps, type NavItem, Navigation, type NavigationItem, type NavigationProps, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, type OrbitalVisualizationProps, Overlay, type OverlayProps, type PageBreadcrumb, PageHeader, type PageHeaderProps, type PaginatePayload, Pagination, type PaginationProps, type Physics2DState, type PhysicsBounds, type PhysicsConfig, PhysicsManager, Popover, type PopoverProps, ProgressBar, type ProgressBarColor, type ProgressBarProps, type ProgressBarVariant, QuizBlock, type QuizBlockProps, Radio, type RadioProps, type RelationOption, RelationSelect, type RelationSelectProps, RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem, type ResolvedFrame, type RowAction, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, type ScaledDiagramProps, ScoreDisplay, type ScoreDisplayProps, SearchInput, type SearchInputProps, type SearchPayload, Section, type SectionProps, Select, type SelectOption, type SelectPayload, type SelectProps, type SheetUrlResolver, SidePanel, type SidePanelProps, Sidebar, type SidebarItem, type SidebarProps, SignaturePad, type SignaturePadProps, SimpleGrid, type SimpleGridProps, Skeleton, type SkeletonProps, type SkeletonVariant, SlotContent, SlotContentRenderer, type SlotItemData, type SortDirection, type SortPayload, type SoundEntry, Spacer, type SpacerProps, type SpacerSize, Spinner, type SpinnerProps, Split, SplitPane, type SplitPaneProps, type SplitProps, Sprite, type SpriteDirection, type SpriteFrameDims, type SpriteProps, type SpriteSheetUrls, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, StatCard, type StatCardProps, StateIndicator, type StateIndicatorProps, StateMachineView, type StateMachineViewProps, type StateStyle, StatusBar, type StatusBarProps, Switch, type SwitchProps, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, type TabDefinition, type TabItem, TabbedContainer, type TabbedContainerProps, Table, type TableColumn, type TableProps, Tabs, type TabsProps, type TemplateProps, TerrainPalette, type TerrainPaletteProps, Text, TextHighlight, type TextHighlightProps, type TextProps, Textarea, type TextareaProps, ThemeSelector, ThemeToggle, type ThemeToggleProps, Timeline, type TimelineItem, type TimelineItemStatus, type TimelineProps, Toast, type ToastProps, ToastSlot, type ToastSlotProps, type ToastVariant, Tooltip, type TooltipProps, TraitSlot, type TraitSlotProps, type TraitStateMachineDefinition, TraitStateViewer, type TraitStateViewerProps, type TraitTransition, type TransitionBundle, Typography, type TypographyProps, type TypographyVariant, UISlot, UISlotComponent, UISlotRenderer, type UISlotRendererProps, UncontrolledBattleBoard, type UncontrolledBattleBoardProps, type UnitAnimationState, type UseGameAudioOptions, type UsePhysics2DOptions, type UsePhysics2DReturn, type UseSpriteAnimationsOptions, type UseSpriteAnimationsResult, VStack, type VStackProps, ViolationAlert, type ViolationAlertProps, type ViolationRecord, WizardContainer, type WizardContainerProps, WizardNavigation, type WizardNavigationProps, WizardProgress, type WizardProgressProps, type WizardProgressStep, type WizardStep, WorldMapBoard, type WorldMapBoardProps, type WorldMapEntity, type WorldMapSlotContext, WorldMapTemplate, type WorldMapTemplateProps, createUnitAnimationState, drawSprite, getCurrentFrame, inferDirection, isoToScreen, mapBookData, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, tickAnimationState, transitionAnimation, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };