@almadar/ui 5.16.4 → 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 +2 -1
- 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
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* alignment is deliberately deferred).
|
|
16
16
|
*/
|
|
17
17
|
import React from "react";
|
|
18
|
+
import type { UiError } from '../atoms/types';
|
|
18
19
|
export type ChartType = "bar" | "line" | "pie" | "area" | "donut" | "scatter" | "histogram";
|
|
19
20
|
/**
|
|
20
21
|
* Layer 2 visual treatment for the chart pattern — drives the chart
|
|
@@ -100,7 +101,7 @@ export interface ChartProps {
|
|
|
100
101
|
/** Loading state */
|
|
101
102
|
isLoading?: boolean;
|
|
102
103
|
/** Error state */
|
|
103
|
-
error?:
|
|
104
|
+
error?: UiError | null;
|
|
104
105
|
/** Additional CSS classes */
|
|
105
106
|
className?: string;
|
|
106
107
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* - className for external styling
|
|
13
13
|
*/
|
|
14
14
|
import React from "react";
|
|
15
|
+
import type { UiError } from '../atoms/types';
|
|
15
16
|
export type CodeViewerMode = "code" | "diff";
|
|
16
17
|
export interface DiffLine {
|
|
17
18
|
type: "add" | "remove" | "context";
|
|
@@ -24,6 +25,11 @@ export interface CodeViewerAction {
|
|
|
24
25
|
navigatesTo?: string;
|
|
25
26
|
variant?: "primary" | "secondary" | "ghost";
|
|
26
27
|
}
|
|
28
|
+
export interface CodeViewerFile {
|
|
29
|
+
label: string;
|
|
30
|
+
code: string;
|
|
31
|
+
language?: string;
|
|
32
|
+
}
|
|
27
33
|
export interface CodeViewerProps {
|
|
28
34
|
/** Viewer title */
|
|
29
35
|
title?: string;
|
|
@@ -48,11 +54,7 @@ export interface CodeViewerProps {
|
|
|
48
54
|
/** Max height before scrolling */
|
|
49
55
|
maxHeight?: number | string;
|
|
50
56
|
/** Multiple files (tabbed view) */
|
|
51
|
-
files?: readonly
|
|
52
|
-
label: string;
|
|
53
|
-
code: string;
|
|
54
|
-
language?: string;
|
|
55
|
-
}[];
|
|
57
|
+
files?: readonly CodeViewerFile[];
|
|
56
58
|
/** Actions */
|
|
57
59
|
actions?: readonly CodeViewerAction[];
|
|
58
60
|
/** Entity name for schema-driven auto-fetch */
|
|
@@ -60,7 +62,7 @@ export interface CodeViewerProps {
|
|
|
60
62
|
/** Loading state */
|
|
61
63
|
isLoading?: boolean;
|
|
62
64
|
/** Error state */
|
|
63
|
-
error?:
|
|
65
|
+
error?: UiError | null;
|
|
64
66
|
/** Additional CSS classes */
|
|
65
67
|
className?: string;
|
|
66
68
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { type ModalSize } from "../molecules/Modal";
|
|
11
|
+
import type { UiError } from '../atoms/types';
|
|
11
12
|
export type ConfirmDialogVariant = "danger" | "warning" | "info" | "default";
|
|
12
13
|
export interface ConfirmDialogProps {
|
|
13
14
|
/** Whether the dialog is open (defaults to true when rendered by slot wrapper) */
|
|
@@ -37,7 +38,7 @@ export interface ConfirmDialogProps {
|
|
|
37
38
|
/** Loading state for confirm button */
|
|
38
39
|
isLoading?: boolean;
|
|
39
40
|
/** Error state */
|
|
40
|
-
error?:
|
|
41
|
+
error?: UiError | null;
|
|
41
42
|
/** Entity name for schema-driven auto-fetch */
|
|
42
43
|
entity?: string;
|
|
43
44
|
/** Additional CSS classes */
|
|
@@ -23,6 +23,10 @@ export interface RowAction<T> {
|
|
|
23
23
|
show?: (row: T) => boolean;
|
|
24
24
|
event?: string;
|
|
25
25
|
}
|
|
26
|
+
export interface DataTableEmptyAction {
|
|
27
|
+
label: string;
|
|
28
|
+
event?: string;
|
|
29
|
+
}
|
|
26
30
|
export interface DataTableProps<T extends EntityRow & {
|
|
27
31
|
id: string | number;
|
|
28
32
|
}> extends EntityDisplayProps<T> {
|
|
@@ -44,10 +48,7 @@ export interface DataTableProps<T extends EntityRow & {
|
|
|
44
48
|
emptyIcon?: LucideIcon;
|
|
45
49
|
emptyTitle?: string;
|
|
46
50
|
emptyDescription?: string;
|
|
47
|
-
emptyAction?:
|
|
48
|
-
label: string;
|
|
49
|
-
event?: string;
|
|
50
|
-
};
|
|
51
|
+
emptyAction?: DataTableEmptyAction;
|
|
51
52
|
selectable?: boolean;
|
|
52
53
|
searchable?: boolean;
|
|
53
54
|
searchPlaceholder?: string;
|
|
@@ -44,15 +44,16 @@ export type FieldDef = string | {
|
|
|
44
44
|
name: string;
|
|
45
45
|
type: string;
|
|
46
46
|
};
|
|
47
|
+
export interface DetailPanelStatus {
|
|
48
|
+
label: string;
|
|
49
|
+
variant?: "default" | "success" | "warning" | "danger" | "info";
|
|
50
|
+
}
|
|
47
51
|
export interface DetailPanelProps extends EntityDisplayProps {
|
|
48
52
|
/** RECORD-cardinality override: renders ONE record (see body collapse below). */
|
|
49
53
|
entity?: EntityRecord<EntityRow>;
|
|
50
54
|
title?: string;
|
|
51
55
|
subtitle?: string;
|
|
52
|
-
status?:
|
|
53
|
-
label: string;
|
|
54
|
-
variant?: "default" | "success" | "warning" | "danger" | "info";
|
|
55
|
-
};
|
|
56
|
+
status?: DetailPanelStatus;
|
|
56
57
|
avatar?: React.ReactNode;
|
|
57
58
|
sections?: readonly DetailSection[];
|
|
58
59
|
/** Unified actions array - first action with variant='primary' is the main action */
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* - className for external styling
|
|
12
12
|
*/
|
|
13
13
|
import React from "react";
|
|
14
|
+
import type { UiError } from '../atoms/types';
|
|
14
15
|
export type DocumentType = "pdf" | "text" | "html" | "markdown";
|
|
15
16
|
export interface DocumentAction {
|
|
16
17
|
label: string;
|
|
@@ -18,6 +19,12 @@ export interface DocumentAction {
|
|
|
18
19
|
navigatesTo?: string;
|
|
19
20
|
variant?: "primary" | "secondary" | "ghost";
|
|
20
21
|
}
|
|
22
|
+
export interface DocumentItem {
|
|
23
|
+
label: string;
|
|
24
|
+
src?: string;
|
|
25
|
+
content?: string;
|
|
26
|
+
documentType?: DocumentType;
|
|
27
|
+
}
|
|
21
28
|
export interface DocumentViewerProps {
|
|
22
29
|
/** Document title */
|
|
23
30
|
title?: string;
|
|
@@ -42,18 +49,13 @@ export interface DocumentViewerProps {
|
|
|
42
49
|
/** Actions */
|
|
43
50
|
actions?: readonly DocumentAction[];
|
|
44
51
|
/** Multiple documents (tabbed view) */
|
|
45
|
-
documents?: readonly
|
|
46
|
-
label: string;
|
|
47
|
-
src?: string;
|
|
48
|
-
content?: string;
|
|
49
|
-
documentType?: DocumentType;
|
|
50
|
-
}[];
|
|
52
|
+
documents?: readonly DocumentItem[];
|
|
51
53
|
/** Entity name for schema-driven auto-fetch */
|
|
52
54
|
entity?: string;
|
|
53
55
|
/** Loading state */
|
|
54
56
|
isLoading?: boolean;
|
|
55
57
|
/** Error state */
|
|
56
|
-
error?:
|
|
58
|
+
error?: UiError | null;
|
|
57
59
|
/** Additional CSS classes */
|
|
58
60
|
className?: string;
|
|
59
61
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { DrawerPosition, DrawerSize } from '../molecules/Drawer';
|
|
15
|
+
import type { UiError } from '../atoms/types';
|
|
15
16
|
export interface DrawerSlotProps {
|
|
16
17
|
/** Content to display in the drawer */
|
|
17
18
|
children?: React.ReactNode;
|
|
@@ -26,7 +27,7 @@ export interface DrawerSlotProps {
|
|
|
26
27
|
/** Loading state */
|
|
27
28
|
isLoading?: boolean;
|
|
28
29
|
/** Error state */
|
|
29
|
-
error?:
|
|
30
|
+
error?: UiError | null;
|
|
30
31
|
/** Entity name for schema-driven auto-fetch */
|
|
31
32
|
entity?: string;
|
|
32
33
|
}
|
|
@@ -17,6 +17,7 @@ import { type SelectOption } from "../atoms/Select";
|
|
|
17
17
|
import { type RelationOption } from "../molecules/RelationSelect";
|
|
18
18
|
import type { OrbitalEntity } from "@almadar/core";
|
|
19
19
|
import { type SExpr } from "@almadar/evaluator";
|
|
20
|
+
import type { UiError } from '../atoms/types';
|
|
20
21
|
/**
|
|
21
22
|
* S-Expression type for conditional logic (re-export from @almadar/evaluator)
|
|
22
23
|
*/
|
|
@@ -169,7 +170,7 @@ export interface FormProps extends Omit<React.FormHTMLAttributes<HTMLFormElement
|
|
|
169
170
|
/** Loading state */
|
|
170
171
|
isLoading?: boolean;
|
|
171
172
|
/** Error state */
|
|
172
|
-
error?:
|
|
173
|
+
error?: UiError | null;
|
|
173
174
|
/** Submit button label */
|
|
174
175
|
submitLabel?: string;
|
|
175
176
|
/** Cancel button label (if provided, shows cancel button) */
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import React from "react";
|
|
14
14
|
import type { EventEmit, EventPayload } from "@almadar/core";
|
|
15
|
+
import type { UiError } from '../atoms/types';
|
|
15
16
|
export type GraphNode = EventPayload & {
|
|
16
17
|
id: string;
|
|
17
18
|
label?: string;
|
|
@@ -65,7 +66,7 @@ export interface GraphCanvasProps {
|
|
|
65
66
|
/** Loading state */
|
|
66
67
|
isLoading?: boolean;
|
|
67
68
|
/** Error state */
|
|
68
|
-
error?:
|
|
69
|
+
error?: UiError | null;
|
|
69
70
|
/** Additional CSS classes */
|
|
70
71
|
className?: string;
|
|
71
72
|
}
|
|
@@ -6,7 +6,21 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
8
8
|
import type { LucideIcon } from "lucide-react";
|
|
9
|
+
import type { UiError } from '../atoms/types';
|
|
9
10
|
export type HeaderLook = "hero" | "compact-bar" | "breadcrumb" | "contextual" | "editorial-banner";
|
|
11
|
+
export interface HeaderNavigationItem {
|
|
12
|
+
label: string;
|
|
13
|
+
href?: string;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
icon?: LucideIcon;
|
|
16
|
+
badge?: string | number;
|
|
17
|
+
active?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface HeaderUserAvatar {
|
|
20
|
+
src?: string;
|
|
21
|
+
alt?: string;
|
|
22
|
+
initials?: string;
|
|
23
|
+
}
|
|
10
24
|
export interface HeaderProps {
|
|
11
25
|
/**
|
|
12
26
|
* Logo/Brand content
|
|
@@ -23,14 +37,7 @@ export interface HeaderProps {
|
|
|
23
37
|
/**
|
|
24
38
|
* Navigation items (for desktop header variant)
|
|
25
39
|
*/
|
|
26
|
-
navigationItems?:
|
|
27
|
-
label: string;
|
|
28
|
-
href?: string;
|
|
29
|
-
onClick?: () => void;
|
|
30
|
-
icon?: LucideIcon;
|
|
31
|
-
badge?: string | number;
|
|
32
|
-
active?: boolean;
|
|
33
|
-
}>;
|
|
40
|
+
navigationItems?: HeaderNavigationItem[];
|
|
34
41
|
/**
|
|
35
42
|
* Show menu toggle button
|
|
36
43
|
* @default true
|
|
@@ -60,11 +67,7 @@ export interface HeaderProps {
|
|
|
60
67
|
/**
|
|
61
68
|
* User avatar configuration
|
|
62
69
|
*/
|
|
63
|
-
userAvatar?:
|
|
64
|
-
src?: string;
|
|
65
|
-
alt?: string;
|
|
66
|
-
initials?: string;
|
|
67
|
-
};
|
|
70
|
+
userAvatar?: HeaderUserAvatar;
|
|
68
71
|
/**
|
|
69
72
|
* User name (display name or email)
|
|
70
73
|
*/
|
|
@@ -104,7 +107,7 @@ export interface HeaderProps {
|
|
|
104
107
|
/**
|
|
105
108
|
* Error state (closed circuit)
|
|
106
109
|
*/
|
|
107
|
-
error?:
|
|
110
|
+
error?: UiError | null;
|
|
108
111
|
/**
|
|
109
112
|
* Entity name for schema-driven auto-fetch (closed circuit)
|
|
110
113
|
*/
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import type { OrbitalSchema, Trait as CoreTrait } from '@almadar/core';
|
|
12
|
+
import type { UiError } from '../atoms/types';
|
|
12
13
|
type SmTrait = CoreTrait;
|
|
13
14
|
type SmSchema = OrbitalSchema;
|
|
14
15
|
export interface JazariStateMachineProps {
|
|
@@ -17,7 +18,7 @@ export interface JazariStateMachineProps {
|
|
|
17
18
|
/** Loading state indicator */
|
|
18
19
|
isLoading?: boolean;
|
|
19
20
|
/** Error state */
|
|
20
|
-
error?:
|
|
21
|
+
error?: UiError | null;
|
|
21
22
|
/** Full schema — extracts first trait's state machine */
|
|
22
23
|
schema?: SmSchema;
|
|
23
24
|
/** Or pass a single trait directly */
|
|
@@ -21,7 +21,7 @@ import type { EventKey } from "@almadar/core";
|
|
|
21
21
|
import type { LucideIcon } from "lucide-react";
|
|
22
22
|
import { type MenuItem } from "../molecules/Menu";
|
|
23
23
|
import type { EntityDisplayProps } from "./types";
|
|
24
|
-
export
|
|
24
|
+
export type ListItem = {
|
|
25
25
|
id: string;
|
|
26
26
|
title?: string;
|
|
27
27
|
description?: string;
|
|
@@ -38,7 +38,7 @@ export interface ListItem {
|
|
|
38
38
|
completed?: boolean;
|
|
39
39
|
[key: string]: unknown;
|
|
40
40
|
_fields?: Record<string, unknown>;
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
export interface SchemaItemAction {
|
|
43
43
|
label: string;
|
|
44
44
|
/** Event to dispatch on click */
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* - className for external styling
|
|
12
12
|
*/
|
|
13
13
|
import React from "react";
|
|
14
|
+
import type { UiError } from '../atoms/types';
|
|
14
15
|
export type MeterVariant = "linear" | "radial" | "segmented";
|
|
15
16
|
export interface MeterThreshold {
|
|
16
17
|
value: number;
|
|
@@ -51,7 +52,7 @@ export interface MeterProps {
|
|
|
51
52
|
/** Loading state */
|
|
52
53
|
isLoading?: boolean;
|
|
53
54
|
/** Error state */
|
|
54
|
-
error?:
|
|
55
|
+
error?: UiError | null;
|
|
55
56
|
/** Additional CSS classes */
|
|
56
57
|
className?: string;
|
|
57
58
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* - Extracts title from Form components
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
+
import type { UiError } from '../atoms/types';
|
|
13
14
|
export interface ModalSlotProps {
|
|
14
15
|
/** Content to display in the modal */
|
|
15
16
|
children?: React.ReactNode;
|
|
@@ -22,7 +23,7 @@ export interface ModalSlotProps {
|
|
|
22
23
|
/** Loading state indicator */
|
|
23
24
|
isLoading?: boolean;
|
|
24
25
|
/** Error state */
|
|
25
|
-
error?:
|
|
26
|
+
error?: UiError | null;
|
|
26
27
|
/** Entity name for schema-driven auto-fetch */
|
|
27
28
|
entity?: string;
|
|
28
29
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import type { LucideIcon } from 'lucide-react';
|
|
9
|
+
import type { UiError } from '../atoms/types';
|
|
9
10
|
export interface NavigationItem {
|
|
10
11
|
/**
|
|
11
12
|
* Item ID
|
|
@@ -61,7 +62,7 @@ export interface NavigationProps {
|
|
|
61
62
|
/** Loading state indicator */
|
|
62
63
|
isLoading?: boolean;
|
|
63
64
|
/** Error state */
|
|
64
|
-
error?:
|
|
65
|
+
error?: UiError | null;
|
|
65
66
|
/** Entity name for schema-driven auto-fetch */
|
|
66
67
|
entity?: string;
|
|
67
68
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* - 4f (61+): Multi-lobe - Violet
|
|
15
15
|
*/
|
|
16
16
|
import React from "react";
|
|
17
|
+
import type { UiError } from '../atoms/types';
|
|
17
18
|
export interface OrbitalVisualizationProps {
|
|
18
19
|
/** Full KFlow schema object */
|
|
19
20
|
schema?: {
|
|
@@ -40,7 +41,7 @@ export interface OrbitalVisualizationProps {
|
|
|
40
41
|
/** Loading state indicator */
|
|
41
42
|
isLoading?: boolean;
|
|
42
43
|
/** Error state */
|
|
43
|
-
error?:
|
|
44
|
+
error?: UiError | null;
|
|
44
45
|
/** Entity name for schema-driven auto-fetch */
|
|
45
46
|
entity?: string;
|
|
46
47
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { EventEmit } from "@almadar/core";
|
|
3
3
|
import { LucideIcon } from "lucide-react";
|
|
4
|
+
import type { UiError } from '../atoms/types';
|
|
4
5
|
export interface PageBreadcrumb {
|
|
5
6
|
label: string;
|
|
6
7
|
href?: string;
|
|
@@ -21,6 +22,10 @@ export interface SchemaAction {
|
|
|
21
22
|
loading?: boolean;
|
|
22
23
|
disabled?: boolean;
|
|
23
24
|
}
|
|
25
|
+
export interface PageHeaderStatus {
|
|
26
|
+
label: string;
|
|
27
|
+
variant?: "default" | "success" | "warning" | "danger" | "info";
|
|
28
|
+
}
|
|
24
29
|
export interface PageHeaderProps {
|
|
25
30
|
/** Page title - accepts unknown to handle generated code accessing dynamic entity data */
|
|
26
31
|
title?: string | number | unknown;
|
|
@@ -33,16 +38,13 @@ export interface PageHeaderProps {
|
|
|
33
38
|
/** Breadcrumbs */
|
|
34
39
|
breadcrumbs?: readonly PageBreadcrumb[];
|
|
35
40
|
/** Status badge */
|
|
36
|
-
status?:
|
|
37
|
-
label: string;
|
|
38
|
-
variant?: "default" | "success" | "warning" | "danger" | "info";
|
|
39
|
-
};
|
|
41
|
+
status?: PageHeaderStatus;
|
|
40
42
|
/** Actions array - first action with variant='primary' (or first action) is the main action */
|
|
41
43
|
actions?: readonly Readonly<SchemaAction>[];
|
|
42
44
|
/** Loading state indicator */
|
|
43
45
|
isLoading?: boolean;
|
|
44
46
|
/** Error state */
|
|
45
|
-
error?:
|
|
47
|
+
error?: UiError | null;
|
|
46
48
|
/** Entity name for schema-driven auto-fetch */
|
|
47
49
|
entity?: string;
|
|
48
50
|
/** Tabs for sub-navigation */
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Perfect for grouping related content with consistent spacing.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import type { UiError } from '../atoms/types';
|
|
8
9
|
export type SectionPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
10
|
export type SectionVariant = 'default' | 'card' | 'bordered' | 'filled';
|
|
10
11
|
export interface SectionProps {
|
|
@@ -33,7 +34,7 @@ export interface SectionProps {
|
|
|
33
34
|
/** Loading state indicator */
|
|
34
35
|
isLoading?: boolean;
|
|
35
36
|
/** Error state */
|
|
36
|
-
error?:
|
|
37
|
+
error?: UiError | null;
|
|
37
38
|
/** Entity name for schema-driven auto-fetch */
|
|
38
39
|
entity?: string;
|
|
39
40
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import type { EventEmit } from '@almadar/core';
|
|
14
14
|
import type { LucideIcon } from 'lucide-react';
|
|
15
|
+
import type { UiError } from '../atoms/types';
|
|
15
16
|
export interface SidebarItem {
|
|
16
17
|
/** Item ID */
|
|
17
18
|
id: string;
|
|
@@ -38,7 +39,7 @@ export interface SidebarProps {
|
|
|
38
39
|
/** Loading state indicator */
|
|
39
40
|
isLoading?: boolean;
|
|
40
41
|
/** Error state */
|
|
41
|
-
error?:
|
|
42
|
+
error?: UiError | null;
|
|
42
43
|
/** Logo/Brand content - can be a ReactNode or logo config */
|
|
43
44
|
logo?: React.ReactNode;
|
|
44
45
|
/** Logo image source */
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import React from "react";
|
|
14
14
|
import type { EventEmit } from "@almadar/core";
|
|
15
|
+
import type { UiError } from '../atoms/types';
|
|
15
16
|
export interface SignaturePadProps {
|
|
16
17
|
/** Label above the pad */
|
|
17
18
|
label?: string;
|
|
@@ -40,7 +41,7 @@ export interface SignaturePadProps {
|
|
|
40
41
|
/** Loading state */
|
|
41
42
|
isLoading?: boolean;
|
|
42
43
|
/** Error state */
|
|
43
|
-
error?:
|
|
44
|
+
error?: UiError | null;
|
|
44
45
|
/** Additional CSS classes */
|
|
45
46
|
className?: string;
|
|
46
47
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Perfect for sidebar/content layouts or side-by-side comparisons.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import type { UiError } from '../atoms/types';
|
|
8
9
|
export type SplitRatio = '1:1' | '1:2' | '2:1' | '1:3' | '3:1' | '1:4' | '4:1' | '2:3' | '3:2';
|
|
9
10
|
export type SplitGap = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
10
11
|
export interface SplitProps {
|
|
@@ -31,7 +32,7 @@ export interface SplitProps {
|
|
|
31
32
|
/** Loading state indicator */
|
|
32
33
|
isLoading?: boolean;
|
|
33
34
|
/** Error state */
|
|
34
|
-
error?:
|
|
35
|
+
error?: UiError | null;
|
|
35
36
|
/** Entity name for schema-driven auto-fetch */
|
|
36
37
|
entity?: string;
|
|
37
38
|
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import type { DomLayoutData, DomStateNode, DomTransitionLabel, VisualizerConfig } from '../../lib/visualizer/index.js';
|
|
19
|
+
import type { UiError } from '../atoms/types';
|
|
19
20
|
/** Bundled transitions between same from→to states */
|
|
20
21
|
export interface TransitionBundle {
|
|
21
22
|
id: string;
|
|
@@ -31,7 +32,7 @@ export interface StateMachineViewProps {
|
|
|
31
32
|
/** Loading state indicator */
|
|
32
33
|
isLoading?: boolean;
|
|
33
34
|
/** Error state */
|
|
34
|
-
error?:
|
|
35
|
+
error?: UiError | null;
|
|
35
36
|
layoutData: DomLayoutData;
|
|
36
37
|
/** Custom state node renderer — when provided, replaces the default circle nodes */
|
|
37
38
|
renderStateNode?: (state: DomStateNode, config: VisualizerConfig) => React.ReactNode;
|
|
@@ -14,6 +14,7 @@ import React from "react";
|
|
|
14
14
|
import type { EventKey } from "@almadar/core";
|
|
15
15
|
import type { EntityCollection, EntityRow } from "@almadar/core";
|
|
16
16
|
import type { LucideIcon } from "lucide-react";
|
|
17
|
+
import type { UiError } from '../atoms/types';
|
|
17
18
|
export type TimelineItemStatus = "complete" | "active" | "pending" | "error";
|
|
18
19
|
/**
|
|
19
20
|
* Layer 2 visual treatment for the timeline pattern — orthogonal to the
|
|
@@ -48,7 +49,7 @@ export interface TimelineProps {
|
|
|
48
49
|
/** Loading state indicator */
|
|
49
50
|
isLoading?: boolean;
|
|
50
51
|
/** Error state */
|
|
51
|
-
error?:
|
|
52
|
+
error?: UiError | null;
|
|
52
53
|
/**
|
|
53
54
|
* Schema entity data typed against @almadar/core's EntityRow. Items from
|
|
54
55
|
* `entity` are normalised into `items` when `items` is omitted. UI-specific
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { ToastVariant } from '../molecules/Toast';
|
|
14
|
+
import type { UiError } from '../atoms/types';
|
|
14
15
|
export interface ToastSlotProps {
|
|
15
16
|
/** Content to display in the toast (message or ReactNode) */
|
|
16
17
|
children?: React.ReactNode;
|
|
@@ -25,7 +26,7 @@ export interface ToastSlotProps {
|
|
|
25
26
|
/** Loading state indicator */
|
|
26
27
|
isLoading?: boolean;
|
|
27
28
|
/** Error state */
|
|
28
|
-
error?:
|
|
29
|
+
error?: UiError | null;
|
|
29
30
|
/** Entity name for schema-driven auto-fetch */
|
|
30
31
|
entity?: string;
|
|
31
32
|
}
|
|
@@ -30,6 +30,7 @@ export declare function SuspenseConfigProvider({ config, children, }: {
|
|
|
30
30
|
export declare namespace SuspenseConfigProvider {
|
|
31
31
|
var displayName: string;
|
|
32
32
|
}
|
|
33
|
+
import type { UiError } from '../atoms/types';
|
|
33
34
|
interface UISlotComponentProps {
|
|
34
35
|
slot: UISlot;
|
|
35
36
|
portal?: boolean;
|
|
@@ -37,7 +38,7 @@ interface UISlotComponentProps {
|
|
|
37
38
|
className?: string;
|
|
38
39
|
draggable?: boolean;
|
|
39
40
|
isLoading?: boolean;
|
|
40
|
-
error?:
|
|
41
|
+
error?: UiError | null;
|
|
41
42
|
entity?: string;
|
|
42
43
|
/** Compiled mode: render children directly instead of resolving from context */
|
|
43
44
|
children?: React.ReactNode;
|
|
@@ -57,7 +58,7 @@ interface SlotContentRendererProps {
|
|
|
57
58
|
onDismiss: () => void;
|
|
58
59
|
className?: string;
|
|
59
60
|
isLoading?: boolean;
|
|
60
|
-
error?:
|
|
61
|
+
error?: UiError | null;
|
|
61
62
|
entity?: string;
|
|
62
63
|
/** Schema-compatible path for WYSIWYG drop targeting (e.g., "root.children.0"). */
|
|
63
64
|
patternPath?: string;
|
|
@@ -82,7 +83,7 @@ export interface UISlotRendererProps {
|
|
|
82
83
|
/** Loading state indicator */
|
|
83
84
|
isLoading?: boolean;
|
|
84
85
|
/** Error state */
|
|
85
|
-
error?:
|
|
86
|
+
error?: UiError | null;
|
|
86
87
|
/** Entity name for schema-driven auto-fetch */
|
|
87
88
|
entity?: string;
|
|
88
89
|
/**
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Uses wireframe theme styling (high contrast, sharp edges).
|
|
8
8
|
*/
|
|
9
9
|
import React from "react";
|
|
10
|
+
import type { UiError } from '../atoms/types';
|
|
10
11
|
/** Form field definition for wizard sections */
|
|
11
12
|
export interface WizardField {
|
|
12
13
|
id: string;
|
|
@@ -149,7 +150,7 @@ export interface WizardContainerProps {
|
|
|
149
150
|
/** Loading state indicator */
|
|
150
151
|
isLoading?: boolean;
|
|
151
152
|
/** Error state */
|
|
152
|
-
error?:
|
|
153
|
+
error?: UiError | null;
|
|
153
154
|
/** Entity type name (schema-driven) */
|
|
154
155
|
entity?: string;
|
|
155
156
|
}
|
|
@@ -25,7 +25,7 @@ import type { ResolvedFrame } from './types/spriteAnimation';
|
|
|
25
25
|
/** Battle phases an encounter walks through */
|
|
26
26
|
export type BattlePhase = 'observation' | 'selection' | 'movement' | 'action' | 'enemy_turn' | 'game_over';
|
|
27
27
|
/** A unit participating in battle */
|
|
28
|
-
export
|
|
28
|
+
export type BattleUnit = {
|
|
29
29
|
id: string;
|
|
30
30
|
name: string;
|
|
31
31
|
unitType?: string;
|
|
@@ -54,7 +54,7 @@ export interface BattleUnit {
|
|
|
54
54
|
states: string[];
|
|
55
55
|
cooldown?: number;
|
|
56
56
|
}[];
|
|
57
|
-
}
|
|
57
|
+
};
|
|
58
58
|
/** Minimal tile for map generation */
|
|
59
59
|
export interface BattleTile {
|
|
60
60
|
x: number;
|
|
@@ -100,7 +100,7 @@ export interface BattleEntity {
|
|
|
100
100
|
selectedUnitId: string | null;
|
|
101
101
|
}
|
|
102
102
|
/** Context exposed to render-prop slots */
|
|
103
|
-
export
|
|
103
|
+
export type BattleSlotContext = {
|
|
104
104
|
phase: BattlePhase;
|
|
105
105
|
turn: number;
|
|
106
106
|
selectedUnit: BattleUnit | null;
|
|
@@ -120,7 +120,7 @@ export interface BattleSlotContext {
|
|
|
120
120
|
x: number;
|
|
121
121
|
y: number;
|
|
122
122
|
};
|
|
123
|
-
}
|
|
123
|
+
};
|
|
124
124
|
export interface BattleBoardProps extends Omit<EntityDisplayProps, 'entity'> {
|
|
125
125
|
/** Entity containing all board data */
|
|
126
126
|
entity: BattleEntity;
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
import * as React from 'react';
|
|
27
27
|
import type { EventEmit } from '@almadar/core';
|
|
28
28
|
import type { CombatActionType, EffectAssetManifest } from './types/effects';
|
|
29
|
+
import type { UiError } from '../../atoms/types';
|
|
29
30
|
export type { CombatActionType } from './types/effects';
|
|
30
31
|
export type { EffectAssetManifest } from './types/effects';
|
|
31
32
|
export interface CanvasEffectProps {
|
|
@@ -48,7 +49,7 @@ export interface CanvasEffectProps {
|
|
|
48
49
|
/** Loading state indicator */
|
|
49
50
|
isLoading?: boolean;
|
|
50
51
|
/** Error state */
|
|
51
|
-
error?:
|
|
52
|
+
error?: UiError | null;
|
|
52
53
|
/** Sprite URL for the effect (emoji fallback mode).
|
|
53
54
|
* When set without assetManifest, renders this image instead of emoji. */
|
|
54
55
|
effectSpriteUrl?: string;
|
|
@@ -30,7 +30,7 @@ export interface CastleEntity {
|
|
|
30
30
|
backgroundImage?: string;
|
|
31
31
|
}
|
|
32
32
|
/** Context exposed to render-prop slots */
|
|
33
|
-
export
|
|
33
|
+
export type CastleSlotContext = {
|
|
34
34
|
/** Currently hovered tile coordinates (null when not hovering) */
|
|
35
35
|
hoveredTile: {
|
|
36
36
|
x: number;
|
|
@@ -51,7 +51,7 @@ export interface CastleSlotContext {
|
|
|
51
51
|
};
|
|
52
52
|
/** Canvas scale */
|
|
53
53
|
scale: number;
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
55
|
export interface CastleBoardProps {
|
|
56
56
|
/** Castle entity data */
|
|
57
57
|
entity: CastleEntity;
|