@almadar/ui 5.25.1 → 5.26.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/avl/index.cjs +2210 -2295
- package/dist/avl/index.js +1159 -1244
- package/dist/components/core/atoms/FlipContainer.d.ts +4 -4
- package/dist/components/core/atoms/Icon.d.ts +4 -2
- package/dist/components/core/atoms/ProgressBar.d.ts +1 -1
- package/dist/components/core/atoms/svg/SvgBranch.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgConnection.d.ts +8 -4
- package/dist/components/core/atoms/svg/SvgFlow.d.ts +5 -1
- package/dist/components/core/atoms/svg/SvgGrid.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgLobe.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgMesh.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgMorph.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgNode.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgPulse.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgRing.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgShield.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgStack.d.ts +6 -2
- package/dist/components/core/atoms/types.d.ts +6 -0
- package/dist/components/core/molecules/ArrayEditor.d.ts +15 -0
- package/dist/components/core/molecules/Carousel.d.ts +8 -2
- package/dist/components/core/molecules/Container.d.ts +4 -4
- package/dist/components/core/molecules/DateRangeSelector.d.ts +3 -4
- package/dist/components/core/molecules/DocSidebar.d.ts +4 -4
- package/dist/components/core/molecules/EdgeDecoration.d.ts +3 -2
- package/dist/components/core/molecules/Flex.d.ts +4 -4
- package/dist/components/core/molecules/FlipCard.d.ts +3 -4
- package/dist/components/core/molecules/GradientDivider.d.ts +3 -2
- package/dist/components/core/molecules/MapEditor.d.ts +16 -0
- package/dist/components/core/molecules/ObjectEditor.d.ts +15 -0
- package/dist/components/core/molecules/SidePanel.d.ts +4 -4
- package/dist/components/core/molecules/SortableList.d.ts +4 -5
- package/dist/components/core/molecules/ViolationAlert.d.ts +4 -9
- package/dist/components/core/molecules/index.d.ts +4 -3
- package/dist/components/core/molecules/markdown/CodeBlock.d.ts +44 -2
- package/dist/components/core/molecules/markdown/MarkdownContent.d.ts +2 -2
- package/dist/components/game/atoms/ResourceCounter.d.ts +3 -2
- package/dist/components/game/atoms/StateIndicator.d.ts +4 -5
- package/dist/components/game/atoms/StatusEffect.d.ts +2 -3
- package/dist/components/game/molecules/ActionButtons.d.ts +6 -0
- package/dist/components/game/molecules/GameHud.d.ts +2 -3
- package/dist/components/game/molecules/StatBadge.d.ts +6 -0
- package/dist/components/game/organisms/puzzles/state-architect/StateJsonView.d.ts +16 -0
- package/dist/components/game/organisms/puzzles/state-architect/index.d.ts +2 -2
- package/dist/components/index.cjs +2458 -2092
- package/dist/components/index.js +1558 -1192
- package/dist/docs/index.cjs +6021 -4606
- package/dist/docs/index.css +1252 -0
- package/dist/docs/index.d.cts +108 -16
- package/dist/docs/index.d.ts +2 -2
- package/dist/docs/index.js +5977 -4567
- package/dist/hooks/index.cjs +9 -2
- package/dist/hooks/index.js +9 -2
- package/dist/marketing/index.cjs +32 -9
- package/dist/marketing/index.d.cts +30 -20
- package/dist/marketing/index.js +32 -9
- package/dist/providers/index.cjs +2035 -2120
- package/dist/providers/index.js +1134 -1219
- package/dist/runtime/index.cjs +2075 -2160
- package/dist/runtime/index.js +1138 -1223
- package/package.json +1 -1
- package/dist/components/core/molecules/CodeViewer.d.ts +0 -70
- package/dist/components/core/molecules/DocCodeBlock.d.ts +0 -14
- package/dist/components/game/organisms/puzzles/state-architect/CodeView.d.ts +0 -24
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* FlipContainer
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
-
/**
|
|
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
|
/**
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgBranchProps {
|
|
3
|
-
x
|
|
4
|
-
y
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
5
|
variant?: 'fork' | 'merge' | 'diamond';
|
|
6
6
|
branches?: number;
|
|
7
7
|
size?: number;
|
|
8
8
|
color?: string;
|
|
9
9
|
opacity?: number;
|
|
10
10
|
className?: string;
|
|
11
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
12
|
+
asRoot?: boolean;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
11
15
|
}
|
|
12
16
|
export declare const SvgBranch: React.FC<SvgBranchProps>;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgConnectionProps {
|
|
3
|
-
x1
|
|
4
|
-
y1
|
|
5
|
-
x2
|
|
6
|
-
y2
|
|
3
|
+
x1?: number;
|
|
4
|
+
y1?: number;
|
|
5
|
+
x2?: number;
|
|
6
|
+
y2?: number;
|
|
7
7
|
variant?: 'solid' | 'dashed' | 'animated';
|
|
8
8
|
color?: string;
|
|
9
9
|
strokeWidth?: number;
|
|
10
10
|
opacity?: number;
|
|
11
11
|
className?: string;
|
|
12
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
13
|
+
asRoot?: boolean;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
12
16
|
}
|
|
13
17
|
export declare const SvgConnection: React.FC<SvgConnectionProps>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgFlowProps {
|
|
3
|
-
points
|
|
3
|
+
points?: Array<[number, number]>;
|
|
4
4
|
color?: string;
|
|
5
5
|
strokeWidth?: number;
|
|
6
6
|
animated?: boolean;
|
|
7
7
|
opacity?: number;
|
|
8
8
|
className?: string;
|
|
9
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
10
|
+
asRoot?: boolean;
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
9
13
|
}
|
|
10
14
|
export declare const SvgFlow: React.FC<SvgFlowProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgGridProps {
|
|
3
|
-
x
|
|
4
|
-
y
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
5
|
cols?: number;
|
|
6
6
|
rows?: number;
|
|
7
7
|
spacing?: number;
|
|
@@ -10,5 +10,9 @@ export interface SvgGridProps {
|
|
|
10
10
|
opacity?: number;
|
|
11
11
|
className?: string;
|
|
12
12
|
highlights?: number[];
|
|
13
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
14
|
+
asRoot?: boolean;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
13
17
|
}
|
|
14
18
|
export declare const SvgGrid: React.FC<SvgGridProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgLobeProps {
|
|
3
|
-
cx
|
|
4
|
-
cy
|
|
3
|
+
cx?: number;
|
|
4
|
+
cy?: number;
|
|
5
5
|
rx?: number;
|
|
6
6
|
ry?: number;
|
|
7
7
|
rotation?: number;
|
|
@@ -9,5 +9,9 @@ export interface SvgLobeProps {
|
|
|
9
9
|
color?: string;
|
|
10
10
|
opacity?: number;
|
|
11
11
|
className?: string;
|
|
12
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
13
|
+
asRoot?: boolean;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
12
16
|
}
|
|
13
17
|
export declare const SvgLobe: React.FC<SvgLobeProps>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgMeshProps {
|
|
3
|
-
cx
|
|
4
|
-
cy
|
|
3
|
+
cx?: number;
|
|
4
|
+
cy?: number;
|
|
5
5
|
nodes?: number;
|
|
6
6
|
radius?: number;
|
|
7
7
|
color?: string;
|
|
8
8
|
connectionDensity?: number;
|
|
9
9
|
opacity?: number;
|
|
10
10
|
className?: string;
|
|
11
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
12
|
+
asRoot?: boolean;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
11
15
|
}
|
|
12
16
|
export declare const SvgMesh: React.FC<SvgMeshProps>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgMorphProps {
|
|
3
|
-
x
|
|
4
|
-
y
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
5
|
size?: number;
|
|
6
6
|
variant?: 'text-to-code' | 'code-to-app' | 'generic';
|
|
7
7
|
color?: string;
|
|
8
8
|
opacity?: number;
|
|
9
9
|
className?: string;
|
|
10
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
11
|
+
asRoot?: boolean;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
10
14
|
}
|
|
11
15
|
export declare const SvgMorph: React.FC<SvgMorphProps>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgNodeProps {
|
|
3
|
-
x
|
|
4
|
-
y
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
5
|
r?: number;
|
|
6
6
|
variant?: 'filled' | 'stroked' | 'pulse';
|
|
7
7
|
color?: string;
|
|
8
8
|
opacity?: number;
|
|
9
9
|
className?: string;
|
|
10
10
|
label?: string;
|
|
11
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
12
|
+
asRoot?: boolean;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
11
15
|
}
|
|
12
16
|
export declare const SvgNode: React.FC<SvgNodeProps>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgPulseProps {
|
|
3
|
-
cx
|
|
4
|
-
cy
|
|
3
|
+
cx?: number;
|
|
4
|
+
cy?: number;
|
|
5
5
|
rings?: number;
|
|
6
6
|
maxRadius?: number;
|
|
7
7
|
color?: string;
|
|
8
8
|
animated?: boolean;
|
|
9
9
|
opacity?: number;
|
|
10
10
|
className?: string;
|
|
11
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
12
|
+
asRoot?: boolean;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
11
15
|
}
|
|
12
16
|
export declare const SvgPulse: React.FC<SvgPulseProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgRingProps {
|
|
3
|
-
cx
|
|
4
|
-
cy
|
|
3
|
+
cx?: number;
|
|
4
|
+
cy?: number;
|
|
5
5
|
r?: number;
|
|
6
6
|
variant?: 'solid' | 'dashed' | 'glow';
|
|
7
7
|
color?: string;
|
|
@@ -9,5 +9,9 @@ export interface SvgRingProps {
|
|
|
9
9
|
opacity?: number;
|
|
10
10
|
className?: string;
|
|
11
11
|
label?: string;
|
|
12
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
13
|
+
asRoot?: boolean;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
12
16
|
}
|
|
13
17
|
export declare const SvgRing: React.FC<SvgRingProps>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgShieldProps {
|
|
3
|
-
x
|
|
4
|
-
y
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
5
|
size?: number;
|
|
6
6
|
variant?: 'outline' | 'filled' | 'check';
|
|
7
7
|
color?: string;
|
|
8
8
|
opacity?: number;
|
|
9
9
|
className?: string;
|
|
10
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
11
|
+
asRoot?: boolean;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
10
14
|
}
|
|
11
15
|
export declare const SvgShield: React.FC<SvgShieldProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface SvgStackProps {
|
|
3
|
-
x
|
|
4
|
-
y
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
5
|
layers?: number;
|
|
6
6
|
width?: number;
|
|
7
7
|
height?: number;
|
|
@@ -9,5 +9,9 @@ export interface SvgStackProps {
|
|
|
9
9
|
opacity?: number;
|
|
10
10
|
className?: string;
|
|
11
11
|
labels?: string[];
|
|
12
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
13
|
+
asRoot?: boolean;
|
|
14
|
+
svgWidth?: number;
|
|
15
|
+
svgHeight?: number;
|
|
12
16
|
}
|
|
13
17
|
export declare const SvgStack: React.FC<SvgStackProps>;
|
|
@@ -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
|
-
|
|
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 =
|
|
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
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
|
3
|
-
*
|
|
4
|
-
*
|
|
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
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
-
/**
|
|
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
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
|
3
|
-
*
|
|
4
|
-
*
|
|
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
|
-
/**
|
|
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
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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
|
-
*
|
|
5
|
-
*
|
|
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
|
|
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>;
|
|
@@ -18,8 +18,8 @@ import 'katex/dist/katex.min.css';
|
|
|
18
18
|
export interface MarkdownContentProps {
|
|
19
19
|
/** The markdown content to render */
|
|
20
20
|
content: string;
|
|
21
|
-
/** Text direction */
|
|
22
|
-
direction?: '
|
|
21
|
+
/** Text direction (defaults to ltr; `ltr` is first so the generated config seeds it) */
|
|
22
|
+
direction?: 'ltr' | 'rtl';
|
|
23
23
|
/** Additional CSS classes */
|
|
24
24
|
className?: string;
|
|
25
25
|
}
|