@almadar/ui 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/components/index.css +9 -11
  2. package/dist/components/index.js +3 -3
  3. package/dist/providers/index.css +9 -11
  4. package/dist/providers/index.js +2 -2
  5. package/package.json +2 -2
  6. package/dist/components/atoms/Avatar.d.ts +0 -58
  7. package/dist/components/atoms/Badge.d.ts +0 -8
  8. package/dist/components/atoms/Box.d.ts +0 -57
  9. package/dist/components/atoms/Button.d.ts +0 -24
  10. package/dist/components/atoms/Card.d.ts +0 -18
  11. package/dist/components/atoms/Center.d.ts +0 -33
  12. package/dist/components/atoms/Checkbox.d.ts +0 -5
  13. package/dist/components/atoms/ConditionalWrapper.d.ts +0 -68
  14. package/dist/components/atoms/Divider.d.ts +0 -29
  15. package/dist/components/atoms/Icon.d.ts +0 -38
  16. package/dist/components/atoms/Input.d.ts +0 -26
  17. package/dist/components/atoms/Label.d.ts +0 -5
  18. package/dist/components/atoms/LawReferenceTooltip.d.ts +0 -48
  19. package/dist/components/atoms/Overlay.d.ts +0 -16
  20. package/dist/components/atoms/ProgressBar.d.ts +0 -63
  21. package/dist/components/atoms/Radio.d.ts +0 -26
  22. package/dist/components/atoms/Select.d.ts +0 -12
  23. package/dist/components/atoms/Spacer.d.ts +0 -25
  24. package/dist/components/atoms/Spinner.d.ts +0 -6
  25. package/dist/components/atoms/Stack.d.ts +0 -64
  26. package/dist/components/atoms/Switch.d.ts +0 -12
  27. package/dist/components/atoms/TextHighlight.d.ts +0 -53
  28. package/dist/components/atoms/Textarea.d.ts +0 -5
  29. package/dist/components/atoms/ThemeSelector.d.ts +0 -21
  30. package/dist/components/atoms/ThemeToggle.d.ts +0 -33
  31. package/dist/components/atoms/Typography.d.ts +0 -57
  32. package/dist/components/atoms/game/ControlButton.d.ts +0 -31
  33. package/dist/components/atoms/game/HealthBar.d.ts +0 -18
  34. package/dist/components/atoms/game/ScoreDisplay.d.ts +0 -21
  35. package/dist/components/atoms/game/Sprite.d.ts +0 -63
  36. package/dist/components/atoms/game/StateIndicator.d.ts +0 -31
  37. package/dist/components/atoms/game/index.d.ts +0 -12
  38. package/dist/components/atoms/index.d.ts +0 -27
  39. package/dist/components/index.d.ts +0 -6
  40. package/dist/components/molecules/Accordion.d.ts +0 -67
  41. package/dist/components/molecules/Alert.d.ts +0 -24
  42. package/dist/components/molecules/Breadcrumb.d.ts +0 -55
  43. package/dist/components/molecules/ButtonGroup.d.ts +0 -67
  44. package/dist/components/molecules/Card.d.ts +0 -44
  45. package/dist/components/molecules/Container.d.ts +0 -30
  46. package/dist/components/molecules/Drawer.d.ts +0 -46
  47. package/dist/components/molecules/EmptyState.d.ts +0 -25
  48. package/dist/components/molecules/ErrorBoundary.d.ts +0 -55
  49. package/dist/components/molecules/ErrorState.d.ts +0 -13
  50. package/dist/components/molecules/FilterGroup.d.ts +0 -54
  51. package/dist/components/molecules/Flex.d.ts +0 -43
  52. package/dist/components/molecules/FloatingActionButton.d.ts +0 -69
  53. package/dist/components/molecules/FormField.d.ts +0 -16
  54. package/dist/components/molecules/FormSectionHeader.d.ts +0 -30
  55. package/dist/components/molecules/Grid.d.ts +0 -54
  56. package/dist/components/molecules/InputGroup.d.ts +0 -24
  57. package/dist/components/molecules/LoadingState.d.ts +0 -7
  58. package/dist/components/molecules/Menu.d.ts +0 -40
  59. package/dist/components/molecules/Modal.d.ts +0 -26
  60. package/dist/components/molecules/Pagination.d.ts +0 -66
  61. package/dist/components/molecules/Popover.d.ts +0 -39
  62. package/dist/components/molecules/QuizBlock.d.ts +0 -20
  63. package/dist/components/molecules/RelationSelect.d.ts +0 -48
  64. package/dist/components/molecules/RepeatableFormSection.d.ts +0 -58
  65. package/dist/components/molecules/ScaledDiagram.d.ts +0 -20
  66. package/dist/components/molecules/SearchInput.d.ts +0 -60
  67. package/dist/components/molecules/SidePanel.d.ts +0 -47
  68. package/dist/components/molecules/SimpleGrid.d.ts +0 -27
  69. package/dist/components/molecules/Skeleton.d.ts +0 -35
  70. package/dist/components/molecules/Tabs.d.ts +0 -45
  71. package/dist/components/molecules/Toast.d.ts +0 -35
  72. package/dist/components/molecules/Tooltip.d.ts +0 -25
  73. package/dist/components/molecules/ViolationAlert.d.ts +0 -49
  74. package/dist/components/molecules/WizardNavigation.d.ts +0 -51
  75. package/dist/components/molecules/WizardProgress.d.ts +0 -42
  76. package/dist/components/molecules/game/StatBadge.d.ts +0 -27
  77. package/dist/components/molecules/index.d.ts +0 -38
  78. package/dist/components/molecules/markdown/CodeBlock.d.ts +0 -25
  79. package/dist/components/molecules/markdown/MarkdownContent.d.ts +0 -26
  80. package/dist/components/organisms/CardGrid.d.ts +0 -72
  81. package/dist/components/organisms/Chart.d.ts +0 -59
  82. package/dist/components/organisms/CodeViewer.d.ts +0 -67
  83. package/dist/components/organisms/ComponentPatterns.d.ts +0 -441
  84. package/dist/components/organisms/ConfirmDialog.d.ts +0 -50
  85. package/dist/components/organisms/ContentRenderer.d.ts +0 -23
  86. package/dist/components/organisms/CustomPattern.d.ts +0 -104
  87. package/dist/components/organisms/DataTable.d.ts +0 -63
  88. package/dist/components/organisms/DetailPanel.d.ts +0 -71
  89. package/dist/components/organisms/DocumentViewer.d.ts +0 -60
  90. package/dist/components/organisms/DrawerSlot.d.ts +0 -39
  91. package/dist/components/organisms/Form.d.ts +0 -203
  92. package/dist/components/organisms/FormSection.d.ts +0 -59
  93. package/dist/components/organisms/GraphCanvas.d.ts +0 -69
  94. package/dist/components/organisms/Header.d.ts +0 -110
  95. package/dist/components/organisms/JazariStateMachine.d.ts +0 -60
  96. package/dist/components/organisms/LayoutPatterns.d.ts +0 -181
  97. package/dist/components/organisms/List.d.ts +0 -76
  98. package/dist/components/organisms/MasterDetail.d.ts +0 -43
  99. package/dist/components/organisms/MediaGallery.d.ts +0 -66
  100. package/dist/components/organisms/Meter.d.ts +0 -58
  101. package/dist/components/organisms/ModalSlot.d.ts +0 -35
  102. package/dist/components/organisms/Navigation.d.ts +0 -68
  103. package/dist/components/organisms/OrbitalVisualization.d.ts +0 -48
  104. package/dist/components/organisms/PageHeader.d.ts +0 -59
  105. package/dist/components/organisms/Section.d.ts +0 -44
  106. package/dist/components/organisms/Sidebar.d.ts +0 -65
  107. package/dist/components/organisms/SignaturePad.d.ts +0 -44
  108. package/dist/components/organisms/Split.d.ts +0 -42
  109. package/dist/components/organisms/StatCard.d.ts +0 -66
  110. package/dist/components/organisms/StateMachineView.d.ts +0 -36
  111. package/dist/components/organisms/Table.d.ts +0 -99
  112. package/dist/components/organisms/Timeline.d.ts +0 -58
  113. package/dist/components/organisms/ToastSlot.d.ts +0 -38
  114. package/dist/components/organisms/UISlotRenderer.d.ts +0 -112
  115. package/dist/components/organisms/WizardContainer.d.ts +0 -160
  116. package/dist/components/organisms/book/BookChapterView.d.ts +0 -17
  117. package/dist/components/organisms/book/BookCoverPage.d.ts +0 -19
  118. package/dist/components/organisms/book/BookNavBar.d.ts +0 -18
  119. package/dist/components/organisms/book/BookTableOfContents.d.ts +0 -18
  120. package/dist/components/organisms/book/BookViewer.d.ts +0 -28
  121. package/dist/components/organisms/book/index.d.ts +0 -7
  122. package/dist/components/organisms/book/types.d.ts +0 -77
  123. package/dist/components/organisms/game/BattleBoard.d.ts +0 -167
  124. package/dist/components/organisms/game/CanvasEffect.d.ts +0 -68
  125. package/dist/components/organisms/game/CastleBoard.d.ts +0 -85
  126. package/dist/components/organisms/game/DialogueBox.d.ts +0 -73
  127. package/dist/components/organisms/game/GameAudioProvider.d.ts +0 -47
  128. package/dist/components/organisms/game/GameAudioToggle.d.ts +0 -28
  129. package/dist/components/organisms/game/GameHud.d.ts +0 -40
  130. package/dist/components/organisms/game/GameMenu.d.ts +0 -43
  131. package/dist/components/organisms/game/GameOverScreen.d.ts +0 -56
  132. package/dist/components/organisms/game/InventoryPanel.d.ts +0 -67
  133. package/dist/components/organisms/game/IsometricCanvas.d.ts +0 -123
  134. package/dist/components/organisms/game/TraitSlot.d.ts +0 -86
  135. package/dist/components/organisms/game/TraitStateViewer.d.ts +0 -53
  136. package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +0 -26
  137. package/dist/components/organisms/game/WorldMapBoard.d.ts +0 -147
  138. package/dist/components/organisms/game/editor/editorUtils.d.ts +0 -109
  139. package/dist/components/organisms/game/editor/index.d.ts +0 -9
  140. package/dist/components/organisms/game/hooks/useBattleState.d.ts +0 -35
  141. package/dist/components/organisms/game/hooks/useCamera.d.ts +0 -41
  142. package/dist/components/organisms/game/hooks/useGameAudio.d.ts +0 -47
  143. package/dist/components/organisms/game/hooks/useImageCache.d.ts +0 -16
  144. package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +0 -45
  145. package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +0 -43
  146. package/dist/components/organisms/game/index.d.ts +0 -36
  147. package/dist/components/organisms/game/managers/PhysicsManager.d.ts +0 -103
  148. package/dist/components/organisms/game/types/effects.d.ts +0 -253
  149. package/dist/components/organisms/game/types/isometric.d.ts +0 -109
  150. package/dist/components/organisms/game/types/spriteAnimation.d.ts +0 -73
  151. package/dist/components/organisms/game/utils/canvasEffects.d.ts +0 -50
  152. package/dist/components/organisms/game/utils/combatPresets.d.ts +0 -15
  153. package/dist/components/organisms/game/utils/isometric.d.ts +0 -61
  154. package/dist/components/organisms/game/utils/spriteAnimation.d.ts +0 -57
  155. package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +0 -16
  156. package/dist/components/organisms/index.d.ts +0 -37
  157. package/dist/components/organisms/layout/DashboardGrid.d.ts +0 -34
  158. package/dist/components/organisms/layout/MasterDetail.d.ts +0 -32
  159. package/dist/components/organisms/layout/SplitPane.d.ts +0 -34
  160. package/dist/components/organisms/layout/TabbedContainer.d.ts +0 -42
  161. package/dist/components/organisms/layout/index.d.ts +0 -9
  162. package/dist/components/organisms/types.d.ts +0 -65
  163. package/dist/components/templates/AuthLayout.d.ts +0 -14
  164. package/dist/components/templates/BattleTemplate.d.ts +0 -25
  165. package/dist/components/templates/CastleTemplate.d.ts +0 -23
  166. package/dist/components/templates/CounterTemplate.d.ts +0 -44
  167. package/dist/components/templates/DashboardLayout.d.ts +0 -32
  168. package/dist/components/templates/GameShell.d.ts +0 -33
  169. package/dist/components/templates/GameTemplate.d.ts +0 -36
  170. package/dist/components/templates/GenericAppTemplate.d.ts +0 -30
  171. package/dist/components/templates/WorldMapTemplate.d.ts +0 -29
  172. package/dist/components/templates/index.d.ts +0 -10
  173. package/dist/components/templates/types.d.ts +0 -17
  174. package/dist/context/DesignThemeContext.d.ts +0 -21
  175. package/dist/context/ThemeContext.d.ts +0 -104
  176. package/dist/context/UISlotContext.d.ts +0 -75
  177. package/dist/context/UserContext.d.ts +0 -111
  178. package/dist/context/index.d.ts +0 -8
  179. package/dist/hooks/event-bus-types.d.ts +0 -71
  180. package/dist/hooks/index.d.ts +0 -25
  181. package/dist/hooks/useAgentChat.d.ts +0 -104
  182. package/dist/hooks/useAuthContext.d.ts +0 -25
  183. package/dist/hooks/useCompile.d.ts +0 -22
  184. package/dist/hooks/useDeepAgentGeneration.d.ts +0 -46
  185. package/dist/hooks/useEntities.d.ts +0 -52
  186. package/dist/hooks/useEntityData.d.ts +0 -155
  187. package/dist/hooks/useEntityMutations.d.ts +0 -80
  188. package/dist/hooks/useEventBus.d.ts +0 -96
  189. package/dist/hooks/useExtensions.d.ts +0 -32
  190. package/dist/hooks/useFileEditor.d.ts +0 -32
  191. package/dist/hooks/useFileSystem.d.ts +0 -40
  192. package/dist/hooks/useGitHub.d.ts +0 -58
  193. package/dist/hooks/useOrbitalHistory.d.ts +0 -39
  194. package/dist/hooks/useOrbitalMutations.d.ts +0 -95
  195. package/dist/hooks/usePreview.d.ts +0 -57
  196. package/dist/hooks/useQuerySingleton.d.ts +0 -78
  197. package/dist/hooks/useResolvedEntity.d.ts +0 -32
  198. package/dist/hooks/useTranslate.d.ts +0 -35
  199. package/dist/hooks/useUIEvents.d.ts +0 -35
  200. package/dist/hooks/useUISlots.d.ts +0 -84
  201. package/dist/hooks/useValidation.d.ts +0 -46
  202. package/dist/lib/api-client.d.ts +0 -42
  203. package/dist/lib/cn.d.ts +0 -6
  204. package/dist/lib/debug.d.ts +0 -43
  205. package/dist/lib/debugRegistry.d.ts +0 -29
  206. package/dist/lib/debugUtils.d.ts +0 -27
  207. package/dist/lib/entityDebug.d.ts +0 -38
  208. package/dist/lib/getNestedValue.d.ts +0 -33
  209. package/dist/lib/guardRegistry.d.ts +0 -32
  210. package/dist/lib/index.d.ts +0 -18
  211. package/dist/lib/jazari/svg-paths.d.ts +0 -61
  212. package/dist/lib/parseContentSegments.d.ts +0 -41
  213. package/dist/lib/tickRegistry.d.ts +0 -40
  214. package/dist/lib/traitRegistry.d.ts +0 -34
  215. package/dist/lib/verificationRegistry.d.ts +0 -107
  216. package/dist/lib/visualizer/index.d.ts +0 -143
  217. package/dist/locales/index.d.ts +0 -20
  218. package/dist/providers/EventBusProvider.d.ts +0 -60
  219. package/dist/providers/FetchedDataProvider.d.ts +0 -105
  220. package/dist/providers/OfflineModeProvider.d.ts +0 -79
  221. package/dist/providers/OrbitalProvider.d.ts +0 -101
  222. package/dist/providers/SelectionProvider.d.ts +0 -81
  223. package/dist/providers/VerificationProvider.d.ts +0 -63
  224. package/dist/providers/index.d.ts +0 -17
  225. package/dist/renderer/client-effect-executor.d.ts +0 -68
  226. package/dist/renderer/data-resolver.d.ts +0 -68
  227. package/dist/renderer/index.d.ts +0 -28
  228. package/dist/renderer/init.d.ts +0 -14
  229. package/dist/renderer/navigation.d.ts +0 -142
  230. package/dist/renderer/offline-executor.d.ts +0 -238
  231. package/dist/renderer/pattern-resolver.d.ts +0 -91
  232. package/dist/renderer/slot-definitions.d.ts +0 -45
  233. package/dist/renderer/types.d.ts +0 -160
  234. package/dist/renderer/useClientEffects.d.ts +0 -88
  235. package/dist/stores/entityStore.d.ts +0 -99
  236. package/dist/stores/filtering.d.ts +0 -51
  237. package/dist/stores/index.d.ts +0 -7
  238. package/dist/{chunk-RIZ76XRF.js → chunk-X3IKFHFT.js} +1 -1
@@ -1,253 +0,0 @@
1
- /**
2
- * Canvas Effect Types
3
- *
4
- * Type definitions for the canvas-based particle, sequence, and overlay
5
- * effect system. Used by canvasEffects engine and combat presets.
6
- *
7
- * Ported from trait-wars and generalized for any almadar-ui client.
8
- */
9
- /**
10
- * A single particle in flight — rendered as a tinted sprite each frame.
11
- */
12
- export interface CanvasParticle {
13
- /** Sprite URL (white-on-transparent particle) */
14
- spriteUrl: string;
15
- /** Current position in screen pixels */
16
- x: number;
17
- y: number;
18
- /** Velocity in pixels per second */
19
- vx: number;
20
- vy: number;
21
- /** Downward acceleration in px/s² (positive = down) */
22
- gravity: number;
23
- /** Current rotation in radians */
24
- rotation: number;
25
- /** Rotation speed in radians per second */
26
- rotationSpeed: number;
27
- /** Current scale (1.0 = original size) */
28
- scale: number;
29
- /** Scale change per second (negative = shrink) */
30
- scaleSpeed: number;
31
- /** Current alpha (0-1) */
32
- alpha: number;
33
- /** Alpha change per second (negative = fade out) */
34
- fadeRate: number;
35
- /** RGB tint color (applied via offscreen canvas compositing) */
36
- tint: {
37
- r: number;
38
- g: number;
39
- b: number;
40
- };
41
- /** Canvas blend mode */
42
- blendMode: GlobalCompositeOperation;
43
- /** Time this particle was spawned (ms) */
44
- spawnTime: number;
45
- /** Maximum lifetime in ms (particle removed after) */
46
- lifetime: number;
47
- }
48
- /**
49
- * Configuration for spawning a burst of particles.
50
- */
51
- export interface ParticleEmitterConfig {
52
- /** Array of sprite URLs to randomly pick from */
53
- spriteUrls: string[];
54
- /** Number of particles to spawn */
55
- count: number;
56
- /** Spawn origin in screen pixels */
57
- originX: number;
58
- originY: number;
59
- /** Random spread radius from origin (px) */
60
- spread: number;
61
- /** Velocity range (px/s) */
62
- velocityMin: number;
63
- velocityMax: number;
64
- /** Emission angle range (radians, 0 = right, PI/2 = down) */
65
- angleMin: number;
66
- angleMax: number;
67
- /** Gravity (px/s²) */
68
- gravity: number;
69
- /** RGB tint */
70
- tint: {
71
- r: number;
72
- g: number;
73
- b: number;
74
- };
75
- /** Scale range */
76
- scaleMin: number;
77
- scaleMax: number;
78
- /** Scale speed (per second) */
79
- scaleSpeed?: number;
80
- /** Particle lifetime range (ms) */
81
- lifetimeMin: number;
82
- lifetimeMax: number;
83
- /** Fade rate (alpha per second, negative = fade out) */
84
- fadeRate?: number;
85
- /** Starting alpha */
86
- alpha?: number;
87
- /** Canvas blend mode */
88
- blendMode?: GlobalCompositeOperation;
89
- /** Rotation speed range (radians/s) */
90
- rotationSpeedMin?: number;
91
- rotationSpeedMax?: number;
92
- }
93
- /**
94
- * A frame-sequence animation (e.g., explosion, smoke puff).
95
- */
96
- export interface CanvasSequence {
97
- /** Ordered array of frame sprite URLs */
98
- frameUrls: string[];
99
- /** Position in screen pixels (top-left of sprite) */
100
- x: number;
101
- y: number;
102
- /** Duration per frame in ms */
103
- frameDuration: number;
104
- /** Time this sequence started (ms) */
105
- startTime: number;
106
- /** Whether to loop the animation */
107
- loop: boolean;
108
- /** Render scale */
109
- scale: number;
110
- /** RGB tint (null = no tinting) */
111
- tint: {
112
- r: number;
113
- g: number;
114
- b: number;
115
- } | null;
116
- /** Alpha (0-1) */
117
- alpha: number;
118
- /** Canvas blend mode */
119
- blendMode: GlobalCompositeOperation;
120
- }
121
- /**
122
- * Configuration for spawning a frame sequence.
123
- */
124
- export interface SequenceConfig {
125
- frameUrls: string[];
126
- originX: number;
127
- originY: number;
128
- frameDuration: number;
129
- loop?: boolean;
130
- scale?: number;
131
- tint?: {
132
- r: number;
133
- g: number;
134
- b: number;
135
- } | null;
136
- alpha?: number;
137
- blendMode?: GlobalCompositeOperation;
138
- }
139
- /**
140
- * A static/fading overlay image (e.g., ground scorch mark, shield circle).
141
- */
142
- export interface CanvasOverlay {
143
- /** Sprite URL */
144
- spriteUrl: string;
145
- /** Center position in screen pixels */
146
- x: number;
147
- y: number;
148
- /** Current alpha (0-1) */
149
- alpha: number;
150
- /** Alpha change per second (negative = fade out) */
151
- fadeRate: number;
152
- /** Pulse amplitude (0 = no pulse, 0.3 = alpha oscillates ±0.3) */
153
- pulseAmplitude: number;
154
- /** Pulse frequency in Hz */
155
- pulseFrequency: number;
156
- /** Render scale */
157
- scale: number;
158
- /** Canvas blend mode */
159
- blendMode: GlobalCompositeOperation;
160
- /** Time this overlay was spawned (ms) */
161
- spawnTime: number;
162
- /** Maximum lifetime in ms */
163
- lifetime: number;
164
- }
165
- /**
166
- * Configuration for spawning an overlay.
167
- */
168
- export interface OverlayConfig {
169
- spriteUrl: string;
170
- originX: number;
171
- originY: number;
172
- alpha?: number;
173
- fadeRate?: number;
174
- pulseAmplitude?: number;
175
- pulseFrequency?: number;
176
- scale?: number;
177
- blendMode?: GlobalCompositeOperation;
178
- lifetime?: number;
179
- }
180
- /**
181
- * Full state of all active effects on the canvas.
182
- */
183
- export interface CanvasEffectState {
184
- particles: CanvasParticle[];
185
- sequences: CanvasSequence[];
186
- overlays: CanvasOverlay[];
187
- }
188
- /**
189
- * Combat action types that map to effect compositions.
190
- * Superset of trait-wars types + almadar-ui originals.
191
- */
192
- export type CombatActionType = 'melee' | 'ranged' | 'magic' | 'heal' | 'defend' | 'hit' | 'death' | 'buff' | 'debuff' | 'shield' | 'aoe' | 'critical';
193
- /**
194
- * A combat preset composes multiple effect layers.
195
- */
196
- export interface CombatPreset {
197
- /** Particle emitter configs to spawn */
198
- particles: ParticleEmitterConfig[];
199
- /** Sequence configs to spawn */
200
- sequences: SequenceConfig[];
201
- /** Overlay configs to spawn */
202
- overlays: OverlayConfig[];
203
- /** Screen shake intensity in pixels (0 = none) */
204
- screenShake: number;
205
- /** Screen flash color and duration */
206
- screenFlash: {
207
- r: number;
208
- g: number;
209
- b: number;
210
- duration: number;
211
- } | null;
212
- }
213
- /**
214
- * Effect asset manifest — the sprites and animation frames available for
215
- * the particle engine. This is the `assetManifest.effects` section.
216
- */
217
- export interface EffectAssetManifest {
218
- /** Base URL for all asset paths */
219
- baseUrl: string;
220
- /** Particle sprite groups (white-on-transparent, tinted at runtime) */
221
- particles?: {
222
- slash?: string[];
223
- magic?: string[];
224
- fire?: string[];
225
- flame?: string[];
226
- smoke?: string[];
227
- scorch?: string[];
228
- circle?: string[];
229
- flare?: string;
230
- spark?: string[];
231
- muzzle?: string[];
232
- star?: string[];
233
- trace?: string[];
234
- twirl?: string[];
235
- light?: string[];
236
- dirt?: string[];
237
- scratch?: string[];
238
- symbol?: string[];
239
- };
240
- /** Frame-sequence animations (array of frame image paths) */
241
- animations?: {
242
- explosion?: string[];
243
- smokePuff?: string[];
244
- flash?: string[];
245
- blackSmoke?: string[];
246
- gasSmoke?: string[];
247
- smokeExplosion?: string[];
248
- };
249
- }
250
- /**
251
- * Empty effect state constant.
252
- */
253
- export declare const EMPTY_EFFECT_STATE: CanvasEffectState;
@@ -1,109 +0,0 @@
1
- /**
2
- * Isometric Game Types
3
- *
4
- * Type definitions for isometric grid rendering: tiles, units, features.
5
- * Used by IsometricCanvas and game hooks.
6
- *
7
- * @packageDocumentation
8
- */
9
- /** A single isometric tile on the grid */
10
- export interface IsometricTile {
11
- /** Optional unique identifier (required for 3D rendering) */
12
- id?: string;
13
- /** Grid x coordinate */
14
- x: number;
15
- /** Grid y coordinate (2D) */
16
- y: number;
17
- /** Grid z coordinate (3D alternative to y) */
18
- z?: number;
19
- /** Terrain type key (e.g., 'grass', 'stone', 'water') - 2D */
20
- terrain?: string;
21
- /** Tile type for visual rendering (3D) */
22
- type?: string;
23
- /** Direct sprite URL override (bypasses getTerrainSprite resolver) */
24
- terrainSprite?: string;
25
- /** Whether units can traverse this tile (default true) */
26
- passable?: boolean;
27
- /** Movement cost for pathfinding (default 1) */
28
- movementCost?: number;
29
- /** Optional tile type for visual variants */
30
- tileType?: string;
31
- /** Elevation offset for 3D rendering */
32
- elevation?: number;
33
- }
34
- /** A unit positioned on the isometric grid */
35
- export interface IsometricUnit {
36
- /** Unique unit identifier */
37
- id: string;
38
- /** Current grid position (2D format) */
39
- position?: {
40
- x: number;
41
- y: number;
42
- };
43
- /** Grid x coordinate (3D format) */
44
- x?: number;
45
- /** Grid y coordinate (3D format) */
46
- y?: number;
47
- /** Grid z coordinate (3D format) */
48
- z?: number;
49
- /** Static sprite URL (used when no sprite sheet animation) */
50
- sprite?: string;
51
- /** Unit archetype key for sprite resolution */
52
- unitType?: string;
53
- /** Hero identifier for sprite sheet lookup */
54
- heroId?: string;
55
- /** Display name rendered below the unit */
56
- name?: string;
57
- /** Team affiliation for coloring */
58
- team?: 'player' | 'enemy' | 'neutral';
59
- /** Faction for 3D rendering (player/enemy/neutral) */
60
- faction?: 'player' | 'enemy' | 'neutral';
61
- /** Current health */
62
- health?: number;
63
- /** Maximum health */
64
- maxHealth?: number;
65
- /** Trait attachments for state display */
66
- traits?: {
67
- name: string;
68
- currentState: string;
69
- states: string[];
70
- cooldown: number;
71
- }[];
72
- /** Previous position for movement trail ghost */
73
- previousPosition?: {
74
- x: number;
75
- y: number;
76
- };
77
- /** Elevation offset for 3D rendering */
78
- elevation?: number;
79
- }
80
- /** A map feature (resource, building, portal, etc.) */
81
- export interface IsometricFeature {
82
- /** Optional unique identifier (required for 3D rendering) */
83
- id?: string;
84
- /** Grid x coordinate */
85
- x: number;
86
- /** Grid y coordinate (2D) */
87
- y: number;
88
- /** Grid z coordinate (3D alternative to y) */
89
- z?: number;
90
- /** Feature type key (e.g., 'goldMine', 'castle', 'portal') */
91
- type: string;
92
- /** Direct sprite URL override (bypasses getFeatureSprite resolver) */
93
- sprite?: string;
94
- /** 3D model URL (GLB format) for GameCanvas3D */
95
- assetUrl?: string;
96
- /** Color override for 3D rendering */
97
- color?: string;
98
- /** Elevation offset for 3D rendering */
99
- elevation?: number;
100
- }
101
- /** Camera state for pan/zoom */
102
- export interface CameraState {
103
- /** Camera X offset in pixels */
104
- x: number;
105
- /** Camera Y offset in pixels */
106
- y: number;
107
- /** Zoom level (1.0 = 100%) */
108
- zoom: number;
109
- }
@@ -1,73 +0,0 @@
1
- /**
2
- * Sprite Sheet Animation Types
3
- *
4
- * Type definitions for frame-based sprite sheet animation system.
5
- * Supports standard 8-column × 5-row character sheets.
6
- *
7
- * @packageDocumentation
8
- */
9
- /** Animation names matching sprite sheet row layout */
10
- export type AnimationName = 'idle' | 'walk' | 'attack' | 'hit' | 'death';
11
- /** Sheet file directions (physical PNG files) */
12
- export type SpriteDirection = 'se' | 'sw';
13
- /** Unit facing direction on screen (4 isometric directions) */
14
- export type FacingDirection = 'se' | 'sw' | 'ne' | 'nw';
15
- /** Definition for a single animation row in the sprite sheet */
16
- export interface AnimationDef {
17
- /** Row index in the sprite sheet (0-4) */
18
- row: number;
19
- /** Number of frames in this animation */
20
- frames: number;
21
- /** Frames per second */
22
- frameRate: number;
23
- /** Whether the animation loops */
24
- loop: boolean;
25
- }
26
- /** A resolved frame ready to draw on canvas */
27
- export interface ResolvedFrame {
28
- /** URL of the sprite sheet image */
29
- sheetUrl: string;
30
- /** Source X in the sheet (pixel offset) */
31
- sx: number;
32
- /** Source Y in the sheet (pixel offset) */
33
- sy: number;
34
- /** Source width (frame width) */
35
- sw: number;
36
- /** Source height (frame height) */
37
- sh: number;
38
- /** Whether to flip horizontally when drawing (for NE/NW directions) */
39
- flipX: boolean;
40
- /** When true, canvas should apply sine-bob breathing offset (frozen idle frame) */
41
- applyBreathing?: boolean;
42
- }
43
- /** Per-unit animation state tracked in the animation system */
44
- export interface UnitAnimationState {
45
- /** Unit identifier */
46
- unitId: string;
47
- /** Current animation playing */
48
- animation: AnimationName;
49
- /** Current facing direction */
50
- direction: FacingDirection;
51
- /** Current frame index within the animation */
52
- frame: number;
53
- /** Elapsed time in current animation (ms) */
54
- elapsed: number;
55
- /** Animation to play after current one-shot completes (null = idle) */
56
- queuedAnimation: AnimationName | null;
57
- /** Whether the current one-shot animation has finished its last frame */
58
- finished: boolean;
59
- }
60
- /** Frame dimensions for a sprite sheet */
61
- export interface SpriteFrameDims {
62
- /** Width of a single frame in pixels */
63
- width: number;
64
- /** Height of a single frame in pixels */
65
- height: number;
66
- }
67
- /** Sheet URLs for both directions */
68
- export interface SpriteSheetUrls {
69
- /** Southeast-facing sheet URL */
70
- se: string;
71
- /** Southwest-facing sheet URL */
72
- sw: string;
73
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * Canvas Effect Engine
3
- *
4
- * Pure functions for spawning, updating, and drawing canvas effects.
5
- * No React dependencies — called from the RAF loop via useCanvasEffects hook.
6
- *
7
- * Ported from trait-wars and generalized for any almadar-ui client.
8
- */
9
- import type { CanvasParticle, CanvasSequence, CanvasOverlay, CanvasEffectState, ParticleEmitterConfig, SequenceConfig, OverlayConfig } from '../types/effects';
10
- /**
11
- * Draw a sprite tinted with an RGB color onto the main canvas.
12
- * Uses offscreen canvas with `source-atop` compositing to recolor
13
- * white-on-transparent sprites.
14
- */
15
- export declare function drawTintedImage(ctx: CanvasRenderingContext2D, img: HTMLImageElement | ImageBitmap, x: number, y: number, w: number, h: number, tint: {
16
- r: number;
17
- g: number;
18
- b: number;
19
- }, alpha: number, blendMode?: GlobalCompositeOperation): void;
20
- /**
21
- * Spawn a burst of particles from an emitter config.
22
- */
23
- export declare function spawnParticles(config: ParticleEmitterConfig, animTime: number): CanvasParticle[];
24
- /**
25
- * Spawn a frame sequence animation.
26
- */
27
- export declare function spawnSequence(config: SequenceConfig, animTime: number): CanvasSequence;
28
- /**
29
- * Spawn an overlay effect.
30
- */
31
- export declare function spawnOverlay(config: OverlayConfig, animTime: number): CanvasOverlay;
32
- /**
33
- * Advance effect state by one frame. Returns new state with expired effects removed.
34
- */
35
- export declare function updateEffectState(state: CanvasEffectState, animTime: number, deltaMs: number): CanvasEffectState;
36
- type GetImageFn = (url: string) => HTMLImageElement | undefined;
37
- /**
38
- * Draw all active effects onto the canvas.
39
- */
40
- export declare function drawEffectState(ctx: CanvasRenderingContext2D, state: CanvasEffectState, animTime: number, getImage: GetImageFn): void;
41
- export declare function hasActiveEffects(state: CanvasEffectState): boolean;
42
- /**
43
- * Collect all sprite URLs from an EffectAssetManifest for preloading.
44
- */
45
- export declare function getAllEffectSpriteUrls(manifest: {
46
- baseUrl: string;
47
- particles?: Record<string, string[] | string | undefined>;
48
- animations?: Record<string, string[] | undefined>;
49
- }): string[];
50
- export {};
@@ -1,15 +0,0 @@
1
- /**
2
- * Combat Presets
3
- *
4
- * Maps combat actions to composed effect layers (particles + sequences + overlays).
5
- * Each preset factory takes a screen-space origin and returns a CombatPreset.
6
- *
7
- * Generalized from trait-wars: uses EffectAssetManifest instead of TraitWarsAssetManifest.
8
- */
9
- import type { CombatActionType, CombatPreset, EffectAssetManifest } from '../types/effects';
10
- type PresetFactory = (originX: number, originY: number) => CombatPreset;
11
- /**
12
- * Create combat preset factories from an effect asset manifest.
13
- */
14
- export declare function createCombatPresets(manifest: EffectAssetManifest): Record<CombatActionType, PresetFactory>;
15
- export {};
@@ -1,61 +0,0 @@
1
- /**
2
- * Isometric Coordinate Utilities
3
- *
4
- * Pure functions for 2:1 diamond isometric coordinate conversion.
5
- * No React dependencies — usable in any context.
6
- *
7
- * @packageDocumentation
8
- */
9
- /** Base tile width in pixels (before scale) */
10
- export declare const TILE_WIDTH = 256;
11
- /** Base tile height in pixels (before scale) — full sprite image height (Kenney 256×512) */
12
- export declare const TILE_HEIGHT = 512;
13
- /** Floor diamond height — the "walkable surface" portion of the tile (TILE_WIDTH / 2 for 2:1 ratio) */
14
- export declare const FLOOR_HEIGHT = 128;
15
- /**
16
- * Measured Y offset from sprite top to the diamond top vertex within a Kenney
17
- * 256×512 tile sprite. The code previously assumed `TILE_HEIGHT - FLOOR_HEIGHT = 384`,
18
- * but the actual diamond (dirt_E.png) begins at y = 374 because the 3D side walls
19
- * occupy 10 extra pixels above the pure 128 px diamond.
20
- *
21
- * Use `DIAMOND_TOP_Y * scale` for highlight positioning, unit groundY, feature
22
- * placement, and hit-testing — NOT `(TILE_HEIGHT - FLOOR_HEIGHT) * scale`.
23
- * `FLOOR_HEIGHT` remains 128 for the isoToScreen spacing formula (2:1 ratio).
24
- */
25
- export declare const DIAMOND_TOP_Y = 374;
26
- /**
27
- * Feature type → fallback color mapping (when sprites not loaded).
28
- */
29
- export declare const FEATURE_COLORS: Record<string, string>;
30
- /**
31
- * Convert tile grid coordinates to screen pixel coordinates.
32
- *
33
- * Uses 2:1 diamond isometric projection:
34
- * - X increases to the lower-right
35
- * - Y increases to the lower-left
36
- *
37
- * @param tileX - Grid X coordinate
38
- * @param tileY - Grid Y coordinate
39
- * @param scale - Render scale factor
40
- * @param baseOffsetX - Horizontal offset to center the grid
41
- * @returns Screen position { x, y } of the tile's top-left corner
42
- */
43
- export declare function isoToScreen(tileX: number, tileY: number, scale: number, baseOffsetX: number): {
44
- x: number;
45
- y: number;
46
- };
47
- /**
48
- * Convert screen pixel coordinates back to tile grid coordinates.
49
- *
50
- * Inverse of isoToScreen. Snaps to nearest integer tile position.
51
- *
52
- * @param screenX - Screen X in pixels
53
- * @param screenY - Screen Y in pixels
54
- * @param scale - Render scale factor
55
- * @param baseOffsetX - Horizontal offset used in isoToScreen
56
- * @returns Snapped grid position { x, y }
57
- */
58
- export declare function screenToIso(screenX: number, screenY: number, scale: number, baseOffsetX: number): {
59
- x: number;
60
- y: number;
61
- };
@@ -1,57 +0,0 @@
1
- /**
2
- * Sprite Animation Engine
3
- *
4
- * Pure functions for sprite sheet animation: direction inference,
5
- * frame computation, sheet resolution, and animation state management.
6
- * No React dependencies — usable in any context.
7
- *
8
- * @packageDocumentation
9
- */
10
- import type { AnimationName, FacingDirection, SpriteDirection, ResolvedFrame, UnitAnimationState, SpriteFrameDims, SpriteSheetUrls } from '../types/spriteAnimation';
11
- /**
12
- * Infer facing direction from a movement delta on the isometric grid.
13
- * dx/dy are tile coordinate deltas (not screen pixels).
14
- *
15
- * Isometric grid:
16
- * NW ← (-x) NE ← (-y)
17
- * SW ← (+y) SE ← (+x)
18
- */
19
- export declare function inferDirection(dx: number, dy: number): FacingDirection;
20
- /**
21
- * Map a 4-direction facing to the actual sheet file direction + flipX flag.
22
- * We only have SE and SW sheet images. NE/NW are rendered by flipping:
23
- * SE → SE sheet, no flip
24
- * SW → SW sheet, no flip
25
- * NE → SW sheet, flipX (mirror of SW gives NE)
26
- * NW → SE sheet, flipX (mirror of SE gives NW)
27
- */
28
- export declare function resolveSheetDirection(facing: FacingDirection): {
29
- sheetDir: SpriteDirection;
30
- flipX: boolean;
31
- };
32
- /**
33
- * Compute the current frame index and whether the animation has finished.
34
- */
35
- export declare function getCurrentFrame(animName: AnimationName, elapsed: number): {
36
- frame: number;
37
- finished: boolean;
38
- };
39
- /**
40
- * Resolve a complete frame descriptor for canvas drawing.
41
- * Returns null if no sprite sheet URLs are available for this unit.
42
- */
43
- export declare function resolveFrame(sheetUrls: SpriteSheetUrls | null, frameDims: SpriteFrameDims, animState: UnitAnimationState): ResolvedFrame | null;
44
- /**
45
- * Create initial animation state for a unit (idle, facing SE).
46
- */
47
- export declare function createUnitAnimationState(unitId: string): UnitAnimationState;
48
- /**
49
- * Transition to a new animation. Resets elapsed time.
50
- * Optionally updates direction. Death cannot be overridden.
51
- */
52
- export declare function transitionAnimation(state: UnitAnimationState, newAnim: AnimationName, direction?: FacingDirection): UnitAnimationState;
53
- /**
54
- * Advance animation state by deltaMs.
55
- * Handles one-shot → queued/idle transitions automatically.
56
- */
57
- export declare function tickAnimationState(state: UnitAnimationState, deltaMs: number): UnitAnimationState;
@@ -1,16 +0,0 @@
1
- /**
2
- * Sprite Sheet Constants
3
- *
4
- * Standard layout for 8-column × 5-row character sprite sheets.
5
- * All characters share identical sheet geometry.
6
- *
7
- * @packageDocumentation
8
- */
9
- import type { AnimationDef, AnimationName } from '../types/spriteAnimation';
10
- /** Number of columns in a sprite sheet (frames per row) */
11
- export declare const SHEET_COLUMNS = 8;
12
- /**
13
- * Standard sprite sheet row layout.
14
- * Row 0 = idle, Row 1 = walk, Row 2 = attack, Row 3 = hit, Row 4 = death.
15
- */
16
- export declare const SPRITE_SHEET_LAYOUT: Record<AnimationName, AnimationDef>;
@@ -1,37 +0,0 @@
1
- export { type EntityDisplayProps, EntityDisplayEvents, type SortPayload, type PaginatePayload, type SearchPayload, type FilterPayload, type SelectPayload, } from "./types";
2
- export { DataTable, type DataTableProps, type Column, type RowAction, } from "./DataTable";
3
- export { StatCard, type StatCardProps } from "./StatCard";
4
- export { PageHeader, type PageHeaderProps, type PageBreadcrumb, } from "./PageHeader";
5
- export { DetailPanel, type DetailPanelProps, type DetailField, type DetailSection, } from "./DetailPanel";
6
- export { FormSection, FormLayout, FormActions, type FormSectionProps, type FormLayoutProps, type FormActionsProps, } from "./FormSection";
7
- export { Form, type FormProps } from "./Form";
8
- export { Header, type HeaderProps } from "./Header";
9
- export { Navigation, type NavigationProps, type NavigationItem, } from "./Navigation";
10
- export { Section, type SectionProps } from "./Section";
11
- export { Sidebar, type SidebarProps, type SidebarItem } from "./Sidebar";
12
- export { Split, type SplitProps } from "./Split";
13
- export { Table, type TableProps, type TableColumn, type SortDirection, } from "./Table";
14
- export { List, type ListProps, type ListItem } from "./List";
15
- export { CardGrid, type CardGridProps, type CardGridGap } from "./CardGrid";
16
- export { MasterDetail, type MasterDetailProps } from "./MasterDetail";
17
- export { ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, } from "./ConfirmDialog";
18
- export { WizardContainer, type WizardContainerProps, type WizardStep, } from "./WizardContainer";
19
- export { OrbitalVisualization, type OrbitalVisualizationProps, } from "./OrbitalVisualization";
20
- export { StateMachineView, DomStateMachineVisualizer, OrbitalStateMachineView, type StateMachineViewProps, type TransitionBundle, } from "./StateMachineView";
21
- export { JazariStateMachine, type JazariStateMachineProps, } from "./JazariStateMachine";
22
- export { ContentRenderer, type ContentRendererProps, } from "./ContentRenderer";
23
- export * from "./book";
24
- export * from "./layout";
25
- export * from "./game";
26
- export { UISlotRenderer, UISlotComponent, SlotContentRenderer, type UISlotRendererProps, } from "./UISlotRenderer";
27
- export { ModalSlot, type ModalSlotProps } from "./ModalSlot";
28
- export { DrawerSlot, type DrawerSlotProps } from "./DrawerSlot";
29
- export { ToastSlot, type ToastSlotProps } from "./ToastSlot";
30
- export { Chart, type ChartProps, type ChartType, type ChartDataPoint, type ChartSeries, } from "./Chart";
31
- export { Meter, type MeterProps, type MeterVariant, type MeterThreshold, } from "./Meter";
32
- export { Timeline, type TimelineProps, type TimelineItem, type TimelineItemStatus, } from "./Timeline";
33
- export { MediaGallery, type MediaGalleryProps, type MediaItem, } from "./MediaGallery";
34
- export { SignaturePad, type SignaturePadProps, } from "./SignaturePad";
35
- export { DocumentViewer, type DocumentViewerProps, type DocumentType, } from "./DocumentViewer";
36
- export { GraphCanvas, type GraphCanvasProps, type GraphNode, type GraphEdge, } from "./GraphCanvas";
37
- export { CodeViewer, type CodeViewerProps, type CodeViewerMode, type DiffLine, } from "./CodeViewer";