@almadar/ui 5.105.0 → 5.107.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.
- package/dist/avl/index.cjs +1903 -4193
- package/dist/avl/index.js +998 -3288
- package/dist/components/core/atoms/index.d.ts +1 -1
- package/dist/components/core/molecules/index.d.ts +1 -1
- package/dist/components/core/organisms/index.d.ts +1 -1
- package/dist/components/core/templates/index.d.ts +2 -2
- package/dist/components/game/{2d/atoms → atoms}/ActionButton.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/ChoiceButton.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/ControlButton.d.ts +1 -1
- package/dist/components/game/atoms/DrawShape.d.ts +50 -0
- package/dist/components/game/atoms/DrawSprite.d.ts +47 -0
- package/dist/components/game/atoms/DrawText.d.ts +31 -0
- package/dist/components/game/{2d/atoms → atoms}/GameAudioToggle.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/GameIcon.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/ItemSlot.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/MiniMap.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/ResourceCounter.d.ts +2 -2
- package/dist/components/game/{2d/atoms → atoms}/ScoreDisplay.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/Sprite.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/StateIndicator.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/StatusEffect.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/WaypointMarker.d.ts +1 -1
- package/dist/components/game/{shared/hooks → hooks}/useCamera.d.ts +1 -1
- package/dist/components/game/{shared/hooks → hooks}/useUnitSpriteAtlas.d.ts +2 -2
- package/dist/components/game/{shared → lib}/index.d.ts +1 -2
- package/dist/components/game/{shared/lib → lib}/puzzleObject.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/ActionTile.d.ts +1 -1
- package/dist/components/game/molecules/Canvas.d.ts +96 -0
- package/dist/components/game/molecules/Canvas2D.d.ts +120 -0
- package/dist/components/game/{2d/molecules → molecules}/ControlGrid.d.ts +1 -1
- package/dist/components/game/molecules/DrawShapeLayer.d.ts +19 -0
- package/dist/components/game/molecules/DrawSpriteLayer.d.ts +21 -0
- package/dist/components/game/molecules/DrawTextLayer.d.ts +22 -0
- package/dist/components/game/{2d/molecules → molecules}/GameHud.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/InventoryGrid.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/ResourceBar.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/StatBadge.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/StateNode.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/TraitSlot.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/TraitStateViewer.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/TransitionArrow.d.ts +1 -1
- package/dist/components/game/{2d/molecules → molecules}/index.d.ts +9 -16
- package/dist/components/game/patterns.d.ts +20 -0
- package/dist/components/game/{shared/providers → providers}/GameAudioProvider.d.ts +1 -1
- package/dist/components/game/{2d/templates → templates}/GameTemplate.d.ts +1 -1
- package/dist/components/game/{3d → three}/atoms/SpriteBillboard3D.d.ts +1 -1
- package/dist/components/game/{shared → three}/hooks/useGameCanvas3DEvents.d.ts +4 -3
- package/dist/components/game/{3d → three}/index.cjs +766 -3008
- package/dist/components/game/{3d → three}/index.css +3 -3
- package/dist/components/game/{3d → three}/index.d.ts +0 -1
- package/dist/components/game/{3d → three}/index.js +622 -2863
- package/dist/components/game/{shared → three}/lib/game3dAssetManifest.d.ts +1 -1
- package/dist/components/game/three/molecules/GameCanvas3D.d.ts +175 -0
- package/dist/components/game/{3d → three}/molecules/index.d.ts +9 -12
- package/dist/components/game/{3d → three}/patterns.d.ts +0 -4
- package/dist/components/index.cjs +2315 -4418
- package/dist/components/index.js +1412 -3508
- package/dist/lib/drawable/Drawable3D.d.ts +20 -0
- package/dist/lib/drawable/contract.d.ts +68 -0
- package/dist/lib/drawable/hitTest.d.ts +23 -0
- package/dist/lib/drawable/mesh3d.d.ts +28 -0
- package/dist/lib/drawable/paintDispatch.d.ts +22 -0
- package/dist/lib/drawable/projector.d.ts +14 -0
- package/dist/lib/drawable/projector3d.d.ts +20 -0
- package/dist/lib/imageCache.d.ts +9 -0
- package/dist/lib/painter2d.d.ts +81 -0
- package/dist/lib/webPainter2d.d.ts +7 -0
- package/dist/marketing/index.cjs +10 -0
- package/dist/marketing/index.js +10 -0
- package/dist/providers/index.cjs +1748 -4042
- package/dist/providers/index.js +956 -3250
- package/dist/runtime/index.cjs +1758 -4048
- package/dist/runtime/index.js +972 -3262
- package/package.json +13 -13
- package/dist/components/game/2d/molecules/Canvas2D.d.ts +0 -175
- package/dist/components/game/2d/molecules/SideCanvas2D.d.ts +0 -36
- package/dist/components/game/2d/organisms/BuilderBoard.d.ts +0 -60
- package/dist/components/game/2d/organisms/ClassifierBoard.d.ts +0 -66
- package/dist/components/game/2d/organisms/DebuggerBoard.d.ts +0 -61
- package/dist/components/game/2d/organisms/EventHandlerBoard.d.ts +0 -42
- package/dist/components/game/2d/organisms/NegotiatorBoard.d.ts +0 -56
- package/dist/components/game/2d/organisms/SequencerBoard.d.ts +0 -69
- package/dist/components/game/2d/organisms/SimulatorBoard.d.ts +0 -58
- package/dist/components/game/2d/organisms/StateArchitectBoard.d.ts +0 -61
- package/dist/components/game/3d/atoms/EventMarker3D.d.ts +0 -17
- package/dist/components/game/3d/molecules/FeatureMesh3D.d.ts +0 -21
- package/dist/components/game/3d/molecules/GameCanvas3D.d.ts +0 -259
- package/dist/components/game/3d/molecules/SideScene3D.d.ts +0 -31
- package/dist/components/game/3d/molecules/TileMesh3D.d.ts +0 -28
- package/dist/components/game/3d/molecules/UnitMesh3D.d.ts +0 -29
- package/dist/components/game/3d/organisms/GameBoard3D.d.ts +0 -66
- package/dist/components/game/3d/templates/GameCanvas3DBattleTemplate.d.ts +0 -82
- package/dist/components/game/3d/templates/GameCanvas3DCastleTemplate.d.ts +0 -87
- package/dist/components/game/3d/templates/GameCanvas3DWorldMapTemplate.d.ts +0 -95
- package/dist/components/game/shared/effects.d.ts +0 -253
- /package/dist/components/game/{2d/atoms → atoms}/ComboCounter.d.ts +0 -0
- /package/dist/components/game/{2d/atoms → atoms}/DamageNumber.d.ts +0 -0
- /package/dist/components/game/{2d/atoms → atoms}/DialogueBubble.d.ts +0 -0
- /package/dist/components/game/{2d/atoms → atoms}/GameCard.d.ts +0 -0
- /package/dist/components/game/{2d/atoms → atoms}/HealthBar.d.ts +0 -0
- /package/dist/components/game/{2d/atoms → atoms}/TimerDisplay.d.ts +0 -0
- /package/dist/components/game/{2d/atoms → atoms}/TurnIndicator.d.ts +0 -0
- /package/dist/components/game/{shared/hooks → hooks}/useGameAudio.d.ts +0 -0
- /package/dist/components/game/{shared → hooks}/useImageCache.d.ts +0 -0
- /package/dist/components/game/{shared → lib}/boardEntity.d.ts +0 -0
- /package/dist/components/game/{shared/lib → lib}/editorUtils.d.ts +0 -0
- /package/dist/components/game/{shared → lib}/game.d.ts +0 -0
- /package/dist/components/game/{shared → lib}/isometric.d.ts +0 -0
- /package/dist/components/game/{shared → lib}/isometricTypes.d.ts +0 -0
- /package/dist/components/game/{shared → lib}/makeAsset.d.ts +0 -0
- /package/dist/components/game/{shared/lib → lib}/mechanics.d.ts +0 -0
- /package/dist/components/game/{shared/lib → lib}/physicsPresets.d.ts +0 -0
- /package/dist/components/game/{shared/lib → lib}/physicsTypes.d.ts +0 -0
- /package/dist/components/game/{shared → lib}/spriteAnimation.d.ts +0 -0
- /package/dist/components/game/{shared → lib}/spriteAnimationTypes.d.ts +0 -0
- /package/dist/components/game/{shared → lib}/spriteSheetConstants.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/ActionPalette.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/EventLog.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/GameMenu.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/ObjectRulePanel.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/RuleEditor.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/SequenceBar.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/StateGraph.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/StateJsonView.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/VariablePanel.d.ts +0 -0
- /package/dist/components/game/{2d/templates → templates}/GameShell.d.ts +0 -0
- /package/dist/components/game/{shared → three}/game3dTheme.d.ts +0 -0
- /package/dist/components/game/{shared → three}/hooks/useAssetLoader.d.ts +0 -0
- /package/dist/components/game/{shared → three}/hooks/useRaycaster.d.ts +0 -0
- /package/dist/components/game/{shared → three}/hooks/useSceneGraph.d.ts +0 -0
- /package/dist/components/game/{shared → three}/hooks/useThree.d.ts +0 -0
- /package/dist/components/game/{shared → three}/lib/AssetLoader.d.ts +0 -0
- /package/dist/components/game/{shared → three}/lib/culling.d.ts +0 -0
- /package/dist/components/game/{shared → three}/lib/grid3D.d.ts +0 -0
- /package/dist/components/game/{3d → three}/molecules/Camera3D.d.ts +0 -0
- /package/dist/components/game/{3d → three}/molecules/Canvas3DErrorBoundary.d.ts +0 -0
- /package/dist/components/game/{3d → three}/molecules/Canvas3DLoadingState.d.ts +0 -0
- /package/dist/components/game/{3d → three}/molecules/GameCamera3D.d.ts +0 -0
- /package/dist/components/game/{3d → three}/molecules/Lighting3D.d.ts +0 -0
- /package/dist/components/game/{3d → three}/molecules/ModelLoader.d.ts +0 -0
- /package/dist/components/game/{3d → three}/molecules/Scene3D.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.107.0",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -52,22 +52,22 @@
|
|
|
52
52
|
"require": "./dist/lib/index.cjs"
|
|
53
53
|
},
|
|
54
54
|
"./components/organisms/game/three": {
|
|
55
|
-
"types": "./dist/components/game/
|
|
56
|
-
"import": "./dist/components/game/
|
|
57
|
-
"require": "./dist/components/game/
|
|
55
|
+
"types": "./dist/components/game/three/index.d.ts",
|
|
56
|
+
"import": "./dist/components/game/three/index.js",
|
|
57
|
+
"require": "./dist/components/game/three/index.cjs"
|
|
58
58
|
},
|
|
59
59
|
"./components/molecules/game/three": {
|
|
60
|
-
"types": "./dist/components/game/
|
|
61
|
-
"import": "./dist/components/game/
|
|
62
|
-
"require": "./dist/components/game/
|
|
60
|
+
"types": "./dist/components/game/three/index.d.ts",
|
|
61
|
+
"import": "./dist/components/game/three/index.js",
|
|
62
|
+
"require": "./dist/components/game/three/index.cjs"
|
|
63
63
|
},
|
|
64
64
|
"./components/organisms/game/TraitStateViewer": {
|
|
65
|
-
"import": "./components/game/
|
|
66
|
-
"types": "./components/game/
|
|
65
|
+
"import": "./components/game/molecules/TraitStateViewer.tsx",
|
|
66
|
+
"types": "./components/game/molecules/TraitStateViewer.tsx"
|
|
67
67
|
},
|
|
68
68
|
"./components/organisms/game/TraitSlot": {
|
|
69
|
-
"import": "./components/game/
|
|
70
|
-
"types": "./components/game/
|
|
69
|
+
"import": "./components/game/molecules/TraitSlot.tsx",
|
|
70
|
+
"types": "./components/game/molecules/TraitSlot.tsx"
|
|
71
71
|
},
|
|
72
72
|
"./templates": {
|
|
73
73
|
"import": "./templates/index.ts",
|
|
@@ -117,10 +117,10 @@
|
|
|
117
117
|
"access": "public"
|
|
118
118
|
},
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"@almadar/core": "^10.
|
|
120
|
+
"@almadar/core": "^10.20.0",
|
|
121
121
|
"@almadar/evaluator": ">=2.9.2",
|
|
122
122
|
"@almadar/logger": "^1.3.0",
|
|
123
|
-
"@almadar/patterns": ">=2.
|
|
123
|
+
"@almadar/patterns": ">=2.97.0",
|
|
124
124
|
"@almadar/runtime": "^6.21.0",
|
|
125
125
|
"@almadar/std": ">=6.4.1",
|
|
126
126
|
"@almadar/syntax": ">=1.3.1",
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas2D
|
|
3
|
-
*
|
|
4
|
-
* The unified 2D game renderer (GR-6 consolidation). One canvas, a `projection`
|
|
5
|
-
* axis, layered render passes, opt-in clock. Absorbs IsometricCanvas (iso/hex/flat),
|
|
6
|
-
* GameCanvas2D (→ `projection:'free'`, pixel-direct draw) and PlatformerCanvas
|
|
7
|
-
* (→ `projection:'side'` + `platforms[]`).
|
|
8
|
-
*
|
|
9
|
-
* Pure renderer: every game datum arrives via props; only view state (viewport,
|
|
10
|
-
* camera, sprite cache) is local. The clock is LOLO-driven by default — `animate`
|
|
11
|
-
* opts a board into an internal RAF, but the default is OFF.
|
|
12
|
-
*
|
|
13
|
-
* Projection modes:
|
|
14
|
-
* - `isometric | hex | flat`: 2:1 diamond / pointy-top hex / orthographic square,
|
|
15
|
-
* all via `isoToScreen` — identical to IsometricCanvas.
|
|
16
|
-
* - `free`: tile/unit/feature x,y are SCREEN PIXELS drawn directly (no diamond),
|
|
17
|
-
* reusing the same sprite-drawing passes.
|
|
18
|
-
* - `side`: side-view pixel space with `platforms[]` (AABB) + follow-camera +
|
|
19
|
-
* keyboard input — an isolated branch ported from PlatformerCanvas.
|
|
20
|
-
*
|
|
21
|
-
* @packageDocumentation
|
|
22
|
-
*/
|
|
23
|
-
import * as React from 'react';
|
|
24
|
-
import type { Asset, AssetUrl, EventEmit } from '@almadar/core';
|
|
25
|
-
import type { IsometricTile, IsometricUnit, IsometricFeature, ActiveEffect } from '../../shared/isometricTypes';
|
|
26
|
-
import type { ResolvedFrame } from '../../shared/spriteAnimationTypes';
|
|
27
|
-
import type { UiError } from '../../../core/atoms/types';
|
|
28
|
-
export interface TileCoord {
|
|
29
|
-
x: number;
|
|
30
|
-
y: number;
|
|
31
|
-
}
|
|
32
|
-
/** Projection axis. iso/hex/flat use `isoToScreen`; `free` is pixel-direct; `side`
|
|
33
|
-
* is side-view pixel space with platforms (gravity lives in the LOLO model). */
|
|
34
|
-
export type Projection = 'isometric' | 'hex' | 'flat' | 'free' | 'side';
|
|
35
|
-
/** Camera behavior. `pan-zoom` = user drag+wheel; `follow` = track the player/
|
|
36
|
-
* selected unit; `fixed` = no camera motion. */
|
|
37
|
-
export type CameraMode = 'pan-zoom' | 'follow' | 'fixed';
|
|
38
|
-
/** A side-view platform (AABB rect). `side` projection only. */
|
|
39
|
-
export interface Platform {
|
|
40
|
-
x: number;
|
|
41
|
-
y: number;
|
|
42
|
-
width: number;
|
|
43
|
-
height: number;
|
|
44
|
-
type?: 'ground' | 'platform' | 'hazard' | 'goal';
|
|
45
|
-
}
|
|
46
|
-
/** A side-view player. The model owns physics; Canvas2D only interpolates+draws. */
|
|
47
|
-
export interface SidePlayer {
|
|
48
|
-
x: number;
|
|
49
|
-
y: number;
|
|
50
|
-
width?: number;
|
|
51
|
-
height?: number;
|
|
52
|
-
vx?: number;
|
|
53
|
-
vy?: number;
|
|
54
|
-
grounded?: boolean;
|
|
55
|
-
facingRight?: boolean;
|
|
56
|
-
/** Animation state name — driven by the LOLO state machine (e.g. "idle", "walk", "jump"). */
|
|
57
|
-
animation?: string;
|
|
58
|
-
/** Frame index within the animation — driven by the LOLO state machine. */
|
|
59
|
-
frame?: number;
|
|
60
|
-
}
|
|
61
|
-
export interface Canvas2DProps {
|
|
62
|
-
/** Additional CSS classes */
|
|
63
|
-
className?: string;
|
|
64
|
-
/** Loading state indicator */
|
|
65
|
-
isLoading?: boolean;
|
|
66
|
-
/** Error state */
|
|
67
|
-
error?: UiError | null;
|
|
68
|
-
/** Projection axis (default 'isometric'). Replaces the old `tileLayout`. */
|
|
69
|
-
projection?: Projection;
|
|
70
|
-
/** Tiles to render */
|
|
71
|
-
tiles?: IsometricTile[];
|
|
72
|
-
/** Units on the board */
|
|
73
|
-
units?: IsometricUnit[];
|
|
74
|
-
/** Features (resources, portals, buildings, etc.) */
|
|
75
|
-
features?: IsometricFeature[];
|
|
76
|
-
/** Active visual effects, drawn after units */
|
|
77
|
-
effects?: ActiveEffect[];
|
|
78
|
-
/** Side-view platforms (AABB). `projection:'side'` only. */
|
|
79
|
-
platforms?: Platform[];
|
|
80
|
-
/** Side-view player. `projection:'side'` only. */
|
|
81
|
-
player?: SidePlayer;
|
|
82
|
-
/** Background image (tiled behind iso/hex/flat/free; stretched in side).
|
|
83
|
-
* A bare URL string is accepted as shorthand for a standalone backdrop. */
|
|
84
|
-
backgroundImage?: AssetUrl | Asset;
|
|
85
|
-
/** Currently selected unit ID */
|
|
86
|
-
selectedUnitId?: string | null;
|
|
87
|
-
/** Valid move positions (pulsing green highlights) */
|
|
88
|
-
validMoves?: TileCoord[];
|
|
89
|
-
/** Attack target positions (pulsing red highlights) */
|
|
90
|
-
attackTargets?: TileCoord[];
|
|
91
|
-
/** Hovered tile position */
|
|
92
|
-
hoveredTile?: TileCoord | null;
|
|
93
|
-
/** Emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
94
|
-
tileClickEvent?: EventEmit<{
|
|
95
|
-
x: number;
|
|
96
|
-
y: number;
|
|
97
|
-
}>;
|
|
98
|
-
/** Emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
99
|
-
unitClickEvent?: EventEmit<{
|
|
100
|
-
unitId: string;
|
|
101
|
-
}>;
|
|
102
|
-
/** Emits UI:{tileHoverEvent} with { x, y } on tile hover */
|
|
103
|
-
tileHoverEvent?: EventEmit<{
|
|
104
|
-
x: number;
|
|
105
|
-
y: number;
|
|
106
|
-
}>;
|
|
107
|
-
/** Emits UI:{tileLeaveEvent} with {} on tile leave */
|
|
108
|
-
tileLeaveEvent?: EventEmit<Record<string, never>>;
|
|
109
|
-
/** Maps a keydown `e.code` → the board's SEMANTIC event, e.g. `{ ArrowLeft: "LEFT", KeyA: "LEFT", Space: "JUMP" }`.
|
|
110
|
-
* The input layer emits `UI:<event>` so the FSM stays device-agnostic — keyboard and d-pad converge on the same events. */
|
|
111
|
-
keyMap?: Record<string, string>;
|
|
112
|
-
/** Maps a keyup `e.code` → the board's SEMANTIC event, e.g. `{ ArrowLeft: "STOP" }`. Omit a key to ignore its release (e.g. jump). */
|
|
113
|
-
keyUpMap?: Record<string, string>;
|
|
114
|
-
/** Camera behavior (default 'pan-zoom'). */
|
|
115
|
-
camera?: CameraMode;
|
|
116
|
-
/** Render scale (0.4 = 40% zoom). */
|
|
117
|
-
scale?: number;
|
|
118
|
-
/** Extra scale multiplier for unit draw size. 1 = default. */
|
|
119
|
-
unitScale?: number;
|
|
120
|
-
/** Toggle minimap overlay. */
|
|
121
|
-
showMinimap?: boolean;
|
|
122
|
-
/** Opt-in internal RAF clock. DEFAULT OFF — the LOLO state machine drives the clock. */
|
|
123
|
-
animate?: {
|
|
124
|
-
fps: number;
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* Opt-in: smooth-interpolate unit positions between LOLO tick snapshots
|
|
128
|
-
* via a `requestAnimationFrame` loop (same fixed-timestep technique
|
|
129
|
-
* `SideCanvas2D` already uses for the player), instead of the default
|
|
130
|
-
* tick-rate-cadence redraw. DEFAULT OFF — for continuous-movement boards
|
|
131
|
-
* only; tile-snapped boards see no behavior change.
|
|
132
|
-
*/
|
|
133
|
-
interpolateUnits?: boolean;
|
|
134
|
-
/** Show debug grid lines and coordinates. */
|
|
135
|
-
debug?: boolean;
|
|
136
|
-
/** Ratio of unit draw height to scaledFloorHeight. Default 1.5. */
|
|
137
|
-
spriteHeightRatio?: number;
|
|
138
|
-
/** Max unit draw width as a ratio of scaledTileWidth. Default 0.6. */
|
|
139
|
-
spriteMaxWidthRatio?: number;
|
|
140
|
-
/** Override for the diamond-top Y offset within the tile sprite. */
|
|
141
|
-
diamondTopY?: number;
|
|
142
|
-
/** Resolve terrain sprite from terrain key — a bare URL or an Asset (atlas sub-texture ref). */
|
|
143
|
-
getTerrainSprite?: (terrain: string) => string | Asset | undefined;
|
|
144
|
-
/** Resolve feature sprite from feature type key — a bare URL or an Asset. */
|
|
145
|
-
getFeatureSprite?: (featureType: string) => string | Asset | undefined;
|
|
146
|
-
/** Resolve unit static sprite — a bare URL or an Asset. */
|
|
147
|
-
getUnitSprite?: (unit: IsometricUnit) => string | Asset | undefined;
|
|
148
|
-
/** Resolve animated sprite sheet frame for a unit */
|
|
149
|
-
resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
|
|
150
|
-
/** Additional sprite URLs to preload (e.g., effect sprites) */
|
|
151
|
-
effectSpriteUrls?: string[];
|
|
152
|
-
/** Draw canvas effects after units (canvas-specific: cannot be declarative) */
|
|
153
|
-
onDrawEffects?: (ctx: CanvasRenderingContext2D, animTime: number, getImage: (url: string) => HTMLImageElement | undefined) => void;
|
|
154
|
-
/** Player sprite URL for `side`. */
|
|
155
|
-
playerSprite?: Asset;
|
|
156
|
-
/** Platform-type → tile sprite URL map for `side`. */
|
|
157
|
-
tileSprites?: Record<string, Asset>;
|
|
158
|
-
/** Background color for `side` (when no backgroundImage). */
|
|
159
|
-
bgColor?: string;
|
|
160
|
-
/** World dimensions for `side` follow-camera clamp. */
|
|
161
|
-
worldWidth?: number;
|
|
162
|
-
worldHeight?: number;
|
|
163
|
-
/** Manifest mapping entity keys to resolved Asset objects (fallback resolution). */
|
|
164
|
-
assetManifest?: {
|
|
165
|
-
terrains?: Record<string, Asset>;
|
|
166
|
-
units?: Record<string, Asset>;
|
|
167
|
-
features?: Record<string, Asset>;
|
|
168
|
-
effects?: Record<string, Asset>;
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
export declare function Canvas2D({ className, isLoading, error, projection, tiles: _tilesPropRaw, units: _unitsPropRaw, features: _featuresPropRaw, effects: _effectsPropRaw, platforms, player, backgroundImage: backgroundImageRaw, selectedUnitId, validMoves, attackTargets, hoveredTile, tileClickEvent, unitClickEvent, tileHoverEvent, tileLeaveEvent, keyMap, keyUpMap, camera, scale, unitScale, showMinimap, animate, interpolateUnits, debug, spriteHeightRatio, spriteMaxWidthRatio, diamondTopY: diamondTopYProp, getTerrainSprite, getFeatureSprite, getUnitSprite, resolveUnitFrame, effectSpriteUrls, onDrawEffects, playerSprite, tileSprites, bgColor, worldWidth, worldHeight, assetManifest, }: Canvas2DProps): React.JSX.Element;
|
|
172
|
-
export declare namespace Canvas2D {
|
|
173
|
-
var displayName: string;
|
|
174
|
-
}
|
|
175
|
-
export default Canvas2D;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SideCanvas2D
|
|
3
|
-
*
|
|
4
|
-
* Side-view platformer renderer — extracted from Canvas2D's private `SideView` branch.
|
|
5
|
-
* Physics is NOT here (it lives in the LOLO model); this only interpolates+draws the
|
|
6
|
-
* authoritative `player`/`platforms` props and translates keyboard input into the
|
|
7
|
-
* board's semantic events via keyMap/keyUpMap.
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
|
-
import * as React from 'react';
|
|
12
|
-
import type { Asset, AssetUrl } from '@almadar/core';
|
|
13
|
-
import type { ActiveEffect } from '../../shared/isometricTypes';
|
|
14
|
-
import type { Platform, SidePlayer } from './Canvas2D';
|
|
15
|
-
export interface SideCanvas2DProps {
|
|
16
|
-
player?: SidePlayer;
|
|
17
|
-
platforms: Platform[];
|
|
18
|
-
worldWidth: number;
|
|
19
|
-
worldHeight: number;
|
|
20
|
-
canvasWidth: number;
|
|
21
|
-
canvasHeight: number;
|
|
22
|
-
follow: boolean;
|
|
23
|
-
bgColor: string;
|
|
24
|
-
backgroundImage?: AssetUrl | Asset;
|
|
25
|
-
playerSprite?: Asset;
|
|
26
|
-
tileSprites?: Record<string, Asset>;
|
|
27
|
-
effects: ActiveEffect[];
|
|
28
|
-
keyMap?: Record<string, string>;
|
|
29
|
-
keyUpMap?: Record<string, string>;
|
|
30
|
-
className?: string;
|
|
31
|
-
}
|
|
32
|
-
export declare function SideCanvas2D({ player, platforms, worldWidth, worldHeight, canvasWidth, canvasHeight, follow, bgColor, backgroundImage: backgroundImageRaw, playerSprite, tileSprites, effects, keyMap, keyUpMap, className, }: SideCanvas2DProps): React.JSX.Element;
|
|
33
|
-
export declare namespace SideCanvas2D {
|
|
34
|
-
var displayName: string;
|
|
35
|
-
}
|
|
36
|
-
export default SideCanvas2D;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BuilderBoard
|
|
3
|
-
*
|
|
4
|
-
* Component-snapping game board. The player places components
|
|
5
|
-
* onto slots in a blueprint. Correct placement completes the build.
|
|
6
|
-
*
|
|
7
|
-
* Good for: architecture, circuits, molecules, system design stories.
|
|
8
|
-
*
|
|
9
|
-
* Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
|
|
10
|
-
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import type { AssetUrl, EventEmit, EntityRow, Asset } from '@almadar/core';
|
|
13
|
-
import type { DisplayStateProps } from '../../../core/organisms/types';
|
|
14
|
-
/** A draggable build component (UI value DTO read off the entity). */
|
|
15
|
-
export interface BuilderComponent {
|
|
16
|
-
id: string;
|
|
17
|
-
label: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
iconEmoji?: string;
|
|
20
|
-
/** Image URL icon (takes precedence over iconEmoji) */
|
|
21
|
-
iconUrl?: AssetUrl;
|
|
22
|
-
category?: string;
|
|
23
|
-
}
|
|
24
|
-
/** A blueprint slot accepting a component (UI value DTO read off the entity).
|
|
25
|
-
* Mirrors the state machine's `BuilderBoardSlotsItem`: the required component
|
|
26
|
-
* and the currently placed component both live on the entity. */
|
|
27
|
-
export interface BuilderSlot {
|
|
28
|
-
id: string;
|
|
29
|
-
label?: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
requiredComponentId: string;
|
|
32
|
-
placedComponentId?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface BuilderBoardProps extends DisplayStateProps {
|
|
35
|
-
/** Puzzle board-state entity (single row or array). The board reads
|
|
36
|
-
* `components` / `slots` arrays plus `attempts` / `result` off the row —
|
|
37
|
-
* the state machine is the single source of truth for placements. */
|
|
38
|
-
entity?: EntityRow | readonly EntityRow[];
|
|
39
|
-
completeEvent?: EventEmit<{
|
|
40
|
-
success: boolean;
|
|
41
|
-
attempts: number;
|
|
42
|
-
}>;
|
|
43
|
-
/** Emits UI:{placeEvent} with { slotId, componentId } on component placement. */
|
|
44
|
-
placeEvent?: EventEmit<{
|
|
45
|
-
slotId: string;
|
|
46
|
-
componentId: string;
|
|
47
|
-
}>;
|
|
48
|
-
/** Emits UI:{checkEvent} with {} when the player checks the build. */
|
|
49
|
-
checkEvent?: EventEmit<Record<string, never>>;
|
|
50
|
-
/** Emits UI:{playAgainEvent} with {} on play again / reset. */
|
|
51
|
-
playAgainEvent?: EventEmit<Record<string, never>>;
|
|
52
|
-
/** Optional per-semantic-key asset overrides for icons (correct/incorrect/reset/build). */
|
|
53
|
-
assetManifest?: {
|
|
54
|
-
ui?: Record<string, Asset>;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export declare function BuilderBoard({ entity, completeEvent, placeEvent, checkEvent, playAgainEvent, assetManifest, className, }: BuilderBoardProps): React.JSX.Element | null;
|
|
58
|
-
export declare namespace BuilderBoard {
|
|
59
|
-
var displayName: string;
|
|
60
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ClassifierBoard
|
|
3
|
-
*
|
|
4
|
-
* Drag-and-drop classification game. The player sorts items
|
|
5
|
-
* into the correct category buckets. All items must be correctly
|
|
6
|
-
* classified to win.
|
|
7
|
-
*
|
|
8
|
-
* Good for: taxonomy, pattern recognition, sorting stories.
|
|
9
|
-
*
|
|
10
|
-
* Gameplay events are emitted onto the bus so the bound Orbital trait
|
|
11
|
-
* (ui-classifier-board.lolo: menu -> playing -> complete) owns the state:
|
|
12
|
-
* assignEvent (ASSIGN), checkEvent (CHECK), playAgainEvent (PLAY_AGAIN),
|
|
13
|
-
* plus completeEvent (default UI:PUZZLE_COMPLETE). When the entity carries
|
|
14
|
-
* per-item `assignedCategory` / `result` / `attempts`, the board renders
|
|
15
|
-
* from those; otherwise it self-manages with local state.
|
|
16
|
-
*/
|
|
17
|
-
import React from 'react';
|
|
18
|
-
import type { AssetUrl, EventEmit, EntityRow, Asset } from '@almadar/core';
|
|
19
|
-
import type { DisplayStateProps } from '../../../core/organisms/types';
|
|
20
|
-
/** A sortable item (UI value DTO read off the entity). */
|
|
21
|
-
export interface ClassifierItem {
|
|
22
|
-
id: string;
|
|
23
|
-
label: string;
|
|
24
|
-
description?: string;
|
|
25
|
-
correctCategory: string;
|
|
26
|
-
/** Category the player has assigned (entity-provided; machine-owned). */
|
|
27
|
-
assignedCategory?: string;
|
|
28
|
-
/** Image URL icon for story-specific visual skin */
|
|
29
|
-
iconUrl?: AssetUrl;
|
|
30
|
-
}
|
|
31
|
-
/** A category bucket (UI value DTO read off the entity). */
|
|
32
|
-
export interface ClassifierCategory {
|
|
33
|
-
id: string;
|
|
34
|
-
label: string;
|
|
35
|
-
color?: string;
|
|
36
|
-
/** Image URL for story-specific category header */
|
|
37
|
-
imageUrl?: AssetUrl;
|
|
38
|
-
}
|
|
39
|
-
export interface ClassifierBoardProps extends DisplayStateProps {
|
|
40
|
-
/** Puzzle board-state entity (single row or array). The board reads
|
|
41
|
-
* `items` / `categories` arrays plus title/description/hint off the row.
|
|
42
|
-
* Items may carry `assignedCategory`; the row may carry `result` and
|
|
43
|
-
* `attempts` — all machine-owned. */
|
|
44
|
-
entity?: EntityRow | readonly EntityRow[];
|
|
45
|
-
completeEvent?: EventEmit<{
|
|
46
|
-
success: boolean;
|
|
47
|
-
attempts: number;
|
|
48
|
-
}>;
|
|
49
|
-
/** Emits UI:{assignEvent} with { itemId, categoryId } when an item is sorted. */
|
|
50
|
-
assignEvent?: EventEmit<{
|
|
51
|
-
itemId: string;
|
|
52
|
-
categoryId: string;
|
|
53
|
-
}>;
|
|
54
|
-
/** Emits UI:{checkEvent} with {} when the player submits/checks. */
|
|
55
|
-
checkEvent?: EventEmit<Record<string, never>>;
|
|
56
|
-
/** Emits UI:{playAgainEvent} with {} on reset / play again. */
|
|
57
|
-
playAgainEvent?: EventEmit<Record<string, never>>;
|
|
58
|
-
/** Optional per-semantic-key asset overrides for icons (correct/incorrect/reset/send). */
|
|
59
|
-
assetManifest?: {
|
|
60
|
-
ui?: Record<string, Asset>;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export declare function ClassifierBoard({ entity, completeEvent, assignEvent, checkEvent, playAgainEvent, assetManifest, className, }: ClassifierBoardProps): React.JSX.Element | null;
|
|
64
|
-
export declare namespace ClassifierBoard {
|
|
65
|
-
var displayName: string;
|
|
66
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DebuggerBoard
|
|
3
|
-
*
|
|
4
|
-
* Error-finding game board. The player reviews a code/system
|
|
5
|
-
* listing and identifies lines or elements that contain bugs.
|
|
6
|
-
*
|
|
7
|
-
* Good for: programming, logic, troubleshooting stories.
|
|
8
|
-
*
|
|
9
|
-
* Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
|
|
10
|
-
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import type { EventEmit, EntityRow, EntityWith, Asset } from '@almadar/core';
|
|
13
|
-
import type { DisplayStateProps } from '../../../core/organisms/types';
|
|
14
|
-
/** A reviewable code line (UI value DTO read off the entity). */
|
|
15
|
-
export interface DebuggerLine {
|
|
16
|
-
id: string;
|
|
17
|
-
content: string;
|
|
18
|
-
isBug: boolean;
|
|
19
|
-
isFlagged?: boolean;
|
|
20
|
-
explanation?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface DebuggerBoardProps extends DisplayStateProps {
|
|
23
|
-
/** Puzzle board-state entity (single row or array). The board reads
|
|
24
|
-
* `lines` array (each with `isFlagged`), `result`, `attempts`, plus
|
|
25
|
-
* title/description/bugCount/hint off the row. */
|
|
26
|
-
entity?: EntityWith<{
|
|
27
|
-
lines?: DebuggerLine[];
|
|
28
|
-
result?: string;
|
|
29
|
-
attempts?: number;
|
|
30
|
-
title?: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
bugCount?: number;
|
|
33
|
-
hint?: string;
|
|
34
|
-
headerImage?: string;
|
|
35
|
-
theme?: {
|
|
36
|
-
background?: string;
|
|
37
|
-
accentColor?: string;
|
|
38
|
-
};
|
|
39
|
-
successMessage?: string;
|
|
40
|
-
}> | readonly EntityRow[];
|
|
41
|
-
completeEvent?: EventEmit<{
|
|
42
|
-
success: boolean;
|
|
43
|
-
attempts: number;
|
|
44
|
-
}>;
|
|
45
|
-
/** Emits UI:{toggleFlagEvent} with { lineId } when a line's bug-flag is toggled. */
|
|
46
|
-
toggleFlagEvent?: EventEmit<{
|
|
47
|
-
lineId: string;
|
|
48
|
-
}>;
|
|
49
|
-
/** Emits UI:{checkEvent} with {} when the player checks/submits. */
|
|
50
|
-
checkEvent?: EventEmit<Record<string, never>>;
|
|
51
|
-
/** Emits UI:{playAgainEvent} with {} on play again / reset. */
|
|
52
|
-
playAgainEvent?: EventEmit<Record<string, never>>;
|
|
53
|
-
/** Optional per-semantic-key asset overrides for icons (correct/incorrect/reset/bug/send). */
|
|
54
|
-
assetManifest?: {
|
|
55
|
-
ui?: Record<string, Asset>;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export declare function DebuggerBoard({ entity, completeEvent, toggleFlagEvent, checkEvent, playAgainEvent, assetManifest, className, }: DebuggerBoardProps): React.JSX.Element | null;
|
|
59
|
-
export declare namespace DebuggerBoard {
|
|
60
|
-
var displayName: string;
|
|
61
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EventHandlerBoard Organism
|
|
3
|
-
*
|
|
4
|
-
* Contains ALL game logic for the Event Handler tier (ages 9-12).
|
|
5
|
-
* Kids click on world objects, set WHEN/THEN rules, and watch
|
|
6
|
-
* event chains cascade during playback.
|
|
7
|
-
*
|
|
8
|
-
* Encourages experimentation: on failure, resets to editing so the kid
|
|
9
|
-
* can try different rules. After 3 failures, shows a progressive hint.
|
|
10
|
-
*
|
|
11
|
-
* @packageDocumentation
|
|
12
|
-
*/
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import type { EventEmit, EntityRow } from '@almadar/core';
|
|
15
|
-
import type { DisplayStateProps } from '../../../core/organisms/types';
|
|
16
|
-
import type { RuleDefinition } from '../molecules/RuleEditor';
|
|
17
|
-
export interface EventHandlerBoardProps extends DisplayStateProps {
|
|
18
|
-
/** Puzzle board-state entity (single row or array). The board reads
|
|
19
|
-
* `objects` / `triggerEvents` / `goalEvent` etc. off the row; the editable
|
|
20
|
-
* puzzle objects are themselves `EntityRow`s carried under `objects`. */
|
|
21
|
-
entity?: EntityRow | readonly EntityRow[];
|
|
22
|
-
/** Playback speed in ms per event */
|
|
23
|
-
stepDurationMs?: number;
|
|
24
|
-
/** Emits UI:{playEvent} */
|
|
25
|
-
playEvent?: EventEmit<Record<string, never>>;
|
|
26
|
-
/** Emits UI:{completeEvent} with { success } */
|
|
27
|
-
completeEvent?: EventEmit<{
|
|
28
|
-
success: boolean;
|
|
29
|
-
}>;
|
|
30
|
-
/** Emits UI:{editRuleEvent} with { objectId, rules } — model updates @entity.objects */
|
|
31
|
-
editRuleEvent?: EventEmit<{
|
|
32
|
-
objectId: string;
|
|
33
|
-
rules: RuleDefinition[];
|
|
34
|
-
}>;
|
|
35
|
-
/** Emits UI:{playAgainEvent} to reset the model */
|
|
36
|
-
playAgainEvent?: EventEmit<Record<string, never>>;
|
|
37
|
-
}
|
|
38
|
-
export declare function EventHandlerBoard({ entity, stepDurationMs, playEvent, completeEvent, editRuleEvent, playAgainEvent, className, }: EventHandlerBoardProps): React.JSX.Element | null;
|
|
39
|
-
export declare namespace EventHandlerBoard {
|
|
40
|
-
var displayName: string;
|
|
41
|
-
}
|
|
42
|
-
export default EventHandlerBoard;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NegotiatorBoard
|
|
3
|
-
*
|
|
4
|
-
* Turn-based decision matrix game. The player makes choices
|
|
5
|
-
* over multiple rounds against an AI opponent. Each round
|
|
6
|
-
* both sides pick an action, and payoffs are determined by
|
|
7
|
-
* the combination.
|
|
8
|
-
*
|
|
9
|
-
* Good for: ethics, business, game theory, economics stories.
|
|
10
|
-
*
|
|
11
|
-
* Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
|
|
12
|
-
*/
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import type { EventEmit, EntityRow, Asset } from '@almadar/core';
|
|
15
|
-
import type { DisplayStateProps } from '../../../core/organisms/types';
|
|
16
|
-
/** A selectable round action (UI value DTO read off the entity). */
|
|
17
|
-
export interface NegotiatorAction {
|
|
18
|
-
id: string;
|
|
19
|
-
label: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
}
|
|
22
|
-
/** A payoff-matrix cell (UI value DTO read off the entity). */
|
|
23
|
-
export interface PayoffEntry {
|
|
24
|
-
playerAction: string;
|
|
25
|
-
opponentAction: string;
|
|
26
|
-
playerPayoff: number;
|
|
27
|
-
opponentPayoff: number;
|
|
28
|
-
}
|
|
29
|
-
export interface NegotiatorBoardProps extends DisplayStateProps {
|
|
30
|
-
/** Puzzle board-state entity (single row or array). The board reads
|
|
31
|
-
* `score` / `round` / `result` / `targetScore` / `maxRounds` plus the
|
|
32
|
-
* `actions` / `payoffMatrix` arrays and title/description/hint off the row.
|
|
33
|
-
* Score accumulation + win/lose are owned by the gameplay machine. */
|
|
34
|
-
entity?: EntityRow | readonly EntityRow[];
|
|
35
|
-
completeEvent?: EventEmit<{
|
|
36
|
-
success: boolean;
|
|
37
|
-
score: number;
|
|
38
|
-
}>;
|
|
39
|
-
/** Emits UI:{playRoundEvent} with the picked action + the UI-resolved payoff. */
|
|
40
|
-
playRoundEvent?: EventEmit<{
|
|
41
|
-
playerAction: string;
|
|
42
|
-
payoff: number;
|
|
43
|
-
}>;
|
|
44
|
-
/** Emits UI:{finishEvent} with {} when all rounds are spent. */
|
|
45
|
-
finishEvent?: EventEmit<Record<string, never>>;
|
|
46
|
-
/** Emits UI:{playAgainEvent} with {} on play again / reset. */
|
|
47
|
-
playAgainEvent?: EventEmit<Record<string, never>>;
|
|
48
|
-
/** Optional per-semantic-key asset overrides for icons (correct/arrow). */
|
|
49
|
-
assetManifest?: {
|
|
50
|
-
ui?: Record<string, Asset>;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export declare function NegotiatorBoard({ entity, completeEvent, playRoundEvent, finishEvent, playAgainEvent, assetManifest, className, }: NegotiatorBoardProps): React.JSX.Element | null;
|
|
54
|
-
export declare namespace NegotiatorBoard {
|
|
55
|
-
var displayName: string;
|
|
56
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SequencerBoard Organism
|
|
3
|
-
*
|
|
4
|
-
* Contains ALL game logic for the Sequencer tier (ages 5-8).
|
|
5
|
-
* Manages the action sequence, validates it, and animates Kekec
|
|
6
|
-
* executing each step on the puzzle scene.
|
|
7
|
-
*
|
|
8
|
-
* Feedback-first UX:
|
|
9
|
-
* - On failure: slots stay in place, each slot gets a green or red
|
|
10
|
-
* ring showing exactly which steps are correct and which need to change.
|
|
11
|
-
* - Modifying a slot clears its individual feedback so the kid can re-try.
|
|
12
|
-
* - After 3 failures a persistent hint appears above the sequence bar.
|
|
13
|
-
* - "Reset" clears everything including attempts / hint.
|
|
14
|
-
*
|
|
15
|
-
* TraitStateViewer states use indexed labels ("1. Walk", "2. Jump") so that
|
|
16
|
-
* repeated actions are correctly highlighted during playback.
|
|
17
|
-
*
|
|
18
|
-
* @packageDocumentation
|
|
19
|
-
*/
|
|
20
|
-
import React from 'react';
|
|
21
|
-
import type { EventEmit, EntityRow } from '@almadar/core';
|
|
22
|
-
import type { DisplayStateProps } from '../../../core/organisms/types';
|
|
23
|
-
export interface SequencerBoardProps extends DisplayStateProps {
|
|
24
|
-
/** Puzzle board-state entity (single row or array). The board reads
|
|
25
|
-
* `availableActions` / `maxSlots` / `solutions` etc. off the row.
|
|
26
|
-
* `availableActions` carries `SlotItemData[]` (a UI drag-DTO, not entity
|
|
27
|
-
* data — it holds a non-FieldValue `stateMachine` member). */
|
|
28
|
-
entity?: EntityRow | readonly EntityRow[];
|
|
29
|
-
/** Category → color mapping */
|
|
30
|
-
categoryColors?: Record<string, {
|
|
31
|
-
bg: string;
|
|
32
|
-
border: string;
|
|
33
|
-
}>;
|
|
34
|
-
/** Playback speed in ms per step */
|
|
35
|
-
stepDurationMs?: number;
|
|
36
|
-
/** Emits UI:{playEvent} with { sequence: string[] } */
|
|
37
|
-
playEvent?: EventEmit<{
|
|
38
|
-
sequence: string[];
|
|
39
|
-
}>;
|
|
40
|
-
/** Emits UI:{completeEvent} with { success: boolean } */
|
|
41
|
-
completeEvent?: EventEmit<{
|
|
42
|
-
success: boolean;
|
|
43
|
-
sequence: string[];
|
|
44
|
-
}>;
|
|
45
|
-
/** Emits UI:{placeEvent} with { slotIndex, actionId } when an action is dropped into a slot */
|
|
46
|
-
placeEvent?: EventEmit<{
|
|
47
|
-
slotIndex: number;
|
|
48
|
-
actionId: string;
|
|
49
|
-
}>;
|
|
50
|
-
/** Emits UI:{removeEvent} with { slotIndex } when an action is removed from a slot */
|
|
51
|
-
removeEvent?: EventEmit<{
|
|
52
|
-
slotIndex: number;
|
|
53
|
-
}>;
|
|
54
|
-
/** Emits UI:{checkEvent} with { sequence } when the player submits the sequence */
|
|
55
|
-
checkEvent?: EventEmit<{
|
|
56
|
-
sequence: string[];
|
|
57
|
-
}>;
|
|
58
|
-
/** Emits UI:{playAgainEvent} with {} on reset */
|
|
59
|
-
playAgainEvent?: EventEmit<Record<string, never>>;
|
|
60
|
-
/** Emits UI:{stepEvent} with { step } during playback animation advancement */
|
|
61
|
-
stepEvent?: EventEmit<{
|
|
62
|
-
step: number;
|
|
63
|
-
}>;
|
|
64
|
-
}
|
|
65
|
-
export declare function SequencerBoard({ entity, categoryColors, stepDurationMs, playEvent, completeEvent, placeEvent, removeEvent, checkEvent, playAgainEvent, stepEvent, className, }: SequencerBoardProps): React.JSX.Element | null;
|
|
66
|
-
export declare namespace SequencerBoard {
|
|
67
|
-
var displayName: string;
|
|
68
|
-
}
|
|
69
|
-
export default SequencerBoard;
|