@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,38 @@
|
|
|
1
|
+
export { ErrorBoundary, type ErrorBoundaryProps } from './ErrorBoundary';
|
|
2
|
+
export { FormField, type FormFieldProps } from './FormField';
|
|
3
|
+
export { EmptyState, type EmptyStateProps } from './EmptyState';
|
|
4
|
+
export { LoadingState, type LoadingStateProps } from './LoadingState';
|
|
5
|
+
export { ErrorState, type ErrorStateProps } from './ErrorState';
|
|
6
|
+
export { Skeleton, type SkeletonProps, type SkeletonVariant } from './Skeleton';
|
|
7
|
+
export { Accordion, type AccordionProps, type AccordionItem } from './Accordion';
|
|
8
|
+
export { Alert, type AlertProps, type AlertVariant } from './Alert';
|
|
9
|
+
export { Breadcrumb, type BreadcrumbProps, type BreadcrumbItem } from './Breadcrumb';
|
|
10
|
+
export { ButtonGroup, type ButtonGroupProps } from './ButtonGroup';
|
|
11
|
+
export { FilterGroup, type FilterGroupProps, type FilterDefinition } from './FilterGroup';
|
|
12
|
+
export { Card as ActionCard, type CardProps as ActionCardProps, type CardAction } from './Card';
|
|
13
|
+
export { Container, type ContainerProps } from './Container';
|
|
14
|
+
export { Flex, type FlexProps } from './Flex';
|
|
15
|
+
export { FloatingActionButton, type FloatingActionButtonProps } from './FloatingActionButton';
|
|
16
|
+
export { Grid, type GridProps } from './Grid';
|
|
17
|
+
export { InputGroup, type InputGroupProps } from './InputGroup';
|
|
18
|
+
export { Menu, type MenuProps, type MenuItem } from './Menu';
|
|
19
|
+
export { Modal, type ModalProps, type ModalSize } from './Modal';
|
|
20
|
+
export { Pagination, type PaginationProps } from './Pagination';
|
|
21
|
+
export { Popover, type PopoverProps } from './Popover';
|
|
22
|
+
export { RelationSelect, type RelationSelectProps, type RelationOption } from './RelationSelect';
|
|
23
|
+
export { SearchInput, type SearchInputProps } from './SearchInput';
|
|
24
|
+
export { SidePanel, type SidePanelProps } from './SidePanel';
|
|
25
|
+
export { SimpleGrid, type SimpleGridProps } from './SimpleGrid';
|
|
26
|
+
export { Tabs, type TabsProps, type TabItem } from './Tabs';
|
|
27
|
+
export { Toast, type ToastProps, type ToastVariant } from './Toast';
|
|
28
|
+
export { Tooltip, type TooltipProps } from './Tooltip';
|
|
29
|
+
export { Drawer, type DrawerProps, type DrawerPosition, type DrawerSize } from './Drawer';
|
|
30
|
+
export { WizardProgress, type WizardProgressProps, type WizardProgressStep } from './WizardProgress';
|
|
31
|
+
export { WizardNavigation, type WizardNavigationProps } from './WizardNavigation';
|
|
32
|
+
export { MarkdownContent, type MarkdownContentProps } from './markdown/MarkdownContent';
|
|
33
|
+
export { CodeBlock, type CodeBlockProps } from './markdown/CodeBlock';
|
|
34
|
+
export { QuizBlock, type QuizBlockProps } from './QuizBlock';
|
|
35
|
+
export { ScaledDiagram, type ScaledDiagramProps } from './ScaledDiagram';
|
|
36
|
+
export { RepeatableFormSection, type RepeatableFormSectionProps, type RepeatableItem } from './RepeatableFormSection';
|
|
37
|
+
export { ViolationAlert, type ViolationAlertProps, type ViolationRecord } from './ViolationAlert';
|
|
38
|
+
export { FormSectionHeader, type FormSectionHeaderProps } from './FormSectionHeader';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeBlock Molecule Component
|
|
3
|
+
*
|
|
4
|
+
* A syntax-highlighted code block with copy-to-clipboard functionality.
|
|
5
|
+
* Preserves scroll position during re-renders.
|
|
6
|
+
*
|
|
7
|
+
* Event Contract:
|
|
8
|
+
* - Emits: UI:COPY_CODE { language, success }
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export interface CodeBlockProps {
|
|
12
|
+
/** The code content to display */
|
|
13
|
+
code: string;
|
|
14
|
+
/** Programming language for syntax highlighting */
|
|
15
|
+
language?: string;
|
|
16
|
+
/** Show the copy button */
|
|
17
|
+
showCopyButton?: boolean;
|
|
18
|
+
/** Show the language badge */
|
|
19
|
+
showLanguageBadge?: boolean;
|
|
20
|
+
/** Maximum height before scrolling */
|
|
21
|
+
maxHeight?: string;
|
|
22
|
+
/** Additional CSS classes */
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const CodeBlock: React.NamedExoticComponent<CodeBlockProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MarkdownContent Molecule Component
|
|
3
|
+
*
|
|
4
|
+
* Renders markdown content with support for GFM (GitHub Flavored Markdown)
|
|
5
|
+
* and math equations (KaTeX). Handles inline code only — fenced code blocks
|
|
6
|
+
* should be parsed out and rendered with CodeBlock component.
|
|
7
|
+
*
|
|
8
|
+
* Event Contract:
|
|
9
|
+
* - No events emitted (display-only component)
|
|
10
|
+
* - entityAware: false
|
|
11
|
+
*
|
|
12
|
+
* NOTE: react-markdown's `components` override API requires native HTML
|
|
13
|
+
* elements — this is the same library-boundary exception as `<iframe>` in
|
|
14
|
+
* DocumentViewer and `<svg>` in JazariStateMachine/StateMachineView.
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import 'katex/dist/katex.min.css';
|
|
18
|
+
export interface MarkdownContentProps {
|
|
19
|
+
/** The markdown content to render */
|
|
20
|
+
content: string;
|
|
21
|
+
/** Text direction */
|
|
22
|
+
direction?: 'rtl' | 'ltr';
|
|
23
|
+
/** Additional CSS classes */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const MarkdownContent: React.NamedExoticComponent<MarkdownContentProps>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CardGrid Component
|
|
3
|
+
*
|
|
4
|
+
* A dumb, responsive grid specifically designed for card layouts.
|
|
5
|
+
* Uses CSS Grid auto-fit for automatic responsive columns.
|
|
6
|
+
*
|
|
7
|
+
* Data comes exclusively from the `data` prop (provided by the trait via render-ui).
|
|
8
|
+
* All user interactions emit events via useEventBus — never manages internal state
|
|
9
|
+
* for pagination, filtering, or search. All state is owned by the trait state machine.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { EntityDisplayProps } from './types';
|
|
13
|
+
export type CardGridGap = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
/**
|
|
15
|
+
* Action configuration for card items (schema-driven)
|
|
16
|
+
*/
|
|
17
|
+
export interface CardItemAction {
|
|
18
|
+
/** Action button label */
|
|
19
|
+
label: string;
|
|
20
|
+
/** Event to dispatch on click (schema metadata) */
|
|
21
|
+
event?: string;
|
|
22
|
+
/** Navigation URL - supports template interpolation like "/products/{{row.id}}" */
|
|
23
|
+
navigatesTo?: string;
|
|
24
|
+
/** Callback on click */
|
|
25
|
+
onClick?: (item: unknown) => void;
|
|
26
|
+
/** Action used by generated code - alternative to event */
|
|
27
|
+
action?: string;
|
|
28
|
+
/** Action placement - accepts string for compatibility with generated code */
|
|
29
|
+
placement?: 'card' | 'footer' | 'row' | string;
|
|
30
|
+
/** Button variant - accepts string for compatibility with generated code */
|
|
31
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Field definition - can be a simple string or object with key/header
|
|
35
|
+
*/
|
|
36
|
+
export type FieldDef = string | {
|
|
37
|
+
key: string;
|
|
38
|
+
header?: string;
|
|
39
|
+
};
|
|
40
|
+
export interface CardGridProps extends EntityDisplayProps {
|
|
41
|
+
/** Minimum width of each card (default: 280px) */
|
|
42
|
+
minCardWidth?: number;
|
|
43
|
+
/** Maximum number of columns */
|
|
44
|
+
maxCols?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
45
|
+
/** Gap between cards */
|
|
46
|
+
gap?: CardGridGap;
|
|
47
|
+
/** Align cards vertically in their cells */
|
|
48
|
+
alignItems?: 'start' | 'center' | 'end' | 'stretch';
|
|
49
|
+
/** Children elements (cards) - optional when using entity/data props */
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
/** Fields to display - accepts string[] or {key, header}[] for unified interface */
|
|
52
|
+
fields?: readonly FieldDef[];
|
|
53
|
+
/** Alias for fields - backwards compatibility */
|
|
54
|
+
fieldNames?: readonly string[];
|
|
55
|
+
/** Alias for fields - backwards compatibility */
|
|
56
|
+
columns?: readonly FieldDef[];
|
|
57
|
+
/** Actions for each card item (schema-driven) */
|
|
58
|
+
itemActions?: readonly CardItemAction[];
|
|
59
|
+
/** Show total count in pagination */
|
|
60
|
+
showTotal?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* CardGrid - Responsive card collection layout
|
|
64
|
+
*
|
|
65
|
+
* Can be used in two ways:
|
|
66
|
+
* 1. With children: <CardGrid><Card>...</Card></CardGrid>
|
|
67
|
+
* 2. With data: <CardGrid entity="Task" fieldNames={['title']} data={tasks} />
|
|
68
|
+
*
|
|
69
|
+
* All data comes from the `data` prop. Pagination display hints come from
|
|
70
|
+
* `page`, `pageSize`, and `totalCount` props (set by the trait via render-ui).
|
|
71
|
+
*/
|
|
72
|
+
export declare const CardGrid: React.FC<CardGridProps>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart Organism Component
|
|
3
|
+
*
|
|
4
|
+
* A data visualization component supporting bar, line, pie, and area chart types.
|
|
5
|
+
* Composes atoms and molecules for layout, uses CSS variables for theming.
|
|
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 ChartType = "bar" | "line" | "pie" | "area" | "donut";
|
|
15
|
+
export interface ChartDataPoint {
|
|
16
|
+
label: string;
|
|
17
|
+
value: number;
|
|
18
|
+
color?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ChartSeries {
|
|
21
|
+
name: string;
|
|
22
|
+
data: readonly ChartDataPoint[];
|
|
23
|
+
color?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ChartAction {
|
|
26
|
+
label: string;
|
|
27
|
+
event?: string;
|
|
28
|
+
navigatesTo?: string;
|
|
29
|
+
variant?: "primary" | "secondary" | "ghost";
|
|
30
|
+
}
|
|
31
|
+
export interface ChartProps {
|
|
32
|
+
/** Chart title */
|
|
33
|
+
title?: string;
|
|
34
|
+
/** Chart subtitle / description */
|
|
35
|
+
subtitle?: string;
|
|
36
|
+
/** Chart type */
|
|
37
|
+
chartType?: ChartType;
|
|
38
|
+
/** Data series */
|
|
39
|
+
series?: readonly ChartSeries[];
|
|
40
|
+
/** Simple data (single series shorthand) */
|
|
41
|
+
data?: readonly ChartDataPoint[];
|
|
42
|
+
/** Chart height in px */
|
|
43
|
+
height?: number;
|
|
44
|
+
/** Show legend */
|
|
45
|
+
showLegend?: boolean;
|
|
46
|
+
/** Show values on chart */
|
|
47
|
+
showValues?: boolean;
|
|
48
|
+
/** Actions for chart interactions */
|
|
49
|
+
actions?: readonly ChartAction[];
|
|
50
|
+
/** Entity name for schema-driven auto-fetch */
|
|
51
|
+
entity?: string;
|
|
52
|
+
/** Loading state */
|
|
53
|
+
isLoading?: boolean;
|
|
54
|
+
/** Error state */
|
|
55
|
+
error?: Error | null;
|
|
56
|
+
/** Additional CSS classes */
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare const Chart: React.FC<ChartProps>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeViewer Organism Component
|
|
3
|
+
*
|
|
4
|
+
* A code/diff viewer with syntax highlighting and line numbers.
|
|
5
|
+
* Composes atoms and molecules for layout. Uses pre/code elements
|
|
6
|
+
* which are semantically necessary for code display.
|
|
7
|
+
*
|
|
8
|
+
* Orbital Component Interface Compliance:
|
|
9
|
+
* - Entity binding with auto-fetch when entity is a string
|
|
10
|
+
* - Event emission via useEventBus (UI:* events)
|
|
11
|
+
* - isLoading and error state props
|
|
12
|
+
* - className for external styling
|
|
13
|
+
*/
|
|
14
|
+
import React from "react";
|
|
15
|
+
export type CodeViewerMode = "code" | "diff";
|
|
16
|
+
export interface DiffLine {
|
|
17
|
+
type: "add" | "remove" | "context";
|
|
18
|
+
content: string;
|
|
19
|
+
lineNumber?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface CodeViewerAction {
|
|
22
|
+
label: string;
|
|
23
|
+
event?: string;
|
|
24
|
+
navigatesTo?: string;
|
|
25
|
+
variant?: "primary" | "secondary" | "ghost";
|
|
26
|
+
}
|
|
27
|
+
export interface CodeViewerProps {
|
|
28
|
+
/** Viewer title */
|
|
29
|
+
title?: string;
|
|
30
|
+
/** Code content */
|
|
31
|
+
code?: string;
|
|
32
|
+
/** Language for display label */
|
|
33
|
+
language?: string;
|
|
34
|
+
/** Diff lines (for diff mode) */
|
|
35
|
+
diff?: readonly DiffLine[];
|
|
36
|
+
/** Old value (for generating diff) */
|
|
37
|
+
oldValue?: string;
|
|
38
|
+
/** New value (for generating diff) */
|
|
39
|
+
newValue?: string;
|
|
40
|
+
/** Display mode */
|
|
41
|
+
mode?: CodeViewerMode;
|
|
42
|
+
/** Show line numbers */
|
|
43
|
+
showLineNumbers?: boolean;
|
|
44
|
+
/** Show copy button */
|
|
45
|
+
showCopy?: boolean;
|
|
46
|
+
/** Enable word wrap */
|
|
47
|
+
wordWrap?: boolean;
|
|
48
|
+
/** Max height before scrolling */
|
|
49
|
+
maxHeight?: number | string;
|
|
50
|
+
/** Multiple files (tabbed view) */
|
|
51
|
+
files?: readonly {
|
|
52
|
+
label: string;
|
|
53
|
+
code: string;
|
|
54
|
+
language?: string;
|
|
55
|
+
}[];
|
|
56
|
+
/** Actions */
|
|
57
|
+
actions?: readonly CodeViewerAction[];
|
|
58
|
+
/** Entity name for schema-driven auto-fetch */
|
|
59
|
+
entity?: string;
|
|
60
|
+
/** Loading state */
|
|
61
|
+
isLoading?: boolean;
|
|
62
|
+
/** Error state */
|
|
63
|
+
error?: Error | null;
|
|
64
|
+
/** Additional CSS classes */
|
|
65
|
+
className?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare const CodeViewer: React.FC<CodeViewerProps>;
|