@almadar/ui 2.6.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,18 +3,18 @@ import React__default, { ReactNode, ErrorInfo } from 'react';
3
3
  import { LucideIcon } from 'lucide-react';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { SExpr } from '@almadar/evaluator';
6
- import { OrbitalEntity } from '@almadar/core';
7
- import { b as DomLayoutData, d as DomStateNode, V as VisualizerConfig, e as DomTransitionLabel, C as ContentSegment } from '../cn-BoBXsxuX.js';
8
- export { h as cn } from '../cn-BoBXsxuX.js';
9
- import { I as IsometricTile, a as IsometricUnit, b as IsometricFeature, C as CameraState } from '../isometric-ynNHVPZx.js';
10
6
  export { AuthContextValue, AuthUser, ChangeSummary, CompileResult, CompileStage, DragReorderResult, ENTITY_EVENTS, EntityDataAdapter, EntityDataProvider, EntityDataRecord, EntityMutationResult, Extension, ExtensionManifest, FileSystemFile, FileSystemStatus, GitHubRepo, GitHubStatus, HistoryTimelineItem, I18nContextValue, I18nProvider, InfiniteScrollOptions, InfiniteScrollResult, LongPressHandlers, LongPressOptions, OpenFile, OrbitalEventPayload, OrbitalEventResponse, PinchZoomOptions, PinchZoomResult, PullToRefreshOptions, PullToRefreshResult, QuerySingletonEntity, QuerySingletonResult, QuerySingletonState, QueryState, ResolvedEntity, RevertResult, SelectedFile, SwipeGestureOptions, SwipeGestureResult, SwipeHandlers, TranslateFunction, UseCompileResult, UseEntityDetailResult, UseEntityListOptions, UseEntityListResult, UseEntityMutationsOptions, UseExtensionsOptions, UseExtensionsResult, UseFileEditorOptions, UseFileEditorResult, UseFileSystemResult, UseOrbitalHistoryOptions, UseOrbitalHistoryResult, createTranslate, entityDataKeys, parseQueryBinding, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useDragReorder, useEmitEvent, useEntities, useEntitiesByType, useEntity, useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntityMutations, useEntitySuspense, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useSwipeGesture, useTranslate, useUIEvents, useUpdateEntity, useValidation } from '../hooks/index.js';
11
7
  import { E as EventBusContextType } from '../event-bus-types-CjJduURa.js';
12
8
  export { a as EventListener, K as KFlowEvent, U as Unsubscribe } from '../event-bus-types-CjJduURa.js';
9
+ import { I as IsometricTile, a as IsometricUnit, b as IsometricFeature, C as CameraState } from '../isometric-ynNHVPZx.js';
10
+ import { OrbitalEntity } from '@almadar/core';
11
+ import { b as DomLayoutData, d as DomStateNode, V as VisualizerConfig, e as DomTransitionLabel, C as ContentSegment } from '../cn-BoBXsxuX.js';
12
+ export { h as cn } from '../cn-BoBXsxuX.js';
13
13
  import { S as SlotContent, a as UISlot } from '../useUISlots-BBjNvQtb.js';
14
14
  export { D as DEFAULT_SLOTS, R as RenderUIConfig, b as SlotAnimation, c as SlotChangeCallback, U as UISlotManager, u as useUISlotManager } from '../useUISlots-BBjNvQtb.js';
15
15
  export { Entity, clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../stores/index.js';
16
- import 'clsx';
17
16
  import '@tanstack/react-query';
17
+ import 'clsx';
18
18
 
19
19
  type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "success" | "warning" | "default";
20
20
  type ButtonSize = "sm" | "md" | "lg";
@@ -1209,6 +1209,281 @@ declare namespace StateIndicator {
1209
1209
  var displayName: string;
1210
1210
  }
1211
1211
 
1212
+ interface TimerDisplayProps {
1213
+ /** Time in seconds */
1214
+ seconds: number;
1215
+ /** Whether the timer is running */
1216
+ running?: boolean;
1217
+ /** Display format */
1218
+ format?: 'mm:ss' | 'ss' | 'countdown';
1219
+ /** Size variant */
1220
+ size?: 'sm' | 'md' | 'lg';
1221
+ /** Additional CSS classes */
1222
+ className?: string;
1223
+ /** Seconds below which to pulse red */
1224
+ lowThreshold?: number;
1225
+ }
1226
+ declare function TimerDisplay({ seconds, running, format, size, className, lowThreshold, }: TimerDisplayProps): react_jsx_runtime.JSX.Element;
1227
+ declare namespace TimerDisplay {
1228
+ var displayName: string;
1229
+ }
1230
+
1231
+ interface ResourceCounterProps {
1232
+ /** Icon component or emoji */
1233
+ icon?: React$1.ReactNode;
1234
+ /** Resource label */
1235
+ label: string;
1236
+ /** Current value */
1237
+ value: number;
1238
+ /** Maximum value */
1239
+ max?: number;
1240
+ /** Accent color class (e.g. 'text-yellow-400') */
1241
+ color?: string;
1242
+ /** Size variant */
1243
+ size?: 'sm' | 'md' | 'lg';
1244
+ /** Additional CSS classes */
1245
+ className?: string;
1246
+ }
1247
+ declare function ResourceCounter({ icon, label, value, max, color, size, className, }: ResourceCounterProps): react_jsx_runtime.JSX.Element;
1248
+ declare namespace ResourceCounter {
1249
+ var displayName: string;
1250
+ }
1251
+
1252
+ interface ItemSlotProps {
1253
+ /** Icon component or emoji */
1254
+ icon?: React$1.ReactNode;
1255
+ /** Item label */
1256
+ label?: string;
1257
+ /** Stack quantity */
1258
+ quantity?: number;
1259
+ /** Rarity tier affecting border color */
1260
+ rarity?: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
1261
+ /** Whether the slot is empty */
1262
+ empty?: boolean;
1263
+ /** Size variant */
1264
+ size?: 'sm' | 'md' | 'lg';
1265
+ /** Whether the slot is selected */
1266
+ selected?: boolean;
1267
+ /** Click handler */
1268
+ onClick?: () => void;
1269
+ /** Additional CSS classes */
1270
+ className?: string;
1271
+ }
1272
+ declare function ItemSlot({ icon, label, quantity, rarity, empty, size, selected, onClick, className, }: ItemSlotProps): react_jsx_runtime.JSX.Element;
1273
+ declare namespace ItemSlot {
1274
+ var displayName: string;
1275
+ }
1276
+
1277
+ interface TurnIndicatorProps {
1278
+ /** Current turn number */
1279
+ currentTurn: number;
1280
+ /** Maximum number of turns */
1281
+ maxTurns?: number;
1282
+ /** Name of the active team */
1283
+ activeTeam?: string;
1284
+ /** Current phase label */
1285
+ phase?: string;
1286
+ /** Size variant */
1287
+ size?: 'sm' | 'md' | 'lg';
1288
+ /** Additional CSS classes */
1289
+ className?: string;
1290
+ }
1291
+ declare function TurnIndicator({ currentTurn, maxTurns, activeTeam, phase, size, className, }: TurnIndicatorProps): react_jsx_runtime.JSX.Element;
1292
+ declare namespace TurnIndicator {
1293
+ var displayName: string;
1294
+ }
1295
+
1296
+ interface ComboCounterProps {
1297
+ /** Current combo count */
1298
+ combo: number;
1299
+ /** Score multiplier */
1300
+ multiplier?: number;
1301
+ /** Current streak */
1302
+ streak?: number;
1303
+ /** Size variant */
1304
+ size?: 'sm' | 'md' | 'lg';
1305
+ /** Additional CSS classes */
1306
+ className?: string;
1307
+ }
1308
+ declare function ComboCounter({ combo, multiplier, streak, size, className, }: ComboCounterProps): react_jsx_runtime.JSX.Element | null;
1309
+ declare namespace ComboCounter {
1310
+ var displayName: string;
1311
+ }
1312
+
1313
+ interface XPBarProps {
1314
+ /** Current XP value */
1315
+ current: number;
1316
+ /** XP needed for next level */
1317
+ max: number;
1318
+ /** Current level */
1319
+ level?: number;
1320
+ /** Whether to show the XP label */
1321
+ showLabel?: boolean;
1322
+ /** Size variant */
1323
+ size?: 'sm' | 'md' | 'lg';
1324
+ /** Animate the fill bar */
1325
+ animated?: boolean;
1326
+ /** Additional CSS classes */
1327
+ className?: string;
1328
+ }
1329
+ declare function XPBar({ current, max, level, showLabel, size, animated, className, }: XPBarProps): react_jsx_runtime.JSX.Element;
1330
+ declare namespace XPBar {
1331
+ var displayName: string;
1332
+ }
1333
+
1334
+ interface WaypointMarkerProps {
1335
+ /** Label text below the marker */
1336
+ label?: string;
1337
+ /** Custom icon to render inside the marker */
1338
+ icon?: React$1.ReactNode;
1339
+ /** Whether this waypoint is currently active */
1340
+ active?: boolean;
1341
+ /** Whether this waypoint has been completed */
1342
+ completed?: boolean;
1343
+ /** Size variant */
1344
+ size?: 'sm' | 'md' | 'lg';
1345
+ /** Additional CSS classes */
1346
+ className?: string;
1347
+ }
1348
+ declare function WaypointMarker({ label, icon, active, completed, size, className, }: WaypointMarkerProps): react_jsx_runtime.JSX.Element;
1349
+ declare namespace WaypointMarker {
1350
+ var displayName: string;
1351
+ }
1352
+
1353
+ interface StatusEffectProps {
1354
+ /** Icon to display for the effect */
1355
+ icon: React$1.ReactNode;
1356
+ /** Label describing the effect */
1357
+ label?: string;
1358
+ /** Remaining duration in seconds */
1359
+ duration?: number;
1360
+ /** Number of stacks */
1361
+ stacks?: number;
1362
+ /** Effect type */
1363
+ variant?: 'buff' | 'debuff' | 'neutral';
1364
+ /** Size variant */
1365
+ size?: 'sm' | 'md' | 'lg';
1366
+ /** Additional CSS classes */
1367
+ className?: string;
1368
+ }
1369
+ declare function StatusEffect({ icon, label, duration, stacks, variant, size, className, }: StatusEffectProps): react_jsx_runtime.JSX.Element;
1370
+ declare namespace StatusEffect {
1371
+ var displayName: string;
1372
+ }
1373
+
1374
+ interface DamageNumberProps {
1375
+ /** The damage/heal value to display */
1376
+ value: number;
1377
+ /** Type of number display */
1378
+ type?: 'damage' | 'heal' | 'crit' | 'miss';
1379
+ /** Size variant */
1380
+ size?: 'sm' | 'md' | 'lg';
1381
+ /** Additional CSS classes */
1382
+ className?: string;
1383
+ }
1384
+ declare function DamageNumber({ value, type, size, className, }: DamageNumberProps): react_jsx_runtime.JSX.Element;
1385
+ declare namespace DamageNumber {
1386
+ var displayName: string;
1387
+ }
1388
+
1389
+ interface DialogueBubbleProps {
1390
+ /** Speaker name displayed at the top */
1391
+ speaker?: string;
1392
+ /** Dialogue text content */
1393
+ text: string;
1394
+ /** URL for the speaker portrait image */
1395
+ portrait?: string;
1396
+ /** Position of the bubble on screen */
1397
+ position?: 'top' | 'bottom';
1398
+ /** Additional CSS classes */
1399
+ className?: string;
1400
+ }
1401
+ declare function DialogueBubble({ speaker, text, portrait, position, className, }: DialogueBubbleProps): react_jsx_runtime.JSX.Element;
1402
+ declare namespace DialogueBubble {
1403
+ var displayName: string;
1404
+ }
1405
+
1406
+ interface ChoiceButtonProps {
1407
+ /** Choice text content */
1408
+ text: string;
1409
+ /** Choice index number (displayed as prefix) */
1410
+ index?: number;
1411
+ /** Whether the choice is disabled */
1412
+ disabled?: boolean;
1413
+ /** Whether the choice is currently selected */
1414
+ selected?: boolean;
1415
+ /** Click handler */
1416
+ onClick?: () => void;
1417
+ /** Additional CSS classes */
1418
+ className?: string;
1419
+ }
1420
+ declare function ChoiceButton({ text, index, disabled, selected, onClick, className, }: ChoiceButtonProps): react_jsx_runtime.JSX.Element;
1421
+ declare namespace ChoiceButton {
1422
+ var displayName: string;
1423
+ }
1424
+
1425
+ interface ActionButtonProps {
1426
+ /** Button label text */
1427
+ label: string;
1428
+ /** Icon displayed before the label */
1429
+ icon?: React$1.ReactNode;
1430
+ /** Cooldown progress from 0 (ready) to 1 (full cooldown) */
1431
+ cooldown?: number;
1432
+ /** Whether the button is disabled */
1433
+ disabled?: boolean;
1434
+ /** Keyboard hotkey to display as a badge */
1435
+ hotkey?: string;
1436
+ /** Size variant */
1437
+ size?: 'sm' | 'md' | 'lg';
1438
+ /** Visual variant */
1439
+ variant?: 'primary' | 'secondary' | 'danger';
1440
+ /** Click handler */
1441
+ onClick?: () => void;
1442
+ /** Additional CSS classes */
1443
+ className?: string;
1444
+ }
1445
+ declare function ActionButton$1({ label, icon, cooldown, disabled, hotkey, size, variant, onClick, className, }: ActionButtonProps): react_jsx_runtime.JSX.Element;
1446
+ declare namespace ActionButton$1 {
1447
+ var displayName: string;
1448
+ }
1449
+
1450
+ interface MiniMapProps {
1451
+ /** Tile data: each tile renders as a 1px dot at (x,y) with the given color */
1452
+ tiles?: {
1453
+ x: number;
1454
+ y: number;
1455
+ color: string;
1456
+ }[];
1457
+ /** Unit positions: each unit renders as a 2px dot */
1458
+ units?: {
1459
+ x: number;
1460
+ y: number;
1461
+ color: string;
1462
+ isPlayer?: boolean;
1463
+ }[];
1464
+ /** Canvas display width in pixels */
1465
+ width?: number;
1466
+ /** Canvas display height in pixels */
1467
+ height?: number;
1468
+ /** Logical map width (for coordinate scaling) */
1469
+ mapWidth?: number;
1470
+ /** Logical map height (for coordinate scaling) */
1471
+ mapHeight?: number;
1472
+ /** Viewport rectangle outline */
1473
+ viewportRect?: {
1474
+ x: number;
1475
+ y: number;
1476
+ w: number;
1477
+ h: number;
1478
+ };
1479
+ /** Additional CSS classes */
1480
+ className?: string;
1481
+ }
1482
+ declare function MiniMap({ tiles, units, width, height, mapWidth, mapHeight, viewportRect, className, }: MiniMapProps): react_jsx_runtime.JSX.Element;
1483
+ declare namespace MiniMap {
1484
+ var displayName: string;
1485
+ }
1486
+
1212
1487
  interface ErrorBoundaryProps {
1213
1488
  /** Content to render when no error */
1214
1489
  children: ReactNode;
@@ -2987,590 +3262,1538 @@ declare namespace StatBadge {
2987
3262
  var displayName: string;
2988
3263
  }
2989
3264
 
2990
- /**
2991
- * GraphView Molecule Component
2992
- *
2993
- * Pure presentational force-directed graph visualization using SVG.
2994
- * Entity-less, no event bus, no translations. Accepts raw nodes and edges.
2995
- *
2996
- * Uses a simple force simulation (repulsion + attraction + centering)
2997
- * to lay out nodes, then renders via SVG circles and lines.
2998
- */
2999
-
3000
- interface GraphViewNode {
3265
+ interface InventoryGridItem {
3001
3266
  id: string;
3267
+ icon?: React$1.ReactNode;
3002
3268
  label?: string;
3003
- color?: string;
3004
- size?: number;
3005
- group?: string;
3006
- }
3007
- interface GraphViewEdge {
3008
- source: string;
3009
- target: string;
3010
- color?: string;
3011
- label?: string;
3269
+ quantity?: number;
3270
+ rarity?: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
3012
3271
  }
3013
- interface GraphViewProps {
3014
- /** Graph nodes */
3015
- nodes: GraphViewNode[];
3016
- /** Graph edges */
3017
- edges: GraphViewEdge[];
3018
- /** Callback when a node is clicked */
3019
- onNodeClick?: (node: GraphViewNode) => void;
3020
- /** Callback when a node is hovered (null on leave) */
3021
- onNodeHover?: (node: GraphViewNode | null) => void;
3022
- /** Width in pixels */
3023
- width?: number;
3024
- /** Height in pixels */
3025
- height?: number;
3272
+ interface InventoryGridProps {
3273
+ /** Array of items to display in the grid */
3274
+ items: InventoryGridItem[];
3275
+ /** Number of columns in the grid */
3276
+ columns?: number;
3277
+ /** Total number of slots (empty slots fill remaining space) */
3278
+ totalSlots?: number;
3279
+ /** Currently selected item ID */
3280
+ selectedId?: string;
3281
+ /** Callback when an item is selected */
3282
+ onSelect?: (id: string) => void;
3283
+ /** Event bus event name for selection */
3284
+ selectEvent?: string;
3285
+ /** Size variant for all item slots */
3286
+ size?: 'sm' | 'md' | 'lg';
3026
3287
  /** Additional CSS classes */
3027
3288
  className?: string;
3028
- /** Show node labels (default true) */
3029
- showLabels?: boolean;
3030
- /** Auto zoom-to-fit after layout settles (default true) */
3031
- zoomToFit?: boolean;
3032
3289
  }
3033
- declare const GraphView: React__default.FC<GraphViewProps>;
3290
+ declare function InventoryGrid({ items, columns, totalSlots, selectedId, onSelect, selectEvent, size, className, }: InventoryGridProps): react_jsx_runtime.JSX.Element;
3291
+ declare namespace InventoryGrid {
3292
+ var displayName: string;
3293
+ }
3034
3294
 
3035
- interface MapMarkerData {
3036
- /** Unique marker identifier */
3037
- id: string | number;
3038
- /** Latitude */
3039
- lat: number;
3040
- /** Longitude */
3041
- lng: number;
3042
- /** Label shown in popup */
3043
- label?: string;
3044
- /** Optional category for styling */
3045
- category?: string;
3295
+ interface Quest {
3296
+ id: string;
3297
+ title: string;
3298
+ progress: number;
3299
+ maxProgress: number;
3300
+ active?: boolean;
3301
+ completed?: boolean;
3046
3302
  }
3047
- interface MapViewProps {
3048
- /** Array of markers to display */
3049
- markers?: MapMarkerData[];
3050
- /** Map center latitude */
3051
- centerLat?: number;
3052
- /** Map center longitude */
3053
- centerLng?: number;
3054
- /** Zoom level (1-18, default 13) */
3055
- zoom?: number;
3056
- /** Height of the map container (default "400px") */
3057
- height?: string;
3058
- /** Callback when a marker is clicked (programmatic use) */
3059
- onMarkerClick?: (marker: MapMarkerData) => void;
3060
- /** Callback when the map is clicked (programmatic use) */
3061
- onMapClick?: (lat: number, lng: number) => void;
3062
- /** Event name dispatched via event bus when the map is clicked. Payload: { latitude, longitude } */
3063
- mapClickEvent?: string;
3064
- /** Event name dispatched via event bus when a marker is clicked. Payload: marker data */
3065
- markerClickEvent?: string;
3066
- /** Whether to show a pin at the clicked location */
3067
- showClickedPin?: boolean;
3303
+ interface QuestTrackerProps {
3304
+ /** Array of quests to display */
3305
+ quests: Quest[];
3306
+ /** ID of the currently active quest */
3307
+ activeQuestId?: string;
3068
3308
  /** Additional CSS classes */
3069
3309
  className?: string;
3070
- /** Show attribution (default true) */
3071
- showAttribution?: boolean;
3072
3310
  }
3073
- declare function MapView({ markers, centerLat, centerLng, zoom, height, onMarkerClick, onMapClick, mapClickEvent, markerClickEvent, showClickedPin, className, showAttribution, }: MapViewProps): react_jsx_runtime.JSX.Element;
3311
+ declare function QuestTracker({ quests, activeQuestId, className, }: QuestTrackerProps): react_jsx_runtime.JSX.Element;
3312
+ declare namespace QuestTracker {
3313
+ var displayName: string;
3314
+ }
3074
3315
 
3075
- type NumberStepperSize = "sm" | "md" | "lg";
3076
- interface NumberStepperProps {
3077
- /** Current value */
3078
- value?: number;
3079
- /** Minimum value */
3080
- min?: number;
3081
- /** Maximum value */
3082
- max?: number;
3083
- /** Step increment */
3084
- step?: number;
3085
- /** Size variant */
3086
- size?: NumberStepperSize;
3087
- /** Disabled state */
3088
- disabled?: boolean;
3089
- /** Direct onChange callback */
3090
- onChange?: (value: number) => void;
3091
- /** Declarative event name for value changes */
3092
- action?: string;
3093
- /** Payload to include with the action event */
3094
- actionPayload?: Record<string, unknown>;
3316
+ interface CraftingIngredient {
3317
+ /** Icon component or emoji */
3318
+ icon?: React$1.ReactNode;
3319
+ /** Ingredient label */
3320
+ label: string;
3321
+ /** Number required for the recipe */
3322
+ required: number;
3323
+ /** Number currently available */
3324
+ available: number;
3325
+ }
3326
+ interface CraftingRecipeProps {
3327
+ /** Input ingredients for the recipe */
3328
+ inputs: CraftingIngredient[];
3329
+ /** Output item produced by the recipe */
3330
+ output: {
3331
+ icon?: React$1.ReactNode;
3332
+ label: string;
3333
+ rarity?: string;
3334
+ };
3335
+ /** Whether the player has enough ingredients to craft */
3336
+ canCraft?: boolean;
3337
+ /** Callback when the craft button is clicked */
3338
+ onCraft?: () => void;
3339
+ /** Event bus event name for crafting */
3340
+ craftEvent?: string;
3095
3341
  /** Additional CSS classes */
3096
3342
  className?: string;
3097
- /** Accessible label */
3098
- label?: string;
3099
3343
  }
3100
- declare const NumberStepper: React__default.FC<NumberStepperProps>;
3344
+ declare function CraftingRecipe({ inputs, output, canCraft, onCraft, craftEvent, className, }: CraftingRecipeProps): react_jsx_runtime.JSX.Element;
3345
+ declare namespace CraftingRecipe {
3346
+ var displayName: string;
3347
+ }
3101
3348
 
3102
- type StarRatingSize = "sm" | "md" | "lg";
3103
- type StarRatingPrecision = "full" | "half";
3104
- interface StarRatingProps {
3105
- /** Current rating value */
3106
- value?: number;
3107
- /** Maximum number of stars */
3108
- max?: number;
3109
- /** Read-only display mode */
3110
- readOnly?: boolean;
3111
- /** Full or half-star precision */
3112
- precision?: StarRatingPrecision;
3113
- /** Star size */
3114
- size?: StarRatingSize;
3115
- /** Declarative event name for rating changes */
3116
- action?: string;
3117
- /** Payload to include with the action event */
3118
- actionPayload?: Record<string, unknown>;
3119
- /** Direct onChange callback */
3120
- onChange?: (value: number) => void;
3349
+ interface ActivePowerup {
3350
+ /** Unique powerup ID */
3351
+ id: string;
3352
+ /** Icon component or emoji */
3353
+ icon?: React$1.ReactNode;
3354
+ /** Powerup label */
3355
+ label: string;
3356
+ /** Remaining time in seconds */
3357
+ remainingTime?: number;
3358
+ }
3359
+ interface PowerupSlotsProps {
3360
+ /** Array of active powerups */
3361
+ active: ActivePowerup[];
3362
+ /** Maximum number of powerup slots */
3363
+ maxSlots?: number;
3121
3364
  /** Additional CSS classes */
3122
3365
  className?: string;
3123
- /** Accessible label */
3124
- label?: string;
3125
3366
  }
3126
- declare const StarRating: React__default.FC<StarRatingProps>;
3367
+ declare function PowerupSlots({ active, maxSlots, className, }: PowerupSlotsProps): react_jsx_runtime.JSX.Element;
3368
+ declare namespace PowerupSlots {
3369
+ var displayName: string;
3370
+ }
3127
3371
 
3128
- interface UploadDropZoneProps {
3129
- /** Accepted MIME types (e.g., "image/*", "application/pdf") */
3130
- accept?: string;
3131
- /** Max file size in bytes */
3132
- maxSize?: number;
3133
- /** Max number of files */
3134
- maxFiles?: number;
3135
- /** Label text */
3372
+ interface GameCanvas2DProps {
3373
+ /** Canvas width in pixels */
3374
+ width?: number;
3375
+ /** Canvas height in pixels */
3376
+ height?: number;
3377
+ /** Called each frame with the 2D context and current frame count */
3378
+ onDraw?: (ctx: CanvasRenderingContext2D, frame: number) => void;
3379
+ /** Called each tick with delta time in seconds */
3380
+ onTick?: (dt: number) => void;
3381
+ /** Target frames per second */
3382
+ fps?: number;
3383
+ /** Additional CSS classes */
3384
+ className?: string;
3385
+ }
3386
+ declare function GameCanvas2D({ width, height, onDraw, onTick, fps, className, }: GameCanvas2DProps): react_jsx_runtime.JSX.Element;
3387
+ declare namespace GameCanvas2D {
3388
+ var displayName: string;
3389
+ }
3390
+
3391
+ interface HealthPanelProps {
3392
+ /** Current health value */
3393
+ current: number;
3394
+ /** Maximum health value */
3395
+ max: number;
3396
+ /** Shield/armor points */
3397
+ shield?: number;
3398
+ /** Label shown above the bar */
3136
3399
  label?: string;
3137
- /** Description text below label */
3138
- description?: string;
3139
- /** Icon name (Lucide string) */
3140
- icon?: string;
3141
- /** Disabled state */
3142
- disabled?: boolean;
3143
- /** Declarative event name for file selection */
3144
- action?: string;
3145
- /** Payload to include with the action event */
3146
- actionPayload?: Record<string, unknown>;
3147
- /** Direct onFiles callback */
3148
- onFiles?: (files: File[]) => void;
3400
+ /** Active status effects displayed as small badges */
3401
+ effects?: {
3402
+ icon: React$1.ReactNode;
3403
+ label?: string;
3404
+ variant?: 'buff' | 'debuff' | 'neutral';
3405
+ }[];
3406
+ /** Whether to display numeric HP values */
3407
+ showNumbers?: boolean;
3408
+ /** Size variant */
3409
+ size?: 'sm' | 'md' | 'lg';
3149
3410
  /** Additional CSS classes */
3150
3411
  className?: string;
3151
3412
  }
3152
- declare const UploadDropZone: React__default.FC<UploadDropZoneProps>;
3413
+ declare function HealthPanel({ current, max, shield, label, effects, showNumbers, size, className, }: HealthPanelProps): react_jsx_runtime.JSX.Element;
3414
+ declare namespace HealthPanel {
3415
+ var displayName: string;
3416
+ }
3153
3417
 
3154
- interface LightboxImage {
3155
- src: string;
3156
- alt?: string;
3157
- caption?: string;
3418
+ interface ScoreBoardProps {
3419
+ /** Current score */
3420
+ score: number;
3421
+ /** All-time high score */
3422
+ highScore?: number;
3423
+ /** Current combo count */
3424
+ combo?: number;
3425
+ /** Score multiplier */
3426
+ multiplier?: number;
3427
+ /** Current level */
3428
+ level?: number;
3429
+ /** Additional CSS classes */
3430
+ className?: string;
3158
3431
  }
3159
- interface LightboxProps {
3160
- /** Array of images to display */
3161
- images: LightboxImage[];
3162
- /** Current image index */
3163
- currentIndex?: number;
3164
- /** Whether the lightbox is open */
3165
- isOpen?: boolean;
3166
- /** Show image counter (e.g., "3 of 12") */
3167
- showCounter?: boolean;
3168
- /** Declarative close event name */
3169
- closeAction?: string;
3170
- /** Direct onClose callback */
3171
- onClose?: () => void;
3172
- /** Direct onIndexChange callback */
3173
- onIndexChange?: (index: number) => void;
3432
+ declare function ScoreBoard({ score, highScore, combo, multiplier, level, className, }: ScoreBoardProps): react_jsx_runtime.JSX.Element;
3433
+ declare namespace ScoreBoard {
3434
+ var displayName: string;
3435
+ }
3436
+
3437
+ interface ResourceBarResource {
3438
+ /** Icon for the resource */
3439
+ icon?: React$1.ReactNode;
3440
+ /** Resource name */
3441
+ label: string;
3442
+ /** Current amount */
3443
+ value: number;
3444
+ /** Maximum amount (displays as bar if provided) */
3445
+ max?: number;
3446
+ }
3447
+ interface ResourceBarProps {
3448
+ /** Resources to display */
3449
+ resources: ResourceBarResource[];
3450
+ /** Size variant */
3451
+ size?: 'sm' | 'md' | 'lg';
3174
3452
  /** Additional CSS classes */
3175
3453
  className?: string;
3176
3454
  }
3177
- declare const Lightbox: React__default.FC<LightboxProps>;
3455
+ declare function ResourceBar({ resources, size, className, }: ResourceBarProps): react_jsx_runtime.JSX.Element;
3456
+ declare namespace ResourceBar {
3457
+ var displayName: string;
3458
+ }
3178
3459
 
3179
- /**
3180
- * DataGrid Molecule
3181
- *
3182
- * A simplified, schema-driven card grid for iterating over entity data.
3183
- * Extracted from the CardGrid organism with all complexity removed:
3184
- * no built-in search, sort, filter, pagination, selection, or bulk actions.
3185
- *
3186
- * Accepts `fields` config for per-field rendering control (icon, variant, format)
3187
- * and `itemActions` for per-item event bus wiring.
3188
- *
3189
- * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
3190
- */
3460
+ interface TurnPanelAction {
3461
+ /** Action button label */
3462
+ label: string;
3463
+ /** Icon for the button */
3464
+ icon?: React$1.ReactNode;
3465
+ /** Event name to emit when clicked */
3466
+ event?: string;
3467
+ /** Whether the action is disabled */
3468
+ disabled?: boolean;
3469
+ }
3470
+ interface TurnPanelProps {
3471
+ /** Current turn number */
3472
+ currentTurn: number;
3473
+ /** Maximum number of turns */
3474
+ maxTurns?: number;
3475
+ /** Current phase label */
3476
+ phase?: string;
3477
+ /** Active team name */
3478
+ activeTeam?: string;
3479
+ /** Action buttons to display */
3480
+ actions?: TurnPanelAction[];
3481
+ /** Additional CSS classes */
3482
+ className?: string;
3483
+ }
3484
+ declare function TurnPanel({ currentTurn, maxTurns, phase, activeTeam, actions, className, }: TurnPanelProps): react_jsx_runtime.JSX.Element;
3485
+ declare namespace TurnPanel {
3486
+ var displayName: string;
3487
+ }
3191
3488
 
3192
- interface DataGridField {
3193
- /** Entity field name (dot-notation supported) */
3194
- name: string;
3195
- /** Display label (auto-generated from name if omitted) */
3489
+ interface EnemyPlateEffect {
3490
+ /** Effect icon */
3491
+ icon: React$1.ReactNode;
3492
+ /** Effect label */
3196
3493
  label?: string;
3197
- /** Lucide icon name to show beside the field */
3198
- icon?: string;
3199
- /** Rendering variant: 'h3' for title, 'body' for text, 'caption' for small,
3200
- * 'badge' for status badge, 'progress' for progress display */
3201
- variant?: 'h3' | 'h4' | 'body' | 'caption' | 'badge' | 'small' | 'progress';
3202
- /** Optional format function name: 'date', 'currency', 'number', 'boolean' */
3203
- format?: 'date' | 'currency' | 'number' | 'boolean' | 'percent';
3494
+ /** Effect type */
3495
+ variant?: 'buff' | 'debuff' | 'neutral';
3204
3496
  }
3205
- interface DataGridItemAction {
3206
- /** Button label */
3497
+ interface EnemyPlateProps {
3498
+ /** Enemy name */
3499
+ name: string;
3500
+ /** Current health */
3501
+ health: number;
3502
+ /** Maximum health */
3503
+ maxHealth: number;
3504
+ /** Enemy level */
3505
+ level?: number;
3506
+ /** Active status effects */
3507
+ effects?: EnemyPlateEffect[];
3508
+ /** Additional CSS classes */
3509
+ className?: string;
3510
+ }
3511
+ declare function EnemyPlate({ name, health, maxHealth, level, effects, className, }: EnemyPlateProps): react_jsx_runtime.JSX.Element;
3512
+ declare namespace EnemyPlate {
3513
+ var displayName: string;
3514
+ }
3515
+
3516
+ interface UnitCommand {
3517
+ /** Command label */
3207
3518
  label: string;
3208
- /** Event name to emit (dispatched as UI:{event} with { row: itemData }) */
3209
- event: string;
3210
- /** Lucide icon name */
3211
- icon?: string;
3212
- /** Button variant */
3213
- variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
3519
+ /** Icon for the command button */
3520
+ icon?: React$1.ReactNode;
3521
+ /** Event name to emit when clicked */
3522
+ event?: string;
3523
+ /** Whether the command is disabled */
3524
+ disabled?: boolean;
3525
+ /** Keyboard shortcut hint */
3526
+ hotkey?: string;
3214
3527
  }
3215
- interface DataGridProps {
3216
- /** Entity data array */
3217
- entity?: unknown | readonly unknown[];
3218
- /** Field definitions for rendering each card */
3219
- fields?: readonly DataGridField[];
3220
- /** Alias for fields (compiler generates `columns` for field definitions) */
3221
- columns?: readonly DataGridField[];
3222
- /** Per-item action buttons */
3223
- itemActions?: readonly DataGridItemAction[];
3224
- /** Number of columns (uses auto-fit if omitted) */
3225
- cols?: 1 | 2 | 3 | 4 | 5 | 6;
3226
- /** Gap between cards */
3227
- gap?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
3228
- /** Minimum card width in pixels (used when cols is not set, default 280) */
3229
- minCardWidth?: number;
3528
+ interface UnitCommandBarProps {
3529
+ /** Available commands */
3530
+ commands: UnitCommand[];
3531
+ /** ID of the currently selected unit */
3532
+ selectedUnitId?: string;
3230
3533
  /** Additional CSS classes */
3231
3534
  className?: string;
3232
- /** Loading state */
3233
- isLoading?: boolean;
3234
- /** Error state */
3235
- error?: Error | null;
3236
- /** Entity field name containing an image URL for card thumbnails */
3237
- imageField?: string;
3238
- /** Enable multi-select with checkboxes */
3239
- selectable?: boolean;
3240
- /** Selection change event name (emits UI:{selectionEvent} with { selectedIds: string[] }) */
3241
- selectionEvent?: string;
3242
- /** Enable infinite scroll loading */
3243
- infiniteScroll?: boolean;
3244
- /** Event emitted when more items needed: UI:{loadMoreEvent} */
3245
- loadMoreEvent?: string;
3246
- /** Whether more items are available for infinite scroll */
3247
- hasMore?: boolean;
3248
3535
  }
3249
- declare const DataGrid: React__default.FC<DataGridProps>;
3536
+ declare function UnitCommandBar({ commands, selectedUnitId, className, }: UnitCommandBarProps): react_jsx_runtime.JSX.Element;
3537
+ declare namespace UnitCommandBar {
3538
+ var displayName: string;
3539
+ }
3250
3540
 
3541
+ interface GameHudStat extends Omit<StatBadgeProps, "size"> {
3542
+ /** Data source entity name */
3543
+ source?: string;
3544
+ /** Field name in the source */
3545
+ field?: string;
3546
+ }
3251
3547
  /**
3252
- * DataList Molecule
3253
- *
3254
- * A simplified, schema-driven list for iterating over entity data.
3255
- * Extracted from the List organism with all complexity removed:
3256
- * no built-in search, sort, filter, selection, bulk actions, or custom renderers.
3257
- *
3258
- * Accepts `fields` config for per-field rendering control (icon, variant, format)
3259
- * and `itemActions` for per-item event bus wiring.
3260
- *
3261
- * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
3548
+ * Schema-style HUD element definition.
3549
+ * Used when elements are passed from schema render_ui effects.
3262
3550
  */
3263
-
3264
- interface DataListField {
3265
- /** Entity field name (dot-notation supported) */
3266
- name: string;
3267
- /** Display label (auto-generated from name if omitted) */
3551
+ interface GameHudElement {
3552
+ type?: string;
3553
+ bind?: string;
3554
+ position?: string;
3268
3555
  label?: string;
3269
- /** Lucide icon name to show beside the field */
3270
- icon?: string;
3271
- /** Rendering variant: 'h3'/'h4' for title, 'body' for text, 'caption' for small,
3272
- * 'badge' for status badge, 'progress' for progress bar */
3273
- variant?: 'h3' | 'h4' | 'body' | 'caption' | 'badge' | 'small' | 'progress';
3274
- /** Optional format: 'date', 'currency', 'number', 'boolean', 'percent' */
3275
- format?: 'date' | 'currency' | 'number' | 'boolean' | 'percent';
3276
- }
3277
- interface DataListItemAction {
3278
- /** Button label */
3279
- label: string;
3280
- /** Event name to emit (dispatched as UI:{event} with { row: itemData }) */
3281
- event: string;
3282
- /** Lucide icon name */
3283
- icon?: string;
3284
- /** Button variant */
3285
- variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
3556
+ /** Direct value (from compiled render-ui effects) */
3557
+ value?: number | string;
3558
+ /** Icon name or node */
3559
+ icon?: React$1.ReactNode;
3560
+ /** Display format */
3561
+ format?: string;
3562
+ /** Max value (for bars/hearts) */
3563
+ max?: number;
3286
3564
  }
3287
- interface DataListProps {
3288
- /** Entity data array */
3289
- entity?: unknown | readonly unknown[];
3290
- /** Field definitions for rendering each row */
3291
- fields?: readonly DataListField[];
3292
- /** Alias for fields (compiler may generate `columns` for field definitions) */
3293
- columns?: readonly DataListField[];
3294
- /** Per-item action buttons */
3295
- itemActions?: readonly DataListItemAction[];
3296
- /** Gap between rows */
3297
- gap?: 'none' | 'sm' | 'md' | 'lg';
3298
- /** Visual variant */
3299
- variant?: 'default' | 'card' | 'compact' | 'message';
3300
- /** Group items by a field value (renders section headers between groups) */
3301
- groupBy?: string;
3302
- /** Field name identifying the sender (used with variant: "message") */
3303
- senderField?: string;
3304
- /** Current user identifier; messages matching this value align right (used with variant: "message") */
3305
- currentUser?: string;
3565
+ interface GameHudProps {
3566
+ /** Position of the HUD */
3567
+ position?: "top" | "bottom" | "corners" | string;
3568
+ /** Stats to display - accepts readonly for compatibility with generated const arrays */
3569
+ stats?: readonly GameHudStat[];
3570
+ /** Alias for stats (schema compatibility) */
3571
+ items?: readonly GameHudStat[];
3572
+ /**
3573
+ * Schema-style elements array (alternative to stats).
3574
+ * Converted to stats internally for backwards compatibility.
3575
+ */
3576
+ elements?: readonly GameHudElement[];
3577
+ /** Size variant */
3578
+ size?: "sm" | "md" | "lg";
3306
3579
  /** Additional CSS classes */
3307
3580
  className?: string;
3308
- /** Loading state */
3309
- isLoading?: boolean;
3310
- /** Error state */
3311
- error?: Error | null;
3312
- /** Enable drag-to-reorder with grip handles */
3313
- reorderable?: boolean;
3314
- /** Event emitted on reorder: UI:{reorderEvent} with { fromIndex, toIndex } */
3315
- reorderEvent?: string;
3316
- /** Event emitted on left swipe: UI:{swipeLeftEvent} with { row } */
3317
- swipeLeftEvent?: string;
3318
- /** Actions revealed on left swipe */
3319
- swipeLeftActions?: readonly {
3320
- label: string;
3321
- icon?: string;
3322
- variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
3323
- }[];
3324
- /** Event emitted on right swipe: UI:{swipeRightEvent} with { row } */
3325
- swipeRightEvent?: string;
3326
- /** Actions revealed on right swipe */
3327
- swipeRightActions?: readonly {
3328
- label: string;
3329
- icon?: string;
3330
- variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
3331
- }[];
3332
- /** Event emitted on long press: UI:{longPressEvent} with { row } */
3333
- longPressEvent?: string;
3334
- /** Enable infinite scroll loading */
3335
- infiniteScroll?: boolean;
3336
- /** Event emitted when more items needed: UI:{loadMoreEvent} */
3337
- loadMoreEvent?: string;
3338
- /** Whether more items are available for infinite scroll */
3339
- hasMore?: boolean;
3581
+ /** Whether to use a semi-transparent background */
3582
+ transparent?: boolean;
3583
+ }
3584
+ declare function GameHud({ position: propPosition, stats: propStats, items, elements, size, className, transparent, }: GameHudProps): react_jsx_runtime.JSX.Element;
3585
+ declare namespace GameHud {
3586
+ var displayName: string;
3340
3587
  }
3341
- declare const DataList: React__default.FC<DataListProps>;
3342
3588
 
3343
3589
  /**
3344
- * SwipeableRow Molecule
3590
+ * DialogueBox Component
3345
3591
  *
3346
- * Wraps a list item to reveal action buttons on horizontal swipe.
3347
- * Swipe left to reveal right actions, swipe right to reveal left actions.
3348
- * Uses useSwipeGesture for gesture detection and useEventBus for event emission.
3592
+ * NPC dialogue display with typewriter effect and choices.
3593
+ *
3594
+ * **State categories (closed-circuit compliant):**
3595
+ * - Content (dialogue node, speaker, text, choices) → received via props
3596
+ * - UI-transient animation (displayedText, isTyping, charIndex, selectedChoice) → local only
3597
+ * - Events → emitted via `useEventBus()` (complete, choice, advance)
3598
+ *
3599
+ * Local state is typewriter animation only — an inherently rendering-only
3600
+ * concern analogous to Form's `formData`.
3349
3601
  */
3350
3602
 
3351
- interface SwipeAction {
3352
- label: string;
3353
- icon?: string;
3354
- variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
3355
- event: string;
3356
- eventPayload?: Record<string, unknown>;
3603
+ interface DialogueChoice {
3604
+ text: string;
3605
+ action?: string;
3606
+ next?: string;
3607
+ disabled?: boolean;
3357
3608
  }
3358
- interface SwipeableRowProps {
3359
- leftActions?: SwipeAction[];
3360
- rightActions?: SwipeAction[];
3361
- threshold?: number;
3362
- children: React__default.ReactNode;
3363
- itemData?: Record<string, unknown>;
3364
- className?: string;
3609
+ interface DialogueNode {
3610
+ id?: string;
3611
+ speaker: string;
3612
+ text: string;
3613
+ portrait?: string;
3614
+ choices?: DialogueChoice[];
3615
+ autoAdvance?: number;
3365
3616
  }
3366
- declare const SwipeableRow: React__default.FC<SwipeableRowProps>;
3367
-
3368
- /**
3369
- * SortableList Molecule
3370
- *
3371
- * A list where items can be dragged to reorder via drag handles.
3372
- * Uses useDragReorder for drag state management and useEventBus for event emission.
3373
- * Shows a drop indicator line at the target position during drag.
3617
+ /** Event Contract:
3618
+ * Emits: UI:COMPLETE
3619
+ * Emits: UI:CHOICE
3620
+ * Emits: UI:ADVANCE
3374
3621
  */
3375
-
3376
- interface SortableListProps<T = Record<string, unknown>> {
3377
- items: T[];
3378
- renderItem: (item: T, index: number) => React__default.ReactNode;
3379
- reorderEvent: string;
3380
- reorderPayload?: Record<string, unknown>;
3381
- dragHandlePosition?: 'left' | 'right';
3622
+ interface DialogueBoxProps {
3623
+ /** Current dialogue node to display */
3624
+ dialogue: DialogueNode;
3625
+ /** Typewriter speed in ms per character (0 = instant) */
3626
+ typewriterSpeed?: number;
3627
+ /** Position of dialogue box */
3628
+ position?: 'top' | 'bottom';
3629
+ /** Called when text animation completes */
3630
+ onComplete?: () => void;
3631
+ /** Called when a choice is selected */
3632
+ onChoice?: (choice: DialogueChoice) => void;
3633
+ /** Called when dialogue is advanced (no choices) */
3634
+ onAdvance?: () => void;
3635
+ /** Declarative event: emits UI:{completeEvent} when text animation completes */
3636
+ completeEvent?: string;
3637
+ /** Declarative event: emits UI:{choiceEvent} with { choice } when a choice is selected */
3638
+ choiceEvent?: string;
3639
+ /** Declarative event: emits UI:{advanceEvent} when dialogue is advanced */
3640
+ advanceEvent?: string;
3641
+ /** Optional className */
3382
3642
  className?: string;
3383
3643
  }
3384
- declare const SortableList: <T = Record<string, unknown>>(props: SortableListProps<T>) => React__default.ReactElement;
3385
-
3386
3644
  /**
3387
- * Carousel Molecule Component
3645
+ * Dialogue box component with typewriter effect
3388
3646
  *
3389
- * Horizontal scrolling container with snap points, swipe gestures,
3390
- * prev/next arrow buttons, and dot indicators.
3391
- * Pure UI molecule with no entity binding.
3647
+ * @example
3648
+ * ```tsx
3649
+ * <DialogueBox
3650
+ * dialogue={{
3651
+ * speaker: "Old Man",
3652
+ * text: "It's dangerous to go alone! Take this.",
3653
+ * portrait: "/portraits/oldman.png",
3654
+ * choices: [
3655
+ * { text: "Thank you!", action: "ACCEPT_ITEM" },
3656
+ * { text: "No thanks", next: "decline_node" }
3657
+ * ]
3658
+ * }}
3659
+ * typewriterSpeed={30}
3660
+ * onChoice={(choice) => handleChoice(choice)}
3661
+ * position="bottom"
3662
+ * />
3663
+ * ```
3392
3664
  */
3393
-
3394
- interface CarouselProps<T = Record<string, unknown>> {
3395
- /** Array of items to display as slides */
3396
- items: T[];
3397
- /** Render function for each slide */
3398
- renderItem: (item: T, index: number) => React__default.ReactNode;
3399
- /** Enable auto-play rotation */
3400
- autoPlay?: boolean;
3401
- /** Auto-play interval in milliseconds (default: 5000) */
3402
- autoPlayInterval?: number;
3403
- /** Show dot indicators */
3404
- showDots?: boolean;
3405
- /** Show prev/next arrow buttons */
3406
- showArrows?: boolean;
3407
- /** Enable infinite loop */
3408
- loop?: boolean;
3409
- /** Declarative event name for slide change */
3410
- slideChangeEvent?: string;
3411
- /** Payload to include with the slide change event */
3412
- slideChangePayload?: Record<string, unknown>;
3413
- /** Additional CSS classes */
3414
- className?: string;
3415
- }
3416
- declare const Carousel: <T = Record<string, unknown>>({ items, renderItem, autoPlay, autoPlayInterval, showDots, showArrows, loop, slideChangeEvent, slideChangePayload, className, }: CarouselProps<T>) => React__default.ReactElement | null;
3665
+ declare function DialogueBox({ dialogue, typewriterSpeed, position, onComplete, onChoice, onAdvance, completeEvent, choiceEvent, advanceEvent, className, }: DialogueBoxProps): React__default.JSX.Element;
3417
3666
 
3418
3667
  /**
3419
- * PullToRefresh Molecule Component
3668
+ * CombatLog Component
3420
3669
  *
3421
- * Wrapper that adds pull-to-refresh gesture to children.
3422
- * Shows a spinner indicator as the user pulls down, and emits
3423
- * a refresh event via the event bus when the threshold is met.
3670
+ * Scrollable log of combat events with icons and colors.
3671
+ * Generalized from Trait Wars removed asset manifest coupling.
3424
3672
  */
3425
3673
 
3426
- interface PullToRefreshProps {
3427
- /** Event name to emit on refresh (emitted as UI:{refreshEvent}) */
3428
- refreshEvent: string;
3429
- /** Payload to include with the refresh event */
3430
- refreshPayload?: Record<string, unknown>;
3431
- /** Pull distance threshold to trigger refresh in px (default: 60) */
3432
- threshold?: number;
3433
- /** Content to wrap */
3434
- children: React__default.ReactNode;
3435
- /** Additional CSS classes */
3674
+ type CombatLogEventType = 'attack' | 'defend' | 'heal' | 'move' | 'special' | 'death' | 'spawn';
3675
+ interface CombatEvent {
3676
+ id: string;
3677
+ type: CombatLogEventType;
3678
+ message: string;
3679
+ timestamp: number;
3680
+ actorName?: string;
3681
+ targetName?: string;
3682
+ value?: number;
3683
+ turn?: number;
3684
+ }
3685
+ interface CombatLogProps {
3686
+ events: CombatEvent[];
3687
+ maxVisible?: number;
3688
+ autoScroll?: boolean;
3689
+ showTimestamps?: boolean;
3690
+ title?: string;
3436
3691
  className?: string;
3437
3692
  }
3438
- declare const PullToRefresh: React__default.FC<PullToRefreshProps>;
3693
+ declare function CombatLog({ events, maxVisible, autoScroll, showTimestamps, className, title, }: CombatLogProps): React__default.JSX.Element;
3694
+ declare namespace CombatLog {
3695
+ var displayName: string;
3696
+ }
3439
3697
 
3440
3698
  /**
3441
- * Shared types for entity-display organisms.
3699
+ * InventoryPanel Component
3442
3700
  *
3443
- * All entity-display organisms (DataTable, List, Table, CardGrid, DetailPanel)
3444
- * extend EntityDisplayProps to guarantee a uniform prop contract.
3701
+ * Grid-based inventory UI with item selection and tooltips.
3445
3702
  *
3446
- * Exception: Form manages local `formData` state for field input tracking.
3447
- * This is the ONE allowed exception documented here.
3703
+ * **State categories (closed-circuit compliant):**
3704
+ * - Data (items, slots, selectedSlot) received via props
3705
+ * - UI-transient (hoveredSlot, tooltipPosition) → local only
3706
+ * - Events → emitted via `useEventBus()` (selectSlot, useItem, dropItem)
3707
+ *
3708
+ * Local state is hover/tooltip only — rendering-only concerns.
3448
3709
  */
3449
- declare const EntityDisplayEvents: {
3450
- readonly SORT: "SORT";
3451
- readonly PAGINATE: "PAGINATE";
3452
- readonly SEARCH: "SEARCH";
3453
- readonly FILTER: "FILTER";
3454
- readonly CLEAR_FILTERS: "CLEAR_FILTERS";
3455
- readonly SELECT: "SELECT";
3456
- readonly DESELECT: "DESELECT";
3457
- };
3458
- interface SortPayload {
3459
- field: string;
3460
- direction: 'asc' | 'desc';
3461
- }
3462
- interface PaginatePayload {
3463
- page: number;
3464
- pageSize?: number;
3465
- }
3466
- interface SearchPayload {
3467
- query: string;
3710
+
3711
+ interface InventoryItem {
3712
+ id: string;
3713
+ type: string;
3714
+ quantity: number;
3715
+ sprite?: string;
3716
+ name?: string;
3717
+ description?: string;
3468
3718
  }
3469
- interface FilterPayload {
3470
- field: string;
3471
- operator: string;
3472
- value: unknown;
3719
+ interface InventoryPanelProps {
3720
+ /** Array of items in inventory */
3721
+ items: InventoryItem[];
3722
+ /** Total number of slots */
3723
+ slots: number;
3724
+ /** Number of columns in grid */
3725
+ columns: number;
3726
+ /** Currently selected slot index */
3727
+ selectedSlot?: number;
3728
+ /** Called when a slot is selected */
3729
+ onSelectSlot?: (index: number) => void;
3730
+ /** Called when an item is used (double-click or Enter) */
3731
+ onUseItem?: (item: InventoryItem) => void;
3732
+ /** Called when an item is dropped */
3733
+ onDropItem?: (item: InventoryItem) => void;
3734
+ /** Declarative event: emits UI:{selectSlotEvent} with { index } when a slot is selected */
3735
+ selectSlotEvent?: string;
3736
+ /** Declarative event: emits UI:{useItemEvent} with { item } when an item is used */
3737
+ useItemEvent?: string;
3738
+ /** Declarative event: emits UI:{dropItemEvent} with { item } when an item is dropped */
3739
+ dropItemEvent?: string;
3740
+ /** Show item tooltips on hover */
3741
+ showTooltips?: boolean;
3742
+ /** Optional className */
3743
+ className?: string;
3744
+ /** Slot size in pixels */
3745
+ slotSize?: number;
3473
3746
  }
3474
- interface SelectPayload {
3475
- ids: (string | number)[];
3747
+ /**
3748
+ * Inventory panel component with grid layout
3749
+ *
3750
+ * @example
3751
+ * ```tsx
3752
+ * <InventoryPanel
3753
+ * items={playerInventory}
3754
+ * slots={20}
3755
+ * columns={5}
3756
+ * selectedSlot={selectedSlot}
3757
+ * onSelectSlot={setSelectedSlot}
3758
+ * onUseItem={(item) => console.log('Used:', item.name)}
3759
+ * showTooltips
3760
+ * />
3761
+ * ```
3762
+ */
3763
+ declare function InventoryPanel({ items, slots, columns, selectedSlot, onSelectSlot, onUseItem, onDropItem, selectSlotEvent, useItemEvent, dropItemEvent, showTooltips, className, slotSize, }: InventoryPanelProps): React__default.JSX.Element;
3764
+
3765
+ interface MenuOption {
3766
+ /** Optional ID (generated from index if not provided) */
3767
+ id?: string;
3768
+ /** Display label */
3769
+ label: string;
3770
+ /** Event to emit on click */
3771
+ event?: string;
3772
+ /** Page to navigate to */
3773
+ navigatesTo?: string;
3774
+ /** Button variant */
3775
+ variant?: "primary" | "secondary" | "ghost" | string;
3776
+ /** Whether the option is disabled */
3777
+ disabled?: boolean;
3778
+ /** Sub-label or description */
3779
+ subLabel?: string;
3780
+ /** Action identifier (alternative to event) */
3781
+ action?: string;
3476
3782
  }
3477
- interface EntityDisplayProps<T = unknown> {
3478
- /** Entity name (string) or data injected by the runtime (array for lists, single object for detail) */
3479
- entity?: string | T | readonly T[];
3783
+ interface GameMenuProps {
3784
+ /** Menu title */
3785
+ title: string;
3786
+ /** Optional subtitle or version */
3787
+ subtitle?: string;
3788
+ /** Menu options - accepts readonly for compatibility with generated const arrays */
3789
+ options?: readonly MenuOption[];
3790
+ /** Alias for options (schema compatibility) */
3791
+ menuItems?: readonly MenuOption[];
3792
+ /** Called when an option is selected (legacy callback, prefer event bus) */
3793
+ onSelect?: (option: MenuOption) => void;
3794
+ /** Event bus for emitting UI events (optional, uses hook if not provided) */
3795
+ eventBus?: EventBusContextType;
3796
+ /** Background image or gradient */
3797
+ background?: string;
3798
+ /** Logo image URL */
3799
+ logo?: string;
3480
3800
  /** Additional CSS classes */
3481
3801
  className?: string;
3482
- /** Loading state indicator */
3483
- isLoading?: boolean;
3484
- /** Error state */
3485
- error?: Error | null;
3486
- /** Current sort field */
3487
- sortBy?: string;
3488
- /** Current sort direction */
3489
- sortDirection?: 'asc' | 'desc';
3490
- /** Current search query value */
3491
- searchValue?: string;
3492
- /** Current page number (1-indexed) */
3493
- page?: number;
3494
- /** Number of items per page */
3495
- pageSize?: number;
3496
- /** Total number of items (for pagination display) */
3497
- totalCount?: number;
3498
- /** Active filters */
3499
- activeFilters?: Record<string, unknown>;
3500
- /** Currently selected item IDs */
3501
- selectedIds?: readonly (string | number)[];
3802
+ }
3803
+ declare function GameMenu({ title, subtitle, options, menuItems, onSelect, eventBus: eventBusProp, background, logo, className, }: GameMenuProps): react_jsx_runtime.JSX.Element;
3804
+ declare namespace GameMenu {
3805
+ var displayName: string;
3502
3806
  }
3503
3807
 
3504
- interface Column<T> {
3505
- key: keyof T | string;
3506
- header: string;
3507
- /** Alias for key (used by compiler-generated fields) */
3508
- name?: string;
3509
- /** Alias for header (used by compiler-generated fields) */
3510
- label?: string;
3511
- width?: string;
3512
- sortable?: boolean;
3513
- render?: (value: unknown, row: T, index: number) => React__default.ReactNode;
3808
+ interface GameOverStat {
3809
+ /** Stat label */
3810
+ label: string;
3811
+ /** Stat value (required if bind is not provided) */
3812
+ value?: number | string;
3813
+ /**
3814
+ * Schema-style data binding (e.g., "player.score").
3815
+ * Alternative to value - used when stats come from schema render_ui effects.
3816
+ * Component will display 0 as placeholder since runtime binding is not implemented.
3817
+ */
3818
+ bind?: string;
3819
+ /** Display format */
3820
+ format?: "number" | "time" | "text";
3821
+ /** Icon */
3822
+ icon?: React$1.ReactNode;
3514
3823
  }
3515
- interface RowAction<T> {
3824
+ interface GameOverAction {
3825
+ /** Display label */
3516
3826
  label: string;
3517
- icon?: LucideIcon;
3518
- onClick: (row: T) => void;
3519
- variant?: "default" | "danger";
3520
- show?: (row: T) => boolean;
3827
+ /** Event to emit on click */
3521
3828
  event?: string;
3829
+ /** Page to navigate to */
3830
+ navigatesTo?: string;
3831
+ /** Button variant */
3832
+ variant?: "primary" | "secondary" | "ghost";
3522
3833
  }
3523
- interface DataTableProps<T extends {
3524
- id: string | number;
3525
- }> extends EntityDisplayProps<T> {
3526
- /** Fields to display - accepts string[] or Column[] for unified interface. Alias for columns */
3527
- fields: readonly Column<T>[] | readonly string[];
3528
- /** Columns can be Column objects or simple string field names */
3529
- columns?: readonly Column<T>[] | readonly string[];
3530
- /** Item actions from generated code - maps to rowActions */
3531
- itemActions?: readonly {
3532
- label: string;
3533
- event?: string;
3534
- navigatesTo?: string;
3535
- action?: string;
3536
- placement?: "row" | "bulk" | string;
3537
- icon?: LucideIcon;
3538
- variant?: "default" | "primary" | "secondary" | "ghost" | "danger" | string;
3539
- onClick?: (row: T) => void;
3540
- }[];
3541
- emptyIcon?: LucideIcon;
3542
- emptyTitle?: string;
3543
- emptyDescription?: string;
3544
- emptyAction?: {
3545
- label: string;
3546
- event?: string;
3547
- };
3548
- selectable?: boolean;
3549
- searchable?: boolean;
3550
- searchPlaceholder?: string;
3551
- rowActions?: readonly RowAction<T>[];
3552
- bulkActions?: ReadonlyArray<{
3553
- label: string;
3554
- icon?: LucideIcon;
3555
- onClick: (selectedRows: T[]) => void;
3556
- variant?: "default" | "danger";
3557
- }>;
3558
- headerActions?: React__default.ReactNode;
3559
- /** Show total count in pagination */
3560
- showTotal?: boolean;
3834
+ interface GameOverScreenProps {
3835
+ /** Screen title (e.g., "Game Over", "Victory!") */
3836
+ title: string;
3837
+ /** Optional message */
3838
+ message?: string;
3839
+ /** Stats to display */
3840
+ stats?: GameOverStat[];
3841
+ /** Action buttons */
3842
+ actions?: GameOverAction[];
3843
+ /** Alias for actions (schema compatibility) */
3844
+ menuItems?: GameOverAction[];
3845
+ /** Called when an action is selected (legacy callback, prefer event bus) */
3846
+ onAction?: (action: GameOverAction) => void;
3847
+ /** Event bus for emitting UI events (optional, uses hook if not provided) */
3848
+ eventBus?: EventBusContextType;
3849
+ /** Victory or defeat variant */
3850
+ variant?: "victory" | "defeat" | "neutral";
3851
+ /** High score (optional, shows "NEW HIGH SCORE!" if exceeded) */
3852
+ highScore?: number | string;
3853
+ /** Current score for high score comparison (accepts string for schema bindings) */
3854
+ currentScore?: number | string;
3855
+ /** Additional CSS classes */
3856
+ className?: string;
3561
3857
  }
3562
- declare function DataTable<T extends {
3563
- id: string | number;
3564
- }>({ fields, columns, entity, itemActions, isLoading, error, emptyIcon, emptyTitle, emptyDescription, emptyAction, selectable, selectedIds, sortBy, sortDirection, searchable, searchValue, searchPlaceholder, page, pageSize, totalCount, rowActions: externalRowActions, bulkActions, headerActions, showTotal, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
3565
- declare namespace DataTable {
3858
+ declare function GameOverScreen({ title, message, stats, actions, menuItems, onAction, eventBus: eventBusProp, variant, highScore, currentScore, className, }: GameOverScreenProps): react_jsx_runtime.JSX.Element;
3859
+ declare namespace GameOverScreen {
3566
3860
  var displayName: string;
3567
3861
  }
3568
3862
 
3569
- /**
3570
- * Schema metric definition
3571
- * Supports both computed metrics (with field) and static metrics (with value)
3572
- */
3573
- interface MetricDefinition {
3863
+ interface PlatformerPlatform {
3864
+ x: number;
3865
+ y: number;
3866
+ width: number;
3867
+ height: number;
3868
+ type?: 'ground' | 'platform' | 'hazard' | 'goal';
3869
+ }
3870
+ interface PlatformerPlayer {
3871
+ x: number;
3872
+ y: number;
3873
+ width?: number;
3874
+ height?: number;
3875
+ vx?: number;
3876
+ vy?: number;
3877
+ grounded?: boolean;
3878
+ facingRight?: boolean;
3879
+ }
3880
+ interface PlatformerCanvasProps {
3881
+ /** Player state data */
3882
+ player?: PlatformerPlayer;
3883
+ /** Static platforms / level geometry */
3884
+ platforms?: readonly PlatformerPlatform[];
3885
+ /** World dimensions */
3886
+ worldWidth?: number;
3887
+ worldHeight?: number;
3888
+ /** Canvas display size */
3889
+ canvasWidth?: number;
3890
+ canvasHeight?: number;
3891
+ /** Camera follows player */
3892
+ followCamera?: boolean;
3893
+ /** Background color */
3894
+ bgColor?: string;
3895
+ /** Player sprite image URL */
3896
+ playerSprite?: string;
3897
+ /** Map of platform type to tile sprite URL */
3898
+ tileSprites?: Record<string, string>;
3899
+ /** Background image URL */
3900
+ backgroundImage?: string;
3901
+ /** Base URL prefix for asset URLs */
3902
+ assetBaseUrl?: string;
3903
+ /** Event names for keyboard controls */
3904
+ leftEvent?: string;
3905
+ rightEvent?: string;
3906
+ jumpEvent?: string;
3907
+ stopEvent?: string;
3908
+ /** Additional CSS classes */
3909
+ className?: string;
3910
+ }
3911
+ declare function PlatformerCanvas({ player, platforms, worldWidth, worldHeight, canvasWidth, canvasHeight, followCamera, bgColor, playerSprite, tileSprites, backgroundImage, assetBaseUrl, leftEvent, rightEvent, jumpEvent, stopEvent, className, }: PlatformerCanvasProps): react_jsx_runtime.JSX.Element;
3912
+ declare namespace PlatformerCanvas {
3913
+ var displayName: string;
3914
+ }
3915
+
3916
+ /**
3917
+ * Sprite Sheet Animation Types
3918
+ *
3919
+ * Type definitions for frame-based sprite sheet animation system.
3920
+ * Supports standard 8-column × 5-row character sheets.
3921
+ *
3922
+ * @packageDocumentation
3923
+ */
3924
+ /** Animation names matching sprite sheet row layout */
3925
+ type AnimationName = 'idle' | 'walk' | 'attack' | 'hit' | 'death';
3926
+ /** Sheet file directions (physical PNG files) */
3927
+ type SpriteDirection = 'se' | 'sw';
3928
+ /** Unit facing direction on screen (4 isometric directions) */
3929
+ type FacingDirection = 'se' | 'sw' | 'ne' | 'nw';
3930
+ /** Definition for a single animation row in the sprite sheet */
3931
+ interface AnimationDef {
3932
+ /** Row index in the sprite sheet (0-4) */
3933
+ row: number;
3934
+ /** Number of frames in this animation */
3935
+ frames: number;
3936
+ /** Frames per second */
3937
+ frameRate: number;
3938
+ /** Whether the animation loops */
3939
+ loop: boolean;
3940
+ }
3941
+ /** A resolved frame ready to draw on canvas */
3942
+ interface ResolvedFrame {
3943
+ /** URL of the sprite sheet image */
3944
+ sheetUrl: string;
3945
+ /** Source X in the sheet (pixel offset) */
3946
+ sx: number;
3947
+ /** Source Y in the sheet (pixel offset) */
3948
+ sy: number;
3949
+ /** Source width (frame width) */
3950
+ sw: number;
3951
+ /** Source height (frame height) */
3952
+ sh: number;
3953
+ /** Whether to flip horizontally when drawing (for NE/NW directions) */
3954
+ flipX: boolean;
3955
+ /** When true, canvas should apply sine-bob breathing offset (frozen idle frame) */
3956
+ applyBreathing?: boolean;
3957
+ }
3958
+ /** Per-unit animation state tracked in the animation system */
3959
+ interface UnitAnimationState {
3960
+ /** Unit identifier */
3961
+ unitId: string;
3962
+ /** Current animation playing */
3963
+ animation: AnimationName;
3964
+ /** Current facing direction */
3965
+ direction: FacingDirection;
3966
+ /** Current frame index within the animation */
3967
+ frame: number;
3968
+ /** Elapsed time in current animation (ms) */
3969
+ elapsed: number;
3970
+ /** Animation to play after current one-shot completes (null = idle) */
3971
+ queuedAnimation: AnimationName | null;
3972
+ /** Whether the current one-shot animation has finished its last frame */
3973
+ finished: boolean;
3974
+ }
3975
+ /** Frame dimensions for a sprite sheet */
3976
+ interface SpriteFrameDims {
3977
+ /** Width of a single frame in pixels */
3978
+ width: number;
3979
+ /** Height of a single frame in pixels */
3980
+ height: number;
3981
+ }
3982
+ /** Sheet URLs for both directions */
3983
+ interface SpriteSheetUrls {
3984
+ /** Southeast-facing sheet URL */
3985
+ se: string;
3986
+ /** Southwest-facing sheet URL */
3987
+ sw: string;
3988
+ }
3989
+
3990
+ /**
3991
+ * IsometricCanvas
3992
+ *
3993
+ * Core isometric game renderer. Maps to the `game-canvas` pattern.
3994
+ * Adapted from projects/trait-wars/design-system/organisms/IsometricGameCanvas.tsx
3995
+ * with full closed-circuit pattern compliance (className, isLoading, error).
3996
+ *
3997
+ * Architecture:
3998
+ * - 2:1 diamond isometric projection
3999
+ * - Painter's algorithm (tile → feature → unit depth sort)
4000
+ * - Camera pan/zoom with lerp
4001
+ * - Off-screen culling
4002
+ * - Minimap on separate canvas
4003
+ * - Sprite sheet animation via resolveUnitFrame
4004
+ * - Event bus–friendly handlers (onTileClick, onUnitClick, etc.)
4005
+ *
4006
+ * **State categories (closed-circuit compliant):**
4007
+ * - All game data (tiles, units, features, selection, validMoves) → received via props
4008
+ * - Rendering state (viewportSize, RAF, camera lerp, sprite cache) → local only
4009
+ * - Events → emitted via `useEventBus()` for trait integration
4010
+ *
4011
+ * This component is a **pure renderer** — it holds no game logic state.
4012
+ *
4013
+ * @packageDocumentation
4014
+ */
4015
+
4016
+ /** Event Contract:
4017
+ * Emits: UI:TILE_CLICK
4018
+ * Emits: UI:UNIT_CLICK
4019
+ * Emits: UI:TILE_HOVER
4020
+ * Emits: UI:TILE_LEAVE
4021
+ */
4022
+ interface IsometricCanvasProps {
4023
+ /** Additional CSS classes */
4024
+ className?: string;
4025
+ /** Loading state indicator */
4026
+ isLoading?: boolean;
4027
+ /** Error state */
4028
+ error?: Error | null;
4029
+ /** Array of tiles to render */
4030
+ tiles?: IsometricTile[];
4031
+ /** Array of units on the board */
4032
+ units?: IsometricUnit[];
4033
+ /** Array of features (resources, portals, buildings, etc.) */
4034
+ features?: IsometricFeature[];
4035
+ /** Currently selected unit ID */
4036
+ selectedUnitId?: string | null;
4037
+ /** Valid move positions (shown as pulsing green highlights) */
4038
+ validMoves?: Array<{
4039
+ x: number;
4040
+ y: number;
4041
+ }>;
4042
+ /** Attack target positions (shown as pulsing red highlights) */
4043
+ attackTargets?: Array<{
4044
+ x: number;
4045
+ y: number;
4046
+ }>;
4047
+ /** Hovered tile position */
4048
+ hoveredTile?: {
4049
+ x: number;
4050
+ y: number;
4051
+ } | null;
4052
+ onTileClick?: (x: number, y: number) => void;
4053
+ onUnitClick?: (unitId: string) => void;
4054
+ onTileHover?: (x: number, y: number) => void;
4055
+ onTileLeave?: () => void;
4056
+ /** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
4057
+ tileClickEvent?: string;
4058
+ /** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
4059
+ unitClickEvent?: string;
4060
+ /** Declarative event: emits UI:{tileHoverEvent} with { x, y } on tile hover */
4061
+ tileHoverEvent?: string;
4062
+ /** Declarative event: emits UI:{tileLeaveEvent} with {} on tile leave */
4063
+ tileLeaveEvent?: string;
4064
+ /** Render scale (0.4 = 40% zoom) */
4065
+ scale?: number;
4066
+ /** Show debug grid lines and coordinates */
4067
+ debug?: boolean;
4068
+ /** Background image URL tiled behind the isometric grid */
4069
+ backgroundImage?: string;
4070
+ /** Toggle minimap overlay */
4071
+ showMinimap?: boolean;
4072
+ /** Enable camera pan/zoom controls */
4073
+ enableCamera?: boolean;
4074
+ /** Extra scale multiplier for unit draw size. 1 = default. */
4075
+ unitScale?: number;
4076
+ /** Board width in tiles (overrides tile-derived size) */
4077
+ boardWidth?: number;
4078
+ /** Board height in tiles (overrides tile-derived size) */
4079
+ boardHeight?: number;
4080
+ /** Override for the diamond-top Y offset within the tile sprite (default: 374).
4081
+ * This controls where the flat diamond face sits vertically inside the tile image. */
4082
+ diamondTopY?: number;
4083
+ /** Resolve terrain sprite URL from terrain key */
4084
+ getTerrainSprite?: (terrain: string) => string | undefined;
4085
+ /** Resolve feature sprite URL from feature type key */
4086
+ getFeatureSprite?: (featureType: string) => string | undefined;
4087
+ /** Resolve unit static sprite URL */
4088
+ getUnitSprite?: (unit: IsometricUnit) => string | undefined;
4089
+ /** Resolve animated sprite sheet frame for a unit */
4090
+ resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
4091
+ /** Additional sprite URLs to preload (e.g., effect sprites) */
4092
+ effectSpriteUrls?: string[];
4093
+ /** Callback to draw canvas effects after units (canvas-specific: cannot be declarative) */
4094
+ onDrawEffects?: (ctx: CanvasRenderingContext2D, animTime: number, getImage: (url: string) => HTMLImageElement | undefined) => void;
4095
+ /** Whether there are active effects — keeps RAF loop alive */
4096
+ hasActiveEffects?: boolean;
4097
+ /** Base URL for remote asset resolution. When set, manifest paths
4098
+ * are prefixed with this URL. Example: "https://trait-wars-assets.web.app" */
4099
+ assetBaseUrl?: string;
4100
+ /** Manifest mapping entity keys to relative sprite paths.
4101
+ * Combined with assetBaseUrl to produce full URLs.
4102
+ * Used as a fallback when inline URLs and callbacks don't resolve. */
4103
+ assetManifest?: {
4104
+ terrains?: Record<string, string>;
4105
+ units?: Record<string, string>;
4106
+ features?: Record<string, string>;
4107
+ effects?: Record<string, string>;
4108
+ };
4109
+ }
4110
+ declare function IsometricCanvas({ className, isLoading, error, tiles: tilesProp, units, features, selectedUnitId, validMoves, attackTargets, hoveredTile, onTileClick, onUnitClick, onTileHover, onTileLeave, tileClickEvent, unitClickEvent, tileHoverEvent, tileLeaveEvent, scale, debug, backgroundImage, showMinimap, enableCamera, unitScale, getTerrainSprite, getFeatureSprite, getUnitSprite, resolveUnitFrame, effectSpriteUrls, onDrawEffects, hasActiveEffects, diamondTopY: diamondTopYProp, assetBaseUrl, assetManifest, }: IsometricCanvasProps): React$1.JSX.Element;
4111
+ declare namespace IsometricCanvas {
4112
+ var displayName: string;
4113
+ }
4114
+
4115
+ /**
4116
+ * GraphView Molecule Component
4117
+ *
4118
+ * Pure presentational force-directed graph visualization using SVG.
4119
+ * Entity-less, no event bus, no translations. Accepts raw nodes and edges.
4120
+ *
4121
+ * Uses a simple force simulation (repulsion + attraction + centering)
4122
+ * to lay out nodes, then renders via SVG circles and lines.
4123
+ */
4124
+
4125
+ interface GraphViewNode {
4126
+ id: string;
4127
+ label?: string;
4128
+ color?: string;
4129
+ size?: number;
4130
+ group?: string;
4131
+ }
4132
+ interface GraphViewEdge {
4133
+ source: string;
4134
+ target: string;
4135
+ color?: string;
4136
+ label?: string;
4137
+ }
4138
+ interface GraphViewProps {
4139
+ /** Graph nodes */
4140
+ nodes: GraphViewNode[];
4141
+ /** Graph edges */
4142
+ edges: GraphViewEdge[];
4143
+ /** Callback when a node is clicked */
4144
+ onNodeClick?: (node: GraphViewNode) => void;
4145
+ /** Callback when a node is hovered (null on leave) */
4146
+ onNodeHover?: (node: GraphViewNode | null) => void;
4147
+ /** Width in pixels */
4148
+ width?: number;
4149
+ /** Height in pixels */
4150
+ height?: number;
4151
+ /** Additional CSS classes */
4152
+ className?: string;
4153
+ /** Show node labels (default true) */
4154
+ showLabels?: boolean;
4155
+ /** Auto zoom-to-fit after layout settles (default true) */
4156
+ zoomToFit?: boolean;
4157
+ }
4158
+ declare const GraphView: React__default.FC<GraphViewProps>;
4159
+
4160
+ interface MapMarkerData {
4161
+ /** Unique marker identifier */
4162
+ id: string | number;
4163
+ /** Latitude */
4164
+ lat: number;
4165
+ /** Longitude */
4166
+ lng: number;
4167
+ /** Label shown in popup */
4168
+ label?: string;
4169
+ /** Optional category for styling */
4170
+ category?: string;
4171
+ }
4172
+ interface MapViewProps {
4173
+ /** Array of markers to display */
4174
+ markers?: MapMarkerData[];
4175
+ /** Map center latitude */
4176
+ centerLat?: number;
4177
+ /** Map center longitude */
4178
+ centerLng?: number;
4179
+ /** Zoom level (1-18, default 13) */
4180
+ zoom?: number;
4181
+ /** Height of the map container (default "400px") */
4182
+ height?: string;
4183
+ /** Callback when a marker is clicked (programmatic use) */
4184
+ onMarkerClick?: (marker: MapMarkerData) => void;
4185
+ /** Callback when the map is clicked (programmatic use) */
4186
+ onMapClick?: (lat: number, lng: number) => void;
4187
+ /** Event name dispatched via event bus when the map is clicked. Payload: { latitude, longitude } */
4188
+ mapClickEvent?: string;
4189
+ /** Event name dispatched via event bus when a marker is clicked. Payload: marker data */
4190
+ markerClickEvent?: string;
4191
+ /** Whether to show a pin at the clicked location */
4192
+ showClickedPin?: boolean;
4193
+ /** Additional CSS classes */
4194
+ className?: string;
4195
+ /** Show attribution (default true) */
4196
+ showAttribution?: boolean;
4197
+ }
4198
+ declare function MapView({ markers, centerLat, centerLng, zoom, height, onMarkerClick, onMapClick, mapClickEvent, markerClickEvent, showClickedPin, className, showAttribution, }: MapViewProps): react_jsx_runtime.JSX.Element;
4199
+
4200
+ type NumberStepperSize = "sm" | "md" | "lg";
4201
+ interface NumberStepperProps {
4202
+ /** Current value */
4203
+ value?: number;
4204
+ /** Minimum value */
4205
+ min?: number;
4206
+ /** Maximum value */
4207
+ max?: number;
4208
+ /** Step increment */
4209
+ step?: number;
4210
+ /** Size variant */
4211
+ size?: NumberStepperSize;
4212
+ /** Disabled state */
4213
+ disabled?: boolean;
4214
+ /** Direct onChange callback */
4215
+ onChange?: (value: number) => void;
4216
+ /** Declarative event name for value changes */
4217
+ action?: string;
4218
+ /** Payload to include with the action event */
4219
+ actionPayload?: Record<string, unknown>;
4220
+ /** Additional CSS classes */
4221
+ className?: string;
4222
+ /** Accessible label */
4223
+ label?: string;
4224
+ }
4225
+ declare const NumberStepper: React__default.FC<NumberStepperProps>;
4226
+
4227
+ type StarRatingSize = "sm" | "md" | "lg";
4228
+ type StarRatingPrecision = "full" | "half";
4229
+ interface StarRatingProps {
4230
+ /** Current rating value */
4231
+ value?: number;
4232
+ /** Maximum number of stars */
4233
+ max?: number;
4234
+ /** Read-only display mode */
4235
+ readOnly?: boolean;
4236
+ /** Full or half-star precision */
4237
+ precision?: StarRatingPrecision;
4238
+ /** Star size */
4239
+ size?: StarRatingSize;
4240
+ /** Declarative event name for rating changes */
4241
+ action?: string;
4242
+ /** Payload to include with the action event */
4243
+ actionPayload?: Record<string, unknown>;
4244
+ /** Direct onChange callback */
4245
+ onChange?: (value: number) => void;
4246
+ /** Additional CSS classes */
4247
+ className?: string;
4248
+ /** Accessible label */
4249
+ label?: string;
4250
+ }
4251
+ declare const StarRating: React__default.FC<StarRatingProps>;
4252
+
4253
+ interface UploadDropZoneProps {
4254
+ /** Accepted MIME types (e.g., "image/*", "application/pdf") */
4255
+ accept?: string;
4256
+ /** Max file size in bytes */
4257
+ maxSize?: number;
4258
+ /** Max number of files */
4259
+ maxFiles?: number;
4260
+ /** Label text */
4261
+ label?: string;
4262
+ /** Description text below label */
4263
+ description?: string;
4264
+ /** Icon name (Lucide string) */
4265
+ icon?: string;
4266
+ /** Disabled state */
4267
+ disabled?: boolean;
4268
+ /** Declarative event name for file selection */
4269
+ action?: string;
4270
+ /** Payload to include with the action event */
4271
+ actionPayload?: Record<string, unknown>;
4272
+ /** Direct onFiles callback */
4273
+ onFiles?: (files: File[]) => void;
4274
+ /** Additional CSS classes */
4275
+ className?: string;
4276
+ }
4277
+ declare const UploadDropZone: React__default.FC<UploadDropZoneProps>;
4278
+
4279
+ interface LightboxImage {
4280
+ src: string;
4281
+ alt?: string;
4282
+ caption?: string;
4283
+ }
4284
+ interface LightboxProps {
4285
+ /** Array of images to display */
4286
+ images: LightboxImage[];
4287
+ /** Current image index */
4288
+ currentIndex?: number;
4289
+ /** Whether the lightbox is open */
4290
+ isOpen?: boolean;
4291
+ /** Show image counter (e.g., "3 of 12") */
4292
+ showCounter?: boolean;
4293
+ /** Declarative close event name */
4294
+ closeAction?: string;
4295
+ /** Direct onClose callback */
4296
+ onClose?: () => void;
4297
+ /** Direct onIndexChange callback */
4298
+ onIndexChange?: (index: number) => void;
4299
+ /** Additional CSS classes */
4300
+ className?: string;
4301
+ }
4302
+ declare const Lightbox: React__default.FC<LightboxProps>;
4303
+
4304
+ /**
4305
+ * DataGrid Molecule
4306
+ *
4307
+ * A simplified, schema-driven card grid for iterating over entity data.
4308
+ * Extracted from the CardGrid organism with all complexity removed:
4309
+ * no built-in search, sort, filter, pagination, selection, or bulk actions.
4310
+ *
4311
+ * Accepts `fields` config for per-field rendering control (icon, variant, format)
4312
+ * and `itemActions` for per-item event bus wiring.
4313
+ *
4314
+ * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
4315
+ */
4316
+
4317
+ interface DataGridField {
4318
+ /** Entity field name (dot-notation supported) */
4319
+ name: string;
4320
+ /** Display label (auto-generated from name if omitted) */
4321
+ label?: string;
4322
+ /** Lucide icon name to show beside the field */
4323
+ icon?: string;
4324
+ /** Rendering variant: 'h3' for title, 'body' for text, 'caption' for small,
4325
+ * 'badge' for status badge, 'progress' for progress display */
4326
+ variant?: 'h3' | 'h4' | 'body' | 'caption' | 'badge' | 'small' | 'progress';
4327
+ /** Optional format function name: 'date', 'currency', 'number', 'boolean' */
4328
+ format?: 'date' | 'currency' | 'number' | 'boolean' | 'percent';
4329
+ }
4330
+ interface DataGridItemAction {
4331
+ /** Button label */
4332
+ label: string;
4333
+ /** Event name to emit (dispatched as UI:{event} with { row: itemData }) */
4334
+ event: string;
4335
+ /** Lucide icon name */
4336
+ icon?: string;
4337
+ /** Button variant */
4338
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
4339
+ }
4340
+ interface DataGridProps {
4341
+ /** Entity data array */
4342
+ entity?: unknown | readonly unknown[];
4343
+ /** Field definitions for rendering each card */
4344
+ fields?: readonly DataGridField[];
4345
+ /** Alias for fields (compiler generates `columns` for field definitions) */
4346
+ columns?: readonly DataGridField[];
4347
+ /** Per-item action buttons */
4348
+ itemActions?: readonly DataGridItemAction[];
4349
+ /** Number of columns (uses auto-fit if omitted) */
4350
+ cols?: 1 | 2 | 3 | 4 | 5 | 6;
4351
+ /** Gap between cards */
4352
+ gap?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
4353
+ /** Minimum card width in pixels (used when cols is not set, default 280) */
4354
+ minCardWidth?: number;
4355
+ /** Additional CSS classes */
4356
+ className?: string;
4357
+ /** Loading state */
4358
+ isLoading?: boolean;
4359
+ /** Error state */
4360
+ error?: Error | null;
4361
+ /** Entity field name containing an image URL for card thumbnails */
4362
+ imageField?: string;
4363
+ /** Enable multi-select with checkboxes */
4364
+ selectable?: boolean;
4365
+ /** Selection change event name (emits UI:{selectionEvent} with { selectedIds: string[] }) */
4366
+ selectionEvent?: string;
4367
+ /** Enable infinite scroll loading */
4368
+ infiniteScroll?: boolean;
4369
+ /** Event emitted when more items needed: UI:{loadMoreEvent} */
4370
+ loadMoreEvent?: string;
4371
+ /** Whether more items are available for infinite scroll */
4372
+ hasMore?: boolean;
4373
+ /** Render prop for custom per-item content. When provided, `fields` and `itemActions` are ignored. */
4374
+ children?: (item: Record<string, unknown>, index: number) => React__default.ReactNode;
4375
+ /** Max items to show before "Show More" button. Defaults to 0 (disabled). */
4376
+ pageSize?: number;
4377
+ }
4378
+ declare const DataGrid: React__default.FC<DataGridProps>;
4379
+
4380
+ /**
4381
+ * DataList Molecule
4382
+ *
4383
+ * A simplified, schema-driven list for iterating over entity data.
4384
+ * Extracted from the List organism with all complexity removed:
4385
+ * no built-in search, sort, filter, selection, bulk actions, or custom renderers.
4386
+ *
4387
+ * Accepts `fields` config for per-field rendering control (icon, variant, format)
4388
+ * and `itemActions` for per-item event bus wiring.
4389
+ *
4390
+ * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
4391
+ */
4392
+
4393
+ interface DataListField {
4394
+ /** Entity field name (dot-notation supported) */
4395
+ name: string;
4396
+ /** Display label (auto-generated from name if omitted) */
4397
+ label?: string;
4398
+ /** Lucide icon name to show beside the field */
4399
+ icon?: string;
4400
+ /** Rendering variant: 'h3'/'h4' for title, 'body' for text, 'caption' for small,
4401
+ * 'badge' for status badge, 'progress' for progress bar */
4402
+ variant?: 'h3' | 'h4' | 'body' | 'caption' | 'badge' | 'small' | 'progress';
4403
+ /** Optional format: 'date', 'currency', 'number', 'boolean', 'percent' */
4404
+ format?: 'date' | 'currency' | 'number' | 'boolean' | 'percent';
4405
+ }
4406
+ interface DataListItemAction {
4407
+ /** Button label */
4408
+ label: string;
4409
+ /** Event name to emit (dispatched as UI:{event} with { id, row: itemData }) */
4410
+ event: string;
4411
+ /** Lucide icon name */
4412
+ icon?: string;
4413
+ /** Button variant */
4414
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
4415
+ }
4416
+ interface DataListProps {
4417
+ /** Entity data array */
4418
+ entity?: unknown | readonly unknown[];
4419
+ /** Field definitions for rendering each row */
4420
+ fields?: readonly DataListField[];
4421
+ /** Alias for fields (compiler may generate `columns` for field definitions) */
4422
+ columns?: readonly DataListField[];
4423
+ /** Per-item action buttons */
4424
+ itemActions?: readonly DataListItemAction[];
4425
+ /** Gap between rows */
4426
+ gap?: 'none' | 'sm' | 'md' | 'lg';
4427
+ /** Visual variant */
4428
+ variant?: 'default' | 'card' | 'compact' | 'message';
4429
+ /** Group items by a field value (renders section headers between groups) */
4430
+ groupBy?: string;
4431
+ /** Field name identifying the sender (used with variant: "message") */
4432
+ senderField?: string;
4433
+ /** Current user identifier; messages matching this value align right (used with variant: "message") */
4434
+ currentUser?: string;
4435
+ /** Additional CSS classes */
4436
+ className?: string;
4437
+ /** Loading state */
4438
+ isLoading?: boolean;
4439
+ /** Error state */
4440
+ error?: Error | null;
4441
+ /** Enable drag-to-reorder with grip handles */
4442
+ reorderable?: boolean;
4443
+ /** Event emitted on reorder: UI:{reorderEvent} with { fromIndex, toIndex } */
4444
+ reorderEvent?: string;
4445
+ /** Event emitted on left swipe: UI:{swipeLeftEvent} with { row } */
4446
+ swipeLeftEvent?: string;
4447
+ /** Actions revealed on left swipe */
4448
+ swipeLeftActions?: readonly {
4449
+ label: string;
4450
+ icon?: string;
4451
+ variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
4452
+ }[];
4453
+ /** Event emitted on right swipe: UI:{swipeRightEvent} with { row } */
4454
+ swipeRightEvent?: string;
4455
+ /** Actions revealed on right swipe */
4456
+ swipeRightActions?: readonly {
4457
+ label: string;
4458
+ icon?: string;
4459
+ variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
4460
+ }[];
4461
+ /** Event emitted on long press: UI:{longPressEvent} with { row } */
4462
+ longPressEvent?: string;
4463
+ /** Enable infinite scroll loading */
4464
+ infiniteScroll?: boolean;
4465
+ /** Event emitted when more items needed: UI:{loadMoreEvent} */
4466
+ loadMoreEvent?: string;
4467
+ /** Whether more items are available for infinite scroll */
4468
+ hasMore?: boolean;
4469
+ /** Render prop for custom per-item content. When provided, `fields` and `itemActions` are ignored. */
4470
+ children?: (item: Record<string, unknown>, index: number) => React__default.ReactNode;
4471
+ /** Max items to show before "Show More" button. Defaults to 5. Set to 0 to disable. */
4472
+ pageSize?: number;
4473
+ }
4474
+ declare const DataList: React__default.FC<DataListProps>;
4475
+
4476
+ /**
4477
+ * StatDisplay Molecule
4478
+ *
4479
+ * A compact stat display: label + value + optional icon.
4480
+ * Molecule-level replacement for the stats (StatCard) organism in behavior schemas.
4481
+ * No entity prop, no data fetching, no hooks beyond icon resolution.
4482
+ */
4483
+
4484
+ interface StatDisplayProps {
4485
+ /** Display label (e.g., "Total", "Remaining") */
4486
+ label: string;
4487
+ /** Primary value (number or formatted string) */
4488
+ value?: number | string;
4489
+ /** Maximum value (renders as "value / max") */
4490
+ max?: number;
4491
+ /** Lucide icon name or React node */
4492
+ icon?: React__default.ReactNode;
4493
+ /** Icon background color class */
4494
+ iconBg?: string;
4495
+ /** Icon color class */
4496
+ iconColor?: string;
4497
+ /** Display format: "number", "currency", "percent" */
4498
+ format?: string;
4499
+ /** Size variant */
4500
+ size?: 'sm' | 'md' | 'lg';
4501
+ /** Color variant */
4502
+ variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
4503
+ /** Compact mode (inline, no card wrapper) */
4504
+ compact?: boolean;
4505
+ /** Additional CSS classes */
4506
+ className?: string;
4507
+ /** Loading state */
4508
+ isLoading?: boolean;
4509
+ /** Error state */
4510
+ error?: Error | null;
4511
+ }
4512
+ declare const StatDisplay: React__default.FC<StatDisplayProps>;
4513
+
4514
+ /**
4515
+ * Meter Molecule
4516
+ *
4517
+ * A gauge/meter component for displaying a value within a range.
4518
+ * Supports linear, radial, and segmented display modes.
4519
+ * Pure molecule: no entity prop, no data fetching.
4520
+ */
4521
+
4522
+ type MeterVariant = "linear" | "radial" | "segmented";
4523
+ interface MeterThreshold {
4524
+ value: number;
4525
+ color: string;
4526
+ label?: string;
4527
+ }
4528
+ interface MeterAction {
4529
+ label: string;
4530
+ event?: string;
4531
+ navigatesTo?: string;
4532
+ variant?: "primary" | "secondary" | "ghost";
4533
+ }
4534
+ interface MeterProps {
4535
+ /** Current value */
4536
+ value: number;
4537
+ /** Minimum value */
4538
+ min?: number;
4539
+ /** Maximum value */
4540
+ max?: number;
4541
+ /** Display label */
4542
+ label?: string;
4543
+ /** Unit suffix (e.g., '%', 'MB', 'credits') */
4544
+ unit?: string;
4545
+ /** Display variant */
4546
+ variant?: MeterVariant;
4547
+ /** Color thresholds */
4548
+ thresholds?: readonly MeterThreshold[];
4549
+ /** Number of segments (for segmented variant) */
4550
+ segments?: number;
4551
+ /** Show value text */
4552
+ showValue?: boolean;
4553
+ /** Size (for radial variant) */
4554
+ size?: "sm" | "md" | "lg";
4555
+ /** Actions */
4556
+ actions?: readonly MeterAction[];
4557
+ /** Loading state */
4558
+ isLoading?: boolean;
4559
+ /** Error state */
4560
+ error?: Error | null;
4561
+ /** Additional CSS classes */
4562
+ className?: string;
4563
+ }
4564
+ declare const Meter: React__default.FC<MeterProps>;
4565
+
4566
+ /**
4567
+ * SwipeableRow Molecule
4568
+ *
4569
+ * Wraps a list item to reveal action buttons on horizontal swipe.
4570
+ * Swipe left to reveal right actions, swipe right to reveal left actions.
4571
+ * Uses useSwipeGesture for gesture detection and useEventBus for event emission.
4572
+ */
4573
+
4574
+ interface SwipeAction {
4575
+ label: string;
4576
+ icon?: string;
4577
+ variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
4578
+ event: string;
4579
+ eventPayload?: Record<string, unknown>;
4580
+ }
4581
+ interface SwipeableRowProps {
4582
+ leftActions?: SwipeAction[];
4583
+ rightActions?: SwipeAction[];
4584
+ threshold?: number;
4585
+ children: React__default.ReactNode;
4586
+ itemData?: Record<string, unknown>;
4587
+ className?: string;
4588
+ }
4589
+ declare const SwipeableRow: React__default.FC<SwipeableRowProps>;
4590
+
4591
+ /**
4592
+ * SortableList Molecule
4593
+ *
4594
+ * A list where items can be dragged to reorder via drag handles.
4595
+ * Uses useDragReorder for drag state management and useEventBus for event emission.
4596
+ * Shows a drop indicator line at the target position during drag.
4597
+ */
4598
+
4599
+ interface SortableListProps<T = Record<string, unknown>> {
4600
+ items: T[];
4601
+ renderItem: (item: T, index: number) => React__default.ReactNode;
4602
+ reorderEvent: string;
4603
+ reorderPayload?: Record<string, unknown>;
4604
+ dragHandlePosition?: 'left' | 'right';
4605
+ className?: string;
4606
+ }
4607
+ declare const SortableList: <T = Record<string, unknown>>(props: SortableListProps<T>) => React__default.ReactElement;
4608
+
4609
+ /**
4610
+ * Carousel Molecule Component
4611
+ *
4612
+ * Horizontal scrolling container with snap points, swipe gestures,
4613
+ * prev/next arrow buttons, and dot indicators.
4614
+ * Pure UI molecule with no entity binding.
4615
+ */
4616
+
4617
+ interface CarouselProps<T = Record<string, unknown>> {
4618
+ /** Array of items to display as slides */
4619
+ items: T[];
4620
+ /** Render function for each slide */
4621
+ renderItem: (item: T, index: number) => React__default.ReactNode;
4622
+ /** Enable auto-play rotation */
4623
+ autoPlay?: boolean;
4624
+ /** Auto-play interval in milliseconds (default: 5000) */
4625
+ autoPlayInterval?: number;
4626
+ /** Show dot indicators */
4627
+ showDots?: boolean;
4628
+ /** Show prev/next arrow buttons */
4629
+ showArrows?: boolean;
4630
+ /** Enable infinite loop */
4631
+ loop?: boolean;
4632
+ /** Declarative event name for slide change */
4633
+ slideChangeEvent?: string;
4634
+ /** Payload to include with the slide change event */
4635
+ slideChangePayload?: Record<string, unknown>;
4636
+ /** Additional CSS classes */
4637
+ className?: string;
4638
+ }
4639
+ declare const Carousel: <T = Record<string, unknown>>({ items, renderItem, autoPlay, autoPlayInterval, showDots, showArrows, loop, slideChangeEvent, slideChangePayload, className, }: CarouselProps<T>) => React__default.ReactElement | null;
4640
+
4641
+ /**
4642
+ * PullToRefresh Molecule Component
4643
+ *
4644
+ * Wrapper that adds pull-to-refresh gesture to children.
4645
+ * Shows a spinner indicator as the user pulls down, and emits
4646
+ * a refresh event via the event bus when the threshold is met.
4647
+ */
4648
+
4649
+ interface PullToRefreshProps {
4650
+ /** Event name to emit on refresh (emitted as UI:{refreshEvent}) */
4651
+ refreshEvent: string;
4652
+ /** Payload to include with the refresh event */
4653
+ refreshPayload?: Record<string, unknown>;
4654
+ /** Pull distance threshold to trigger refresh in px (default: 60) */
4655
+ threshold?: number;
4656
+ /** Content to wrap */
4657
+ children: React__default.ReactNode;
4658
+ /** Additional CSS classes */
4659
+ className?: string;
4660
+ }
4661
+ declare const PullToRefresh: React__default.FC<PullToRefreshProps>;
4662
+
4663
+ /**
4664
+ * Shared types for entity-display organisms.
4665
+ *
4666
+ * All entity-display organisms (DataTable, List, Table, CardGrid, DetailPanel)
4667
+ * extend EntityDisplayProps to guarantee a uniform prop contract.
4668
+ *
4669
+ * Exception: Form manages local `formData` state for field input tracking.
4670
+ * This is the ONE allowed exception — documented here.
4671
+ */
4672
+ declare const EntityDisplayEvents: {
4673
+ readonly SORT: "SORT";
4674
+ readonly PAGINATE: "PAGINATE";
4675
+ readonly SEARCH: "SEARCH";
4676
+ readonly FILTER: "FILTER";
4677
+ readonly CLEAR_FILTERS: "CLEAR_FILTERS";
4678
+ readonly SELECT: "SELECT";
4679
+ readonly DESELECT: "DESELECT";
4680
+ };
4681
+ interface SortPayload {
4682
+ field: string;
4683
+ direction: 'asc' | 'desc';
4684
+ }
4685
+ interface PaginatePayload {
4686
+ page: number;
4687
+ pageSize?: number;
4688
+ }
4689
+ interface SearchPayload {
4690
+ query: string;
4691
+ }
4692
+ interface FilterPayload {
4693
+ field: string;
4694
+ operator: string;
4695
+ value: unknown;
4696
+ }
4697
+ interface SelectPayload {
4698
+ ids: (string | number)[];
4699
+ }
4700
+ interface EntityDisplayProps<T = unknown> {
4701
+ /** Entity name (string) or data injected by the runtime (array for lists, single object for detail) */
4702
+ entity?: string | T | readonly T[];
4703
+ /** Additional CSS classes */
4704
+ className?: string;
4705
+ /** Loading state indicator */
4706
+ isLoading?: boolean;
4707
+ /** Error state */
4708
+ error?: Error | null;
4709
+ /** Current sort field */
4710
+ sortBy?: string;
4711
+ /** Current sort direction */
4712
+ sortDirection?: 'asc' | 'desc';
4713
+ /** Current search query value */
4714
+ searchValue?: string;
4715
+ /** Current page number (1-indexed) */
4716
+ page?: number;
4717
+ /** Number of items per page */
4718
+ pageSize?: number;
4719
+ /** Total number of items (for pagination display) */
4720
+ totalCount?: number;
4721
+ /** Active filters */
4722
+ activeFilters?: Record<string, unknown>;
4723
+ /** Currently selected item IDs */
4724
+ selectedIds?: readonly (string | number)[];
4725
+ }
4726
+
4727
+ interface Column<T> {
4728
+ key: keyof T | string;
4729
+ header: string;
4730
+ /** Alias for key (used by compiler-generated fields) */
4731
+ name?: string;
4732
+ /** Alias for header (used by compiler-generated fields) */
4733
+ label?: string;
4734
+ width?: string;
4735
+ sortable?: boolean;
4736
+ render?: (value: unknown, row: T, index: number) => React__default.ReactNode;
4737
+ }
4738
+ interface RowAction<T> {
4739
+ label: string;
4740
+ icon?: LucideIcon;
4741
+ onClick: (row: T) => void;
4742
+ variant?: "default" | "danger";
4743
+ show?: (row: T) => boolean;
4744
+ event?: string;
4745
+ }
4746
+ interface DataTableProps<T extends {
4747
+ id: string | number;
4748
+ }> extends EntityDisplayProps<T> {
4749
+ /** Fields to display - accepts string[] or Column[] for unified interface. Alias for columns */
4750
+ fields: readonly Column<T>[] | readonly string[];
4751
+ /** Columns can be Column objects or simple string field names */
4752
+ columns?: readonly Column<T>[] | readonly string[];
4753
+ /** Item actions from generated code - maps to rowActions */
4754
+ itemActions?: readonly {
4755
+ label: string;
4756
+ event?: string;
4757
+ navigatesTo?: string;
4758
+ action?: string;
4759
+ placement?: "row" | "bulk" | string;
4760
+ icon?: LucideIcon;
4761
+ variant?: "default" | "primary" | "secondary" | "ghost" | "danger" | string;
4762
+ onClick?: (row: T) => void;
4763
+ }[];
4764
+ emptyIcon?: LucideIcon;
4765
+ emptyTitle?: string;
4766
+ emptyDescription?: string;
4767
+ emptyAction?: {
4768
+ label: string;
4769
+ event?: string;
4770
+ };
4771
+ selectable?: boolean;
4772
+ searchable?: boolean;
4773
+ searchPlaceholder?: string;
4774
+ rowActions?: readonly RowAction<T>[];
4775
+ bulkActions?: ReadonlyArray<{
4776
+ label: string;
4777
+ icon?: LucideIcon;
4778
+ onClick: (selectedRows: T[]) => void;
4779
+ variant?: "default" | "danger";
4780
+ }>;
4781
+ headerActions?: React__default.ReactNode;
4782
+ /** Show total count in pagination */
4783
+ showTotal?: boolean;
4784
+ }
4785
+ declare function DataTable<T extends {
4786
+ id: string | number;
4787
+ }>({ fields, columns, entity, itemActions, isLoading, error, emptyIcon, emptyTitle, emptyDescription, emptyAction, selectable, selectedIds, sortBy, sortDirection, searchable, searchValue, searchPlaceholder, page, pageSize, totalCount, rowActions: externalRowActions, bulkActions, headerActions, showTotal, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
4788
+ declare namespace DataTable {
4789
+ var displayName: string;
4790
+ }
4791
+
4792
+ /**
4793
+ * Schema metric definition
4794
+ * Supports both computed metrics (with field) and static metrics (with value)
4795
+ */
4796
+ interface MetricDefinition {
3574
4797
  /** Field name for computed metrics (optional if value is provided) */
3575
4798
  field?: string;
3576
4799
  /** Display label */
@@ -5064,423 +6287,183 @@ declare const BookViewer: React__default.FC<BookViewerProps>;
5064
6287
 
5065
6288
  /**
5066
6289
  * BookChapterView Organism
5067
- *
5068
- * Renders a single chapter: title + optional orbital diagram +
5069
- * rich content via ContentRenderer.
5070
- *
5071
- * Event Contract:
5072
- * - Delegates to ContentRenderer children
5073
- */
5074
-
5075
- interface BookChapterViewProps extends EntityDisplayProps<BookChapter> {
5076
- chapter: BookChapter;
5077
- direction?: 'rtl' | 'ltr';
5078
- }
5079
- declare const BookChapterView: React__default.FC<BookChapterViewProps>;
5080
-
5081
- /**
5082
- * BookCoverPage Molecule
5083
- *
5084
- * Renders a book cover with title, subtitle, author, and optional image.
5085
- * Centered layout suitable for the first "page" of a BookViewer.
5086
- *
5087
- * Event Contract:
5088
- * - Emits: UI:BOOK_START
5089
- */
5090
-
5091
- interface BookCoverPageProps extends EntityDisplayProps<BookData> {
5092
- title: string;
5093
- subtitle?: string;
5094
- author?: string;
5095
- coverImageUrl?: string;
5096
- direction?: 'rtl' | 'ltr';
5097
- }
5098
- declare const BookCoverPage: React__default.FC<BookCoverPageProps>;
5099
-
5100
- /**
5101
- * BookTableOfContents Molecule
5102
- *
5103
- * Renders a clickable table of contents grouped by parts.
5104
- * Highlights the current chapter.
5105
- *
5106
- * Event Contract:
5107
- * - Emits: UI:BOOK_NAVIGATE { chapterId }
5108
- */
5109
-
5110
- interface BookTableOfContentsProps extends EntityDisplayProps<BookPart> {
5111
- parts: BookPart[];
5112
- currentChapterId?: string;
5113
- direction?: 'rtl' | 'ltr';
5114
- }
5115
- declare const BookTableOfContents: React__default.FC<BookTableOfContentsProps>;
5116
-
5117
- /**
5118
- * BookNavBar Molecule
5119
- *
5120
- * Navigation bar for the BookViewer with prev/next, page indicator,
5121
- * print button, and TOC toggle.
5122
- *
5123
- * Event Contract:
5124
- * - Emits: UI:BOOK_PAGE_PREV, UI:BOOK_PAGE_NEXT, UI:BOOK_PRINT, UI:BOOK_SHOW_TOC
5125
- */
5126
-
5127
- interface BookNavBarProps extends EntityDisplayProps<BookData> {
5128
- currentPage: number;
5129
- totalPages: number;
5130
- chapterTitle?: string;
5131
- direction?: 'rtl' | 'ltr';
5132
- }
5133
- declare const BookNavBar: React__default.FC<BookNavBarProps>;
5134
-
5135
- /**
5136
- * SplitPane Component
5137
- *
5138
- * Two-pane resizable split layout for master-detail views,
5139
- * dual-pane editors, and code + preview layouts.
5140
- *
5141
- * Uses wireframe theme styling (high contrast, sharp edges).
5142
- */
5143
-
5144
- interface SplitPaneProps {
5145
- /** Direction of the split */
5146
- direction?: "horizontal" | "vertical";
5147
- /** Initial ratio (0-100, percentage of first pane) */
5148
- ratio?: number;
5149
- /** Minimum size of either pane in pixels */
5150
- minSize?: number;
5151
- /** Allow user resizing */
5152
- resizable?: boolean;
5153
- /** Content for the left/top pane */
5154
- left: React__default.ReactNode;
5155
- /** Content for the right/bottom pane */
5156
- right: React__default.ReactNode;
5157
- /** Additional CSS classes */
5158
- className?: string;
5159
- /** Class for left/top pane */
5160
- leftClassName?: string;
5161
- /** Class for right/bottom pane */
5162
- rightClassName?: string;
5163
- }
5164
- /**
5165
- * SplitPane - Two-pane resizable layout
5166
- */
5167
- declare const SplitPane: React__default.FC<SplitPaneProps>;
5168
-
5169
- /**
5170
- * DashboardGrid Component
5171
- *
5172
- * Multi-column grid for widgets and stats cards.
5173
- * Supports cell spanning for flexible dashboard layouts.
5174
- *
5175
- * Uses wireframe theme styling (high contrast, sharp edges).
5176
- */
5177
-
5178
- interface DashboardGridCell {
5179
- /** Optional unique cell ID */
5180
- id?: string;
5181
- /** Content to render in the cell */
5182
- content?: React__default.ReactNode;
5183
- /** Number of columns this cell spans (1-4) */
5184
- colSpan?: 1 | 2 | 3 | 4;
5185
- /** Number of rows this cell spans (1-2) */
5186
- rowSpan?: 1 | 2;
5187
- /** Allow additional schema-driven properties */
5188
- [key: string]: unknown;
5189
- }
5190
- interface DashboardGridProps extends EntityDisplayProps {
5191
- /** Number of columns */
5192
- columns?: 2 | 3 | 4;
5193
- /** Gap between cells */
5194
- gap?: "sm" | "md" | "lg";
5195
- /** Cell definitions */
5196
- cells: DashboardGridCell[];
5197
- }
5198
- /**
5199
- * DashboardGrid - Multi-column widget grid
5200
- */
5201
- declare const DashboardGrid: React__default.FC<DashboardGridProps>;
5202
-
5203
- /**
5204
- * TabbedContainer Component
5205
- *
5206
- * Tabbed content areas with shared header/context.
5207
- * Wraps the Tabs molecule with layout-specific styling.
5208
- *
5209
- * Uses wireframe theme styling (high contrast, sharp edges).
5210
- */
5211
-
5212
- interface TabDefinition {
5213
- /** Tab identifier */
5214
- id: string;
5215
- /** Tab label */
5216
- label: string;
5217
- /** Tab content (optional if using sectionId) */
5218
- content?: React__default.ReactNode;
5219
- /** Section ID to render (alternative to content) */
5220
- sectionId?: string;
5221
- /** Optional badge/count */
5222
- badge?: string | number;
5223
- /** Disable this tab */
5224
- disabled?: boolean;
5225
- }
5226
- interface TabbedContainerProps {
5227
- /** Tab definitions */
5228
- tabs: TabDefinition[];
5229
- /** Default active tab ID */
5230
- defaultTab?: string;
5231
- /** Controlled active tab */
5232
- activeTab?: string;
5233
- /** Callback when tab changes */
5234
- onTabChange?: (tabId: string) => void;
5235
- /** Tab position */
5236
- position?: "top" | "left";
5237
- /** Additional CSS classes */
5238
- className?: string;
6290
+ *
6291
+ * Renders a single chapter: title + optional orbital diagram +
6292
+ * rich content via ContentRenderer.
6293
+ *
6294
+ * Event Contract:
6295
+ * - Delegates to ContentRenderer children
6296
+ */
6297
+
6298
+ interface BookChapterViewProps extends EntityDisplayProps<BookChapter> {
6299
+ chapter: BookChapter;
6300
+ direction?: 'rtl' | 'ltr';
5239
6301
  }
6302
+ declare const BookChapterView: React__default.FC<BookChapterViewProps>;
6303
+
5240
6304
  /**
5241
- * TabbedContainer - Tabbed content areas
6305
+ * BookCoverPage Molecule
6306
+ *
6307
+ * Renders a book cover with title, subtitle, author, and optional image.
6308
+ * Centered layout suitable for the first "page" of a BookViewer.
6309
+ *
6310
+ * Event Contract:
6311
+ * - Emits: UI:BOOK_START
5242
6312
  */
5243
- declare const TabbedContainer: React__default.FC<TabbedContainerProps>;
6313
+
6314
+ interface BookCoverPageProps extends EntityDisplayProps<BookData> {
6315
+ title: string;
6316
+ subtitle?: string;
6317
+ author?: string;
6318
+ coverImageUrl?: string;
6319
+ direction?: 'rtl' | 'ltr';
6320
+ }
6321
+ declare const BookCoverPage: React__default.FC<BookCoverPageProps>;
5244
6322
 
5245
6323
  /**
5246
- * Sprite Sheet Animation Types
6324
+ * BookTableOfContents Molecule
5247
6325
  *
5248
- * Type definitions for frame-based sprite sheet animation system.
5249
- * Supports standard 8-column × 5-row character sheets.
6326
+ * Renders a clickable table of contents grouped by parts.
6327
+ * Highlights the current chapter.
5250
6328
  *
5251
- * @packageDocumentation
6329
+ * Event Contract:
6330
+ * - Emits: UI:BOOK_NAVIGATE { chapterId }
5252
6331
  */
5253
- /** Animation names matching sprite sheet row layout */
5254
- type AnimationName = 'idle' | 'walk' | 'attack' | 'hit' | 'death';
5255
- /** Sheet file directions (physical PNG files) */
5256
- type SpriteDirection = 'se' | 'sw';
5257
- /** Unit facing direction on screen (4 isometric directions) */
5258
- type FacingDirection = 'se' | 'sw' | 'ne' | 'nw';
5259
- /** Definition for a single animation row in the sprite sheet */
5260
- interface AnimationDef {
5261
- /** Row index in the sprite sheet (0-4) */
5262
- row: number;
5263
- /** Number of frames in this animation */
5264
- frames: number;
5265
- /** Frames per second */
5266
- frameRate: number;
5267
- /** Whether the animation loops */
5268
- loop: boolean;
5269
- }
5270
- /** A resolved frame ready to draw on canvas */
5271
- interface ResolvedFrame {
5272
- /** URL of the sprite sheet image */
5273
- sheetUrl: string;
5274
- /** Source X in the sheet (pixel offset) */
5275
- sx: number;
5276
- /** Source Y in the sheet (pixel offset) */
5277
- sy: number;
5278
- /** Source width (frame width) */
5279
- sw: number;
5280
- /** Source height (frame height) */
5281
- sh: number;
5282
- /** Whether to flip horizontally when drawing (for NE/NW directions) */
5283
- flipX: boolean;
5284
- /** When true, canvas should apply sine-bob breathing offset (frozen idle frame) */
5285
- applyBreathing?: boolean;
5286
- }
5287
- /** Per-unit animation state tracked in the animation system */
5288
- interface UnitAnimationState {
5289
- /** Unit identifier */
5290
- unitId: string;
5291
- /** Current animation playing */
5292
- animation: AnimationName;
5293
- /** Current facing direction */
5294
- direction: FacingDirection;
5295
- /** Current frame index within the animation */
5296
- frame: number;
5297
- /** Elapsed time in current animation (ms) */
5298
- elapsed: number;
5299
- /** Animation to play after current one-shot completes (null = idle) */
5300
- queuedAnimation: AnimationName | null;
5301
- /** Whether the current one-shot animation has finished its last frame */
5302
- finished: boolean;
5303
- }
5304
- /** Frame dimensions for a sprite sheet */
5305
- interface SpriteFrameDims {
5306
- /** Width of a single frame in pixels */
5307
- width: number;
5308
- /** Height of a single frame in pixels */
5309
- height: number;
5310
- }
5311
- /** Sheet URLs for both directions */
5312
- interface SpriteSheetUrls {
5313
- /** Southeast-facing sheet URL */
5314
- se: string;
5315
- /** Southwest-facing sheet URL */
5316
- sw: string;
6332
+
6333
+ interface BookTableOfContentsProps extends EntityDisplayProps<BookPart> {
6334
+ parts: BookPart[];
6335
+ currentChapterId?: string;
6336
+ direction?: 'rtl' | 'ltr';
5317
6337
  }
6338
+ declare const BookTableOfContents: React__default.FC<BookTableOfContentsProps>;
5318
6339
 
5319
6340
  /**
5320
- * IsometricCanvas
5321
- *
5322
- * Core isometric game renderer. Maps to the `game-canvas` pattern.
5323
- * Adapted from projects/trait-wars/design-system/organisms/IsometricGameCanvas.tsx
5324
- * with full closed-circuit pattern compliance (className, isLoading, error, entity).
6341
+ * BookNavBar Molecule
5325
6342
  *
5326
- * Architecture:
5327
- * - 2:1 diamond isometric projection
5328
- * - Painter's algorithm (tile → feature → unit depth sort)
5329
- * - Camera pan/zoom with lerp
5330
- * - Off-screen culling
5331
- * - Minimap on separate canvas
5332
- * - Sprite sheet animation via resolveUnitFrame
5333
- * - Event bus–friendly handlers (onTileClick, onUnitClick, etc.)
6343
+ * Navigation bar for the BookViewer with prev/next, page indicator,
6344
+ * print button, and TOC toggle.
5334
6345
  *
5335
- * **State categories (closed-circuit compliant):**
5336
- * - All game data (tiles, units, features, selection, validMoves) → received via props
5337
- * - Rendering state (viewportSize, RAF, camera lerp, sprite cache) → local only
5338
- * - Events → emitted via `useEventBus()` for trait integration
6346
+ * Event Contract:
6347
+ * - Emits: UI:BOOK_PAGE_PREV, UI:BOOK_PAGE_NEXT, UI:BOOK_PRINT, UI:BOOK_SHOW_TOC
6348
+ */
6349
+
6350
+ interface BookNavBarProps extends EntityDisplayProps<BookData> {
6351
+ currentPage: number;
6352
+ totalPages: number;
6353
+ chapterTitle?: string;
6354
+ direction?: 'rtl' | 'ltr';
6355
+ }
6356
+ declare const BookNavBar: React__default.FC<BookNavBarProps>;
6357
+
6358
+ /**
6359
+ * SplitPane Component
5339
6360
  *
5340
- * This component is a **pure renderer** — it holds no game logic state.
6361
+ * Two-pane resizable split layout for master-detail views,
6362
+ * dual-pane editors, and code + preview layouts.
5341
6363
  *
5342
- * @packageDocumentation
6364
+ * Uses wireframe theme styling (high contrast, sharp edges).
5343
6365
  */
5344
6366
 
5345
- /** Event Contract:
5346
- * Emits: UI:TILE_CLICK
5347
- * Emits: UI:UNIT_CLICK
5348
- * Emits: UI:TILE_HOVER
5349
- * Emits: UI:TILE_LEAVE
5350
- */
5351
- interface IsometricCanvasProps extends EntityDisplayProps {
5352
- /** Array of tiles to render */
5353
- tiles?: IsometricTile[];
5354
- /** Array of units on the board */
5355
- units?: IsometricUnit[];
5356
- /** Array of features (resources, portals, buildings, etc.) */
5357
- features?: IsometricFeature[];
5358
- /** Currently selected unit ID */
5359
- selectedUnitId?: string | null;
5360
- /** Valid move positions (shown as pulsing green highlights) */
5361
- validMoves?: Array<{
5362
- x: number;
5363
- y: number;
5364
- }>;
5365
- /** Attack target positions (shown as pulsing red highlights) */
5366
- attackTargets?: Array<{
5367
- x: number;
5368
- y: number;
5369
- }>;
5370
- /** Hovered tile position */
5371
- hoveredTile?: {
5372
- x: number;
5373
- y: number;
5374
- } | null;
5375
- onTileClick?: (x: number, y: number) => void;
5376
- onUnitClick?: (unitId: string) => void;
5377
- onTileHover?: (x: number, y: number) => void;
5378
- onTileLeave?: () => void;
5379
- /** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
5380
- tileClickEvent?: string;
5381
- /** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
5382
- unitClickEvent?: string;
5383
- /** Declarative event: emits UI:{tileHoverEvent} with { x, y } on tile hover */
5384
- tileHoverEvent?: string;
5385
- /** Declarative event: emits UI:{tileLeaveEvent} with {} on tile leave */
5386
- tileLeaveEvent?: string;
5387
- /** Render scale (0.4 = 40% zoom) */
5388
- scale?: number;
5389
- /** Show debug grid lines and coordinates */
5390
- debug?: boolean;
5391
- /** Background image URL tiled behind the isometric grid */
5392
- backgroundImage?: string;
5393
- /** Toggle minimap overlay */
5394
- showMinimap?: boolean;
5395
- /** Enable camera pan/zoom controls */
5396
- enableCamera?: boolean;
5397
- /** Extra scale multiplier for unit draw size. 1 = default. */
5398
- unitScale?: number;
5399
- /** Board width in tiles (overrides tile-derived size) */
5400
- boardWidth?: number;
5401
- /** Board height in tiles (overrides tile-derived size) */
5402
- boardHeight?: number;
5403
- /** Override for the diamond-top Y offset within the tile sprite (default: 374).
5404
- * This controls where the flat diamond face sits vertically inside the tile image. */
5405
- diamondTopY?: number;
5406
- /** Resolve terrain sprite URL from terrain key */
5407
- getTerrainSprite?: (terrain: string) => string | undefined;
5408
- /** Resolve feature sprite URL from feature type key */
5409
- getFeatureSprite?: (featureType: string) => string | undefined;
5410
- /** Resolve unit static sprite URL */
5411
- getUnitSprite?: (unit: IsometricUnit) => string | undefined;
5412
- /** Resolve animated sprite sheet frame for a unit */
5413
- resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
5414
- /** Additional sprite URLs to preload (e.g., effect sprites) */
5415
- effectSpriteUrls?: string[];
5416
- /** Callback to draw canvas effects after units (canvas-specific: cannot be declarative) */
5417
- onDrawEffects?: (ctx: CanvasRenderingContext2D, animTime: number, getImage: (url: string) => HTMLImageElement | undefined) => void;
5418
- /** Whether there are active effects — keeps RAF loop alive */
5419
- hasActiveEffects?: boolean;
5420
- /** Base URL for remote asset resolution. When set, manifest paths
5421
- * are prefixed with this URL. Example: "https://trait-wars-assets.web.app" */
5422
- assetBaseUrl?: string;
5423
- /** Manifest mapping entity keys to relative sprite paths.
5424
- * Combined with assetBaseUrl to produce full URLs.
5425
- * Used as a fallback when inline URLs and callbacks don't resolve. */
5426
- assetManifest?: {
5427
- terrains?: Record<string, string>;
5428
- units?: Record<string, string>;
5429
- features?: Record<string, string>;
5430
- effects?: Record<string, string>;
5431
- };
5432
- }
5433
- declare function IsometricCanvas({ className, isLoading, error, entity, tiles: tilesProp, units, features, selectedUnitId, validMoves, attackTargets, hoveredTile, onTileClick, onUnitClick, onTileHover, onTileLeave, tileClickEvent, unitClickEvent, tileHoverEvent, tileLeaveEvent, scale, debug, backgroundImage, showMinimap, enableCamera, unitScale, getTerrainSprite, getFeatureSprite, getUnitSprite, resolveUnitFrame, effectSpriteUrls, onDrawEffects, hasActiveEffects, diamondTopY: diamondTopYProp, assetBaseUrl, assetManifest, }: IsometricCanvasProps): React$1.JSX.Element;
5434
- declare namespace IsometricCanvas {
5435
- var displayName: string;
6367
+ interface SplitPaneProps {
6368
+ /** Direction of the split */
6369
+ direction?: "horizontal" | "vertical";
6370
+ /** Initial ratio (0-100, percentage of first pane) */
6371
+ ratio?: number;
6372
+ /** Minimum size of either pane in pixels */
6373
+ minSize?: number;
6374
+ /** Allow user resizing */
6375
+ resizable?: boolean;
6376
+ /** Content for the left/top pane */
6377
+ left: React__default.ReactNode;
6378
+ /** Content for the right/bottom pane */
6379
+ right: React__default.ReactNode;
6380
+ /** Additional CSS classes */
6381
+ className?: string;
6382
+ /** Class for left/top pane */
6383
+ leftClassName?: string;
6384
+ /** Class for right/bottom pane */
6385
+ rightClassName?: string;
5436
6386
  }
6387
+ /**
6388
+ * SplitPane - Two-pane resizable layout
6389
+ */
6390
+ declare const SplitPane: React__default.FC<SplitPaneProps>;
5437
6391
 
5438
- interface PlatformerPlatform {
5439
- x: number;
5440
- y: number;
5441
- width: number;
5442
- height: number;
5443
- type?: 'ground' | 'platform' | 'hazard' | 'goal';
6392
+ /**
6393
+ * DashboardGrid Component
6394
+ *
6395
+ * Multi-column grid for widgets and stats cards.
6396
+ * Supports cell spanning for flexible dashboard layouts.
6397
+ *
6398
+ * Uses wireframe theme styling (high contrast, sharp edges).
6399
+ */
6400
+
6401
+ interface DashboardGridCell {
6402
+ /** Optional unique cell ID */
6403
+ id?: string;
6404
+ /** Content to render in the cell */
6405
+ content?: React__default.ReactNode;
6406
+ /** Number of columns this cell spans (1-4) */
6407
+ colSpan?: 1 | 2 | 3 | 4;
6408
+ /** Number of rows this cell spans (1-2) */
6409
+ rowSpan?: 1 | 2;
6410
+ /** Allow additional schema-driven properties */
6411
+ [key: string]: unknown;
5444
6412
  }
5445
- interface PlatformerPlayer {
5446
- x: number;
5447
- y: number;
5448
- width?: number;
5449
- height?: number;
5450
- vx?: number;
5451
- vy?: number;
5452
- grounded?: boolean;
5453
- facingRight?: boolean;
6413
+ interface DashboardGridProps extends EntityDisplayProps {
6414
+ /** Number of columns */
6415
+ columns?: 2 | 3 | 4;
6416
+ /** Gap between cells */
6417
+ gap?: "sm" | "md" | "lg";
6418
+ /** Cell definitions */
6419
+ cells: DashboardGridCell[];
5454
6420
  }
5455
- interface PlatformerCanvasProps {
5456
- /** Player entity data */
5457
- player?: PlatformerPlayer;
5458
- /** Static platforms / level geometry */
5459
- platforms?: readonly PlatformerPlatform[];
5460
- /** World dimensions */
5461
- worldWidth?: number;
5462
- worldHeight?: number;
5463
- /** Canvas display size */
5464
- canvasWidth?: number;
5465
- canvasHeight?: number;
5466
- /** Camera follows player */
5467
- followCamera?: boolean;
5468
- /** Background color */
5469
- bgColor?: string;
5470
- /** Event names for keyboard controls */
5471
- leftEvent?: string;
5472
- rightEvent?: string;
5473
- jumpEvent?: string;
5474
- stopEvent?: string;
6421
+ /**
6422
+ * DashboardGrid - Multi-column widget grid
6423
+ */
6424
+ declare const DashboardGrid: React__default.FC<DashboardGridProps>;
6425
+
6426
+ /**
6427
+ * TabbedContainer Component
6428
+ *
6429
+ * Tabbed content areas with shared header/context.
6430
+ * Wraps the Tabs molecule with layout-specific styling.
6431
+ *
6432
+ * Uses wireframe theme styling (high contrast, sharp edges).
6433
+ */
6434
+
6435
+ interface TabDefinition {
6436
+ /** Tab identifier */
6437
+ id: string;
6438
+ /** Tab label */
6439
+ label: string;
6440
+ /** Tab content (optional if using sectionId) */
6441
+ content?: React__default.ReactNode;
6442
+ /** Section ID to render (alternative to content) */
6443
+ sectionId?: string;
6444
+ /** Optional badge/count */
6445
+ badge?: string | number;
6446
+ /** Disable this tab */
6447
+ disabled?: boolean;
6448
+ }
6449
+ interface TabbedContainerProps {
6450
+ /** Tab definitions */
6451
+ tabs: TabDefinition[];
6452
+ /** Default active tab ID */
6453
+ defaultTab?: string;
6454
+ /** Controlled active tab */
6455
+ activeTab?: string;
6456
+ /** Callback when tab changes */
6457
+ onTabChange?: (tabId: string) => void;
6458
+ /** Tab position */
6459
+ position?: "top" | "left";
5475
6460
  /** Additional CSS classes */
5476
6461
  className?: string;
5477
- /** Entity data (schema binding) */
5478
- entity?: Record<string, unknown>;
5479
- }
5480
- declare function PlatformerCanvas({ player, platforms, worldWidth, worldHeight, canvasWidth, canvasHeight, followCamera, bgColor, leftEvent, rightEvent, jumpEvent, stopEvent, className, entity, }: PlatformerCanvasProps): react_jsx_runtime.JSX.Element;
5481
- declare namespace PlatformerCanvas {
5482
- var displayName: string;
5483
6462
  }
6463
+ /**
6464
+ * TabbedContainer - Tabbed content areas
6465
+ */
6466
+ declare const TabbedContainer: React__default.FC<TabbedContainerProps>;
5484
6467
 
5485
6468
  /**
5486
6469
  * Combat action types that map to effect compositions.
@@ -5927,463 +6910,172 @@ interface UsePhysics2DReturn {
5927
6910
  /** Unregister a unit from physics */
5928
6911
  unregisterUnit: (unitId: string) => void;
5929
6912
  /** Get current physics position for a unit */
5930
- getPosition: (unitId: string) => {
5931
- x: number;
5932
- y: number;
5933
- } | null;
5934
- /** Get full physics state for a unit */
5935
- getState: (unitId: string) => Physics2DState | undefined;
5936
- /** Apply force to a unit */
5937
- applyForce: (unitId: string, fx: number, fy: number) => void;
5938
- /** Set velocity directly */
5939
- setVelocity: (unitId: string, vx: number, vy: number) => void;
5940
- /** Set position directly (teleport) */
5941
- setPosition: (unitId: string, x: number, y: number) => void;
5942
- /** Run physics tick - call this in your RAF loop */
5943
- tick: (deltaTime?: number) => void;
5944
- /** Check collision between two units */
5945
- checkCollision: (unitIdA: string, unitIdB: string, boundsA: PhysicsBounds, boundsB: PhysicsBounds) => boolean;
5946
- /** Resolve collision between two units */
5947
- resolveCollision: (unitIdA: string, unitIdB: string) => void;
5948
- /** Freeze/unfreeze a unit */
5949
- setFrozen: (unitId: string, frozen: boolean) => void;
5950
- /** Get all physics-enabled units */
5951
- getAllUnits: () => Physics2DState[];
5952
- /** Reset all physics */
5953
- reset: () => void;
5954
- }
5955
- /**
5956
- * Hook for managing 2D physics simulation
5957
- */
5958
- declare function usePhysics2D(options?: UsePhysics2DOptions): UsePhysics2DReturn;
5959
-
5960
- /**
5961
- * Isometric Coordinate Utilities
5962
- *
5963
- * Pure functions for 2:1 diamond isometric coordinate conversion.
5964
- * No React dependencies — usable in any context.
5965
- *
5966
- * @packageDocumentation
5967
- */
5968
- /** Base tile width in pixels (before scale) */
5969
- declare const TILE_WIDTH = 256;
5970
- /** Base tile height in pixels (before scale) — full sprite image height (Kenney 256×512) */
5971
- declare const TILE_HEIGHT = 512;
5972
- /** Floor diamond height — the "walkable surface" portion of the tile (TILE_WIDTH / 2 for 2:1 ratio) */
5973
- declare const FLOOR_HEIGHT = 128;
5974
- /**
5975
- * Measured Y offset from sprite top to the diamond top vertex within a Kenney
5976
- * 256×512 tile sprite. The code previously assumed `TILE_HEIGHT - FLOOR_HEIGHT = 384`,
5977
- * but the actual diamond (dirt_E.png) begins at y = 374 because the 3D side walls
5978
- * occupy 10 extra pixels above the pure 128 px diamond.
5979
- *
5980
- * Use `DIAMOND_TOP_Y * scale` for highlight positioning, unit groundY, feature
5981
- * placement, and hit-testing — NOT `(TILE_HEIGHT - FLOOR_HEIGHT) * scale`.
5982
- * `FLOOR_HEIGHT` remains 128 for the isoToScreen spacing formula (2:1 ratio).
5983
- */
5984
- declare const DIAMOND_TOP_Y = 374;
5985
- /**
5986
- * Feature type → fallback color mapping (when sprites not loaded).
5987
- */
5988
- declare const FEATURE_COLORS: Record<string, string>;
5989
- /**
5990
- * Convert tile grid coordinates to screen pixel coordinates.
5991
- *
5992
- * Uses 2:1 diamond isometric projection:
5993
- * - X increases to the lower-right
5994
- * - Y increases to the lower-left
5995
- *
5996
- * @param tileX - Grid X coordinate
5997
- * @param tileY - Grid Y coordinate
5998
- * @param scale - Render scale factor
5999
- * @param baseOffsetX - Horizontal offset to center the grid
6000
- * @returns Screen position { x, y } of the tile's top-left corner
6001
- */
6002
- declare function isoToScreen(tileX: number, tileY: number, scale: number, baseOffsetX: number): {
6003
- x: number;
6004
- y: number;
6005
- };
6006
- /**
6007
- * Convert screen pixel coordinates back to tile grid coordinates.
6008
- *
6009
- * Inverse of isoToScreen. Snaps to nearest integer tile position.
6010
- *
6011
- * @param screenX - Screen X in pixels
6012
- * @param screenY - Screen Y in pixels
6013
- * @param scale - Render scale factor
6014
- * @param baseOffsetX - Horizontal offset used in isoToScreen
6015
- * @returns Snapped grid position { x, y }
6016
- */
6017
- declare function screenToIso(screenX: number, screenY: number, scale: number, baseOffsetX: number): {
6018
- x: number;
6019
- y: number;
6020
- };
6021
-
6022
- /**
6023
- * Sprite Animation Engine
6024
- *
6025
- * Pure functions for sprite sheet animation: direction inference,
6026
- * frame computation, sheet resolution, and animation state management.
6027
- * No React dependencies — usable in any context.
6028
- *
6029
- * @packageDocumentation
6030
- */
6031
-
6032
- /**
6033
- * Infer facing direction from a movement delta on the isometric grid.
6034
- * dx/dy are tile coordinate deltas (not screen pixels).
6035
- *
6036
- * Isometric grid:
6037
- * NW ← (-x) NE ← (-y)
6038
- * SW ← (+y) SE ← (+x)
6039
- */
6040
- declare function inferDirection(dx: number, dy: number): FacingDirection;
6041
- /**
6042
- * Map a 4-direction facing to the actual sheet file direction + flipX flag.
6043
- * We only have SE and SW sheet images. NE/NW are rendered by flipping:
6044
- * SE → SE sheet, no flip
6045
- * SW → SW sheet, no flip
6046
- * NE → SW sheet, flipX (mirror of SW gives NE)
6047
- * NW → SE sheet, flipX (mirror of SE gives NW)
6048
- */
6049
- declare function resolveSheetDirection(facing: FacingDirection): {
6050
- sheetDir: SpriteDirection;
6051
- flipX: boolean;
6052
- };
6053
- /**
6054
- * Compute the current frame index and whether the animation has finished.
6055
- */
6056
- declare function getCurrentFrame(animName: AnimationName, elapsed: number): {
6057
- frame: number;
6058
- finished: boolean;
6059
- };
6060
- /**
6061
- * Resolve a complete frame descriptor for canvas drawing.
6062
- * Returns null if no sprite sheet URLs are available for this unit.
6063
- */
6064
- declare function resolveFrame(sheetUrls: SpriteSheetUrls | null, frameDims: SpriteFrameDims, animState: UnitAnimationState): ResolvedFrame | null;
6065
- /**
6066
- * Create initial animation state for a unit (idle, facing SE).
6067
- */
6068
- declare function createUnitAnimationState(unitId: string): UnitAnimationState;
6069
- /**
6070
- * Transition to a new animation. Resets elapsed time.
6071
- * Optionally updates direction. Death cannot be overridden.
6072
- */
6073
- declare function transitionAnimation(state: UnitAnimationState, newAnim: AnimationName, direction?: FacingDirection): UnitAnimationState;
6913
+ getPosition: (unitId: string) => {
6914
+ x: number;
6915
+ y: number;
6916
+ } | null;
6917
+ /** Get full physics state for a unit */
6918
+ getState: (unitId: string) => Physics2DState | undefined;
6919
+ /** Apply force to a unit */
6920
+ applyForce: (unitId: string, fx: number, fy: number) => void;
6921
+ /** Set velocity directly */
6922
+ setVelocity: (unitId: string, vx: number, vy: number) => void;
6923
+ /** Set position directly (teleport) */
6924
+ setPosition: (unitId: string, x: number, y: number) => void;
6925
+ /** Run physics tick - call this in your RAF loop */
6926
+ tick: (deltaTime?: number) => void;
6927
+ /** Check collision between two units */
6928
+ checkCollision: (unitIdA: string, unitIdB: string, boundsA: PhysicsBounds, boundsB: PhysicsBounds) => boolean;
6929
+ /** Resolve collision between two units */
6930
+ resolveCollision: (unitIdA: string, unitIdB: string) => void;
6931
+ /** Freeze/unfreeze a unit */
6932
+ setFrozen: (unitId: string, frozen: boolean) => void;
6933
+ /** Get all physics-enabled units */
6934
+ getAllUnits: () => Physics2DState[];
6935
+ /** Reset all physics */
6936
+ reset: () => void;
6937
+ }
6074
6938
  /**
6075
- * Advance animation state by deltaMs.
6076
- * Handles one-shot → queued/idle transitions automatically.
6939
+ * Hook for managing 2D physics simulation
6077
6940
  */
6078
- declare function tickAnimationState(state: UnitAnimationState, deltaMs: number): UnitAnimationState;
6941
+ declare function usePhysics2D(options?: UsePhysics2DOptions): UsePhysics2DReturn;
6079
6942
 
6080
6943
  /**
6081
- * Sprite Sheet Constants
6944
+ * Isometric Coordinate Utilities
6082
6945
  *
6083
- * Standard layout for 8-column × 5-row character sprite sheets.
6084
- * All characters share identical sheet geometry.
6946
+ * Pure functions for 2:1 diamond isometric coordinate conversion.
6947
+ * No React dependencies usable in any context.
6085
6948
  *
6086
6949
  * @packageDocumentation
6087
6950
  */
6088
-
6089
- /** Number of columns in a sprite sheet (frames per row) */
6090
- declare const SHEET_COLUMNS = 8;
6951
+ /** Base tile width in pixels (before scale) */
6952
+ declare const TILE_WIDTH = 256;
6953
+ /** Base tile height in pixels (before scale) — full sprite image height (Kenney 256×512) */
6954
+ declare const TILE_HEIGHT = 512;
6955
+ /** Floor diamond height — the "walkable surface" portion of the tile (TILE_WIDTH / 2 for 2:1 ratio) */
6956
+ declare const FLOOR_HEIGHT = 128;
6091
6957
  /**
6092
- * Standard sprite sheet row layout.
6093
- * Row 0 = idle, Row 1 = walk, Row 2 = attack, Row 3 = hit, Row 4 = death.
6958
+ * Measured Y offset from sprite top to the diamond top vertex within a Kenney
6959
+ * 256×512 tile sprite. The code previously assumed `TILE_HEIGHT - FLOOR_HEIGHT = 384`,
6960
+ * but the actual diamond (dirt_E.png) begins at y = 374 because the 3D side walls
6961
+ * occupy 10 extra pixels above the pure 128 px diamond.
6962
+ *
6963
+ * Use `DIAMOND_TOP_Y * scale` for highlight positioning, unit groundY, feature
6964
+ * placement, and hit-testing — NOT `(TILE_HEIGHT - FLOOR_HEIGHT) * scale`.
6965
+ * `FLOOR_HEIGHT` remains 128 for the isoToScreen spacing formula (2:1 ratio).
6094
6966
  */
6095
- declare const SPRITE_SHEET_LAYOUT: Record<AnimationName, AnimationDef>;
6096
-
6097
- interface GameHudStat extends Omit<StatBadgeProps, "size"> {
6098
- /** Data source entity name */
6099
- source?: string;
6100
- /** Field name in the source */
6101
- field?: string;
6102
- }
6967
+ declare const DIAMOND_TOP_Y = 374;
6103
6968
  /**
6104
- * Schema-style HUD element definition.
6105
- * Used when elements are passed from schema render_ui effects.
6969
+ * Feature type fallback color mapping (when sprites not loaded).
6106
6970
  */
6107
- interface GameHudElement {
6108
- type?: string;
6109
- bind?: string;
6110
- position?: string;
6111
- label?: string;
6112
- /** Direct value (from compiled render-ui effects) */
6113
- value?: number | string;
6114
- /** Icon name or node */
6115
- icon?: React$1.ReactNode;
6116
- /** Display format */
6117
- format?: string;
6118
- /** Max value (for bars/hearts) */
6119
- max?: number;
6120
- }
6121
- interface GameHudProps {
6122
- /** Position of the HUD */
6123
- position?: "top" | "bottom" | "corners" | string;
6124
- /** Stats to display - accepts readonly for compatibility with generated const arrays */
6125
- stats?: readonly GameHudStat[];
6126
- /** Alias for stats (schema compatibility) */
6127
- items?: readonly GameHudStat[];
6128
- /**
6129
- * Schema-style elements array (alternative to stats).
6130
- * Converted to stats internally for backwards compatibility.
6131
- */
6132
- elements?: readonly GameHudElement[];
6133
- /** Size variant */
6134
- size?: "sm" | "md" | "lg";
6135
- /** Additional CSS classes */
6136
- className?: string;
6137
- /** Whether to use a semi-transparent background */
6138
- transparent?: boolean;
6139
- }
6140
- declare function GameHud({ position: propPosition, stats: propStats, items, elements, size, className, transparent, }: GameHudProps): react_jsx_runtime.JSX.Element;
6141
- declare namespace GameHud {
6142
- var displayName: string;
6143
- }
6144
-
6145
- interface MenuOption {
6146
- /** Optional ID (generated from index if not provided) */
6147
- id?: string;
6148
- /** Display label */
6149
- label: string;
6150
- /** Event to emit on click */
6151
- event?: string;
6152
- /** Page to navigate to */
6153
- navigatesTo?: string;
6154
- /** Button variant */
6155
- variant?: "primary" | "secondary" | "ghost" | string;
6156
- /** Whether the option is disabled */
6157
- disabled?: boolean;
6158
- /** Sub-label or description */
6159
- subLabel?: string;
6160
- /** Action identifier (alternative to event) */
6161
- action?: string;
6162
- }
6163
- interface GameMenuProps {
6164
- /** Menu title */
6165
- title: string;
6166
- /** Optional subtitle or version */
6167
- subtitle?: string;
6168
- /** Menu options - accepts readonly for compatibility with generated const arrays */
6169
- options?: readonly MenuOption[];
6170
- /** Alias for options (schema compatibility) */
6171
- menuItems?: readonly MenuOption[];
6172
- /** Called when an option is selected (legacy callback, prefer event bus) */
6173
- onSelect?: (option: MenuOption) => void;
6174
- /** Event bus for emitting UI events (optional, uses hook if not provided) */
6175
- eventBus?: EventBusContextType;
6176
- /** Background image or gradient */
6177
- background?: string;
6178
- /** Logo image URL */
6179
- logo?: string;
6180
- /** Additional CSS classes */
6181
- className?: string;
6182
- }
6183
- declare function GameMenu({ title, subtitle, options, menuItems, onSelect, eventBus: eventBusProp, background, logo, className, }: GameMenuProps): react_jsx_runtime.JSX.Element;
6184
- declare namespace GameMenu {
6185
- var displayName: string;
6186
- }
6187
-
6188
- interface GameOverStat {
6189
- /** Stat label */
6190
- label: string;
6191
- /** Stat value (required if bind is not provided) */
6192
- value?: number | string;
6193
- /**
6194
- * Schema-style data binding (e.g., "player.score").
6195
- * Alternative to value - used when stats come from schema render_ui effects.
6196
- * Component will display 0 as placeholder since runtime binding is not implemented.
6197
- */
6198
- bind?: string;
6199
- /** Display format */
6200
- format?: "number" | "time" | "text";
6201
- /** Icon */
6202
- icon?: React$1.ReactNode;
6203
- }
6204
- interface GameOverAction {
6205
- /** Display label */
6206
- label: string;
6207
- /** Event to emit on click */
6208
- event?: string;
6209
- /** Page to navigate to */
6210
- navigatesTo?: string;
6211
- /** Button variant */
6212
- variant?: "primary" | "secondary" | "ghost";
6213
- }
6214
- interface GameOverScreenProps {
6215
- /** Screen title (e.g., "Game Over", "Victory!") */
6216
- title: string;
6217
- /** Optional message */
6218
- message?: string;
6219
- /** Stats to display */
6220
- stats?: GameOverStat[];
6221
- /** Action buttons */
6222
- actions?: GameOverAction[];
6223
- /** Alias for actions (schema compatibility) */
6224
- menuItems?: GameOverAction[];
6225
- /** Called when an action is selected (legacy callback, prefer event bus) */
6226
- onAction?: (action: GameOverAction) => void;
6227
- /** Event bus for emitting UI events (optional, uses hook if not provided) */
6228
- eventBus?: EventBusContextType;
6229
- /** Victory or defeat variant */
6230
- variant?: "victory" | "defeat" | "neutral";
6231
- /** High score (optional, shows "NEW HIGH SCORE!" if exceeded) */
6232
- highScore?: number | string;
6233
- /** Current score for high score comparison (accepts string for schema bindings) */
6234
- currentScore?: number | string;
6235
- /** Additional CSS classes */
6236
- className?: string;
6237
- }
6238
- declare function GameOverScreen({ title, message, stats, actions, menuItems, onAction, eventBus: eventBusProp, variant, highScore, currentScore, className, }: GameOverScreenProps): react_jsx_runtime.JSX.Element;
6239
- declare namespace GameOverScreen {
6240
- var displayName: string;
6241
- }
6242
-
6971
+ declare const FEATURE_COLORS: Record<string, string>;
6243
6972
  /**
6244
- * InventoryPanel Component
6245
- *
6246
- * Grid-based inventory UI with item selection and tooltips.
6973
+ * Convert tile grid coordinates to screen pixel coordinates.
6247
6974
  *
6248
- * **State categories (closed-circuit compliant):**
6249
- * - Data (items, slots, selectedSlot) → received via props
6250
- * - UI-transient (hoveredSlot, tooltipPosition) local only
6251
- * - Events → emitted via `useEventBus()` (selectSlot, useItem, dropItem)
6975
+ * Uses 2:1 diamond isometric projection:
6976
+ * - X increases to the lower-right
6977
+ * - Y increases to the lower-left
6252
6978
  *
6253
- * Local state is hover/tooltip only — rendering-only concerns.
6254
- */
6255
-
6256
- interface InventoryItem {
6257
- id: string;
6258
- type: string;
6259
- quantity: number;
6260
- sprite?: string;
6261
- name?: string;
6262
- description?: string;
6263
- }
6264
- interface InventoryPanelProps {
6265
- /** Array of items in inventory */
6266
- items: InventoryItem[];
6267
- /** Total number of slots */
6268
- slots: number;
6269
- /** Number of columns in grid */
6270
- columns: number;
6271
- /** Currently selected slot index */
6272
- selectedSlot?: number;
6273
- /** Called when a slot is selected */
6274
- onSelectSlot?: (index: number) => void;
6275
- /** Called when an item is used (double-click or Enter) */
6276
- onUseItem?: (item: InventoryItem) => void;
6277
- /** Called when an item is dropped */
6278
- onDropItem?: (item: InventoryItem) => void;
6279
- /** Declarative event: emits UI:{selectSlotEvent} with { index } when a slot is selected */
6280
- selectSlotEvent?: string;
6281
- /** Declarative event: emits UI:{useItemEvent} with { item } when an item is used */
6282
- useItemEvent?: string;
6283
- /** Declarative event: emits UI:{dropItemEvent} with { item } when an item is dropped */
6284
- dropItemEvent?: string;
6285
- /** Show item tooltips on hover */
6286
- showTooltips?: boolean;
6287
- /** Optional className */
6288
- className?: string;
6289
- /** Slot size in pixels */
6290
- slotSize?: number;
6291
- }
6979
+ * @param tileX - Grid X coordinate
6980
+ * @param tileY - Grid Y coordinate
6981
+ * @param scale - Render scale factor
6982
+ * @param baseOffsetX - Horizontal offset to center the grid
6983
+ * @returns Screen position { x, y } of the tile's top-left corner
6984
+ */
6985
+ declare function isoToScreen(tileX: number, tileY: number, scale: number, baseOffsetX: number): {
6986
+ x: number;
6987
+ y: number;
6988
+ };
6292
6989
  /**
6293
- * Inventory panel component with grid layout
6990
+ * Convert screen pixel coordinates back to tile grid coordinates.
6294
6991
  *
6295
- * @example
6296
- * ```tsx
6297
- * <InventoryPanel
6298
- * items={playerInventory}
6299
- * slots={20}
6300
- * columns={5}
6301
- * selectedSlot={selectedSlot}
6302
- * onSelectSlot={setSelectedSlot}
6303
- * onUseItem={(item) => console.log('Used:', item.name)}
6304
- * showTooltips
6305
- * />
6306
- * ```
6992
+ * Inverse of isoToScreen. Snaps to nearest integer tile position.
6993
+ *
6994
+ * @param screenX - Screen X in pixels
6995
+ * @param screenY - Screen Y in pixels
6996
+ * @param scale - Render scale factor
6997
+ * @param baseOffsetX - Horizontal offset used in isoToScreen
6998
+ * @returns Snapped grid position { x, y }
6307
6999
  */
6308
- declare function InventoryPanel({ items, slots, columns, selectedSlot, onSelectSlot, onUseItem, onDropItem, selectSlotEvent, useItemEvent, dropItemEvent, showTooltips, className, slotSize, }: InventoryPanelProps): React__default.JSX.Element;
7000
+ declare function screenToIso(screenX: number, screenY: number, scale: number, baseOffsetX: number): {
7001
+ x: number;
7002
+ y: number;
7003
+ };
6309
7004
 
6310
7005
  /**
6311
- * DialogueBox Component
6312
- *
6313
- * NPC dialogue display with typewriter effect and choices.
7006
+ * Sprite Animation Engine
6314
7007
  *
6315
- * **State categories (closed-circuit compliant):**
6316
- * - Content (dialogue node, speaker, text, choices) received via props
6317
- * - UI-transient animation (displayedText, isTyping, charIndex, selectedChoice) → local only
6318
- * - Events → emitted via `useEventBus()` (complete, choice, advance)
7008
+ * Pure functions for sprite sheet animation: direction inference,
7009
+ * frame computation, sheet resolution, and animation state management.
7010
+ * No React dependencies usable in any context.
6319
7011
  *
6320
- * Local state is typewriter animation only — an inherently rendering-only
6321
- * concern analogous to Form's `formData`.
7012
+ * @packageDocumentation
6322
7013
  */
6323
7014
 
6324
- interface DialogueChoice {
6325
- text: string;
6326
- action?: string;
6327
- next?: string;
6328
- disabled?: boolean;
6329
- }
6330
- interface DialogueNode {
6331
- id?: string;
6332
- speaker: string;
6333
- text: string;
6334
- portrait?: string;
6335
- choices?: DialogueChoice[];
6336
- autoAdvance?: number;
6337
- }
6338
- /** Event Contract:
6339
- * Emits: UI:COMPLETE
6340
- * Emits: UI:CHOICE
6341
- * Emits: UI:ADVANCE
7015
+ /**
7016
+ * Infer facing direction from a movement delta on the isometric grid.
7017
+ * dx/dy are tile coordinate deltas (not screen pixels).
7018
+ *
7019
+ * Isometric grid:
7020
+ * NW ← (-x) NE ← (-y)
7021
+ * SW ← (+y) SE ← (+x)
6342
7022
  */
6343
- interface DialogueBoxProps {
6344
- /** Current dialogue node to display */
6345
- dialogue: DialogueNode;
6346
- /** Typewriter speed in ms per character (0 = instant) */
6347
- typewriterSpeed?: number;
6348
- /** Position of dialogue box */
6349
- position?: 'top' | 'bottom';
6350
- /** Called when text animation completes */
6351
- onComplete?: () => void;
6352
- /** Called when a choice is selected */
6353
- onChoice?: (choice: DialogueChoice) => void;
6354
- /** Called when dialogue is advanced (no choices) */
6355
- onAdvance?: () => void;
6356
- /** Declarative event: emits UI:{completeEvent} when text animation completes */
6357
- completeEvent?: string;
6358
- /** Declarative event: emits UI:{choiceEvent} with { choice } when a choice is selected */
6359
- choiceEvent?: string;
6360
- /** Declarative event: emits UI:{advanceEvent} when dialogue is advanced */
6361
- advanceEvent?: string;
6362
- /** Optional className */
6363
- className?: string;
6364
- }
7023
+ declare function inferDirection(dx: number, dy: number): FacingDirection;
6365
7024
  /**
6366
- * Dialogue box component with typewriter effect
7025
+ * Map a 4-direction facing to the actual sheet file direction + flipX flag.
7026
+ * We only have SE and SW sheet images. NE/NW are rendered by flipping:
7027
+ * SE → SE sheet, no flip
7028
+ * SW → SW sheet, no flip
7029
+ * NE → SW sheet, flipX (mirror of SW gives NE)
7030
+ * NW → SE sheet, flipX (mirror of SE gives NW)
7031
+ */
7032
+ declare function resolveSheetDirection(facing: FacingDirection): {
7033
+ sheetDir: SpriteDirection;
7034
+ flipX: boolean;
7035
+ };
7036
+ /**
7037
+ * Compute the current frame index and whether the animation has finished.
7038
+ */
7039
+ declare function getCurrentFrame(animName: AnimationName, elapsed: number): {
7040
+ frame: number;
7041
+ finished: boolean;
7042
+ };
7043
+ /**
7044
+ * Resolve a complete frame descriptor for canvas drawing.
7045
+ * Returns null if no sprite sheet URLs are available for this unit.
7046
+ */
7047
+ declare function resolveFrame(sheetUrls: SpriteSheetUrls | null, frameDims: SpriteFrameDims, animState: UnitAnimationState): ResolvedFrame | null;
7048
+ /**
7049
+ * Create initial animation state for a unit (idle, facing SE).
7050
+ */
7051
+ declare function createUnitAnimationState(unitId: string): UnitAnimationState;
7052
+ /**
7053
+ * Transition to a new animation. Resets elapsed time.
7054
+ * Optionally updates direction. Death cannot be overridden.
7055
+ */
7056
+ declare function transitionAnimation(state: UnitAnimationState, newAnim: AnimationName, direction?: FacingDirection): UnitAnimationState;
7057
+ /**
7058
+ * Advance animation state by deltaMs.
7059
+ * Handles one-shot → queued/idle transitions automatically.
7060
+ */
7061
+ declare function tickAnimationState(state: UnitAnimationState, deltaMs: number): UnitAnimationState;
7062
+
7063
+ /**
7064
+ * Sprite Sheet Constants
6367
7065
  *
6368
- * @example
6369
- * ```tsx
6370
- * <DialogueBox
6371
- * dialogue={{
6372
- * speaker: "Old Man",
6373
- * text: "It's dangerous to go alone! Take this.",
6374
- * portrait: "/portraits/oldman.png",
6375
- * choices: [
6376
- * { text: "Thank you!", action: "ACCEPT_ITEM" },
6377
- * { text: "No thanks", next: "decline_node" }
6378
- * ]
6379
- * }}
6380
- * typewriterSpeed={30}
6381
- * onChoice={(choice) => handleChoice(choice)}
6382
- * position="bottom"
6383
- * />
6384
- * ```
7066
+ * Standard layout for 8-column × 5-row character sprite sheets.
7067
+ * All characters share identical sheet geometry.
7068
+ *
7069
+ * @packageDocumentation
6385
7070
  */
6386
- declare function DialogueBox({ dialogue, typewriterSpeed, position, onComplete, onChoice, onAdvance, completeEvent, choiceEvent, advanceEvent, className, }: DialogueBoxProps): React__default.JSX.Element;
7071
+
7072
+ /** Number of columns in a sprite sheet (frames per row) */
7073
+ declare const SHEET_COLUMNS = 8;
7074
+ /**
7075
+ * Standard sprite sheet row layout.
7076
+ * Row 0 = idle, Row 1 = walk, Row 2 = attack, Row 3 = hit, Row 4 = death.
7077
+ */
7078
+ declare const SPRITE_SHEET_LAYOUT: Record<AnimationName, AnimationDef>;
6387
7079
 
6388
7080
  /**
6389
7081
  * BattleBoard
@@ -7998,37 +8690,6 @@ declare const springOscillator: PhysicsPreset;
7998
8690
 
7999
8691
  declare const ALL_PRESETS: PhysicsPreset[];
8000
8692
 
8001
- /**
8002
- * CombatLog Component
8003
- *
8004
- * Scrollable log of combat events with icons and colors.
8005
- * Generalized from Trait Wars — removed asset manifest coupling.
8006
- */
8007
-
8008
- type CombatLogEventType = 'attack' | 'defend' | 'heal' | 'move' | 'special' | 'death' | 'spawn';
8009
- interface CombatEvent {
8010
- id: string;
8011
- type: CombatLogEventType;
8012
- message: string;
8013
- timestamp: number;
8014
- actorName?: string;
8015
- targetName?: string;
8016
- value?: number;
8017
- turn?: number;
8018
- }
8019
- interface CombatLogProps {
8020
- events: CombatEvent[];
8021
- maxVisible?: number;
8022
- autoScroll?: boolean;
8023
- showTimestamps?: boolean;
8024
- title?: string;
8025
- className?: string;
8026
- }
8027
- declare function CombatLog({ events, maxVisible, autoScroll, showTimestamps, className, title, }: CombatLogProps): React__default.JSX.Element;
8028
- declare namespace CombatLog {
8029
- var displayName: string;
8030
- }
8031
-
8032
8693
  /**
8033
8694
  * Game Types — Generalized
8034
8695
  *
@@ -8427,65 +9088,6 @@ interface ChartProps {
8427
9088
  }
8428
9089
  declare const Chart: React__default.FC<ChartProps>;
8429
9090
 
8430
- /**
8431
- * Meter Organism Component
8432
- *
8433
- * A gauge/meter component for displaying a value within a range.
8434
- * Supports linear, radial, and segmented display modes.
8435
- *
8436
- * Orbital Component Interface Compliance:
8437
- * - Entity binding with auto-fetch when entity is a string
8438
- * - Event emission via useEventBus (UI:* events)
8439
- * - isLoading and error state props
8440
- * - className for external styling
8441
- */
8442
-
8443
- type MeterVariant = "linear" | "radial" | "segmented";
8444
- interface MeterThreshold {
8445
- value: number;
8446
- color: string;
8447
- label?: string;
8448
- }
8449
- interface MeterAction {
8450
- label: string;
8451
- event?: string;
8452
- navigatesTo?: string;
8453
- variant?: "primary" | "secondary" | "ghost";
8454
- }
8455
- interface MeterProps {
8456
- /** Current value */
8457
- value: number;
8458
- /** Minimum value */
8459
- min?: number;
8460
- /** Maximum value */
8461
- max?: number;
8462
- /** Display label */
8463
- label?: string;
8464
- /** Unit suffix (e.g., '%', 'MB', 'credits') */
8465
- unit?: string;
8466
- /** Display variant */
8467
- variant?: MeterVariant;
8468
- /** Color thresholds */
8469
- thresholds?: readonly MeterThreshold[];
8470
- /** Number of segments (for segmented variant) */
8471
- segments?: number;
8472
- /** Show value text */
8473
- showValue?: boolean;
8474
- /** Size (for radial variant) */
8475
- size?: "sm" | "md" | "lg";
8476
- /** Actions */
8477
- actions?: readonly MeterAction[];
8478
- /** Entity name for schema-driven auto-fetch */
8479
- entity?: string;
8480
- /** Loading state */
8481
- isLoading?: boolean;
8482
- /** Error state */
8483
- error?: Error | null;
8484
- /** Additional CSS classes */
8485
- className?: string;
8486
- }
8487
- declare const Meter: React__default.FC<MeterProps>;
8488
-
8489
9091
  /**
8490
9092
  * Timeline Organism Component
8491
9093
  *
@@ -9115,4 +9717,4 @@ declare namespace WorldMapTemplate {
9115
9717
  var displayName: string;
9116
9718
  }
9117
9719
 
9118
- export { ALL_PRESETS, AR_BOOK_FIELDS, Accordion, type AccordionItem, type AccordionProps, type ActionButtonConfig, ActionButtons, type ActionButtonsProps, Card as ActionCard, type CardProps as ActionCardProps, ActionPalette, type ActionPaletteProps, ActionTile, type ActionTileProps, Alert, type AlertProps, type AlertVariant, AnimatedCounter, type AnimatedCounterProps, 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 BoardTile, 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, BuilderBoard, type BuilderBoardProps, type BuilderComponent, type BuilderPuzzleEntity, type BuilderSlot, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CalendarEvent, CalendarGrid, type CalendarGridProps, 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, Carousel, type CarouselProps, CastleBoard, type CastleBoardProps, type CastleEntity, type CastleSlotContext, CastleTemplate, type CastleTemplateProps, Center, type CenterProps, Chart, type ChartDataPoint$1 as ChartDataPoint, ChartLegend, type ChartLegendItem, type ChartLegendProps, type ChartProps, type ChartSeries, type ChartType, Checkbox, type CheckboxProps, ClassifierBoard, type ClassifierBoardProps, type ClassifierCategory, type ClassifierItem, type ClassifierPuzzleEntity, CodeBlock, type CodeBlockProps, CodeView, type CodeViewProps, CodeViewer, type CodeViewerMode, type CodeViewerProps, CollapsibleSection, type CollapsibleSectionProps, type Column, type CombatActionType, type CombatEffect, type CombatEvent, type CombatEventData, type CombatEventType, CombatLog, type CombatLogEventType, type CombatLogProps, type ConditionalContext, ConditionalWrapper, type ConditionalWrapperProps, ConfettiEffect, type ConfettiEffectProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, Container, type ContainerProps, ContentRenderer, type ContentRendererProps, ControlButton, type ControlButtonProps, type CounterSize, CounterTemplate, type CounterTemplateProps, type CounterVariant, DIAMOND_TOP_Y, DPad, type DPadDirection, type DPadProps, type DamageResult, DashboardGrid, type DashboardGridCell, type DashboardGridProps, DashboardLayout, type DashboardLayoutProps, DataGrid, type DataGridField, type DataGridItemAction, type DataGridProps, DataList, type DataListField, type DataListItemAction, type DataListProps, DataTable, type DataTableProps, DateRangeSelector, type DateRangeSelectorOption, type DateRangeSelectorProps, DayCell, type DayCellProps, DebuggerBoard, type DebuggerBoardProps, type DebuggerLine, type DebuggerPuzzleEntity, 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, type DotSize, type DotState, 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, EventHandlerBoard, type EventHandlerBoardProps, type EventHandlerPuzzleEntity, EventLog, type EventLogEntry, type EventLogProps, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, type FacingDirection, type FilterDefinition, FilterGroup, type FilterGroupProps, type FilterPayload, Flex, type FlexProps, FlipCard, type FlipCardProps, FlipContainer, type FlipContainerProps, 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, type GameAction, 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, type GamePhase, GameShell, type GameShellProps, type GameState, GameTemplate, type GameTemplateProps, type GameUnit, GenericAppTemplate, type GenericAppTemplateProps, GraphCanvas, type GraphCanvasProps, type GraphEdge, type GraphNode, GraphView, type GraphViewEdge, type GraphViewNode, type GraphViewProps, 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, InfiniteScrollSentinel, type InfiniteScrollSentinelProps, 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, Lightbox, type LightboxImage, type LightboxProps, LineChart, type LineChartProps, List, type ListItem, type ListProps, LoadingState, type LoadingStateProps, type MapHero, type MapHex, type MapMarkerData, MapView, type MapViewProps, MarkdownContent, type MarkdownContentProps, MasterDetail, type MasterDetailProps, type MeasurementPoint, 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, type NegotiatorAction, NegotiatorBoard, type NegotiatorBoardProps, type NegotiatorPuzzleEntity, NotifyListener, NumberStepper, type NumberStepperProps, type NumberStepperSize, ObjectRulePanel, type ObjectRulePanelProps, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, type OrbitalVisualizationProps, Overlay, type OverlayProps, type PageBreadcrumb, PageHeader, type PageHeaderProps, type PaginatePayload, Pagination, type PaginationProps, type PayoffEntry, type Physics2DState, type PhysicsBody, type PhysicsBounds, type PhysicsConfig, type PhysicsConstraint, PhysicsManager, type PhysicsPreset, PlatformerCanvas, type PlatformerCanvasProps, type PlatformerPlatform, type PlatformerPlayer, Popover, type PopoverProps, type Position, ProgressBar, type ProgressBarColor, type ProgressBarProps, type ProgressBarVariant, ProgressDots, type ProgressDotsProps, PullToRefresh, type PullToRefreshProps, type PuzzleObjectDef, QuizBlock, type QuizBlockProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, type RangeSliderSize, type RelationOption, RelationSelect, type RelationSelectProps, RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem, type ResolvedFrame, type RowAction, type RuleDefinition, RuleEditor, type RuleEditorProps, 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, SequenceBar, type SequenceBarProps, SequencerBoard, type SequencerBoardProps, type SequencerPuzzleEntity, type SheetUrlResolver, SidePanel, type SidePanelProps, Sidebar, type SidebarItem, type SidebarProps, SignaturePad, type SignaturePadProps, SimpleGrid, type SimpleGridProps, SimulationCanvas, type SimulationCanvasProps, SimulationControls, type SimulationControlsProps, SimulationGraph, type SimulationGraphProps, SimulatorBoard, type SimulatorBoardProps, type SimulatorParameter, type SimulatorPuzzleEntity, Skeleton, type SkeletonProps, type SkeletonVariant, SlotContent, SlotContentRenderer, type SlotItemData, type SortDirection, type SortPayload, SortableList, type SortableListProps, 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, StarRating, type StarRatingPrecision, type StarRatingProps, type StarRatingSize, StatBadge, type StatBadgeProps, StatCard, type StatCardProps, StateArchitectBoard, type StateArchitectBoardProps, type StateArchitectPuzzleEntity, type StateArchitectTransition, StateIndicator, type StateIndicatorProps, StateMachineView, type StateMachineViewProps, StateNode, type StateNodeProps, type StateStyle, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, type StatusDotSize, type StatusDotStatus, type SwipeAction, SwipeableRow, type SwipeableRowProps, 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, type TestCase, Text, TextHighlight, type TextHighlightProps, type TextProps, Textarea, type TextareaProps, ThemeSelector, ThemeToggle, type ThemeToggleProps, TimeSlotCell, type TimeSlotCellProps, 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, TransitionArrow, type TransitionArrowProps, type TransitionBundle, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type TrendIndicatorSize, TypewriterText, type TypewriterTextProps, Typography, type TypographyProps, type TypographyVariant, UISlot, UISlotComponent, UISlotRenderer, type UISlotRendererProps, UncontrolledBattleBoard, type UncontrolledBattleBoardProps, type UnitAnimationState, type UnitTrait, UploadDropZone, type UploadDropZoneProps, type UseGameAudioOptions, type UsePhysics2DOptions, type UsePhysics2DReturn, type UseSpriteAnimationsOptions, type UseSpriteAnimationsResult, VStack, type VStackProps, type VariableDef, VariablePanel, type VariablePanelProps, 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, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, drawSprite, generateCombatMessage, getCurrentFrame, inferDirection, isoToScreen, mapBookData, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, transitionAnimation, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };
9720
+ export { ALL_PRESETS, AR_BOOK_FIELDS, Accordion, type AccordionItem, type AccordionProps, ActionButton$1 as ActionButton, type ActionButtonConfig, type ActionButtonProps, ActionButtons, type ActionButtonsProps, Card as ActionCard, type CardProps as ActionCardProps, ActionPalette, type ActionPaletteProps, ActionTile, type ActionTileProps, type ActivePowerup, Alert, type AlertProps, type AlertVariant, AnimatedCounter, type AnimatedCounterProps, 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 BoardTile, 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, BuilderBoard, type BuilderBoardProps, type BuilderComponent, type BuilderPuzzleEntity, type BuilderSlot, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CalendarEvent, CalendarGrid, type CalendarGridProps, 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, Carousel, type CarouselProps, CastleBoard, type CastleBoardProps, type CastleEntity, type CastleSlotContext, CastleTemplate, type CastleTemplateProps, Center, type CenterProps, Chart, type ChartDataPoint$1 as ChartDataPoint, ChartLegend, type ChartLegendItem, type ChartLegendProps, type ChartProps, type ChartSeries, type ChartType, Checkbox, type CheckboxProps, ChoiceButton, type ChoiceButtonProps, ClassifierBoard, type ClassifierBoardProps, type ClassifierCategory, type ClassifierItem, type ClassifierPuzzleEntity, CodeBlock, type CodeBlockProps, CodeView, type CodeViewProps, CodeViewer, type CodeViewerMode, type CodeViewerProps, CollapsibleSection, type CollapsibleSectionProps, type Column, type CombatActionType, type CombatEffect, type CombatEvent, type CombatEventData, type CombatEventType, CombatLog, type CombatLogEventType, type CombatLogProps, ComboCounter, type ComboCounterProps, type ConditionalContext, ConditionalWrapper, type ConditionalWrapperProps, ConfettiEffect, type ConfettiEffectProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, Container, type ContainerProps, ContentRenderer, type ContentRendererProps, ControlButton, type ControlButtonProps, type CounterSize, CounterTemplate, type CounterTemplateProps, type CounterVariant, type CraftingIngredient, CraftingRecipe, type CraftingRecipeProps, DIAMOND_TOP_Y, DPad, type DPadDirection, type DPadProps, DamageNumber, type DamageNumberProps, type DamageResult, DashboardGrid, type DashboardGridCell, type DashboardGridProps, DashboardLayout, type DashboardLayoutProps, DataGrid, type DataGridField, type DataGridItemAction, type DataGridProps, DataList, type DataListField, type DataListItemAction, type DataListProps, DataTable, type DataTableProps, DateRangeSelector, type DateRangeSelectorOption, type DateRangeSelectorProps, DayCell, type DayCellProps, DebuggerBoard, type DebuggerBoardProps, type DebuggerLine, type DebuggerPuzzleEntity, type DetailField, DetailPanel, type DetailPanelProps, type DetailSection, DialogueBox, type DialogueBoxProps, DialogueBubble, type DialogueBubbleProps, type DialogueChoice, type DialogueNode, type DiffLine, Divider, type DividerOrientation, type DividerProps, type DocumentType, DocumentViewer, type DocumentViewerProps, StateMachineView as DomStateMachineVisualizer, type DotSize, type DotState, 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, EnemyPlate, type EnemyPlateEffect, type EnemyPlateProps, EntityDisplayEvents, type EntityDisplayProps, ErrorBoundary, type ErrorBoundaryProps, ErrorState, type ErrorStateProps, EventBusContextType, EventHandlerBoard, type EventHandlerBoardProps, type EventHandlerPuzzleEntity, EventLog, type EventLogEntry, type EventLogProps, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, type FacingDirection, type FilterDefinition, FilterGroup, type FilterGroupProps, type FilterPayload, Flex, type FlexProps, FlipCard, type FlipCardProps, FlipContainer, type FlipContainerProps, 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, type GameAction, GameAudioContext, type GameAudioContextValue, type GameAudioControls, GameAudioProvider, type GameAudioProviderProps, GameAudioToggle, type GameAudioToggleProps, GameCanvas2D, type GameCanvas2DProps, GameHud, type GameHudElement, type GameHudProps, type GameHudStat, GameMenu, type GameMenuProps, type GameOverAction, GameOverScreen, type GameOverScreenProps, type GameOverStat, type GamePhase, GameShell, type GameShellProps, type GameState, GameTemplate, type GameTemplateProps, type GameUnit, GenericAppTemplate, type GenericAppTemplateProps, GraphCanvas, type GraphCanvasProps, type GraphEdge, type GraphNode, GraphView, type GraphViewEdge, type GraphViewNode, type GraphViewProps, Grid, type GridProps, HStack, type HStackProps, Header, type HeaderProps, Heading, type HeadingProps, HealthBar, type HealthBarProps, HealthPanel, type HealthPanelProps, type HighlightType, IDENTITY_BOOK_FIELDS, Icon, type IconAnimation, type IconProps, type IconSize, InfiniteScrollSentinel, type InfiniteScrollSentinelProps, Input, InputGroup, type InputGroupProps, type InputProps, InventoryGrid, type InventoryGridItem, type InventoryGridProps, type InventoryItem, InventoryPanel, type InventoryPanelProps, IsometricCanvas, type IsometricCanvasProps, IsometricFeature, IsometricTile, IsometricUnit, ItemSlot, type ItemSlotProps, JazariStateMachine, type JazariStateMachineProps, Label, type LabelProps, type LawReference, LawReferenceTooltip, type LawReferenceTooltipProps, Lightbox, type LightboxImage, type LightboxProps, LineChart, type LineChartProps, List, type ListItem, type ListProps, LoadingState, type LoadingStateProps, type MapHero, type MapHex, type MapMarkerData, MapView, type MapViewProps, MarkdownContent, type MarkdownContentProps, MasterDetail, type MasterDetailProps, type MeasurementPoint, MediaGallery, type MediaGalleryProps, type MediaItem, Menu, type MenuItem, type MenuOption, type MenuProps, Meter, type MeterAction, type MeterProps, type MeterThreshold, type MeterVariant, MiniMap, type MiniMapProps, Modal, type ModalProps, type ModalSize, ModalSlot, type ModalSlotProps, type NavItem, Navigation, type NavigationItem, type NavigationProps, type NegotiatorAction, NegotiatorBoard, type NegotiatorBoardProps, type NegotiatorPuzzleEntity, NotifyListener, NumberStepper, type NumberStepperProps, type NumberStepperSize, ObjectRulePanel, type ObjectRulePanelProps, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, type OrbitalVisualizationProps, Overlay, type OverlayProps, type PageBreadcrumb, PageHeader, type PageHeaderProps, type PaginatePayload, Pagination, type PaginationProps, type PayoffEntry, type Physics2DState, type PhysicsBody, type PhysicsBounds, type PhysicsConfig, type PhysicsConstraint, PhysicsManager, type PhysicsPreset, PlatformerCanvas, type PlatformerCanvasProps, type PlatformerPlatform, type PlatformerPlayer, Popover, type PopoverProps, type Position, PowerupSlots, type PowerupSlotsProps, ProgressBar, type ProgressBarColor, type ProgressBarProps, type ProgressBarVariant, ProgressDots, type ProgressDotsProps, PullToRefresh, type PullToRefreshProps, type PuzzleObjectDef, type Quest, QuestTracker, type QuestTrackerProps, QuizBlock, type QuizBlockProps, Radio, type RadioProps, RangeSlider, type RangeSliderProps, type RangeSliderSize, type RelationOption, RelationSelect, type RelationSelectProps, RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem, type ResolvedFrame, ResourceBar, type ResourceBarProps, type ResourceBarResource, ResourceCounter, type ResourceCounterProps, type RowAction, type RuleDefinition, RuleEditor, type RuleEditorProps, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, type ScaledDiagramProps, ScoreBoard, type ScoreBoardProps, ScoreDisplay, type ScoreDisplayProps, SearchInput, type SearchInputProps, type SearchPayload, Section, type SectionProps, Select, type SelectOption, type SelectPayload, type SelectProps, SequenceBar, type SequenceBarProps, SequencerBoard, type SequencerBoardProps, type SequencerPuzzleEntity, type SheetUrlResolver, SidePanel, type SidePanelProps, Sidebar, type SidebarItem, type SidebarProps, SignaturePad, type SignaturePadProps, SimpleGrid, type SimpleGridProps, SimulationCanvas, type SimulationCanvasProps, SimulationControls, type SimulationControlsProps, SimulationGraph, type SimulationGraphProps, SimulatorBoard, type SimulatorBoardProps, type SimulatorParameter, type SimulatorPuzzleEntity, Skeleton, type SkeletonProps, type SkeletonVariant, SlotContent, SlotContentRenderer, type SlotItemData, type SortDirection, type SortPayload, SortableList, type SortableListProps, 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, StarRating, type StarRatingPrecision, type StarRatingProps, type StarRatingSize, StatBadge, type StatBadgeProps, StatCard, type StatCardProps, StatDisplay, type StatDisplayProps, StateArchitectBoard, type StateArchitectBoardProps, type StateArchitectPuzzleEntity, type StateArchitectTransition, StateIndicator, type StateIndicatorProps, StateMachineView, type StateMachineViewProps, StateNode, type StateNodeProps, type StateStyle, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, type StatusDotSize, type StatusDotStatus, StatusEffect, type StatusEffectProps, type SwipeAction, SwipeableRow, type SwipeableRowProps, 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, type TestCase, Text, TextHighlight, type TextHighlightProps, type TextProps, Textarea, type TextareaProps, ThemeSelector, ThemeToggle, type ThemeToggleProps, TimeSlotCell, type TimeSlotCellProps, Timeline, type TimelineItem, type TimelineItemStatus, type TimelineProps, TimerDisplay, type TimerDisplayProps, Toast, type ToastProps, ToastSlot, type ToastSlotProps, type ToastVariant, Tooltip, type TooltipProps, TraitSlot, type TraitSlotProps, type TraitStateMachineDefinition, TraitStateViewer, type TraitStateViewerProps, type TraitTransition, TransitionArrow, type TransitionArrowProps, type TransitionBundle, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type TrendIndicatorSize, TurnIndicator, type TurnIndicatorProps, TurnPanel, type TurnPanelAction, type TurnPanelProps, TypewriterText, type TypewriterTextProps, Typography, type TypographyProps, type TypographyVariant, UISlot, UISlotComponent, UISlotRenderer, type UISlotRendererProps, UncontrolledBattleBoard, type UncontrolledBattleBoardProps, type UnitAnimationState, type UnitCommand, UnitCommandBar, type UnitCommandBarProps, type UnitTrait, UploadDropZone, type UploadDropZoneProps, type UseGameAudioOptions, type UsePhysics2DOptions, type UsePhysics2DReturn, type UseSpriteAnimationsOptions, type UseSpriteAnimationsResult, VStack, type VStackProps, type VariableDef, VariablePanel, type VariablePanelProps, ViolationAlert, type ViolationAlertProps, type ViolationRecord, WaypointMarker, type WaypointMarkerProps, WizardContainer, type WizardContainerProps, WizardNavigation, type WizardNavigationProps, WizardProgress, type WizardProgressProps, type WizardProgressStep, type WizardStep, WorldMapBoard, type WorldMapBoardProps, type WorldMapEntity, type WorldMapSlotContext, WorldMapTemplate, type WorldMapTemplateProps, XPBar, type XPBarProps, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, drawSprite, generateCombatMessage, getCurrentFrame, inferDirection, isoToScreen, mapBookData, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, transitionAnimation, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };