@almadar/ui 2.13.3 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (420) hide show
  1. package/dist/{chunk-UNDQO6DL.js → chunk-4KP6IZEQ.js} +3 -3
  2. package/dist/chunk-4N3BAPDB.js +1667 -0
  3. package/dist/{chunk-PERGHHON.js → chunk-IRIGCHP4.js} +2 -12
  4. package/dist/{chunk-Y7IHEYYE.js → chunk-QU2X55WH.js} +11 -1
  5. package/dist/{chunk-4ZBSL37D.js → chunk-XL7WB2O5.js} +415 -58
  6. package/dist/{chunk-MSLMORZK.js → chunk-YPY74G7F.js} +13434 -2264
  7. package/dist/components/atoms/AnimatedCounter.d.ts +20 -0
  8. package/dist/components/atoms/Avatar.d.ts +58 -0
  9. package/dist/components/atoms/Badge.d.ts +14 -0
  10. package/dist/components/atoms/Box.d.ts +57 -0
  11. package/dist/components/atoms/Button.d.ts +24 -0
  12. package/dist/components/atoms/Card.d.ts +18 -0
  13. package/dist/components/atoms/Center.d.ts +33 -0
  14. package/dist/components/atoms/Checkbox.d.ts +9 -0
  15. package/dist/components/atoms/ConditionalWrapper.d.ts +68 -0
  16. package/dist/components/atoms/ConfettiEffect.d.ts +19 -0
  17. package/dist/components/atoms/DayCell.d.ts +21 -0
  18. package/dist/components/atoms/Divider.d.ts +29 -0
  19. package/dist/components/atoms/FlipContainer.d.ts +21 -0
  20. package/dist/components/atoms/Icon.d.ts +39 -0
  21. package/dist/components/atoms/InfiniteScrollSentinel.d.ts +23 -0
  22. package/dist/components/atoms/Input.d.ts +26 -0
  23. package/dist/components/atoms/Label.d.ts +5 -0
  24. package/dist/components/atoms/LawReferenceTooltip.d.ts +48 -0
  25. package/dist/components/atoms/Overlay.d.ts +16 -0
  26. package/dist/components/atoms/ProgressBar.d.ts +63 -0
  27. package/dist/components/atoms/Radio.d.ts +26 -0
  28. package/dist/components/atoms/RangeSlider.d.ts +31 -0
  29. package/dist/components/atoms/Select.d.ts +12 -0
  30. package/dist/components/atoms/Spacer.d.ts +25 -0
  31. package/dist/components/atoms/Spinner.d.ts +6 -0
  32. package/dist/components/atoms/Stack.d.ts +66 -0
  33. package/dist/components/atoms/StatusDot.d.ts +14 -0
  34. package/dist/components/atoms/Switch.d.ts +12 -0
  35. package/dist/components/atoms/TextHighlight.d.ts +53 -0
  36. package/dist/components/atoms/Textarea.d.ts +5 -0
  37. package/dist/components/atoms/ThemeSelector.d.ts +21 -0
  38. package/dist/components/atoms/ThemeToggle.d.ts +33 -0
  39. package/dist/components/atoms/TimeSlotCell.d.ts +23 -0
  40. package/dist/components/atoms/TrendIndicator.d.ts +18 -0
  41. package/dist/components/atoms/TypewriterText.d.ts +20 -0
  42. package/dist/components/atoms/Typography.d.ts +57 -0
  43. package/dist/components/atoms/game/ActionButton.d.ts +25 -0
  44. package/dist/components/atoms/game/ChoiceButton.d.ts +18 -0
  45. package/dist/components/atoms/game/ComboCounter.d.ts +16 -0
  46. package/dist/components/atoms/game/ControlButton.d.ts +31 -0
  47. package/dist/components/atoms/game/DamageNumber.d.ts +14 -0
  48. package/dist/components/atoms/game/DialogueBubble.d.ts +16 -0
  49. package/dist/components/atoms/game/HealthBar.d.ts +18 -0
  50. package/dist/components/atoms/game/ItemSlot.d.ts +25 -0
  51. package/dist/components/atoms/game/MiniMap.d.ts +36 -0
  52. package/dist/components/atoms/game/ResourceCounter.d.ts +21 -0
  53. package/dist/components/atoms/game/ScoreDisplay.d.ts +21 -0
  54. package/dist/components/atoms/game/Sprite.d.ts +63 -0
  55. package/dist/components/atoms/game/StateIndicator.d.ts +31 -0
  56. package/dist/components/atoms/game/StatusEffect.d.ts +21 -0
  57. package/dist/components/atoms/game/TimerDisplay.d.ts +18 -0
  58. package/dist/components/atoms/game/TurnIndicator.d.ts +18 -0
  59. package/dist/components/atoms/game/WaypointMarker.d.ts +19 -0
  60. package/dist/components/atoms/game/XPBar.d.ts +20 -0
  61. package/dist/components/atoms/game/index.d.ts +25 -0
  62. package/dist/components/atoms/index.d.ts +37 -0
  63. package/dist/components/index.css +508 -0
  64. package/dist/components/index.d.ts +6 -9788
  65. package/dist/components/index.js +769 -11187
  66. package/dist/components/molecules/Accordion.d.ts +67 -0
  67. package/dist/components/molecules/Alert.d.ts +24 -0
  68. package/dist/components/molecules/Breadcrumb.d.ts +55 -0
  69. package/dist/components/molecules/ButtonGroup.d.ts +67 -0
  70. package/dist/components/molecules/CalendarGrid.d.ts +43 -0
  71. package/dist/components/molecules/Card.d.ts +56 -0
  72. package/dist/components/molecules/Carousel.d.ts +31 -0
  73. package/dist/components/molecules/ChartLegend.d.ts +20 -0
  74. package/dist/components/molecules/Container.d.ts +30 -0
  75. package/dist/components/molecules/DataGrid.d.ts +75 -0
  76. package/dist/components/molecules/DataList.d.ts +95 -0
  77. package/dist/components/molecules/DateRangeSelector.d.ts +22 -0
  78. package/dist/components/molecules/Drawer.d.ts +46 -0
  79. package/dist/components/molecules/EmptyState.d.ts +25 -0
  80. package/dist/components/molecules/ErrorBoundary.d.ts +55 -0
  81. package/dist/components/molecules/ErrorState.d.ts +13 -0
  82. package/dist/components/molecules/FilterGroup.d.ts +54 -0
  83. package/dist/components/molecules/Flex.d.ts +43 -0
  84. package/dist/components/molecules/FlipCard.d.ts +25 -0
  85. package/dist/components/molecules/FloatingActionButton.d.ts +69 -0
  86. package/dist/components/molecules/FormField.d.ts +16 -0
  87. package/dist/components/molecules/FormSectionHeader.d.ts +30 -0
  88. package/dist/components/molecules/GraphView.d.ts +45 -0
  89. package/dist/components/molecules/Grid.d.ts +54 -0
  90. package/dist/components/molecules/InputGroup.d.ts +24 -0
  91. package/dist/components/molecules/Lightbox.d.ts +25 -0
  92. package/dist/components/molecules/LineChart.d.ts +33 -0
  93. package/dist/components/molecules/LoadingState.d.ts +7 -0
  94. package/dist/components/molecules/MapView.d.ts +40 -0
  95. package/dist/components/molecules/Menu.d.ts +40 -0
  96. package/dist/components/molecules/Meter.d.ts +51 -0
  97. package/dist/components/molecules/Modal.d.ts +28 -0
  98. package/dist/components/molecules/NumberStepper.d.ts +27 -0
  99. package/dist/components/molecules/Pagination.d.ts +66 -0
  100. package/dist/components/molecules/Popover.d.ts +39 -0
  101. package/dist/components/molecules/ProgressDots.d.ts +24 -0
  102. package/dist/components/molecules/PullToRefresh.d.ts +21 -0
  103. package/dist/components/molecules/QuizBlock.d.ts +20 -0
  104. package/dist/components/molecules/RelationSelect.d.ts +48 -0
  105. package/dist/components/molecules/RepeatableFormSection.d.ts +58 -0
  106. package/dist/components/molecules/ScaledDiagram.d.ts +20 -0
  107. package/dist/components/molecules/SearchInput.d.ts +60 -0
  108. package/dist/components/molecules/SidePanel.d.ts +47 -0
  109. package/dist/components/molecules/SimpleGrid.d.ts +27 -0
  110. package/dist/components/molecules/Skeleton.d.ts +35 -0
  111. package/dist/components/molecules/SortableList.d.ts +17 -0
  112. package/dist/components/molecules/StarRating.d.ts +26 -0
  113. package/dist/components/molecules/StatDisplay.d.ts +37 -0
  114. package/dist/components/molecules/SwipeableRow.d.ts +24 -0
  115. package/dist/components/molecules/Tabs.d.ts +45 -0
  116. package/dist/components/molecules/Toast.d.ts +35 -0
  117. package/dist/components/molecules/Tooltip.d.ts +25 -0
  118. package/dist/components/molecules/UploadDropZone.d.ts +26 -0
  119. package/dist/components/molecules/ViolationAlert.d.ts +49 -0
  120. package/dist/components/molecules/WizardNavigation.d.ts +51 -0
  121. package/dist/components/molecules/WizardProgress.d.ts +42 -0
  122. package/dist/components/molecules/game/ActionButtons.d.ts +34 -0
  123. package/dist/components/molecules/game/CombatLog.d.ts +30 -0
  124. package/dist/components/molecules/game/CraftingRecipe.d.ts +33 -0
  125. package/dist/components/molecules/game/DPad.d.ts +22 -0
  126. package/dist/components/molecules/game/DialogueBox.d.ts +78 -0
  127. package/dist/components/molecules/game/EnemyPlate.d.ts +27 -0
  128. package/dist/components/molecules/game/GameCanvas2D.d.ts +18 -0
  129. package/dist/components/molecules/game/GameHud.d.ts +49 -0
  130. package/dist/components/molecules/game/GameMenu.d.ts +43 -0
  131. package/dist/components/molecules/game/GameOverScreen.d.ts +56 -0
  132. package/dist/components/molecules/game/HealthPanel.d.ts +27 -0
  133. package/dist/components/molecules/game/InventoryGrid.d.ts +30 -0
  134. package/dist/components/molecules/game/InventoryPanel.d.ts +67 -0
  135. package/dist/components/molecules/game/IsometricCanvas.d.ts +127 -0
  136. package/dist/components/molecules/game/PlatformerCanvas.d.ts +52 -0
  137. package/dist/components/molecules/game/PowerupSlots.d.ts +23 -0
  138. package/dist/components/molecules/game/QuestTracker.d.ts +20 -0
  139. package/dist/components/molecules/game/ResourceBar.d.ts +23 -0
  140. package/dist/components/molecules/game/ScoreBoard.d.ts +18 -0
  141. package/dist/components/molecules/game/StatBadge.d.ts +27 -0
  142. package/dist/components/molecules/game/TurnPanel.d.ts +29 -0
  143. package/dist/components/molecules/game/UnitCommandBar.d.ts +25 -0
  144. package/dist/components/molecules/game/index.d.ts +30 -0
  145. package/dist/components/molecules/index.d.ts +59 -0
  146. package/dist/components/molecules/markdown/CodeBlock.d.ts +25 -0
  147. package/dist/components/molecules/markdown/MarkdownContent.d.ts +26 -0
  148. package/dist/components/molecules/markdown/index.d.ts +2 -0
  149. package/dist/components/organisms/CardGrid.d.ts +80 -0
  150. package/dist/components/organisms/Chart.d.ts +59 -0
  151. package/dist/components/organisms/CodeViewer.d.ts +67 -0
  152. package/dist/components/organisms/ComponentPatterns.d.ts +453 -0
  153. package/dist/components/organisms/ConfirmDialog.d.ts +50 -0
  154. package/dist/components/organisms/ContentRenderer.d.ts +23 -0
  155. package/dist/components/organisms/CustomPattern.d.ts +104 -0
  156. package/dist/components/organisms/DataTable.d.ts +67 -0
  157. package/dist/components/organisms/DetailPanel.d.ts +78 -0
  158. package/dist/components/organisms/DocumentViewer.d.ts +60 -0
  159. package/dist/components/organisms/DrawerSlot.d.ts +39 -0
  160. package/dist/components/organisms/Form.d.ts +206 -0
  161. package/dist/components/organisms/FormSection.d.ts +41 -0
  162. package/dist/components/organisms/GraphCanvas.d.ts +69 -0
  163. package/dist/components/organisms/Header.d.ts +110 -0
  164. package/dist/components/organisms/JazariStateMachine.d.ts +60 -0
  165. package/dist/components/organisms/LayoutPatterns.d.ts +181 -0
  166. package/dist/components/organisms/List.d.ts +78 -0
  167. package/dist/components/organisms/MasterDetail.d.ts +32 -0
  168. package/dist/components/organisms/MediaGallery.d.ts +57 -0
  169. package/dist/components/organisms/Meter.d.ts +58 -0
  170. package/dist/components/organisms/ModalSlot.d.ts +35 -0
  171. package/dist/components/organisms/Navigation.d.ts +68 -0
  172. package/dist/components/organisms/NotifyListener.d.ts +15 -0
  173. package/dist/components/organisms/OrbitalVisualization.d.ts +48 -0
  174. package/dist/components/organisms/PageHeader.d.ts +59 -0
  175. package/dist/components/organisms/Section.d.ts +44 -0
  176. package/dist/components/organisms/Sidebar.d.ts +63 -0
  177. package/dist/components/organisms/SignaturePad.d.ts +44 -0
  178. package/dist/components/organisms/Split.d.ts +42 -0
  179. package/dist/components/organisms/StatCard.d.ts +62 -0
  180. package/dist/components/organisms/StateMachineView.d.ts +36 -0
  181. package/dist/components/organisms/Table.d.ts +99 -0
  182. package/dist/components/organisms/Timeline.d.ts +49 -0
  183. package/dist/components/organisms/ToastSlot.d.ts +38 -0
  184. package/dist/components/organisms/UISlotRenderer.d.ts +112 -0
  185. package/dist/components/organisms/WizardContainer.d.ts +160 -0
  186. package/dist/components/organisms/book/BookChapterView.d.ts +17 -0
  187. package/dist/components/organisms/book/BookCoverPage.d.ts +20 -0
  188. package/dist/components/organisms/book/BookNavBar.d.ts +19 -0
  189. package/dist/components/organisms/book/BookTableOfContents.d.ts +18 -0
  190. package/dist/components/organisms/book/BookViewer.d.ts +28 -0
  191. package/dist/components/organisms/book/index.d.ts +7 -0
  192. package/dist/components/organisms/book/types.d.ts +77 -0
  193. package/dist/components/organisms/component-registry.generated.d.ts +9 -0
  194. package/dist/components/organisms/debug/RuntimeDebugger.d.ts +19 -0
  195. package/dist/components/organisms/debug/hooks/useDebugData.d.ts +25 -0
  196. package/dist/components/organisms/debug/index.d.ts +13 -0
  197. package/dist/components/organisms/debug/tabs/EntitiesTab.d.ts +13 -0
  198. package/dist/components/organisms/debug/tabs/EventDispatcherTab.d.ts +16 -0
  199. package/dist/components/organisms/debug/tabs/EventFlowTab.d.ts +9 -0
  200. package/dist/components/organisms/debug/tabs/GuardsPanel.d.ts +9 -0
  201. package/dist/components/organisms/debug/tabs/ServerBridgeTab.d.ts +9 -0
  202. package/dist/components/organisms/debug/tabs/TicksTab.d.ts +13 -0
  203. package/dist/components/organisms/debug/tabs/TraitsTab.d.ts +13 -0
  204. package/dist/components/organisms/debug/tabs/TransitionTimeline.d.ts +9 -0
  205. package/dist/components/organisms/debug/tabs/VerificationTab.d.ts +10 -0
  206. package/dist/components/organisms/game/BattleBoard.d.ts +175 -0
  207. package/dist/components/organisms/game/CanvasEffect.d.ts +68 -0
  208. package/dist/components/organisms/game/CastleBoard.d.ts +85 -0
  209. package/dist/components/organisms/game/CombatLog.d.ts +2 -0
  210. package/dist/components/organisms/game/DialogueBox.d.ts +2 -0
  211. package/dist/components/organisms/game/GameAudioProvider.d.ts +47 -0
  212. package/dist/components/organisms/game/GameAudioToggle.d.ts +28 -0
  213. package/dist/components/organisms/game/GameCanvas3D.d.ts +181 -0
  214. package/dist/components/organisms/game/GameHud.d.ts +2 -0
  215. package/dist/components/organisms/game/GameMenu.d.ts +2 -0
  216. package/dist/components/organisms/game/GameOverScreen.d.ts +2 -0
  217. package/dist/components/organisms/game/InventoryPanel.d.ts +2 -0
  218. package/dist/components/organisms/game/IsometricCanvas.d.ts +3 -0
  219. package/dist/components/organisms/game/PlatformerCanvas.d.ts +2 -0
  220. package/dist/components/organisms/game/TraitSlot.d.ts +90 -0
  221. package/dist/components/organisms/game/TraitStateViewer.d.ts +53 -0
  222. package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +26 -0
  223. package/dist/components/organisms/game/WorldMapBoard.d.ts +156 -0
  224. package/dist/components/organisms/game/editor/editorUtils.d.ts +109 -0
  225. package/dist/components/organisms/game/editor/index.d.ts +9 -0
  226. package/dist/components/organisms/game/hooks/useBattleState.d.ts +35 -0
  227. package/dist/components/organisms/game/hooks/useCamera.d.ts +41 -0
  228. package/dist/components/organisms/game/hooks/useGameAudio.d.ts +47 -0
  229. package/dist/components/organisms/game/hooks/useImageCache.d.ts +16 -0
  230. package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +45 -0
  231. package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +43 -0
  232. package/dist/components/organisms/game/index.d.ts +52 -0
  233. package/dist/components/organisms/game/managers/PhysicsManager.d.ts +103 -0
  234. package/dist/components/organisms/game/physics-sim/SimulationCanvas.d.ts +20 -0
  235. package/dist/components/organisms/game/physics-sim/SimulationControls.d.ts +28 -0
  236. package/dist/components/organisms/game/physics-sim/SimulationGraph.d.ts +25 -0
  237. package/dist/components/organisms/game/physics-sim/index.d.ts +7 -0
  238. package/dist/components/organisms/game/physics-sim/presets/index.d.ts +4 -0
  239. package/dist/components/organisms/game/physics-sim/presets/mechanics.d.ts +4 -0
  240. package/dist/components/organisms/game/physics-sim/presets/types.d.ts +43 -0
  241. package/dist/components/organisms/game/puzzles/builder/BuilderBoard.d.ts +52 -0
  242. package/dist/components/organisms/game/puzzles/builder/index.d.ts +2 -0
  243. package/dist/components/organisms/game/puzzles/classifier/ClassifierBoard.d.ts +53 -0
  244. package/dist/components/organisms/game/puzzles/classifier/index.d.ts +2 -0
  245. package/dist/components/organisms/game/puzzles/debugger/DebuggerBoard.d.ts +45 -0
  246. package/dist/components/organisms/game/puzzles/debugger/index.d.ts +2 -0
  247. package/dist/components/organisms/game/puzzles/event-handler/EventHandlerBoard.d.ts +55 -0
  248. package/dist/components/organisms/game/puzzles/event-handler/EventLog.d.ts +31 -0
  249. package/dist/components/organisms/game/puzzles/event-handler/ObjectRulePanel.d.ts +45 -0
  250. package/dist/components/organisms/game/puzzles/event-handler/RuleEditor.d.ts +41 -0
  251. package/dist/components/organisms/game/puzzles/event-handler/index.d.ts +8 -0
  252. package/dist/components/organisms/game/puzzles/negotiator/NegotiatorBoard.d.ts +54 -0
  253. package/dist/components/organisms/game/puzzles/negotiator/index.d.ts +2 -0
  254. package/dist/components/organisms/game/puzzles/sequencer/ActionPalette.d.ts +34 -0
  255. package/dist/components/organisms/game/puzzles/sequencer/ActionTile.d.ts +30 -0
  256. package/dist/components/organisms/game/puzzles/sequencer/SequenceBar.d.ts +41 -0
  257. package/dist/components/organisms/game/puzzles/sequencer/SequencerBoard.d.ts +72 -0
  258. package/dist/components/organisms/game/puzzles/sequencer/index.d.ts +8 -0
  259. package/dist/components/organisms/game/puzzles/simulator/SimulatorBoard.d.ts +54 -0
  260. package/dist/components/organisms/game/puzzles/simulator/index.d.ts +2 -0
  261. package/dist/components/organisms/game/puzzles/state-architect/CodeView.d.ts +24 -0
  262. package/dist/components/organisms/game/puzzles/state-architect/StateArchitectBoard.d.ts +76 -0
  263. package/dist/components/organisms/game/puzzles/state-architect/StateNode.d.ts +33 -0
  264. package/dist/components/organisms/game/puzzles/state-architect/TransitionArrow.d.ts +36 -0
  265. package/dist/components/organisms/game/puzzles/state-architect/VariablePanel.d.ts +28 -0
  266. package/dist/components/organisms/game/puzzles/state-architect/index.d.ts +10 -0
  267. package/dist/components/organisms/game/three/Camera3D.d.ts +60 -0
  268. package/dist/components/organisms/game/three/Lighting3D.d.ts +47 -0
  269. package/dist/components/organisms/game/three/Scene3D.d.ts +37 -0
  270. package/dist/components/organisms/game/three/components/Canvas3DErrorBoundary.d.ts +51 -0
  271. package/dist/components/organisms/game/three/components/Canvas3DLoadingState.d.ts +44 -0
  272. package/dist/components/organisms/game/three/components/ModelLoader.d.ts +44 -0
  273. package/dist/components/organisms/game/three/components/PhysicsObject3D.d.ts +74 -0
  274. package/dist/components/organisms/game/three/components/index.d.ts +10 -0
  275. package/dist/components/organisms/game/three/hooks/useAssetLoader.d.ts +58 -0
  276. package/dist/components/organisms/game/three/hooks/useGameCanvas3DEvents.d.ts +79 -0
  277. package/dist/components/organisms/game/three/hooks/useRaycaster.d.ts +86 -0
  278. package/dist/components/organisms/game/three/hooks/useSceneGraph.d.ts +66 -0
  279. package/dist/components/organisms/game/three/hooks/useThree.d.ts +58 -0
  280. package/dist/components/organisms/game/three/index.d.ts +18 -1228
  281. package/dist/components/organisms/game/three/index.js +49 -1709
  282. package/dist/components/organisms/game/three/loaders/AssetLoader.d.ts +80 -0
  283. package/dist/components/organisms/game/three/renderers/FeatureRenderer.d.ts +44 -0
  284. package/dist/components/organisms/game/three/renderers/FeatureRenderer3D.d.ts +44 -0
  285. package/dist/components/organisms/game/three/renderers/TileRenderer.d.ts +57 -0
  286. package/dist/components/organisms/game/three/renderers/UnitRenderer.d.ts +46 -0
  287. package/dist/components/organisms/game/three/renderers/index.d.ts +11 -0
  288. package/dist/components/organisms/game/three/utils/culling.d.ts +134 -0
  289. package/dist/components/organisms/game/three/utils/grid3D.d.ts +154 -0
  290. package/dist/components/organisms/game/types/effects.d.ts +253 -0
  291. package/dist/components/organisms/game/types/game.d.ts +92 -0
  292. package/dist/{isometric-ynNHVPZx.d.ts → components/organisms/game/types/isometric.d.ts} +4 -6
  293. package/dist/components/organisms/game/types/spriteAnimation.d.ts +73 -0
  294. package/dist/components/organisms/game/useCanvasEffects.d.ts +26 -0
  295. package/dist/components/organisms/game/utils/canvasEffects.d.ts +50 -0
  296. package/dist/components/organisms/game/utils/combatEffects.d.ts +64 -0
  297. package/dist/components/organisms/game/utils/combatPresets.d.ts +15 -0
  298. package/dist/components/organisms/game/utils/isometric.d.ts +61 -0
  299. package/dist/components/organisms/game/utils/spriteAnimation.d.ts +57 -0
  300. package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +16 -0
  301. package/dist/components/organisms/index.d.ts +38 -0
  302. package/dist/components/organisms/layout/DashboardGrid.d.ts +35 -0
  303. package/dist/components/organisms/layout/MasterDetail.d.ts +32 -0
  304. package/dist/components/organisms/layout/SplitPane.d.ts +34 -0
  305. package/dist/components/organisms/layout/TabbedContainer.d.ts +42 -0
  306. package/dist/components/organisms/layout/index.d.ts +9 -0
  307. package/dist/components/organisms/types.d.ts +63 -0
  308. package/dist/components/templates/AuthLayout.d.ts +14 -0
  309. package/dist/components/templates/BattleTemplate.d.ts +25 -0
  310. package/dist/components/templates/CastleTemplate.d.ts +23 -0
  311. package/dist/components/templates/CounterTemplate.d.ts +44 -0
  312. package/dist/components/templates/DashboardLayout.d.ts +34 -0
  313. package/dist/components/templates/GameCanvas3DBattleTemplate.d.ts +96 -0
  314. package/dist/components/templates/GameCanvas3DCastleTemplate.d.ts +90 -0
  315. package/dist/components/templates/GameCanvas3DWorldMapTemplate.d.ts +96 -0
  316. package/dist/components/templates/GameShell.d.ts +34 -0
  317. package/dist/components/templates/GameTemplate.d.ts +36 -0
  318. package/dist/components/templates/GenericAppTemplate.d.ts +30 -0
  319. package/dist/components/templates/WorldMapTemplate.d.ts +29 -0
  320. package/dist/components/templates/index.d.ts +10 -0
  321. package/dist/components/templates/types.d.ts +22 -0
  322. package/dist/context/DesignThemeContext.d.ts +21 -0
  323. package/dist/{ThemeContext-D9xUORq5.d.ts → context/ThemeContext.d.ts} +15 -16
  324. package/dist/context/UISlotContext.d.ts +75 -0
  325. package/dist/context/UserContext.d.ts +111 -0
  326. package/dist/context/index.d.ts +6 -206
  327. package/dist/{event-bus-types-CjJduURa.d.ts → hooks/event-bus-types.d.ts} +4 -6
  328. package/dist/hooks/index.d.ts +30 -1220
  329. package/dist/hooks/index.js +2 -2
  330. package/dist/hooks/useAgentChat.d.ts +104 -0
  331. package/dist/hooks/useAuthContext.d.ts +25 -0
  332. package/dist/hooks/useCompile.d.ts +22 -0
  333. package/dist/hooks/useDeepAgentGeneration.d.ts +46 -0
  334. package/dist/hooks/useDragReorder.d.ts +26 -0
  335. package/dist/hooks/useEntities.d.ts +52 -0
  336. package/dist/hooks/useEntityData.d.ts +155 -0
  337. package/dist/hooks/useEntityMutations.d.ts +80 -0
  338. package/dist/hooks/useEventBus.d.ts +96 -0
  339. package/dist/hooks/useExtensions.d.ts +32 -0
  340. package/dist/hooks/useFileEditor.d.ts +32 -0
  341. package/dist/hooks/useFileSystem.d.ts +40 -0
  342. package/dist/hooks/useGitHub.d.ts +58 -0
  343. package/dist/hooks/useInfiniteScroll.d.ts +13 -0
  344. package/dist/hooks/useLongPress.d.ts +16 -0
  345. package/dist/hooks/useOrbitalHistory.d.ts +39 -0
  346. package/dist/hooks/useOrbitalMutations.d.ts +95 -0
  347. package/dist/hooks/usePinchZoom.d.ts +22 -0
  348. package/dist/hooks/usePreview.d.ts +57 -0
  349. package/dist/hooks/usePullToRefresh.d.ts +25 -0
  350. package/dist/hooks/useQuerySingleton.d.ts +78 -0
  351. package/dist/hooks/useResolvedEntity.d.ts +32 -0
  352. package/dist/hooks/useSwipeGesture.d.ts +26 -0
  353. package/dist/hooks/useTranslate.d.ts +35 -0
  354. package/dist/hooks/useUIEvents.d.ts +35 -0
  355. package/dist/{useUISlots-BBjNvQtb.d.ts → hooks/useUISlots.d.ts} +8 -9
  356. package/dist/hooks/useValidation.d.ts +46 -0
  357. package/dist/lib/api-client.d.ts +42 -0
  358. package/dist/lib/cn.d.ts +6 -0
  359. package/dist/lib/debug.d.ts +43 -0
  360. package/dist/lib/debugRegistry.d.ts +29 -0
  361. package/dist/lib/debugUtils.d.ts +27 -0
  362. package/dist/lib/entityDebug.d.ts +38 -0
  363. package/dist/lib/getNestedValue.d.ts +33 -0
  364. package/dist/lib/guardRegistry.d.ts +32 -0
  365. package/dist/lib/index.d.ts +17 -319
  366. package/dist/lib/index.js +1 -3
  367. package/dist/lib/jazari/index.d.ts +5 -0
  368. package/dist/lib/jazari/layout.d.ts +30 -0
  369. package/dist/lib/jazari/svg-paths.d.ts +61 -0
  370. package/dist/lib/jazari/types.d.ts +91 -0
  371. package/dist/lib/parseContentSegments.d.ts +41 -0
  372. package/dist/lib/tickRegistry.d.ts +40 -0
  373. package/dist/lib/traitRegistry.d.ts +34 -0
  374. package/dist/lib/verificationRegistry.d.ts +138 -0
  375. package/dist/lib/visualizer/browser.d.ts +47 -0
  376. package/dist/lib/visualizer/index.d.ts +143 -0
  377. package/dist/locales/index.d.ts +5 -7
  378. package/dist/providers/EventBusProvider.d.ts +60 -0
  379. package/dist/providers/FetchedDataProvider.d.ts +105 -0
  380. package/dist/providers/OfflineModeProvider.d.ts +79 -0
  381. package/dist/providers/OrbitalProvider.d.ts +101 -0
  382. package/dist/providers/SelectionProvider.d.ts +81 -0
  383. package/dist/providers/VerificationProvider.d.ts +63 -0
  384. package/dist/providers/index.css +599 -0
  385. package/dist/providers/index.d.ts +16 -464
  386. package/dist/providers/index.js +5 -4
  387. package/dist/renderer/client-effect-executor.d.ts +68 -0
  388. package/dist/renderer/data-resolver.d.ts +68 -0
  389. package/dist/renderer/index.d.ts +22 -519
  390. package/dist/renderer/init.d.ts +14 -0
  391. package/dist/renderer/navigation.d.ts +142 -0
  392. package/dist/{offline-executor-CHr4uAhf.d.ts → renderer/offline-executor.d.ts} +9 -172
  393. package/dist/renderer/pattern-resolver.d.ts +91 -0
  394. package/dist/renderer/slot-definitions.d.ts +45 -0
  395. package/dist/renderer/types.d.ts +160 -0
  396. package/dist/renderer/useClientEffects.d.ts +88 -0
  397. package/dist/runtime/EntitySchemaContext.d.ts +40 -0
  398. package/dist/runtime/TraitProvider.d.ts +52 -0
  399. package/dist/runtime/createClientEffectHandlers.d.ts +23 -0
  400. package/dist/runtime/index.css +599 -0
  401. package/dist/runtime/index.d.ts +10 -275
  402. package/dist/runtime/index.js +6 -6
  403. package/dist/runtime/types.d.ts +10 -0
  404. package/dist/runtime/ui/SlotsContext.d.ts +71 -0
  405. package/dist/runtime/useResolvedSchema.d.ts +45 -0
  406. package/dist/runtime/useTraitStateMachine.d.ts +48 -0
  407. package/dist/scripts/generate-design-system.d.ts +29 -0
  408. package/dist/scripts/generate-theme-from-schema.d.ts +10 -0
  409. package/dist/scripts/generate.d.ts +12 -0
  410. package/dist/scripts/suggest-components.d.ts +31 -0
  411. package/dist/scripts/types.d.ts +129 -0
  412. package/dist/stores/entityStore.d.ts +99 -0
  413. package/dist/stores/filtering.d.ts +51 -0
  414. package/dist/stores/index.d.ts +4 -148
  415. package/dist/tsup.config.d.ts +2 -0
  416. package/dist/vitest.config.d.ts +2 -0
  417. package/package.json +5 -4
  418. package/dist/chunk-42YQ6JVR.js +0 -48
  419. package/dist/chunk-WCTZ7WZX.js +0 -311
  420. package/dist/cn-C_ATNPvi.d.ts +0 -332
@@ -0,0 +1,253 @@
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;
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Game Types — Generalized
3
+ *
4
+ * Core type definitions for tactical game state.
5
+ * Extracted from Trait Wars and generalized for any game project.
6
+ */
7
+ export interface Position {
8
+ x: number;
9
+ y: number;
10
+ }
11
+ export interface GameUnit {
12
+ id: string;
13
+ name: string;
14
+ characterType: string;
15
+ team: 'player' | 'enemy';
16
+ position: Position;
17
+ health: number;
18
+ maxHealth: number;
19
+ movement: number;
20
+ attack: number;
21
+ defense: number;
22
+ traits: UnitTrait[];
23
+ }
24
+ export interface UnitTrait {
25
+ name: string;
26
+ currentState: string;
27
+ states: string[];
28
+ cooldown: number;
29
+ }
30
+ export interface BoardTile {
31
+ terrain: string;
32
+ unitId?: string;
33
+ isBlocked?: boolean;
34
+ }
35
+ export type GamePhase = 'observation' | 'planning' | 'execution' | 'tick';
36
+ export interface GameState {
37
+ board: BoardTile[][];
38
+ units: Record<string, GameUnit>;
39
+ currentPhase: GamePhase;
40
+ currentTurn: number;
41
+ activeTeam: 'player' | 'enemy';
42
+ selectedUnitId?: string;
43
+ validMoves: Position[];
44
+ attackTargets: Position[];
45
+ }
46
+ export type GameAction = {
47
+ type: 'SELECT_UNIT';
48
+ unitId: string;
49
+ } | {
50
+ type: 'MOVE_UNIT';
51
+ from: Position;
52
+ to: Position;
53
+ } | {
54
+ type: 'ATTACK';
55
+ attackerId: string;
56
+ targetId: string;
57
+ } | {
58
+ type: 'END_TURN';
59
+ } | {
60
+ type: 'EXECUTE_TRAITS';
61
+ };
62
+ /**
63
+ * Create the initial game state with board and units.
64
+ *
65
+ * @param {number} width - Board width in tiles
66
+ * @param {number} height - Board height in tiles
67
+ * @param {GameUnit[]} units - Initial units to place on the board
68
+ * @param {string} [defaultTerrain] - Default terrain type for empty tiles
69
+ * @returns {GameState} The initialized game state
70
+ */
71
+ export declare function createInitialGameState(width: number, height: number, units: GameUnit[], defaultTerrain?: string): GameState;
72
+ /**
73
+ * Calculate valid movement positions for a unit.
74
+ *
75
+ * Returns all tiles within the unit's movement range that are
76
+ * not blocked and don't contain other units.
77
+ *
78
+ * @param {GameState} state - Current game state
79
+ * @param {string} unitId - ID of the unit to calculate moves for
80
+ * @returns {Position[]} Array of valid move positions
81
+ */
82
+ export declare function calculateValidMoves(state: GameState, unitId: string): Position[];
83
+ /**
84
+ * Calculate valid attack targets for a unit.
85
+ *
86
+ * Returns adjacent positions containing enemy units that can be attacked.
87
+ *
88
+ * @param {GameState} state - Current game state
89
+ * @param {string} unitId - ID of the unit to calculate targets for
90
+ * @returns {Position[]} Array of valid attack target positions
91
+ */
92
+ export declare function calculateAttackTargets(state: GameState, unitId: string): Position[];
@@ -7,7 +7,7 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  /** A single isometric tile on the grid */
10
- interface IsometricTile {
10
+ export interface IsometricTile {
11
11
  /** Optional unique identifier (required for 3D rendering) */
12
12
  id?: string;
13
13
  /** Grid x coordinate */
@@ -32,7 +32,7 @@ interface IsometricTile {
32
32
  elevation?: number;
33
33
  }
34
34
  /** A unit positioned on the isometric grid */
35
- interface IsometricUnit {
35
+ export interface IsometricUnit {
36
36
  /** Unique unit identifier */
37
37
  id: string;
38
38
  /** Current grid position (2D format) */
@@ -78,7 +78,7 @@ interface IsometricUnit {
78
78
  elevation?: number;
79
79
  }
80
80
  /** A map feature (resource, building, portal, etc.) */
81
- interface IsometricFeature {
81
+ export interface IsometricFeature {
82
82
  /** Optional unique identifier (required for 3D rendering) */
83
83
  id?: string;
84
84
  /** Grid x coordinate */
@@ -99,7 +99,7 @@ interface IsometricFeature {
99
99
  elevation?: number;
100
100
  }
101
101
  /** Camera state for pan/zoom */
102
- interface CameraState {
102
+ export interface CameraState {
103
103
  /** Camera X offset in pixels */
104
104
  x: number;
105
105
  /** Camera Y offset in pixels */
@@ -107,5 +107,3 @@ interface CameraState {
107
107
  /** Zoom level (1.0 = 100%) */
108
108
  zoom: number;
109
109
  }
110
-
111
- export type { CameraState as C, IsometricTile as I, IsometricUnit as a, IsometricFeature as b };
@@ -0,0 +1,73 @@
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
+ }
@@ -0,0 +1,26 @@
1
+ import type { CombatActionType, EffectAssetManifest } from './types/effects';
2
+ export interface UseCanvasEffectsOptions {
3
+ /** Effect asset manifest (baseUrl + particles + animations) */
4
+ manifest: EffectAssetManifest;
5
+ }
6
+ export interface UseCanvasEffectsResult {
7
+ /** All effect sprite URLs for preloading via useImageCache */
8
+ effectSpriteUrls: string[];
9
+ /** Spawn a combat effect at the given screen position */
10
+ spawnEffect: (type: CombatActionType, screenX: number, screenY: number) => void;
11
+ /** Draw all active effects — call inside draw() after units, before ctx.restore() */
12
+ drawEffects: (ctx: CanvasRenderingContext2D, animTime: number, getImage: (url: string) => HTMLImageElement | undefined) => void;
13
+ /** Whether there are active effects (keeps RAF alive) */
14
+ hasActiveEffects: boolean;
15
+ /** Screen shake offset to apply to container transform */
16
+ screenShake: {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ /** Screen flash overlay (null = no flash) */
21
+ screenFlash: {
22
+ color: string;
23
+ alpha: number;
24
+ } | null;
25
+ }
26
+ export declare function useCanvasEffects({ manifest, }: UseCanvasEffectsOptions): UseCanvasEffectsResult;
@@ -0,0 +1,50 @@
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 {};
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Combat Effects Utility
3
+ *
4
+ * CSS animation utilities and effect triggers for combat visualization.
5
+ * Extracted from Trait Wars design-system.
6
+ */
7
+ export declare const combatAnimations: {
8
+ shake: string;
9
+ flash: string;
10
+ pulseRed: string;
11
+ healGlow: string;
12
+ };
13
+ export declare const combatClasses: {
14
+ shake: string;
15
+ flash: string;
16
+ pulseRed: string;
17
+ healGlow: string;
18
+ hit: string;
19
+ defend: string;
20
+ critical: string;
21
+ };
22
+ export interface CombatEffect {
23
+ className: string;
24
+ duration: number;
25
+ sound?: string;
26
+ }
27
+ export declare const combatEffects: Record<string, CombatEffect>;
28
+ /**
29
+ * Apply a temporary combat effect to an HTML element.
30
+ *
31
+ * Adds the effect's CSS class to the element and removes it after
32
+ * the effect duration completes.
33
+ *
34
+ * @param {HTMLElement} element - The DOM element to apply the effect to
35
+ * @param {CombatEffect} effect - The combat effect to apply
36
+ * @param {() => void} [onComplete] - Optional callback when effect completes
37
+ */
38
+ export declare function applyTemporaryEffect(element: HTMLElement, effect: CombatEffect, onComplete?: () => void): void;
39
+ export interface DamageResult {
40
+ baseDamage: number;
41
+ finalDamage: number;
42
+ isCritical: boolean;
43
+ isBlocked: boolean;
44
+ damageReduction: number;
45
+ }
46
+ /**
47
+ * Calculate combat damage with defense and critical hit mechanics.
48
+ *
49
+ * @param {number} attack - Attacker's attack power
50
+ * @param {number} defense - Defender's defense power
51
+ * @param {boolean} [isDefending] - Whether defender is in defend stance (doubles defense)
52
+ * @param {number} [criticalChance] - Probability of critical hit (0-1, default 0.1)
53
+ * @returns {DamageResult} Calculated damage with critical/block info
54
+ */
55
+ export declare function calculateDamage(attack: number, defense: number, isDefending?: boolean, criticalChance?: number): DamageResult;
56
+ export type CombatEventType = 'attack' | 'critical' | 'defend' | 'heal' | 'defeat' | 'level_up' | 'state_change';
57
+ export interface CombatEventData {
58
+ type: CombatEventType;
59
+ sourceId: string;
60
+ targetId?: string;
61
+ value?: number;
62
+ message: string;
63
+ }
64
+ export declare function generateCombatMessage(event: CombatEventData): string;
@@ -0,0 +1,15 @@
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 {};
@@ -0,0 +1,61 @@
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
+ };