@almadar/ui 2.0.1 → 2.0.3
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/components/index.css +9 -11
- package/dist/components/index.js +3 -3
- package/dist/providers/index.css +9 -11
- package/dist/providers/index.js +2 -2
- package/package.json +2 -2
- package/dist/components/atoms/Avatar.d.ts +0 -58
- package/dist/components/atoms/Badge.d.ts +0 -8
- package/dist/components/atoms/Box.d.ts +0 -57
- package/dist/components/atoms/Button.d.ts +0 -24
- package/dist/components/atoms/Card.d.ts +0 -18
- package/dist/components/atoms/Center.d.ts +0 -33
- package/dist/components/atoms/Checkbox.d.ts +0 -5
- package/dist/components/atoms/ConditionalWrapper.d.ts +0 -68
- package/dist/components/atoms/Divider.d.ts +0 -29
- package/dist/components/atoms/Icon.d.ts +0 -38
- package/dist/components/atoms/Input.d.ts +0 -26
- package/dist/components/atoms/Label.d.ts +0 -5
- package/dist/components/atoms/LawReferenceTooltip.d.ts +0 -48
- package/dist/components/atoms/Overlay.d.ts +0 -16
- package/dist/components/atoms/ProgressBar.d.ts +0 -63
- package/dist/components/atoms/Radio.d.ts +0 -26
- package/dist/components/atoms/Select.d.ts +0 -12
- package/dist/components/atoms/Spacer.d.ts +0 -25
- package/dist/components/atoms/Spinner.d.ts +0 -6
- package/dist/components/atoms/Stack.d.ts +0 -64
- package/dist/components/atoms/Switch.d.ts +0 -12
- package/dist/components/atoms/TextHighlight.d.ts +0 -53
- package/dist/components/atoms/Textarea.d.ts +0 -5
- package/dist/components/atoms/ThemeSelector.d.ts +0 -21
- package/dist/components/atoms/ThemeToggle.d.ts +0 -33
- package/dist/components/atoms/Typography.d.ts +0 -57
- package/dist/components/atoms/game/ControlButton.d.ts +0 -31
- package/dist/components/atoms/game/HealthBar.d.ts +0 -18
- package/dist/components/atoms/game/ScoreDisplay.d.ts +0 -21
- package/dist/components/atoms/game/Sprite.d.ts +0 -63
- package/dist/components/atoms/game/StateIndicator.d.ts +0 -31
- package/dist/components/atoms/game/index.d.ts +0 -12
- package/dist/components/atoms/index.d.ts +0 -27
- package/dist/components/index.d.ts +0 -6
- package/dist/components/molecules/Accordion.d.ts +0 -67
- package/dist/components/molecules/Alert.d.ts +0 -24
- package/dist/components/molecules/Breadcrumb.d.ts +0 -55
- package/dist/components/molecules/ButtonGroup.d.ts +0 -67
- package/dist/components/molecules/Card.d.ts +0 -44
- package/dist/components/molecules/Container.d.ts +0 -30
- package/dist/components/molecules/Drawer.d.ts +0 -46
- package/dist/components/molecules/EmptyState.d.ts +0 -25
- package/dist/components/molecules/ErrorBoundary.d.ts +0 -55
- package/dist/components/molecules/ErrorState.d.ts +0 -13
- package/dist/components/molecules/FilterGroup.d.ts +0 -54
- package/dist/components/molecules/Flex.d.ts +0 -43
- package/dist/components/molecules/FloatingActionButton.d.ts +0 -69
- package/dist/components/molecules/FormField.d.ts +0 -16
- package/dist/components/molecules/FormSectionHeader.d.ts +0 -30
- package/dist/components/molecules/Grid.d.ts +0 -54
- package/dist/components/molecules/InputGroup.d.ts +0 -24
- package/dist/components/molecules/LoadingState.d.ts +0 -7
- package/dist/components/molecules/Menu.d.ts +0 -40
- package/dist/components/molecules/Modal.d.ts +0 -26
- package/dist/components/molecules/Pagination.d.ts +0 -66
- package/dist/components/molecules/Popover.d.ts +0 -39
- package/dist/components/molecules/QuizBlock.d.ts +0 -20
- package/dist/components/molecules/RelationSelect.d.ts +0 -48
- package/dist/components/molecules/RepeatableFormSection.d.ts +0 -58
- package/dist/components/molecules/ScaledDiagram.d.ts +0 -20
- package/dist/components/molecules/SearchInput.d.ts +0 -60
- package/dist/components/molecules/SidePanel.d.ts +0 -47
- package/dist/components/molecules/SimpleGrid.d.ts +0 -27
- package/dist/components/molecules/Skeleton.d.ts +0 -35
- package/dist/components/molecules/Tabs.d.ts +0 -45
- package/dist/components/molecules/Toast.d.ts +0 -35
- package/dist/components/molecules/Tooltip.d.ts +0 -25
- package/dist/components/molecules/ViolationAlert.d.ts +0 -49
- package/dist/components/molecules/WizardNavigation.d.ts +0 -51
- package/dist/components/molecules/WizardProgress.d.ts +0 -42
- package/dist/components/molecules/game/StatBadge.d.ts +0 -27
- package/dist/components/molecules/index.d.ts +0 -38
- package/dist/components/molecules/markdown/CodeBlock.d.ts +0 -25
- package/dist/components/molecules/markdown/MarkdownContent.d.ts +0 -26
- package/dist/components/organisms/CardGrid.d.ts +0 -72
- package/dist/components/organisms/Chart.d.ts +0 -59
- package/dist/components/organisms/CodeViewer.d.ts +0 -67
- package/dist/components/organisms/ComponentPatterns.d.ts +0 -441
- package/dist/components/organisms/ConfirmDialog.d.ts +0 -50
- package/dist/components/organisms/ContentRenderer.d.ts +0 -23
- package/dist/components/organisms/CustomPattern.d.ts +0 -104
- package/dist/components/organisms/DataTable.d.ts +0 -63
- package/dist/components/organisms/DetailPanel.d.ts +0 -71
- package/dist/components/organisms/DocumentViewer.d.ts +0 -60
- package/dist/components/organisms/DrawerSlot.d.ts +0 -39
- package/dist/components/organisms/Form.d.ts +0 -203
- package/dist/components/organisms/FormSection.d.ts +0 -59
- package/dist/components/organisms/GraphCanvas.d.ts +0 -69
- package/dist/components/organisms/Header.d.ts +0 -110
- package/dist/components/organisms/JazariStateMachine.d.ts +0 -60
- package/dist/components/organisms/LayoutPatterns.d.ts +0 -181
- package/dist/components/organisms/List.d.ts +0 -76
- package/dist/components/organisms/MasterDetail.d.ts +0 -43
- package/dist/components/organisms/MediaGallery.d.ts +0 -66
- package/dist/components/organisms/Meter.d.ts +0 -58
- package/dist/components/organisms/ModalSlot.d.ts +0 -35
- package/dist/components/organisms/Navigation.d.ts +0 -68
- package/dist/components/organisms/OrbitalVisualization.d.ts +0 -48
- package/dist/components/organisms/PageHeader.d.ts +0 -59
- package/dist/components/organisms/Section.d.ts +0 -44
- package/dist/components/organisms/Sidebar.d.ts +0 -65
- package/dist/components/organisms/SignaturePad.d.ts +0 -44
- package/dist/components/organisms/Split.d.ts +0 -42
- package/dist/components/organisms/StatCard.d.ts +0 -66
- package/dist/components/organisms/StateMachineView.d.ts +0 -36
- package/dist/components/organisms/Table.d.ts +0 -99
- package/dist/components/organisms/Timeline.d.ts +0 -58
- package/dist/components/organisms/ToastSlot.d.ts +0 -38
- package/dist/components/organisms/UISlotRenderer.d.ts +0 -112
- package/dist/components/organisms/WizardContainer.d.ts +0 -160
- package/dist/components/organisms/book/BookChapterView.d.ts +0 -17
- package/dist/components/organisms/book/BookCoverPage.d.ts +0 -19
- package/dist/components/organisms/book/BookNavBar.d.ts +0 -18
- package/dist/components/organisms/book/BookTableOfContents.d.ts +0 -18
- package/dist/components/organisms/book/BookViewer.d.ts +0 -28
- package/dist/components/organisms/book/index.d.ts +0 -7
- package/dist/components/organisms/book/types.d.ts +0 -77
- package/dist/components/organisms/game/BattleBoard.d.ts +0 -167
- package/dist/components/organisms/game/CanvasEffect.d.ts +0 -68
- package/dist/components/organisms/game/CastleBoard.d.ts +0 -85
- package/dist/components/organisms/game/DialogueBox.d.ts +0 -73
- package/dist/components/organisms/game/GameAudioProvider.d.ts +0 -47
- package/dist/components/organisms/game/GameAudioToggle.d.ts +0 -28
- package/dist/components/organisms/game/GameHud.d.ts +0 -40
- package/dist/components/organisms/game/GameMenu.d.ts +0 -43
- package/dist/components/organisms/game/GameOverScreen.d.ts +0 -56
- package/dist/components/organisms/game/InventoryPanel.d.ts +0 -67
- package/dist/components/organisms/game/IsometricCanvas.d.ts +0 -123
- package/dist/components/organisms/game/TraitSlot.d.ts +0 -86
- package/dist/components/organisms/game/TraitStateViewer.d.ts +0 -53
- package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +0 -26
- package/dist/components/organisms/game/WorldMapBoard.d.ts +0 -147
- package/dist/components/organisms/game/editor/editorUtils.d.ts +0 -109
- package/dist/components/organisms/game/editor/index.d.ts +0 -9
- package/dist/components/organisms/game/hooks/useBattleState.d.ts +0 -35
- package/dist/components/organisms/game/hooks/useCamera.d.ts +0 -41
- package/dist/components/organisms/game/hooks/useGameAudio.d.ts +0 -47
- package/dist/components/organisms/game/hooks/useImageCache.d.ts +0 -16
- package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +0 -45
- package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +0 -43
- package/dist/components/organisms/game/index.d.ts +0 -36
- package/dist/components/organisms/game/managers/PhysicsManager.d.ts +0 -103
- package/dist/components/organisms/game/types/effects.d.ts +0 -253
- package/dist/components/organisms/game/types/isometric.d.ts +0 -109
- package/dist/components/organisms/game/types/spriteAnimation.d.ts +0 -73
- package/dist/components/organisms/game/utils/canvasEffects.d.ts +0 -50
- package/dist/components/organisms/game/utils/combatPresets.d.ts +0 -15
- package/dist/components/organisms/game/utils/isometric.d.ts +0 -61
- package/dist/components/organisms/game/utils/spriteAnimation.d.ts +0 -57
- package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +0 -16
- package/dist/components/organisms/index.d.ts +0 -37
- package/dist/components/organisms/layout/DashboardGrid.d.ts +0 -34
- package/dist/components/organisms/layout/MasterDetail.d.ts +0 -32
- package/dist/components/organisms/layout/SplitPane.d.ts +0 -34
- package/dist/components/organisms/layout/TabbedContainer.d.ts +0 -42
- package/dist/components/organisms/layout/index.d.ts +0 -9
- package/dist/components/organisms/types.d.ts +0 -65
- package/dist/components/templates/AuthLayout.d.ts +0 -14
- package/dist/components/templates/BattleTemplate.d.ts +0 -25
- package/dist/components/templates/CastleTemplate.d.ts +0 -23
- package/dist/components/templates/CounterTemplate.d.ts +0 -44
- package/dist/components/templates/DashboardLayout.d.ts +0 -32
- package/dist/components/templates/GameShell.d.ts +0 -33
- package/dist/components/templates/GameTemplate.d.ts +0 -36
- package/dist/components/templates/GenericAppTemplate.d.ts +0 -30
- package/dist/components/templates/WorldMapTemplate.d.ts +0 -29
- package/dist/components/templates/index.d.ts +0 -10
- package/dist/components/templates/types.d.ts +0 -17
- package/dist/context/DesignThemeContext.d.ts +0 -21
- package/dist/context/ThemeContext.d.ts +0 -104
- package/dist/context/UISlotContext.d.ts +0 -75
- package/dist/context/UserContext.d.ts +0 -111
- package/dist/context/index.d.ts +0 -8
- package/dist/hooks/event-bus-types.d.ts +0 -71
- package/dist/hooks/index.d.ts +0 -25
- package/dist/hooks/useAgentChat.d.ts +0 -104
- package/dist/hooks/useAuthContext.d.ts +0 -25
- package/dist/hooks/useCompile.d.ts +0 -22
- package/dist/hooks/useDeepAgentGeneration.d.ts +0 -46
- package/dist/hooks/useEntities.d.ts +0 -52
- package/dist/hooks/useEntityData.d.ts +0 -155
- package/dist/hooks/useEntityMutations.d.ts +0 -80
- package/dist/hooks/useEventBus.d.ts +0 -96
- package/dist/hooks/useExtensions.d.ts +0 -32
- package/dist/hooks/useFileEditor.d.ts +0 -32
- package/dist/hooks/useFileSystem.d.ts +0 -40
- package/dist/hooks/useGitHub.d.ts +0 -58
- package/dist/hooks/useOrbitalHistory.d.ts +0 -39
- package/dist/hooks/useOrbitalMutations.d.ts +0 -95
- package/dist/hooks/usePreview.d.ts +0 -57
- package/dist/hooks/useQuerySingleton.d.ts +0 -78
- package/dist/hooks/useResolvedEntity.d.ts +0 -32
- package/dist/hooks/useTranslate.d.ts +0 -35
- package/dist/hooks/useUIEvents.d.ts +0 -35
- package/dist/hooks/useUISlots.d.ts +0 -84
- package/dist/hooks/useValidation.d.ts +0 -46
- package/dist/lib/api-client.d.ts +0 -42
- package/dist/lib/cn.d.ts +0 -6
- package/dist/lib/debug.d.ts +0 -43
- package/dist/lib/debugRegistry.d.ts +0 -29
- package/dist/lib/debugUtils.d.ts +0 -27
- package/dist/lib/entityDebug.d.ts +0 -38
- package/dist/lib/getNestedValue.d.ts +0 -33
- package/dist/lib/guardRegistry.d.ts +0 -32
- package/dist/lib/index.d.ts +0 -18
- package/dist/lib/jazari/svg-paths.d.ts +0 -61
- package/dist/lib/parseContentSegments.d.ts +0 -41
- package/dist/lib/tickRegistry.d.ts +0 -40
- package/dist/lib/traitRegistry.d.ts +0 -34
- package/dist/lib/verificationRegistry.d.ts +0 -107
- package/dist/lib/visualizer/index.d.ts +0 -143
- package/dist/locales/index.d.ts +0 -20
- package/dist/providers/EventBusProvider.d.ts +0 -60
- package/dist/providers/FetchedDataProvider.d.ts +0 -105
- package/dist/providers/OfflineModeProvider.d.ts +0 -79
- package/dist/providers/OrbitalProvider.d.ts +0 -101
- package/dist/providers/SelectionProvider.d.ts +0 -81
- package/dist/providers/VerificationProvider.d.ts +0 -63
- package/dist/providers/index.d.ts +0 -17
- package/dist/renderer/client-effect-executor.d.ts +0 -68
- package/dist/renderer/data-resolver.d.ts +0 -68
- package/dist/renderer/index.d.ts +0 -28
- package/dist/renderer/init.d.ts +0 -14
- package/dist/renderer/navigation.d.ts +0 -142
- package/dist/renderer/offline-executor.d.ts +0 -238
- package/dist/renderer/pattern-resolver.d.ts +0 -91
- package/dist/renderer/slot-definitions.d.ts +0 -45
- package/dist/renderer/types.d.ts +0 -160
- package/dist/renderer/useClientEffects.d.ts +0 -88
- package/dist/stores/entityStore.d.ts +0 -99
- package/dist/stores/filtering.d.ts +0 -51
- package/dist/stores/index.d.ts +0 -7
- package/dist/{chunk-RIZ76XRF.js → chunk-X3IKFHFT.js} +1 -1
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DashboardGrid Component
|
|
3
|
-
*
|
|
4
|
-
* Multi-column grid for widgets and stats cards.
|
|
5
|
-
* Supports cell spanning for flexible dashboard layouts.
|
|
6
|
-
*
|
|
7
|
-
* Uses wireframe theme styling (high contrast, sharp edges).
|
|
8
|
-
*/
|
|
9
|
-
import React from "react";
|
|
10
|
-
export interface DashboardGridCell {
|
|
11
|
-
/** Unique cell ID */
|
|
12
|
-
id: string;
|
|
13
|
-
/** Content to render in the cell */
|
|
14
|
-
content: React.ReactNode;
|
|
15
|
-
/** Number of columns this cell spans (1-4) */
|
|
16
|
-
colSpan?: 1 | 2 | 3 | 4;
|
|
17
|
-
/** Number of rows this cell spans (1-2) */
|
|
18
|
-
rowSpan?: 1 | 2;
|
|
19
|
-
}
|
|
20
|
-
export interface DashboardGridProps {
|
|
21
|
-
/** Number of columns */
|
|
22
|
-
columns?: 2 | 3 | 4;
|
|
23
|
-
/** Gap between cells */
|
|
24
|
-
gap?: "sm" | "md" | "lg";
|
|
25
|
-
/** Cell definitions */
|
|
26
|
-
cells: DashboardGridCell[];
|
|
27
|
-
/** Additional CSS classes */
|
|
28
|
-
className?: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* DashboardGrid - Multi-column widget grid
|
|
32
|
-
*/
|
|
33
|
-
export declare const DashboardGrid: React.FC<DashboardGridProps>;
|
|
34
|
-
export default DashboardGrid;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MasterDetail Component
|
|
3
|
-
*
|
|
4
|
-
* Classic master-detail pattern with a list on the left
|
|
5
|
-
* and selected item detail on the right.
|
|
6
|
-
*
|
|
7
|
-
* Uses wireframe theme styling (high contrast, sharp edges).
|
|
8
|
-
*/
|
|
9
|
-
import React from "react";
|
|
10
|
-
export interface MasterDetailProps {
|
|
11
|
-
/** Master panel content (usually a list) */
|
|
12
|
-
master: React.ReactNode;
|
|
13
|
-
/** Detail panel content */
|
|
14
|
-
detail: React.ReactNode;
|
|
15
|
-
/** Content shown when nothing is selected */
|
|
16
|
-
emptyDetail?: React.ReactNode;
|
|
17
|
-
/** Whether an item is currently selected */
|
|
18
|
-
hasSelection?: boolean;
|
|
19
|
-
/** Width of master panel (e.g., '350px', '30%') */
|
|
20
|
-
masterWidth?: string;
|
|
21
|
-
/** Additional CSS classes */
|
|
22
|
-
className?: string;
|
|
23
|
-
/** Class for master pane */
|
|
24
|
-
masterClassName?: string;
|
|
25
|
-
/** Class for detail pane */
|
|
26
|
-
detailClassName?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* MasterDetail - List + detail split layout
|
|
30
|
-
*/
|
|
31
|
-
export declare const MasterDetail: React.FC<MasterDetailProps>;
|
|
32
|
-
export default MasterDetail;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SplitPane Component
|
|
3
|
-
*
|
|
4
|
-
* Two-pane resizable split layout for master-detail views,
|
|
5
|
-
* dual-pane editors, and code + preview layouts.
|
|
6
|
-
*
|
|
7
|
-
* Uses wireframe theme styling (high contrast, sharp edges).
|
|
8
|
-
*/
|
|
9
|
-
import React from "react";
|
|
10
|
-
export interface SplitPaneProps {
|
|
11
|
-
/** Direction of the split */
|
|
12
|
-
direction?: "horizontal" | "vertical";
|
|
13
|
-
/** Initial ratio (0-100, percentage of first pane) */
|
|
14
|
-
ratio?: number;
|
|
15
|
-
/** Minimum size of either pane in pixels */
|
|
16
|
-
minSize?: number;
|
|
17
|
-
/** Allow user resizing */
|
|
18
|
-
resizable?: boolean;
|
|
19
|
-
/** Content for the left/top pane */
|
|
20
|
-
left: React.ReactNode;
|
|
21
|
-
/** Content for the right/bottom pane */
|
|
22
|
-
right: React.ReactNode;
|
|
23
|
-
/** Additional CSS classes */
|
|
24
|
-
className?: string;
|
|
25
|
-
/** Class for left/top pane */
|
|
26
|
-
leftClassName?: string;
|
|
27
|
-
/** Class for right/bottom pane */
|
|
28
|
-
rightClassName?: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* SplitPane - Two-pane resizable layout
|
|
32
|
-
*/
|
|
33
|
-
export declare const SplitPane: React.FC<SplitPaneProps>;
|
|
34
|
-
export default SplitPane;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TabbedContainer Component
|
|
3
|
-
*
|
|
4
|
-
* Tabbed content areas with shared header/context.
|
|
5
|
-
* Wraps the Tabs molecule with layout-specific styling.
|
|
6
|
-
*
|
|
7
|
-
* Uses wireframe theme styling (high contrast, sharp edges).
|
|
8
|
-
*/
|
|
9
|
-
import React from "react";
|
|
10
|
-
export interface TabDefinition {
|
|
11
|
-
/** Tab identifier */
|
|
12
|
-
id: string;
|
|
13
|
-
/** Tab label */
|
|
14
|
-
label: string;
|
|
15
|
-
/** Tab content (optional if using sectionId) */
|
|
16
|
-
content?: React.ReactNode;
|
|
17
|
-
/** Section ID to render (alternative to content) */
|
|
18
|
-
sectionId?: string;
|
|
19
|
-
/** Optional badge/count */
|
|
20
|
-
badge?: string | number;
|
|
21
|
-
/** Disable this tab */
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface TabbedContainerProps {
|
|
25
|
-
/** Tab definitions */
|
|
26
|
-
tabs: TabDefinition[];
|
|
27
|
-
/** Default active tab ID */
|
|
28
|
-
defaultTab?: string;
|
|
29
|
-
/** Controlled active tab */
|
|
30
|
-
activeTab?: string;
|
|
31
|
-
/** Callback when tab changes */
|
|
32
|
-
onTabChange?: (tabId: string) => void;
|
|
33
|
-
/** Tab position */
|
|
34
|
-
position?: "top" | "left";
|
|
35
|
-
/** Additional CSS classes */
|
|
36
|
-
className?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* TabbedContainer - Tabbed content areas
|
|
40
|
-
*/
|
|
41
|
-
export declare const TabbedContainer: React.FC<TabbedContainerProps>;
|
|
42
|
-
export default TabbedContainer;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layout organisms index
|
|
3
|
-
*
|
|
4
|
-
* Export layout pattern components for adaptive UI.
|
|
5
|
-
*/
|
|
6
|
-
export { SplitPane, type SplitPaneProps } from './SplitPane';
|
|
7
|
-
export { MasterDetail, type MasterDetailProps } from './MasterDetail';
|
|
8
|
-
export { DashboardGrid, type DashboardGridProps, type DashboardGridCell } from './DashboardGrid';
|
|
9
|
-
export { TabbedContainer, type TabbedContainerProps, type TabDefinition } from './TabbedContainer';
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared types for entity-display organisms.
|
|
3
|
-
*
|
|
4
|
-
* All entity-display organisms (DataTable, List, Table, CardGrid, DetailPanel)
|
|
5
|
-
* extend EntityDisplayProps to guarantee a uniform prop contract.
|
|
6
|
-
*
|
|
7
|
-
* Exception: Form manages local `formData` state for field input tracking.
|
|
8
|
-
* This is the ONE allowed exception — documented here.
|
|
9
|
-
*/
|
|
10
|
-
export declare const EntityDisplayEvents: {
|
|
11
|
-
readonly SORT: "SORT";
|
|
12
|
-
readonly PAGINATE: "PAGINATE";
|
|
13
|
-
readonly SEARCH: "SEARCH";
|
|
14
|
-
readonly FILTER: "FILTER";
|
|
15
|
-
readonly CLEAR_FILTERS: "CLEAR_FILTERS";
|
|
16
|
-
readonly SELECT: "SELECT";
|
|
17
|
-
readonly DESELECT: "DESELECT";
|
|
18
|
-
};
|
|
19
|
-
export interface SortPayload {
|
|
20
|
-
field: string;
|
|
21
|
-
direction: 'asc' | 'desc';
|
|
22
|
-
}
|
|
23
|
-
export interface PaginatePayload {
|
|
24
|
-
page: number;
|
|
25
|
-
pageSize?: number;
|
|
26
|
-
}
|
|
27
|
-
export interface SearchPayload {
|
|
28
|
-
query: string;
|
|
29
|
-
}
|
|
30
|
-
export interface FilterPayload {
|
|
31
|
-
field: string;
|
|
32
|
-
operator: string;
|
|
33
|
-
value: unknown;
|
|
34
|
-
}
|
|
35
|
-
export interface SelectPayload {
|
|
36
|
-
ids: (string | number)[];
|
|
37
|
-
}
|
|
38
|
-
export interface EntityDisplayProps<T = unknown> {
|
|
39
|
-
/** Entity name for schema-driven integration */
|
|
40
|
-
entity?: string;
|
|
41
|
-
/** Data array provided by the trait via render-ui */
|
|
42
|
-
data?: readonly T[] | T[];
|
|
43
|
-
/** Additional CSS classes */
|
|
44
|
-
className?: string;
|
|
45
|
-
/** Loading state indicator */
|
|
46
|
-
isLoading?: boolean;
|
|
47
|
-
/** Error state */
|
|
48
|
-
error?: Error | null;
|
|
49
|
-
/** Current sort field */
|
|
50
|
-
sortBy?: string;
|
|
51
|
-
/** Current sort direction */
|
|
52
|
-
sortDirection?: 'asc' | 'desc';
|
|
53
|
-
/** Current search query value */
|
|
54
|
-
searchValue?: string;
|
|
55
|
-
/** Current page number (1-indexed) */
|
|
56
|
-
page?: number;
|
|
57
|
-
/** Number of items per page */
|
|
58
|
-
pageSize?: number;
|
|
59
|
-
/** Total number of items (for pagination display) */
|
|
60
|
-
totalCount?: number;
|
|
61
|
-
/** Active filters */
|
|
62
|
-
activeFilters?: Record<string, unknown>;
|
|
63
|
-
/** Currently selected item IDs */
|
|
64
|
-
selectedIds?: readonly (string | number)[];
|
|
65
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface AuthLayoutProps {
|
|
3
|
-
/** App name */
|
|
4
|
-
appName?: string;
|
|
5
|
-
/** Logo component or URL */
|
|
6
|
-
logo?: React.ReactNode;
|
|
7
|
-
/** Background image URL */
|
|
8
|
-
backgroundImage?: string;
|
|
9
|
-
/** Show branding panel on the side */
|
|
10
|
-
showBranding?: boolean;
|
|
11
|
-
/** Branding panel content */
|
|
12
|
-
brandingContent?: React.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
export declare const AuthLayout: React.FC<AuthLayoutProps>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BattleTemplate
|
|
3
|
-
*
|
|
4
|
-
* Thin declarative wrapper around BattleBoard organism.
|
|
5
|
-
* All game logic (turn phases, movement animation, combat, etc.) lives in BattleBoard.
|
|
6
|
-
*
|
|
7
|
-
* Compliant with Almadar_Templates.md: no hooks, no callbacks, entity-only data flow.
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import type { TemplateProps } from './types';
|
|
13
|
-
import type { BattleEntity } from '../organisms/game/BattleBoard';
|
|
14
|
-
export type { BattleEntity, BattlePhase, BattleUnit, BattleTile, BattleSlotContext, } from '../organisms/game/BattleBoard';
|
|
15
|
-
export interface BattleTemplateProps extends TemplateProps<BattleEntity> {
|
|
16
|
-
/** Canvas render scale */
|
|
17
|
-
scale?: number;
|
|
18
|
-
/** Unit draw-size multiplier */
|
|
19
|
-
unitScale?: number;
|
|
20
|
-
}
|
|
21
|
-
export declare function BattleTemplate({ entity, scale, unitScale, className, }: BattleTemplateProps): React.JSX.Element;
|
|
22
|
-
export declare namespace BattleTemplate {
|
|
23
|
-
var displayName: string;
|
|
24
|
-
}
|
|
25
|
-
export default BattleTemplate;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CastleTemplate
|
|
3
|
-
*
|
|
4
|
-
* Thin declarative wrapper around CastleBoard organism.
|
|
5
|
-
* All game logic (hover state, feature selection, etc.) lives in CastleBoard.
|
|
6
|
-
*
|
|
7
|
-
* Compliant with Almadar_Templates.md: no hooks, no callbacks, entity-only data flow.
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import type { TemplateProps } from './types';
|
|
13
|
-
import type { CastleEntity } from '../organisms/game/CastleBoard';
|
|
14
|
-
export type { CastleEntity, CastleSlotContext, } from '../organisms/game/CastleBoard';
|
|
15
|
-
export interface CastleTemplateProps extends TemplateProps<CastleEntity> {
|
|
16
|
-
/** Canvas render scale */
|
|
17
|
-
scale?: number;
|
|
18
|
-
}
|
|
19
|
-
export declare function CastleTemplate({ entity, scale, className, }: CastleTemplateProps): React.JSX.Element;
|
|
20
|
-
export declare namespace CastleTemplate {
|
|
21
|
-
var displayName: string;
|
|
22
|
-
}
|
|
23
|
-
export default CastleTemplate;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CounterTemplate
|
|
3
|
-
*
|
|
4
|
-
* A presentational template for counter/incrementer features.
|
|
5
|
-
* Supports increment, decrement, and reset operations.
|
|
6
|
-
*/
|
|
7
|
-
import React from "react";
|
|
8
|
-
import type { TemplateProps } from "./types";
|
|
9
|
-
export type CounterSize = "sm" | "md" | "lg";
|
|
10
|
-
export type CounterVariant = "minimal" | "standard" | "full";
|
|
11
|
-
export interface CounterEntity {
|
|
12
|
-
/** Entity ID */
|
|
13
|
-
id: string;
|
|
14
|
-
/** Current count value */
|
|
15
|
-
count: number;
|
|
16
|
-
/** Whether decrement button is disabled */
|
|
17
|
-
decrementDisabled?: boolean;
|
|
18
|
-
/** Whether increment button is disabled */
|
|
19
|
-
incrementDisabled?: boolean;
|
|
20
|
-
/** Step label for decrement button (e.g. "-5") */
|
|
21
|
-
decrementLabel?: string;
|
|
22
|
-
/** Step label for increment button (e.g. "+5") */
|
|
23
|
-
incrementLabel?: string;
|
|
24
|
-
/** Formatted range text (e.g. "Range: 0 to 100") */
|
|
25
|
-
rangeText?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface CounterTemplateProps extends TemplateProps<CounterEntity> {
|
|
28
|
-
/** Called when increment is clicked */
|
|
29
|
-
onIncrement?: () => void;
|
|
30
|
-
/** Called when decrement is clicked */
|
|
31
|
-
onDecrement?: () => void;
|
|
32
|
-
/** Called when reset is clicked */
|
|
33
|
-
onReset?: () => void;
|
|
34
|
-
/** Title displayed above the counter */
|
|
35
|
-
title?: string;
|
|
36
|
-
/** Show reset button */
|
|
37
|
-
showReset?: boolean;
|
|
38
|
-
/** Counter display size */
|
|
39
|
-
size?: CounterSize;
|
|
40
|
-
/** Template variant */
|
|
41
|
-
variant?: CounterVariant;
|
|
42
|
-
}
|
|
43
|
-
export declare const CounterTemplate: React.FC<CounterTemplateProps>;
|
|
44
|
-
export default CounterTemplate;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { LucideIcon } from "lucide-react";
|
|
3
|
-
export interface NavItem {
|
|
4
|
-
label: string;
|
|
5
|
-
href: string;
|
|
6
|
-
icon: LucideIcon;
|
|
7
|
-
badge?: string | number;
|
|
8
|
-
children?: NavItem[];
|
|
9
|
-
}
|
|
10
|
-
export interface DashboardLayoutProps {
|
|
11
|
-
/** App name shown in sidebar */
|
|
12
|
-
appName?: string;
|
|
13
|
-
/** Logo component or URL */
|
|
14
|
-
logo?: React.ReactNode;
|
|
15
|
-
/** Navigation items */
|
|
16
|
-
navItems?: NavItem[];
|
|
17
|
-
/** Current user info (optional - auto-populated from auth context if not provided) */
|
|
18
|
-
user?: {
|
|
19
|
-
name: string;
|
|
20
|
-
email: string;
|
|
21
|
-
avatar?: string;
|
|
22
|
-
};
|
|
23
|
-
/** Header actions (notifications, etc.) */
|
|
24
|
-
headerActions?: React.ReactNode;
|
|
25
|
-
/** Show search in header */
|
|
26
|
-
showSearch?: boolean;
|
|
27
|
-
/** Custom sidebar footer */
|
|
28
|
-
sidebarFooter?: React.ReactNode;
|
|
29
|
-
/** Callback when user clicks sign out (optional - uses auth context signOut if not provided) */
|
|
30
|
-
onSignOut?: () => void;
|
|
31
|
-
}
|
|
32
|
-
export declare const DashboardLayout: React.FC<DashboardLayoutProps>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GameShell
|
|
3
|
-
*
|
|
4
|
-
* A full-screen layout wrapper for game applications.
|
|
5
|
-
* Replaces DashboardLayout for game clients — no sidebar nav, just full-viewport
|
|
6
|
-
* rendering with an optional HUD overlay bar.
|
|
7
|
-
*
|
|
8
|
-
* Used as a React Router layout route element:
|
|
9
|
-
* <Route element={<GameShell appName="TraitWars" />}>
|
|
10
|
-
* <Route index element={<WorldMapPage />} />
|
|
11
|
-
* ...
|
|
12
|
-
* </Route>
|
|
13
|
-
*
|
|
14
|
-
* @generated pattern — can be customised per-game via props
|
|
15
|
-
*/
|
|
16
|
-
import React from "react";
|
|
17
|
-
export interface GameShellProps {
|
|
18
|
-
/** Application / game title shown in the HUD bar */
|
|
19
|
-
appName?: string;
|
|
20
|
-
/** Optional HUD content rendered above the main area */
|
|
21
|
-
hud?: React.ReactNode;
|
|
22
|
-
/** Extra class name on the root container */
|
|
23
|
-
className?: string;
|
|
24
|
-
/** Whether to show the minimal top bar (default: true) */
|
|
25
|
-
showTopBar?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Full-viewport game shell layout.
|
|
29
|
-
*
|
|
30
|
-
* Renders child routes via `<Outlet />` inside a full-height flex container.
|
|
31
|
-
* An optional top bar shows the game title and can host HUD widgets.
|
|
32
|
-
*/
|
|
33
|
-
export declare const GameShell: React.FC<GameShellProps>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GameTemplate
|
|
3
|
-
*
|
|
4
|
-
* A presentational template for game applications.
|
|
5
|
-
* Includes a main game canvas/area, HUD overlay, and an optional debug sidebar.
|
|
6
|
-
* **Atomic Design**: Composed using Box, Typography, and Layout molecules/atoms.
|
|
7
|
-
*/
|
|
8
|
-
import React from "react";
|
|
9
|
-
import type { TemplateProps } from "./types";
|
|
10
|
-
interface GameEntity {
|
|
11
|
-
id: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface GameTemplateProps extends TemplateProps<GameEntity> {
|
|
15
|
-
/** Title of the game */
|
|
16
|
-
title?: string;
|
|
17
|
-
/** The main game canvas or content */
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
/** HUD overlay content (scores, health, etc.) */
|
|
20
|
-
hud?: React.ReactNode;
|
|
21
|
-
/** Debug panel content */
|
|
22
|
-
debugPanel?: React.ReactNode;
|
|
23
|
-
/** Whether the debug panel is visible */
|
|
24
|
-
showDebugPanel?: boolean;
|
|
25
|
-
/** Game controls */
|
|
26
|
-
controls?: {
|
|
27
|
-
onPlay?: () => void;
|
|
28
|
-
onPause?: () => void;
|
|
29
|
-
onReset?: () => void;
|
|
30
|
-
isPlaying?: boolean;
|
|
31
|
-
};
|
|
32
|
-
/** Additional class name */
|
|
33
|
-
className?: string;
|
|
34
|
-
}
|
|
35
|
-
export declare const GameTemplate: React.FC<GameTemplateProps>;
|
|
36
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GenericAppTemplate
|
|
3
|
-
*
|
|
4
|
-
* A simple, generic template for any application.
|
|
5
|
-
* Includes a header with title and actions, and a main content area.
|
|
6
|
-
* **Atomic Design**: Composed using Box, Typography, and Button atoms.
|
|
7
|
-
*/
|
|
8
|
-
import React from "react";
|
|
9
|
-
import type { TemplateProps } from "./types";
|
|
10
|
-
interface GenericAppEntity {
|
|
11
|
-
id: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
subtitle?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface GenericAppTemplateProps extends TemplateProps<GenericAppEntity> {
|
|
16
|
-
/** Page title */
|
|
17
|
-
title: string;
|
|
18
|
-
/** Subtitle or description */
|
|
19
|
-
subtitle?: string;
|
|
20
|
-
/** Main content */
|
|
21
|
-
children: React.ReactNode;
|
|
22
|
-
/** Header actions (buttons, links) */
|
|
23
|
-
headerActions?: React.ReactNode;
|
|
24
|
-
/** Footer content */
|
|
25
|
-
footer?: React.ReactNode;
|
|
26
|
-
/** Additional class name */
|
|
27
|
-
className?: string;
|
|
28
|
-
}
|
|
29
|
-
export declare const GenericAppTemplate: React.FC<GenericAppTemplateProps>;
|
|
30
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WorldMapTemplate
|
|
3
|
-
*
|
|
4
|
-
* Thin declarative wrapper around WorldMapBoard organism.
|
|
5
|
-
* All game logic (hero movement, encounters, hex conversion, etc.) lives in WorldMapBoard.
|
|
6
|
-
*
|
|
7
|
-
* Compliant with Almadar_Templates.md: no hooks, no callbacks, entity-only data flow.
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import type { TemplateProps } from './types';
|
|
13
|
-
import type { WorldMapEntity } from '../organisms/game/WorldMapBoard';
|
|
14
|
-
export type { WorldMapEntity, MapHero, MapHex, WorldMapSlotContext, } from '../organisms/game/WorldMapBoard';
|
|
15
|
-
export interface WorldMapTemplateProps extends TemplateProps<WorldMapEntity> {
|
|
16
|
-
/** Canvas render scale */
|
|
17
|
-
scale?: number;
|
|
18
|
-
/** Unit draw-size multiplier */
|
|
19
|
-
unitScale?: number;
|
|
20
|
-
/** Override for the diamond-top Y offset within tile sprites (default: 374). */
|
|
21
|
-
diamondTopY?: number;
|
|
22
|
-
/** Allow selecting / moving ALL heroes (including enemy). For testing. */
|
|
23
|
-
allowMoveAllHeroes?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export declare function WorldMapTemplate({ entity, scale, unitScale, diamondTopY, allowMoveAllHeroes, className, }: WorldMapTemplateProps): React.JSX.Element;
|
|
26
|
-
export declare namespace WorldMapTemplate {
|
|
27
|
-
var displayName: string;
|
|
28
|
-
}
|
|
29
|
-
export default WorldMapTemplate;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type { TemplateProps } from './types';
|
|
2
|
-
export { DashboardLayout, type DashboardLayoutProps, type NavItem } from './DashboardLayout';
|
|
3
|
-
export { AuthLayout, type AuthLayoutProps } from './AuthLayout';
|
|
4
|
-
export { CounterTemplate, type CounterTemplateProps, type CounterSize, type CounterVariant } from './CounterTemplate';
|
|
5
|
-
export { GameTemplate, type GameTemplateProps } from './GameTemplate';
|
|
6
|
-
export { GenericAppTemplate, type GenericAppTemplateProps } from './GenericAppTemplate';
|
|
7
|
-
export { GameShell, type GameShellProps } from './GameShell';
|
|
8
|
-
export { BattleTemplate, type BattleTemplateProps, type BattleEntity, type BattlePhase, type BattleUnit, type BattleTile, type BattleSlotContext, } from './BattleTemplate';
|
|
9
|
-
export { CastleTemplate, type CastleTemplateProps, type CastleEntity, type CastleSlotContext, } from './CastleTemplate';
|
|
10
|
-
export { WorldMapTemplate, type WorldMapTemplateProps, type WorldMapEntity, type MapHero, type MapHex, type WorldMapSlotContext, } from './WorldMapTemplate';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base template types for Almadar UI.
|
|
3
|
-
*
|
|
4
|
-
* All templates MUST extend `TemplateProps<E>` to enforce entity-only data flow
|
|
5
|
-
* and JSON round-trip compatibility with the flattener pipeline.
|
|
6
|
-
*
|
|
7
|
-
* @see docs/Almadar_Templates.md
|
|
8
|
-
*/
|
|
9
|
-
/** Base props for all templates — enforces entity-only data flow. */
|
|
10
|
-
export interface TemplateProps<E extends {
|
|
11
|
-
id: string;
|
|
12
|
-
}> {
|
|
13
|
-
/** Entity data — the sole source of runtime state */
|
|
14
|
-
entity: E;
|
|
15
|
-
/** External styling override */
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** @deprecated Use ThemeDefinition from ThemeContext */
|
|
2
|
-
export type DesignTheme = string;
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use ThemeProvider from ThemeContext instead
|
|
5
|
-
*/
|
|
6
|
-
export declare const DesignThemeProvider: import("react").FC<import("./ThemeContext").ThemeProviderProps>;
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Use useTheme from ThemeContext instead
|
|
9
|
-
*
|
|
10
|
-
* This wrapper provides backward compatibility with the old API.
|
|
11
|
-
*/
|
|
12
|
-
export declare function useDesignTheme(): {
|
|
13
|
-
designTheme: string;
|
|
14
|
-
setDesignTheme: (theme: string) => void;
|
|
15
|
-
availableThemes: string[];
|
|
16
|
-
};
|
|
17
|
-
declare const _default: {
|
|
18
|
-
DesignThemeProvider: import("react").FC<import("./ThemeContext").ThemeProviderProps>;
|
|
19
|
-
useDesignTheme: typeof useDesignTheme;
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified ThemeContext - Single provider for theme and color mode
|
|
3
|
-
*
|
|
4
|
-
* Combines design theme selection (ocean, wireframe, etc.) with
|
|
5
|
-
* color mode (light/dark) into a single, simple system.
|
|
6
|
-
*
|
|
7
|
-
* Uses a single data attribute: data-theme="ocean-light" or data-theme="ocean-dark"
|
|
8
|
-
*
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
|
-
import React from "react";
|
|
12
|
-
/** Color mode preference */
|
|
13
|
-
export type ColorMode = "light" | "dark" | "system";
|
|
14
|
-
/** Resolved color mode (what's actually applied) */
|
|
15
|
-
export type ResolvedMode = "light" | "dark";
|
|
16
|
-
/** Theme definition */
|
|
17
|
-
export interface ThemeDefinition {
|
|
18
|
-
/** Theme identifier (e.g., "ocean", "wireframe") */
|
|
19
|
-
name: string;
|
|
20
|
-
/** Display name for UI (e.g., "Ocean Blue") */
|
|
21
|
-
displayName?: string;
|
|
22
|
-
/** Whether this theme has light mode styles */
|
|
23
|
-
hasLightMode?: boolean;
|
|
24
|
-
/** Whether this theme has dark mode styles */
|
|
25
|
-
hasDarkMode?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/** Built-in themes available in the design system */
|
|
28
|
-
export declare const BUILT_IN_THEMES: ThemeDefinition[];
|
|
29
|
-
/** Theme context value */
|
|
30
|
-
interface ThemeContextValue {
|
|
31
|
-
/** Current theme name */
|
|
32
|
-
theme: string;
|
|
33
|
-
/** Current color mode setting (may be 'system') */
|
|
34
|
-
mode: ColorMode;
|
|
35
|
-
/** Resolved color mode (always 'light' or 'dark') */
|
|
36
|
-
resolvedMode: ResolvedMode;
|
|
37
|
-
/** Set the theme */
|
|
38
|
-
setTheme: (theme: string) => void;
|
|
39
|
-
/** Set the color mode */
|
|
40
|
-
setMode: (mode: ColorMode) => void;
|
|
41
|
-
/** Toggle between light and dark modes */
|
|
42
|
-
toggleMode: () => void;
|
|
43
|
-
/** Available themes */
|
|
44
|
-
availableThemes: ThemeDefinition[];
|
|
45
|
-
/** The full theme string applied to data-theme (e.g., "ocean-light") */
|
|
46
|
-
appliedTheme: string;
|
|
47
|
-
}
|
|
48
|
-
declare const ThemeContext: React.Context<ThemeContextValue | undefined>;
|
|
49
|
-
export interface ThemeProviderProps {
|
|
50
|
-
children: React.ReactNode;
|
|
51
|
-
/** Available themes (will be merged with built-in themes) */
|
|
52
|
-
themes?: readonly ThemeDefinition[] | ThemeDefinition[];
|
|
53
|
-
/** Default theme name */
|
|
54
|
-
defaultTheme?: string;
|
|
55
|
-
/** Default color mode */
|
|
56
|
-
defaultMode?: ColorMode;
|
|
57
|
-
/** Optional target element ref — when provided, theme attributes are applied to this element instead of document.documentElement */
|
|
58
|
-
targetRef?: React.RefObject<HTMLElement>;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Unified ThemeProvider component
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```tsx
|
|
65
|
-
* // Basic usage with built-in themes
|
|
66
|
-
* <ThemeProvider defaultTheme="wireframe" defaultMode="light">
|
|
67
|
-
* <App />
|
|
68
|
-
* </ThemeProvider>
|
|
69
|
-
*
|
|
70
|
-
* // With custom themes from orbital schema
|
|
71
|
-
* import { THEMES } from './generated/theme-manifest';
|
|
72
|
-
* <ThemeProvider themes={THEMES} defaultTheme="ocean" defaultMode="system">
|
|
73
|
-
* <App />
|
|
74
|
-
* </ThemeProvider>
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
78
|
-
/**
|
|
79
|
-
* Hook for accessing theme context
|
|
80
|
-
*
|
|
81
|
-
* @returns Theme context value
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```tsx
|
|
85
|
-
* const { theme, resolvedMode, toggleMode, setTheme } = useTheme();
|
|
86
|
-
*
|
|
87
|
-
* // Toggle dark mode
|
|
88
|
-
* <button onClick={toggleMode}>
|
|
89
|
-
* {resolvedMode === 'dark' ? 'Light' : 'Dark'}
|
|
90
|
-
* </button>
|
|
91
|
-
*
|
|
92
|
-
* // Change theme
|
|
93
|
-
* <select value={theme} onChange={(e) => setTheme(e.target.value)}>
|
|
94
|
-
* {availableThemes.map(t => (
|
|
95
|
-
* <option key={t.name} value={t.name}>{t.displayName || t.name}</option>
|
|
96
|
-
* ))}
|
|
97
|
-
* </select>
|
|
98
|
-
* ```
|
|
99
|
-
*/
|
|
100
|
-
export declare function useTheme(): ThemeContextValue;
|
|
101
|
-
export type Theme = ColorMode;
|
|
102
|
-
export type ResolvedTheme = ResolvedMode;
|
|
103
|
-
export type DesignTheme = ThemeDefinition;
|
|
104
|
-
export default ThemeContext;
|