@almadar/ui 5.25.0 → 5.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/avl/index.cjs +2071 -2859
  2. package/dist/avl/index.js +1020 -1808
  3. package/dist/components/core/atoms/FlipContainer.d.ts +4 -4
  4. package/dist/components/core/atoms/Icon.d.ts +4 -2
  5. package/dist/components/core/atoms/ProgressBar.d.ts +1 -1
  6. package/dist/components/core/atoms/Typography.d.ts +0 -18
  7. package/dist/components/core/atoms/index.d.ts +1 -1
  8. package/dist/components/core/atoms/types.d.ts +6 -0
  9. package/dist/components/core/molecules/ArrayEditor.d.ts +15 -0
  10. package/dist/components/core/molecules/Carousel.d.ts +8 -2
  11. package/dist/components/core/molecules/Container.d.ts +4 -4
  12. package/dist/components/core/molecules/DateRangeSelector.d.ts +3 -4
  13. package/dist/components/core/molecules/DocSidebar.d.ts +4 -4
  14. package/dist/components/core/molecules/EdgeDecoration.d.ts +3 -2
  15. package/dist/components/core/molecules/Flex.d.ts +4 -4
  16. package/dist/components/core/molecules/FlipCard.d.ts +3 -4
  17. package/dist/components/core/molecules/GradientDivider.d.ts +3 -2
  18. package/dist/components/core/molecules/MapEditor.d.ts +16 -0
  19. package/dist/components/core/molecules/ObjectEditor.d.ts +15 -0
  20. package/dist/components/core/molecules/SidePanel.d.ts +4 -4
  21. package/dist/components/core/molecules/SortableList.d.ts +4 -5
  22. package/dist/components/core/molecules/ViolationAlert.d.ts +4 -9
  23. package/dist/components/core/molecules/index.d.ts +4 -3
  24. package/dist/components/core/molecules/markdown/CodeBlock.d.ts +44 -2
  25. package/dist/components/core/organisms/ComponentPatterns.d.ts +0 -3
  26. package/dist/components/game/atoms/DialogueBubble.d.ts +2 -1
  27. package/dist/components/game/atoms/ResourceCounter.d.ts +3 -2
  28. package/dist/components/game/atoms/Sprite.d.ts +2 -2
  29. package/dist/components/game/atoms/StateIndicator.d.ts +4 -5
  30. package/dist/components/game/atoms/StatusEffect.d.ts +2 -3
  31. package/dist/components/game/molecules/ActionButtons.d.ts +6 -0
  32. package/dist/components/game/molecules/GameHud.d.ts +2 -3
  33. package/dist/components/game/molecules/StatBadge.d.ts +6 -0
  34. package/dist/components/game/organisms/puzzles/state-architect/StateJsonView.d.ts +16 -0
  35. package/dist/components/game/organisms/puzzles/state-architect/index.d.ts +2 -2
  36. package/dist/components/index.cjs +2527 -2302
  37. package/dist/components/index.js +1638 -1413
  38. package/dist/docs/index.cjs +6014 -4606
  39. package/dist/docs/index.css +1252 -0
  40. package/dist/docs/index.d.cts +108 -16
  41. package/dist/docs/index.d.ts +2 -2
  42. package/dist/docs/index.js +5970 -4567
  43. package/dist/marketing/index.cjs +36 -13
  44. package/dist/marketing/index.d.cts +30 -20
  45. package/dist/marketing/index.js +36 -13
  46. package/dist/providers/index.cjs +1891 -2679
  47. package/dist/providers/index.js +990 -1778
  48. package/dist/runtime/index.cjs +1931 -2719
  49. package/dist/runtime/index.js +994 -1782
  50. package/package.json +1 -1
  51. package/dist/components/core/molecules/CodeViewer.d.ts +0 -70
  52. package/dist/components/core/molecules/DocCodeBlock.d.ts +0 -14
  53. package/dist/components/game/organisms/puzzles/state-architect/CodeView.d.ts +0 -24
@@ -1,8 +1,8 @@
1
1
  /**
2
- * FlipContainer - A 3D perspective container atom for flip animations.
3
- *
4
- * Provides CSS 3D transform infrastructure: perspective on the outer wrapper,
5
- * preserve-3d + rotateY on the inner, and backface-visibility hidden on each child face.
2
+ * FlipContainer CSS 3D perspective atom (distinct from FlipCard molecule).
3
+ * Owns perspective/preserve-3d/rotateY only. Children are the raw face elements.
4
+ * Use FlipCard when you need standard card chrome; use FlipContainer when you
5
+ * need the flip mechanic around custom face content.
6
6
  */
7
7
  import React from 'react';
8
8
  export interface FlipContainerProps {
@@ -13,8 +13,10 @@
13
13
  */
14
14
  import React from 'react';
15
15
  import type { LucideIcon } from 'lucide-react';
16
+ import type { ColorToken } from './types';
16
17
  export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17
18
  export type IconAnimation = 'spin' | 'pulse' | 'none';
19
+ export type { ColorToken };
18
20
  /**
19
21
  * Resolve an icon name to a Lucide icon component.
20
22
  * Supports all 1500+ Lucide icons via dynamic PascalCase lookup.
@@ -32,8 +34,8 @@ export interface IconProps {
32
34
  name?: string;
33
35
  /** Size of the icon */
34
36
  size?: IconSize;
35
- /** Color class (Tailwind color class) or 'inherit' for theme default */
36
- color?: string;
37
+ /** Semantic palette token or an arbitrary Tailwind color class. */
38
+ color?: ColorToken | string;
37
39
  /** Animation type */
38
40
  animation?: IconAnimation;
39
41
  /** Additional CSS classes */
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import React from "react";
7
7
  export type ProgressBarType = "linear" | "circular" | "stepped";
8
- export type ProgressBarVariant = "default" | "primary" | "success" | "warning" | "danger";
8
+ export type ProgressBarVariant = "default" | "primary" | "success" | "warning" | "error" | "danger";
9
9
  export type ProgressBarColor = ProgressBarVariant;
10
10
  export interface ProgressBarProps {
11
11
  /**
@@ -37,21 +37,3 @@ export interface TypographyProps {
37
37
  children?: React.ReactNode;
38
38
  }
39
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>;
@@ -21,7 +21,7 @@ export { Switch, type SwitchProps } from "./Switch";
21
21
  export { Spacer, type SpacerProps, type SpacerSize } from "./Spacer";
22
22
  export { Stack, VStack, HStack, type StackProps, type VStackProps, type HStackProps, type StackDirection, type StackGap, type StackAlign, type StackJustify, } from "./Stack";
23
23
  export { TextHighlight, type TextHighlightProps, type HighlightType, } from "./TextHighlight";
24
- export { Typography, Heading, Text, type TypographyProps, type TypographyVariant, type HeadingProps, type TextProps, } from "./Typography";
24
+ export { Typography, type TypographyProps, type TypographyVariant, } from "./Typography";
25
25
  export { ThemeToggle, type ThemeToggleProps } from "./ThemeToggle";
26
26
  export { ThemeSelector } from "./ThemeSelector";
27
27
  export { Overlay, type OverlayProps } from "./Overlay";
@@ -1,6 +1,12 @@
1
1
  /**
2
2
  * Cross-cutting atom-level prop shapes shared across the design system.
3
3
  */
4
+ /**
5
+ * Canonical semantic color palette. Values are the Tailwind / CSS-var token
6
+ * names that every component in the design system understands. Prefer this
7
+ * over a bare `string` for any `color` or `variant` prop.
8
+ */
9
+ export type ColorToken = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'muted';
4
10
  /**
5
11
  * Concrete error-state shape read by display components (`error.message`,
6
12
  * occasionally `error.stack`). Structurally assignable from the global `Error`,
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { TraitConfigValue } from '@almadar/core';
3
+ export interface ArrayEditorProps {
4
+ /** Current array value. */
5
+ value: ReadonlyArray<TraitConfigValue>;
6
+ /** Fired when the array changes. */
7
+ onChange: (next: ReadonlyArray<TraitConfigValue>) => void;
8
+ /** Additional CSS classes. */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * ArrayEditor — edits a `ReadonlyArray<TraitConfigValue>` with add / remove per row.
13
+ * Each row infers its editor from the element's runtime type.
14
+ */
15
+ export declare const ArrayEditor: React.FC<ArrayEditorProps>;
@@ -7,7 +7,13 @@
7
7
  */
8
8
  import React from 'react';
9
9
  import type { EventEmit } from '@almadar/core';
10
- export interface CarouselProps<T = Record<string, unknown>> {
10
+ /** Default shape for carousel slide items when no generic is provided. */
11
+ export interface CarouselItem {
12
+ id?: string;
13
+ title?: string;
14
+ image?: string;
15
+ }
16
+ export interface CarouselProps<T = CarouselItem> {
11
17
  /** Array of items to display as slides */
12
18
  items: T[];
13
19
  /** Render function for each slide */
@@ -33,4 +39,4 @@ export interface CarouselProps<T = Record<string, unknown>> {
33
39
  /** Additional CSS classes */
34
40
  className?: string;
35
41
  }
36
- export declare const Carousel: <T = Record<string, unknown>>({ items, renderItem, children, autoPlay, autoPlayInterval, showDots, showArrows, loop, slideChangeEvent, slideChangePayload, className, }: CarouselProps<T>) => React.ReactElement | null;
42
+ export declare const Carousel: <T = CarouselItem>({ items, renderItem, children, autoPlay, autoPlayInterval, showDots, showArrows, loop, slideChangeEvent, slideChangePayload, className, }: CarouselProps<T>) => React.ReactElement | null;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Container Component
3
- *
4
- * A max-width wrapper that centers content horizontally.
5
- * Essential for controlling page width and maintaining consistent margins.
2
+ * Container — max-width centering wrapper (distinct from Box).
3
+ * Box controls padding/margin/bg/shadow on an arbitrary element.
4
+ * Container constrains page width and centers; use it at the layout level,
5
+ * not as a generic div replacement.
6
6
  */
7
7
  import React from 'react';
8
8
  export type ContainerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
@@ -1,8 +1,7 @@
1
1
  /**
2
- * DateRangeSelector Molecule Component
3
- *
4
- * Button group for selecting time range periods.
5
- * Pure UI molecule with no entity binding.
2
+ * DateRangeSelector preset period button-group (e.g. 1W / 1M / 3M / 1Y).
3
+ * Distinct from DateRangePicker: no calendar inputs, no custom dates.
4
+ * Use DateRangePicker when the user needs to enter an arbitrary from/to range.
6
5
  */
7
6
  import React from 'react';
8
7
  export interface DateRangeSelectorOption {
@@ -1,8 +1,8 @@
1
1
  /**
2
- * DocSidebar Molecule Component
3
- *
4
- * A documentation navigation sidebar with collapsible category sections.
5
- * Composes from Box, VStack, HStack, Typography, and Icon atoms.
2
+ * DocSidebar collapsible documentation navigation sidebar.
3
+ * Renders a nested item tree with expand/collapse per category and active-item
4
+ * highlighting. Not a generic nav; it owns doc-site-specific UX (uppercase
5
+ * category headers, indented children, active highlight).
6
6
  */
7
7
  import React from 'react';
8
8
  export interface DocSidebarItem {
@@ -15,6 +15,7 @@
15
15
  * sides of the parent container.
16
16
  */
17
17
  import React from 'react';
18
+ import type { ColorToken } from '../atoms/types';
18
19
  export type EdgeVariant = 'arch' | 'vine' | 'lattice';
19
20
  export type EdgeSide = 'left' | 'right' | 'both';
20
21
  export interface EdgeDecorationProps {
@@ -24,8 +25,8 @@ export interface EdgeDecorationProps {
24
25
  side?: EdgeSide;
25
26
  /** Overall opacity (default: 0.15) */
26
27
  opacity?: number;
27
- /** Stroke color */
28
- color?: string;
28
+ /** Semantic palette token or a raw CSS color value for the stroke. */
29
+ color?: ColorToken | string;
29
30
  /** Stroke width */
30
31
  strokeWidth?: number;
31
32
  /** Width of the decoration area as percentage of container (default: 15) */
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Flex Component
3
- *
4
- * A flexbox wrapper with all common flex properties exposed as props.
5
- * More explicit than Stack for when you need full flex control.
2
+ * Flex — full-surface flexbox primitive (distinct from Stack).
3
+ * Stack covers the 95% case (VStack/HStack with gap/align/justify).
4
+ * Flex exposes direction, wrap, grow, shrink, basis individually; use it
5
+ * when you need those extra axes or inline-flex behavior.
6
6
  */
7
7
  import React from 'react';
8
8
  export type FlexDirection = 'row' | 'row-reverse' | 'col' | 'col-reverse';
@@ -1,8 +1,7 @@
1
1
  /**
2
- * FlipCard - A two-sided card with 3D flip animation.
3
- *
4
- * Pure presentational molecule: no entity binding, no event bus, no translations.
5
- * Uses the FlipContainer atom for the 3D transform mechanics.
2
+ * FlipCard two-sided card molecule with front/back faces (distinct from FlipContainer).
3
+ * FlipContainer is the raw 3D-transform atom; FlipCard wraps it with card styling,
4
+ * absolute face positioning, and `front`/`back` ReactNode props for lolo consumers.
6
5
  */
7
6
  import React from 'react';
8
7
  export interface FlipCardProps {
@@ -5,9 +5,10 @@
5
5
  * Used between major sections for visual separation without hard background-color breaks.
6
6
  */
7
7
  import React from 'react';
8
+ import type { ColorToken } from '../atoms/types';
8
9
  export interface GradientDividerProps {
9
- /** Override the center color (CSS value). Defaults to var(--color-primary). */
10
- color?: string;
10
+ /** Semantic palette token or a raw CSS color value. Defaults to 'primary'. */
11
+ color?: ColorToken | string;
11
12
  /** Additional class names */
12
13
  className?: string;
13
14
  }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { TraitConfigObject } from '@almadar/core';
3
+ export interface MapEditorProps {
4
+ /** Current map value (object used as string-keyed map). */
5
+ value: TraitConfigObject;
6
+ /** Fired when an entry is added, removed, or its key/value is changed. */
7
+ onChange: (next: TraitConfigObject) => void;
8
+ /** Additional CSS classes. */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * MapEditor — edits a `TraitConfigObject` as a dynamic key/value map.
13
+ * Unlike ObjectEditor (fixed schema keys), MapEditor allows adding/removing entries
14
+ * and renaming keys.
15
+ */
16
+ export declare const MapEditor: React.FC<MapEditorProps>;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { TraitConfigObject } from '@almadar/core';
3
+ export interface ObjectEditorProps {
4
+ /** Current object value. */
5
+ value: TraitConfigObject;
6
+ /** Fired when any field changes. */
7
+ onChange: (next: TraitConfigObject) => void;
8
+ /** Additional CSS classes. */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * ObjectEditor — edits a `TraitConfigObject` showing one labeled row per key.
13
+ * Keys are fixed (derived from the current object's shape).
14
+ */
15
+ export declare const ObjectEditor: React.FC<ObjectEditorProps>;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * SidePanel Molecule Component
3
- *
4
- * A side panel that slides in from the right (or left) with header and content.
5
- * Uses Button, Typography atoms.
2
+ * SidePanel fixed side panel for contextual detail on top of the page layout.
3
+ * Distinct from Drawer: Drawer is driven by the UI Slot system (render_ui drawer)
4
+ * and is generic. SidePanel is a direct-render component with its own close event
5
+ * API, used where the panel is always present in the component tree.
6
6
  */
7
7
  import React from "react";
8
8
  import type { EventEmit } from "@almadar/core";
@@ -1,9 +1,8 @@
1
1
  /**
2
- * SortableList Molecule
3
- *
4
- * A list where items can be dragged to reorder via drag handles.
5
- * Uses useDragReorder for drag state management and useEventBus for event emission.
6
- * Shows a drop indicator line at the target position during drag.
2
+ * SortableList — drag-to-reorder list (distinct from DataList).
3
+ * DataList is a read/action list with no drag. SortableList owns drag
4
+ * handles and emits a REORDER event with fromIndex/toIndex/item use it
5
+ * when item ordering is user-controlled.
7
6
  */
8
7
  import React from 'react';
9
8
  import type { EntityRow, EventKey, EventPayload } from "@almadar/core";
@@ -1,13 +1,8 @@
1
1
  /**
2
- * ViolationAlert
3
- *
4
- * Displays inspection violations with law references and action types.
5
- * Used in inspection forms to show detected compliance violations.
6
- *
7
- * Action Types:
8
- * - measure: Corrective measure required (warning)
9
- * - admin: Administrative action (error)
10
- * - penalty: Penalty proceedings (error, severe)
2
+ * ViolationAlert — domain-specific compliance violation display (distinct from Alert).
3
+ * Alert is a generic dismissible message. ViolationAlert owns structured
4
+ * `ViolationRecord` (law/article/actionType/adminAction/penaltyAction) and
5
+ * an optional "navigate to field" action — use it in inspection/compliance forms only.
11
6
  */
12
7
  import React from "react";
13
8
  export type ViolationRecord = {
@@ -1,4 +1,7 @@
1
1
  export { ErrorBoundary, type ErrorBoundaryProps } from './ErrorBoundary';
2
+ export { ArrayEditor, type ArrayEditorProps } from './ArrayEditor';
3
+ export { ObjectEditor, type ObjectEditorProps } from './ObjectEditor';
4
+ export { MapEditor, type MapEditorProps } from './MapEditor';
2
5
  export { FileTree, type FileTreeProps, type FileTreeNode } from './FileTree';
3
6
  export { FormField, type FormFieldProps } from './FormField';
4
7
  export { EmptyState, type EmptyStateProps } from './EmptyState';
@@ -33,7 +36,7 @@ export { Drawer, type DrawerProps, type DrawerPosition, type DrawerSize } from '
33
36
  export { WizardProgress, type WizardProgressProps, type WizardProgressStep } from './WizardProgress';
34
37
  export { WizardNavigation, type WizardNavigationProps } from './WizardNavigation';
35
38
  export { MarkdownContent, type MarkdownContentProps } from './markdown/MarkdownContent';
36
- export { CodeBlock, type CodeBlockProps, type CodeLanguage } from './markdown/CodeBlock';
39
+ export { CodeBlock, type CodeBlockProps, type CodeLanguage, type CodeViewerMode, type DiffLine, type CodeViewerFile, type CodeViewerAction, toCodeLanguage, } from './markdown/CodeBlock';
37
40
  export { QuizBlock, type QuizBlockProps } from './QuizBlock';
38
41
  export { ScaledDiagram, type ScaledDiagramProps } from './ScaledDiagram';
39
42
  export { CalendarGrid, type CalendarGridProps } from './CalendarGrid';
@@ -97,7 +100,6 @@ export { ReplyTree, type ReplyTreeProps } from './ReplyTree';
97
100
  export { BranchingLogicBuilder, type BranchingLogicBuilderProps, type BranchingQuestion, type BranchingRule } from './BranchingLogicBuilder';
98
101
  export { VersionDiff, type VersionDiffProps, type DiffRevision, type DiffLine as VersionDiffLine, type DiffLineType } from './VersionDiff';
99
102
  export { DocBreadcrumb, type DocBreadcrumbProps, type DocBreadcrumbItem } from './DocBreadcrumb';
100
- export { DocCodeBlock, type DocCodeBlockProps } from './DocCodeBlock';
101
103
  export { DocPagination, type DocPaginationProps, type DocPaginationLink } from './DocPagination';
102
104
  export { DocSearch, type DocSearchProps, type DocSearchResult } from './DocSearch';
103
105
  export { DocSidebar, type DocSidebarProps, type DocSidebarItem } from './DocSidebar';
@@ -124,4 +126,3 @@ export { Chart, type ChartProps, type ChartType, type ChartSeries, } from "./Cha
124
126
  export { SignaturePad, type SignaturePadProps, } from "./SignaturePad";
125
127
  export { DocumentViewer, type DocumentViewerProps, type DocumentType, } from "./DocumentViewer";
126
128
  export { GraphCanvas, type GraphCanvasProps, type GraphNode, type GraphEdge, } from "./GraphCanvas";
127
- export { CodeViewer, type CodeViewerProps, type CodeViewerMode, type DiffLine, } from "./CodeViewer";
@@ -8,6 +8,7 @@
8
8
  * - Emits: UI:COPY_CODE { language, success }
9
9
  */
10
10
  import React from 'react';
11
+ import type { UiError } from '../../atoms/types';
11
12
  /**
12
13
  * The set of languages with a registered PrismLight grammar (above) plus the
13
14
  * `.orb`/`.lolo` grammars from `@almadar/syntax`. Authoritative: an unregistered
@@ -22,9 +23,26 @@ export type CodeLanguage = (typeof CODE_LANGUAGES)[number];
22
23
  * grammar — matching the highlighter's own plain-text fallback.
23
24
  */
24
25
  export declare function toCodeLanguage(value: string | undefined): CodeLanguage;
26
+ export type CodeViewerMode = 'code' | 'diff';
27
+ export interface DiffLine {
28
+ type: 'add' | 'remove' | 'context';
29
+ content: string;
30
+ lineNumber?: number;
31
+ }
32
+ export interface CodeViewerAction {
33
+ label: string;
34
+ event?: string;
35
+ navigatesTo?: string;
36
+ variant?: 'primary' | 'secondary' | 'ghost';
37
+ }
38
+ export interface CodeViewerFile {
39
+ label: string;
40
+ code: string;
41
+ language?: CodeLanguage;
42
+ }
25
43
  export interface CodeBlockProps {
26
44
  /** The code content to display */
27
- code: string;
45
+ code?: string;
28
46
  /** Programming language for syntax highlighting */
29
47
  language?: CodeLanguage;
30
48
  /** Show the copy button */
@@ -32,7 +50,7 @@ export interface CodeBlockProps {
32
50
  /** Show the language badge */
33
51
  showLanguageBadge?: boolean;
34
52
  /** Maximum height before scrolling */
35
- maxHeight?: string;
53
+ maxHeight?: string | number;
36
54
  /** Enable brace-based code folding of multi-line `{}`/`[]` blocks (default: true). */
37
55
  foldable?: boolean;
38
56
  /** Additional CSS classes */
@@ -62,5 +80,29 @@ export interface CodeBlockProps {
62
80
  * path → line map from the schema + validation results.
63
81
  */
64
82
  errorLines?: Map<number, 'error' | 'warning'>;
83
+ /** Title shown in the toolbar */
84
+ title?: string;
85
+ /** Diff or plain-code display mode */
86
+ mode?: CodeViewerMode;
87
+ /** Pre-computed diff lines */
88
+ diff?: readonly DiffLine[];
89
+ /** Old source text — generates diff when combined with newValue */
90
+ oldValue?: string;
91
+ /** New source text — generates diff when combined with oldValue */
92
+ newValue?: string;
93
+ /** Show line numbers in code / diff mode */
94
+ showLineNumbers?: boolean;
95
+ /** Enable word-wrap in code / diff mode */
96
+ wordWrap?: boolean;
97
+ /** Multiple files shown as tabs */
98
+ files?: readonly CodeViewerFile[];
99
+ /** Action badges in the toolbar */
100
+ actions?: readonly CodeViewerAction[];
101
+ /** Loading state */
102
+ isLoading?: boolean;
103
+ /** Error state */
104
+ error?: UiError | null;
105
+ /** Show copy button (viewer alias for showCopyButton) */
106
+ showCopy?: boolean;
65
107
  }
66
108
  export declare const CodeBlock: React.NamedExoticComponent<CodeBlockProps>;
@@ -122,9 +122,6 @@ export interface HeadingPatternProps extends ClosedCircuitProps {
122
122
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
123
123
  className?: string;
124
124
  }
125
- /**
126
- * Heading pattern.
127
- */
128
125
  export declare function HeadingPattern({ content, level, size, className, }: HeadingPatternProps): React.ReactElement;
129
126
  export declare namespace HeadingPattern {
130
127
  var displayName: string;
@@ -1,10 +1,11 @@
1
+ import type { AssetUrl } from '@almadar/core';
1
2
  export interface DialogueBubbleProps {
2
3
  /** Speaker name displayed at the top */
3
4
  speaker?: string;
4
5
  /** Dialogue text content */
5
6
  text: string;
6
7
  /** URL for the speaker portrait image */
7
- portrait?: string;
8
+ portrait?: AssetUrl;
8
9
  /** Position of the bubble on screen */
9
10
  position?: 'top' | 'bottom';
10
11
  /** Additional CSS classes */
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import type { ColorToken } from '../../core/atoms/types';
2
3
  export interface ResourceCounterProps {
3
4
  /** Icon component or emoji */
4
5
  icon?: React.ReactNode;
@@ -8,8 +9,8 @@ export interface ResourceCounterProps {
8
9
  value: number;
9
10
  /** Maximum value */
10
11
  max?: number;
11
- /** Accent color class (e.g. 'text-yellow-400') */
12
- color?: string;
12
+ /** Semantic palette token or an arbitrary Tailwind color class. */
13
+ color?: ColorToken | string;
13
14
  /** Size variant */
14
15
  size?: 'sm' | 'md' | 'lg';
15
16
  /** Additional CSS classes */
@@ -4,10 +4,10 @@
4
4
  * Renders a single frame from a spritesheet with transform support.
5
5
  */
6
6
  import React from 'react';
7
- import type { EventKey } from "@almadar/core";
7
+ import type { EventKey, AssetUrl } from "@almadar/core";
8
8
  export interface SpriteProps {
9
9
  /** Spritesheet image URL */
10
- spritesheet: string;
10
+ spritesheet: AssetUrl;
11
11
  /** Width of each frame in pixels */
12
12
  frameWidth: number;
13
13
  /** Height of each frame in pixels */
@@ -1,9 +1,8 @@
1
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.
2
+ * StateIndicator — animated game-entity state pill (distinct from core Badge atom).
3
+ * Badge is a static text label. StateIndicator maps a state string (idle/active/
4
+ * moving/…) to icon + bg colour + optional pulse via a style registry that callers
5
+ * can extend. Use it in game HUDs where the entity state machine drives the display.
7
6
  */
8
7
  import React from 'react';
9
8
  export interface StateStyle {
@@ -1,7 +1,6 @@
1
- import * as React from 'react';
2
1
  export interface StatusEffectProps {
3
- /** Icon to display for the effect */
4
- icon: React.ReactNode;
2
+ /** Lucide kebab-case icon name */
3
+ icon: string;
5
4
  /** Label describing the effect */
6
5
  label?: string;
7
6
  /** Remaining duration in seconds */
@@ -1,3 +1,9 @@
1
+ /**
2
+ * ActionButtons — configurable button-group molecule for game controls (distinct from ActionButton atom).
3
+ * ActionButton is a single button with cooldown overlay and hotkey badge.
4
+ * ActionButtons manages a *set* of ControlButtons, tracks press/release state,
5
+ * and supports horizontal/vertical/diamond layouts for gamepad-style UI.
6
+ */
1
7
  import * as React from 'react';
2
8
  import type { EventEmit } from '@almadar/core';
3
9
  export interface ActionButtonConfig {
@@ -1,4 +1,3 @@
1
- import * as React from "react";
2
1
  import { type StatBadgeProps } from "./StatBadge";
3
2
  export interface GameHudStat extends Omit<StatBadgeProps, "size"> {
4
3
  /** Data source entity name */
@@ -17,8 +16,8 @@ export interface GameHudElement {
17
16
  label?: string;
18
17
  /** Direct value (from compiled render-ui effects) */
19
18
  value?: number | string;
20
- /** Icon name or node */
21
- icon?: React.ReactNode;
19
+ /** Lucide kebab-case icon name */
20
+ icon?: string;
22
21
  /** Display format */
23
22
  format?: string;
24
23
  /** Max value (for bars/hearts) */
@@ -1,4 +1,10 @@
1
1
  import * as React from 'react';
2
+ /**
3
+ * StatBadge — game stat display molecule (distinct from core Badge atom).
4
+ * Badge shows a text label/status token. StatBadge shows a numeric value
5
+ * with optional HealthBar (hearts/bar) or ScoreDisplay (animated number) and
6
+ * a named label — purpose-built for HUD stat rows, not general status tags.
7
+ */
2
8
  export interface StatBadgeProps {
3
9
  /** Stat label */
4
10
  label: string;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface StateJsonViewProps {
3
+ /** JSON data to display */
4
+ data: Record<string, unknown>;
5
+ /** Label */
6
+ label?: string;
7
+ /** Whether the code is expanded by default */
8
+ defaultExpanded?: boolean;
9
+ /** Additional CSS classes */
10
+ className?: string;
11
+ }
12
+ export declare function StateJsonView({ data, label, defaultExpanded, className, }: StateJsonViewProps): React.JSX.Element;
13
+ export declare namespace StateJsonView {
14
+ var displayName: string;
15
+ }
16
+ export default StateJsonView;
@@ -4,7 +4,7 @@ export { TransitionArrow } from './TransitionArrow';
4
4
  export type { TransitionArrowProps } from './TransitionArrow';
5
5
  export { VariablePanel } from './VariablePanel';
6
6
  export type { VariablePanelProps } from './VariablePanel';
7
- export { CodeView } from './CodeView';
8
- export type { CodeViewProps } from './CodeView';
7
+ export { StateJsonView } from './StateJsonView';
8
+ export type { StateJsonViewProps } from './StateJsonView';
9
9
  export { StateArchitectBoard } from './StateArchitectBoard';
10
10
  export type { StateArchitectBoardProps, StateArchitectTransition, TestCase, } from './StateArchitectBoard';