@almadar/ui 2.0.1 → 2.0.3
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/components/index.css +9 -11
- package/dist/components/index.js +3 -3
- package/dist/providers/index.css +9 -11
- package/dist/providers/index.js +2 -2
- package/package.json +2 -2
- package/dist/components/atoms/Avatar.d.ts +0 -58
- package/dist/components/atoms/Badge.d.ts +0 -8
- package/dist/components/atoms/Box.d.ts +0 -57
- package/dist/components/atoms/Button.d.ts +0 -24
- package/dist/components/atoms/Card.d.ts +0 -18
- package/dist/components/atoms/Center.d.ts +0 -33
- package/dist/components/atoms/Checkbox.d.ts +0 -5
- package/dist/components/atoms/ConditionalWrapper.d.ts +0 -68
- package/dist/components/atoms/Divider.d.ts +0 -29
- package/dist/components/atoms/Icon.d.ts +0 -38
- package/dist/components/atoms/Input.d.ts +0 -26
- package/dist/components/atoms/Label.d.ts +0 -5
- package/dist/components/atoms/LawReferenceTooltip.d.ts +0 -48
- package/dist/components/atoms/Overlay.d.ts +0 -16
- package/dist/components/atoms/ProgressBar.d.ts +0 -63
- package/dist/components/atoms/Radio.d.ts +0 -26
- package/dist/components/atoms/Select.d.ts +0 -12
- package/dist/components/atoms/Spacer.d.ts +0 -25
- package/dist/components/atoms/Spinner.d.ts +0 -6
- package/dist/components/atoms/Stack.d.ts +0 -64
- package/dist/components/atoms/Switch.d.ts +0 -12
- package/dist/components/atoms/TextHighlight.d.ts +0 -53
- package/dist/components/atoms/Textarea.d.ts +0 -5
- package/dist/components/atoms/ThemeSelector.d.ts +0 -21
- package/dist/components/atoms/ThemeToggle.d.ts +0 -33
- package/dist/components/atoms/Typography.d.ts +0 -57
- package/dist/components/atoms/game/ControlButton.d.ts +0 -31
- package/dist/components/atoms/game/HealthBar.d.ts +0 -18
- package/dist/components/atoms/game/ScoreDisplay.d.ts +0 -21
- package/dist/components/atoms/game/Sprite.d.ts +0 -63
- package/dist/components/atoms/game/StateIndicator.d.ts +0 -31
- package/dist/components/atoms/game/index.d.ts +0 -12
- package/dist/components/atoms/index.d.ts +0 -27
- package/dist/components/index.d.ts +0 -6
- package/dist/components/molecules/Accordion.d.ts +0 -67
- package/dist/components/molecules/Alert.d.ts +0 -24
- package/dist/components/molecules/Breadcrumb.d.ts +0 -55
- package/dist/components/molecules/ButtonGroup.d.ts +0 -67
- package/dist/components/molecules/Card.d.ts +0 -44
- package/dist/components/molecules/Container.d.ts +0 -30
- package/dist/components/molecules/Drawer.d.ts +0 -46
- package/dist/components/molecules/EmptyState.d.ts +0 -25
- package/dist/components/molecules/ErrorBoundary.d.ts +0 -55
- package/dist/components/molecules/ErrorState.d.ts +0 -13
- package/dist/components/molecules/FilterGroup.d.ts +0 -54
- package/dist/components/molecules/Flex.d.ts +0 -43
- package/dist/components/molecules/FloatingActionButton.d.ts +0 -69
- package/dist/components/molecules/FormField.d.ts +0 -16
- package/dist/components/molecules/FormSectionHeader.d.ts +0 -30
- package/dist/components/molecules/Grid.d.ts +0 -54
- package/dist/components/molecules/InputGroup.d.ts +0 -24
- package/dist/components/molecules/LoadingState.d.ts +0 -7
- package/dist/components/molecules/Menu.d.ts +0 -40
- package/dist/components/molecules/Modal.d.ts +0 -26
- package/dist/components/molecules/Pagination.d.ts +0 -66
- package/dist/components/molecules/Popover.d.ts +0 -39
- package/dist/components/molecules/QuizBlock.d.ts +0 -20
- package/dist/components/molecules/RelationSelect.d.ts +0 -48
- package/dist/components/molecules/RepeatableFormSection.d.ts +0 -58
- package/dist/components/molecules/ScaledDiagram.d.ts +0 -20
- package/dist/components/molecules/SearchInput.d.ts +0 -60
- package/dist/components/molecules/SidePanel.d.ts +0 -47
- package/dist/components/molecules/SimpleGrid.d.ts +0 -27
- package/dist/components/molecules/Skeleton.d.ts +0 -35
- package/dist/components/molecules/Tabs.d.ts +0 -45
- package/dist/components/molecules/Toast.d.ts +0 -35
- package/dist/components/molecules/Tooltip.d.ts +0 -25
- package/dist/components/molecules/ViolationAlert.d.ts +0 -49
- package/dist/components/molecules/WizardNavigation.d.ts +0 -51
- package/dist/components/molecules/WizardProgress.d.ts +0 -42
- package/dist/components/molecules/game/StatBadge.d.ts +0 -27
- package/dist/components/molecules/index.d.ts +0 -38
- package/dist/components/molecules/markdown/CodeBlock.d.ts +0 -25
- package/dist/components/molecules/markdown/MarkdownContent.d.ts +0 -26
- package/dist/components/organisms/CardGrid.d.ts +0 -72
- package/dist/components/organisms/Chart.d.ts +0 -59
- package/dist/components/organisms/CodeViewer.d.ts +0 -67
- package/dist/components/organisms/ComponentPatterns.d.ts +0 -441
- package/dist/components/organisms/ConfirmDialog.d.ts +0 -50
- package/dist/components/organisms/ContentRenderer.d.ts +0 -23
- package/dist/components/organisms/CustomPattern.d.ts +0 -104
- package/dist/components/organisms/DataTable.d.ts +0 -63
- package/dist/components/organisms/DetailPanel.d.ts +0 -71
- package/dist/components/organisms/DocumentViewer.d.ts +0 -60
- package/dist/components/organisms/DrawerSlot.d.ts +0 -39
- package/dist/components/organisms/Form.d.ts +0 -203
- package/dist/components/organisms/FormSection.d.ts +0 -59
- package/dist/components/organisms/GraphCanvas.d.ts +0 -69
- package/dist/components/organisms/Header.d.ts +0 -110
- package/dist/components/organisms/JazariStateMachine.d.ts +0 -60
- package/dist/components/organisms/LayoutPatterns.d.ts +0 -181
- package/dist/components/organisms/List.d.ts +0 -76
- package/dist/components/organisms/MasterDetail.d.ts +0 -43
- package/dist/components/organisms/MediaGallery.d.ts +0 -66
- package/dist/components/organisms/Meter.d.ts +0 -58
- package/dist/components/organisms/ModalSlot.d.ts +0 -35
- package/dist/components/organisms/Navigation.d.ts +0 -68
- package/dist/components/organisms/OrbitalVisualization.d.ts +0 -48
- package/dist/components/organisms/PageHeader.d.ts +0 -59
- package/dist/components/organisms/Section.d.ts +0 -44
- package/dist/components/organisms/Sidebar.d.ts +0 -65
- package/dist/components/organisms/SignaturePad.d.ts +0 -44
- package/dist/components/organisms/Split.d.ts +0 -42
- package/dist/components/organisms/StatCard.d.ts +0 -66
- package/dist/components/organisms/StateMachineView.d.ts +0 -36
- package/dist/components/organisms/Table.d.ts +0 -99
- package/dist/components/organisms/Timeline.d.ts +0 -58
- package/dist/components/organisms/ToastSlot.d.ts +0 -38
- package/dist/components/organisms/UISlotRenderer.d.ts +0 -112
- package/dist/components/organisms/WizardContainer.d.ts +0 -160
- package/dist/components/organisms/book/BookChapterView.d.ts +0 -17
- package/dist/components/organisms/book/BookCoverPage.d.ts +0 -19
- package/dist/components/organisms/book/BookNavBar.d.ts +0 -18
- package/dist/components/organisms/book/BookTableOfContents.d.ts +0 -18
- package/dist/components/organisms/book/BookViewer.d.ts +0 -28
- package/dist/components/organisms/book/index.d.ts +0 -7
- package/dist/components/organisms/book/types.d.ts +0 -77
- package/dist/components/organisms/game/BattleBoard.d.ts +0 -167
- package/dist/components/organisms/game/CanvasEffect.d.ts +0 -68
- package/dist/components/organisms/game/CastleBoard.d.ts +0 -85
- package/dist/components/organisms/game/DialogueBox.d.ts +0 -73
- package/dist/components/organisms/game/GameAudioProvider.d.ts +0 -47
- package/dist/components/organisms/game/GameAudioToggle.d.ts +0 -28
- package/dist/components/organisms/game/GameHud.d.ts +0 -40
- package/dist/components/organisms/game/GameMenu.d.ts +0 -43
- package/dist/components/organisms/game/GameOverScreen.d.ts +0 -56
- package/dist/components/organisms/game/InventoryPanel.d.ts +0 -67
- package/dist/components/organisms/game/IsometricCanvas.d.ts +0 -123
- package/dist/components/organisms/game/TraitSlot.d.ts +0 -86
- package/dist/components/organisms/game/TraitStateViewer.d.ts +0 -53
- package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +0 -26
- package/dist/components/organisms/game/WorldMapBoard.d.ts +0 -147
- package/dist/components/organisms/game/editor/editorUtils.d.ts +0 -109
- package/dist/components/organisms/game/editor/index.d.ts +0 -9
- package/dist/components/organisms/game/hooks/useBattleState.d.ts +0 -35
- package/dist/components/organisms/game/hooks/useCamera.d.ts +0 -41
- package/dist/components/organisms/game/hooks/useGameAudio.d.ts +0 -47
- package/dist/components/organisms/game/hooks/useImageCache.d.ts +0 -16
- package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +0 -45
- package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +0 -43
- package/dist/components/organisms/game/index.d.ts +0 -36
- package/dist/components/organisms/game/managers/PhysicsManager.d.ts +0 -103
- package/dist/components/organisms/game/types/effects.d.ts +0 -253
- package/dist/components/organisms/game/types/isometric.d.ts +0 -109
- package/dist/components/organisms/game/types/spriteAnimation.d.ts +0 -73
- package/dist/components/organisms/game/utils/canvasEffects.d.ts +0 -50
- package/dist/components/organisms/game/utils/combatPresets.d.ts +0 -15
- package/dist/components/organisms/game/utils/isometric.d.ts +0 -61
- package/dist/components/organisms/game/utils/spriteAnimation.d.ts +0 -57
- package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +0 -16
- package/dist/components/organisms/index.d.ts +0 -37
- package/dist/components/organisms/layout/DashboardGrid.d.ts +0 -34
- package/dist/components/organisms/layout/MasterDetail.d.ts +0 -32
- package/dist/components/organisms/layout/SplitPane.d.ts +0 -34
- package/dist/components/organisms/layout/TabbedContainer.d.ts +0 -42
- package/dist/components/organisms/layout/index.d.ts +0 -9
- package/dist/components/organisms/types.d.ts +0 -65
- package/dist/components/templates/AuthLayout.d.ts +0 -14
- package/dist/components/templates/BattleTemplate.d.ts +0 -25
- package/dist/components/templates/CastleTemplate.d.ts +0 -23
- package/dist/components/templates/CounterTemplate.d.ts +0 -44
- package/dist/components/templates/DashboardLayout.d.ts +0 -32
- package/dist/components/templates/GameShell.d.ts +0 -33
- package/dist/components/templates/GameTemplate.d.ts +0 -36
- package/dist/components/templates/GenericAppTemplate.d.ts +0 -30
- package/dist/components/templates/WorldMapTemplate.d.ts +0 -29
- package/dist/components/templates/index.d.ts +0 -10
- package/dist/components/templates/types.d.ts +0 -17
- package/dist/context/DesignThemeContext.d.ts +0 -21
- package/dist/context/ThemeContext.d.ts +0 -104
- package/dist/context/UISlotContext.d.ts +0 -75
- package/dist/context/UserContext.d.ts +0 -111
- package/dist/context/index.d.ts +0 -8
- package/dist/hooks/event-bus-types.d.ts +0 -71
- package/dist/hooks/index.d.ts +0 -25
- package/dist/hooks/useAgentChat.d.ts +0 -104
- package/dist/hooks/useAuthContext.d.ts +0 -25
- package/dist/hooks/useCompile.d.ts +0 -22
- package/dist/hooks/useDeepAgentGeneration.d.ts +0 -46
- package/dist/hooks/useEntities.d.ts +0 -52
- package/dist/hooks/useEntityData.d.ts +0 -155
- package/dist/hooks/useEntityMutations.d.ts +0 -80
- package/dist/hooks/useEventBus.d.ts +0 -96
- package/dist/hooks/useExtensions.d.ts +0 -32
- package/dist/hooks/useFileEditor.d.ts +0 -32
- package/dist/hooks/useFileSystem.d.ts +0 -40
- package/dist/hooks/useGitHub.d.ts +0 -58
- package/dist/hooks/useOrbitalHistory.d.ts +0 -39
- package/dist/hooks/useOrbitalMutations.d.ts +0 -95
- package/dist/hooks/usePreview.d.ts +0 -57
- package/dist/hooks/useQuerySingleton.d.ts +0 -78
- package/dist/hooks/useResolvedEntity.d.ts +0 -32
- package/dist/hooks/useTranslate.d.ts +0 -35
- package/dist/hooks/useUIEvents.d.ts +0 -35
- package/dist/hooks/useUISlots.d.ts +0 -84
- package/dist/hooks/useValidation.d.ts +0 -46
- package/dist/lib/api-client.d.ts +0 -42
- package/dist/lib/cn.d.ts +0 -6
- package/dist/lib/debug.d.ts +0 -43
- package/dist/lib/debugRegistry.d.ts +0 -29
- package/dist/lib/debugUtils.d.ts +0 -27
- package/dist/lib/entityDebug.d.ts +0 -38
- package/dist/lib/getNestedValue.d.ts +0 -33
- package/dist/lib/guardRegistry.d.ts +0 -32
- package/dist/lib/index.d.ts +0 -18
- package/dist/lib/jazari/svg-paths.d.ts +0 -61
- package/dist/lib/parseContentSegments.d.ts +0 -41
- package/dist/lib/tickRegistry.d.ts +0 -40
- package/dist/lib/traitRegistry.d.ts +0 -34
- package/dist/lib/verificationRegistry.d.ts +0 -107
- package/dist/lib/visualizer/index.d.ts +0 -143
- package/dist/locales/index.d.ts +0 -20
- package/dist/providers/EventBusProvider.d.ts +0 -60
- package/dist/providers/FetchedDataProvider.d.ts +0 -105
- package/dist/providers/OfflineModeProvider.d.ts +0 -79
- package/dist/providers/OrbitalProvider.d.ts +0 -101
- package/dist/providers/SelectionProvider.d.ts +0 -81
- package/dist/providers/VerificationProvider.d.ts +0 -63
- package/dist/providers/index.d.ts +0 -17
- package/dist/renderer/client-effect-executor.d.ts +0 -68
- package/dist/renderer/data-resolver.d.ts +0 -68
- package/dist/renderer/index.d.ts +0 -28
- package/dist/renderer/init.d.ts +0 -14
- package/dist/renderer/navigation.d.ts +0 -142
- package/dist/renderer/offline-executor.d.ts +0 -238
- package/dist/renderer/pattern-resolver.d.ts +0 -91
- package/dist/renderer/slot-definitions.d.ts +0 -45
- package/dist/renderer/types.d.ts +0 -160
- package/dist/renderer/useClientEffects.d.ts +0 -88
- package/dist/stores/entityStore.d.ts +0 -99
- package/dist/stores/filtering.d.ts +0 -51
- package/dist/stores/index.d.ts +0 -7
- package/dist/{chunk-RIZ76XRF.js → chunk-X3IKFHFT.js} +1 -1
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DialogueBox Component
|
|
3
|
-
*
|
|
4
|
-
* NPC dialogue display with typewriter effect and choices.
|
|
5
|
-
*
|
|
6
|
-
* **State categories (closed-circuit compliant):**
|
|
7
|
-
* - Content (dialogue node, speaker, text, choices) → received via props
|
|
8
|
-
* - UI-transient animation (displayedText, isTyping, charIndex, selectedChoice) → local only
|
|
9
|
-
* - Events → emitted via `useEventBus()` (complete, choice, advance)
|
|
10
|
-
*
|
|
11
|
-
* Local state is typewriter animation only — an inherently rendering-only
|
|
12
|
-
* concern analogous to Form's `formData`.
|
|
13
|
-
*/
|
|
14
|
-
import React from 'react';
|
|
15
|
-
export interface DialogueChoice {
|
|
16
|
-
text: string;
|
|
17
|
-
action?: string;
|
|
18
|
-
next?: string;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface DialogueNode {
|
|
22
|
-
id?: string;
|
|
23
|
-
speaker: string;
|
|
24
|
-
text: string;
|
|
25
|
-
portrait?: string;
|
|
26
|
-
choices?: DialogueChoice[];
|
|
27
|
-
autoAdvance?: number;
|
|
28
|
-
}
|
|
29
|
-
export interface DialogueBoxProps {
|
|
30
|
-
/** Current dialogue node to display */
|
|
31
|
-
dialogue: DialogueNode;
|
|
32
|
-
/** Typewriter speed in ms per character (0 = instant) */
|
|
33
|
-
typewriterSpeed?: number;
|
|
34
|
-
/** Position of dialogue box */
|
|
35
|
-
position?: 'top' | 'bottom';
|
|
36
|
-
/** Called when text animation completes */
|
|
37
|
-
onComplete?: () => void;
|
|
38
|
-
/** Called when a choice is selected */
|
|
39
|
-
onChoice?: (choice: DialogueChoice) => void;
|
|
40
|
-
/** Called when dialogue is advanced (no choices) */
|
|
41
|
-
onAdvance?: () => void;
|
|
42
|
-
/** Declarative event: emits UI:{completeEvent} when text animation completes */
|
|
43
|
-
completeEvent?: string;
|
|
44
|
-
/** Declarative event: emits UI:{choiceEvent} with { choice } when a choice is selected */
|
|
45
|
-
choiceEvent?: string;
|
|
46
|
-
/** Declarative event: emits UI:{advanceEvent} when dialogue is advanced */
|
|
47
|
-
advanceEvent?: string;
|
|
48
|
-
/** Optional className */
|
|
49
|
-
className?: string;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Dialogue box component with typewriter effect
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```tsx
|
|
56
|
-
* <DialogueBox
|
|
57
|
-
* dialogue={{
|
|
58
|
-
* speaker: "Old Man",
|
|
59
|
-
* text: "It's dangerous to go alone! Take this.",
|
|
60
|
-
* portrait: "/portraits/oldman.png",
|
|
61
|
-
* choices: [
|
|
62
|
-
* { text: "Thank you!", action: "ACCEPT_ITEM" },
|
|
63
|
-
* { text: "No thanks", next: "decline_node" }
|
|
64
|
-
* ]
|
|
65
|
-
* }}
|
|
66
|
-
* typewriterSpeed={30}
|
|
67
|
-
* onChoice={(choice) => handleChoice(choice)}
|
|
68
|
-
* position="bottom"
|
|
69
|
-
* />
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
export declare function DialogueBox({ dialogue, typewriterSpeed, position, onComplete, onChoice, onAdvance, completeEvent, choiceEvent, advanceEvent, className, }: DialogueBoxProps): React.JSX.Element;
|
|
73
|
-
export default DialogueBox;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GameAudioProvider
|
|
3
|
-
*
|
|
4
|
-
* Context provider that wires the audio system to the Almadar event bus.
|
|
5
|
-
* Wrap your game organism with this provider, then emit:
|
|
6
|
-
*
|
|
7
|
-
* emit('UI:PLAY_SOUND', { key: 'footstep' })
|
|
8
|
-
*
|
|
9
|
-
* from anywhere inside the tree and the corresponding sound will play.
|
|
10
|
-
*
|
|
11
|
-
* The provider also exposes `muted`/`setMuted` and `masterVolume`/
|
|
12
|
-
* `setMasterVolume` via the `GameAudioContext` for toggle buttons.
|
|
13
|
-
*
|
|
14
|
-
* Closed-circuit props (`className`, `isLoading`, `error`, `entity`) are
|
|
15
|
-
* accepted but intentionally unused — the provider renders only its children.
|
|
16
|
-
*
|
|
17
|
-
* @packageDocumentation
|
|
18
|
-
*/
|
|
19
|
-
import React from 'react';
|
|
20
|
-
import { type AudioManifest, type GameAudioControls } from './hooks/useGameAudio';
|
|
21
|
-
export type GameAudioContextValue = Pick<GameAudioControls, 'muted' | 'setMuted' | 'masterVolume' | 'setMasterVolume' | 'play' | 'playMusic' | 'stopMusic'>;
|
|
22
|
-
export declare const GameAudioContext: React.Context<GameAudioContextValue | null>;
|
|
23
|
-
/**
|
|
24
|
-
* Access the game audio context.
|
|
25
|
-
* Must be called from within a `<GameAudioProvider>` tree.
|
|
26
|
-
*/
|
|
27
|
-
export declare function useGameAudioContext(): GameAudioContextValue;
|
|
28
|
-
export interface GameAudioProviderProps {
|
|
29
|
-
/** Sound manifest — keys mapped to SoundEntry definitions */
|
|
30
|
-
manifest: AudioManifest;
|
|
31
|
-
/** Base URL prepended to all sound paths (default '') */
|
|
32
|
-
baseUrl?: string;
|
|
33
|
-
/** Children to render */
|
|
34
|
-
children: React.ReactNode;
|
|
35
|
-
/** Initial muted state */
|
|
36
|
-
initialMuted?: boolean;
|
|
37
|
-
/** Closed-circuit props (unused, accepted for runtime compatibility) */
|
|
38
|
-
className?: string;
|
|
39
|
-
isLoading?: boolean;
|
|
40
|
-
error?: Error | null;
|
|
41
|
-
entity?: string;
|
|
42
|
-
}
|
|
43
|
-
export declare function GameAudioProvider({ manifest, baseUrl, children, initialMuted, }: GameAudioProviderProps): React.JSX.Element;
|
|
44
|
-
export declare namespace GameAudioProvider {
|
|
45
|
-
var displayName: string;
|
|
46
|
-
}
|
|
47
|
-
export default GameAudioProvider;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GameAudioToggle
|
|
3
|
-
*
|
|
4
|
-
* A small mute/unmute button for game HUDs.
|
|
5
|
-
* Must be rendered inside a <GameAudioProvider> tree.
|
|
6
|
-
*
|
|
7
|
-
* Shows 🔊 when sound is on and 🔇 when muted.
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
export interface GameAudioToggleProps {
|
|
13
|
-
/** Button size */
|
|
14
|
-
size?: 'sm' | 'md' | 'lg';
|
|
15
|
-
/** Additional CSS classes */
|
|
16
|
-
className?: string;
|
|
17
|
-
/** Loading state (passed through) */
|
|
18
|
-
isLoading?: boolean;
|
|
19
|
-
/** Error state (passed through) */
|
|
20
|
-
error?: Error | null;
|
|
21
|
-
/** Entity name for schema-driven auto-fetch */
|
|
22
|
-
entity?: string;
|
|
23
|
-
}
|
|
24
|
-
export declare function GameAudioToggle({ size, className, }: GameAudioToggleProps): React.JSX.Element;
|
|
25
|
-
export declare namespace GameAudioToggle {
|
|
26
|
-
var displayName: string;
|
|
27
|
-
}
|
|
28
|
-
export default GameAudioToggle;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type StatBadgeProps } from "../../molecules/game/StatBadge";
|
|
2
|
-
export interface GameHudStat extends Omit<StatBadgeProps, "size"> {
|
|
3
|
-
/** Data source entity name */
|
|
4
|
-
source?: string;
|
|
5
|
-
/** Field name in the source */
|
|
6
|
-
field?: string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Schema-style HUD element definition.
|
|
10
|
-
* Used when elements are passed from schema render_ui effects.
|
|
11
|
-
*/
|
|
12
|
-
export interface GameHudElement {
|
|
13
|
-
type: string;
|
|
14
|
-
bind?: string;
|
|
15
|
-
position?: string;
|
|
16
|
-
label?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface GameHudProps {
|
|
19
|
-
/** Position of the HUD */
|
|
20
|
-
position?: "top" | "bottom" | "corners" | string;
|
|
21
|
-
/** Stats to display - accepts readonly for compatibility with generated const arrays */
|
|
22
|
-
stats?: readonly GameHudStat[];
|
|
23
|
-
/** Alias for stats (schema compatibility) */
|
|
24
|
-
items?: readonly GameHudStat[];
|
|
25
|
-
/**
|
|
26
|
-
* Schema-style elements array (alternative to stats).
|
|
27
|
-
* Converted to stats internally for backwards compatibility.
|
|
28
|
-
*/
|
|
29
|
-
elements?: readonly GameHudElement[];
|
|
30
|
-
/** Size variant */
|
|
31
|
-
size?: "sm" | "md" | "lg";
|
|
32
|
-
/** Additional CSS classes */
|
|
33
|
-
className?: string;
|
|
34
|
-
/** Whether to use a semi-transparent background */
|
|
35
|
-
transparent?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export declare function GameHud({ position: propPosition, stats: propStats, items, elements, size, className, transparent, }: GameHudProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
export declare namespace GameHud {
|
|
39
|
-
var displayName: string;
|
|
40
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { type EventBusContextType } from "../../../hooks/useEventBus";
|
|
2
|
-
export interface MenuOption {
|
|
3
|
-
/** Optional ID (generated from index if not provided) */
|
|
4
|
-
id?: string;
|
|
5
|
-
/** Display label */
|
|
6
|
-
label: string;
|
|
7
|
-
/** Event to emit on click */
|
|
8
|
-
event?: string;
|
|
9
|
-
/** Page to navigate to */
|
|
10
|
-
navigatesTo?: string;
|
|
11
|
-
/** Button variant */
|
|
12
|
-
variant?: "primary" | "secondary" | "ghost" | string;
|
|
13
|
-
/** Whether the option is disabled */
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
/** Sub-label or description */
|
|
16
|
-
subLabel?: string;
|
|
17
|
-
/** Action identifier (alternative to event) */
|
|
18
|
-
action?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface GameMenuProps {
|
|
21
|
-
/** Menu title */
|
|
22
|
-
title: string;
|
|
23
|
-
/** Optional subtitle or version */
|
|
24
|
-
subtitle?: string;
|
|
25
|
-
/** Menu options - accepts readonly for compatibility with generated const arrays */
|
|
26
|
-
options?: readonly MenuOption[];
|
|
27
|
-
/** Alias for options (schema compatibility) */
|
|
28
|
-
menuItems?: readonly MenuOption[];
|
|
29
|
-
/** Called when an option is selected (legacy callback, prefer event bus) */
|
|
30
|
-
onSelect?: (option: MenuOption) => void;
|
|
31
|
-
/** Event bus for emitting UI events (optional, uses hook if not provided) */
|
|
32
|
-
eventBus?: EventBusContextType;
|
|
33
|
-
/** Background image or gradient */
|
|
34
|
-
background?: string;
|
|
35
|
-
/** Logo image URL */
|
|
36
|
-
logo?: string;
|
|
37
|
-
/** Additional CSS classes */
|
|
38
|
-
className?: string;
|
|
39
|
-
}
|
|
40
|
-
export declare function GameMenu({ title, subtitle, options, menuItems, onSelect, eventBus: eventBusProp, background, logo, className, }: GameMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
-
export declare namespace GameMenu {
|
|
42
|
-
var displayName: string;
|
|
43
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type EventBusContextType } from "../../../hooks/useEventBus";
|
|
3
|
-
export interface GameOverStat {
|
|
4
|
-
/** Stat label */
|
|
5
|
-
label: string;
|
|
6
|
-
/** Stat value (required if bind is not provided) */
|
|
7
|
-
value?: number | string;
|
|
8
|
-
/**
|
|
9
|
-
* Schema-style data binding (e.g., "player.score").
|
|
10
|
-
* Alternative to value - used when stats come from schema render_ui effects.
|
|
11
|
-
* Component will display 0 as placeholder since runtime binding is not implemented.
|
|
12
|
-
*/
|
|
13
|
-
bind?: string;
|
|
14
|
-
/** Display format */
|
|
15
|
-
format?: "number" | "time" | "text";
|
|
16
|
-
/** Icon */
|
|
17
|
-
icon?: React.ReactNode;
|
|
18
|
-
}
|
|
19
|
-
export interface GameOverAction {
|
|
20
|
-
/** Display label */
|
|
21
|
-
label: string;
|
|
22
|
-
/** Event to emit on click */
|
|
23
|
-
event?: string;
|
|
24
|
-
/** Page to navigate to */
|
|
25
|
-
navigatesTo?: string;
|
|
26
|
-
/** Button variant */
|
|
27
|
-
variant?: "primary" | "secondary" | "ghost";
|
|
28
|
-
}
|
|
29
|
-
export interface GameOverScreenProps {
|
|
30
|
-
/** Screen title (e.g., "Game Over", "Victory!") */
|
|
31
|
-
title: string;
|
|
32
|
-
/** Optional message */
|
|
33
|
-
message?: string;
|
|
34
|
-
/** Stats to display */
|
|
35
|
-
stats?: GameOverStat[];
|
|
36
|
-
/** Action buttons */
|
|
37
|
-
actions?: GameOverAction[];
|
|
38
|
-
/** Alias for actions (schema compatibility) */
|
|
39
|
-
menuItems?: GameOverAction[];
|
|
40
|
-
/** Called when an action is selected (legacy callback, prefer event bus) */
|
|
41
|
-
onAction?: (action: GameOverAction) => void;
|
|
42
|
-
/** Event bus for emitting UI events (optional, uses hook if not provided) */
|
|
43
|
-
eventBus?: EventBusContextType;
|
|
44
|
-
/** Victory or defeat variant */
|
|
45
|
-
variant?: "victory" | "defeat" | "neutral";
|
|
46
|
-
/** High score (optional, shows "NEW HIGH SCORE!" if exceeded) */
|
|
47
|
-
highScore?: number | string;
|
|
48
|
-
/** Current score for high score comparison (accepts string for schema bindings) */
|
|
49
|
-
currentScore?: number | string;
|
|
50
|
-
/** Additional CSS classes */
|
|
51
|
-
className?: string;
|
|
52
|
-
}
|
|
53
|
-
export declare function GameOverScreen({ title, message, stats, actions, menuItems, onAction, eventBus: eventBusProp, variant, highScore, currentScore, className, }: GameOverScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
export declare namespace GameOverScreen {
|
|
55
|
-
var displayName: string;
|
|
56
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* InventoryPanel Component
|
|
3
|
-
*
|
|
4
|
-
* Grid-based inventory UI with item selection and tooltips.
|
|
5
|
-
*
|
|
6
|
-
* **State categories (closed-circuit compliant):**
|
|
7
|
-
* - Data (items, slots, selectedSlot) → received via props
|
|
8
|
-
* - UI-transient (hoveredSlot, tooltipPosition) → local only
|
|
9
|
-
* - Events → emitted via `useEventBus()` (selectSlot, useItem, dropItem)
|
|
10
|
-
*
|
|
11
|
-
* Local state is hover/tooltip only — rendering-only concerns.
|
|
12
|
-
*/
|
|
13
|
-
import React from 'react';
|
|
14
|
-
export interface InventoryItem {
|
|
15
|
-
id: string;
|
|
16
|
-
type: string;
|
|
17
|
-
quantity: number;
|
|
18
|
-
sprite?: string;
|
|
19
|
-
name?: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface InventoryPanelProps {
|
|
23
|
-
/** Array of items in inventory */
|
|
24
|
-
items: InventoryItem[];
|
|
25
|
-
/** Total number of slots */
|
|
26
|
-
slots: number;
|
|
27
|
-
/** Number of columns in grid */
|
|
28
|
-
columns: number;
|
|
29
|
-
/** Currently selected slot index */
|
|
30
|
-
selectedSlot?: number;
|
|
31
|
-
/** Called when a slot is selected */
|
|
32
|
-
onSelectSlot?: (index: number) => void;
|
|
33
|
-
/** Called when an item is used (double-click or Enter) */
|
|
34
|
-
onUseItem?: (item: InventoryItem) => void;
|
|
35
|
-
/** Called when an item is dropped */
|
|
36
|
-
onDropItem?: (item: InventoryItem) => void;
|
|
37
|
-
/** Declarative event: emits UI:{selectSlotEvent} with { index } when a slot is selected */
|
|
38
|
-
selectSlotEvent?: string;
|
|
39
|
-
/** Declarative event: emits UI:{useItemEvent} with { item } when an item is used */
|
|
40
|
-
useItemEvent?: string;
|
|
41
|
-
/** Declarative event: emits UI:{dropItemEvent} with { item } when an item is dropped */
|
|
42
|
-
dropItemEvent?: string;
|
|
43
|
-
/** Show item tooltips on hover */
|
|
44
|
-
showTooltips?: boolean;
|
|
45
|
-
/** Optional className */
|
|
46
|
-
className?: string;
|
|
47
|
-
/** Slot size in pixels */
|
|
48
|
-
slotSize?: number;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Inventory panel component with grid layout
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```tsx
|
|
55
|
-
* <InventoryPanel
|
|
56
|
-
* items={playerInventory}
|
|
57
|
-
* slots={20}
|
|
58
|
-
* columns={5}
|
|
59
|
-
* selectedSlot={selectedSlot}
|
|
60
|
-
* onSelectSlot={setSelectedSlot}
|
|
61
|
-
* onUseItem={(item) => console.log('Used:', item.name)}
|
|
62
|
-
* showTooltips
|
|
63
|
-
* />
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
export declare function InventoryPanel({ items, slots, columns, selectedSlot, onSelectSlot, onUseItem, onDropItem, selectSlotEvent, useItemEvent, dropItemEvent, showTooltips, className, slotSize, }: InventoryPanelProps): React.JSX.Element;
|
|
67
|
-
export default InventoryPanel;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IsometricCanvas
|
|
3
|
-
*
|
|
4
|
-
* Core isometric game renderer. Maps to the `game-canvas` pattern.
|
|
5
|
-
* Adapted from projects/trait-wars/design-system/organisms/IsometricGameCanvas.tsx
|
|
6
|
-
* with full closed-circuit pattern compliance (className, isLoading, error, entity).
|
|
7
|
-
*
|
|
8
|
-
* Architecture:
|
|
9
|
-
* - 2:1 diamond isometric projection
|
|
10
|
-
* - Painter's algorithm (tile → feature → unit depth sort)
|
|
11
|
-
* - Camera pan/zoom with lerp
|
|
12
|
-
* - Off-screen culling
|
|
13
|
-
* - Minimap on separate canvas
|
|
14
|
-
* - Sprite sheet animation via resolveUnitFrame
|
|
15
|
-
* - Event bus–friendly handlers (onTileClick, onUnitClick, etc.)
|
|
16
|
-
*
|
|
17
|
-
* **State categories (closed-circuit compliant):**
|
|
18
|
-
* - All game data (tiles, units, features, selection, validMoves) → received via props
|
|
19
|
-
* - Rendering state (viewportSize, RAF, camera lerp, sprite cache) → local only
|
|
20
|
-
* - Events → emitted via `useEventBus()` for trait integration
|
|
21
|
-
*
|
|
22
|
-
* This component is a **pure renderer** — it holds no game logic state.
|
|
23
|
-
*
|
|
24
|
-
* @packageDocumentation
|
|
25
|
-
*/
|
|
26
|
-
import * as React from 'react';
|
|
27
|
-
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
28
|
-
import type { ResolvedFrame } from './types/spriteAnimation';
|
|
29
|
-
export interface IsometricCanvasProps {
|
|
30
|
-
/** Additional CSS classes */
|
|
31
|
-
className?: string;
|
|
32
|
-
/** Loading state indicator */
|
|
33
|
-
isLoading?: boolean;
|
|
34
|
-
/** Error state */
|
|
35
|
-
error?: Error | null;
|
|
36
|
-
/** Entity name for schema-driven auto-fetch */
|
|
37
|
-
entity?: string;
|
|
38
|
-
/** Array of tiles to render */
|
|
39
|
-
tiles?: IsometricTile[];
|
|
40
|
-
/** Array of units on the board */
|
|
41
|
-
units?: IsometricUnit[];
|
|
42
|
-
/** Array of features (resources, portals, buildings, etc.) */
|
|
43
|
-
features?: IsometricFeature[];
|
|
44
|
-
/** Currently selected unit ID */
|
|
45
|
-
selectedUnitId?: string | null;
|
|
46
|
-
/** Valid move positions (shown as pulsing green highlights) */
|
|
47
|
-
validMoves?: Array<{
|
|
48
|
-
x: number;
|
|
49
|
-
y: number;
|
|
50
|
-
}>;
|
|
51
|
-
/** Attack target positions (shown as pulsing red highlights) */
|
|
52
|
-
attackTargets?: Array<{
|
|
53
|
-
x: number;
|
|
54
|
-
y: number;
|
|
55
|
-
}>;
|
|
56
|
-
/** Hovered tile position */
|
|
57
|
-
hoveredTile?: {
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
} | null;
|
|
61
|
-
/** Tile click handler */
|
|
62
|
-
onTileClick?: (x: number, y: number) => void;
|
|
63
|
-
/** Unit click handler */
|
|
64
|
-
onUnitClick?: (unitId: string) => void;
|
|
65
|
-
/** Tile hover handler */
|
|
66
|
-
onTileHover?: (x: number, y: number) => void;
|
|
67
|
-
/** Tile leave handler */
|
|
68
|
-
onTileLeave?: () => void;
|
|
69
|
-
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
70
|
-
tileClickEvent?: string;
|
|
71
|
-
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
72
|
-
unitClickEvent?: string;
|
|
73
|
-
/** Declarative event: emits UI:{tileHoverEvent} with { x, y } on tile hover */
|
|
74
|
-
tileHoverEvent?: string;
|
|
75
|
-
/** Declarative event: emits UI:{tileLeaveEvent} with {} on tile leave */
|
|
76
|
-
tileLeaveEvent?: string;
|
|
77
|
-
/** Render scale (0.4 = 40% zoom) */
|
|
78
|
-
scale?: number;
|
|
79
|
-
/** Show debug grid lines and coordinates */
|
|
80
|
-
debug?: boolean;
|
|
81
|
-
/** Background image URL tiled behind the isometric grid */
|
|
82
|
-
backgroundImage?: string;
|
|
83
|
-
/** Toggle minimap overlay */
|
|
84
|
-
showMinimap?: boolean;
|
|
85
|
-
/** Enable camera pan/zoom controls */
|
|
86
|
-
enableCamera?: boolean;
|
|
87
|
-
/** Extra scale multiplier for unit draw size. 1 = default. */
|
|
88
|
-
unitScale?: number;
|
|
89
|
-
/** Override for the diamond-top Y offset within the tile sprite (default: 374).
|
|
90
|
-
* This controls where the flat diamond face sits vertically inside the tile image. */
|
|
91
|
-
diamondTopY?: number;
|
|
92
|
-
/** Resolve terrain sprite URL from terrain key */
|
|
93
|
-
getTerrainSprite?: (terrain: string) => string | undefined;
|
|
94
|
-
/** Resolve feature sprite URL from feature type key */
|
|
95
|
-
getFeatureSprite?: (featureType: string) => string | undefined;
|
|
96
|
-
/** Resolve unit static sprite URL */
|
|
97
|
-
getUnitSprite?: (unit: IsometricUnit) => string | undefined;
|
|
98
|
-
/** Resolve animated sprite sheet frame for a unit */
|
|
99
|
-
resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
|
|
100
|
-
/** Additional sprite URLs to preload (e.g., effect sprites) */
|
|
101
|
-
effectSpriteUrls?: string[];
|
|
102
|
-
/** Callback to draw canvas effects after units */
|
|
103
|
-
onDrawEffects?: (ctx: CanvasRenderingContext2D, animTime: number, getImage: (url: string) => HTMLImageElement | undefined) => void;
|
|
104
|
-
/** Whether there are active effects — keeps RAF loop alive */
|
|
105
|
-
hasActiveEffects?: boolean;
|
|
106
|
-
/** Base URL for remote asset resolution. When set, manifest paths
|
|
107
|
-
* are prefixed with this URL. Example: "https://trait-wars-assets.web.app" */
|
|
108
|
-
assetBaseUrl?: string;
|
|
109
|
-
/** Manifest mapping entity keys to relative sprite paths.
|
|
110
|
-
* Combined with assetBaseUrl to produce full URLs.
|
|
111
|
-
* Used as a fallback when inline URLs and callbacks don't resolve. */
|
|
112
|
-
assetManifest?: {
|
|
113
|
-
terrains?: Record<string, string>;
|
|
114
|
-
units?: Record<string, string>;
|
|
115
|
-
features?: Record<string, string>;
|
|
116
|
-
effects?: Record<string, string>;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
export declare function IsometricCanvas({ className, isLoading, error, entity, tiles: tilesProp, units, features, selectedUnitId, validMoves, attackTargets, hoveredTile, onTileClick, onUnitClick, onTileHover, onTileLeave, tileClickEvent, unitClickEvent, tileHoverEvent, tileLeaveEvent, scale, debug, backgroundImage, showMinimap, enableCamera, unitScale, getTerrainSprite, getFeatureSprite, getUnitSprite, resolveUnitFrame, effectSpriteUrls, onDrawEffects, hasActiveEffects, diamondTopY: diamondTopYProp, assetBaseUrl, assetManifest, }: IsometricCanvasProps): React.JSX.Element;
|
|
120
|
-
export declare namespace IsometricCanvas {
|
|
121
|
-
var displayName: string;
|
|
122
|
-
}
|
|
123
|
-
export default IsometricCanvas;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TraitSlot Component
|
|
3
|
-
*
|
|
4
|
-
* A generic equippable slot with drag-and-drop support.
|
|
5
|
-
* Shows a TraitStateViewer tooltip on hover for equipped items.
|
|
6
|
-
* Used across game tiers:
|
|
7
|
-
* - Sequencer (5-8): action slots in the sequence bar
|
|
8
|
-
* - Event Handler (9-12): rule slots on world objects
|
|
9
|
-
* - State Architect (13+): transition slots on state nodes
|
|
10
|
-
*
|
|
11
|
-
* **State categories (closed-circuit compliant):**
|
|
12
|
-
* - Data (equippedItem, slotNumber, locked, selected, feedback) → received via props
|
|
13
|
-
* - UI-transient (isHovered, isDragOver) → local only
|
|
14
|
-
* - Events → emitted via `useEventBus()` (click, remove)
|
|
15
|
-
*
|
|
16
|
-
* Local state is hover/drag-over detection only — rendering-only concerns.
|
|
17
|
-
*
|
|
18
|
-
* @packageDocumentation
|
|
19
|
-
*/
|
|
20
|
-
import React from 'react';
|
|
21
|
-
import { type TraitStateMachineDefinition } from './TraitStateViewer';
|
|
22
|
-
/** Data shape for a slot's equipped item */
|
|
23
|
-
export interface SlotItemData {
|
|
24
|
-
id: string;
|
|
25
|
-
name: string;
|
|
26
|
-
category: string;
|
|
27
|
-
description?: string;
|
|
28
|
-
/** Emoji or text icon */
|
|
29
|
-
iconEmoji?: string;
|
|
30
|
-
/** Image URL icon (takes precedence over iconEmoji) */
|
|
31
|
-
iconUrl?: string;
|
|
32
|
-
/** Optional state machine for tooltip display */
|
|
33
|
-
stateMachine?: TraitStateMachineDefinition;
|
|
34
|
-
}
|
|
35
|
-
export interface TraitSlotProps {
|
|
36
|
-
/** Slot index (1-based) */
|
|
37
|
-
slotNumber: number;
|
|
38
|
-
/** Currently equipped item, if any */
|
|
39
|
-
equippedItem?: SlotItemData;
|
|
40
|
-
/** Whether slot is locked */
|
|
41
|
-
locked?: boolean;
|
|
42
|
-
/** Label shown when locked */
|
|
43
|
-
lockLabel?: string;
|
|
44
|
-
/** Whether slot is selected */
|
|
45
|
-
selected?: boolean;
|
|
46
|
-
/** Size variant */
|
|
47
|
-
size?: 'sm' | 'md' | 'lg';
|
|
48
|
-
/** Show tooltip on hover */
|
|
49
|
-
showTooltip?: boolean;
|
|
50
|
-
/** Category → color mapping */
|
|
51
|
-
categoryColors?: Record<string, {
|
|
52
|
-
bg: string;
|
|
53
|
-
border: string;
|
|
54
|
-
}>;
|
|
55
|
-
/** Optional tooltip frame image URL */
|
|
56
|
-
tooltipFrameUrl?: string;
|
|
57
|
-
/** Additional CSS classes */
|
|
58
|
-
className?: string;
|
|
59
|
-
/** Loading state */
|
|
60
|
-
isLoading?: boolean;
|
|
61
|
-
/** Error state */
|
|
62
|
-
error?: Error | null;
|
|
63
|
-
/** Entity name for schema-driven auto-fetch */
|
|
64
|
-
entity?: string;
|
|
65
|
-
/** Called when an item is dropped on this slot */
|
|
66
|
-
onItemDrop?: (item: SlotItemData) => void;
|
|
67
|
-
/** Whether this slot's equipped item is draggable */
|
|
68
|
-
draggable?: boolean;
|
|
69
|
-
/** Called when drag starts from this slot */
|
|
70
|
-
onDragStart?: (item: SlotItemData) => void;
|
|
71
|
-
/** Per-slot correctness feedback after a failed attempt */
|
|
72
|
-
feedback?: 'correct' | 'wrong' | null;
|
|
73
|
-
/** Click handler */
|
|
74
|
-
onClick?: () => void;
|
|
75
|
-
/** Remove handler */
|
|
76
|
-
onRemove?: () => void;
|
|
77
|
-
/** Emits UI:{clickEvent} with { slotNumber } */
|
|
78
|
-
clickEvent?: string;
|
|
79
|
-
/** Emits UI:{removeEvent} with { slotNumber } */
|
|
80
|
-
removeEvent?: string;
|
|
81
|
-
}
|
|
82
|
-
export declare function TraitSlot({ slotNumber, equippedItem, locked, lockLabel, selected, size, showTooltip, categoryColors, tooltipFrameUrl, className, feedback, onItemDrop, draggable, onDragStart, onClick, onRemove, clickEvent, removeEvent, }: TraitSlotProps): React.JSX.Element;
|
|
83
|
-
export declare namespace TraitSlot {
|
|
84
|
-
var displayName: string;
|
|
85
|
-
}
|
|
86
|
-
export default TraitSlot;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TraitStateViewer Component
|
|
3
|
-
*
|
|
4
|
-
* Displays a state machine visualization for a trait / behavior.
|
|
5
|
-
* Three variants for different complexity levels:
|
|
6
|
-
* - `linear` — simple step progression (ages 5-8)
|
|
7
|
-
* - `compact` — current state + available actions (ages 9-12)
|
|
8
|
-
* - `full` — all states, transitions, guards (ages 13+)
|
|
9
|
-
*
|
|
10
|
-
* @packageDocumentation
|
|
11
|
-
*/
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import { type StateStyle } from '../../atoms/game/StateIndicator';
|
|
14
|
-
export interface TraitTransition {
|
|
15
|
-
from: string;
|
|
16
|
-
to: string;
|
|
17
|
-
event: string;
|
|
18
|
-
guardHint?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface TraitStateMachineDefinition {
|
|
21
|
-
name: string;
|
|
22
|
-
states: string[];
|
|
23
|
-
currentState: string;
|
|
24
|
-
transitions: TraitTransition[];
|
|
25
|
-
description?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface TraitStateViewerProps {
|
|
28
|
-
/** The trait / state machine to visualize */
|
|
29
|
-
trait: TraitStateMachineDefinition;
|
|
30
|
-
/** Display variant */
|
|
31
|
-
variant?: 'linear' | 'compact' | 'full';
|
|
32
|
-
/** Size variant */
|
|
33
|
-
size?: 'sm' | 'md' | 'lg';
|
|
34
|
-
/** Whether to show transition labels */
|
|
35
|
-
showTransitions?: boolean;
|
|
36
|
-
/** Click handler for states */
|
|
37
|
-
onStateClick?: (state: string) => void;
|
|
38
|
-
/** Custom state styles passed to StateIndicator */
|
|
39
|
-
stateStyles?: Record<string, StateStyle>;
|
|
40
|
-
/** Additional CSS classes */
|
|
41
|
-
className?: string;
|
|
42
|
-
/** Loading state */
|
|
43
|
-
isLoading?: boolean;
|
|
44
|
-
/** Error state */
|
|
45
|
-
error?: Error | null;
|
|
46
|
-
/** Entity name for schema-driven auto-fetch */
|
|
47
|
-
entity?: string;
|
|
48
|
-
}
|
|
49
|
-
export declare function TraitStateViewer({ trait, variant, size, showTransitions, onStateClick, stateStyles, className, }: TraitStateViewerProps): React.JSX.Element;
|
|
50
|
-
export declare namespace TraitStateViewer {
|
|
51
|
-
var displayName: string;
|
|
52
|
-
}
|
|
53
|
-
export default TraitStateViewer;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UncontrolledBattleBoard
|
|
3
|
-
*
|
|
4
|
-
* Thin wrapper that composes `useBattleState` + `BattleBoard` for
|
|
5
|
-
* self-managing game state. Accepts `initialUnits` instead of the
|
|
6
|
-
* controlled-mode fields and manages units, phase, turn, gameResult,
|
|
7
|
-
* and selectedUnitId internally via the hook.
|
|
8
|
-
*
|
|
9
|
-
* Use this component when you want the BattleBoard to manage its own
|
|
10
|
-
* game logic (e.g. in Storybook, prototypes, or simple integrations).
|
|
11
|
-
* For Orbital trait integration, use `BattleBoard` directly in
|
|
12
|
-
* controlled mode.
|
|
13
|
-
*
|
|
14
|
-
* @packageDocumentation
|
|
15
|
-
*/
|
|
16
|
-
import { type BattleBoardProps, type BattleUnit } from './BattleBoard';
|
|
17
|
-
export interface UncontrolledBattleBoardProps extends Omit<BattleBoardProps, 'entity'> {
|
|
18
|
-
entity: Omit<BattleBoardProps['entity'], 'units' | 'phase' | 'turn' | 'gameResult' | 'selectedUnitId'> & {
|
|
19
|
-
initialUnits: BattleUnit[];
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export declare function UncontrolledBattleBoard({ entity, ...rest }: UncontrolledBattleBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export declare namespace UncontrolledBattleBoard {
|
|
24
|
-
var displayName: string;
|
|
25
|
-
}
|
|
26
|
-
export default UncontrolledBattleBoard;
|