@almadar/ui 5.104.0 → 5.107.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/avl/index.cjs +1911 -4127
  2. package/dist/avl/index.js +1006 -3222
  3. package/dist/components/core/atoms/index.d.ts +1 -1
  4. package/dist/components/core/molecules/index.d.ts +1 -1
  5. package/dist/components/core/organisms/index.d.ts +1 -1
  6. package/dist/components/core/templates/index.d.ts +2 -2
  7. package/dist/components/game/{2d/atoms → atoms}/ActionButton.d.ts +1 -1
  8. package/dist/components/game/{2d/atoms → atoms}/ChoiceButton.d.ts +1 -1
  9. package/dist/components/game/{2d/atoms → atoms}/ControlButton.d.ts +1 -1
  10. package/dist/components/game/atoms/DrawShape.d.ts +50 -0
  11. package/dist/components/game/atoms/DrawSprite.d.ts +47 -0
  12. package/dist/components/game/atoms/DrawText.d.ts +31 -0
  13. package/dist/components/game/{2d/atoms → atoms}/GameAudioToggle.d.ts +1 -1
  14. package/dist/components/game/{2d/atoms → atoms}/GameIcon.d.ts +1 -1
  15. package/dist/components/game/{2d/atoms → atoms}/ItemSlot.d.ts +1 -1
  16. package/dist/components/game/{2d/atoms → atoms}/MiniMap.d.ts +1 -1
  17. package/dist/components/game/{2d/atoms → atoms}/ResourceCounter.d.ts +2 -2
  18. package/dist/components/game/{2d/atoms → atoms}/ScoreDisplay.d.ts +1 -1
  19. package/dist/components/game/{2d/atoms → atoms}/Sprite.d.ts +1 -1
  20. package/dist/components/game/{2d/atoms → atoms}/StateIndicator.d.ts +1 -1
  21. package/dist/components/game/{2d/atoms → atoms}/StatusEffect.d.ts +1 -1
  22. package/dist/components/game/{2d/atoms → atoms}/WaypointMarker.d.ts +1 -1
  23. package/dist/components/game/{shared/hooks → hooks}/useCamera.d.ts +1 -1
  24. package/dist/components/game/{shared/hooks → hooks}/useUnitSpriteAtlas.d.ts +2 -2
  25. package/dist/components/game/{shared → lib}/index.d.ts +1 -2
  26. package/dist/components/game/{shared → lib}/isometric.d.ts +38 -0
  27. package/dist/components/game/{shared → lib}/isometricTypes.d.ts +4 -0
  28. package/dist/components/game/{shared/lib → lib}/puzzleObject.d.ts +1 -1
  29. package/dist/components/game/{2d/molecules → molecules}/ActionTile.d.ts +1 -1
  30. package/dist/components/game/molecules/Canvas.d.ts +96 -0
  31. package/dist/components/game/molecules/Canvas2D.d.ts +120 -0
  32. package/dist/components/game/{2d/molecules → molecules}/ControlGrid.d.ts +1 -1
  33. package/dist/components/game/molecules/DrawShapeLayer.d.ts +19 -0
  34. package/dist/components/game/molecules/DrawSpriteLayer.d.ts +21 -0
  35. package/dist/components/game/molecules/DrawTextLayer.d.ts +22 -0
  36. package/dist/components/game/{2d/molecules → molecules}/GameHud.d.ts +1 -1
  37. package/dist/components/game/{2d/molecules → molecules}/InventoryGrid.d.ts +1 -1
  38. package/dist/components/game/{2d/molecules → molecules}/ResourceBar.d.ts +1 -1
  39. package/dist/components/game/{2d/molecules → molecules}/StatBadge.d.ts +1 -1
  40. package/dist/components/game/{2d/molecules → molecules}/StateNode.d.ts +1 -1
  41. package/dist/components/game/{2d/molecules → molecules}/TraitSlot.d.ts +1 -1
  42. package/dist/components/game/{2d/molecules → molecules}/TraitStateViewer.d.ts +1 -1
  43. package/dist/components/game/{2d/molecules → molecules}/TransitionArrow.d.ts +1 -1
  44. package/dist/components/game/{2d/molecules → molecules}/index.d.ts +9 -16
  45. package/dist/components/game/patterns.d.ts +20 -0
  46. package/dist/components/game/{shared/providers → providers}/GameAudioProvider.d.ts +1 -1
  47. package/dist/components/game/{2d/templates → templates}/GameTemplate.d.ts +1 -1
  48. package/dist/components/game/three/atoms/SpriteBillboard3D.d.ts +18 -0
  49. package/dist/components/game/three/game3dTheme.d.ts +55 -0
  50. package/dist/components/game/{shared → three}/hooks/useGameCanvas3DEvents.d.ts +4 -3
  51. package/dist/components/game/{3d → three}/index.cjs +787 -2986
  52. package/dist/components/game/{3d → three}/index.css +3 -3
  53. package/dist/components/game/{3d → three}/index.d.ts +0 -1
  54. package/dist/components/game/{3d → three}/index.js +644 -2842
  55. package/dist/components/game/{shared → three}/lib/game3dAssetManifest.d.ts +1 -1
  56. package/dist/components/game/three/molecules/GameCamera3D.d.ts +35 -0
  57. package/dist/components/game/three/molecules/GameCanvas3D.d.ts +175 -0
  58. package/dist/components/game/{3d → three}/molecules/Lighting3D.d.ts +10 -2
  59. package/dist/components/game/{3d → three}/molecules/index.d.ts +9 -12
  60. package/dist/components/game/{3d → three}/patterns.d.ts +0 -4
  61. package/dist/components/index.cjs +2326 -4362
  62. package/dist/components/index.js +1420 -3449
  63. package/dist/lib/drawable/Drawable3D.d.ts +20 -0
  64. package/dist/lib/drawable/contract.d.ts +68 -0
  65. package/dist/lib/drawable/hitTest.d.ts +23 -0
  66. package/dist/lib/drawable/mesh3d.d.ts +28 -0
  67. package/dist/lib/drawable/paintDispatch.d.ts +22 -0
  68. package/dist/lib/drawable/projector.d.ts +14 -0
  69. package/dist/lib/drawable/projector3d.d.ts +20 -0
  70. package/dist/lib/imageCache.d.ts +9 -0
  71. package/dist/lib/painter2d.d.ts +81 -0
  72. package/dist/lib/webPainter2d.d.ts +7 -0
  73. package/dist/marketing/index.cjs +10 -0
  74. package/dist/marketing/index.js +10 -0
  75. package/dist/providers/index.cjs +1756 -3976
  76. package/dist/providers/index.js +964 -3184
  77. package/dist/runtime/index.cjs +1766 -3982
  78. package/dist/runtime/index.js +980 -3196
  79. package/package.json +13 -13
  80. package/dist/components/game/2d/molecules/Canvas2D.d.ts +0 -175
  81. package/dist/components/game/2d/organisms/BuilderBoard.d.ts +0 -60
  82. package/dist/components/game/2d/organisms/ClassifierBoard.d.ts +0 -66
  83. package/dist/components/game/2d/organisms/DebuggerBoard.d.ts +0 -61
  84. package/dist/components/game/2d/organisms/EventHandlerBoard.d.ts +0 -42
  85. package/dist/components/game/2d/organisms/NegotiatorBoard.d.ts +0 -56
  86. package/dist/components/game/2d/organisms/SequencerBoard.d.ts +0 -69
  87. package/dist/components/game/2d/organisms/SimulatorBoard.d.ts +0 -58
  88. package/dist/components/game/2d/organisms/StateArchitectBoard.d.ts +0 -61
  89. package/dist/components/game/3d/molecules/GameCanvas3D.d.ts +0 -259
  90. package/dist/components/game/3d/organisms/GameBoard3D.d.ts +0 -66
  91. package/dist/components/game/3d/templates/GameCanvas3DBattleTemplate.d.ts +0 -82
  92. package/dist/components/game/3d/templates/GameCanvas3DCastleTemplate.d.ts +0 -87
  93. package/dist/components/game/3d/templates/GameCanvas3DWorldMapTemplate.d.ts +0 -95
  94. package/dist/components/game/shared/effects.d.ts +0 -253
  95. /package/dist/components/game/{2d/atoms → atoms}/ComboCounter.d.ts +0 -0
  96. /package/dist/components/game/{2d/atoms → atoms}/DamageNumber.d.ts +0 -0
  97. /package/dist/components/game/{2d/atoms → atoms}/DialogueBubble.d.ts +0 -0
  98. /package/dist/components/game/{2d/atoms → atoms}/GameCard.d.ts +0 -0
  99. /package/dist/components/game/{2d/atoms → atoms}/HealthBar.d.ts +0 -0
  100. /package/dist/components/game/{2d/atoms → atoms}/TimerDisplay.d.ts +0 -0
  101. /package/dist/components/game/{2d/atoms → atoms}/TurnIndicator.d.ts +0 -0
  102. /package/dist/components/game/{shared/hooks → hooks}/useGameAudio.d.ts +0 -0
  103. /package/dist/components/game/{shared → hooks}/useImageCache.d.ts +0 -0
  104. /package/dist/components/game/{shared → lib}/boardEntity.d.ts +0 -0
  105. /package/dist/components/game/{shared/lib → lib}/editorUtils.d.ts +0 -0
  106. /package/dist/components/game/{shared → lib}/game.d.ts +0 -0
  107. /package/dist/components/game/{shared → lib}/makeAsset.d.ts +0 -0
  108. /package/dist/components/game/{shared/lib → lib}/mechanics.d.ts +0 -0
  109. /package/dist/components/game/{shared/lib → lib}/physicsPresets.d.ts +0 -0
  110. /package/dist/components/game/{shared/lib → lib}/physicsTypes.d.ts +0 -0
  111. /package/dist/components/game/{shared → lib}/spriteAnimation.d.ts +0 -0
  112. /package/dist/components/game/{shared → lib}/spriteAnimationTypes.d.ts +0 -0
  113. /package/dist/components/game/{shared → lib}/spriteSheetConstants.d.ts +0 -0
  114. /package/dist/components/game/{2d/molecules → molecules}/ActionPalette.d.ts +0 -0
  115. /package/dist/components/game/{2d/molecules → molecules}/EventLog.d.ts +0 -0
  116. /package/dist/components/game/{2d/molecules → molecules}/GameMenu.d.ts +0 -0
  117. /package/dist/components/game/{2d/molecules → molecules}/ObjectRulePanel.d.ts +0 -0
  118. /package/dist/components/game/{2d/molecules → molecules}/RuleEditor.d.ts +0 -0
  119. /package/dist/components/game/{2d/molecules → molecules}/SequenceBar.d.ts +0 -0
  120. /package/dist/components/game/{2d/molecules → molecules}/StateGraph.d.ts +0 -0
  121. /package/dist/components/game/{2d/molecules → molecules}/StateJsonView.d.ts +0 -0
  122. /package/dist/components/game/{2d/molecules → molecules}/VariablePanel.d.ts +0 -0
  123. /package/dist/components/game/{2d/templates → templates}/GameShell.d.ts +0 -0
  124. /package/dist/components/game/{shared → three}/hooks/useAssetLoader.d.ts +0 -0
  125. /package/dist/components/game/{shared → three}/hooks/useRaycaster.d.ts +0 -0
  126. /package/dist/components/game/{shared → three}/hooks/useSceneGraph.d.ts +0 -0
  127. /package/dist/components/game/{shared → three}/hooks/useThree.d.ts +0 -0
  128. /package/dist/components/game/{shared → three}/lib/AssetLoader.d.ts +0 -0
  129. /package/dist/components/game/{shared → three}/lib/culling.d.ts +0 -0
  130. /package/dist/components/game/{shared → three}/lib/grid3D.d.ts +0 -0
  131. /package/dist/components/game/{3d → three}/molecules/Camera3D.d.ts +0 -0
  132. /package/dist/components/game/{3d → three}/molecules/Canvas3DErrorBoundary.d.ts +0 -0
  133. /package/dist/components/game/{3d → three}/molecules/Canvas3DLoadingState.d.ts +0 -0
  134. /package/dist/components/game/{3d → three}/molecules/ModelLoader.d.ts +0 -0
  135. /package/dist/components/game/{3d → three}/molecules/Scene3D.d.ts +0 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `draw-shape-layer` — batch of shapes in one descriptor for O(layers) perf.
3
+ *
4
+ * Composes the `draw-shape` atom; drawable-by-composition (its `items` are
5
+ * `draw-shape` descriptors, each grounded in core `ScenePos`). The React
6
+ * component renders `null` (a drawable is painted by the host, not the DOM).
7
+ */
8
+ import type React from 'react';
9
+ import type { DrawableBase, PaintFn } from '../../../lib/drawable/contract';
10
+ import { type DrawShapeProps } from '../atoms/DrawShape';
11
+ export interface DrawShapeLayerProps extends DrawableBase {
12
+ type: 'draw-shape-layer';
13
+ items: DrawShapeProps[];
14
+ }
15
+ /** Paint a {@link DrawShapeLayerProps}. */
16
+ export declare const paintShapeLayer: PaintFn<DrawShapeLayerProps>;
17
+ /** Registry/standalone stub — the host paints this molecule; the DOM renders nothing. */
18
+ export declare function DrawShapeLayer(_props: DrawShapeLayerProps): React.JSX.Element | null;
19
+ export default DrawShapeLayer;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `draw-sprite-layer` — batch multiple sprites in one descriptor for O(layers) rendering.
3
+ *
4
+ * Composes the `draw-sprite` atom; the layer itself carries no `position` — each
5
+ * item does. It is drawable-by-composition: its `items` are `draw-sprite`
6
+ * descriptors (each grounded in core `ScenePos`), which is what stamps the layer
7
+ * `drawable` at pattern-sync time.
8
+ */
9
+ import type React from 'react';
10
+ import type { DrawableBase, PaintFn } from '../../../lib/drawable/contract';
11
+ import { type DrawSpriteProps } from '../atoms/DrawSprite';
12
+ export interface DrawSpriteLayerProps extends DrawableBase {
13
+ type: 'draw-sprite-layer';
14
+ /** Sprites painted in array order; z-ordering is the caller's responsibility. */
15
+ items: DrawSpriteProps[];
16
+ }
17
+ /** Paint a {@link DrawSpriteLayerProps}. Renders all sprites in order; never throws. */
18
+ export declare const paintSpriteLayer: PaintFn<DrawSpriteLayerProps>;
19
+ /** Registry/standalone stub — the host paints this molecule; the DOM renders nothing. */
20
+ export declare function DrawSpriteLayer(_props: DrawSpriteLayerProps): React.JSX.Element | null;
21
+ export default DrawSpriteLayer;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `draw-text-layer` — batch of text labels in one descriptor for O(layers) perf.
3
+ *
4
+ * Composes the `draw-text` atom; drawable-by-composition (its `items` are
5
+ * `draw-text` descriptors, each grounded in core `ScenePos`). Covers the batched
6
+ * world-space text pass — fx messages, damage numbers, unit labels — that a
7
+ * board maps from an entity array (`items: (array/map @entity.fx (fn ...))`),
8
+ * which a literal `children` array can't express. The React component renders
9
+ * `null` (a drawable is painted by the host, not the DOM).
10
+ */
11
+ import type React from 'react';
12
+ import type { DrawableBase, PaintFn } from '../../../lib/drawable/contract';
13
+ import { type DrawTextProps } from '../atoms/DrawText';
14
+ export interface DrawTextLayerProps extends DrawableBase {
15
+ type: 'draw-text-layer';
16
+ items: DrawTextProps[];
17
+ }
18
+ /** Paint a {@link DrawTextLayerProps}. */
19
+ export declare const paintTextLayer: PaintFn<DrawTextLayerProps>;
20
+ /** Registry/standalone stub — the host paints this molecule; the DOM renders nothing. */
21
+ export declare function DrawTextLayer(_props: DrawTextLayerProps): React.JSX.Element | null;
22
+ export default DrawTextLayer;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type StatBadgeProps } from "./StatBadge";
3
3
  import type { Asset } from "@almadar/core";
4
- import type { IconInput } from "../../../core/atoms/index";
4
+ import type { IconInput } from "../../core/atoms/index";
5
5
  export interface GameHudStat extends Omit<StatBadgeProps, "size"> {
6
6
  /** Data source entity name */
7
7
  source?: string;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { EventEmit, Asset } from '@almadar/core';
3
- import type { IconInput } from '../../../core/atoms/index';
3
+ import type { IconInput } from '../../core/atoms/index';
4
4
  export interface InventoryGridItem {
5
5
  id: string;
6
6
  icon?: IconInput;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { Asset } from '@almadar/core';
3
- import type { IconInput } from '../../../core/atoms/index';
3
+ import type { IconInput } from '../../core/atoms/index';
4
4
  export interface ResourceBarResource {
5
5
  /** Icon for the resource */
6
6
  icon?: IconInput;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { type IconInput } from '../../../core/atoms/Icon';
2
+ import { type IconInput } from '../../core/atoms/Icon';
3
3
  import type { Asset } from '@almadar/core';
4
4
  /**
5
5
  * StatBadge — game stat display molecule (distinct from core Badge atom).
@@ -7,7 +7,7 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
- import { type Point } from '../../../core/atoms/index';
10
+ import { type Point } from '../../core/atoms/index';
11
11
  export interface StateNodeProps {
12
12
  /** State name */
13
13
  name: string;
@@ -20,7 +20,7 @@
20
20
  import React from 'react';
21
21
  import type { Asset, EventEmit } from '@almadar/core';
22
22
  import { type TraitStateMachineDefinition } from './TraitStateViewer';
23
- import type { UiError } from '../../../core/atoms/types';
23
+ import type { UiError } from '../../core/atoms/types';
24
24
  /** Data shape for a slot's equipped item */
25
25
  export type SlotItemData = {
26
26
  id: string;
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import React from 'react';
13
13
  import { type StateStyle } from '../atoms/StateIndicator';
14
- import type { UiError } from '../../../core/atoms/types';
14
+ import type { UiError } from '../../core/atoms/types';
15
15
  export type TraitTransition = {
16
16
  from: string;
17
17
  to: string;
@@ -7,7 +7,7 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import React from 'react';
10
- import type { Point } from '../../../core/atoms/types';
10
+ import type { Point } from '../../core/atoms/types';
11
11
  export interface TransitionArrowProps {
12
12
  /** Start position (center of from-node) */
13
13
  from: Point;
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @packageDocumentation
8
8
  */
9
- export * from '../../shared/index';
9
+ export * from '../lib/index';
10
10
  export { GameCard, type GameCardProps } from '../atoms/GameCard';
11
11
  export { HealthBar, type HealthBarProps } from '../atoms/HealthBar';
12
12
  export { ScoreDisplay, type ScoreDisplayProps } from '../atoms/ScoreDisplay';
@@ -34,33 +34,26 @@ export { GameHud, type GameHudProps, type GameHudStat, type GameHudElement } fro
34
34
  export { GameMenu, type GameMenuProps, type MenuOption } from './GameMenu';
35
35
  export { StateGraph, type StateGraphProps, type StateGraphTransition } from './StateGraph';
36
36
  export { Canvas2D, type Canvas2DProps, type Projection, type CameraMode, type Platform, type SidePlayer, type TileCoord, } from './Canvas2D';
37
- export { useUnitSpriteAtlas } from '../../shared/hooks/useUnitSpriteAtlas';
38
- export { GameAudioProvider, GameAudioContext, useGameAudioContext, type GameAudioProviderProps, type GameAudioContextValue, } from '../../shared/providers/GameAudioProvider';
37
+ export { Canvas, type CanvasProps, type CanvasMode } from './Canvas';
38
+ export { useUnitSpriteAtlas } from '../hooks/useUnitSpriteAtlas';
39
+ export { GameAudioProvider, GameAudioContext, useGameAudioContext, type GameAudioProviderProps, type GameAudioContextValue, } from '../providers/GameAudioProvider';
39
40
  export { GameAudioToggle, type GameAudioToggleProps, } from '../atoms/GameAudioToggle';
40
- export { useGameAudio, type AudioManifest, type SoundEntry, type GameAudioControls, type UseGameAudioOptions, } from '../../shared/hooks/useGameAudio';
41
- export { useCamera } from '../../shared/hooks/useCamera';
41
+ export { useGameAudio, type AudioManifest, type SoundEntry, type GameAudioControls, type UseGameAudioOptions, } from '../hooks/useGameAudio';
42
+ export { useCamera } from '../hooks/useCamera';
42
43
  export { TraitStateViewer, type TraitStateViewerProps, type TraitStateMachineDefinition, type TraitTransition, } from './TraitStateViewer';
43
44
  export { TraitSlot, type TraitSlotProps, type SlotItemData, } from './TraitSlot';
44
- export { CollapsibleSection, EditorSlider, EditorSelect, EditorCheckbox, EditorTextInput, StatusBar, TerrainPalette, EditorToolbar, TERRAIN_COLORS, FEATURE_TYPES, type EditorMode, type CollapsibleSectionProps, type EditorSliderProps, type EditorSelectProps, type EditorCheckboxProps, type EditorTextInputProps, type StatusBarProps, type TerrainPaletteProps, type EditorToolbarProps, } from '../../shared/lib/editorUtils';
45
+ export { CollapsibleSection, EditorSlider, EditorSelect, EditorCheckbox, EditorTextInput, StatusBar, TerrainPalette, EditorToolbar, TERRAIN_COLORS, FEATURE_TYPES, type EditorMode, type CollapsibleSectionProps, type EditorSliderProps, type EditorSelectProps, type EditorCheckboxProps, type EditorTextInputProps, type StatusBarProps, type TerrainPaletteProps, type EditorToolbarProps, } from '../lib/editorUtils';
45
46
  export { ActionTile, type ActionTileProps } from './ActionTile';
46
47
  export { ActionPalette, type ActionPaletteProps } from './ActionPalette';
47
48
  export { SequenceBar, type SequenceBarProps } from './SequenceBar';
48
- export { SequencerBoard, type SequencerBoardProps } from '../organisms/SequencerBoard';
49
49
  export { RuleEditor, type RuleEditorProps, type RuleDefinition } from './RuleEditor';
50
50
  export { EventLog, type EventLogProps, type EventLogEntry } from './EventLog';
51
51
  export { ObjectRulePanel, type ObjectRulePanelProps } from './ObjectRulePanel';
52
- export { EventHandlerBoard, type EventHandlerBoardProps } from '../organisms/EventHandlerBoard';
53
- export * from '../../shared/lib/puzzleObject';
52
+ export * from '../lib/puzzleObject';
54
53
  export { StateNode, type StateNodeProps } from './StateNode';
55
54
  export { TransitionArrow, type TransitionArrowProps } from './TransitionArrow';
56
55
  export { VariablePanel, type VariablePanelProps } from './VariablePanel';
57
56
  export { StateJsonView, type StateJsonViewProps } from './StateJsonView';
58
- export { StateArchitectBoard, type StateArchitectBoardProps, type StateArchitectTransition, type TestCase, } from '../organisms/StateArchitectBoard';
59
- export { SimulatorBoard, type SimulatorBoardProps, type SimulatorParameter } from '../organisms/SimulatorBoard';
60
- export { ClassifierBoard, type ClassifierBoardProps, type ClassifierItem, type ClassifierCategory } from '../organisms/ClassifierBoard';
61
- export { BuilderBoard, type BuilderBoardProps, type BuilderComponent, type BuilderSlot } from '../organisms/BuilderBoard';
62
- export { DebuggerBoard, type DebuggerBoardProps, type DebuggerLine } from '../organisms/DebuggerBoard';
63
- export { NegotiatorBoard, type NegotiatorBoardProps, type NegotiatorAction, type PayoffEntry } from '../organisms/NegotiatorBoard';
64
- export { projectileMotion, pendulum, springOscillator, ALL_PRESETS } from '../../shared/lib/physicsPresets';
57
+ export { projectileMotion, pendulum, springOscillator, ALL_PRESETS } from '../lib/physicsPresets';
65
58
  export { GameTemplate, type GameTemplateProps } from '../templates/GameTemplate';
66
59
  export { GameShell, type GameShellProps } from '../templates/GameShell';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Curated list of the neutral DRAWABLE render-ui pattern components — the
3
+ * dimension-agnostic primitives a canvas draw-host paints under its `children`.
4
+ *
5
+ * These atoms/molecules are R3F-free (the 3D mesh backends live in
6
+ * `lib/drawable/mesh3d`, pulled in only by the code-split 3D host), so they are
7
+ * safe to admit to the public pattern surface. `pattern-sync` discovers
8
+ * `patterns.ts` files by walking the tree and admits exactly the names listed
9
+ * here, taking each one's tier from its source path (atoms / molecules) — so the
10
+ * dispatch/painter infra co-located under `lib/` never leaks in as a pattern.
11
+ * Move this file anywhere under `components/` and the scanner still finds it.
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export { DrawSprite } from './atoms/DrawSprite';
16
+ export { DrawShape } from './atoms/DrawShape';
17
+ export { DrawText } from './atoms/DrawText';
18
+ export { DrawSpriteLayer } from './molecules/DrawSpriteLayer';
19
+ export { DrawShapeLayer } from './molecules/DrawShapeLayer';
20
+ export { DrawTextLayer } from './molecules/DrawTextLayer';
@@ -18,7 +18,7 @@
18
18
  */
19
19
  import React from 'react';
20
20
  import { type AudioManifest, type GameAudioControls } from '../hooks/useGameAudio';
21
- import type { UiError } from '../../../core/atoms/types';
21
+ import type { UiError } from '../../core/atoms/types';
22
22
  export type GameAudioContextValue = Pick<GameAudioControls, 'muted' | 'setMuted' | 'masterVolume' | 'setMasterVolume' | 'play' | 'playMusic' | 'stopMusic'>;
23
23
  export declare const GameAudioContext: React.Context<GameAudioContextValue | null>;
24
24
  /**
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import React from "react";
9
9
  import type { Asset } from "@almadar/core";
10
- import type { TemplateProps } from "../../../core/templates/types";
10
+ import type { TemplateProps } from "../../core/templates/types";
11
11
  export interface GameControls {
12
12
  onPlay?: () => void;
13
13
  onPause?: () => void;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * SpriteBillboard3D
3
+ *
4
+ * Billboarded sprite-sheet plane for a unit. Loads the atlas's PNG sheet as a
5
+ * texture and crops a SINGLE frame via UV `repeat`/`offset`, advancing per
6
+ * animation state. Mirrors the 2D canvas: one frame, never the whole sheet.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ import React from 'react';
11
+ import type { ResolvedFrame } from '../../lib/spriteAnimationTypes';
12
+ export interface SpriteBillboard3DProps {
13
+ sheetUrl: string;
14
+ resolveFrame: () => ResolvedFrame | null;
15
+ height?: number;
16
+ }
17
+ export declare function SpriteBillboard3D({ sheetUrl, resolveFrame, height, }: SpriteBillboard3DProps): React.JSX.Element | null;
18
+ export default SpriteBillboard3D;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * game3dTheme
3
+ *
4
+ * Single source of truth for the 3D game renderer's DEFAULT palettes + sizing.
5
+ * These were previously baked (and in several cases duplicated) inside
6
+ * `GameCanvas3D.tsx`'s inline sub-renderers. The decomposed mesh components
7
+ * (`TileMesh3D`, `UnitMesh3D`, `FeatureMesh3D`, `EventMarker3D`, `SideScene3D`)
8
+ * read these as DEFAULTS so the renderer stays "dumb": every color/size can be
9
+ * overridden per-item via the descriptor data (`tile.color`, `unit.tint`, …)
10
+ * that `.lolo` computes. No React deps — pure constants, usable anywhere.
11
+ *
12
+ * Values are the exact literals that lived inline in GameCanvas3D before the
13
+ * decomposition, so a board that supplies no overrides renders identically.
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ /** Tile fallback color by terrain kind (DefaultTile 555–560). */
18
+ export declare const TERRAIN_COLORS_3D: Record<string, number>;
19
+ /** Tile emissive tint by highlight state (DefaultTile 562–566). */
20
+ export declare const HIGHLIGHT_EMISSIVE_3D: Record<string, number>;
21
+ /** Unit fallback color by faction/team (DefaultUnit 624). */
22
+ export declare const FACTION_COLORS_3D: Record<string, number>;
23
+ /** Selection ring color (DefaultUnit 644). */
24
+ export declare const SELECTION_RING_COLOR_3D = "#ffff00";
25
+ /** Health-bar palette + geometry (DefaultUnit 690–716). */
26
+ export declare const HEALTHBAR_3D: {
27
+ bg: number;
28
+ /** fill color thresholds: fraction > key → color */
29
+ high: number;
30
+ mid: number;
31
+ low: number;
32
+ width: number;
33
+ };
34
+ /** Resolve the health-bar fill color for a health fraction (0..1). */
35
+ export declare function healthbarFill3D(fraction: number): number;
36
+ /** Procedural tree colors (DefaultFeature 753–760). */
37
+ export declare const TREE_COLORS_3D: {
38
+ trunk: number;
39
+ foliage: number;
40
+ };
41
+ /** Procedural rock color (DefaultFeature 765). */
42
+ export declare const ROCK_COLOR_3D = 8421504;
43
+ /** Floating event/feedback label color by event type (EventMarker 487–498). */
44
+ export declare const EVENT_COLORS_3D: Record<string, number>;
45
+ /** Side-scroller platform palette (SideScene SIDE_PLATFORM_COLORS 356–362). */
46
+ export declare const SIDE_PLATFORM_COLORS_3D: Record<string, number>;
47
+ /** Side-scroller player fallback capsule color (SideScene 470). */
48
+ export declare const SIDE_PLAYER_COLOR_3D = "#4488ff";
49
+ /** Grid line colors for the drei `<Grid>` (GameCanvas3D 1245/1248). */
50
+ export declare const GRID_COLORS_3D: {
51
+ cell: string;
52
+ section: string;
53
+ };
54
+ /** Default scene background (GameCanvas3DProps.backgroundColor default, line 114). */
55
+ export declare const DEFAULT_BACKGROUND_3D = "#1a1a2e";
@@ -1,11 +1,12 @@
1
1
  import type { EventEmit } from '@almadar/core';
2
- import type { IsometricTile, IsometricUnit, IsometricFeature } from '../isometricTypes';
2
+ import type { IsometricTile, IsometricUnit, IsometricFeature } from '../../lib/isometricTypes';
3
3
  export interface GameCanvas3DEventConfig {
4
- /** Event name for tile clicks */
4
+ /** Event name for tile clicks. `tileId` is optional — the neutral draw-host emits
5
+ * only the scene coordinate `{ x, z }` (the FSM keys off the cell, not an id). */
5
6
  tileClickEvent?: EventEmit<{
6
- tileId: string;
7
7
  x: number;
8
8
  z: number;
9
+ tileId?: string;
9
10
  type?: string;
10
11
  terrain?: string;
11
12
  elevation?: number;