@almadar/shell-web 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/AvlGlyph-PIXU6QH5.js +5 -0
  2. package/dist/AvlStateMachine-CKGMECMG.js +8 -0
  3. package/dist/{AvlTransitionDetail-63SD6GZF.js → AvlTransitionDetail-QZX6G5KJ.js} +4 -5
  4. package/dist/AvlTransitionExplainer-26WLEIC6.js +11 -0
  5. package/dist/BehaviorView-JLZ4PKWY.js +10 -0
  6. package/dist/{FileTree-BCFnBEuQ.d.ts → FileTree-B3GDAjaQ.d.ts} +131 -4
  7. package/dist/{FlowCanvas-AUMTWMNG.js → FlowCanvas-RPII4V24.js} +10 -13
  8. package/dist/{FlowCanvas-3JRMNJLV.css → FlowCanvas-VWUPMBKB.css} +189 -191
  9. package/dist/{GameAudioProvider-ceM_n0ey.d.ts → GameAudioProvider-D7wo5ryN.d.ts} +1 -1
  10. package/dist/{KernelEngineContext-CcxGYtlr.d.ts → KernelEngineContext-CPeWQMAz.d.ts} +15 -2
  11. package/dist/ModuleCard-NJD6JQGD.js +6 -0
  12. package/dist/{OrbInspector-QCPEPUPH.js → OrbInspector-OWWKPOBF.js} +10 -13
  13. package/dist/{OrbInspector-MHLJ6OEE.css → OrbInspector-VMTMZHNQ.css} +189 -191
  14. package/dist/{Select-B-iDdnvE.d.ts → Select-C2Uq6t86.d.ts} +1 -1
  15. package/dist/{UISlotRenderer-KVFO6J7R.css → UISlotRenderer-BIS6KT7T.css} +189 -191
  16. package/dist/{UISlotRenderer-C7WWOK43.js → UISlotRenderer-PY7FIJXN.js} +10 -13
  17. package/dist/avl/index.css +189 -191
  18. package/dist/avl/index.d.ts +19 -7
  19. package/dist/avl/index.js +157 -26
  20. package/dist/{chunk-TUPZWTRE.js → chunk-2WGR4TDJ.js} +464 -35
  21. package/dist/{chunk-SP5CDJ6K.js → chunk-4YJ53G7S.js} +3 -3
  22. package/dist/{chunk-HH5KSMH5.js → chunk-7N6ZPHQ5.js} +1 -1
  23. package/dist/{chunk-CPLN6NBQ.js → chunk-AGVSO4WY.js} +2 -3
  24. package/dist/{chunk-UXLE3IPR.js → chunk-FAKU5F62.js} +205 -4
  25. package/dist/{chunk-TXAUOLWZ.js → chunk-M74BCDBQ.js} +1 -1
  26. package/dist/{chunk-LHP2TK7O.js → chunk-MS4K3K2R.js} +2908 -4574
  27. package/dist/{chunk-K4MOPSEL.js → chunk-OWNG4JZI.js} +3 -4
  28. package/dist/{chunk-AB3X7QTE.js → chunk-PRLHKBXG.js} +1 -2
  29. package/dist/{chunk-X3DMMX27.js → chunk-VHC2M26B.js} +1 -1
  30. package/dist/{chunk-E6KA4J6N.js → chunk-VUIACGDU.js} +3 -4
  31. package/dist/{chunk-ROICKAU7.js → chunk-YYIHRIDH.js} +1 -1
  32. package/dist/{chunk-3VZ36ZKO.js → chunk-ZDRDJKYB.js} +5 -2
  33. package/dist/components/index.css +189 -191
  34. package/dist/components/index.d.ts +417 -173
  35. package/dist/components/index.js +14 -17
  36. package/dist/core.d.ts +3 -3
  37. package/dist/{fx-CmQjnHmT.d.ts → fx-Br8zjvu9.d.ts} +6 -6
  38. package/dist/index.d.ts +4 -0
  39. package/dist/index.js +2 -2
  40. package/dist/{kernel-client-TZKGHJRY.js → kernel-client-JW6OH5FX.js} +24 -3
  41. package/dist/{kernel-wire-wNdAPfhJ.d.ts → kernel-wire-DGAySGhX.d.ts} +7 -0
  42. package/dist/lib/index.d.ts +2 -3
  43. package/dist/lib/index.js +2 -3
  44. package/dist/providers/index.css +189 -191
  45. package/dist/providers/index.d.ts +6 -8
  46. package/dist/providers/index.js +10 -14
  47. package/dist/runtime/index.css +189 -191
  48. package/dist/runtime/index.d.ts +6 -1
  49. package/dist/runtime/index.js +10 -13
  50. package/dist/test-support.js +2 -2
  51. package/dist/{paintDispatch-CuJLsr9Y.d.ts → verificationRegistry-oopV1J1n.d.ts} +127 -15
  52. package/package.json +8 -36
  53. package/dist/AvlGlyph-EPJKFEO3.js +0 -6
  54. package/dist/AvlStateMachine-RKZIKNGC.js +0 -9
  55. package/dist/AvlTransitionExplainer-ZBTLOM3T.js +0 -12
  56. package/dist/BehaviorView-YS5G4GNB.js +0 -11
  57. package/dist/Canvas3DHost-BkZQB5l2.d.ts +0 -552
  58. package/dist/ModuleCard-QHDGK5XK.js +0 -7
  59. package/dist/avl-3d-context-BycmO6tG.d.ts +0 -201
  60. package/dist/avl-schema-parser-CtJxJ9KU.d.ts +0 -132
  61. package/dist/avl-zoom-state-CKMVuBFg.d.ts +0 -17
  62. package/dist/chunk-4T3P43NS.js +0 -1133
  63. package/dist/chunk-DZBQA2OW.js +0 -176
  64. package/dist/chunk-EOWMARUB.js +0 -16
  65. package/dist/chunk-GFXCPUMX.js +0 -1334
  66. package/dist/chunk-ILZ7ORX7.js +0 -432
  67. package/dist/three/index.css +0 -503
  68. package/dist/three/index.d.ts +0 -1185
  69. package/dist/three/index.js +0 -3908
  70. package/dist/verificationRegistry-CVrcxG1s.d.ts +0 -122
@@ -1,552 +0,0 @@
1
- import { AnimationName, Asset, ScenePos, EventEmit, EventKey } from '@almadar/core';
2
- import React__default from 'react';
3
- import * as THREE from 'three';
4
- import { D as DrawableNode } from './paintDispatch-CuJLsr9Y.js';
5
-
6
- /**
7
- * Sprite Sheet Animation Types
8
- *
9
- * Type definitions for frame-based sprite sheet animation system.
10
- * Supports standard 8-column × 5-row character sheets.
11
- *
12
- * `AnimationName`, `AnimationDef`, and `SpriteDirection` are canonically owned
13
- * by `@almadar/core` (they travel with a `spriteSheet`-role `Asset.url`'s
14
- * resolved atlas contract) — re-exported here so existing call sites in this
15
- * package don't need to change their import path.
16
- *
17
- * @packageDocumentation
18
- */
19
-
20
- /** Unit facing direction on screen (4 isometric directions) */
21
- type FacingDirection = 'se' | 'sw' | 'ne' | 'nw';
22
- /** A resolved frame ready to draw on canvas */
23
- interface ResolvedFrame {
24
- /** URL of the sprite sheet image */
25
- sheetUrl: string;
26
- /** Source X in the sheet (pixel offset) */
27
- sx: number;
28
- /** Source Y in the sheet (pixel offset) */
29
- sy: number;
30
- /** Source width (frame width) */
31
- sw: number;
32
- /** Source height (frame height) */
33
- sh: number;
34
- /** Whether to flip horizontally when drawing (for NE/NW directions) */
35
- flipX: boolean;
36
- /** When true, canvas should apply sine-bob breathing offset (frozen idle frame) */
37
- applyBreathing?: boolean;
38
- }
39
- /** Per-unit animation state tracked in the animation system */
40
- interface UnitAnimationState {
41
- /** Unit identifier */
42
- unitId: string;
43
- /** Current animation playing */
44
- animation: AnimationName;
45
- /** Current facing direction */
46
- direction: FacingDirection;
47
- /** Current frame index within the animation */
48
- frame: number;
49
- /** Elapsed time in current animation (ms) */
50
- elapsed: number;
51
- /** Animation to play after current one-shot completes (null = idle) */
52
- queuedAnimation: AnimationName | null;
53
- /** Whether the current one-shot animation has finished its last frame */
54
- finished: boolean;
55
- }
56
- /** Frame dimensions for a sprite sheet */
57
- interface SpriteFrameDims {
58
- /** Width of a single frame in pixels */
59
- width: number;
60
- /** Height of a single frame in pixels */
61
- height: number;
62
- }
63
- /**
64
- * Sheet URLs per facing. Legacy hand-drawn packs ship only se/sw (ne/nw are
65
- * mirror-flipped — a cheat that shows the face while walking away); 3D-baked
66
- * sheets also ship real ne/nw, which `resolveFrame` prefers when present.
67
- */
68
- interface SpriteSheetUrls {
69
- /** Southeast-facing sheet URL */
70
- se: string;
71
- /** Southwest-facing sheet URL */
72
- sw: string;
73
- /** Northeast-facing sheet URL (real back view; omitted → mirror of sw) */
74
- ne?: string;
75
- /** Northwest-facing sheet URL (real back view; omitted → mirror of se) */
76
- nw?: string;
77
- }
78
-
79
- /**
80
- * Game Types — Generalized
81
- *
82
- * Core type definitions for tactical game state.
83
- * Extracted from Trait Wars and generalized for any game project.
84
- */
85
- interface Position {
86
- x: number;
87
- y: number;
88
- }
89
- interface GameUnit {
90
- id: string;
91
- name: string;
92
- characterType: string;
93
- team: 'player' | 'enemy' | 'neutral';
94
- position: Position;
95
- health: number;
96
- maxHealth: number;
97
- movement: number;
98
- attack: number;
99
- defense: number;
100
- traits: UnitTrait[];
101
- }
102
- interface UnitTrait {
103
- name: string;
104
- currentState: string;
105
- states: string[];
106
- cooldown: number;
107
- }
108
- interface BoardTile {
109
- terrain: string;
110
- unitId?: string;
111
- isBlocked?: boolean;
112
- }
113
- type GamePhase = 'observation' | 'planning' | 'execution' | 'tick';
114
- interface GameState {
115
- board: BoardTile[][];
116
- units: Record<string, GameUnit>;
117
- currentPhase: GamePhase;
118
- currentTurn: number;
119
- activeTeam: 'player' | 'enemy' | 'neutral';
120
- selectedUnitId?: string;
121
- validMoves: Position[];
122
- attackTargets: Position[];
123
- }
124
- type GameAction = {
125
- type: 'SELECT_UNIT';
126
- unitId: string;
127
- } | {
128
- type: 'MOVE_UNIT';
129
- from: Position;
130
- to: Position;
131
- } | {
132
- type: 'ATTACK';
133
- attackerId: string;
134
- targetId: string;
135
- } | {
136
- type: 'END_TURN';
137
- } | {
138
- type: 'EXECUTE_TRAITS';
139
- };
140
- /**
141
- * Create the initial game state with board and units.
142
- *
143
- * @param {number} width - Board width in tiles
144
- * @param {number} height - Board height in tiles
145
- * @param {GameUnit[]} units - Initial units to place on the board
146
- * @param {string} [defaultTerrain] - Default terrain type for empty tiles
147
- * @returns {GameState} The initialized game state
148
- */
149
- declare function createInitialGameState(width: number, height: number, units: GameUnit[], defaultTerrain?: string): GameState;
150
- /**
151
- * Calculate valid movement positions for a unit.
152
- *
153
- * Returns all tiles within the unit's movement range that are
154
- * not blocked and don't contain other units.
155
- *
156
- * @param {GameState} state - Current game state
157
- * @param {string} unitId - ID of the unit to calculate moves for
158
- * @returns {Position[]} Array of valid move positions
159
- */
160
- declare function calculateValidMoves(state: GameState, unitId: string): Position[];
161
- /**
162
- * Calculate valid attack targets for a unit.
163
- *
164
- * Returns adjacent positions containing enemy units that can be attacked.
165
- *
166
- * @param {GameState} state - Current game state
167
- * @param {string} unitId - ID of the unit to calculate targets for
168
- * @returns {Position[]} Array of valid attack target positions
169
- */
170
- declare function calculateAttackTargets(state: GameState, unitId: string): Position[];
171
-
172
- /** A single isometric tile on the grid */
173
- interface IsometricTile {
174
- /** Optional unique identifier (required for 3D rendering) */
175
- id?: string;
176
- /** Grid x coordinate */
177
- x: number;
178
- /** Grid y coordinate (2D) */
179
- y: number;
180
- /** Grid z coordinate (3D alternative to y) */
181
- z?: number;
182
- /** Terrain type key (e.g., 'grass', 'stone', 'water') - 2D */
183
- terrain?: string;
184
- /** Tile type for visual rendering (3D) */
185
- type?: string;
186
- /** Direct sprite URL override (bypasses getTerrainSprite resolver) */
187
- terrainSprite?: Asset;
188
- /** Fallback/override fill color (2D + 3D) — bypasses the terrain color map. `.lolo`-computed. */
189
- color?: string;
190
- /** Whether units can traverse this tile (default true) */
191
- passable?: boolean;
192
- /** Movement cost for pathfinding (default 1) */
193
- movementCost?: number;
194
- /** Optional tile type for visual variants */
195
- tileType?: string;
196
- /** Elevation offset for 3D rendering */
197
- elevation?: number;
198
- /** 3D model URL (GLB format) for GameCanvas3D — rendered via ModelLoader with box fallback */
199
- modelUrl?: Asset;
200
- /** Y-axis rotation in degrees (3D) — orients directional pieces (track corners, road bends) */
201
- rotation?: number;
202
- }
203
- /** A unit positioned on the isometric grid */
204
- type IsometricUnit = {
205
- /** Unique unit identifier */
206
- id: string;
207
- /** Current grid position (2D format) */
208
- position?: {
209
- x: number;
210
- y: number;
211
- };
212
- /** Grid x coordinate (3D format) */
213
- x?: number;
214
- /** Grid y coordinate (3D format) */
215
- y?: number;
216
- /** Grid z coordinate (3D format) */
217
- z?: number;
218
- /** Static sprite URL (used when no sprite sheet animation) */
219
- sprite?: Asset;
220
- /** Sprite-sheet atlas JSON URL (e.g. `.../guardian-sprite-sheet.json`).
221
- * When set, the canvas loads the atlas and crops/animates a single frame
222
- * by animation state instead of drawing the whole sheet. */
223
- spriteSheet?: Asset;
224
- /** 3D model URL (GLB format) for GameCanvas3D — rendered via ModelLoader with box fallback */
225
- modelUrl?: Asset;
226
- /** Unit archetype key for sprite resolution */
227
- unitType?: string;
228
- /** Hero identifier for sprite sheet lookup */
229
- heroId?: string;
230
- /** Display name rendered below the unit */
231
- name?: string;
232
- /** Team affiliation for coloring */
233
- team?: 'player' | 'enemy' | 'neutral';
234
- /** Faction for 3D rendering (player/enemy/neutral) */
235
- faction?: 'player' | 'enemy' | 'neutral';
236
- /** Fallback/override tint color (2D + 3D) — bypasses the team/faction color map. `.lolo`-computed. */
237
- tint?: string;
238
- /** Current health */
239
- health?: number;
240
- /** Maximum health */
241
- maxHealth?: number;
242
- /** Trait attachments for state display */
243
- traits?: UnitTrait[];
244
- /** Previous position for movement trail ghost */
245
- previousPosition?: {
246
- x: number;
247
- y: number;
248
- };
249
- /** Elevation offset for 3D rendering */
250
- elevation?: number;
251
- /** Animation name — driven by the LOLO state machine; renderer defaults to 'idle' */
252
- animation?: AnimationName;
253
- /** Frame index within the animation — driven by the LOLO state machine; renderer defaults to 0 */
254
- frame?: number;
255
- /** Y-axis heading in radians (3D) — travel/facing direction. Orients the unit model and
256
- * drives the `chase` camera (behind + above, looking along heading). Driving boards set this. */
257
- heading?: number;
258
- };
259
- /** A map feature (resource, building, portal, etc.) */
260
- type IsometricFeature = {
261
- /** Optional unique identifier (required for 3D rendering) */
262
- id?: string;
263
- /** Grid x coordinate */
264
- x: number;
265
- /** Grid y coordinate (2D) */
266
- y: number;
267
- /** Grid z coordinate (3D alternative to y) */
268
- z?: number;
269
- /** Feature type key (e.g., 'goldMine', 'castle', 'portal') */
270
- type: string;
271
- /** Direct sprite URL override (bypasses getFeatureSprite resolver) */
272
- sprite?: Asset;
273
- /** 3D model URL (GLB format) for GameCanvas3D */
274
- assetUrl?: Asset;
275
- /** Color override for 3D rendering */
276
- color?: string;
277
- /** Elevation offset for 3D rendering */
278
- elevation?: number;
279
- /** Y-axis rotation in radians (3D) — orients directional features (arches, signs, docks). */
280
- rotation?: number;
281
- };
282
- /** Camera state for pan/zoom */
283
- interface CameraState {
284
- /** Camera X offset in pixels */
285
- x: number;
286
- /** Camera Y offset in pixels */
287
- y: number;
288
- /** Zoom level (1.0 = 100%) */
289
- zoom: number;
290
- }
291
-
292
- /**
293
- * Canvas3DHost — the thin 3D draw-host: the `canvas` host's 3D painter backend
294
- * (the R3F "vessel" behind the neutral drawables), the exact 3D analogue of the
295
- * 2D `Painter2D` seam. Reached only via the lazy `@almadar/ui/.../game/three`
296
- * subpath so three.js never enters a 2D bundle.
297
- *
298
- * The 3D twin of Canvas2D: the board authors a `drawables` list (the neutral
299
- * `draw-*` children) and this host maps each descriptor through `Drawable3D` to a
300
- * three.js mesh (a raw descriptor NEVER reaches `<group>{children}` — R3F throws).
301
- * It owns NO game data — tiles, units, features, selection, health bars and labels
302
- * are all `draw-*` children composed in `.lolo`, not props here. Only view state
303
- * (camera, error boundary) is local.
304
- *
305
- * Camera: `isometric`/`perspective`/`top-down` frame the scene bounds (derived from
306
- * the drawn descriptors); `follow`/`chase` track the neutral core `Camera.target`
307
- * (forwarded as `followTarget`), falling back to the scene centre.
308
- *
309
- * Interaction: keyboard maps to semantic events (device-agnostic input). Pointer
310
- * click on a tagged drawable (a descriptor carrying `DrawableBase.id`) raycasts to
311
- * the mesh and walks up to the tagged ancestor → `unitClickEvent {unitId,x,z}`;
312
- * a click that hits no tagged mesh falls back to the ground-plane cell raycast →
313
- * `tileClickEvent`. Pointer hover/feature events are accepted but not yet
314
- * emitted (docs/Almadar_Std_Gaps.md S-CANVAS3D-HOVER-DEAD).
315
- *
316
- * @packageDocumentation
317
- */
318
-
319
- /** Camera mode for 3D view.
320
- * - `follow` tracks `followTarget` (the neutral `Camera.target`) from a fixed offset.
321
- * - `chase` sits behind + above the target. */
322
- type CameraMode = 'isometric' | 'perspective' | 'top-down' | 'front' | 'follow' | 'chase';
323
- /** Map orientation */
324
- type MapOrientation = 'standard' | 'rotated';
325
- /** Overlay control */
326
- type OverlayControl = 'default' | 'hidden' | 'minimap';
327
- /** Single light's tunable knobs (ambient/directional share this shape). */
328
- interface CanvasLightConfig {
329
- intensity?: number;
330
- color?: string;
331
- position?: [number, number, number];
332
- }
333
- /** Hemisphere (sky/ground) light config. */
334
- interface CanvasHemisphereConfig {
335
- intensity?: number;
336
- color?: string;
337
- groundColor?: string;
338
- }
339
- /** Point light config — `position` is required since a point light has no
340
- * meaningful default placement. */
341
- interface CanvasPointLightConfig {
342
- intensity?: number;
343
- color?: string;
344
- position: [number, number, number];
345
- distance?: number;
346
- decay?: number;
347
- }
348
- /** Canvas-level 3D light rig, authored as data. Every field is optional — an
349
- * omitted field falls back to today's fixed rig (the defaults live in `Lighting3D`). */
350
- interface CanvasLighting {
351
- /** Default intensity 0.6, color '#ffffff'. */
352
- ambient?: CanvasLightConfig;
353
- /** Default intensity 0.8, color '#ffffff', position [10, 20, 10]. */
354
- directional?: CanvasLightConfig;
355
- /** Default intensity 0.3, color '#87ceeb', groundColor '#362d1d'. */
356
- hemisphere?: CanvasHemisphereConfig;
357
- /** Additional point lights. Default none. */
358
- points?: CanvasPointLightConfig[];
359
- /** Procedural environment for PBR reflection (metals/glass). 'room' uses three's
360
- * RoomEnvironment via PMREMGenerator — no network fetch. Default 'none' (today's
361
- * look). */
362
- environment?: 'room' | 'none';
363
- /** Output tone mapping. Default 'aces' (R3F's filmic default — the stylized look
364
- * every existing scene was authored under); 'none' renders material colors
365
- * faithfully (raw three default — what GLB viewers show). */
366
- toneMapping?: 'aces' | 'none';
367
- }
368
- /** Canvas-level post-processing stack. Every field is optional — an omitted field
369
- * means that pass is not mounted. */
370
- interface CanvasPost {
371
- bloom?: {
372
- intensity?: number;
373
- threshold?: number;
374
- smoothing?: number;
375
- };
376
- vignette?: {
377
- offset?: number;
378
- darkness?: number;
379
- };
380
- }
381
- /** Props for GameCanvas3D component */
382
- interface Canvas3DHostProps {
383
- /** Additional CSS classes */
384
- className?: string;
385
- /** Declarative JSX drawable children — rendered in a hidden DOM mount where they
386
- * register their descriptors via DrawableRegistryContext (same contract as Canvas2D). */
387
- children?: React__default.ReactNode;
388
- /** Neutral drawable descriptors — the same `children` vocabulary as Canvas2D. The
389
- * host maps each through `Drawable3D` to a mesh. */
390
- drawables?: DrawableNode[];
391
- /** Loading state indicator */
392
- isLoading?: boolean;
393
- /** Error state */
394
- error?: string | null;
395
- /** Fog of war data (accepted for API parity; presentation-only). */
396
- fogOfWar?: boolean[][];
397
- /** Map orientation (data attribute). */
398
- orientation?: MapOrientation;
399
- /** Camera mode */
400
- cameraMode?: CameraMode;
401
- /** Follow-camera target in scene space (the neutral core `Camera.target`). */
402
- followTarget?: ScenePos;
403
- /** Show grid */
404
- showGrid?: boolean;
405
- /** Show coordinates overlay (accepted for API parity). */
406
- showCoordinates?: boolean;
407
- /** Show tile information (accepted for API parity). */
408
- showTileInfo?: boolean;
409
- /** Overlay control mode (data attribute). */
410
- overlay?: OverlayControl;
411
- /** Enable shadows */
412
- shadows?: boolean;
413
- /** Background color */
414
- /** Overrides the theme's categorical palette (`series-1…N`) for this scene. */
415
- series?: string[];
416
- backgroundColor?: string;
417
- /** Declarative event: tile click. Emitted from a ground-plane raycast → scene cell
418
- * `{ x, z }` (the FSM validates the cell). `tileId` is optional — the neutral host
419
- * has no per-tile id, and the board FSMs key off the coordinate. */
420
- tileClickEvent?: EventEmit<{
421
- x: number;
422
- z: number;
423
- tileId?: string;
424
- type?: string;
425
- terrain?: string;
426
- elevation?: number;
427
- }>;
428
- /** Declarative event: unit click. Emitted `{ unitId, x, z }` when the raycast hits a
429
- * mesh tagged with a descriptor `id` (or lands on a ground cell whose descriptor
430
- * carries an `id`). */
431
- unitClickEvent?: EventEmit<{
432
- unitId: string;
433
- x: number;
434
- z: number;
435
- unitType?: string;
436
- name?: string;
437
- team?: string;
438
- faction?: string;
439
- health?: number;
440
- maxHealth?: number;
441
- }>;
442
- /** Declarative event: feature click. Accepted; not yet emitted (see `tileClickEvent`). */
443
- featureClickEvent?: EventEmit<{
444
- featureId: string;
445
- x: number;
446
- z: number;
447
- type?: string;
448
- elevation?: number;
449
- }>;
450
- /** Declarative event: canvas (background) click. */
451
- canvasClickEvent?: EventEmit<{
452
- clientX: number;
453
- clientY: number;
454
- button: number;
455
- }>;
456
- /** Declarative event: tile hover. Accepted; not yet emitted (see `tileClickEvent`). */
457
- tileHoverEvent?: EventEmit<{
458
- tileId: string;
459
- x: number;
460
- z: number;
461
- type?: string;
462
- }>;
463
- /** Declarative event: tile leave. */
464
- tileLeaveEvent?: EventEmit<Record<string, never>>;
465
- /** Declarative event: unit animation. */
466
- unitAnimationEvent?: EventEmit<{
467
- unitId: string;
468
- state: string;
469
- timestamp: number;
470
- }>;
471
- /** Declarative event: camera change. */
472
- cameraChangeEvent?: EventEmit<{
473
- position: {
474
- x: number;
475
- y: number;
476
- z: number;
477
- };
478
- timestamp: number;
479
- }>;
480
- /** Loading message */
481
- loadingMessage?: string;
482
- /** Unit draw-size multiplier (accepted for API parity; sizing is drawable-authored). */
483
- unitScale?: number;
484
- /** Board zoom — the neutral `Camera.zoom`. Dollies the camera: the framing
485
- * distance is divided by `zoom` (undefined/1 = default framing; <= 0 ignored). */
486
- zoom?: number;
487
- /** Enable the orbit camera controls. Default true; `follow`/`chase` modes always
488
- * disable them (the follow camera is authoritative). */
489
- controlsEnabled?: boolean;
490
- /** Maps a keydown `e.code` — optionally prefixed `Mod+` (⌘/Ctrl), `Shift+`, `Alt+` in that order — to the board's SEMANTIC event (device-agnostic input), emitted as `UI:{event}`; keystrokes inside inputs/textareas never route. */
491
- keyMap?: Record<string, EventKey>;
492
- /** Maps a keyup `e.code` — optionally prefixed `Mod+` (⌘/Ctrl), `Shift+`, `Alt+` in that order — to the board's SEMANTIC event, emitted as `UI:{event}`; keystrokes inside inputs/textareas never route. */
493
- keyUpMap?: Record<string, EventKey>;
494
- /** Side-view world size in pixels (accepted for API parity). */
495
- worldWidth?: number;
496
- /** Side-view world size in pixels (accepted for API parity). */
497
- worldHeight?: number;
498
- /** Pixel→world-unit divisor for pixel-authored (side-view) scenes: world size =
499
- * scene size ÷ `pixelsPerUnit`. Omitted → 1 world unit per scene unit (grid boards). */
500
- pixelsPerUnit?: number;
501
- /** Perspective field of view in degrees — the neutral `Camera.fov`. Default 45. */
502
- fov?: number;
503
- /** Orbit the mode's framing position around the vertical axis through the target, in radians — the neutral `Camera.azimuth`. */
504
- azimuth?: number;
505
- /** Orbit height angle above the ground plane, in radians — the neutral `Camera.elevation`
506
- * (perspective mode). Omitted → the mode's fixed framing height. */
507
- elevation?: number;
508
- /** 3D scene light rig as data — ambient/directional/hemisphere/point lights + optional
509
- * 'room' environment. Omitted → the standard fixed rig (this host's current
510
- * hardcoded lights, unchanged). */
511
- lighting?: CanvasLighting;
512
- /** 3D post-processing stack — bloom + vignette. Omitted → no composer pass mounted. */
513
- post?: CanvasPost;
514
- /** Enter scene-edit mode: click selects/deselects a drawable, drag moves it. */
515
- editable?: boolean;
516
- /** The currently-selected drawable id (controlled); `null`/undefined = none. */
517
- selectedId?: string | null;
518
- /** Fired on a click that changes selection — before `selectEvent`. */
519
- onSelect?: (id: string | null) => void;
520
- /** Fired once per drag gesture, on drop — before `moveEvent`. */
521
- onMove?: (id: string, x: number, y: number) => void;
522
- /** Declarative selection event, `UI:{selectEvent} { id }`. */
523
- selectEvent?: EventEmit<{
524
- id: string | null;
525
- }>;
526
- /** Declarative move event, `UI:{moveEvent} { id, x, y }` — fired once on drop. */
527
- moveEvent?: EventEmit<{
528
- id: string;
529
- x: number;
530
- y: number;
531
- }>;
532
- }
533
- /** Imperative handle for GameCanvas3D */
534
- interface Canvas3DHostHandle {
535
- /** Get current camera position */
536
- getCameraPosition: () => THREE.Vector3 | null;
537
- /** Set camera position */
538
- setCameraPosition: (x: number, y: number, z: number) => void;
539
- /** Look at a specific point */
540
- lookAt: (x: number, y: number, z: number) => void;
541
- /** Reset camera to default position */
542
- resetCamera: () => void;
543
- /** Take a screenshot */
544
- screenshot: () => string | null;
545
- }
546
- /**
547
- * Canvas3DHost — thin 3D draw-host. Walks `drawables` through `Drawable3D`.
548
- */
549
- declare const Canvas3DHost: React__default.ForwardRefExoticComponent<Canvas3DHostProps & React__default.RefAttributes<Canvas3DHostHandle>>;
550
-
551
- export { Canvas3DHost as c, calculateAttackTargets as n, calculateValidMoves as o, createInitialGameState as p };
552
- export type { BoardTile as B, CanvasPointLightConfig as C, FacingDirection as F, GameAction as G, IsometricTile as I, Position as P, ResolvedFrame as R, SpriteSheetUrls as S, UnitAnimationState as U, IsometricUnit as a, IsometricFeature as b, Canvas3DHostHandle as d, Canvas3DHostProps as e, SpriteFrameDims as f, CanvasLighting as g, CanvasPost as h, CameraState as i, GamePhase as j, GameState as k, GameUnit as l, UnitTrait as m };
@@ -1,7 +0,0 @@
1
- export { ModuleCard } from './chunk-E6KA4J6N.js';
2
- import './chunk-HH5KSMH5.js';
3
- import './chunk-AB3X7QTE.js';
4
- import './chunk-DZBQA2OW.js';
5
- import './chunk-UXLE3IPR.js';
6
- import './chunk-4YXBKHHM.js';
7
- import './chunk-G7DCAZ22.js';