@almadar/ui 5.26.1 → 5.27.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.
- package/dist/avl/index.cjs +2617 -2960
- package/dist/avl/index.js +1584 -1927
- package/dist/components/core/atoms/Avatar.d.ts +4 -4
- package/dist/components/core/atoms/Badge.d.ts +3 -2
- package/dist/components/core/atoms/Button.d.ts +7 -7
- package/dist/components/core/atoms/Card.d.ts +3 -0
- package/dist/components/core/atoms/Checkbox.d.ts +4 -1
- package/dist/components/core/atoms/FilterPill.d.ts +3 -2
- package/dist/components/core/atoms/Icon.d.ts +10 -1
- package/dist/components/core/atoms/Input.d.ts +9 -10
- package/dist/components/core/atoms/Select.d.ts +3 -1
- package/dist/components/core/atoms/Textarea.d.ts +3 -1
- package/dist/components/core/atoms/index.d.ts +1 -1
- package/dist/components/core/atoms/types.d.ts +2 -1
- package/dist/components/core/molecules/Breadcrumb.d.ts +3 -3
- package/dist/components/core/molecules/Card.d.ts +4 -3
- package/dist/components/core/molecules/Carousel.d.ts +2 -2
- package/dist/components/core/molecules/DataGrid.d.ts +5 -4
- package/dist/components/core/molecules/DataList.d.ts +7 -6
- package/dist/components/core/molecules/DocumentViewer.d.ts +3 -2
- package/dist/components/core/molecules/EmptyState.d.ts +2 -2
- package/dist/components/core/molecules/FloatingActionButton.d.ts +5 -5
- package/dist/components/core/molecules/FormSectionHeader.d.ts +3 -2
- package/dist/components/core/molecules/Header.d.ts +5 -4
- package/dist/components/core/molecules/Lightbox.d.ts +2 -1
- package/dist/components/core/molecules/Menu.d.ts +3 -3
- package/dist/components/core/molecules/Navigation.d.ts +2 -2
- package/dist/components/core/molecules/PageHeader.d.ts +2 -2
- package/dist/components/core/molecules/Sidebar.d.ts +5 -5
- package/dist/components/core/molecules/StatDisplay.d.ts +3 -2
- package/dist/components/core/molecules/SwipeableRow.d.ts +2 -1
- package/dist/components/core/molecules/TableView.d.ts +5 -4
- package/dist/components/core/molecules/Tabs.d.ts +2 -2
- package/dist/components/core/molecules/UploadDropZone.d.ts +3 -2
- package/dist/components/core/organisms/ComponentPatterns.d.ts +0 -306
- package/dist/components/core/organisms/CustomPattern.d.ts +3 -3
- package/dist/components/core/organisms/DataTable.d.ts +5 -5
- package/dist/components/core/organisms/DetailPanel.d.ts +3 -3
- package/dist/components/core/organisms/Form.d.ts +3 -2
- package/dist/components/core/organisms/LayoutPatterns.d.ts +0 -74
- package/dist/components/core/organisms/List.d.ts +4 -4
- package/dist/components/core/organisms/MediaGallery.d.ts +3 -3
- package/dist/components/core/organisms/StatCard.d.ts +4 -4
- package/dist/components/core/organisms/Timeline.d.ts +2 -2
- package/dist/components/core/templates/DashboardLayout.d.ts +6 -6
- package/dist/components/game/atoms/ActionButton.d.ts +2 -2
- package/dist/components/game/atoms/ControlButton.d.ts +2 -2
- package/dist/components/game/atoms/ItemSlot.d.ts +2 -2
- package/dist/components/game/atoms/ResourceCounter.d.ts +2 -2
- package/dist/components/game/atoms/ScoreDisplay.d.ts +2 -2
- package/dist/components/game/atoms/StateIndicator.d.ts +2 -1
- package/dist/components/game/atoms/StatusEffect.d.ts +3 -2
- package/dist/components/game/atoms/WaypointMarker.d.ts +2 -2
- package/dist/components/game/molecules/ActionButtons.d.ts +2 -8
- package/dist/components/game/molecules/CraftingRecipe.d.ts +3 -3
- package/dist/components/game/molecules/EnemyPlate.d.ts +2 -2
- package/dist/components/game/molecules/GameCanvas2D.d.ts +3 -2
- package/dist/components/game/molecules/GameHud.d.ts +3 -2
- package/dist/components/game/molecules/GameOverScreen.d.ts +2 -2
- package/dist/components/game/molecules/HealthPanel.d.ts +2 -2
- package/dist/components/game/molecules/InventoryGrid.d.ts +2 -2
- package/dist/components/game/molecules/IsometricCanvas.d.ts +4 -4
- package/dist/components/game/molecules/PlatformerCanvas.d.ts +5 -5
- package/dist/components/game/molecules/PowerupSlots.d.ts +2 -2
- package/dist/components/game/molecules/ResourceBar.d.ts +2 -2
- package/dist/components/game/molecules/StatBadge.d.ts +2 -2
- package/dist/components/game/molecules/TurnPanel.d.ts +2 -2
- package/dist/components/game/molecules/UnitCommandBar.d.ts +2 -2
- package/dist/components/game/organisms/BattleBoard.d.ts +2 -2
- package/dist/components/game/organisms/CanvasEffect.d.ts +3 -3
- package/dist/components/game/organisms/TraitSlot.d.ts +3 -3
- package/dist/components/game/organisms/WorldMapBoard.d.ts +2 -2
- package/dist/components/game/organisms/puzzles/builder/BuilderBoard.d.ts +2 -2
- package/dist/components/game/organisms/puzzles/classifier/ClassifierBoard.d.ts +3 -3
- package/dist/components/game/organisms/types/effects.d.ts +8 -7
- package/dist/components/game/organisms/types/isometric.d.ts +5 -4
- package/dist/components/game/organisms/types/spriteAnimation.d.ts +4 -3
- package/dist/components/game/organisms/useCanvasEffects.d.ts +2 -1
- package/dist/components/index.cjs +2663 -3006
- package/dist/components/index.js +1785 -2128
- package/dist/components/marketing/atoms/AnimatedGraphic.d.ts +2 -1
- package/dist/components/marketing/molecules/FeatureCard.d.ts +2 -2
- package/dist/components/marketing/molecules/MarketingFooter.d.ts +2 -1
- package/dist/components/marketing/molecules/StepFlow.d.ts +2 -1
- package/dist/components/marketing/molecules/TeamCard.d.ts +2 -1
- package/dist/components/marketing/organisms/book/BookCoverPage.d.ts +2 -1
- package/dist/components/marketing/templates/AboutPageTemplate.d.ts +2 -1
- package/dist/components/marketing/templates/AuthLayout.d.ts +2 -1
- package/dist/components/marketing/templates/LandingPageTemplate.d.ts +3 -2
- package/dist/docs/index.cjs +54 -11
- package/dist/docs/index.d.cts +48 -37
- package/dist/docs/index.js +54 -11
- package/dist/marketing/index.cjs +27 -13
- package/dist/marketing/index.d.cts +72 -61
- package/dist/marketing/index.js +27 -13
- package/dist/providers/index.cjs +2444 -2787
- package/dist/providers/index.js +1562 -1905
- package/dist/runtime/index.cjs +2482 -2825
- package/dist/runtime/index.js +1564 -1907
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { IconInput } from "../atoms/Icon";
|
|
3
3
|
import type { DisplayStateProps } from "./types";
|
|
4
4
|
import type { EntityRow } from "@almadar/core";
|
|
5
5
|
/**
|
|
@@ -13,8 +13,8 @@ export interface MetricDefinition {
|
|
|
13
13
|
label: string;
|
|
14
14
|
/** Static value for display (alternative to field-based computation) */
|
|
15
15
|
value?: string | number;
|
|
16
|
-
/** Icon name for display */
|
|
17
|
-
icon?:
|
|
16
|
+
/** Icon name or component for display */
|
|
17
|
+
icon?: IconInput;
|
|
18
18
|
/** Value format (e.g., 'currency', 'percent', 'number') */
|
|
19
19
|
format?: "currency" | "percent" | "number" | string;
|
|
20
20
|
}
|
|
@@ -38,7 +38,7 @@ export interface StatCardProps extends DisplayStateProps {
|
|
|
38
38
|
/** Whether up is good (green) or bad (red) */
|
|
39
39
|
invertTrend?: boolean;
|
|
40
40
|
/** Icon to display (Lucide component or icon name string) */
|
|
41
|
-
icon?:
|
|
41
|
+
icon?: IconInput;
|
|
42
42
|
/** Icon background color */
|
|
43
43
|
iconBg?: string;
|
|
44
44
|
/** Icon color */
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import React from "react";
|
|
14
14
|
import type { EventKey } from "@almadar/core";
|
|
15
15
|
import type { EntityRow } from "@almadar/core";
|
|
16
|
-
import type {
|
|
16
|
+
import type { IconInput } from "../atoms/Icon";
|
|
17
17
|
import type { UiError } from '../atoms/types';
|
|
18
18
|
export type TimelineItemStatus = "complete" | "active" | "pending" | "error";
|
|
19
19
|
/**
|
|
@@ -33,7 +33,7 @@ export interface TimelineItem {
|
|
|
33
33
|
/** Status indicator */
|
|
34
34
|
status?: TimelineItemStatus;
|
|
35
35
|
/** Icon override */
|
|
36
|
-
icon?:
|
|
36
|
+
icon?: IconInput;
|
|
37
37
|
/** Additional metadata tags */
|
|
38
38
|
tags?: readonly string[];
|
|
39
39
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
3
|
-
import type { EventEmit, EventKey } from "@almadar/core";
|
|
2
|
+
import type { IconInput } from "../atoms/Icon";
|
|
3
|
+
import type { AssetUrl, EventEmit, EventKey } from "@almadar/core";
|
|
4
4
|
export interface NavItem {
|
|
5
5
|
label: string;
|
|
6
6
|
href: string;
|
|
7
7
|
/** Lucide icon component or string icon name (resolved by @almadar/ui Icon) */
|
|
8
|
-
icon?:
|
|
8
|
+
icon?: IconInput;
|
|
9
9
|
badge?: string | number;
|
|
10
10
|
children?: NavItem[];
|
|
11
11
|
}
|
|
@@ -25,8 +25,8 @@ export interface NotificationItem {
|
|
|
25
25
|
* an icon button between the search bar and the notifications bell;
|
|
26
26
|
* click dispatches the configured event onto the bus. */
|
|
27
27
|
export interface TopBarAction {
|
|
28
|
-
/** Lucide icon name
|
|
29
|
-
icon:
|
|
28
|
+
/** Lucide icon name or component. */
|
|
29
|
+
icon: IconInput;
|
|
30
30
|
/** Optional aria-label / tooltip. Falls back to `icon`. */
|
|
31
31
|
label?: string;
|
|
32
32
|
/** Bus event fired on click. Dispatched as `UI:{event}` with empty payload.
|
|
@@ -42,7 +42,7 @@ export interface TopBarAction {
|
|
|
42
42
|
export interface DashboardUser {
|
|
43
43
|
name: string;
|
|
44
44
|
email: string;
|
|
45
|
-
avatar?:
|
|
45
|
+
avatar?: AssetUrl;
|
|
46
46
|
}
|
|
47
47
|
export interface DashboardLayoutProps {
|
|
48
48
|
/** App name shown in sidebar */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
2
2
|
export interface ActionButtonProps {
|
|
3
3
|
/** Button label text */
|
|
4
4
|
label: string;
|
|
5
5
|
/** Icon displayed before the label */
|
|
6
|
-
icon?:
|
|
6
|
+
icon?: IconInput;
|
|
7
7
|
/** Cooldown progress from 0 (ready) to 1 (full cooldown) */
|
|
8
8
|
cooldown?: number;
|
|
9
9
|
/** Whether the button is disabled */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { EventKey } from "@almadar/core";
|
|
2
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
3
3
|
export interface ControlButtonProps {
|
|
4
4
|
/** Button label text */
|
|
5
5
|
label?: string;
|
|
6
6
|
/** Icon component or emoji */
|
|
7
|
-
icon?:
|
|
7
|
+
icon?: IconInput;
|
|
8
8
|
/** Size variant */
|
|
9
9
|
size?: 'sm' | 'md' | 'lg' | 'xl' | string;
|
|
10
10
|
/** Shape variant */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
2
2
|
export interface ItemSlotProps {
|
|
3
3
|
/** Icon component or emoji */
|
|
4
|
-
icon?:
|
|
4
|
+
icon?: IconInput;
|
|
5
5
|
/** Item label */
|
|
6
6
|
label?: string;
|
|
7
7
|
/** Stack quantity */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { ColorToken } from '../../core/atoms/types';
|
|
2
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
3
3
|
export interface ResourceCounterProps {
|
|
4
4
|
/** Icon component or emoji */
|
|
5
|
-
icon?:
|
|
5
|
+
icon?: IconInput;
|
|
6
6
|
/** Resource label */
|
|
7
7
|
label: string;
|
|
8
8
|
/** Current value */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
2
2
|
export interface ScoreDisplayProps {
|
|
3
3
|
/** Current score value */
|
|
4
4
|
value: number;
|
|
5
5
|
/** Label to display before score */
|
|
6
6
|
label?: string;
|
|
7
7
|
/** Icon component or emoji */
|
|
8
|
-
icon?:
|
|
8
|
+
icon?: IconInput;
|
|
9
9
|
/** Size variant */
|
|
10
10
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
11
11
|
/** Additional CSS classes */
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* can extend. Use it in game HUDs where the entity state machine drives the display.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
8
9
|
export interface StateStyle {
|
|
9
|
-
icon:
|
|
10
|
+
icon: IconInput;
|
|
10
11
|
bgClass: string;
|
|
11
12
|
}
|
|
12
13
|
export interface StateIndicatorProps {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
1
2
|
export interface StatusEffectProps {
|
|
2
|
-
/** Lucide
|
|
3
|
-
icon:
|
|
3
|
+
/** Lucide icon name or component */
|
|
4
|
+
icon: IconInput;
|
|
4
5
|
/** Label describing the effect */
|
|
5
6
|
label?: string;
|
|
6
7
|
/** Remaining duration in seconds */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
2
2
|
export interface WaypointMarkerProps {
|
|
3
3
|
/** Label text below the marker */
|
|
4
4
|
label?: string;
|
|
5
5
|
/** Custom icon to render inside the marker */
|
|
6
|
-
icon?:
|
|
6
|
+
icon?: IconInput;
|
|
7
7
|
/** Whether this waypoint is currently active */
|
|
8
8
|
active?: boolean;
|
|
9
9
|
/** Whether this waypoint has been completed */
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ActionButtons — configurable button-group molecule for game controls (distinct from ActionButton atom).
|
|
3
|
-
* ActionButton is a single button with cooldown overlay and hotkey badge.
|
|
4
|
-
* ActionButtons manages a *set* of ControlButtons, tracks press/release state,
|
|
5
|
-
* and supports horizontal/vertical/diamond layouts for gamepad-style UI.
|
|
6
|
-
*/
|
|
7
|
-
import * as React from 'react';
|
|
8
1
|
import type { EventEmit } from '@almadar/core';
|
|
2
|
+
import type { IconInput } from '../../core/atoms';
|
|
9
3
|
export interface ActionButtonConfig {
|
|
10
4
|
/** Unique identifier */
|
|
11
5
|
id: string;
|
|
12
6
|
/** Display label */
|
|
13
7
|
label?: string;
|
|
14
8
|
/** Icon component or emoji */
|
|
15
|
-
icon?:
|
|
9
|
+
icon?: IconInput;
|
|
16
10
|
/** Button variant */
|
|
17
11
|
variant?: 'primary' | 'secondary' | 'ghost' | string;
|
|
18
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { EventEmit } from '@almadar/core';
|
|
2
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
3
3
|
export type CraftingIngredient = {
|
|
4
4
|
/** Icon component or emoji */
|
|
5
|
-
icon?:
|
|
5
|
+
icon?: IconInput;
|
|
6
6
|
/** Ingredient label */
|
|
7
7
|
label: string;
|
|
8
8
|
/** Number required for the recipe */
|
|
@@ -12,7 +12,7 @@ export type CraftingIngredient = {
|
|
|
12
12
|
};
|
|
13
13
|
export type CraftingOutput = {
|
|
14
14
|
/** Icon component or emoji */
|
|
15
|
-
icon?:
|
|
15
|
+
icon?: IconInput;
|
|
16
16
|
/** Output item label */
|
|
17
17
|
label: string;
|
|
18
18
|
/** Rarity tier */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AssetUrl } from '@almadar/core';
|
|
1
2
|
export interface GameCanvas2DProps {
|
|
2
3
|
/** Canvas width in pixels */
|
|
3
4
|
width?: number;
|
|
@@ -14,9 +15,9 @@ export interface GameCanvas2DProps {
|
|
|
14
15
|
/** Target frames per second */
|
|
15
16
|
fps?: number;
|
|
16
17
|
/** Background image URL */
|
|
17
|
-
backgroundImage?:
|
|
18
|
+
backgroundImage?: AssetUrl;
|
|
18
19
|
/** Base URL prefix for asset URLs */
|
|
19
|
-
assetBaseUrl?:
|
|
20
|
+
assetBaseUrl?: AssetUrl;
|
|
20
21
|
/** Additional CSS classes */
|
|
21
22
|
className?: string;
|
|
22
23
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type StatBadgeProps } from "./StatBadge";
|
|
2
|
+
import type { IconInput } from "../../core/atoms";
|
|
2
3
|
export interface GameHudStat extends Omit<StatBadgeProps, "size"> {
|
|
3
4
|
/** Data source entity name */
|
|
4
5
|
source?: string;
|
|
@@ -16,8 +17,8 @@ export interface GameHudElement {
|
|
|
16
17
|
label?: string;
|
|
17
18
|
/** Direct value (from compiled render-ui effects) */
|
|
18
19
|
value?: number | string;
|
|
19
|
-
/** Lucide
|
|
20
|
-
icon?:
|
|
20
|
+
/** Lucide icon name or component */
|
|
21
|
+
icon?: IconInput;
|
|
21
22
|
/** Display format */
|
|
22
23
|
format?: string;
|
|
23
24
|
/** Max value (for bars/hearts) */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import type { EventPayload } from "@almadar/core";
|
|
2
|
+
import { type IconInput } from "../../core/atoms/Icon";
|
|
3
3
|
import { type EventBusContextType } from "../../../hooks/useEventBus";
|
|
4
4
|
export interface GameOverStat {
|
|
5
5
|
/** Stat label */
|
|
@@ -15,7 +15,7 @@ export interface GameOverStat {
|
|
|
15
15
|
/** Display format */
|
|
16
16
|
format?: "number" | "time" | "text";
|
|
17
17
|
/** Icon */
|
|
18
|
-
icon?:
|
|
18
|
+
icon?: IconInput;
|
|
19
19
|
}
|
|
20
20
|
export type GameOverAction = EventPayload & {
|
|
21
21
|
/** Display label */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { EventEmit } from '@almadar/core';
|
|
2
|
+
import type { IconInput } from '../../core/atoms';
|
|
3
3
|
export interface InventoryGridItem {
|
|
4
4
|
id: string;
|
|
5
|
-
icon?:
|
|
5
|
+
icon?: IconInput;
|
|
6
6
|
label?: string;
|
|
7
7
|
quantity?: number;
|
|
8
8
|
rarity?: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @packageDocumentation
|
|
25
25
|
*/
|
|
26
26
|
import * as React from 'react';
|
|
27
|
-
import type { EventEmit } from '@almadar/core';
|
|
27
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
28
28
|
import type { IsometricTile, IsometricUnit, IsometricFeature } from '../organisms/types/isometric';
|
|
29
29
|
import type { ResolvedFrame } from '../organisms/types/spriteAnimation';
|
|
30
30
|
import type { UiError } from '../../core/atoms/types';
|
|
@@ -84,7 +84,7 @@ export interface IsometricCanvasProps {
|
|
|
84
84
|
/** Show debug grid lines and coordinates */
|
|
85
85
|
debug?: boolean;
|
|
86
86
|
/** Background image URL tiled behind the isometric grid */
|
|
87
|
-
backgroundImage?:
|
|
87
|
+
backgroundImage?: AssetUrl;
|
|
88
88
|
/** Toggle minimap overlay */
|
|
89
89
|
showMinimap?: boolean;
|
|
90
90
|
/** Enable camera pan/zoom controls */
|
|
@@ -107,14 +107,14 @@ export interface IsometricCanvasProps {
|
|
|
107
107
|
/** Resolve animated sprite sheet frame for a unit */
|
|
108
108
|
resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
|
|
109
109
|
/** Additional sprite URLs to preload (e.g., effect sprites) */
|
|
110
|
-
effectSpriteUrls?:
|
|
110
|
+
effectSpriteUrls?: AssetUrl[];
|
|
111
111
|
/** Callback to draw canvas effects after units (canvas-specific: cannot be declarative) */
|
|
112
112
|
onDrawEffects?: (ctx: CanvasRenderingContext2D, animTime: number, getImage: (url: string) => HTMLImageElement | undefined) => void;
|
|
113
113
|
/** Whether there are active effects — keeps RAF loop alive */
|
|
114
114
|
hasActiveEffects?: boolean;
|
|
115
115
|
/** Base URL for remote asset resolution. When set, manifest paths
|
|
116
116
|
* are prefixed with this URL. Example: "https://trait-wars-assets.web.app" */
|
|
117
|
-
assetBaseUrl?:
|
|
117
|
+
assetBaseUrl?: AssetUrl;
|
|
118
118
|
/** Manifest mapping entity keys to relative sprite paths.
|
|
119
119
|
* Combined with assetBaseUrl to produce full URLs.
|
|
120
120
|
* Used as a fallback when inline URLs and callbacks don't resolve. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EventEmit } from '@almadar/core';
|
|
1
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
2
2
|
export interface PlatformerPlatform {
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
@@ -32,13 +32,13 @@ export interface PlatformerCanvasProps {
|
|
|
32
32
|
/** Background color */
|
|
33
33
|
bgColor?: string;
|
|
34
34
|
/** Player sprite image URL */
|
|
35
|
-
playerSprite?:
|
|
35
|
+
playerSprite?: AssetUrl;
|
|
36
36
|
/** Map of platform type to tile sprite URL */
|
|
37
|
-
tileSprites?: Record<string,
|
|
37
|
+
tileSprites?: Record<string, AssetUrl>;
|
|
38
38
|
/** Background image URL */
|
|
39
|
-
backgroundImage?:
|
|
39
|
+
backgroundImage?: AssetUrl;
|
|
40
40
|
/** Base URL prefix for asset URLs */
|
|
41
|
-
assetBaseUrl?:
|
|
41
|
+
assetBaseUrl?: AssetUrl;
|
|
42
42
|
/** Event names for keyboard controls */
|
|
43
43
|
leftEvent?: EventEmit<{
|
|
44
44
|
direction: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { IconInput } from '../../core/atoms';
|
|
2
2
|
export interface ActivePowerup {
|
|
3
3
|
/** Unique powerup ID */
|
|
4
4
|
id: string;
|
|
5
5
|
/** Icon component or emoji */
|
|
6
|
-
icon?:
|
|
6
|
+
icon?: IconInput;
|
|
7
7
|
/** Powerup label */
|
|
8
8
|
label: string;
|
|
9
9
|
/** Remaining time in seconds */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { IconInput } from '../../core/atoms';
|
|
2
2
|
export interface ResourceBarResource {
|
|
3
3
|
/** Icon for the resource */
|
|
4
|
-
icon?:
|
|
4
|
+
icon?: IconInput;
|
|
5
5
|
/** Resource name */
|
|
6
6
|
label: string;
|
|
7
7
|
/** Current amount */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type IconInput } from '../../core/atoms/Icon';
|
|
2
2
|
/**
|
|
3
3
|
* StatBadge — game stat display molecule (distinct from core Badge atom).
|
|
4
4
|
* Badge shows a text label/status token. StatBadge shows a numeric value
|
|
@@ -19,7 +19,7 @@ export interface StatBadgeProps {
|
|
|
19
19
|
/** Display format */
|
|
20
20
|
format?: 'number' | 'hearts' | 'bar' | 'text' | string;
|
|
21
21
|
/** Icon component or emoji */
|
|
22
|
-
icon?:
|
|
22
|
+
icon?: IconInput;
|
|
23
23
|
/** Size variant */
|
|
24
24
|
size?: 'sm' | 'md' | 'lg' | string;
|
|
25
25
|
/** Visual variant */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { IconInput } from '../../core/atoms';
|
|
2
2
|
export interface TurnPanelAction {
|
|
3
3
|
/** Action button label */
|
|
4
4
|
label: string;
|
|
5
5
|
/** Icon for the button */
|
|
6
|
-
icon?:
|
|
6
|
+
icon?: IconInput;
|
|
7
7
|
/** Event name to emit when clicked */
|
|
8
8
|
event?: string;
|
|
9
9
|
/** Whether the action is disabled */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { IconInput } from '../../core/atoms';
|
|
2
2
|
export interface UnitCommand {
|
|
3
3
|
/** Command label */
|
|
4
4
|
label: string;
|
|
5
5
|
/** Icon for the command button */
|
|
6
|
-
icon?:
|
|
6
|
+
icon?: IconInput;
|
|
7
7
|
/** Event name to emit when clicked */
|
|
8
8
|
event?: string;
|
|
9
9
|
/** Whether the command is disabled */
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* @packageDocumentation
|
|
19
19
|
*/
|
|
20
20
|
import React from 'react';
|
|
21
|
-
import type { EventEmit, EntityRow } from '@almadar/core';
|
|
21
|
+
import type { AssetUrl, EventEmit, EntityRow } from '@almadar/core';
|
|
22
22
|
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
23
23
|
import type { ResolvedFrame } from './types/spriteAnimation';
|
|
24
24
|
/** Battle phases an encounter walks through (UI value enum — not entity data). */
|
|
@@ -75,7 +75,7 @@ export interface BattleBoardProps extends DisplayStateProps {
|
|
|
75
75
|
calculateDamage?: (attacker: EntityRow, target: EntityRow) => number;
|
|
76
76
|
onDrawEffects?: (ctx: CanvasRenderingContext2D, timestamp: number) => void;
|
|
77
77
|
hasActiveEffects?: boolean;
|
|
78
|
-
effectSpriteUrls?:
|
|
78
|
+
effectSpriteUrls?: AssetUrl[];
|
|
79
79
|
resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
|
|
80
80
|
/** Emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
81
81
|
tileClickEvent?: EventEmit<{
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @packageDocumentation
|
|
25
25
|
*/
|
|
26
26
|
import * as React from 'react';
|
|
27
|
-
import type { EventEmit } from '@almadar/core';
|
|
27
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
28
28
|
import type { CombatActionType, EffectAssetManifest } from './types/effects';
|
|
29
29
|
import type { UiError } from '../../core/atoms/types';
|
|
30
30
|
export type { CombatActionType } from './types/effects';
|
|
@@ -52,9 +52,9 @@ export interface CanvasEffectProps {
|
|
|
52
52
|
error?: UiError | null;
|
|
53
53
|
/** Sprite URL for the effect (emoji fallback mode).
|
|
54
54
|
* When set without assetManifest, renders this image instead of emoji. */
|
|
55
|
-
effectSpriteUrl?:
|
|
55
|
+
effectSpriteUrl?: AssetUrl;
|
|
56
56
|
/** Base URL for remote assets. Prepended to relative effectSpriteUrl paths. */
|
|
57
|
-
assetBaseUrl?:
|
|
57
|
+
assetBaseUrl?: AssetUrl;
|
|
58
58
|
/** Full effect asset manifest for the sprite particle engine.
|
|
59
59
|
* When provided, enables the canvas-based particle system. */
|
|
60
60
|
assetManifest?: EffectAssetManifest;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* @packageDocumentation
|
|
19
19
|
*/
|
|
20
20
|
import React from 'react';
|
|
21
|
-
import type { EventEmit } from '@almadar/core';
|
|
21
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
22
22
|
import { type TraitStateMachineDefinition } from './TraitStateViewer';
|
|
23
23
|
import type { UiError } from '../../core/atoms/types';
|
|
24
24
|
/** Data shape for a slot's equipped item */
|
|
@@ -30,7 +30,7 @@ export type SlotItemData = {
|
|
|
30
30
|
/** Emoji or text icon */
|
|
31
31
|
iconEmoji?: string;
|
|
32
32
|
/** Image URL icon (takes precedence over iconEmoji) */
|
|
33
|
-
iconUrl?:
|
|
33
|
+
iconUrl?: AssetUrl;
|
|
34
34
|
/** Optional state machine for tooltip display */
|
|
35
35
|
stateMachine?: TraitStateMachineDefinition;
|
|
36
36
|
};
|
|
@@ -59,7 +59,7 @@ export interface TraitSlotProps {
|
|
|
59
59
|
border: string;
|
|
60
60
|
}>;
|
|
61
61
|
/** Optional tooltip frame image URL */
|
|
62
|
-
tooltipFrameUrl?:
|
|
62
|
+
tooltipFrameUrl?: AssetUrl;
|
|
63
63
|
/** Additional CSS classes */
|
|
64
64
|
className?: string;
|
|
65
65
|
/** Loading state */
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* @packageDocumentation
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
|
-
import type { EventEmit, EntityRow } from '@almadar/core';
|
|
22
|
+
import type { AssetUrl, EventEmit, EntityRow } from '@almadar/core';
|
|
23
23
|
import type { ResolvedFrame } from './types/spriteAnimation';
|
|
24
24
|
import type { UiError } from '../../core/atoms/types';
|
|
25
25
|
/** Context exposed to render-prop slots. Hex / hero rows are `EntityRow`. */
|
|
@@ -125,7 +125,7 @@ export interface WorldMapBoardProps {
|
|
|
125
125
|
diamondTopY?: number;
|
|
126
126
|
/** Disable pan/zoom camera (default: true). Set false for fixed maps where overlay labels need stable positions. */
|
|
127
127
|
enableCamera?: boolean;
|
|
128
|
-
effectSpriteUrls?:
|
|
128
|
+
effectSpriteUrls?: AssetUrl[];
|
|
129
129
|
resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
|
|
130
130
|
}
|
|
131
131
|
export declare function WorldMapBoard({ entity, isLoading, scale, unitScale, allowMoveAllHeroes, isInRange, heroSelectEvent, heroMoveEvent, battleEncounterEvent, featureEnterEvent, tileClickEvent, header, sidePanel, overlay, footer, onHeroSelect, onHeroMove, onBattleEncounter, onFeatureEnter, diamondTopY, enableCamera, effectSpriteUrls, resolveUnitFrame, className, }: WorldMapBoardProps): React.JSX.Element;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
|
|
10
10
|
*/
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import type { EventEmit, EntityRow } from '@almadar/core';
|
|
12
|
+
import type { AssetUrl, EventEmit, EntityRow } from '@almadar/core';
|
|
13
13
|
import type { DisplayStateProps } from '../../../../core/organisms/types';
|
|
14
14
|
/** A draggable build component (UI value DTO read off the entity). */
|
|
15
15
|
export interface BuilderComponent {
|
|
@@ -18,7 +18,7 @@ export interface BuilderComponent {
|
|
|
18
18
|
description?: string;
|
|
19
19
|
iconEmoji?: string;
|
|
20
20
|
/** Image URL icon (takes precedence over iconEmoji) */
|
|
21
|
-
iconUrl?:
|
|
21
|
+
iconUrl?: AssetUrl;
|
|
22
22
|
category?: string;
|
|
23
23
|
}
|
|
24
24
|
/** A blueprint slot accepting a component (UI value DTO read off the entity). */
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Events emitted via completeEvent (default UI:PUZZLE_COMPLETE).
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import type { EventEmit, EntityRow } from '@almadar/core';
|
|
13
|
+
import type { AssetUrl, EventEmit, EntityRow } from '@almadar/core';
|
|
14
14
|
import type { DisplayStateProps } from '../../../../core/organisms/types';
|
|
15
15
|
/** A sortable item (UI value DTO read off the entity). */
|
|
16
16
|
export interface ClassifierItem {
|
|
@@ -19,7 +19,7 @@ export interface ClassifierItem {
|
|
|
19
19
|
description?: string;
|
|
20
20
|
correctCategory: string;
|
|
21
21
|
/** Image URL icon for story-specific visual skin */
|
|
22
|
-
iconUrl?:
|
|
22
|
+
iconUrl?: AssetUrl;
|
|
23
23
|
}
|
|
24
24
|
/** A category bucket (UI value DTO read off the entity). */
|
|
25
25
|
export interface ClassifierCategory {
|
|
@@ -27,7 +27,7 @@ export interface ClassifierCategory {
|
|
|
27
27
|
label: string;
|
|
28
28
|
color?: string;
|
|
29
29
|
/** Image URL for story-specific category header */
|
|
30
|
-
imageUrl?:
|
|
30
|
+
imageUrl?: AssetUrl;
|
|
31
31
|
}
|
|
32
32
|
export interface ClassifierBoardProps extends DisplayStateProps {
|
|
33
33
|
/** Puzzle board-state entity (single row or array). The board reads
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AssetUrl } from '@almadar/core';
|
|
1
2
|
/**
|
|
2
3
|
* Canvas Effect Types
|
|
3
4
|
*
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
*/
|
|
12
13
|
export interface CanvasParticle {
|
|
13
14
|
/** Sprite URL (white-on-transparent particle) */
|
|
14
|
-
spriteUrl:
|
|
15
|
+
spriteUrl: AssetUrl;
|
|
15
16
|
/** Current position in screen pixels */
|
|
16
17
|
x: number;
|
|
17
18
|
y: number;
|
|
@@ -50,7 +51,7 @@ export interface CanvasParticle {
|
|
|
50
51
|
*/
|
|
51
52
|
export interface ParticleEmitterConfig {
|
|
52
53
|
/** Array of sprite URLs to randomly pick from */
|
|
53
|
-
spriteUrls:
|
|
54
|
+
spriteUrls: AssetUrl[];
|
|
54
55
|
/** Number of particles to spawn */
|
|
55
56
|
count: number;
|
|
56
57
|
/** Spawn origin in screen pixels */
|
|
@@ -95,7 +96,7 @@ export interface ParticleEmitterConfig {
|
|
|
95
96
|
*/
|
|
96
97
|
export interface CanvasSequence {
|
|
97
98
|
/** Ordered array of frame sprite URLs */
|
|
98
|
-
frameUrls:
|
|
99
|
+
frameUrls: AssetUrl[];
|
|
99
100
|
/** Position in screen pixels (top-left of sprite) */
|
|
100
101
|
x: number;
|
|
101
102
|
y: number;
|
|
@@ -122,7 +123,7 @@ export interface CanvasSequence {
|
|
|
122
123
|
* Configuration for spawning a frame sequence.
|
|
123
124
|
*/
|
|
124
125
|
export interface SequenceConfig {
|
|
125
|
-
frameUrls:
|
|
126
|
+
frameUrls: AssetUrl[];
|
|
126
127
|
originX: number;
|
|
127
128
|
originY: number;
|
|
128
129
|
frameDuration: number;
|
|
@@ -141,7 +142,7 @@ export interface SequenceConfig {
|
|
|
141
142
|
*/
|
|
142
143
|
export interface CanvasOverlay {
|
|
143
144
|
/** Sprite URL */
|
|
144
|
-
spriteUrl:
|
|
145
|
+
spriteUrl: AssetUrl;
|
|
145
146
|
/** Center position in screen pixels */
|
|
146
147
|
x: number;
|
|
147
148
|
y: number;
|
|
@@ -166,7 +167,7 @@ export interface CanvasOverlay {
|
|
|
166
167
|
* Configuration for spawning an overlay.
|
|
167
168
|
*/
|
|
168
169
|
export interface OverlayConfig {
|
|
169
|
-
spriteUrl:
|
|
170
|
+
spriteUrl: AssetUrl;
|
|
170
171
|
originX: number;
|
|
171
172
|
originY: number;
|
|
172
173
|
alpha?: number;
|
|
@@ -216,7 +217,7 @@ export interface CombatPreset {
|
|
|
216
217
|
*/
|
|
217
218
|
export interface EffectAssetManifest {
|
|
218
219
|
/** Base URL for all asset paths */
|
|
219
|
-
baseUrl:
|
|
220
|
+
baseUrl: AssetUrl;
|
|
220
221
|
/** Particle sprite groups (white-on-transparent, tinted at runtime) */
|
|
221
222
|
particles?: {
|
|
222
223
|
slash?: string[];
|