@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.
Files changed (237) hide show
  1. package/dist/components/atoms/Avatar.d.ts +58 -0
  2. package/dist/components/atoms/Badge.d.ts +8 -0
  3. package/dist/components/atoms/Box.d.ts +57 -0
  4. package/dist/components/atoms/Button.d.ts +24 -0
  5. package/dist/components/atoms/Card.d.ts +18 -0
  6. package/dist/components/atoms/Center.d.ts +33 -0
  7. package/dist/components/atoms/Checkbox.d.ts +5 -0
  8. package/dist/components/atoms/ConditionalWrapper.d.ts +68 -0
  9. package/dist/components/atoms/Divider.d.ts +29 -0
  10. package/dist/components/atoms/Icon.d.ts +38 -0
  11. package/dist/components/atoms/Input.d.ts +26 -0
  12. package/dist/components/atoms/Label.d.ts +5 -0
  13. package/dist/components/atoms/LawReferenceTooltip.d.ts +48 -0
  14. package/dist/components/atoms/Overlay.d.ts +16 -0
  15. package/dist/components/atoms/ProgressBar.d.ts +63 -0
  16. package/dist/components/atoms/Radio.d.ts +26 -0
  17. package/dist/components/atoms/Select.d.ts +12 -0
  18. package/dist/components/atoms/Spacer.d.ts +25 -0
  19. package/dist/components/atoms/Spinner.d.ts +6 -0
  20. package/dist/components/atoms/Stack.d.ts +64 -0
  21. package/dist/components/atoms/Switch.d.ts +12 -0
  22. package/dist/components/atoms/TextHighlight.d.ts +53 -0
  23. package/dist/components/atoms/Textarea.d.ts +5 -0
  24. package/dist/components/atoms/ThemeSelector.d.ts +21 -0
  25. package/dist/components/atoms/ThemeToggle.d.ts +33 -0
  26. package/dist/components/atoms/Typography.d.ts +57 -0
  27. package/dist/components/atoms/game/ControlButton.d.ts +31 -0
  28. package/dist/components/atoms/game/HealthBar.d.ts +18 -0
  29. package/dist/components/atoms/game/ScoreDisplay.d.ts +21 -0
  30. package/dist/components/atoms/game/Sprite.d.ts +63 -0
  31. package/dist/components/atoms/game/StateIndicator.d.ts +31 -0
  32. package/dist/components/atoms/game/index.d.ts +12 -0
  33. package/dist/components/atoms/index.d.ts +27 -0
  34. package/dist/components/index.d.ts +6 -0
  35. package/dist/components/index.js +5 -5
  36. package/dist/components/molecules/Accordion.d.ts +67 -0
  37. package/dist/components/molecules/Alert.d.ts +24 -0
  38. package/dist/components/molecules/Breadcrumb.d.ts +55 -0
  39. package/dist/components/molecules/ButtonGroup.d.ts +67 -0
  40. package/dist/components/molecules/Card.d.ts +44 -0
  41. package/dist/components/molecules/Container.d.ts +30 -0
  42. package/dist/components/molecules/Drawer.d.ts +46 -0
  43. package/dist/components/molecules/EmptyState.d.ts +25 -0
  44. package/dist/components/molecules/ErrorBoundary.d.ts +55 -0
  45. package/dist/components/molecules/ErrorState.d.ts +13 -0
  46. package/dist/components/molecules/FilterGroup.d.ts +54 -0
  47. package/dist/components/molecules/Flex.d.ts +43 -0
  48. package/dist/components/molecules/FloatingActionButton.d.ts +69 -0
  49. package/dist/components/molecules/FormField.d.ts +16 -0
  50. package/dist/components/molecules/FormSectionHeader.d.ts +30 -0
  51. package/dist/components/molecules/Grid.d.ts +54 -0
  52. package/dist/components/molecules/InputGroup.d.ts +24 -0
  53. package/dist/components/molecules/LoadingState.d.ts +7 -0
  54. package/dist/components/molecules/Menu.d.ts +40 -0
  55. package/dist/components/molecules/Modal.d.ts +26 -0
  56. package/dist/components/molecules/Pagination.d.ts +66 -0
  57. package/dist/components/molecules/Popover.d.ts +39 -0
  58. package/dist/components/molecules/QuizBlock.d.ts +20 -0
  59. package/dist/components/molecules/RelationSelect.d.ts +48 -0
  60. package/dist/components/molecules/RepeatableFormSection.d.ts +58 -0
  61. package/dist/components/molecules/ScaledDiagram.d.ts +20 -0
  62. package/dist/components/molecules/SearchInput.d.ts +60 -0
  63. package/dist/components/molecules/SidePanel.d.ts +47 -0
  64. package/dist/components/molecules/SimpleGrid.d.ts +27 -0
  65. package/dist/components/molecules/Skeleton.d.ts +35 -0
  66. package/dist/components/molecules/Tabs.d.ts +45 -0
  67. package/dist/components/molecules/Toast.d.ts +35 -0
  68. package/dist/components/molecules/Tooltip.d.ts +25 -0
  69. package/dist/components/molecules/ViolationAlert.d.ts +49 -0
  70. package/dist/components/molecules/WizardNavigation.d.ts +51 -0
  71. package/dist/components/molecules/WizardProgress.d.ts +42 -0
  72. package/dist/components/molecules/game/StatBadge.d.ts +27 -0
  73. package/dist/components/molecules/index.d.ts +38 -0
  74. package/dist/components/molecules/markdown/CodeBlock.d.ts +25 -0
  75. package/dist/components/molecules/markdown/MarkdownContent.d.ts +26 -0
  76. package/dist/components/organisms/CardGrid.d.ts +72 -0
  77. package/dist/components/organisms/Chart.d.ts +59 -0
  78. package/dist/components/organisms/CodeViewer.d.ts +67 -0
  79. package/dist/components/organisms/ComponentPatterns.d.ts +441 -0
  80. package/dist/components/organisms/ConfirmDialog.d.ts +50 -0
  81. package/dist/components/organisms/ContentRenderer.d.ts +23 -0
  82. package/dist/components/organisms/CustomPattern.d.ts +104 -0
  83. package/dist/components/organisms/DataTable.d.ts +63 -0
  84. package/dist/components/organisms/DetailPanel.d.ts +71 -0
  85. package/dist/components/organisms/DocumentViewer.d.ts +60 -0
  86. package/dist/components/organisms/DrawerSlot.d.ts +39 -0
  87. package/dist/components/organisms/Form.d.ts +203 -0
  88. package/dist/components/organisms/FormSection.d.ts +59 -0
  89. package/dist/components/organisms/GraphCanvas.d.ts +69 -0
  90. package/dist/components/organisms/Header.d.ts +110 -0
  91. package/dist/components/organisms/JazariStateMachine.d.ts +60 -0
  92. package/dist/components/organisms/LayoutPatterns.d.ts +181 -0
  93. package/dist/components/organisms/List.d.ts +76 -0
  94. package/dist/components/organisms/MasterDetail.d.ts +43 -0
  95. package/dist/components/organisms/MediaGallery.d.ts +66 -0
  96. package/dist/components/organisms/Meter.d.ts +58 -0
  97. package/dist/components/organisms/ModalSlot.d.ts +35 -0
  98. package/dist/components/organisms/Navigation.d.ts +68 -0
  99. package/dist/components/organisms/OrbitalVisualization.d.ts +48 -0
  100. package/dist/components/organisms/PageHeader.d.ts +59 -0
  101. package/dist/components/organisms/Section.d.ts +44 -0
  102. package/dist/components/organisms/Sidebar.d.ts +65 -0
  103. package/dist/components/organisms/SignaturePad.d.ts +44 -0
  104. package/dist/components/organisms/Split.d.ts +42 -0
  105. package/dist/components/organisms/StatCard.d.ts +66 -0
  106. package/dist/components/organisms/StateMachineView.d.ts +36 -0
  107. package/dist/components/organisms/Table.d.ts +99 -0
  108. package/dist/components/organisms/Timeline.d.ts +58 -0
  109. package/dist/components/organisms/ToastSlot.d.ts +38 -0
  110. package/dist/components/organisms/UISlotRenderer.d.ts +112 -0
  111. package/dist/components/organisms/WizardContainer.d.ts +160 -0
  112. package/dist/components/organisms/book/BookChapterView.d.ts +17 -0
  113. package/dist/components/organisms/book/BookCoverPage.d.ts +19 -0
  114. package/dist/components/organisms/book/BookNavBar.d.ts +18 -0
  115. package/dist/components/organisms/book/BookTableOfContents.d.ts +18 -0
  116. package/dist/components/organisms/book/BookViewer.d.ts +28 -0
  117. package/dist/components/organisms/book/index.d.ts +7 -0
  118. package/dist/components/organisms/book/types.d.ts +77 -0
  119. package/dist/components/organisms/game/BattleBoard.d.ts +167 -0
  120. package/dist/components/organisms/game/CanvasEffect.d.ts +68 -0
  121. package/dist/components/organisms/game/CastleBoard.d.ts +85 -0
  122. package/dist/components/organisms/game/DialogueBox.d.ts +73 -0
  123. package/dist/components/organisms/game/GameAudioProvider.d.ts +47 -0
  124. package/dist/components/organisms/game/GameAudioToggle.d.ts +28 -0
  125. package/dist/components/organisms/game/GameHud.d.ts +40 -0
  126. package/dist/components/organisms/game/GameMenu.d.ts +43 -0
  127. package/dist/components/organisms/game/GameOverScreen.d.ts +56 -0
  128. package/dist/components/organisms/game/InventoryPanel.d.ts +67 -0
  129. package/dist/components/organisms/game/IsometricCanvas.d.ts +123 -0
  130. package/dist/components/organisms/game/TraitSlot.d.ts +86 -0
  131. package/dist/components/organisms/game/TraitStateViewer.d.ts +53 -0
  132. package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +26 -0
  133. package/dist/components/organisms/game/WorldMapBoard.d.ts +147 -0
  134. package/dist/components/organisms/game/editor/editorUtils.d.ts +109 -0
  135. package/dist/components/organisms/game/editor/index.d.ts +9 -0
  136. package/dist/components/organisms/game/hooks/useBattleState.d.ts +35 -0
  137. package/dist/components/organisms/game/hooks/useCamera.d.ts +41 -0
  138. package/dist/components/organisms/game/hooks/useGameAudio.d.ts +47 -0
  139. package/dist/components/organisms/game/hooks/useImageCache.d.ts +16 -0
  140. package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +45 -0
  141. package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +43 -0
  142. package/dist/components/organisms/game/index.d.ts +36 -0
  143. package/dist/components/organisms/game/managers/PhysicsManager.d.ts +103 -0
  144. package/dist/components/organisms/game/types/effects.d.ts +253 -0
  145. package/dist/components/organisms/game/types/isometric.d.ts +109 -0
  146. package/dist/components/organisms/game/types/spriteAnimation.d.ts +73 -0
  147. package/dist/components/organisms/game/utils/canvasEffects.d.ts +50 -0
  148. package/dist/components/organisms/game/utils/combatPresets.d.ts +15 -0
  149. package/dist/components/organisms/game/utils/isometric.d.ts +61 -0
  150. package/dist/components/organisms/game/utils/spriteAnimation.d.ts +57 -0
  151. package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +16 -0
  152. package/dist/components/organisms/index.d.ts +37 -0
  153. package/dist/components/organisms/layout/DashboardGrid.d.ts +34 -0
  154. package/dist/components/organisms/layout/MasterDetail.d.ts +32 -0
  155. package/dist/components/organisms/layout/SplitPane.d.ts +34 -0
  156. package/dist/components/organisms/layout/TabbedContainer.d.ts +42 -0
  157. package/dist/components/organisms/layout/index.d.ts +9 -0
  158. package/dist/components/organisms/types.d.ts +65 -0
  159. package/dist/components/templates/AuthLayout.d.ts +14 -0
  160. package/dist/components/templates/BattleTemplate.d.ts +25 -0
  161. package/dist/components/templates/CastleTemplate.d.ts +23 -0
  162. package/dist/components/templates/CounterTemplate.d.ts +44 -0
  163. package/dist/components/templates/DashboardLayout.d.ts +32 -0
  164. package/dist/components/templates/GameShell.d.ts +33 -0
  165. package/dist/components/templates/GameTemplate.d.ts +36 -0
  166. package/dist/components/templates/GenericAppTemplate.d.ts +30 -0
  167. package/dist/components/templates/WorldMapTemplate.d.ts +29 -0
  168. package/dist/components/templates/index.d.ts +10 -0
  169. package/dist/components/templates/types.d.ts +17 -0
  170. package/dist/context/DesignThemeContext.d.ts +21 -0
  171. package/dist/context/ThemeContext.d.ts +104 -0
  172. package/dist/context/UISlotContext.d.ts +75 -0
  173. package/dist/context/UserContext.d.ts +111 -0
  174. package/dist/context/index.d.ts +8 -0
  175. package/dist/hooks/event-bus-types.d.ts +71 -0
  176. package/dist/hooks/index.d.ts +25 -0
  177. package/dist/hooks/useAgentChat.d.ts +104 -0
  178. package/dist/hooks/useAuthContext.d.ts +25 -0
  179. package/dist/hooks/useCompile.d.ts +22 -0
  180. package/dist/hooks/useDeepAgentGeneration.d.ts +46 -0
  181. package/dist/hooks/useEntities.d.ts +52 -0
  182. package/dist/hooks/useEntityData.d.ts +155 -0
  183. package/dist/hooks/useEntityMutations.d.ts +80 -0
  184. package/dist/hooks/useEventBus.d.ts +96 -0
  185. package/dist/hooks/useExtensions.d.ts +32 -0
  186. package/dist/hooks/useFileEditor.d.ts +32 -0
  187. package/dist/hooks/useFileSystem.d.ts +40 -0
  188. package/dist/hooks/useGitHub.d.ts +58 -0
  189. package/dist/hooks/useOrbitalHistory.d.ts +39 -0
  190. package/dist/hooks/useOrbitalMutations.d.ts +95 -0
  191. package/dist/hooks/usePreview.d.ts +57 -0
  192. package/dist/hooks/useQuerySingleton.d.ts +78 -0
  193. package/dist/hooks/useResolvedEntity.d.ts +32 -0
  194. package/dist/hooks/useTranslate.d.ts +35 -0
  195. package/dist/hooks/useUIEvents.d.ts +35 -0
  196. package/dist/hooks/useUISlots.d.ts +84 -0
  197. package/dist/hooks/useValidation.d.ts +46 -0
  198. package/dist/lib/api-client.d.ts +42 -0
  199. package/dist/lib/cn.d.ts +6 -0
  200. package/dist/lib/debug.d.ts +43 -0
  201. package/dist/lib/debugRegistry.d.ts +29 -0
  202. package/dist/lib/debugUtils.d.ts +27 -0
  203. package/dist/lib/entityDebug.d.ts +38 -0
  204. package/dist/lib/getNestedValue.d.ts +33 -0
  205. package/dist/lib/guardRegistry.d.ts +32 -0
  206. package/dist/lib/index.d.ts +18 -0
  207. package/dist/lib/jazari/svg-paths.d.ts +61 -0
  208. package/dist/lib/parseContentSegments.d.ts +41 -0
  209. package/dist/lib/tickRegistry.d.ts +40 -0
  210. package/dist/lib/traitRegistry.d.ts +34 -0
  211. package/dist/lib/verificationRegistry.d.ts +107 -0
  212. package/dist/lib/visualizer/index.d.ts +143 -0
  213. package/dist/locales/index.d.ts +20 -0
  214. package/dist/providers/EventBusProvider.d.ts +60 -0
  215. package/dist/providers/FetchedDataProvider.d.ts +105 -0
  216. package/dist/providers/OfflineModeProvider.d.ts +79 -0
  217. package/dist/providers/OrbitalProvider.d.ts +101 -0
  218. package/dist/providers/SelectionProvider.d.ts +81 -0
  219. package/dist/providers/VerificationProvider.d.ts +63 -0
  220. package/dist/providers/index.d.ts +17 -0
  221. package/dist/providers/index.js +3 -3
  222. package/dist/renderer/client-effect-executor.d.ts +68 -0
  223. package/dist/renderer/data-resolver.d.ts +68 -0
  224. package/dist/renderer/index.d.ts +28 -0
  225. package/dist/renderer/index.js +1 -1
  226. package/dist/renderer/init.d.ts +14 -0
  227. package/dist/renderer/navigation.d.ts +142 -0
  228. package/dist/renderer/offline-executor.d.ts +238 -0
  229. package/dist/renderer/pattern-resolver.d.ts +91 -0
  230. package/dist/renderer/slot-definitions.d.ts +45 -0
  231. package/dist/renderer/types.d.ts +160 -0
  232. package/dist/renderer/useClientEffects.d.ts +88 -0
  233. package/dist/stores/entityStore.d.ts +99 -0
  234. package/dist/stores/filtering.d.ts +51 -0
  235. package/dist/stores/index.d.ts +7 -0
  236. package/package.json +4 -3
  237. package/dist/{chunk-YNP2OBK4.js → chunk-RIZ76XRF.js} +1 -1
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Layout Pattern Components
3
+ *
4
+ * Pattern wrappers for layout components that support recursive rendering
5
+ * of nested patterns via the `children` prop.
6
+ *
7
+ * These components bridge the shell's layout primitives (Stack, Box, Grid, etc.)
8
+ * with the pattern system's recursive rendering capability.
9
+ *
10
+ * @packageDocumentation
11
+ */
12
+ import React from 'react';
13
+ import { type StackGap, type StackAlign, type StackJustify } from '../atoms/Stack';
14
+ import { type BoxPadding, type BoxBg, type BoxRounded, type BoxShadow } from '../atoms/Box';
15
+ import { type GridCols, type GridGap, type ResponsiveGridCols } from '../molecules/Grid';
16
+ import { type DividerVariant, type DividerOrientation } from '../atoms/Divider';
17
+ /**
18
+ * Base props for all layout patterns with children support.
19
+ */
20
+ export interface LayoutPatternProps {
21
+ /** Nested pattern configurations - rendered recursively */
22
+ children?: React.ReactNode;
23
+ /** Additional CSS classes */
24
+ className?: string;
25
+ /** Inline styles */
26
+ style?: React.CSSProperties;
27
+ /** Loading state */
28
+ isLoading?: boolean;
29
+ /** Error state */
30
+ error?: Error | null;
31
+ /** Entity name */
32
+ entity?: string;
33
+ }
34
+ export interface VStackPatternProps extends LayoutPatternProps {
35
+ /** Gap between children */
36
+ gap?: StackGap;
37
+ /** Cross-axis alignment */
38
+ align?: StackAlign;
39
+ /** Main-axis alignment */
40
+ justify?: StackJustify;
41
+ }
42
+ /**
43
+ * VStack pattern component.
44
+ *
45
+ * Renders children in a vertical stack with configurable spacing.
46
+ */
47
+ export declare function VStackPattern({ gap, align, justify, className, style, children, }: VStackPatternProps): React.ReactElement;
48
+ export declare namespace VStackPattern {
49
+ var displayName: string;
50
+ }
51
+ export interface HStackPatternProps extends LayoutPatternProps {
52
+ /** Gap between children */
53
+ gap?: StackGap;
54
+ /** Cross-axis alignment */
55
+ align?: StackAlign;
56
+ /** Main-axis alignment */
57
+ justify?: StackJustify;
58
+ /** Enable wrapping */
59
+ wrap?: boolean;
60
+ }
61
+ /**
62
+ * HStack pattern component.
63
+ *
64
+ * Renders children in a horizontal stack with configurable spacing.
65
+ */
66
+ export declare function HStackPattern({ gap, align, justify, wrap, className, style, children, }: HStackPatternProps): React.ReactElement;
67
+ export declare namespace HStackPattern {
68
+ var displayName: string;
69
+ }
70
+ export interface BoxPatternProps extends LayoutPatternProps {
71
+ /** Padding shorthand */
72
+ p?: BoxPadding;
73
+ /** Margin shorthand */
74
+ m?: BoxPadding;
75
+ /** Background color token */
76
+ bg?: BoxBg;
77
+ /** Show border */
78
+ border?: boolean;
79
+ /** Border radius */
80
+ radius?: BoxRounded;
81
+ /** Shadow level */
82
+ shadow?: BoxShadow;
83
+ }
84
+ /**
85
+ * Box pattern component.
86
+ *
87
+ * Generic styled container with theming support.
88
+ */
89
+ export declare function BoxPattern({ p, m, bg, border, radius, shadow, className, style, children, }: BoxPatternProps): React.ReactElement;
90
+ export declare namespace BoxPattern {
91
+ var displayName: string;
92
+ }
93
+ export interface GridPatternProps extends LayoutPatternProps {
94
+ /** Number of columns */
95
+ cols?: GridCols | ResponsiveGridCols;
96
+ /** Gap between cells */
97
+ gap?: GridGap;
98
+ /** Row gap override */
99
+ rowGap?: GridGap;
100
+ /** Column gap override */
101
+ colGap?: GridGap;
102
+ }
103
+ /**
104
+ * Grid pattern component.
105
+ *
106
+ * CSS Grid layout for multi-column content.
107
+ */
108
+ export declare function GridPattern({ cols, gap, rowGap, colGap, className, style, children, }: GridPatternProps): React.ReactElement;
109
+ export declare namespace GridPattern {
110
+ var displayName: string;
111
+ }
112
+ export interface CenterPatternProps extends LayoutPatternProps {
113
+ /** Minimum height */
114
+ minHeight?: string;
115
+ }
116
+ /**
117
+ * Center pattern component.
118
+ *
119
+ * Centers content horizontally and vertically.
120
+ */
121
+ export declare function CenterPattern({ minHeight, className, style, children, }: CenterPatternProps): React.ReactElement;
122
+ export declare namespace CenterPattern {
123
+ var displayName: string;
124
+ }
125
+ export interface SpacerPatternProps {
126
+ /** Size or 'flex' for flexible */
127
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'flex';
128
+ /** Additional CSS classes */
129
+ className?: string;
130
+ /** Loading state */
131
+ isLoading?: boolean;
132
+ /** Error state */
133
+ error?: Error | null;
134
+ /** Entity name */
135
+ entity?: string;
136
+ }
137
+ /**
138
+ * Spacer pattern component.
139
+ *
140
+ * Flexible space that expands or has fixed size.
141
+ */
142
+ export declare function SpacerPattern({ size }: SpacerPatternProps): React.ReactElement;
143
+ export declare namespace SpacerPattern {
144
+ var displayName: string;
145
+ }
146
+ export interface DividerPatternProps {
147
+ /** Orientation */
148
+ orientation?: DividerOrientation;
149
+ /** Line style */
150
+ variant?: DividerVariant;
151
+ /** Color token */
152
+ color?: string;
153
+ /** Spacing around divider */
154
+ spacing?: 'xs' | 'sm' | 'md' | 'lg';
155
+ /** Additional CSS classes */
156
+ className?: string;
157
+ /** Loading state */
158
+ isLoading?: boolean;
159
+ /** Error state */
160
+ error?: Error | null;
161
+ /** Entity name */
162
+ entity?: string;
163
+ }
164
+ /**
165
+ * Divider pattern component.
166
+ *
167
+ * Visual separator between sections.
168
+ */
169
+ export declare function DividerPattern({ orientation, variant, spacing, }: DividerPatternProps): React.ReactElement;
170
+ export declare namespace DividerPattern {
171
+ var displayName: string;
172
+ }
173
+ export declare const LAYOUT_PATTERNS: {
174
+ readonly vstack: typeof VStackPattern;
175
+ readonly hstack: typeof HStackPattern;
176
+ readonly box: typeof BoxPattern;
177
+ readonly grid: typeof GridPattern;
178
+ readonly center: typeof CenterPattern;
179
+ readonly spacer: typeof SpacerPattern;
180
+ readonly divider: typeof DividerPattern;
181
+ };
@@ -0,0 +1,76 @@
1
+ /**
2
+ * List Organism Component
3
+ *
4
+ * A beautifully designed, scannable list view.
5
+ *
6
+ * Design inspiration: Linear, Notion, Apple Reminders
7
+ * - Soft, harmonious color palette
8
+ * - Refined typography with proper hierarchy
9
+ * - Subtle shadows and depth
10
+ * - Delightful hover micro-interactions
11
+ * - Elegant status indicators
12
+ *
13
+ * Closed Circuit Compliance (Dumb Organism):
14
+ * - Receives ALL data via props (no internal fetch)
15
+ * - Emits events via useEventBus (UI:SELECT, UI:DESELECT, UI:VIEW)
16
+ * - Never listens to events — only emits
17
+ * - No internal search/filter state — trait provides filtered data
18
+ */
19
+ import React from "react";
20
+ import type { LucideIcon } from "lucide-react";
21
+ import { type MenuItem } from "../molecules/Menu";
22
+ import type { EntityDisplayProps } from "./types";
23
+ export interface ListItem {
24
+ id: string;
25
+ title?: string;
26
+ description?: string;
27
+ icon?: LucideIcon;
28
+ avatar?: {
29
+ src?: string;
30
+ alt?: string;
31
+ initials?: string;
32
+ };
33
+ badge?: string | number;
34
+ metadata?: React.ReactNode;
35
+ onClick?: () => void;
36
+ disabled?: boolean;
37
+ completed?: boolean;
38
+ [key: string]: unknown;
39
+ _fields?: Record<string, unknown>;
40
+ }
41
+ export interface SchemaItemAction {
42
+ label: string;
43
+ /** Event to dispatch on click */
44
+ event?: string;
45
+ navigatesTo?: string;
46
+ /** Action placement - accepts all common placement values */
47
+ placement?: "row" | "bulk" | "card" | "footer" | string;
48
+ action?: string;
49
+ variant?: "primary" | "secondary" | "ghost" | "danger" | "default";
50
+ /** Click handler from generated code */
51
+ onClick?: (row: unknown) => void;
52
+ }
53
+ /**
54
+ * Field definition - can be a simple string or object with key/header
55
+ */
56
+ export type FieldDef = string | {
57
+ key: string;
58
+ header?: string;
59
+ };
60
+ export interface ListProps extends EntityDisplayProps {
61
+ /** Entity type name for display */
62
+ entityType?: string;
63
+ selectable?: boolean;
64
+ /** Item actions - schema-driven or function-based */
65
+ itemActions?: ((item: ListItem) => MenuItem[]) | readonly SchemaItemAction[];
66
+ showDividers?: boolean;
67
+ variant?: "default" | "card";
68
+ emptyMessage?: string;
69
+ renderItem?: (item: ListItem, index: number) => React.ReactNode;
70
+ children?: React.ReactNode;
71
+ /** Fields to display - accepts string[] or {key, header}[] for unified interface */
72
+ fields?: readonly FieldDef[];
73
+ /** Alias for fields - backwards compatibility */
74
+ fieldNames?: readonly string[];
75
+ }
76
+ export declare const List: React.FC<ListProps>;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * MasterDetail Component
3
+ *
4
+ * A layout pattern that shows a list/table of entities.
5
+ * This is a thin wrapper around DataTable that accepts master-detail specific props.
6
+ *
7
+ * When `entity` prop is provided without `data`, automatically fetches data
8
+ * using the useEntityList hook.
9
+ *
10
+ * The "detail" part is typically rendered separately via another render_ui effect
11
+ * to a sidebar or detail panel when an item is selected.
12
+ */
13
+ import React from 'react';
14
+ export interface MasterDetailProps<T extends {
15
+ id: string | number;
16
+ } = {
17
+ id: string | number;
18
+ }> {
19
+ /** Entity type name - when provided without data, auto-fetches from API */
20
+ entity?: string;
21
+ /** Fields to show in the master list (maps to DataTable columns) */
22
+ masterFields?: readonly string[];
23
+ /** Fields for detail view (passed through but typically handled by separate render_ui) */
24
+ detailFields?: readonly string[];
25
+ /** Data array - if not provided and entity is set, data is auto-fetched */
26
+ data?: readonly T[] | T[];
27
+ /** Loading state */
28
+ loading?: boolean;
29
+ /** Loading state alias */
30
+ isLoading?: boolean;
31
+ /** Error state */
32
+ error?: Error | null;
33
+ /** Additional class name */
34
+ className?: string;
35
+ }
36
+ export declare function MasterDetail<T extends {
37
+ id: string | number;
38
+ }>({ entity, masterFields, detailFields: _detailFields, // Captured but not used here - detail handled separately
39
+ data: externalData, loading: externalLoading, isLoading: externalIsLoading, error: externalError, className, ...rest }: MasterDetailProps<T>): React.ReactElement;
40
+ export declare namespace MasterDetail {
41
+ var displayName: string;
42
+ }
43
+ export default MasterDetail;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * MediaGallery Organism Component
3
+ *
4
+ * A gallery component for displaying images and media in a grid layout.
5
+ * Supports lightbox viewing, selection, and upload interactions.
6
+ *
7
+ * Orbital Component Interface Compliance:
8
+ * - Entity binding with auto-fetch when entity is a string
9
+ * - Event emission via useEventBus (UI:* events)
10
+ * - isLoading and error state props
11
+ * - className for external styling
12
+ */
13
+ import React from "react";
14
+ export interface MediaItem {
15
+ /** Unique identifier */
16
+ id: string;
17
+ /** Media URL */
18
+ src: string;
19
+ /** Alt text */
20
+ alt?: string;
21
+ /** Thumbnail URL (defaults to src) */
22
+ thumbnail?: string;
23
+ /** Media type */
24
+ mediaType?: "image" | "video";
25
+ /** Caption */
26
+ caption?: string;
27
+ /** File size */
28
+ fileSize?: string;
29
+ }
30
+ export interface MediaGalleryAction {
31
+ label: string;
32
+ event?: string;
33
+ navigatesTo?: string;
34
+ variant?: "primary" | "secondary" | "ghost";
35
+ }
36
+ export interface MediaGalleryProps {
37
+ /** Gallery title */
38
+ title?: string;
39
+ /** Media items */
40
+ items?: readonly MediaItem[];
41
+ /** Schema-driven data */
42
+ data?: readonly Record<string, unknown>[];
43
+ /** Column count */
44
+ columns?: 2 | 3 | 4 | 5 | 6;
45
+ /** Enable item selection */
46
+ selectable?: boolean;
47
+ /** Selected item IDs */
48
+ selectedItems?: readonly string[];
49
+ /** Selection change callback */
50
+ onSelectionChange?: (ids: string[]) => void;
51
+ /** Show upload button */
52
+ showUpload?: boolean;
53
+ /** Actions */
54
+ actions?: readonly MediaGalleryAction[];
55
+ /** Aspect ratio for thumbnails */
56
+ aspectRatio?: "square" | "landscape" | "portrait";
57
+ /** Entity name for schema-driven auto-fetch */
58
+ entity?: string;
59
+ /** Loading state */
60
+ isLoading?: boolean;
61
+ /** Error state */
62
+ error?: Error | null;
63
+ /** Additional CSS classes */
64
+ className?: string;
65
+ }
66
+ export declare const MediaGallery: React.FC<MediaGalleryProps>;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Meter Organism Component
3
+ *
4
+ * A gauge/meter component for displaying a value within a range.
5
+ * Supports linear, radial, and segmented display modes.
6
+ *
7
+ * Orbital Component Interface Compliance:
8
+ * - Entity binding with auto-fetch when entity is a string
9
+ * - Event emission via useEventBus (UI:* events)
10
+ * - isLoading and error state props
11
+ * - className for external styling
12
+ */
13
+ import React from "react";
14
+ export type MeterVariant = "linear" | "radial" | "segmented";
15
+ export interface MeterThreshold {
16
+ value: number;
17
+ color: string;
18
+ label?: string;
19
+ }
20
+ export interface MeterAction {
21
+ label: string;
22
+ event?: string;
23
+ navigatesTo?: string;
24
+ variant?: "primary" | "secondary" | "ghost";
25
+ }
26
+ export interface MeterProps {
27
+ /** Current value */
28
+ value: number;
29
+ /** Minimum value */
30
+ min?: number;
31
+ /** Maximum value */
32
+ max?: number;
33
+ /** Display label */
34
+ label?: string;
35
+ /** Unit suffix (e.g., '%', 'MB', 'credits') */
36
+ unit?: string;
37
+ /** Display variant */
38
+ variant?: MeterVariant;
39
+ /** Color thresholds */
40
+ thresholds?: readonly MeterThreshold[];
41
+ /** Number of segments (for segmented variant) */
42
+ segments?: number;
43
+ /** Show value text */
44
+ showValue?: boolean;
45
+ /** Size (for radial variant) */
46
+ size?: "sm" | "md" | "lg";
47
+ /** Actions */
48
+ actions?: readonly MeterAction[];
49
+ /** Entity name for schema-driven auto-fetch */
50
+ entity?: string;
51
+ /** Loading state */
52
+ isLoading?: boolean;
53
+ /** Error state */
54
+ error?: Error | null;
55
+ /** Additional CSS classes */
56
+ className?: string;
57
+ }
58
+ export declare const Meter: React.FC<MeterProps>;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * ModalSlot Component
3
+ *
4
+ * Wraps modal slot content in a proper Modal component.
5
+ * Used by trait-driven pages to display modal UI from render_ui effects.
6
+ *
7
+ * Handles:
8
+ * - Auto-open when content is present
9
+ * - Dispatches CLOSE/CANCEL events when closed
10
+ * - Extracts title from Form components
11
+ */
12
+ import React from 'react';
13
+ export interface ModalSlotProps {
14
+ /** Content to display in the modal */
15
+ children?: React.ReactNode;
16
+ /** Override modal title (extracted from children if not provided) */
17
+ title?: string;
18
+ /** Modal size */
19
+ size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
20
+ /** Custom class name */
21
+ className?: string;
22
+ /** Loading state indicator */
23
+ isLoading?: boolean;
24
+ /** Error state */
25
+ error?: Error | null;
26
+ /** Entity name for schema-driven auto-fetch */
27
+ entity?: string;
28
+ }
29
+ /**
30
+ * ModalSlot - Wrapper for modal slot content
31
+ *
32
+ * Automatically shows modal when children are present,
33
+ * and dispatches close events when modal is dismissed.
34
+ */
35
+ export declare const ModalSlot: React.FC<ModalSlotProps>;
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Navigation Organism Component
3
+ *
4
+ * A navigation component with items, active indicators, icons, and badges.
5
+ * Uses Menu, ButtonGroup molecules and Button, Icon, Badge, Typography, Divider atoms.
6
+ */
7
+ import React from 'react';
8
+ import type { LucideIcon } from 'lucide-react';
9
+ export interface NavigationItem {
10
+ /**
11
+ * Item ID
12
+ */
13
+ id: string;
14
+ /**
15
+ * Item label
16
+ */
17
+ label: string;
18
+ /**
19
+ * Item icon
20
+ */
21
+ icon?: LucideIcon;
22
+ /**
23
+ * Item badge
24
+ */
25
+ badge?: string | number;
26
+ /**
27
+ * Item href
28
+ */
29
+ href?: string;
30
+ /**
31
+ * Item click handler
32
+ */
33
+ onClick?: () => void;
34
+ /**
35
+ * Is active
36
+ */
37
+ isActive?: boolean;
38
+ /**
39
+ * Disable item
40
+ */
41
+ disabled?: boolean;
42
+ /**
43
+ * Sub-menu items
44
+ */
45
+ subMenu?: NavigationItem[];
46
+ }
47
+ export interface NavigationProps {
48
+ /**
49
+ * Navigation items
50
+ */
51
+ items: NavigationItem[];
52
+ /**
53
+ * Navigation orientation
54
+ * @default 'horizontal'
55
+ */
56
+ orientation?: 'horizontal' | 'vertical';
57
+ /**
58
+ * Additional CSS classes
59
+ */
60
+ className?: string;
61
+ /** Loading state indicator */
62
+ isLoading?: boolean;
63
+ /** Error state */
64
+ error?: Error | null;
65
+ /** Entity name for schema-driven auto-fetch */
66
+ entity?: string;
67
+ }
68
+ export declare const Navigation: React.FC<NavigationProps>;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * OrbitalVisualization Component
3
+ *
4
+ * Visualizes KFlow schemas as atomic orbitals based on complexity.
5
+ * Uses CSS 3D transforms for lightweight rendering without Three.js.
6
+ *
7
+ * Orbital Types (based on complexity score):
8
+ * - 1s (1-3): Simple sphere - Red
9
+ * - 2s (4-8): Larger sphere - Orange
10
+ * - 2p (9-15): Dumbbell shape - Yellow
11
+ * - 3s (16-25): Sphere with node - Green
12
+ * - 3p (26-40): Complex dumbbell - Blue
13
+ * - 3d (41-60): Cloverleaf - Indigo
14
+ * - 4f (61+): Multi-lobe - Violet
15
+ */
16
+ import React from "react";
17
+ export interface OrbitalVisualizationProps {
18
+ /** Full KFlow schema object */
19
+ schema?: {
20
+ dataEntities?: unknown[];
21
+ ui?: {
22
+ pages?: {
23
+ sections?: unknown[];
24
+ }[];
25
+ };
26
+ traits?: unknown[];
27
+ };
28
+ /** Direct complexity override (1-100+) */
29
+ complexity?: number;
30
+ /** Size of the visualization */
31
+ size?: "sm" | "md" | "lg" | "xl";
32
+ /** Show complexity label */
33
+ showLabel?: boolean;
34
+ /** Animation enabled */
35
+ animated?: boolean;
36
+ /** Click handler */
37
+ onClick?: () => void;
38
+ /** Additional CSS classes */
39
+ className?: string;
40
+ /** Loading state indicator */
41
+ isLoading?: boolean;
42
+ /** Error state */
43
+ error?: Error | null;
44
+ /** Entity name for schema-driven auto-fetch */
45
+ entity?: string;
46
+ }
47
+ export declare const OrbitalVisualization: React.FC<OrbitalVisualizationProps>;
48
+ export default OrbitalVisualization;
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+ import { LucideIcon } from "lucide-react";
3
+ export interface PageBreadcrumb {
4
+ label: string;
5
+ href?: string;
6
+ }
7
+ /**
8
+ * Schema-based action definition
9
+ */
10
+ export interface SchemaAction {
11
+ label: string;
12
+ /** Navigate to URL when clicked */
13
+ navigatesTo?: string;
14
+ /** Custom click handler */
15
+ onClick?: () => void;
16
+ /** Event to dispatch via event bus (for trait state machine integration) */
17
+ event?: string;
18
+ variant?: "primary" | "secondary" | "ghost" | "danger";
19
+ icon?: LucideIcon;
20
+ loading?: boolean;
21
+ disabled?: boolean;
22
+ }
23
+ export interface PageHeaderProps {
24
+ /** Page title - accepts unknown to handle generated code accessing dynamic entity data */
25
+ title?: string | number | unknown;
26
+ /** Optional subtitle/description */
27
+ subtitle?: string | number | unknown;
28
+ /** Show back button */
29
+ showBack?: boolean;
30
+ /** Event to emit when back is clicked (default: BACK) */
31
+ backEvent?: string;
32
+ /** Breadcrumbs */
33
+ breadcrumbs?: readonly PageBreadcrumb[];
34
+ /** Status badge */
35
+ status?: {
36
+ label: string;
37
+ variant?: "default" | "success" | "warning" | "danger" | "info";
38
+ };
39
+ /** Actions array - first action with variant='primary' (or first action) is the main action */
40
+ actions?: readonly Readonly<SchemaAction>[];
41
+ /** Loading state indicator */
42
+ isLoading?: boolean;
43
+ /** Error state */
44
+ error?: Error | null;
45
+ /** Entity name for schema-driven auto-fetch */
46
+ entity?: string;
47
+ /** Tabs for sub-navigation */
48
+ tabs?: ReadonlyArray<{
49
+ label: string;
50
+ value: string;
51
+ count?: number;
52
+ }>;
53
+ activeTab?: string;
54
+ onTabChange?: (value: string) => void;
55
+ /** Custom content in the header */
56
+ children?: React.ReactNode;
57
+ className?: string;
58
+ }
59
+ export declare const PageHeader: React.FC<PageHeaderProps>;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Section Component
3
+ *
4
+ * A semantic section wrapper with optional title, description, and action.
5
+ * Perfect for grouping related content with consistent spacing.
6
+ */
7
+ import React from 'react';
8
+ export type SectionPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
9
+ export type SectionVariant = 'default' | 'card' | 'bordered' | 'filled';
10
+ export interface SectionProps {
11
+ /** Section title */
12
+ title?: string;
13
+ /** Section subtitle/description */
14
+ description?: string;
15
+ /** Action element (e.g., button, link) */
16
+ action?: React.ReactNode;
17
+ /** Padding amount */
18
+ padding?: SectionPadding;
19
+ /** Visual variant */
20
+ variant?: SectionVariant;
21
+ /** Show divider below header */
22
+ divider?: boolean;
23
+ /** Custom class name */
24
+ className?: string;
25
+ /** Children elements */
26
+ children: React.ReactNode;
27
+ /** Header custom class name */
28
+ headerClassName?: string;
29
+ /** Content custom class name */
30
+ contentClassName?: string;
31
+ /** HTML element to render as */
32
+ as?: React.ElementType;
33
+ /** Loading state indicator */
34
+ isLoading?: boolean;
35
+ /** Error state */
36
+ error?: Error | null;
37
+ /** Entity name for schema-driven auto-fetch */
38
+ entity?: string;
39
+ }
40
+ /**
41
+ * Section - Semantic content grouping with header
42
+ */
43
+ export declare const Section: React.FC<SectionProps>;
44
+ export default Section;