@almadar/ui 2.0.0 → 2.0.1
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/atoms/Avatar.d.ts +58 -0
- package/dist/components/atoms/Badge.d.ts +8 -0
- package/dist/components/atoms/Box.d.ts +57 -0
- package/dist/components/atoms/Button.d.ts +24 -0
- package/dist/components/atoms/Card.d.ts +18 -0
- package/dist/components/atoms/Center.d.ts +33 -0
- package/dist/components/atoms/Checkbox.d.ts +5 -0
- package/dist/components/atoms/ConditionalWrapper.d.ts +68 -0
- package/dist/components/atoms/Divider.d.ts +29 -0
- package/dist/components/atoms/Icon.d.ts +38 -0
- package/dist/components/atoms/Input.d.ts +26 -0
- package/dist/components/atoms/Label.d.ts +5 -0
- package/dist/components/atoms/LawReferenceTooltip.d.ts +48 -0
- package/dist/components/atoms/Overlay.d.ts +16 -0
- package/dist/components/atoms/ProgressBar.d.ts +63 -0
- package/dist/components/atoms/Radio.d.ts +26 -0
- package/dist/components/atoms/Select.d.ts +12 -0
- package/dist/components/atoms/Spacer.d.ts +25 -0
- package/dist/components/atoms/Spinner.d.ts +6 -0
- package/dist/components/atoms/Stack.d.ts +64 -0
- package/dist/components/atoms/Switch.d.ts +12 -0
- package/dist/components/atoms/TextHighlight.d.ts +53 -0
- package/dist/components/atoms/Textarea.d.ts +5 -0
- package/dist/components/atoms/ThemeSelector.d.ts +21 -0
- package/dist/components/atoms/ThemeToggle.d.ts +33 -0
- package/dist/components/atoms/Typography.d.ts +57 -0
- package/dist/components/atoms/game/ControlButton.d.ts +31 -0
- package/dist/components/atoms/game/HealthBar.d.ts +18 -0
- package/dist/components/atoms/game/ScoreDisplay.d.ts +21 -0
- package/dist/components/atoms/game/Sprite.d.ts +63 -0
- package/dist/components/atoms/game/StateIndicator.d.ts +31 -0
- package/dist/components/atoms/game/index.d.ts +12 -0
- package/dist/components/atoms/index.d.ts +27 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +5 -5
- package/dist/components/molecules/Accordion.d.ts +67 -0
- package/dist/components/molecules/Alert.d.ts +24 -0
- package/dist/components/molecules/Breadcrumb.d.ts +55 -0
- package/dist/components/molecules/ButtonGroup.d.ts +67 -0
- package/dist/components/molecules/Card.d.ts +44 -0
- package/dist/components/molecules/Container.d.ts +30 -0
- package/dist/components/molecules/Drawer.d.ts +46 -0
- package/dist/components/molecules/EmptyState.d.ts +25 -0
- package/dist/components/molecules/ErrorBoundary.d.ts +55 -0
- package/dist/components/molecules/ErrorState.d.ts +13 -0
- package/dist/components/molecules/FilterGroup.d.ts +54 -0
- package/dist/components/molecules/Flex.d.ts +43 -0
- package/dist/components/molecules/FloatingActionButton.d.ts +69 -0
- package/dist/components/molecules/FormField.d.ts +16 -0
- package/dist/components/molecules/FormSectionHeader.d.ts +30 -0
- package/dist/components/molecules/Grid.d.ts +54 -0
- package/dist/components/molecules/InputGroup.d.ts +24 -0
- package/dist/components/molecules/LoadingState.d.ts +7 -0
- package/dist/components/molecules/Menu.d.ts +40 -0
- package/dist/components/molecules/Modal.d.ts +26 -0
- package/dist/components/molecules/Pagination.d.ts +66 -0
- package/dist/components/molecules/Popover.d.ts +39 -0
- package/dist/components/molecules/QuizBlock.d.ts +20 -0
- package/dist/components/molecules/RelationSelect.d.ts +48 -0
- package/dist/components/molecules/RepeatableFormSection.d.ts +58 -0
- package/dist/components/molecules/ScaledDiagram.d.ts +20 -0
- package/dist/components/molecules/SearchInput.d.ts +60 -0
- package/dist/components/molecules/SidePanel.d.ts +47 -0
- package/dist/components/molecules/SimpleGrid.d.ts +27 -0
- package/dist/components/molecules/Skeleton.d.ts +35 -0
- package/dist/components/molecules/Tabs.d.ts +45 -0
- package/dist/components/molecules/Toast.d.ts +35 -0
- package/dist/components/molecules/Tooltip.d.ts +25 -0
- package/dist/components/molecules/ViolationAlert.d.ts +49 -0
- package/dist/components/molecules/WizardNavigation.d.ts +51 -0
- package/dist/components/molecules/WizardProgress.d.ts +42 -0
- package/dist/components/molecules/game/StatBadge.d.ts +27 -0
- package/dist/components/molecules/index.d.ts +38 -0
- package/dist/components/molecules/markdown/CodeBlock.d.ts +25 -0
- package/dist/components/molecules/markdown/MarkdownContent.d.ts +26 -0
- package/dist/components/organisms/CardGrid.d.ts +72 -0
- package/dist/components/organisms/Chart.d.ts +59 -0
- package/dist/components/organisms/CodeViewer.d.ts +67 -0
- package/dist/components/organisms/ComponentPatterns.d.ts +441 -0
- package/dist/components/organisms/ConfirmDialog.d.ts +50 -0
- package/dist/components/organisms/ContentRenderer.d.ts +23 -0
- package/dist/components/organisms/CustomPattern.d.ts +104 -0
- package/dist/components/organisms/DataTable.d.ts +63 -0
- package/dist/components/organisms/DetailPanel.d.ts +71 -0
- package/dist/components/organisms/DocumentViewer.d.ts +60 -0
- package/dist/components/organisms/DrawerSlot.d.ts +39 -0
- package/dist/components/organisms/Form.d.ts +203 -0
- package/dist/components/organisms/FormSection.d.ts +59 -0
- package/dist/components/organisms/GraphCanvas.d.ts +69 -0
- package/dist/components/organisms/Header.d.ts +110 -0
- package/dist/components/organisms/JazariStateMachine.d.ts +60 -0
- package/dist/components/organisms/LayoutPatterns.d.ts +181 -0
- package/dist/components/organisms/List.d.ts +76 -0
- package/dist/components/organisms/MasterDetail.d.ts +43 -0
- package/dist/components/organisms/MediaGallery.d.ts +66 -0
- package/dist/components/organisms/Meter.d.ts +58 -0
- package/dist/components/organisms/ModalSlot.d.ts +35 -0
- package/dist/components/organisms/Navigation.d.ts +68 -0
- package/dist/components/organisms/OrbitalVisualization.d.ts +48 -0
- package/dist/components/organisms/PageHeader.d.ts +59 -0
- package/dist/components/organisms/Section.d.ts +44 -0
- package/dist/components/organisms/Sidebar.d.ts +65 -0
- package/dist/components/organisms/SignaturePad.d.ts +44 -0
- package/dist/components/organisms/Split.d.ts +42 -0
- package/dist/components/organisms/StatCard.d.ts +66 -0
- package/dist/components/organisms/StateMachineView.d.ts +36 -0
- package/dist/components/organisms/Table.d.ts +99 -0
- package/dist/components/organisms/Timeline.d.ts +58 -0
- package/dist/components/organisms/ToastSlot.d.ts +38 -0
- package/dist/components/organisms/UISlotRenderer.d.ts +112 -0
- package/dist/components/organisms/WizardContainer.d.ts +160 -0
- package/dist/components/organisms/book/BookChapterView.d.ts +17 -0
- package/dist/components/organisms/book/BookCoverPage.d.ts +19 -0
- package/dist/components/organisms/book/BookNavBar.d.ts +18 -0
- package/dist/components/organisms/book/BookTableOfContents.d.ts +18 -0
- package/dist/components/organisms/book/BookViewer.d.ts +28 -0
- package/dist/components/organisms/book/index.d.ts +7 -0
- package/dist/components/organisms/book/types.d.ts +77 -0
- package/dist/components/organisms/game/BattleBoard.d.ts +167 -0
- package/dist/components/organisms/game/CanvasEffect.d.ts +68 -0
- package/dist/components/organisms/game/CastleBoard.d.ts +85 -0
- package/dist/components/organisms/game/DialogueBox.d.ts +73 -0
- package/dist/components/organisms/game/GameAudioProvider.d.ts +47 -0
- package/dist/components/organisms/game/GameAudioToggle.d.ts +28 -0
- package/dist/components/organisms/game/GameHud.d.ts +40 -0
- package/dist/components/organisms/game/GameMenu.d.ts +43 -0
- package/dist/components/organisms/game/GameOverScreen.d.ts +56 -0
- package/dist/components/organisms/game/InventoryPanel.d.ts +67 -0
- package/dist/components/organisms/game/IsometricCanvas.d.ts +123 -0
- package/dist/components/organisms/game/TraitSlot.d.ts +86 -0
- package/dist/components/organisms/game/TraitStateViewer.d.ts +53 -0
- package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +26 -0
- package/dist/components/organisms/game/WorldMapBoard.d.ts +147 -0
- package/dist/components/organisms/game/editor/editorUtils.d.ts +109 -0
- package/dist/components/organisms/game/editor/index.d.ts +9 -0
- package/dist/components/organisms/game/hooks/useBattleState.d.ts +35 -0
- package/dist/components/organisms/game/hooks/useCamera.d.ts +41 -0
- package/dist/components/organisms/game/hooks/useGameAudio.d.ts +47 -0
- package/dist/components/organisms/game/hooks/useImageCache.d.ts +16 -0
- package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +45 -0
- package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +43 -0
- package/dist/components/organisms/game/index.d.ts +36 -0
- package/dist/components/organisms/game/managers/PhysicsManager.d.ts +103 -0
- package/dist/components/organisms/game/types/effects.d.ts +253 -0
- package/dist/components/organisms/game/types/isometric.d.ts +109 -0
- package/dist/components/organisms/game/types/spriteAnimation.d.ts +73 -0
- package/dist/components/organisms/game/utils/canvasEffects.d.ts +50 -0
- package/dist/components/organisms/game/utils/combatPresets.d.ts +15 -0
- package/dist/components/organisms/game/utils/isometric.d.ts +61 -0
- package/dist/components/organisms/game/utils/spriteAnimation.d.ts +57 -0
- package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +16 -0
- package/dist/components/organisms/index.d.ts +37 -0
- package/dist/components/organisms/layout/DashboardGrid.d.ts +34 -0
- package/dist/components/organisms/layout/MasterDetail.d.ts +32 -0
- package/dist/components/organisms/layout/SplitPane.d.ts +34 -0
- package/dist/components/organisms/layout/TabbedContainer.d.ts +42 -0
- package/dist/components/organisms/layout/index.d.ts +9 -0
- package/dist/components/organisms/types.d.ts +65 -0
- package/dist/components/templates/AuthLayout.d.ts +14 -0
- package/dist/components/templates/BattleTemplate.d.ts +25 -0
- package/dist/components/templates/CastleTemplate.d.ts +23 -0
- package/dist/components/templates/CounterTemplate.d.ts +44 -0
- package/dist/components/templates/DashboardLayout.d.ts +32 -0
- package/dist/components/templates/GameShell.d.ts +33 -0
- package/dist/components/templates/GameTemplate.d.ts +36 -0
- package/dist/components/templates/GenericAppTemplate.d.ts +30 -0
- package/dist/components/templates/WorldMapTemplate.d.ts +29 -0
- package/dist/components/templates/index.d.ts +10 -0
- package/dist/components/templates/types.d.ts +17 -0
- package/dist/context/DesignThemeContext.d.ts +21 -0
- package/dist/context/ThemeContext.d.ts +104 -0
- package/dist/context/UISlotContext.d.ts +75 -0
- package/dist/context/UserContext.d.ts +111 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/hooks/event-bus-types.d.ts +71 -0
- package/dist/hooks/index.d.ts +25 -0
- package/dist/hooks/useAgentChat.d.ts +104 -0
- package/dist/hooks/useAuthContext.d.ts +25 -0
- package/dist/hooks/useCompile.d.ts +22 -0
- package/dist/hooks/useDeepAgentGeneration.d.ts +46 -0
- package/dist/hooks/useEntities.d.ts +52 -0
- package/dist/hooks/useEntityData.d.ts +155 -0
- package/dist/hooks/useEntityMutations.d.ts +80 -0
- package/dist/hooks/useEventBus.d.ts +96 -0
- package/dist/hooks/useExtensions.d.ts +32 -0
- package/dist/hooks/useFileEditor.d.ts +32 -0
- package/dist/hooks/useFileSystem.d.ts +40 -0
- package/dist/hooks/useGitHub.d.ts +58 -0
- package/dist/hooks/useOrbitalHistory.d.ts +39 -0
- package/dist/hooks/useOrbitalMutations.d.ts +95 -0
- package/dist/hooks/usePreview.d.ts +57 -0
- package/dist/hooks/useQuerySingleton.d.ts +78 -0
- package/dist/hooks/useResolvedEntity.d.ts +32 -0
- package/dist/hooks/useTranslate.d.ts +35 -0
- package/dist/hooks/useUIEvents.d.ts +35 -0
- package/dist/hooks/useUISlots.d.ts +84 -0
- package/dist/hooks/useValidation.d.ts +46 -0
- package/dist/lib/api-client.d.ts +42 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/debug.d.ts +43 -0
- package/dist/lib/debugRegistry.d.ts +29 -0
- package/dist/lib/debugUtils.d.ts +27 -0
- package/dist/lib/entityDebug.d.ts +38 -0
- package/dist/lib/getNestedValue.d.ts +33 -0
- package/dist/lib/guardRegistry.d.ts +32 -0
- package/dist/lib/index.d.ts +18 -0
- package/dist/lib/jazari/svg-paths.d.ts +61 -0
- package/dist/lib/parseContentSegments.d.ts +41 -0
- package/dist/lib/tickRegistry.d.ts +40 -0
- package/dist/lib/traitRegistry.d.ts +34 -0
- package/dist/lib/verificationRegistry.d.ts +107 -0
- package/dist/lib/visualizer/index.d.ts +143 -0
- package/dist/locales/index.d.ts +20 -0
- package/dist/providers/EventBusProvider.d.ts +60 -0
- package/dist/providers/FetchedDataProvider.d.ts +105 -0
- package/dist/providers/OfflineModeProvider.d.ts +79 -0
- package/dist/providers/OrbitalProvider.d.ts +101 -0
- package/dist/providers/SelectionProvider.d.ts +81 -0
- package/dist/providers/VerificationProvider.d.ts +63 -0
- package/dist/providers/index.d.ts +17 -0
- package/dist/providers/index.js +3 -3
- package/dist/renderer/client-effect-executor.d.ts +68 -0
- package/dist/renderer/data-resolver.d.ts +68 -0
- package/dist/renderer/index.d.ts +28 -0
- package/dist/renderer/index.js +1 -1
- package/dist/renderer/init.d.ts +14 -0
- package/dist/renderer/navigation.d.ts +142 -0
- package/dist/renderer/offline-executor.d.ts +238 -0
- package/dist/renderer/pattern-resolver.d.ts +91 -0
- package/dist/renderer/slot-definitions.d.ts +45 -0
- package/dist/renderer/types.d.ts +160 -0
- package/dist/renderer/useClientEffects.d.ts +88 -0
- package/dist/stores/entityStore.d.ts +99 -0
- package/dist/stores/filtering.d.ts +51 -0
- package/dist/stores/index.d.ts +7 -0
- package/package.json +4 -3
- package/dist/{chunk-YNP2OBK4.js → chunk-RIZ76XRF.js} +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextHighlight Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A styled span component for highlighting text with annotations (questions or notes).
|
|
5
|
+
* Uses different colors for different annotation types:
|
|
6
|
+
* - Questions: Blue highlight
|
|
7
|
+
* - Notes: Yellow highlight
|
|
8
|
+
*/
|
|
9
|
+
import React from "react";
|
|
10
|
+
export type HighlightType = "question" | "note";
|
|
11
|
+
export interface TextHighlightProps {
|
|
12
|
+
/**
|
|
13
|
+
* Type of highlight (determines color)
|
|
14
|
+
*/
|
|
15
|
+
highlightType: HighlightType;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the highlight is currently active/focused
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
isActive?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Callback when highlight is clicked
|
|
23
|
+
*/
|
|
24
|
+
onClick?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Callback when highlight is hovered
|
|
27
|
+
*/
|
|
28
|
+
onMouseEnter?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Callback when hover ends
|
|
31
|
+
*/
|
|
32
|
+
onMouseLeave?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Unique ID for the annotation
|
|
35
|
+
*/
|
|
36
|
+
annotationId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Additional CSS classes
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Highlighted text content
|
|
43
|
+
*/
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
46
|
+
action?: string;
|
|
47
|
+
/** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } */
|
|
48
|
+
hoverEvent?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* TextHighlight component for rendering highlighted text annotations
|
|
52
|
+
*/
|
|
53
|
+
export declare const TextHighlight: React.FC<TextHighlightProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThemeSelector - Design theme selector component
|
|
3
|
+
*
|
|
4
|
+
* A dropdown/toggle component for switching between design themes.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import React from "react";
|
|
9
|
+
interface ThemeSelectorProps {
|
|
10
|
+
/** Optional className */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Show as dropdown or buttons */
|
|
13
|
+
variant?: "dropdown" | "buttons";
|
|
14
|
+
/** Show labels */
|
|
15
|
+
showLabels?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* ThemeSelector component for switching design themes
|
|
19
|
+
*/
|
|
20
|
+
export declare const ThemeSelector: React.FC<ThemeSelectorProps>;
|
|
21
|
+
export default ThemeSelector;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThemeToggle Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A button that toggles between light and dark themes.
|
|
5
|
+
* Uses Sun and Moon icons to indicate current/target theme.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import React from "react";
|
|
10
|
+
export interface ThemeToggleProps {
|
|
11
|
+
/** Additional CSS classes */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Size variant */
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
/** Show label text */
|
|
16
|
+
showLabel?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* ThemeToggle component for switching between light and dark modes
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* // Basic usage
|
|
24
|
+
* <ThemeToggle />
|
|
25
|
+
*
|
|
26
|
+
* // With label
|
|
27
|
+
* <ThemeToggle showLabel />
|
|
28
|
+
*
|
|
29
|
+
* // Custom size
|
|
30
|
+
* <ThemeToggle size="lg" />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const ThemeToggle: React.FC<ThemeToggleProps>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typography Atom Component
|
|
3
|
+
*
|
|
4
|
+
* Text elements following the KFlow design system with theme-aware styling.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
export type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "body1" | "body2" | "body" | "caption" | "overline" | "small" | "large" | "label";
|
|
8
|
+
export type TypographySize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
9
|
+
export interface TypographyProps {
|
|
10
|
+
/** Typography variant */
|
|
11
|
+
variant?: TypographyVariant;
|
|
12
|
+
/** Heading level (1-6) - alternative to variant for headings */
|
|
13
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
14
|
+
/** Text color */
|
|
15
|
+
color?: "primary" | "secondary" | "muted" | "error" | "success" | "warning" | "inherit";
|
|
16
|
+
/** Text alignment */
|
|
17
|
+
align?: "left" | "center" | "right";
|
|
18
|
+
/** Font weight override */
|
|
19
|
+
weight?: "light" | "normal" | "medium" | "semibold" | "bold";
|
|
20
|
+
/** Font size override */
|
|
21
|
+
size?: TypographySize;
|
|
22
|
+
/** Truncate with ellipsis (single line) */
|
|
23
|
+
truncate?: boolean;
|
|
24
|
+
/** Overflow handling mode */
|
|
25
|
+
overflow?: "visible" | "hidden" | "wrap" | "clamp-2" | "clamp-3";
|
|
26
|
+
/** Custom HTML element */
|
|
27
|
+
as?: keyof React.JSX.IntrinsicElements;
|
|
28
|
+
/** HTML id attribute */
|
|
29
|
+
id?: string;
|
|
30
|
+
/** Additional class names */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Inline style */
|
|
33
|
+
style?: React.CSSProperties;
|
|
34
|
+
/** Text content (alternative to children) */
|
|
35
|
+
content?: React.ReactNode;
|
|
36
|
+
/** Children elements */
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export declare const Typography: React.FC<TypographyProps>;
|
|
40
|
+
/**
|
|
41
|
+
* Heading component - convenience wrapper for Typography heading variants
|
|
42
|
+
*/
|
|
43
|
+
export interface HeadingProps extends Omit<TypographyProps, "variant"> {
|
|
44
|
+
/** Heading level (1-6) */
|
|
45
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
46
|
+
/** Override font size */
|
|
47
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
48
|
+
}
|
|
49
|
+
export declare const Heading: React.FC<HeadingProps>;
|
|
50
|
+
/**
|
|
51
|
+
* Text component - convenience wrapper for Typography body/caption variants
|
|
52
|
+
*/
|
|
53
|
+
export interface TextProps extends Omit<TypographyProps, "level"> {
|
|
54
|
+
/** Text variant */
|
|
55
|
+
variant?: "body" | "body1" | "body2" | "caption" | "small" | "large" | "label" | "overline";
|
|
56
|
+
}
|
|
57
|
+
export declare const Text: React.FC<TextProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ControlButtonProps {
|
|
3
|
+
/** Button label text */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Icon component or emoji */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** Size variant */
|
|
8
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | string;
|
|
9
|
+
/** Shape variant */
|
|
10
|
+
shape?: 'circle' | 'rounded' | 'square' | string;
|
|
11
|
+
/** Visual variant */
|
|
12
|
+
variant?: 'primary' | 'secondary' | 'ghost' | string;
|
|
13
|
+
/** Called when button is pressed */
|
|
14
|
+
onPress?: () => void;
|
|
15
|
+
/** Called when button is released */
|
|
16
|
+
onRelease?: () => void;
|
|
17
|
+
/** Declarative event name emitted on press via useEventBus */
|
|
18
|
+
pressEvent?: string;
|
|
19
|
+
/** Declarative event name emitted on release via useEventBus */
|
|
20
|
+
releaseEvent?: string;
|
|
21
|
+
/** Whether the button is currently pressed */
|
|
22
|
+
pressed?: boolean;
|
|
23
|
+
/** Whether the button is disabled */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** Additional CSS classes */
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function ControlButton({ label, icon, size, shape, variant, onPress, onRelease, pressEvent, releaseEvent, pressed, disabled, className, }: ControlButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare namespace ControlButton {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface HealthBarProps {
|
|
2
|
+
/** Current health value */
|
|
3
|
+
current: number;
|
|
4
|
+
/** Maximum health value */
|
|
5
|
+
max: number;
|
|
6
|
+
/** Display format */
|
|
7
|
+
format?: 'hearts' | 'bar' | 'numeric';
|
|
8
|
+
/** Size variant */
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
/** Additional CSS classes */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Animation on change */
|
|
13
|
+
animated?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function HealthBar({ current, max, format, size, className, animated, }: HealthBarProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare namespace HealthBar {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ScoreDisplayProps {
|
|
3
|
+
/** Current score value */
|
|
4
|
+
value: number;
|
|
5
|
+
/** Label to display before score */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Icon component or emoji */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** Size variant */
|
|
10
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
/** Additional CSS classes */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Animation on value change */
|
|
14
|
+
animated?: boolean;
|
|
15
|
+
/** Number formatting locale */
|
|
16
|
+
locale?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function ScoreDisplay({ value, label, icon, size, className, animated, locale, }: ScoreDisplayProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare namespace ScoreDisplay {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprite Component
|
|
3
|
+
*
|
|
4
|
+
* Renders a single frame from a spritesheet with transform support.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export interface SpriteProps {
|
|
8
|
+
/** Spritesheet image URL */
|
|
9
|
+
spritesheet: string;
|
|
10
|
+
/** Width of each frame in pixels */
|
|
11
|
+
frameWidth: number;
|
|
12
|
+
/** Height of each frame in pixels */
|
|
13
|
+
frameHeight: number;
|
|
14
|
+
/** Frame index to display (0-based, left-to-right, top-to-bottom) */
|
|
15
|
+
frame: number;
|
|
16
|
+
/** X position in pixels */
|
|
17
|
+
x: number;
|
|
18
|
+
/** Y position in pixels */
|
|
19
|
+
y: number;
|
|
20
|
+
/** Scale factor (default: 1) */
|
|
21
|
+
scale?: number;
|
|
22
|
+
/** Flip horizontally */
|
|
23
|
+
flipX?: boolean;
|
|
24
|
+
/** Flip vertically */
|
|
25
|
+
flipY?: boolean;
|
|
26
|
+
/** Rotation in degrees */
|
|
27
|
+
rotation?: number;
|
|
28
|
+
/** Opacity (0-1) */
|
|
29
|
+
opacity?: number;
|
|
30
|
+
/** Z-index for layering */
|
|
31
|
+
zIndex?: number;
|
|
32
|
+
/** Number of columns in spritesheet (for frame calculation) */
|
|
33
|
+
columns?: number;
|
|
34
|
+
/** Optional className */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Optional onClick handler */
|
|
37
|
+
onClick?: () => void;
|
|
38
|
+
/** Declarative event name emitted on click via useEventBus */
|
|
39
|
+
action?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Sprite component for rendering spritesheet frames
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* <Sprite
|
|
47
|
+
* spritesheet="/sprites/player.png"
|
|
48
|
+
* frameWidth={32}
|
|
49
|
+
* frameHeight={32}
|
|
50
|
+
* frame={currentFrame}
|
|
51
|
+
* x={player.x}
|
|
52
|
+
* y={player.y}
|
|
53
|
+
* flipX={player.facingLeft}
|
|
54
|
+
* scale={2}
|
|
55
|
+
* />
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function Sprite({ spritesheet, frameWidth, frameHeight, frame, x, y, scale, flipX, flipY, rotation, opacity, zIndex, columns, className, onClick, action, }: SpriteProps): React.JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* Canvas-based sprite renderer for better performance in game loops
|
|
61
|
+
*/
|
|
62
|
+
export declare function drawSprite(ctx: CanvasRenderingContext2D, image: HTMLImageElement, props: Omit<SpriteProps, 'spritesheet' | 'className' | 'onClick'>): void;
|
|
63
|
+
export default Sprite;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StateIndicator Component
|
|
3
|
+
*
|
|
4
|
+
* Displays a visual indicator for a game entity's current state.
|
|
5
|
+
* Generic — not tied to any specific game. Projects can extend
|
|
6
|
+
* the state styles via the `stateStyles` prop.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export interface StateStyle {
|
|
10
|
+
icon: string;
|
|
11
|
+
bgClass: string;
|
|
12
|
+
}
|
|
13
|
+
export interface StateIndicatorProps {
|
|
14
|
+
/** The current state name */
|
|
15
|
+
state: string;
|
|
16
|
+
/** Optional label override (defaults to capitalized state name) */
|
|
17
|
+
label?: string;
|
|
18
|
+
/** Size variant */
|
|
19
|
+
size?: 'sm' | 'md' | 'lg';
|
|
20
|
+
/** Whether to show pulse animation on non-idle states */
|
|
21
|
+
animated?: boolean;
|
|
22
|
+
/** Custom state styles to extend/override defaults */
|
|
23
|
+
stateStyles?: Record<string, StateStyle>;
|
|
24
|
+
/** Additional CSS classes */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function StateIndicator({ state, label, size, animated, stateStyles, className, }: StateIndicatorProps): React.JSX.Element;
|
|
28
|
+
export declare namespace StateIndicator {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
export default StateIndicator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Game Atom Components
|
|
3
|
+
*
|
|
4
|
+
* Basic building blocks for game UI.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export { HealthBar, type HealthBarProps } from './HealthBar';
|
|
9
|
+
export { ScoreDisplay, type ScoreDisplayProps } from './ScoreDisplay';
|
|
10
|
+
export { ControlButton, type ControlButtonProps } from './ControlButton';
|
|
11
|
+
export { Sprite, drawSprite, type SpriteProps } from './Sprite';
|
|
12
|
+
export { StateIndicator, type StateIndicatorProps, type StateStyle } from './StateIndicator';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { Button, type ButtonProps } from "./Button";
|
|
2
|
+
export { Input, type InputProps } from "./Input";
|
|
3
|
+
export { Label, type LabelProps } from "./Label";
|
|
4
|
+
export { Textarea, type TextareaProps } from "./Textarea";
|
|
5
|
+
export { Select, type SelectProps, type SelectOption } from "./Select";
|
|
6
|
+
export { Checkbox, type CheckboxProps } from "./Checkbox";
|
|
7
|
+
export { Card, CardHeader, CardTitle, CardContent, CardBody, CardFooter, type CardProps, } from "./Card";
|
|
8
|
+
export { Badge, type BadgeProps, type BadgeVariant } from "./Badge";
|
|
9
|
+
export { Spinner, type SpinnerProps } from "./Spinner";
|
|
10
|
+
export { Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, } from "./Avatar";
|
|
11
|
+
export { Box, type BoxProps, type BoxPadding, type BoxMargin, type BoxBg, type BoxRounded, type BoxShadow, } from "./Box";
|
|
12
|
+
export { Center, type CenterProps } from "./Center";
|
|
13
|
+
export { Divider, type DividerProps, type DividerOrientation } from "./Divider";
|
|
14
|
+
export { Icon, type IconProps, type IconSize, type IconAnimation, } from "./Icon";
|
|
15
|
+
export { ProgressBar, type ProgressBarProps, type ProgressBarVariant, type ProgressBarColor, } from "./ProgressBar";
|
|
16
|
+
export { Radio, type RadioProps } from "./Radio";
|
|
17
|
+
export { Switch, type SwitchProps } from "./Switch";
|
|
18
|
+
export { Spacer, type SpacerProps, type SpacerSize } from "./Spacer";
|
|
19
|
+
export { Stack, VStack, HStack, type StackProps, type VStackProps, type HStackProps, type StackDirection, type StackGap, type StackAlign, type StackJustify, } from "./Stack";
|
|
20
|
+
export { TextHighlight, type TextHighlightProps, type HighlightType, } from "./TextHighlight";
|
|
21
|
+
export { Typography, Heading, Text, type TypographyProps, type TypographyVariant, type HeadingProps, type TextProps, } from "./Typography";
|
|
22
|
+
export { ThemeToggle, type ThemeToggleProps } from "./ThemeToggle";
|
|
23
|
+
export { ThemeSelector } from "./ThemeSelector";
|
|
24
|
+
export { Overlay, type OverlayProps } from "./Overlay";
|
|
25
|
+
export { ConditionalWrapper, type ConditionalWrapperProps, type ConditionalContext, } from "./ConditionalWrapper";
|
|
26
|
+
export { LawReferenceTooltip, type LawReferenceTooltipProps, type LawReference, } from "./LawReferenceTooltip";
|
|
27
|
+
export * from "./game";
|
package/dist/components/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments } from '../chunk-N6DJVKZ6.js';
|
|
1
2
|
import { useAuthContext } from '../chunk-BKC4XU44.js';
|
|
2
3
|
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-BKC4XU44.js';
|
|
3
|
-
import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments } from '../chunk-N6DJVKZ6.js';
|
|
4
4
|
import '../chunk-XSEDIUM6.js';
|
|
5
|
-
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, Stack, Drawer, Toast, Tabs, Input, ThemeToggle, HealthBar, ScoreDisplay, StateIndicator, Container, EntityDisplayEvents } from '../chunk-
|
|
6
|
-
export { Accordion, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DataTable, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FloatingActionButton, Form, FormField, FormSectionHeader, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LoadingState, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-
|
|
5
|
+
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, Stack, Drawer, Toast, Tabs, Input, ThemeToggle, HealthBar, ScoreDisplay, StateIndicator, Container, EntityDisplayEvents } from '../chunk-RIZ76XRF.js';
|
|
6
|
+
export { Accordion, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DataTable, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FloatingActionButton, Form, FormField, FormSectionHeader, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LoadingState, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-RIZ76XRF.js';
|
|
7
|
+
import { cn, getNestedValue } from '../chunk-KKCVDUK7.js';
|
|
8
|
+
export { cn } from '../chunk-KKCVDUK7.js';
|
|
7
9
|
import '../chunk-BTXQJGFB.js';
|
|
8
10
|
import { useTranslate } from '../chunk-PE2H3NAW.js';
|
|
9
11
|
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useQuerySingleton, useTranslate } from '../chunk-PE2H3NAW.js';
|
|
10
12
|
import { useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
11
13
|
export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
12
14
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-7NEWMNNU.js';
|
|
13
|
-
import { cn, getNestedValue } from '../chunk-KKCVDUK7.js';
|
|
14
|
-
export { cn } from '../chunk-KKCVDUK7.js';
|
|
15
15
|
export { clearEntities, getAllEntities, getByType, getEntity, getSingleton, removeEntity, spawnEntity, updateEntity, updateSingleton } from '../chunk-N7MVUW4R.js';
|
|
16
16
|
import { __publicField } from '../chunk-PKBMQBKP.js';
|
|
17
17
|
import * as React25 from 'react';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accordion Molecule Component
|
|
3
|
+
*
|
|
4
|
+
* A collapsible content component with single or multiple open items.
|
|
5
|
+
* Uses Button, Icon, Typography, and Divider atoms.
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
export interface AccordionItem {
|
|
9
|
+
/**
|
|
10
|
+
* Item ID (auto-generated from header/title if not provided)
|
|
11
|
+
*/
|
|
12
|
+
id?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Item header/title
|
|
15
|
+
*/
|
|
16
|
+
header?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Alias for header (pattern compatibility)
|
|
19
|
+
*/
|
|
20
|
+
title?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Item content
|
|
23
|
+
*/
|
|
24
|
+
content: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Disable item
|
|
27
|
+
*/
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Default open state
|
|
31
|
+
*/
|
|
32
|
+
defaultOpen?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface AccordionProps {
|
|
35
|
+
/**
|
|
36
|
+
* Accordion items
|
|
37
|
+
*/
|
|
38
|
+
items: AccordionItem[];
|
|
39
|
+
/**
|
|
40
|
+
* Allow multiple items open at once
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
multiple?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Default open items (IDs)
|
|
46
|
+
*/
|
|
47
|
+
defaultOpenItems?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Default open items by index (pattern compatibility)
|
|
50
|
+
*/
|
|
51
|
+
defaultOpen?: number[];
|
|
52
|
+
/**
|
|
53
|
+
* Controlled open items (IDs)
|
|
54
|
+
*/
|
|
55
|
+
openItems?: string[];
|
|
56
|
+
/**
|
|
57
|
+
* Callback when item opens/closes
|
|
58
|
+
*/
|
|
59
|
+
onItemToggle?: (itemId: string, isOpen: boolean) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Additional CSS classes
|
|
62
|
+
*/
|
|
63
|
+
className?: string;
|
|
64
|
+
/** Declarative toggle event — emits UI:{toggleEvent} with { itemId, isOpen } */
|
|
65
|
+
toggleEvent?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert Molecule Component
|
|
3
|
+
*
|
|
4
|
+
* A component for displaying alert messages with different variants and actions.
|
|
5
|
+
* Uses theme-aware CSS variables for styling.
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
export type AlertVariant = "info" | "success" | "warning" | "error";
|
|
9
|
+
export interface AlertProps {
|
|
10
|
+
/** Alert content (children or message) */
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/** Alert message (alias for children) */
|
|
13
|
+
message?: string;
|
|
14
|
+
variant?: AlertVariant;
|
|
15
|
+
title?: string;
|
|
16
|
+
dismissible?: boolean;
|
|
17
|
+
onDismiss?: () => void;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
actions?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Declarative dismiss event — emits UI:{dismissEvent} via eventBus when alert is dismissed */
|
|
22
|
+
dismissEvent?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const Alert: React.FC<AlertProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumb Molecule Component
|
|
3
|
+
*
|
|
4
|
+
* A breadcrumb navigation component with separators and icons.
|
|
5
|
+
* Uses Button, Icon, and Typography atoms.
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
import type { LucideIcon } from "lucide-react";
|
|
9
|
+
export interface BreadcrumbItem {
|
|
10
|
+
/**
|
|
11
|
+
* Item label
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Item href (if provided, renders as link)
|
|
16
|
+
*/
|
|
17
|
+
href?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Item path (alias for href, for schema compatibility)
|
|
20
|
+
*/
|
|
21
|
+
path?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Item icon
|
|
24
|
+
*/
|
|
25
|
+
icon?: LucideIcon;
|
|
26
|
+
/**
|
|
27
|
+
* Click handler (if href not provided)
|
|
28
|
+
*/
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Is current page
|
|
32
|
+
*/
|
|
33
|
+
isCurrent?: boolean;
|
|
34
|
+
/** Event name to emit when clicked (for trait state machine integration) */
|
|
35
|
+
event?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface BreadcrumbProps {
|
|
38
|
+
/**
|
|
39
|
+
* Breadcrumb items
|
|
40
|
+
*/
|
|
41
|
+
items: BreadcrumbItem[];
|
|
42
|
+
/**
|
|
43
|
+
* Separator icon
|
|
44
|
+
*/
|
|
45
|
+
separator?: LucideIcon;
|
|
46
|
+
/**
|
|
47
|
+
* Maximum items to show (truncates with ellipsis)
|
|
48
|
+
*/
|
|
49
|
+
maxItems?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Additional CSS classes
|
|
52
|
+
*/
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
export declare const Breadcrumb: React.FC<BreadcrumbProps>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ButtonGroup Molecule Component
|
|
3
|
+
*
|
|
4
|
+
* A component for grouping buttons together with connected styling.
|
|
5
|
+
* Supports both children-based and form-actions pattern (primary/secondary) usage.
|
|
6
|
+
* Uses Button atoms.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export type ButtonGroupVariant = 'default' | 'segmented' | 'toggle';
|
|
10
|
+
/** Action button config for form-actions pattern */
|
|
11
|
+
export interface ActionButton {
|
|
12
|
+
label: string;
|
|
13
|
+
/** Action type - 'submit' renders as submit button, others render as button */
|
|
14
|
+
actionType?: string;
|
|
15
|
+
event?: string;
|
|
16
|
+
navigatesTo?: string;
|
|
17
|
+
/** Button variant - matches Button component variants. Accepts string for schema compatibility. */
|
|
18
|
+
variant?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Filter definition for filter-group pattern */
|
|
21
|
+
export interface FilterDefinition {
|
|
22
|
+
field: string;
|
|
23
|
+
label: string;
|
|
24
|
+
/** Filter type (checkbox, select, etc.) */
|
|
25
|
+
type?: 'checkbox' | 'select' | 'toggle';
|
|
26
|
+
/** Options for select filters */
|
|
27
|
+
options?: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
export interface ButtonGroupProps {
|
|
30
|
+
/**
|
|
31
|
+
* Button group content (Button components) - use this OR primary/secondary
|
|
32
|
+
*/
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Primary action button config (for form-actions pattern)
|
|
36
|
+
* Accepts Readonly for compatibility with generated const objects
|
|
37
|
+
*/
|
|
38
|
+
primary?: Readonly<ActionButton>;
|
|
39
|
+
/**
|
|
40
|
+
* Secondary action buttons config (for form-actions pattern)
|
|
41
|
+
* Accepts readonly array for compatibility with generated const arrays
|
|
42
|
+
*/
|
|
43
|
+
secondary?: readonly Readonly<ActionButton>[];
|
|
44
|
+
/**
|
|
45
|
+
* Visual variant
|
|
46
|
+
* @default 'default'
|
|
47
|
+
*/
|
|
48
|
+
variant?: ButtonGroupVariant;
|
|
49
|
+
/**
|
|
50
|
+
* Orientation
|
|
51
|
+
* @default 'horizontal'
|
|
52
|
+
*/
|
|
53
|
+
orientation?: 'horizontal' | 'vertical';
|
|
54
|
+
/**
|
|
55
|
+
* Additional CSS classes
|
|
56
|
+
*/
|
|
57
|
+
className?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Entity type for filter-group pattern (schema metadata)
|
|
60
|
+
*/
|
|
61
|
+
entity?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Filter definitions for filter-group pattern
|
|
64
|
+
*/
|
|
65
|
+
filters?: readonly FilterDefinition[];
|
|
66
|
+
}
|
|
67
|
+
export declare const ButtonGroup: React.FC<ButtonGroupProps>;
|