@almadar/ui 2.27.2 → 2.27.4
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/flow/FlowLabel.d.ts +23 -0
- package/dist/components/atoms/flow/FlowMinimap.d.ts +28 -0
- package/dist/components/atoms/flow/FlowNodeShell.d.ts +25 -0
- package/dist/components/atoms/flow/FlowPort.d.ts +26 -0
- package/dist/components/atoms/flow/FlowWire.d.ts +39 -0
- package/dist/components/atoms/flow/index.d.ts +13 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/index.cjs +1745 -1018
- package/dist/components/index.js +854 -142
- package/dist/components/molecules/avl/AvlBehaviorGlyph.d.ts +61 -0
- package/dist/components/molecules/avl/index.d.ts +1 -0
- package/dist/components/molecules/flow/BehaviorNode.d.ts +28 -0
- package/dist/components/molecules/flow/EffectNode.d.ts +26 -0
- package/dist/components/molecules/flow/EventWireEdge.d.ts +23 -0
- package/dist/components/molecules/flow/ExprNode.d.ts +27 -0
- package/dist/components/molecules/flow/FlowStateNode.d.ts +18 -0
- package/dist/components/molecules/flow/NodePalette.d.ts +36 -0
- package/dist/components/molecules/flow/OrbitalNode.d.ts +31 -0
- package/dist/components/molecules/flow/TransitionEdge.d.ts +26 -0
- package/dist/components/molecules/flow/index.d.ts +8 -0
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/docs/index.cjs +1 -1
- package/dist/docs/index.js +1 -1
- package/dist/flow/index.cjs +3832 -0
- package/dist/flow/index.d.cts +367 -0
- package/dist/flow/index.d.ts +10 -0
- package/dist/flow/index.js +3793 -0
- package/dist/marketing/index.cjs +1 -1
- package/dist/marketing/index.js +1 -1
- package/dist/providers/index.cjs +146 -144
- package/dist/providers/index.js +44 -42
- package/dist/runtime/index.cjs +977 -920
- package/dist/runtime/index.js +203 -146
- package/package.json +7 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AvlBehaviorGlyph - Visual identity for a behavior.
|
|
3
|
+
*
|
|
4
|
+
* Generates a unique glyph from behavior properties:
|
|
5
|
+
* - Core shape = persistence type
|
|
6
|
+
* - Spokes = field count
|
|
7
|
+
* - Rings = state count
|
|
8
|
+
* - Markers = effect types used
|
|
9
|
+
* - Color = domain hue
|
|
10
|
+
* - Composition = child glyphs + event wiring (molecule/organism)
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import type { AvlEffectType, AvlPersistenceKind } from '../../atoms/avl/types';
|
|
14
|
+
export declare const DOMAIN_COLORS: Record<string, string>;
|
|
15
|
+
export type BehaviorLevel = 'atom' | 'molecule' | 'organism';
|
|
16
|
+
export type GlyphSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
17
|
+
export interface BehaviorGlyphChild {
|
|
18
|
+
name: string;
|
|
19
|
+
fieldCount?: number;
|
|
20
|
+
stateCount?: number;
|
|
21
|
+
persistence?: AvlPersistenceKind;
|
|
22
|
+
effectTypes?: AvlEffectType[];
|
|
23
|
+
}
|
|
24
|
+
export interface BehaviorGlyphConnection {
|
|
25
|
+
from: string;
|
|
26
|
+
to: string;
|
|
27
|
+
event: string;
|
|
28
|
+
}
|
|
29
|
+
export interface AvlBehaviorGlyphProps {
|
|
30
|
+
/** Behavior name */
|
|
31
|
+
name: string;
|
|
32
|
+
/** Composition level */
|
|
33
|
+
level?: BehaviorLevel;
|
|
34
|
+
/** Domain for color coding */
|
|
35
|
+
domain?: string;
|
|
36
|
+
/** Override color (otherwise derived from domain) */
|
|
37
|
+
color?: string;
|
|
38
|
+
/** Entity field count (drives spoke count) */
|
|
39
|
+
fieldCount?: number;
|
|
40
|
+
/** State count (drives ring count) */
|
|
41
|
+
stateCount?: number;
|
|
42
|
+
/** Persistence type (drives core shape) */
|
|
43
|
+
persistence?: AvlPersistenceKind;
|
|
44
|
+
/** Effect types used (drives markers on rings) */
|
|
45
|
+
effectTypes?: AvlEffectType[];
|
|
46
|
+
/** Child behaviors for molecule/organism composition */
|
|
47
|
+
children?: BehaviorGlyphChild[];
|
|
48
|
+
/** Event connections between children (organism level) */
|
|
49
|
+
connections?: BehaviorGlyphConnection[];
|
|
50
|
+
/** Size preset */
|
|
51
|
+
size?: GlyphSize;
|
|
52
|
+
/** Show text labels */
|
|
53
|
+
showLabels?: boolean;
|
|
54
|
+
/** Animate orbital rings */
|
|
55
|
+
animated?: boolean;
|
|
56
|
+
/** Additional className */
|
|
57
|
+
className?: string;
|
|
58
|
+
/** Click handler */
|
|
59
|
+
onClick?: () => void;
|
|
60
|
+
}
|
|
61
|
+
export declare const AvlBehaviorGlyph: React.FC<AvlBehaviorGlyphProps>;
|
|
@@ -6,6 +6,7 @@ export { AvlSlotMap, type AvlSlotMapProps, type AvlSlotMapSlot } from './AvlSlot
|
|
|
6
6
|
export { AvlExprTree, type AvlExprTreeProps, type AvlExprTreeNode } from './AvlExprTree';
|
|
7
7
|
export { AvlTransitionLane, type AvlTransitionLaneProps, type AvlTransitionLaneEffect } from './AvlTransitionLane';
|
|
8
8
|
export { AvlSwimLane, type AvlSwimLaneProps } from './AvlSwimLane';
|
|
9
|
+
export { AvlBehaviorGlyph, type AvlBehaviorGlyphProps, type BehaviorLevel, type GlyphSize, type BehaviorGlyphChild, type BehaviorGlyphConnection, DOMAIN_COLORS } from './AvlBehaviorGlyph';
|
|
9
10
|
export { ringPositions, arcPath, radialPositions, gridPositions, curveControlPoint } from './avl-layout';
|
|
10
11
|
export { Avl3DOrbitalNode, type Avl3DOrbitalNodeProps } from './Avl3DOrbitalNode';
|
|
11
12
|
export { Avl3DCrossWire, type Avl3DCrossWireProps } from './Avl3DCrossWire';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BehaviorNode Component
|
|
3
|
+
*
|
|
4
|
+
* Custom React Flow node for a standard behavior. Shows name,
|
|
5
|
+
* truncated description, state count, and per-event Handles for
|
|
6
|
+
* emit (source, right) and listen (target, left) wiring.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
10
|
+
/** Data shape for behavior flow nodes, extending Record<string, unknown> for React Flow v12. */
|
|
11
|
+
export interface BehaviorNodeData extends Record<string, unknown> {
|
|
12
|
+
/** Behavior name (e.g. "std-cart"). */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Optional description, truncated after 60 chars. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** Number of states in this behavior. */
|
|
17
|
+
stateCount: number;
|
|
18
|
+
/** Events this behavior emits. */
|
|
19
|
+
emits: string[];
|
|
20
|
+
/** Events this behavior listens for. */
|
|
21
|
+
listens: string[];
|
|
22
|
+
}
|
|
23
|
+
/** React Flow node type for behavior nodes. */
|
|
24
|
+
export type BehaviorFlowNode = Node<BehaviorNodeData, 'behavior'>;
|
|
25
|
+
/**
|
|
26
|
+
* React Flow custom node for a standard behavior with event port handles.
|
|
27
|
+
*/
|
|
28
|
+
export declare const BehaviorNode: React.FC<NodeProps<BehaviorFlowNode>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EffectNode Component
|
|
3
|
+
*
|
|
4
|
+
* Custom React Flow node for an effect in a transition.
|
|
5
|
+
* Shows the effect type with a category-colored header and
|
|
6
|
+
* optional args caption. One target Handle (left) for input,
|
|
7
|
+
* one source Handle (right) for chain output.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
11
|
+
import { type EffectCategory } from '../../atoms/avl/types';
|
|
12
|
+
/** Data shape for effect flow nodes, extending Record<string, unknown> for React Flow v12. */
|
|
13
|
+
export interface EffectNodeData extends Record<string, unknown> {
|
|
14
|
+
/** Effect type identifier (e.g. "render-ui", "set", "emit"). */
|
|
15
|
+
effectType: string;
|
|
16
|
+
/** Optional stringified args summary. */
|
|
17
|
+
args?: string;
|
|
18
|
+
/** Category override. Derived from effectType when omitted. */
|
|
19
|
+
category?: EffectCategory;
|
|
20
|
+
}
|
|
21
|
+
/** React Flow node type for effect nodes in transition chains. */
|
|
22
|
+
export type EffectFlowNode = Node<EffectNodeData, 'effect'>;
|
|
23
|
+
/**
|
|
24
|
+
* React Flow custom node for an effect in a transition chain.
|
|
25
|
+
*/
|
|
26
|
+
export declare const EffectNode: React.FC<NodeProps<EffectFlowNode>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EventWireEdge Component
|
|
3
|
+
*
|
|
4
|
+
* Custom React Flow edge for event wiring between orbitals/behaviors.
|
|
5
|
+
* Renders a dashed orange Bezier path (from CONNECTION_COLORS.emitListen)
|
|
6
|
+
* with a FlowLabel pill at the midpoint. Incompatible wires turn red.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { type Edge, type EdgeProps } from '@xyflow/react';
|
|
10
|
+
/** Data shape for event wire flow edges, extending Record<string, unknown> for React Flow v12. */
|
|
11
|
+
export interface EventWireEdgeData extends Record<string, unknown> {
|
|
12
|
+
/** Event name being wired. */
|
|
13
|
+
event: string;
|
|
14
|
+
/** Whether emitter and listener schemas are compatible. */
|
|
15
|
+
compatible?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** React Flow edge type for emit/listen event wiring. */
|
|
18
|
+
export type EventWireFlowEdge = Edge<EventWireEdgeData, 'eventWire'>;
|
|
19
|
+
/**
|
|
20
|
+
* React Flow custom edge for emit/listen event wiring.
|
|
21
|
+
* Dashed orange when compatible, dashed red when incompatible.
|
|
22
|
+
*/
|
|
23
|
+
export declare const EventWireEdge: React.FC<EdgeProps<EventWireFlowEdge>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExprNode Component
|
|
3
|
+
*
|
|
4
|
+
* Custom React Flow node for an S-expression operator.
|
|
5
|
+
* Shows the operator name in namespace-colored FlowNodeShell,
|
|
6
|
+
* with one target Handle per operand (left, staggered) and
|
|
7
|
+
* one source Handle for the result (right).
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
11
|
+
import { type AvlOperatorNamespace } from '../../atoms/avl/types';
|
|
12
|
+
/** Data shape for expression flow nodes, extending Record<string, unknown> for React Flow v12. */
|
|
13
|
+
export interface ExprNodeData extends Record<string, unknown> {
|
|
14
|
+
/** Operator name (e.g. "+", "concat", "if"). */
|
|
15
|
+
operator: string;
|
|
16
|
+
/** Operator namespace for color coding. */
|
|
17
|
+
namespace?: AvlOperatorNamespace;
|
|
18
|
+
/** Number of operand inputs. */
|
|
19
|
+
operandCount: number;
|
|
20
|
+
}
|
|
21
|
+
/** React Flow node type for S-expression operator nodes. */
|
|
22
|
+
export type ExprFlowNode = Node<ExprNodeData, 'expr'>;
|
|
23
|
+
/**
|
|
24
|
+
* React Flow custom node visualising an S-expression operator.
|
|
25
|
+
* Operand handles fan out vertically on the left; result exits right.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ExprNode: React.FC<NodeProps<ExprFlowNode>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowStateNode Component
|
|
3
|
+
*
|
|
4
|
+
* Custom React Flow node for a state machine state.
|
|
5
|
+
* Renders a FlowNodeShell with role-based header color, state name,
|
|
6
|
+
* and initial/terminal badges. Handles are placed at top (target)
|
|
7
|
+
* and bottom (source) for vertical transition wiring.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
11
|
+
import type { State } from '@almadar/core';
|
|
12
|
+
/** React Flow node type for state machine states, backed by @almadar/core State. */
|
|
13
|
+
export type StateFlowNode = Node<State & Record<string, unknown>, 'state'>;
|
|
14
|
+
/**
|
|
15
|
+
* React Flow custom node that visualises a single state machine state.
|
|
16
|
+
* Uses STATE_COLORS for the header bar and shows role badges.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FlowStateNode: React.FC<NodeProps<StateFlowNode>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NodePalette Component
|
|
3
|
+
*
|
|
4
|
+
* Draggable node type sidebar for a flow editor. Renders categories of
|
|
5
|
+
* tiles that can be dragged onto a React Flow canvas. Each tile sets
|
|
6
|
+
* `application/reactflow` data on the drag transfer so the canvas
|
|
7
|
+
* `onDrop` handler knows which node type to create.
|
|
8
|
+
*
|
|
9
|
+
* This is a pure HTML component with no React Flow imports.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
export interface NodePaletteItem {
|
|
13
|
+
/** Node type identifier set on the drag transfer. */
|
|
14
|
+
type: string;
|
|
15
|
+
/** Human-readable label shown on the tile. */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Lucide icon name for the tile. */
|
|
18
|
+
icon: string;
|
|
19
|
+
}
|
|
20
|
+
export interface NodePaletteCategory {
|
|
21
|
+
/** Category heading. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Draggable items in this category. */
|
|
24
|
+
items: NodePaletteItem[];
|
|
25
|
+
}
|
|
26
|
+
export interface NodePaletteProps {
|
|
27
|
+
/** Grouped node types available for dragging. */
|
|
28
|
+
categories: NodePaletteCategory[];
|
|
29
|
+
/** Additional CSS classes on the outer container. */
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Sidebar palette of draggable node tiles grouped by category.
|
|
34
|
+
* Drag a tile onto a ReactFlow canvas to create that node type.
|
|
35
|
+
*/
|
|
36
|
+
export declare const NodePalette: React.FC<NodePaletteProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrbitalNode Component
|
|
3
|
+
*
|
|
4
|
+
* Custom React Flow node for an orbital unit. Displays entity name,
|
|
5
|
+
* trait/page counts, and per-event Handles for emit (source, right)
|
|
6
|
+
* and listen (target, left) wiring.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
10
|
+
/** Data shape for orbital flow nodes, extending Record<string, unknown> for React Flow v12. */
|
|
11
|
+
export interface OrbitalNodeData extends Record<string, unknown> {
|
|
12
|
+
/** Orbital unit name. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Primary entity name. */
|
|
15
|
+
entityName: string;
|
|
16
|
+
/** Number of traits attached. */
|
|
17
|
+
traitCount: number;
|
|
18
|
+
/** Number of pages attached. */
|
|
19
|
+
pageCount: number;
|
|
20
|
+
/** Events this orbital emits. */
|
|
21
|
+
emits: string[];
|
|
22
|
+
/** Events this orbital listens for. */
|
|
23
|
+
listens: string[];
|
|
24
|
+
}
|
|
25
|
+
/** React Flow node type for orbital units. */
|
|
26
|
+
export type OrbitalFlowNode = Node<OrbitalNodeData, 'orbital'>;
|
|
27
|
+
/**
|
|
28
|
+
* React Flow custom node for an orbital unit showing entity info,
|
|
29
|
+
* trait/page stats, and per-event connection handles.
|
|
30
|
+
*/
|
|
31
|
+
export declare const OrbitalNode: React.FC<NodeProps<OrbitalFlowNode>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TransitionEdge Component
|
|
3
|
+
*
|
|
4
|
+
* Custom React Flow edge for state machine transitions.
|
|
5
|
+
* Uses a Bezier path with a FlowLabel pill at the midpoint showing
|
|
6
|
+
* the event name. Guard (diamond) and effect indicators are shown
|
|
7
|
+
* as small inline icons beside the label.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { type Edge, type EdgeProps } from '@xyflow/react';
|
|
11
|
+
/** Data shape for transition flow edges, extending Record<string, unknown> for React Flow v12. */
|
|
12
|
+
export interface TransitionEdgeData extends Record<string, unknown> {
|
|
13
|
+
/** Triggering event name. */
|
|
14
|
+
event: string;
|
|
15
|
+
/** Whether this transition has a guard condition. */
|
|
16
|
+
hasGuard?: boolean;
|
|
17
|
+
/** Whether this transition has effects attached. */
|
|
18
|
+
hasEffects?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** React Flow edge type for state machine transitions. */
|
|
21
|
+
export type TransitionFlowEdge = Edge<TransitionEdgeData, 'transition'>;
|
|
22
|
+
/**
|
|
23
|
+
* React Flow custom edge that renders a Bezier curve with an event label pill.
|
|
24
|
+
* Guard and effect presence are shown as small indicator icons.
|
|
25
|
+
*/
|
|
26
|
+
export declare const TransitionEdge: React.FC<EdgeProps<TransitionFlowEdge>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { FlowStateNode, type StateFlowNode } from './FlowStateNode';
|
|
2
|
+
export { OrbitalNode, type OrbitalNodeData, type OrbitalFlowNode } from './OrbitalNode';
|
|
3
|
+
export { BehaviorNode, type BehaviorNodeData, type BehaviorFlowNode } from './BehaviorNode';
|
|
4
|
+
export { ExprNode, type ExprNodeData, type ExprFlowNode } from './ExprNode';
|
|
5
|
+
export { EffectNode, type EffectNodeData, type EffectFlowNode } from './EffectNode';
|
|
6
|
+
export { TransitionEdge, type TransitionEdgeData, type TransitionFlowEdge } from './TransitionEdge';
|
|
7
|
+
export { EventWireEdge, type EventWireEdgeData, type EventWireFlowEdge } from './EventWireEdge';
|
|
8
|
+
export { NodePalette, type NodePaletteProps, type NodePaletteCategory, type NodePaletteItem, } from './NodePalette';
|
|
@@ -78,3 +78,4 @@ export { TeamCard, type TeamCardProps } from './TeamCard';
|
|
|
78
78
|
export { ShowcaseCard, type ShowcaseCardProps } from './ShowcaseCard';
|
|
79
79
|
export { GeometricPattern, type GeometricPatternProps } from './GeometricPattern';
|
|
80
80
|
export { EdgeDecoration, type EdgeDecorationProps, type EdgeVariant, type EdgeSide } from './EdgeDecoration';
|
|
81
|
+
export * from './flow';
|
package/dist/docs/index.cjs
CHANGED
|
@@ -3055,7 +3055,7 @@ var variantStyles2 = {
|
|
|
3055
3055
|
ghost: [
|
|
3056
3056
|
"bg-transparent text-muted-foreground",
|
|
3057
3057
|
"border border-transparent",
|
|
3058
|
-
"hover:text-foreground hover:bg-
|
|
3058
|
+
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
3059
3059
|
"active:scale-[var(--active-scale)]"
|
|
3060
3060
|
].join(" "),
|
|
3061
3061
|
danger: [
|
package/dist/docs/index.js
CHANGED
|
@@ -3031,7 +3031,7 @@ var variantStyles2 = {
|
|
|
3031
3031
|
ghost: [
|
|
3032
3032
|
"bg-transparent text-muted-foreground",
|
|
3033
3033
|
"border border-transparent",
|
|
3034
|
-
"hover:text-foreground hover:bg-
|
|
3034
|
+
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
3035
3035
|
"active:scale-[var(--active-scale)]"
|
|
3036
3036
|
].join(" "),
|
|
3037
3037
|
danger: [
|