@almadar/ui 5.71.0 → 5.73.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 (55) hide show
  1. package/dist/avl/index.cjs +2178 -2309
  2. package/dist/avl/index.js +912 -1043
  3. package/dist/components/game/atoms/ActionButton.d.ts +3 -3
  4. package/dist/components/game/atoms/ChoiceButton.d.ts +3 -3
  5. package/dist/components/game/atoms/ComboCounter.d.ts +3 -3
  6. package/dist/components/game/atoms/ControlButton.d.ts +3 -3
  7. package/dist/components/game/atoms/DamageNumber.d.ts +3 -3
  8. package/dist/components/game/atoms/DialogueBubble.d.ts +3 -3
  9. package/dist/components/game/atoms/ItemSlot.d.ts +3 -3
  10. package/dist/components/game/atoms/ResourceCounter.d.ts +3 -3
  11. package/dist/components/game/atoms/ScoreDisplay.d.ts +4 -6
  12. package/dist/components/game/atoms/Sprite.d.ts +9 -21
  13. package/dist/components/game/atoms/StateIndicator.d.ts +2 -2
  14. package/dist/components/game/atoms/StatusEffect.d.ts +3 -3
  15. package/dist/components/game/atoms/TurnIndicator.d.ts +3 -3
  16. package/dist/components/game/atoms/WaypointMarker.d.ts +3 -3
  17. package/dist/components/game/atoms/XPBar.d.ts +1 -1
  18. package/dist/components/game/molecules/CardHand.d.ts +2 -2
  19. package/dist/components/game/molecules/DialogueBox.d.ts +3 -3
  20. package/dist/components/game/molecules/EnemyPlate.d.ts +3 -3
  21. package/dist/components/game/molecules/GameCanvas2D.d.ts +3 -3
  22. package/dist/components/game/molecules/GameCanvas3D.d.ts +0 -2
  23. package/dist/components/game/molecules/HealthPanel.d.ts +3 -3
  24. package/dist/components/game/molecules/IsometricCanvas.d.ts +11 -13
  25. package/dist/components/game/molecules/PlatformerCanvas.d.ts +4 -1
  26. package/dist/components/game/molecules/PowerupSlots.d.ts +3 -3
  27. package/dist/components/game/molecules/StatBadge.d.ts +6 -4
  28. package/dist/components/game/molecules/TurnPanel.d.ts +3 -3
  29. package/dist/components/game/molecules/three/index.cjs +55 -109
  30. package/dist/components/game/molecules/three/index.js +55 -109
  31. package/dist/components/game/molecules/useUnitSpriteAtlas.d.ts +6 -12
  32. package/dist/components/game/organisms/BattleBoard.d.ts +5 -6
  33. package/dist/components/game/organisms/CardBattlerBoard.d.ts +3 -4
  34. package/dist/components/game/organisms/CastleBoard.d.ts +5 -6
  35. package/dist/components/game/organisms/CityBuilderBoard.d.ts +6 -7
  36. package/dist/components/game/organisms/FishingBoard.d.ts +4 -6
  37. package/dist/components/game/organisms/PlatformerBoard.d.ts +5 -5
  38. package/dist/components/game/organisms/RoguelikeBoard.d.ts +4 -5
  39. package/dist/components/game/organisms/TopDownShooterBoard.d.ts +5 -6
  40. package/dist/components/game/organisms/TowerDefenseBoard.d.ts +5 -6
  41. package/dist/components/game/organisms/VisualNovelBoard.d.ts +4 -5
  42. package/dist/components/game/organisms/WorldMapBoard.d.ts +5 -6
  43. package/dist/components/game/organisms/types/effects.d.ts +7 -8
  44. package/dist/components/game/organisms/types/isometric.d.ts +24 -8
  45. package/dist/components/game/organisms/types/spriteAnimation.d.ts +3 -4
  46. package/dist/components/game/organisms/utils/makeAsset.d.ts +5 -0
  47. package/dist/components/game/templates/PlatformerTemplate.d.ts +5 -4
  48. package/dist/components/game/templates/game3dAssetManifest.d.ts +6 -8
  49. package/dist/components/index.cjs +2314 -2411
  50. package/dist/components/index.js +1203 -1300
  51. package/dist/providers/index.cjs +1987 -2118
  52. package/dist/providers/index.js +888 -1019
  53. package/dist/runtime/index.cjs +2043 -2174
  54. package/dist/runtime/index.js +892 -1023
  55. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  import { type IconInput } from '../../core/atoms/Icon';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface ActionButtonProps {
4
- /** Sprite image URL — takes precedence over icon when provided */
5
- assetUrl?: AssetUrl;
4
+ /** Sprite asset — takes precedence over icon when provided */
5
+ assetUrl?: Asset;
6
6
  /** Button label text */
7
7
  label: string;
8
8
  /** Icon displayed before the label */
@@ -1,12 +1,12 @@
1
1
  import { type IconInput } from '../../core/atoms/Icon';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface ChoiceButtonProps {
4
4
  /** Choice text content */
5
5
  text: string;
6
6
  /** Choice index number (displayed as prefix) */
7
7
  index?: number;
8
- /** Sprite image URL — takes precedence over icon when provided */
9
- assetUrl?: AssetUrl;
8
+ /** Sprite asset — takes precedence over icon when provided */
9
+ assetUrl?: Asset;
10
10
  /** Icon displayed before the text */
11
11
  icon?: IconInput;
12
12
  /** Whether the choice is disabled */
@@ -1,7 +1,7 @@
1
- import type { AssetUrl } from '@almadar/core';
1
+ import type { Asset } from '@almadar/core';
2
2
  export interface ComboCounterProps {
3
- /** Sprite image URL displayed alongside the combo number */
4
- assetUrl?: AssetUrl;
3
+ /** Sprite asset displayed alongside the combo number */
4
+ assetUrl?: Asset;
5
5
  /** Current combo count */
6
6
  combo: number;
7
7
  /** Score multiplier */
@@ -1,8 +1,8 @@
1
- import type { EventKey, AssetUrl } from "@almadar/core";
1
+ import type { EventKey, Asset } from "@almadar/core";
2
2
  import { type IconInput } from '../../core/atoms/Icon';
3
3
  export interface ControlButtonProps {
4
- /** Sprite image URL — takes precedence over icon when provided */
5
- assetUrl?: AssetUrl;
4
+ /** Sprite asset — takes precedence over icon when provided */
5
+ assetUrl?: Asset;
6
6
  /** Button label text */
7
7
  label?: string;
8
8
  /** Icon component or emoji */
@@ -1,7 +1,7 @@
1
- import type { AssetUrl } from '@almadar/core';
1
+ import type { Asset } from '@almadar/core';
2
2
  export interface DamageNumberProps {
3
- /** Sprite image URL — displayed as a hit-effect icon alongside the number */
4
- assetUrl?: AssetUrl;
3
+ /** Sprite asset — displayed as a hit-effect icon alongside the number */
4
+ assetUrl?: Asset;
5
5
  /** The damage/heal value to display */
6
6
  value: number;
7
7
  /** Type of number display */
@@ -1,11 +1,11 @@
1
- import type { AssetUrl } from '@almadar/core';
1
+ import type { Asset } from '@almadar/core';
2
2
  export interface DialogueBubbleProps {
3
3
  /** Speaker name displayed at the top */
4
4
  speaker?: string;
5
5
  /** Dialogue text content */
6
6
  text: string;
7
- /** URL for the speaker portrait image */
8
- portrait?: AssetUrl;
7
+ /** Speaker portrait asset */
8
+ portrait?: Asset;
9
9
  /** Position of the bubble on screen */
10
10
  position?: 'top' | 'bottom';
11
11
  /** Additional CSS classes */
@@ -1,8 +1,8 @@
1
1
  import { type IconInput } from '../../core/atoms/Icon';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface ItemSlotProps {
4
- /** Sprite image URL — takes precedence over icon when provided */
5
- assetUrl?: AssetUrl;
4
+ /** Sprite asset — takes precedence over icon when provided */
5
+ assetUrl?: Asset;
6
6
  /** Icon component or emoji — shown only when assetUrl is absent */
7
7
  icon?: IconInput;
8
8
  /** Item label */
@@ -1,9 +1,9 @@
1
1
  import type { ColorToken } from '../../core/atoms/types';
2
2
  import { type IconInput } from '../../core/atoms/Icon';
3
- import type { AssetUrl } from '@almadar/core';
3
+ import type { Asset } from '@almadar/core';
4
4
  export interface ResourceCounterProps {
5
- /** Sprite image URL — takes precedence over icon when provided */
6
- assetUrl?: AssetUrl;
5
+ /** Sprite asset — takes precedence over icon when provided */
6
+ assetUrl?: Asset;
7
7
  /** Icon component or emoji */
8
8
  icon?: IconInput;
9
9
  /** Resource label */
@@ -1,8 +1,8 @@
1
1
  import { type IconInput } from '../../core/atoms/Icon';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface ScoreDisplayProps {
4
- /** Sprite image URL — takes precedence over icon when provided */
5
- assetUrl?: AssetUrl;
4
+ /** Sprite asset — takes precedence over icon when provided */
5
+ assetUrl?: Asset;
6
6
  /** Current score value */
7
7
  value: number;
8
8
  /** Alias for value — common schema binding name */
@@ -15,12 +15,10 @@ export interface ScoreDisplayProps {
15
15
  size?: 'sm' | 'md' | 'lg' | 'xl';
16
16
  /** Additional CSS classes */
17
17
  className?: string;
18
- /** Animation on value change */
19
- animated?: boolean;
20
18
  /** Number formatting locale */
21
19
  locale?: string;
22
20
  }
23
- export declare function ScoreDisplay({ assetUrl, value, score, label, icon, size, className, animated, locale, }: ScoreDisplayProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function ScoreDisplay({ assetUrl, value, score, label, icon, size, className, locale, }: ScoreDisplayProps): import("react/jsx-runtime").JSX.Element;
24
22
  export declare namespace ScoreDisplay {
25
23
  var displayName: string;
26
24
  }
@@ -4,10 +4,11 @@
4
4
  * Renders a single frame from a spritesheet with transform support.
5
5
  */
6
6
  import React from 'react';
7
- import type { EventKey, AssetUrl } from "@almadar/core";
7
+ import type { EventKey, Asset } from "@almadar/core";
8
+ import type { AnimationName } from '../organisms/types/spriteAnimation';
8
9
  export interface SpriteProps {
9
- /** Spritesheet image URL */
10
- spritesheet: AssetUrl;
10
+ /** Spritesheet asset */
11
+ spritesheet: Asset;
11
12
  /** Width of each frame in pixels */
12
13
  frameWidth: number;
13
14
  /** Height of each frame in pixels */
@@ -32,6 +33,10 @@ export interface SpriteProps {
32
33
  zIndex?: number;
33
34
  /** Number of columns in spritesheet (for frame calculation) */
34
35
  columns?: number;
36
+ /** Animation state name — drives lolo-ui config knob for animation selection */
37
+ animState?: AnimationName;
38
+ /** Frames per second — drives lolo-ui config knob for animation speed */
39
+ frameRate?: number;
35
40
  /** Optional className */
36
41
  className?: string;
37
42
  /** Optional onClick handler */
@@ -39,24 +44,7 @@ export interface SpriteProps {
39
44
  /** Declarative event name emitted on click via useEventBus */
40
45
  action?: EventKey;
41
46
  }
42
- /**
43
- * Sprite component for rendering spritesheet frames
44
- *
45
- * @example
46
- * ```tsx
47
- * <Sprite
48
- * spritesheet="/sprites/player.png"
49
- * frameWidth={32}
50
- * frameHeight={32}
51
- * frame={currentFrame}
52
- * x={player.x}
53
- * y={player.y}
54
- * flipX={player.facingLeft}
55
- * scale={2}
56
- * />
57
- * ```
58
- */
59
- export declare function Sprite({ spritesheet, frameWidth, frameHeight, frame, x, y, scale, flipX, flipY, rotation, opacity, zIndex, columns, className, onClick, action, }: SpriteProps): React.JSX.Element;
47
+ export declare function Sprite({ spritesheet, frameWidth, frameHeight, frame, x, y, scale, flipX, flipY, rotation, opacity, zIndex, columns, animState: _animState, frameRate: _frameRate, className, onClick, action, }: SpriteProps): React.JSX.Element;
60
48
  /**
61
49
  * Canvas-based sprite renderer for better performance in game loops
62
50
  */
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { type IconInput } from '../../core/atoms/Icon';
3
- import type { AssetUrl } from '@almadar/core';
3
+ import type { Asset } from '@almadar/core';
4
4
  export interface StateStyle {
5
5
  icon: IconInput;
6
6
  bgClass: string;
7
7
  }
8
8
  export interface StateIndicatorProps {
9
9
  /** Sprite image URL — takes precedence over the state icon when provided */
10
- assetUrl?: AssetUrl;
10
+ assetUrl?: Asset;
11
11
  /** The current state name */
12
12
  state: string;
13
13
  /** Optional label override (defaults to capitalized state name) */
@@ -1,8 +1,8 @@
1
1
  import { type IconInput } from '../../core/atoms/Icon';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface StatusEffectProps {
4
- /** Sprite image URL — takes precedence over icon when provided */
5
- assetUrl?: AssetUrl;
4
+ /** Sprite asset — takes precedence over icon when provided */
5
+ assetUrl?: Asset;
6
6
  /** Lucide icon name or component */
7
7
  icon: IconInput;
8
8
  /** Label describing the effect */
@@ -1,7 +1,7 @@
1
- import type { AssetUrl } from '@almadar/core';
1
+ import type { Asset } from '@almadar/core';
2
2
  export interface TurnIndicatorProps {
3
- /** Sprite image URL — takes precedence over the dot indicator when provided */
4
- assetUrl?: AssetUrl;
3
+ /** Sprite asset — takes precedence over the dot indicator when provided */
4
+ assetUrl?: Asset;
5
5
  /** Current turn number */
6
6
  currentTurn: number;
7
7
  /** Maximum number of turns */
@@ -1,8 +1,8 @@
1
1
  import { type IconInput } from '../../core/atoms/Icon';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface WaypointMarkerProps {
4
- /** Sprite image URL — takes precedence over icon when provided */
5
- assetUrl?: AssetUrl;
4
+ /** Sprite asset — takes precedence over icon when provided */
5
+ assetUrl?: Asset;
6
6
  /** Label text below the marker */
7
7
  label?: string;
8
8
  /** Custom icon to render inside the marker */
@@ -9,7 +9,7 @@ export interface XPBarProps {
9
9
  showLabel?: boolean;
10
10
  /** Size variant */
11
11
  size?: 'sm' | 'md' | 'lg';
12
- /** Animate the fill bar */
12
+ /** Animate the fill bar with a CSS transition */
13
13
  animated?: boolean;
14
14
  /** Additional CSS classes */
15
15
  className?: string;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import type { AssetUrl, EventEmit } from '@almadar/core';
2
+ import type { Asset, EventEmit } from '@almadar/core';
3
3
  /** One playable card (icon + title + a few stat numbers). UI value DTO. */
4
4
  export interface CardHandCard {
5
5
  id: string;
6
- iconUrl?: AssetUrl;
6
+ iconUrl?: Asset;
7
7
  title?: string;
8
8
  cost?: number;
9
9
  attack?: number;
@@ -12,7 +12,7 @@
12
12
  * concern analogous to Form's `formData`.
13
13
  */
14
14
  import React from 'react';
15
- import type { AssetUrl, EventEmit, EventPayload } from '@almadar/core';
15
+ import type { Asset, EventEmit, EventPayload } from '@almadar/core';
16
16
  export type DialogueChoice = EventPayload & {
17
17
  text: string;
18
18
  action?: string;
@@ -54,9 +54,9 @@ export interface DialogueBoxProps {
54
54
  /** Declarative event: emits UI:{advanceEvent} when dialogue is advanced */
55
55
  advanceEvent?: EventEmit<Record<string, never>>;
56
56
  /** Optional full-frame scene image rendered behind the dialogue (visual-novel mode). */
57
- backgroundImage?: AssetUrl;
57
+ backgroundImage?: Asset;
58
58
  /** Optional larger character portrait rendered standing over the scene (visual-novel mode). */
59
- portraitUrl?: AssetUrl;
59
+ portraitUrl?: Asset;
60
60
  /** Multiplier for the large `portraitUrl` height relative to its default (default 1). */
61
61
  portraitScale?: number;
62
62
  /** Optional className */
@@ -1,5 +1,5 @@
1
1
  import type { IconInput } from '../../core/atoms';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface EnemyPlateEffect {
4
4
  /** Effect icon */
5
5
  icon: IconInput;
@@ -9,8 +9,8 @@ export interface EnemyPlateEffect {
9
9
  variant?: 'buff' | 'debuff' | 'neutral';
10
10
  }
11
11
  export interface EnemyPlateProps {
12
- /** Portrait sprite URL — takes precedence over the default avatar slot */
13
- assetUrl?: AssetUrl;
12
+ /** Portrait sprite asset — takes precedence over the default avatar slot */
13
+ assetUrl?: Asset;
14
14
  /** Enemy name */
15
15
  name: string;
16
16
  /** Current health */
@@ -1,4 +1,4 @@
1
- import type { AssetUrl } from '@almadar/core';
1
+ import type { Asset, AssetUrl } from '@almadar/core';
2
2
  export interface GameCanvas2DProps {
3
3
  /** Canvas width in pixels */
4
4
  width?: number;
@@ -14,8 +14,8 @@ export interface GameCanvas2DProps {
14
14
  drawEvent?: string;
15
15
  /** Target frames per second */
16
16
  fps?: number;
17
- /** Background image URL */
18
- backgroundImage?: AssetUrl;
17
+ /** Background image asset */
18
+ backgroundImage?: Asset;
19
19
  /** Base URL prefix for asset URLs */
20
20
  assetBaseUrl?: AssetUrl;
21
21
  /** Additional CSS classes */
@@ -46,8 +46,6 @@ export interface GameCanvas3DProps {
46
46
  isLoading?: boolean;
47
47
  /** Error state */
48
48
  error?: string | null;
49
- /** Entity name for schema-driven auto-fetch */
50
- entity?: string;
51
49
  /** Array of tiles to render */
52
50
  tiles?: IsometricTile[];
53
51
  /** Array of units to render */
@@ -1,9 +1,9 @@
1
1
  import type { IconInput } from '../../core/atoms';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface HealthEffect {
4
4
  icon: IconInput;
5
- /** Sprite image URL — takes precedence over icon when provided */
6
- assetUrl?: AssetUrl;
5
+ /** Sprite asset — takes precedence over icon when provided */
6
+ assetUrl?: Asset;
7
7
  label?: string;
8
8
  variant?: 'buff' | 'debuff' | 'neutral';
9
9
  }
@@ -24,8 +24,8 @@
24
24
  * @packageDocumentation
25
25
  */
26
26
  import * as React from 'react';
27
- import type { AssetUrl, EventEmit } from '@almadar/core';
28
- import type { IsometricTile, IsometricUnit, IsometricFeature } from '../organisms/types/isometric';
27
+ import type { Asset, AssetUrl, EventEmit } from '@almadar/core';
28
+ import type { IsometricTile, IsometricUnit, IsometricFeature, ActiveEffect } from '../organisms/types/isometric';
29
29
  import type { ResolvedFrame } from '../organisms/types/spriteAnimation';
30
30
  import type { TileLayout } from '../organisms/utils/isometric';
31
31
  import type { UiError } from '../../core/atoms/types';
@@ -52,6 +52,8 @@ export interface IsometricCanvasProps {
52
52
  units?: IsometricUnit[];
53
53
  /** Array of features (resources, portals, buildings, etc.) */
54
54
  features?: IsometricFeature[];
55
+ /** Active visual effects to draw after units. Sprite URLs resolved via assetManifest.effects[fx.key]. */
56
+ effects?: ActiveEffect[];
55
57
  /** Currently selected unit ID */
56
58
  selectedUnitId?: string | null;
57
59
  /** Valid move positions (shown as pulsing green highlights) */
@@ -119,20 +121,16 @@ export interface IsometricCanvasProps {
119
121
  onDrawEffects?: (ctx: CanvasRenderingContext2D, animTime: number, getImage: (url: string) => HTMLImageElement | undefined) => void;
120
122
  /** Whether there are active effects — keeps RAF loop alive */
121
123
  hasActiveEffects?: boolean;
122
- /** Base URL for remote asset resolution. When set, manifest paths
123
- * are prefixed with this URL. Example: "https://trait-wars-assets.web.app" */
124
- assetBaseUrl?: AssetUrl;
125
- /** Manifest mapping entity keys to relative sprite paths.
126
- * Combined with assetBaseUrl to produce full URLs.
127
- * Used as a fallback when inline URLs and callbacks don't resolve. */
124
+ /** Manifest mapping entity keys to resolved Asset objects.
125
+ * Used as a fallback when inline assets and callbacks don't resolve. */
128
126
  assetManifest?: {
129
- terrains?: Record<string, string>;
130
- units?: Record<string, string>;
131
- features?: Record<string, string>;
132
- effects?: Record<string, string>;
127
+ terrains?: Record<string, Asset>;
128
+ units?: Record<string, Asset>;
129
+ features?: Record<string, Asset>;
130
+ effects?: Record<string, Asset>;
133
131
  };
134
132
  }
135
- export declare function IsometricCanvas({ className, isLoading, error, tiles: _tilesPropRaw, units: _unitsPropRaw, features: _featuresPropRaw, selectedUnitId, validMoves, attackTargets, hoveredTile, onTileClick, onUnitClick, onTileHover, onTileLeave, tileClickEvent, unitClickEvent, tileHoverEvent, tileLeaveEvent, tileLayout, scale, debug, backgroundImage, showMinimap, enableCamera, unitScale, spriteHeightRatio, spriteMaxWidthRatio, getTerrainSprite, getFeatureSprite, getUnitSprite, resolveUnitFrame, effectSpriteUrls, onDrawEffects, hasActiveEffects, diamondTopY: diamondTopYProp, assetBaseUrl, assetManifest, }: IsometricCanvasProps): React.JSX.Element;
133
+ export declare function IsometricCanvas({ className, isLoading, error, tiles: _tilesPropRaw, units: _unitsPropRaw, features: _featuresPropRaw, effects: _effectsPropRaw, selectedUnitId, validMoves, attackTargets, hoveredTile, onTileClick, onUnitClick, onTileHover, onTileLeave, tileClickEvent, unitClickEvent, tileHoverEvent, tileLeaveEvent, tileLayout, scale, debug, backgroundImage, showMinimap, enableCamera, unitScale, spriteHeightRatio, spriteMaxWidthRatio, getTerrainSprite, getFeatureSprite, getUnitSprite, resolveUnitFrame, effectSpriteUrls, onDrawEffects, hasActiveEffects: _hasActiveEffects, diamondTopY: diamondTopYProp, assetManifest, }: IsometricCanvasProps): React.JSX.Element;
136
134
  export declare namespace IsometricCanvas {
137
135
  var displayName: string;
138
136
  }
@@ -1,4 +1,5 @@
1
1
  import type { AssetUrl, EventEmit } from '@almadar/core';
2
+ import type { ActiveEffect } from '../organisms/types/isometric';
2
3
  export interface PlatformerPlatform {
3
4
  x: number;
4
5
  y: number;
@@ -48,10 +49,12 @@ export interface PlatformerCanvasProps {
48
49
  }>;
49
50
  jumpEvent?: EventEmit<Record<string, never>>;
50
51
  stopEvent?: EventEmit<Record<string, never>>;
52
+ /** Active visual effects (key, world x/y, ttl) — drawn after the player */
53
+ effects?: ActiveEffect[];
51
54
  /** Additional CSS classes */
52
55
  className?: string;
53
56
  }
54
- export declare function PlatformerCanvas({ player, platforms, worldWidth, worldHeight, canvasWidth, canvasHeight, followCamera, bgColor, playerSprite, tileSprites, backgroundImage, assetBaseUrl, leftEvent, rightEvent, jumpEvent, stopEvent, className, }: PlatformerCanvasProps): import("react/jsx-runtime").JSX.Element;
57
+ export declare function PlatformerCanvas({ player, platforms, worldWidth, worldHeight, canvasWidth, canvasHeight, followCamera, bgColor, playerSprite, tileSprites, backgroundImage, assetBaseUrl, leftEvent, rightEvent, jumpEvent, stopEvent, effects, className, }: PlatformerCanvasProps): import("react/jsx-runtime").JSX.Element;
55
58
  export declare namespace PlatformerCanvas {
56
59
  var displayName: string;
57
60
  }
@@ -1,10 +1,10 @@
1
1
  import type { IconInput } from '../../core/atoms';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface ActivePowerup {
4
4
  /** Unique powerup ID */
5
5
  id: string;
6
- /** Sprite image URL — takes precedence over icon when provided */
7
- assetUrl?: AssetUrl;
6
+ /** Sprite asset — takes precedence over icon when provided */
7
+ assetUrl?: Asset;
8
8
  /** Icon component or emoji */
9
9
  icon?: IconInput;
10
10
  /** Powerup label */
@@ -1,5 +1,5 @@
1
1
  import { type IconInput } from '../../core/atoms/Icon';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  /**
4
4
  * StatBadge — game stat display molecule (distinct from core Badge atom).
5
5
  * Badge shows a text label/status token. StatBadge shows a numeric value
@@ -7,8 +7,10 @@ import type { AssetUrl } from '@almadar/core';
7
7
  * a named label — purpose-built for HUD stat rows, not general status tags.
8
8
  */
9
9
  export interface StatBadgeProps {
10
- /** Sprite image URL — takes precedence over icon when provided */
11
- assetUrl?: AssetUrl;
10
+ /** Sprite asset — takes precedence over icon when provided */
11
+ assetUrl?: Asset;
12
+ /** Asset image (board ui/ PNG); takes precedence over the Lucide icon. */
13
+ iconUrl?: Asset;
12
14
  /** Stat label */
13
15
  label: string;
14
16
  /** Current value (defaults to 0 if not provided) */
@@ -30,7 +32,7 @@ export interface StatBadgeProps {
30
32
  /** Additional CSS classes */
31
33
  className?: string;
32
34
  }
33
- export declare function StatBadge({ assetUrl, label, value, max, format, icon, size, variant, className, source: _source, field: _field, }: StatBadgeProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function StatBadge({ assetUrl, iconUrl, label, value, max, format, icon, size, variant, className, source: _source, field: _field, }: StatBadgeProps): import("react/jsx-runtime").JSX.Element;
34
36
  export declare namespace StatBadge {
35
37
  var displayName: string;
36
38
  }
@@ -1,10 +1,10 @@
1
1
  import type { IconInput } from '../../core/atoms';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { Asset } from '@almadar/core';
3
3
  export interface TurnPanelAction {
4
4
  /** Action button label */
5
5
  label: string;
6
- /** Sprite image URL — takes precedence over icon when provided */
7
- assetUrl?: AssetUrl;
6
+ /** Sprite asset — takes precedence over icon when provided */
7
+ assetUrl?: Asset;
8
8
  /** Icon for the button */
9
9
  icon?: IconInput;
10
10
  /** Event name to emit when clicked */