@almadar/ui 5.16.2 → 5.17.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 +10 -0
- package/dist/avl/index.js +10 -0
- package/dist/components/atoms/game/MiniMap.d.ts +15 -17
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/atoms/types.d.ts +40 -0
- package/dist/components/index.cjs +10 -0
- package/dist/components/index.js +10 -0
- package/dist/components/molecules/CTABanner.d.ts +3 -8
- package/dist/components/molecules/CalendarGrid.d.ts +2 -2
- package/dist/components/molecules/CommunityLinks.d.ts +15 -12
- package/dist/components/molecules/DataGrid.d.ts +2 -1
- package/dist/components/molecules/DataList.d.ts +12 -11
- package/dist/components/molecules/GraphView.d.ts +2 -2
- package/dist/components/molecules/HeroSection.d.ts +4 -12
- package/dist/components/molecules/MapView.d.ts +2 -2
- package/dist/components/molecules/MarketingFooter.d.ts +6 -5
- package/dist/components/molecules/Meter.d.ts +2 -1
- package/dist/components/molecules/PricingCard.d.ts +2 -4
- package/dist/components/molecules/QrScanner.d.ts +2 -2
- package/dist/components/molecules/RepeatableFormSection.d.ts +2 -2
- package/dist/components/molecules/ShowcaseCard.d.ts +2 -4
- package/dist/components/molecules/SplitSection.d.ts +2 -4
- package/dist/components/molecules/StatDisplay.d.ts +2 -1
- package/dist/components/molecules/StatsGrid.d.ts +5 -4
- package/dist/components/molecules/TableView.d.ts +2 -1
- package/dist/components/molecules/game/CraftingRecipe.d.ts +9 -5
- package/dist/components/molecules/game/HealthPanel.d.ts +6 -5
- package/dist/components/molecules/game/IsometricCanvas.d.ts +9 -13
- package/dist/components/organisms/Chart.d.ts +12 -3
- package/dist/components/organisms/CodeViewer.d.ts +8 -6
- package/dist/components/organisms/ConfirmDialog.d.ts +2 -1
- package/dist/components/organisms/DataTable.d.ts +5 -4
- package/dist/components/organisms/DetailPanel.d.ts +5 -4
- package/dist/components/organisms/DocumentViewer.d.ts +9 -7
- package/dist/components/organisms/DrawerSlot.d.ts +2 -1
- package/dist/components/organisms/Form.d.ts +2 -1
- package/dist/components/organisms/GraphCanvas.d.ts +2 -1
- package/dist/components/organisms/Header.d.ts +17 -14
- package/dist/components/organisms/JazariStateMachine.d.ts +2 -1
- package/dist/components/organisms/List.d.ts +2 -2
- package/dist/components/organisms/Meter.d.ts +2 -1
- package/dist/components/organisms/ModalSlot.d.ts +2 -1
- package/dist/components/organisms/Navigation.d.ts +2 -1
- package/dist/components/organisms/OrbitalVisualization.d.ts +2 -1
- package/dist/components/organisms/PageHeader.d.ts +7 -5
- package/dist/components/organisms/Section.d.ts +2 -1
- package/dist/components/organisms/Sidebar.d.ts +2 -1
- package/dist/components/organisms/SignaturePad.d.ts +2 -1
- package/dist/components/organisms/Split.d.ts +2 -1
- package/dist/components/organisms/StateMachineView.d.ts +2 -1
- package/dist/components/organisms/Timeline.d.ts +2 -1
- package/dist/components/organisms/ToastSlot.d.ts +2 -1
- package/dist/components/organisms/UISlotRenderer.d.ts +4 -3
- package/dist/components/organisms/WizardContainer.d.ts +2 -1
- package/dist/components/organisms/game/BattleBoard.d.ts +4 -4
- package/dist/components/organisms/game/CanvasEffect.d.ts +2 -1
- package/dist/components/organisms/game/CastleBoard.d.ts +2 -2
- package/dist/components/organisms/game/GameAudioProvider.d.ts +2 -1
- package/dist/components/organisms/game/GameAudioToggle.d.ts +2 -1
- package/dist/components/organisms/game/TraitSlot.d.ts +4 -3
- package/dist/components/organisms/game/TraitStateViewer.d.ts +2 -1
- package/dist/components/organisms/game/WorldMapBoard.d.ts +6 -5
- package/dist/components/organisms/game/physics-sim/SimulationControls.d.ts +8 -7
- package/dist/components/organisms/game/puzzles/event-handler/RuleEditor.d.ts +7 -9
- package/dist/components/organisms/game/puzzles/state-architect/StateNode.d.ts +2 -4
- package/dist/components/organisms/game/puzzles/state-architect/TransitionArrow.d.ts +3 -8
- package/dist/components/organisms/game/types/isometric.d.ts +4 -4
- package/dist/components/organisms/index.d.ts +1 -1
- package/dist/components/organisms/types.d.ts +3 -1
- package/dist/components/templates/DashboardLayout.d.ts +6 -5
- package/dist/components/templates/GameTemplate.d.ts +7 -6
- package/dist/marketing/index.d.cts +48 -53
- package/dist/providers/index.cjs +10 -0
- package/dist/providers/index.js +10 -0
- package/dist/runtime/index.cjs +10 -0
- package/dist/runtime/index.js +10 -0
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -56560,6 +56560,16 @@ function SlotContentRenderer({
|
|
|
56560
56560
|
);
|
|
56561
56561
|
}
|
|
56562
56562
|
}
|
|
56563
|
+
if (propsSchema) {
|
|
56564
|
+
for (const [propKey, propDef] of Object.entries(propsSchema)) {
|
|
56565
|
+
const v = renderedProps[propKey];
|
|
56566
|
+
if ((typeof v === "string" || typeof v === "number") && propDef.types?.some(
|
|
56567
|
+
(t) => t === "date" || t === "datetime" || t === "timestamp"
|
|
56568
|
+
)) {
|
|
56569
|
+
renderedProps[propKey] = new Date(v);
|
|
56570
|
+
}
|
|
56571
|
+
}
|
|
56572
|
+
}
|
|
56563
56573
|
const finalProps = renderedProps;
|
|
56564
56574
|
const resolvedItems = Array.isArray(
|
|
56565
56575
|
finalProps.entity
|
package/dist/avl/index.js
CHANGED
|
@@ -56511,6 +56511,16 @@ function SlotContentRenderer({
|
|
|
56511
56511
|
);
|
|
56512
56512
|
}
|
|
56513
56513
|
}
|
|
56514
|
+
if (propsSchema) {
|
|
56515
|
+
for (const [propKey, propDef] of Object.entries(propsSchema)) {
|
|
56516
|
+
const v = renderedProps[propKey];
|
|
56517
|
+
if ((typeof v === "string" || typeof v === "number") && propDef.types?.some(
|
|
56518
|
+
(t) => t === "date" || t === "datetime" || t === "timestamp"
|
|
56519
|
+
)) {
|
|
56520
|
+
renderedProps[propKey] = new Date(v);
|
|
56521
|
+
}
|
|
56522
|
+
}
|
|
56523
|
+
}
|
|
56514
56524
|
const finalProps = renderedProps;
|
|
56515
56525
|
const resolvedItems = Array.isArray(
|
|
56516
56526
|
finalProps.entity
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
import type { Rect } from '../types';
|
|
2
|
+
export interface MiniMapTile {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
color: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MiniMapUnit {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
color: string;
|
|
11
|
+
isPlayer?: boolean;
|
|
12
|
+
}
|
|
1
13
|
export interface MiniMapProps {
|
|
2
14
|
/** Tile data: each tile renders as a 1px dot at (x,y) with the given color */
|
|
3
|
-
tiles?:
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
color: string;
|
|
7
|
-
}[];
|
|
15
|
+
tiles?: MiniMapTile[];
|
|
8
16
|
/** Unit positions: each unit renders as a 2px dot */
|
|
9
|
-
units?:
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
color: string;
|
|
13
|
-
isPlayer?: boolean;
|
|
14
|
-
}[];
|
|
17
|
+
units?: MiniMapUnit[];
|
|
15
18
|
/** Canvas display width in pixels */
|
|
16
19
|
width?: number;
|
|
17
20
|
/** Canvas display height in pixels */
|
|
@@ -21,12 +24,7 @@ export interface MiniMapProps {
|
|
|
21
24
|
/** Logical map height (for coordinate scaling) */
|
|
22
25
|
mapHeight?: number;
|
|
23
26
|
/** Viewport rectangle outline */
|
|
24
|
-
viewportRect?:
|
|
25
|
-
x: number;
|
|
26
|
-
y: number;
|
|
27
|
-
w: number;
|
|
28
|
-
h: number;
|
|
29
|
-
};
|
|
27
|
+
viewportRect?: Rect;
|
|
30
28
|
/** Additional CSS classes */
|
|
31
29
|
className?: string;
|
|
32
30
|
}
|
|
@@ -47,3 +47,4 @@ export { AnimatedReveal, type AnimatedRevealProps, type RevealTrigger, type Reve
|
|
|
47
47
|
export { AnimatedGraphic, type AnimatedGraphicProps, type GraphicAnimation } from "./AnimatedGraphic";
|
|
48
48
|
export { TraitFrame, type TraitFrameProps } from "./TraitFrame";
|
|
49
49
|
export * from "./game";
|
|
50
|
+
export { type UiError, type LinkAction, type ImageSource, type Point, type Rect, } from "./types";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-cutting atom-level prop shapes shared across the design system.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Concrete error-state shape read by display components (`error.message`,
|
|
6
|
+
* occasionally `error.stack`). Structurally assignable from the global `Error`,
|
|
7
|
+
* so existing call sites passing an `Error` keep working — this just gives the
|
|
8
|
+
* pattern extractor a readable field schema instead of the opaque `Error` global.
|
|
9
|
+
*/
|
|
10
|
+
export interface UiError {
|
|
11
|
+
message: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
code?: string;
|
|
14
|
+
stack?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A labelled link/CTA used by marketing molecules (HeroSection, CTABanner,
|
|
18
|
+
* PricingCard) for their primary/secondary call-to-action props.
|
|
19
|
+
*/
|
|
20
|
+
export interface LinkAction {
|
|
21
|
+
label: string;
|
|
22
|
+
href: string;
|
|
23
|
+
}
|
|
24
|
+
/** An image with its required alt text. */
|
|
25
|
+
export interface ImageSource {
|
|
26
|
+
src: string;
|
|
27
|
+
alt: string;
|
|
28
|
+
}
|
|
29
|
+
/** A 2D point in canvas/layout coordinates. */
|
|
30
|
+
export interface Point {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
}
|
|
34
|
+
/** A 2D rectangle in canvas coordinates (`w`/`h` = width/height). */
|
|
35
|
+
export interface Rect {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
w: number;
|
|
39
|
+
h: number;
|
|
40
|
+
}
|
|
@@ -47795,6 +47795,16 @@ function SlotContentRenderer({
|
|
|
47795
47795
|
);
|
|
47796
47796
|
}
|
|
47797
47797
|
}
|
|
47798
|
+
if (propsSchema) {
|
|
47799
|
+
for (const [propKey, propDef] of Object.entries(propsSchema)) {
|
|
47800
|
+
const v = renderedProps[propKey];
|
|
47801
|
+
if ((typeof v === "string" || typeof v === "number") && propDef.types?.some(
|
|
47802
|
+
(t) => t === "date" || t === "datetime" || t === "timestamp"
|
|
47803
|
+
)) {
|
|
47804
|
+
renderedProps[propKey] = new Date(v);
|
|
47805
|
+
}
|
|
47806
|
+
}
|
|
47807
|
+
}
|
|
47798
47808
|
const finalProps = renderedProps;
|
|
47799
47809
|
const resolvedItems = Array.isArray(
|
|
47800
47810
|
finalProps.entity
|
package/dist/components/index.js
CHANGED
|
@@ -47746,6 +47746,16 @@ function SlotContentRenderer({
|
|
|
47746
47746
|
);
|
|
47747
47747
|
}
|
|
47748
47748
|
}
|
|
47749
|
+
if (propsSchema) {
|
|
47750
|
+
for (const [propKey, propDef] of Object.entries(propsSchema)) {
|
|
47751
|
+
const v = renderedProps[propKey];
|
|
47752
|
+
if ((typeof v === "string" || typeof v === "number") && propDef.types?.some(
|
|
47753
|
+
(t) => t === "date" || t === "datetime" || t === "timestamp"
|
|
47754
|
+
)) {
|
|
47755
|
+
renderedProps[propKey] = new Date(v);
|
|
47756
|
+
}
|
|
47757
|
+
}
|
|
47758
|
+
}
|
|
47749
47759
|
const finalProps = renderedProps;
|
|
47750
47760
|
const resolvedItems = Array.isArray(
|
|
47751
47761
|
finalProps.entity
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Uses the site's theme naturally - no forced color inversions.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import type { LinkAction } from '../atoms/types';
|
|
8
9
|
export type CTABannerBackground = 'default' | 'alt' | 'dark' | 'gradient' | 'primary';
|
|
9
10
|
export interface CTABannerProps {
|
|
10
11
|
/** Banner headline */
|
|
@@ -12,15 +13,9 @@ export interface CTABannerProps {
|
|
|
12
13
|
/** Supporting text below the title */
|
|
13
14
|
subtitle?: string;
|
|
14
15
|
/** Primary action button config */
|
|
15
|
-
primaryAction?:
|
|
16
|
-
label: string;
|
|
17
|
-
href: string;
|
|
18
|
-
};
|
|
16
|
+
primaryAction?: LinkAction;
|
|
19
17
|
/** Secondary action button config */
|
|
20
|
-
secondaryAction?:
|
|
21
|
-
label: string;
|
|
22
|
-
href: string;
|
|
23
|
-
};
|
|
18
|
+
secondaryAction?: LinkAction;
|
|
24
19
|
/** Background style */
|
|
25
20
|
background?: CTABannerBackground;
|
|
26
21
|
/** Content alignment */
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import React from "react";
|
|
9
9
|
import type { EventEmit, EventPayload, EntityCollection } from "@almadar/core";
|
|
10
|
-
export
|
|
10
|
+
export type CalendarEvent = {
|
|
11
11
|
id: string;
|
|
12
12
|
title: string;
|
|
13
13
|
startTime: string | Date;
|
|
14
14
|
endTime?: string | Date;
|
|
15
15
|
color?: string;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
/**
|
|
18
18
|
* Number of day columns rendered at once. Matches the responsiveness-
|
|
19
19
|
* audit tiers exactly: 1 day on mobile (≤640), 3 on tablet (641–1024),
|
|
@@ -5,19 +5,22 @@
|
|
|
5
5
|
* Composes VStack, HStack, Typography, Button, and Icon atoms.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
export interface GithubLink {
|
|
9
|
+
url: string;
|
|
10
|
+
stars?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface DiscordLink {
|
|
13
|
+
url: string;
|
|
14
|
+
members?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface TwitterLink {
|
|
17
|
+
url: string;
|
|
18
|
+
followers?: number;
|
|
19
|
+
}
|
|
8
20
|
export interface CommunityLinksProps {
|
|
9
|
-
github?:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
discord?: {
|
|
14
|
-
url: string;
|
|
15
|
-
members?: number;
|
|
16
|
-
};
|
|
17
|
-
twitter?: {
|
|
18
|
-
url: string;
|
|
19
|
-
followers?: number;
|
|
20
|
-
};
|
|
21
|
+
github?: GithubLink;
|
|
22
|
+
discord?: DiscordLink;
|
|
23
|
+
twitter?: TwitterLink;
|
|
21
24
|
heading?: string;
|
|
22
25
|
subtitle?: string;
|
|
23
26
|
className?: string;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import type { EntityRow, EventKey, EntityCollection } from '@almadar/core';
|
|
15
15
|
import { type DataDndProps } from './useDataDnd';
|
|
16
|
+
import type { UiError } from '../atoms/types';
|
|
16
17
|
export interface DataGridField {
|
|
17
18
|
/** Entity field name (dot-notation supported) */
|
|
18
19
|
name: string;
|
|
@@ -87,7 +88,7 @@ export interface DataGridProps<T extends EntityRow = EntityRow> extends DataDndP
|
|
|
87
88
|
/** Loading state */
|
|
88
89
|
isLoading?: boolean;
|
|
89
90
|
/** Error state */
|
|
90
|
-
error?:
|
|
91
|
+
error?: UiError | null;
|
|
91
92
|
/** Entity field name containing an image URL for card thumbnails */
|
|
92
93
|
imageField?: string;
|
|
93
94
|
/** Enable multi-select with checkboxes */
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import type { EntityRow, EntityCollection, EventKey } from "@almadar/core";
|
|
15
15
|
import { type DataDndProps } from './useDataDnd';
|
|
16
|
+
import type { UiError } from '../atoms/types';
|
|
16
17
|
export interface DataListField {
|
|
17
18
|
/** Entity field name (dot-notation supported) */
|
|
18
19
|
name: string;
|
|
@@ -36,6 +37,14 @@ export interface DataListItemAction {
|
|
|
36
37
|
/** Button variant */
|
|
37
38
|
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
38
39
|
}
|
|
40
|
+
export interface DataListSwipeAction {
|
|
41
|
+
/** Button label */
|
|
42
|
+
label: string;
|
|
43
|
+
/** Lucide icon name */
|
|
44
|
+
icon?: string;
|
|
45
|
+
/** Button variant */
|
|
46
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
47
|
+
}
|
|
39
48
|
export interface DataListProps<T extends EntityRow = EntityRow> extends DataDndProps {
|
|
40
49
|
/**
|
|
41
50
|
* Schema entity data — single record or collection, typed against
|
|
@@ -76,7 +85,7 @@ export interface DataListProps<T extends EntityRow = EntityRow> extends DataDndP
|
|
|
76
85
|
/** Loading state */
|
|
77
86
|
isLoading?: boolean;
|
|
78
87
|
/** Error state */
|
|
79
|
-
error?:
|
|
88
|
+
error?: UiError | null;
|
|
80
89
|
/** Enable drag-to-reorder with grip handles */
|
|
81
90
|
reorderable?: boolean;
|
|
82
91
|
/** Event emitted on reorder: UI:{reorderEvent} with { fromIndex, toIndex } */
|
|
@@ -84,19 +93,11 @@ export interface DataListProps<T extends EntityRow = EntityRow> extends DataDndP
|
|
|
84
93
|
/** Event emitted on left swipe: UI:{swipeLeftEvent} with { row } */
|
|
85
94
|
swipeLeftEvent?: EventKey;
|
|
86
95
|
/** Actions revealed on left swipe */
|
|
87
|
-
swipeLeftActions?: readonly
|
|
88
|
-
label: string;
|
|
89
|
-
icon?: string;
|
|
90
|
-
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
91
|
-
}[];
|
|
96
|
+
swipeLeftActions?: readonly DataListSwipeAction[];
|
|
92
97
|
/** Event emitted on right swipe: UI:{swipeRightEvent} with { row } */
|
|
93
98
|
swipeRightEvent?: EventKey;
|
|
94
99
|
/** Actions revealed on right swipe */
|
|
95
|
-
swipeRightActions?: readonly
|
|
96
|
-
label: string;
|
|
97
|
-
icon?: string;
|
|
98
|
-
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
99
|
-
}[];
|
|
100
|
+
swipeRightActions?: readonly DataListSwipeAction[];
|
|
100
101
|
/** Event emitted on long press: UI:{longPressEvent} with { row } */
|
|
101
102
|
longPressEvent?: EventKey;
|
|
102
103
|
/** Enable infinite scroll loading */
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
* to lay out nodes, then renders via SVG circles and lines.
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
|
-
export
|
|
11
|
+
export type GraphViewNode = {
|
|
12
12
|
id: string;
|
|
13
13
|
label?: string;
|
|
14
14
|
color?: string;
|
|
15
15
|
size?: number;
|
|
16
16
|
group?: string;
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
export interface GraphViewEdge {
|
|
19
19
|
source: string;
|
|
20
20
|
target: string;
|
|
@@ -6,25 +6,17 @@
|
|
|
6
6
|
* Optionally includes an InstallBox molecule for CLI commands.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import type { LinkAction, ImageSource } from '../atoms/types';
|
|
9
10
|
export interface HeroSectionProps {
|
|
10
11
|
tag?: string;
|
|
11
12
|
tagVariant?: 'primary' | 'secondary' | 'accent';
|
|
12
13
|
title: string;
|
|
13
14
|
titleAccent?: string;
|
|
14
15
|
subtitle: string;
|
|
15
|
-
primaryAction?:
|
|
16
|
-
|
|
17
|
-
href: string;
|
|
18
|
-
};
|
|
19
|
-
secondaryAction?: {
|
|
20
|
-
label: string;
|
|
21
|
-
href: string;
|
|
22
|
-
};
|
|
16
|
+
primaryAction?: LinkAction;
|
|
17
|
+
secondaryAction?: LinkAction;
|
|
23
18
|
installCommand?: string;
|
|
24
|
-
image?:
|
|
25
|
-
src: string;
|
|
26
|
-
alt: string;
|
|
27
|
-
};
|
|
19
|
+
image?: ImageSource;
|
|
28
20
|
imagePosition?: 'below' | 'right' | 'background';
|
|
29
21
|
background?: 'dark' | 'gradient' | 'subtle';
|
|
30
22
|
align?: 'center' | 'left';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EventEmit } from '@almadar/core';
|
|
2
|
-
export
|
|
2
|
+
export type MapMarkerData = {
|
|
3
3
|
/** Unique marker identifier */
|
|
4
4
|
id: string | number;
|
|
5
5
|
/** Latitude */
|
|
@@ -10,7 +10,7 @@ export interface MapMarkerData {
|
|
|
10
10
|
label?: string;
|
|
11
11
|
/** Optional category for styling */
|
|
12
12
|
category?: string;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
export interface MapRouteWaypoint {
|
|
15
15
|
lat: number;
|
|
16
16
|
lng: number;
|
|
@@ -14,14 +14,15 @@ export interface FooterLinkColumn {
|
|
|
14
14
|
title: string;
|
|
15
15
|
items: FooterLinkItem[];
|
|
16
16
|
}
|
|
17
|
+
export interface FooterLogo {
|
|
18
|
+
src: string;
|
|
19
|
+
alt: string;
|
|
20
|
+
href?: string;
|
|
21
|
+
}
|
|
17
22
|
export interface MarketingFooterProps {
|
|
18
23
|
columns: FooterLinkColumn[];
|
|
19
24
|
copyright?: string;
|
|
20
|
-
logo?:
|
|
21
|
-
src: string;
|
|
22
|
-
alt: string;
|
|
23
|
-
href?: string;
|
|
24
|
-
};
|
|
25
|
+
logo?: FooterLogo;
|
|
25
26
|
className?: string;
|
|
26
27
|
}
|
|
27
28
|
export declare const MarketingFooter: React.FC<MarketingFooterProps>;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Pure molecule: no entity prop, no data fetching.
|
|
7
7
|
*/
|
|
8
8
|
import React from "react";
|
|
9
|
+
import type { UiError } from '../atoms/types';
|
|
9
10
|
export type MeterVariant = "linear" | "radial" | "segmented";
|
|
10
11
|
export interface MeterThreshold {
|
|
11
12
|
value: number;
|
|
@@ -44,7 +45,7 @@ export interface MeterProps {
|
|
|
44
45
|
/** Loading state */
|
|
45
46
|
isLoading?: boolean;
|
|
46
47
|
/** Error state */
|
|
47
|
-
error?:
|
|
48
|
+
error?: UiError | null;
|
|
48
49
|
/** Additional CSS classes */
|
|
49
50
|
className?: string;
|
|
50
51
|
}
|
|
@@ -5,15 +5,13 @@
|
|
|
5
5
|
* Composes atoms: Card, VStack, HStack, Badge, Typography, Icon, Divider, Spacer, Button.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import type { LinkAction } from '../atoms/types';
|
|
8
9
|
export interface PricingCardProps {
|
|
9
10
|
name: string;
|
|
10
11
|
price: string;
|
|
11
12
|
description?: string;
|
|
12
13
|
features: string[];
|
|
13
|
-
action:
|
|
14
|
-
label: string;
|
|
15
|
-
href: string;
|
|
16
|
-
};
|
|
14
|
+
action: LinkAction;
|
|
17
15
|
highlighted?: boolean;
|
|
18
16
|
badge?: string;
|
|
19
17
|
className?: string;
|
|
@@ -5,11 +5,11 @@ import type { EventEmit, EventPayload } from "@almadar/core";
|
|
|
5
5
|
* `EventPayloadValue` map) so the result is directly assignable to a
|
|
6
6
|
* render-ui dispatched event payload without re-shaping.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type QrScanResult = EventPayload & {
|
|
9
9
|
text: string;
|
|
10
10
|
format: string;
|
|
11
11
|
timestamp: number;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
export interface QrScannerProps {
|
|
14
14
|
onScan?: (result: QrScanResult) => void;
|
|
15
15
|
scanEvent?: EventEmit<QrScanResult>;
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
* - Emits: UI:SECTION_REMOVED { sectionType, index, itemId }
|
|
12
12
|
*/
|
|
13
13
|
import React from "react";
|
|
14
|
-
export
|
|
14
|
+
export type RepeatableItem = {
|
|
15
15
|
id: string;
|
|
16
16
|
/** State in which this item was added (for audit trails) */
|
|
17
17
|
addedInState?: string;
|
|
18
18
|
/** Timestamp when item was added */
|
|
19
19
|
addedAt?: string;
|
|
20
20
|
[key: string]: unknown;
|
|
21
|
-
}
|
|
21
|
+
};
|
|
22
22
|
export interface RepeatableFormSectionProps {
|
|
23
23
|
/** Section type identifier */
|
|
24
24
|
sectionType: string;
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
* Composes Card, Box, VStack, Badge, and Typography atoms.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import type { ImageSource } from '../atoms/types';
|
|
8
9
|
export interface ShowcaseCardProps {
|
|
9
10
|
title: string;
|
|
10
11
|
description?: string;
|
|
11
|
-
image:
|
|
12
|
-
src: string;
|
|
13
|
-
alt: string;
|
|
14
|
-
};
|
|
12
|
+
image: ImageSource;
|
|
15
13
|
href?: string;
|
|
16
14
|
badge?: string;
|
|
17
15
|
accentColor?: string;
|
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
* Composes Box, HStack, VStack, Typography, and Icon atoms.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import type { ImageSource } from '../atoms/types';
|
|
8
9
|
export interface SplitSectionProps {
|
|
9
10
|
title: string;
|
|
10
11
|
description: string | React.ReactNode;
|
|
11
12
|
bullets?: string[];
|
|
12
|
-
image?:
|
|
13
|
-
src: string;
|
|
14
|
-
alt: string;
|
|
15
|
-
};
|
|
13
|
+
image?: ImageSource;
|
|
16
14
|
imagePosition?: 'left' | 'right';
|
|
17
15
|
background?: 'default' | 'alt';
|
|
18
16
|
children?: React.ReactNode;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* No entity prop, no data fetching, no hooks beyond icon resolution.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import type { UiError } from '../atoms/types';
|
|
9
10
|
export type StatDisplayLook = 'elevated' | 'flat' | 'progress-backed' | 'gauge' | 'sparkline';
|
|
10
11
|
export interface StatDisplayProps {
|
|
11
12
|
/** Display label (e.g., "Total", "Remaining") */
|
|
@@ -51,6 +52,6 @@ export interface StatDisplayProps {
|
|
|
51
52
|
/** Loading state */
|
|
52
53
|
isLoading?: boolean;
|
|
53
54
|
/** Error state */
|
|
54
|
-
error?:
|
|
55
|
+
error?: UiError | null;
|
|
55
56
|
}
|
|
56
57
|
export declare const StatDisplay: React.FC<StatDisplayProps>;
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
* Uses StatDisplay internally when available for consistent styling.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
+
export interface StatItem {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
9
13
|
export interface StatsGridProps {
|
|
10
|
-
stats:
|
|
11
|
-
value: string;
|
|
12
|
-
label: string;
|
|
13
|
-
}[];
|
|
14
|
+
stats: StatItem[];
|
|
14
15
|
columns?: 2 | 3 | 4 | 6;
|
|
15
16
|
className?: string;
|
|
16
17
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import type { EntityRow, EventKey, EntityCollection } from '@almadar/core';
|
|
16
16
|
import { type DataDndProps } from './useDataDnd';
|
|
17
|
+
import type { UiError } from '../atoms/types';
|
|
17
18
|
export interface TableViewColumn {
|
|
18
19
|
/** Stable column key (React key + default value lookup). */
|
|
19
20
|
key: string;
|
|
@@ -80,7 +81,7 @@ export interface TableViewProps<T extends EntityRow = EntityRow> extends DataDnd
|
|
|
80
81
|
/** Loading state. */
|
|
81
82
|
isLoading?: boolean;
|
|
82
83
|
/** Error state. */
|
|
83
|
-
error?:
|
|
84
|
+
error?: UiError | null;
|
|
84
85
|
/** Group rows under section headers by a field value. */
|
|
85
86
|
groupBy?: string;
|
|
86
87
|
/** Max rows before a "Show More" button. Defaults to 0 (show all). */
|
|
@@ -10,15 +10,19 @@ export interface CraftingIngredient {
|
|
|
10
10
|
/** Number currently available */
|
|
11
11
|
available: number;
|
|
12
12
|
}
|
|
13
|
+
export interface CraftingOutput {
|
|
14
|
+
/** Icon component or emoji */
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
/** Output item label */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Rarity tier */
|
|
19
|
+
rarity?: string;
|
|
20
|
+
}
|
|
13
21
|
export interface CraftingRecipeProps {
|
|
14
22
|
/** Input ingredients for the recipe */
|
|
15
23
|
inputs: CraftingIngredient[];
|
|
16
24
|
/** Output item produced by the recipe */
|
|
17
|
-
output:
|
|
18
|
-
icon?: React.ReactNode;
|
|
19
|
-
label: string;
|
|
20
|
-
rarity?: string;
|
|
21
|
-
};
|
|
25
|
+
output: CraftingOutput;
|
|
22
26
|
/** Whether the player has enough ingredients to craft */
|
|
23
27
|
canCraft?: boolean;
|
|
24
28
|
/** Callback when the craft button is clicked */
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
export interface HealthEffect {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
label?: string;
|
|
5
|
+
variant?: 'buff' | 'debuff' | 'neutral';
|
|
6
|
+
}
|
|
2
7
|
export interface HealthPanelProps {
|
|
3
8
|
/** Current health value */
|
|
4
9
|
current: number;
|
|
@@ -9,11 +14,7 @@ export interface HealthPanelProps {
|
|
|
9
14
|
/** Label shown above the bar */
|
|
10
15
|
label?: string;
|
|
11
16
|
/** Active status effects displayed as small badges */
|
|
12
|
-
effects?:
|
|
13
|
-
icon: React.ReactNode;
|
|
14
|
-
label?: string;
|
|
15
|
-
variant?: 'buff' | 'debuff' | 'neutral';
|
|
16
|
-
}[];
|
|
17
|
+
effects?: HealthEffect[];
|
|
17
18
|
/** Whether to display numeric HP values */
|
|
18
19
|
showNumbers?: boolean;
|
|
19
20
|
/** Size variant */
|
|
@@ -27,19 +27,24 @@ import * as React from 'react';
|
|
|
27
27
|
import type { EventEmit } from '@almadar/core';
|
|
28
28
|
import type { IsometricTile, IsometricUnit, IsometricFeature } from '../../organisms/game/types/isometric';
|
|
29
29
|
import type { ResolvedFrame } from '../../organisms/game/types/spriteAnimation';
|
|
30
|
+
import type { UiError } from '../../atoms/types';
|
|
30
31
|
/** Event Contract:
|
|
31
32
|
* Emits: UI:TILE_CLICK
|
|
32
33
|
* Emits: UI:UNIT_CLICK
|
|
33
34
|
* Emits: UI:TILE_HOVER
|
|
34
35
|
* Emits: UI:TILE_LEAVE
|
|
35
36
|
*/
|
|
37
|
+
export interface TileCoord {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
}
|
|
36
41
|
export interface IsometricCanvasProps {
|
|
37
42
|
/** Additional CSS classes */
|
|
38
43
|
className?: string;
|
|
39
44
|
/** Loading state indicator */
|
|
40
45
|
isLoading?: boolean;
|
|
41
46
|
/** Error state */
|
|
42
|
-
error?:
|
|
47
|
+
error?: UiError | null;
|
|
43
48
|
/** Array of tiles to render */
|
|
44
49
|
tiles?: IsometricTile[];
|
|
45
50
|
/** Array of units on the board */
|
|
@@ -49,20 +54,11 @@ export interface IsometricCanvasProps {
|
|
|
49
54
|
/** Currently selected unit ID */
|
|
50
55
|
selectedUnitId?: string | null;
|
|
51
56
|
/** Valid move positions (shown as pulsing green highlights) */
|
|
52
|
-
validMoves?:
|
|
53
|
-
x: number;
|
|
54
|
-
y: number;
|
|
55
|
-
}>;
|
|
57
|
+
validMoves?: TileCoord[];
|
|
56
58
|
/** Attack target positions (shown as pulsing red highlights) */
|
|
57
|
-
attackTargets?:
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
}>;
|
|
59
|
+
attackTargets?: TileCoord[];
|
|
61
60
|
/** Hovered tile position */
|
|
62
|
-
hoveredTile?:
|
|
63
|
-
x: number;
|
|
64
|
-
y: number;
|
|
65
|
-
} | null;
|
|
61
|
+
hoveredTile?: TileCoord | null;
|
|
66
62
|
onTileClick?: (x: number, y: number) => void;
|
|
67
63
|
onUnitClick?: (unitId: string) => void;
|
|
68
64
|
onTileHover?: (x: number, y: number) => void;
|