@almadar/ui 2.27.3 → 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 +1744 -1017
- package/dist/components/index.js +853 -141
- 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/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/providers/index.cjs +145 -143
- package/dist/providers/index.js +43 -41
- package/dist/runtime/index.cjs +976 -919
- package/dist/runtime/index.js +202 -145
- package/package.json +7 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowLabel Component
|
|
3
|
+
*
|
|
4
|
+
* A pill-shaped label used on flow wires (edges) to annotate transitions,
|
|
5
|
+
* events, or guards. Supports truncation with a native title tooltip and
|
|
6
|
+
* semantic color variants.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export type FlowLabelVariant = 'default' | 'primary' | 'warning' | 'error';
|
|
10
|
+
export interface FlowLabelProps {
|
|
11
|
+
/** Text content of the label. */
|
|
12
|
+
text: string;
|
|
13
|
+
/** Max visible character count before truncation. Omit to show full text. */
|
|
14
|
+
truncate?: number;
|
|
15
|
+
/** Color variant mapping to Badge semantics. */
|
|
16
|
+
variant?: FlowLabelVariant;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Badge-based pill label for annotating wires in a flow graph.
|
|
21
|
+
* Long text is truncated with an ellipsis and full text appears on hover via title.
|
|
22
|
+
*/
|
|
23
|
+
export declare const FlowLabel: React.FC<FlowLabelProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowMinimap Component
|
|
3
|
+
*
|
|
4
|
+
* A styled container that wraps a React Flow MiniMap at the organism level.
|
|
5
|
+
* Since atoms must not depend on React Flow, this component only provides the
|
|
6
|
+
* card-styled wrapper box and exports a color config object that organisms pass
|
|
7
|
+
* through to the MiniMap props.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export interface FlowMinimapProps {
|
|
11
|
+
/** Additional class names applied to the wrapper. */
|
|
12
|
+
className?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Color tokens for the React Flow MiniMap component.
|
|
17
|
+
* Organisms import this and spread it onto `<MiniMap {...MINIMAP_COLORS} />`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const MINIMAP_COLORS: {
|
|
20
|
+
readonly nodeColor: "var(--color-primary, #3B82F6)";
|
|
21
|
+
readonly maskColor: "var(--color-background, #ffffff80)";
|
|
22
|
+
readonly nodeStrokeColor: "var(--color-border, #E5E7EB)";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Card-styled wrapper for the React Flow MiniMap.
|
|
26
|
+
* Render the actual `<MiniMap>` component as children at the organism level.
|
|
27
|
+
*/
|
|
28
|
+
export declare const FlowMinimap: React.FC<FlowMinimapProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowNodeShell Component
|
|
3
|
+
*
|
|
4
|
+
* Outer container for a graph node. Provides the card-like wrapper with a
|
|
5
|
+
* thin colored header bar, optional node-type label, and selection / warning
|
|
6
|
+
* ring states. Children are rendered in the body area below the header.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export interface FlowNodeShellProps {
|
|
10
|
+
/** Whether this node is currently selected on the canvas. */
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
/** Whether this node has a validation warning. */
|
|
13
|
+
warning?: boolean;
|
|
14
|
+
/** Semantic node type label shown in the header (e.g. "Entity", "Trait"). */
|
|
15
|
+
nodeType?: string;
|
|
16
|
+
/** Background color for the 8px header bar. Any valid CSS color. */
|
|
17
|
+
headerColor?: string;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Card-style wrapper for flow nodes with a colored header strip.
|
|
23
|
+
* Selection adds a solid primary ring; warnings show a dashed warning ring.
|
|
24
|
+
*/
|
|
25
|
+
export declare const FlowNodeShell: React.FC<FlowNodeShellProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowPort Component
|
|
3
|
+
*
|
|
4
|
+
* Connection point rendered on a graph node. Shows a small circle that
|
|
5
|
+
* indicates whether the port is connected or available for wiring.
|
|
6
|
+
* Direction determines label placement (left for inputs, right for outputs).
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export interface FlowPortProps {
|
|
10
|
+
/** Whether this port receives or sends connections. */
|
|
11
|
+
direction: 'in' | 'out';
|
|
12
|
+
/** Semantic type of the port (e.g. "string", "event", "entity"). */
|
|
13
|
+
portType: string;
|
|
14
|
+
/** Human-readable label shown beside the circle. */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** Whether the port currently has a wire attached. */
|
|
17
|
+
connected?: boolean;
|
|
18
|
+
/** Whether a dragged wire is compatible with this port. */
|
|
19
|
+
compatible?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A 12px circle with optional label indicating a node connection point.
|
|
24
|
+
* Outlined when disconnected, filled primary when connected, green ring when compatible.
|
|
25
|
+
*/
|
|
26
|
+
export declare const FlowPort: React.FC<FlowPortProps>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowWire Component
|
|
3
|
+
*
|
|
4
|
+
* Provides style objects and an SVG `<path>` wrapper for flow-graph edges.
|
|
5
|
+
* Wire colors come from the AVL CONNECTION_COLORS palette. The exported
|
|
6
|
+
* `getFlowWireStyle` helper can be used independently of the component
|
|
7
|
+
* (e.g. when integrating with React Flow edge renderers).
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export type FlowWireType = 'transition' | 'event' | 'data' | 'guard';
|
|
11
|
+
export type FlowWireStatus = 'valid' | 'invalid' | 'pending';
|
|
12
|
+
export interface FlowWireProps {
|
|
13
|
+
/** Semantic wire category. Determines base color. */
|
|
14
|
+
wireType?: FlowWireType;
|
|
15
|
+
/** Validation or runtime status. 'invalid' overrides color to red. */
|
|
16
|
+
status?: FlowWireStatus;
|
|
17
|
+
/** Whether the wire shows a flowing dash animation. */
|
|
18
|
+
animated?: boolean;
|
|
19
|
+
/** SVG path data string (the "d" attribute). */
|
|
20
|
+
d?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface FlowWireStyle {
|
|
24
|
+
stroke: string;
|
|
25
|
+
strokeWidth: number;
|
|
26
|
+
strokeDasharray?: string;
|
|
27
|
+
animation?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Compute SVG path style props for a flow wire.
|
|
31
|
+
*
|
|
32
|
+
* @returns An object suitable for spreading onto an SVG `<path>` element's style.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getFlowWireStyle(props: Pick<FlowWireProps, 'wireType' | 'status' | 'animated'>): FlowWireStyle;
|
|
35
|
+
/**
|
|
36
|
+
* SVG path element styled as a flow wire.
|
|
37
|
+
* Pass the `d` prop with a path data string for rendering.
|
|
38
|
+
*/
|
|
39
|
+
export declare const FlowWire: React.FC<FlowWireProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flow Atom Components
|
|
3
|
+
*
|
|
4
|
+
* Pure visual primitives for graph/flow editors. No React Flow dependency.
|
|
5
|
+
* These atoms provide styled elements that organisms compose with React Flow.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { FlowPort, type FlowPortProps } from './FlowPort';
|
|
10
|
+
export { FlowNodeShell, type FlowNodeShellProps } from './FlowNodeShell';
|
|
11
|
+
export { FlowLabel, type FlowLabelProps, type FlowLabelVariant } from './FlowLabel';
|
|
12
|
+
export { FlowWire, getFlowWireStyle, type FlowWireProps, type FlowWireStyle, type FlowWireType, type FlowWireStatus, } from './FlowWire';
|
|
13
|
+
export { FlowMinimap, MINIMAP_COLORS, type FlowMinimapProps } from './FlowMinimap';
|
|
@@ -41,3 +41,4 @@ export { PatternTile, getTileDimensions, type PatternTileProps, type PatternVari
|
|
|
41
41
|
export { AnimatedReveal, type AnimatedRevealProps, type RevealTrigger, type RevealAnimation } from "./AnimatedReveal";
|
|
42
42
|
export { AnimatedGraphic, type AnimatedGraphicProps, type GraphicAnimation } from "./AnimatedGraphic";
|
|
43
43
|
export * from "./game";
|
|
44
|
+
export * from "./flow";
|