@almadar/ui 5.105.0 → 5.108.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 +2127 -5818
- package/dist/avl/index.js +1234 -4925
- package/dist/components/{game/2d → core}/atoms/GameIcon.d.ts +1 -1
- package/dist/components/core/atoms/index.d.ts +2 -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 +1 -2
- 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}/MiniMap.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/ScoreDisplay.d.ts +1 -1
- package/dist/components/game/{2d/atoms → atoms}/StateIndicator.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}/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/molecules/index.d.ts +39 -0
- package/dist/components/game/patterns.d.ts +20 -0
- package/dist/components/index.cjs +2417 -5988
- package/dist/components/index.js +1520 -5074
- 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/lib/drawable/contract.d.ts +68 -0
- package/dist/lib/drawable/hitTest.d.ts +23 -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/drawable/three/Canvas3DHost.d.ts +178 -0
- package/dist/lib/drawable/three/Drawable3D.d.ts +20 -0
- package/dist/lib/drawable/three/GameCamera3D.d.ts +16 -0
- package/dist/lib/drawable/three/game3dTheme.d.ts +14 -0
- package/dist/{components/game/shared → lib/drawable/three}/hooks/useGameCanvas3DEvents.d.ts +4 -3
- package/dist/{components/game/3d → lib/drawable/three}/index.cjs +2223 -4466
- package/dist/{components/game/3d → lib/drawable/three}/index.css +3 -3
- package/dist/lib/drawable/three/index.d.ts +39 -0
- package/dist/{components/game/3d → lib/drawable/three}/index.js +2132 -4375
- package/dist/lib/drawable/three/mesh3d.d.ts +28 -0
- package/dist/{components/game/shared/index.d.ts → lib/gameShared.d.ts} +1 -2
- package/dist/lib/imageCache.d.ts +9 -0
- package/dist/lib/painter2d.d.ts +81 -0
- package/dist/{components/game/shared/lib → lib}/puzzleObject.d.ts +11 -2
- package/dist/lib/webPainter2d.d.ts +7 -0
- package/dist/marketing/index.cjs +10 -0
- package/dist/marketing/index.js +10 -0
- package/dist/{components/game/shared/providers → providers}/GameAudioProvider.d.ts +1 -1
- package/dist/providers/index.cjs +2524 -5889
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +1743 -5112
- package/dist/runtime/index.cjs +1982 -5673
- package/dist/runtime/index.js +1208 -4899
- package/package.json +13 -13
- package/dist/components/game/2d/atoms/ActionButton.d.ts +0 -31
- package/dist/components/game/2d/atoms/ComboCounter.d.ts +0 -20
- package/dist/components/game/2d/atoms/DamageNumber.d.ts +0 -18
- package/dist/components/game/2d/atoms/GameCard.d.ts +0 -34
- package/dist/components/game/2d/atoms/ItemSlot.d.ts +0 -31
- package/dist/components/game/2d/atoms/ResourceCounter.d.ts +0 -26
- package/dist/components/game/2d/atoms/Sprite.d.ts +0 -52
- package/dist/components/game/2d/atoms/StatusEffect.d.ts +0 -25
- package/dist/components/game/2d/atoms/TurnIndicator.d.ts +0 -22
- package/dist/components/game/2d/atoms/WaypointMarker.d.ts +0 -23
- package/dist/components/game/2d/molecules/Canvas2D.d.ts +0 -175
- package/dist/components/game/2d/molecules/EventLog.d.ts +0 -31
- package/dist/components/game/2d/molecules/InventoryGrid.d.ts +0 -35
- package/dist/components/game/2d/molecules/ObjectRulePanel.d.ts +0 -32
- package/dist/components/game/2d/molecules/ResourceBar.d.ts +0 -26
- package/dist/components/game/2d/molecules/RuleEditor.d.ts +0 -39
- package/dist/components/game/2d/molecules/SideCanvas2D.d.ts +0 -36
- package/dist/components/game/2d/molecules/VariablePanel.d.ts +0 -28
- package/dist/components/game/2d/molecules/index.d.ts +0 -66
- 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/2d/templates/GameTemplate.d.ts +0 -35
- package/dist/components/game/3d/atoms/EventMarker3D.d.ts +0 -17
- package/dist/components/game/3d/atoms/SpriteBillboard3D.d.ts +0 -18
- package/dist/components/game/3d/index.d.ts +0 -13
- package/dist/components/game/3d/molecules/FeatureMesh3D.d.ts +0 -21
- package/dist/components/game/3d/molecules/GameCamera3D.d.ts +0 -35
- 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/molecules/index.d.ts +0 -35
- package/dist/components/game/3d/organisms/GameBoard3D.d.ts +0 -66
- package/dist/components/game/3d/patterns.d.ts +0 -20
- 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/shared/game3dTheme.d.ts +0 -55
- package/dist/components/game/shared/lib/game3dAssetManifest.d.ts +0 -48
- /package/dist/components/game/{2d/atoms → atoms}/DialogueBubble.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/molecules → molecules}/ActionPalette.d.ts +0 -0
- /package/dist/components/game/{2d/molecules → molecules}/GameMenu.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/templates → templates}/GameShell.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/3d/molecules → lib/drawable/three}/Camera3D.d.ts +0 -0
- /package/dist/{components/game/3d/molecules → lib/drawable/three}/Canvas3DErrorBoundary.d.ts +0 -0
- /package/dist/{components/game/3d/molecules → lib/drawable/three}/Canvas3DLoadingState.d.ts +0 -0
- /package/dist/{components/game/3d/molecules → lib/drawable/three}/Lighting3D.d.ts +0 -0
- /package/dist/{components/game/3d/molecules → lib/drawable/three}/ModelLoader.d.ts +0 -0
- /package/dist/{components/game/3d/molecules → lib/drawable/three}/Scene3D.d.ts +0 -0
- /package/dist/{components/game/shared → lib/drawable/three}/hooks/useAssetLoader.d.ts +0 -0
- /package/dist/{components/game/shared → lib/drawable/three}/hooks/useRaycaster.d.ts +0 -0
- /package/dist/{components/game/shared → lib/drawable/three}/hooks/useSceneGraph.d.ts +0 -0
- /package/dist/{components/game/shared → lib/drawable/three}/hooks/useThree.d.ts +0 -0
- /package/dist/{components/game/shared → lib/drawable/three}/lib/AssetLoader.d.ts +0 -0
- /package/dist/{components/game/shared → lib/drawable/three}/lib/culling.d.ts +0 -0
- /package/dist/{components/game/shared → lib/drawable/three}/lib/grid3D.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
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RuleEditor Component
|
|
3
|
-
*
|
|
4
|
-
* A single WHEN/THEN rule row for the Event Handler tier (ages 9-12).
|
|
5
|
-
* Kid picks an event trigger and an action from dropdowns.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export type RuleDefinition = {
|
|
11
|
-
id: string;
|
|
12
|
-
whenEvent: string;
|
|
13
|
-
thenAction: string;
|
|
14
|
-
};
|
|
15
|
-
export interface RuleOption {
|
|
16
|
-
value: string;
|
|
17
|
-
label: string;
|
|
18
|
-
}
|
|
19
|
-
export interface RuleEditorProps {
|
|
20
|
-
/** The current rule */
|
|
21
|
-
rule: RuleDefinition;
|
|
22
|
-
/** Available event triggers to listen for */
|
|
23
|
-
availableEvents: RuleOption[];
|
|
24
|
-
/** Available actions to perform */
|
|
25
|
-
availableActions: RuleOption[];
|
|
26
|
-
/** Called when rule changes */
|
|
27
|
-
onChange: (rule: RuleDefinition) => void;
|
|
28
|
-
/** Called when rule is removed */
|
|
29
|
-
onRemove?: () => void;
|
|
30
|
-
/** Whether editing is disabled (during playback) */
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
/** Additional CSS classes */
|
|
33
|
-
className?: string;
|
|
34
|
-
}
|
|
35
|
-
export declare function RuleEditor({ rule, availableEvents, availableActions, onChange, onRemove, disabled, className, }: RuleEditorProps): React.JSX.Element;
|
|
36
|
-
export declare namespace RuleEditor {
|
|
37
|
-
var displayName: string;
|
|
38
|
-
}
|
|
39
|
-
export default RuleEditor;
|
|
@@ -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,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VariablePanel Component
|
|
3
|
-
*
|
|
4
|
-
* Shows a machine's variables and their current values during State Architect
|
|
5
|
-
* playback. Dumb molecule: takes a plain typed list of { name, value } — the
|
|
6
|
-
* .lolo organism owns the entity data and passes it already flattened.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
/** A single variable row (already flattened by the .lolo — plain strings). */
|
|
12
|
-
export interface VariablePanelVariable {
|
|
13
|
-
name: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}
|
|
16
|
-
export interface VariablePanelProps {
|
|
17
|
-
/** Entity name shown in the header */
|
|
18
|
-
entityName: string;
|
|
19
|
-
/** Variable rows to display */
|
|
20
|
-
variables: VariablePanelVariable[];
|
|
21
|
-
/** Additional CSS classes */
|
|
22
|
-
className?: string;
|
|
23
|
-
}
|
|
24
|
-
export declare function VariablePanel({ entityName, variables, className, }: VariablePanelProps): React.JSX.Element;
|
|
25
|
-
export declare namespace VariablePanel {
|
|
26
|
-
var displayName: string;
|
|
27
|
-
}
|
|
28
|
-
export default VariablePanel;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Game 2D Components (flat)
|
|
3
|
-
*
|
|
4
|
-
* Atoms, molecules, board organisms, templates, puzzles, editor, and physics-sim.
|
|
5
|
-
* Dimension-agnostic DTO types/utils/hooks are re-surfaced from ../shared.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
export * from '../../shared/index';
|
|
10
|
-
export { GameCard, type GameCardProps } from '../atoms/GameCard';
|
|
11
|
-
export { HealthBar, type HealthBarProps } from '../atoms/HealthBar';
|
|
12
|
-
export { ScoreDisplay, type ScoreDisplayProps } from '../atoms/ScoreDisplay';
|
|
13
|
-
export { ControlButton, type ControlButtonProps } from '../atoms/ControlButton';
|
|
14
|
-
export { Sprite, drawSprite, type SpriteProps } from '../atoms/Sprite';
|
|
15
|
-
export { StateIndicator, type StateIndicatorProps, type StateStyle } from '../atoms/StateIndicator';
|
|
16
|
-
export { TimerDisplay, type TimerDisplayProps } from '../atoms/TimerDisplay';
|
|
17
|
-
export { ResourceCounter, type ResourceCounterProps } from '../atoms/ResourceCounter';
|
|
18
|
-
export { ItemSlot, type ItemSlotProps } from '../atoms/ItemSlot';
|
|
19
|
-
export { TurnIndicator, type TurnIndicatorProps } from '../atoms/TurnIndicator';
|
|
20
|
-
export { ComboCounter, type ComboCounterProps } from '../atoms/ComboCounter';
|
|
21
|
-
export { WaypointMarker, type WaypointMarkerProps } from '../atoms/WaypointMarker';
|
|
22
|
-
export { StatusEffect, type StatusEffectProps } from '../atoms/StatusEffect';
|
|
23
|
-
export { DamageNumber, type DamageNumberProps } from '../atoms/DamageNumber';
|
|
24
|
-
export { DialogueBubble, type DialogueBubbleProps } from '../atoms/DialogueBubble';
|
|
25
|
-
export { ChoiceButton, type ChoiceButtonProps } from '../atoms/ChoiceButton';
|
|
26
|
-
export { ActionButton, type ActionButtonProps } from '../atoms/ActionButton';
|
|
27
|
-
export { MiniMap, type MiniMapProps } from '../atoms/MiniMap';
|
|
28
|
-
export { GameIcon, type GameIconProps } from '../atoms/GameIcon';
|
|
29
|
-
export { ControlGrid, type ControlGridProps, type ControlGridButton, type ControlGridKind, type DPadDirection } from './ControlGrid';
|
|
30
|
-
export { StatBadge, type StatBadgeProps } from './StatBadge';
|
|
31
|
-
export { InventoryGrid, type InventoryGridProps, type InventoryGridItem } from './InventoryGrid';
|
|
32
|
-
export { ResourceBar, type ResourceBarProps, type ResourceBarResource } from './ResourceBar';
|
|
33
|
-
export { GameHud, type GameHudProps, type GameHudStat, type GameHudElement } from './GameHud';
|
|
34
|
-
export { GameMenu, type GameMenuProps, type MenuOption } from './GameMenu';
|
|
35
|
-
export { StateGraph, type StateGraphProps, type StateGraphTransition } from './StateGraph';
|
|
36
|
-
export { Canvas2D, type Canvas2DProps, type Projection, type CameraMode, type Platform, type SidePlayer, type TileCoord, } from './Canvas2D';
|
|
37
|
-
export { useUnitSpriteAtlas } from '../../shared/hooks/useUnitSpriteAtlas';
|
|
38
|
-
export { GameAudioProvider, GameAudioContext, useGameAudioContext, type GameAudioProviderProps, type GameAudioContextValue, } from '../../shared/providers/GameAudioProvider';
|
|
39
|
-
export { GameAudioToggle, type GameAudioToggleProps, } from '../atoms/GameAudioToggle';
|
|
40
|
-
export { useGameAudio, type AudioManifest, type SoundEntry, type GameAudioControls, type UseGameAudioOptions, } from '../../shared/hooks/useGameAudio';
|
|
41
|
-
export { useCamera } from '../../shared/hooks/useCamera';
|
|
42
|
-
export { TraitStateViewer, type TraitStateViewerProps, type TraitStateMachineDefinition, type TraitTransition, } from './TraitStateViewer';
|
|
43
|
-
export { TraitSlot, type TraitSlotProps, type SlotItemData, } from './TraitSlot';
|
|
44
|
-
export { CollapsibleSection, EditorSlider, EditorSelect, EditorCheckbox, EditorTextInput, StatusBar, TerrainPalette, EditorToolbar, TERRAIN_COLORS, FEATURE_TYPES, type EditorMode, type CollapsibleSectionProps, type EditorSliderProps, type EditorSelectProps, type EditorCheckboxProps, type EditorTextInputProps, type StatusBarProps, type TerrainPaletteProps, type EditorToolbarProps, } from '../../shared/lib/editorUtils';
|
|
45
|
-
export { ActionTile, type ActionTileProps } from './ActionTile';
|
|
46
|
-
export { ActionPalette, type ActionPaletteProps } from './ActionPalette';
|
|
47
|
-
export { SequenceBar, type SequenceBarProps } from './SequenceBar';
|
|
48
|
-
export { SequencerBoard, type SequencerBoardProps } from '../organisms/SequencerBoard';
|
|
49
|
-
export { RuleEditor, type RuleEditorProps, type RuleDefinition } from './RuleEditor';
|
|
50
|
-
export { EventLog, type EventLogProps, type EventLogEntry } from './EventLog';
|
|
51
|
-
export { ObjectRulePanel, type ObjectRulePanelProps } from './ObjectRulePanel';
|
|
52
|
-
export { EventHandlerBoard, type EventHandlerBoardProps } from '../organisms/EventHandlerBoard';
|
|
53
|
-
export * from '../../shared/lib/puzzleObject';
|
|
54
|
-
export { StateNode, type StateNodeProps } from './StateNode';
|
|
55
|
-
export { TransitionArrow, type TransitionArrowProps } from './TransitionArrow';
|
|
56
|
-
export { VariablePanel, type VariablePanelProps } from './VariablePanel';
|
|
57
|
-
export { StateJsonView, type StateJsonViewProps } from './StateJsonView';
|
|
58
|
-
export { StateArchitectBoard, type StateArchitectBoardProps, type StateArchitectTransition, type TestCase, } from '../organisms/StateArchitectBoard';
|
|
59
|
-
export { SimulatorBoard, type SimulatorBoardProps, type SimulatorParameter } from '../organisms/SimulatorBoard';
|
|
60
|
-
export { ClassifierBoard, type ClassifierBoardProps, type ClassifierItem, type ClassifierCategory } from '../organisms/ClassifierBoard';
|
|
61
|
-
export { BuilderBoard, type BuilderBoardProps, type BuilderComponent, type BuilderSlot } from '../organisms/BuilderBoard';
|
|
62
|
-
export { DebuggerBoard, type DebuggerBoardProps, type DebuggerLine } from '../organisms/DebuggerBoard';
|
|
63
|
-
export { NegotiatorBoard, type NegotiatorBoardProps, type NegotiatorAction, type PayoffEntry } from '../organisms/NegotiatorBoard';
|
|
64
|
-
export { projectileMotion, pendulum, springOscillator, ALL_PRESETS } from '../../shared/lib/physicsPresets';
|
|
65
|
-
export { GameTemplate, type GameTemplateProps } from '../templates/GameTemplate';
|
|
66
|
-
export { GameShell, type GameShellProps } from '../templates/GameShell';
|
|
@@ -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;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SimulatorBoard
|
|
3
|
-
*
|
|
4
|
-
* Parameter-slider game board. The player adjusts two parameters (A and B)
|
|
5
|
-
* and observes the machine-derived output. Correct parameter values must
|
|
6
|
-
* bring the output within tolerance of the target to win.
|
|
7
|
-
*
|
|
8
|
-
* Good for: physics, economics, system design stories.
|
|
9
|
-
*
|
|
10
|
-
* Controlled-only: params, output, attempts, and result are owned by the
|
|
11
|
-
* gameplay machine and read off the bound entity. Slider/check/play-again
|
|
12
|
-
* interactions are emitted as events; the machine recomputes and re-renders.
|
|
13
|
-
*/
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import type { EventEmit, EntityRow, Asset } from '@almadar/core';
|
|
16
|
-
import type { DisplayStateProps } from '../../../core/organisms/types';
|
|
17
|
-
/** A tunable simulation parameter slider descriptor (UI value DTO read off the entity). */
|
|
18
|
-
export interface SimulatorParameter {
|
|
19
|
-
id: string;
|
|
20
|
-
label: string;
|
|
21
|
-
unit: string;
|
|
22
|
-
min: number;
|
|
23
|
-
max: number;
|
|
24
|
-
step: number;
|
|
25
|
-
initial: number;
|
|
26
|
-
correct: number;
|
|
27
|
-
tolerance: number;
|
|
28
|
-
}
|
|
29
|
-
export interface SimulatorBoardProps extends DisplayStateProps {
|
|
30
|
-
/** Puzzle board-state entity (single row or array). The board reads the
|
|
31
|
-
* `parameters` slider descriptors plus the machine-owned `paramA`/`paramB`/
|
|
32
|
-
* `output`/`target`/`tolerance`/`attempts`/`result` fields off the row. */
|
|
33
|
-
entity?: EntityRow | readonly EntityRow[];
|
|
34
|
-
completeEvent?: EventEmit<{
|
|
35
|
-
success: boolean;
|
|
36
|
-
attempts: number;
|
|
37
|
-
}>;
|
|
38
|
-
/** Emits UI:{setAEvent} with { value } when parameter A's slider changes. */
|
|
39
|
-
setAEvent?: EventEmit<{
|
|
40
|
-
value: number;
|
|
41
|
-
}>;
|
|
42
|
-
/** Emits UI:{setBEvent} with { value } when parameter B's slider changes. */
|
|
43
|
-
setBEvent?: EventEmit<{
|
|
44
|
-
value: number;
|
|
45
|
-
}>;
|
|
46
|
-
/** Emits UI:{checkEvent} with {} on simulate / check. */
|
|
47
|
-
checkEvent?: EventEmit<Record<string, never>>;
|
|
48
|
-
/** Emits UI:{playAgainEvent} with {} on reset / play again. */
|
|
49
|
-
playAgainEvent?: EventEmit<Record<string, never>>;
|
|
50
|
-
/** Optional per-semantic-key asset overrides for icons (correct/incorrect/play/reset). */
|
|
51
|
-
assetManifest?: {
|
|
52
|
-
ui?: Record<string, Asset>;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export declare function SimulatorBoard({ entity, completeEvent, setAEvent, setBEvent, checkEvent, playAgainEvent, assetManifest, className, }: SimulatorBoardProps): React.JSX.Element | null;
|
|
56
|
-
export declare namespace SimulatorBoard {
|
|
57
|
-
var displayName: string;
|
|
58
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* StateArchitectBoard Organism
|
|
3
|
-
*
|
|
4
|
-
* Contains ALL game logic for the State Architect tier (ages 13+).
|
|
5
|
-
* Kids design state machines via a visual graph editor, then run
|
|
6
|
-
* them to see if the behavior matches the puzzle goal.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import type { EventEmit, EntityRow } from '@almadar/core';
|
|
12
|
-
import type { DisplayStateProps } from '../../../core/organisms/types';
|
|
13
|
-
/** A kid-built transition in the visual graph editor (UI value DTO). */
|
|
14
|
-
export interface StateArchitectTransition {
|
|
15
|
-
id: string;
|
|
16
|
-
from: string;
|
|
17
|
-
to: string;
|
|
18
|
-
event: string;
|
|
19
|
-
guardHint?: string;
|
|
20
|
-
}
|
|
21
|
-
/** A puzzle test case (UI value DTO). */
|
|
22
|
-
export interface TestCase {
|
|
23
|
-
/** Sequence of events to fire */
|
|
24
|
-
events: string[];
|
|
25
|
-
/** Expected final state */
|
|
26
|
-
expectedState: string;
|
|
27
|
-
/** Description */
|
|
28
|
-
label: string;
|
|
29
|
-
}
|
|
30
|
-
export interface StateArchitectBoardProps extends DisplayStateProps {
|
|
31
|
-
/** Puzzle board-state entity (single row or array). The board reads
|
|
32
|
-
* `variables` / `states` / `transitions` / `testCases` etc. off the row. */
|
|
33
|
-
entity?: EntityRow | readonly EntityRow[];
|
|
34
|
-
/** Playback speed */
|
|
35
|
-
stepDurationMs?: number;
|
|
36
|
-
/** Emits UI:{testEvent} */
|
|
37
|
-
testEvent?: EventEmit<Record<string, never>>;
|
|
38
|
-
/** Emits UI:{completeEvent} with { success, passedTests } */
|
|
39
|
-
completeEvent?: EventEmit<{
|
|
40
|
-
success: boolean;
|
|
41
|
-
passedTests: number;
|
|
42
|
-
}>;
|
|
43
|
-
/** Emits UI:{addTransitionEvent} — lolo handles ADD_TRANSITION */
|
|
44
|
-
addTransitionEvent?: EventEmit<{
|
|
45
|
-
id: string;
|
|
46
|
-
from: string;
|
|
47
|
-
to: string;
|
|
48
|
-
event: string;
|
|
49
|
-
}>;
|
|
50
|
-
/** Emits UI:{removeTransitionEvent} — lolo handles REMOVE_TRANSITION */
|
|
51
|
-
removeTransitionEvent?: EventEmit<{
|
|
52
|
-
id: string;
|
|
53
|
-
}>;
|
|
54
|
-
/** Emits UI:{playAgainEvent} — lolo handles PLAY_AGAIN */
|
|
55
|
-
playAgainEvent?: EventEmit<Record<string, never>>;
|
|
56
|
-
}
|
|
57
|
-
export declare function StateArchitectBoard({ entity, stepDurationMs, testEvent, completeEvent, addTransitionEvent, removeTransitionEvent, playAgainEvent, className, }: StateArchitectBoardProps): React.JSX.Element | null;
|
|
58
|
-
export declare namespace StateArchitectBoard {
|
|
59
|
-
var displayName: string;
|
|
60
|
-
}
|
|
61
|
-
export default StateArchitectBoard;
|