@cjlapao/ui-kit-vue 0.2.3 → 0.2.6

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.
@@ -9,6 +9,12 @@ export type ConnectionState = (typeof CONNECTION_STATES)[number];
9
9
  /** Shape of the edge drawn between two nodes. */
10
10
  export declare const CONNECTION_FLOW_EDGE_STYLES: readonly ["orthogonal", "curved", "straight"];
11
11
  export type ConnectionFlowEdgeStyle = (typeof CONNECTION_FLOW_EDGE_STYLES)[number];
12
+ /**
13
+ * How a card's children attach — the elbow fan, or the walked grid.
14
+ * @see ConnectionFlowNode.childLayout
15
+ */
16
+ export declare const CONNECTION_FLOW_CHILD_LAYOUTS: readonly ["fan", "chain"];
17
+ export type ConnectionFlowChildLayout = (typeof CONNECTION_FLOW_CHILD_LAYOUTS)[number];
12
18
  /**
13
19
  * How the whole component reports that it is loading.
14
20
  *
@@ -67,6 +73,19 @@ export interface ConnectionFlowConnectorConfig {
67
73
  /** Caption rendered along the edge. */
68
74
  label?: string;
69
75
  }
76
+ /**
77
+ * One of a card's two outcomes, as an edge. `success` without a `to` is the
78
+ * implicit next step and draws nothing extra — it only restyles the walk
79
+ * edge. `failure` always names its target: there is no implicit failure.
80
+ */
81
+ export interface ConnectionFlowBranch {
82
+ /** Target node id. */
83
+ to?: string;
84
+ /** @default emerald for success, rose for failure (`STATUS_TONE`). */
85
+ tone?: TrueColor;
86
+ /** Caption along the edge (no default text — the kit ships no strings). */
87
+ label?: string;
88
+ }
70
89
  /**
71
90
  * What happened to a step, as opposed to what colour it is.
72
91
  *
@@ -166,6 +185,39 @@ export interface ConnectionFlowNode {
166
185
  maxItems?: number;
167
186
  /** Nodes hanging vertically below this one. */
168
187
  children?: ConnectionFlowNode[];
188
+ /**
189
+ * How `children` attach.
190
+ *
191
+ * - `"fan"` (default) is today: every child gets its own elbow from the
192
+ * parent, hanging below it, indented.
193
+ * - `"chain"` reads `rows` (or `children`, one card per row) as a grid:
194
+ * the flow enters the first card, walks each row left→right, and drops
195
+ * from the last card of a row into the first card of the next. The
196
+ * parent becomes a pure container — it emits no edge onward; the grid's
197
+ * last card carries the connection to the parent's next sibling.
198
+ *
199
+ * @default "fan"
200
+ */
201
+ childLayout?: ConnectionFlowChildLayout;
202
+ /**
203
+ * Rows for `childLayout: "chain"` — each row walks left→right, rows are
204
+ * walked top→bottom. Cards keep the standard size; a longer row widens
205
+ * the grid (longer connectors), never the cards.
206
+ */
207
+ rows?: ConnectionFlowNode[][];
208
+ /**
209
+ * Where this card goes when it succeeds. Without `to` it follows the
210
+ * implicit next step (the track, or the chain walk); with `to` the
211
+ * successor points there instead. Emerald unless `tone` says otherwise.
212
+ */
213
+ success?: ConnectionFlowBranch;
214
+ /**
215
+ * Where this card goes when it fails — usually upstream (a loop-back
216
+ * that re-enters the target from the top, so the flow can run the chain
217
+ * down again). Rose unless `tone` says otherwise. Always drawn: topology
218
+ * stays visible while the flow runs; only its liveliness follows status.
219
+ */
220
+ failure?: ConnectionFlowBranch;
169
221
  /** Config for the edge leading *into* this node. */
170
222
  connector?: ConnectionFlowConnectorConfig;
171
223
  /**
@@ -266,6 +318,14 @@ export interface LaidOutEdge {
266
318
  emitSpan: number;
267
319
  animated: boolean;
268
320
  label?: string;
321
+ /**
322
+ * What kind of connection this is. Optional for backward compatibility —
323
+ * renderers treat everything as the track edge it always drew; the tests
324
+ * and the chain/branch passes are explicit.
325
+ */
326
+ kind?: "track" | "chain" | "branch";
327
+ /** Set when `kind` is `"branch"`. */
328
+ branchKind?: "success" | "failure";
269
329
  }
270
330
  /**
271
331
  * A terminal where one or more edges meet a node.
@@ -363,6 +423,10 @@ export interface ConnectionFlowLayoutOptions {
363
423
  childGap: number;
364
424
  /** Horizontal indent for child nodes. */
365
425
  childIndent: number;
426
+ /** Vertical gap between the rows of a chained child grid. @default childGap */
427
+ rowGap: number;
428
+ /** Left inset of a chained child grid under its parent. @default childIndent */
429
+ gridIndent: number;
366
430
  edgeStyle: ConnectionFlowEdgeStyle;
367
431
  /** Corner radius on an orthogonal edge. */
368
432
  cornerRadius: number;
@@ -386,6 +450,14 @@ export declare const nodeTone: (node: ConnectionFlowNode | undefined) => TrueCol
386
450
  export declare const nodeIcon: (node: ConnectionFlowNode | undefined) => string | undefined;
387
451
  /** Whether the node is executing. `status: "running"` implies it. */
388
452
  export declare const nodeIsActive: (node: ConnectionFlowNode | undefined) => boolean;
453
+ /** Whether the node failed — what makes its failure edge the live one. */
454
+ export declare const nodeHasFailed: (node: ConnectionFlowNode | undefined) => boolean;
455
+ /**
456
+ * The chain grid's rows, however they were written: `rows` verbatim, or a
457
+ * flat `children` array promoted to one card per row. Fan callers never
458
+ * call this.
459
+ */
460
+ export declare const toRows: (node: ConnectionFlowNode) => ConnectionFlowNode[][];
389
461
  /**
390
462
  * Whether the node is bypassed. Tri-state on purpose: `undefined` means "no
391
463
  * opinion", which is what lets `autoState` infer it, while an explicit
@@ -387,6 +387,21 @@ export declare const DEFAULT_SURFACE_PADDING: SurfacePadding;
387
387
  export declare const getSurfacePaddingClass: (padding: SurfacePadding) => string;
388
388
  /** Every padding token but `none`, for the callers that require a real inset. */
389
389
  export declare const getSurfacePaddingClasses: () => Record<SurfacePadding, string>;
390
+ /**
391
+ * The gutter a detached card leaves OUTSIDE itself — the margin between the
392
+ * card and the edges of its container, controllable on every axis on its
393
+ * own. Spelled once here, in the same language as {@link surfacePaddingClasses}
394
+ * but one step smaller per token (`xs` is the `m-2` the floating `SideMenu`
395
+ * carries, and what a paired `PageHeader` leaves above and to its right),
396
+ * and deliberately without the `sm:` steps of the padding scale: a gutter
397
+ * must be one predictable number all the way down, or the menu and header
398
+ * cards stop aligning on the breakpoint.
399
+ */
400
+ export declare const SURFACE_GUTTER_AXES: readonly ["top", "right", "bottom", "left"];
401
+ export type SurfaceGutterAxis = (typeof SURFACE_GUTTER_AXES)[number];
402
+ /** The gutter a detached card leaves when the caller does not pick one. */
403
+ export declare const DEFAULT_SURFACE_GUTTER: SurfacePadding;
404
+ export declare const getSurfaceGutterClass: (axis: SurfaceGutterAxis, gutter: SurfacePadding) => string;
390
405
  /**
391
406
  * The tones that read as "no tint". Consumers that tint chrome per tone
392
407
  * (Table's header band, for instance) route these through the neutral
@@ -260,7 +260,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
260
260
  readonly onColumnVisibilityChange?: ((visibility: Record<string, boolean>) => any) | undefined;
261
261
  readonly onColumnWidthChange?: ((widths: Record<string, number>) => any) | undefined;
262
262
  readonly onGroupByChange?: ((columnId: string | null) => any) | undefined;
263
- readonly onStickyColumnsChange?: ((config: Record<string, "left" | "right">) => any) | undefined;
263
+ readonly onStickyColumnsChange?: ((config: Record<string, "right" | "left">) => any) | undefined;
264
264
  readonly onTableSettingsChange?: ((settings: TableSettings) => any) | undefined;
265
265
  readonly onRowClick?: ((row: T, index: number) => any) | undefined;
266
266
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onSortChange" | "onViewChange" | "onColumnVisibilityChange" | "onColumnWidthChange" | "onGroupByChange" | "onStickyColumnsChange" | "onTableSettingsChange" | "onRowClick"> & TableProps<T> & Partial<{}>> & import("vue").PublicProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cjlapao/ui-kit-vue",
3
- "version": "0.2.3",
3
+ "version": "0.2.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cjlapao/ui-kit.git",
@@ -1,15 +0,0 @@
1
- /**
2
- * Canvas cannot mount an `<svg>`. A registry icon is markup, so to draw one
3
- * into a 2D context its path data has to be lifted out and turned into a
4
- * `Path2D`. The result is cached — building a `Path2D` per frame would be a
5
- * parse per icon per frame.
6
- */
7
- /**
8
- * Extracts every `d` attribute from SVG markup and merges them into one path.
9
- *
10
- * Returns `null` for markup with no paths — a circle-only or rect-only icon —
11
- * rather than an empty `Path2D`, so the caller can fall back to drawing
12
- * nothing instead of silently painting an invisible glyph.
13
- */
14
- export declare const pathFromSvgMarkup: (key: string, markup: string) => Path2D | null;
15
- export declare const clearIconPathCache: () => void;
@@ -1,36 +0,0 @@
1
- import { type ColorScheme } from "./tones";
2
- import type { ConnectionFlowLayout } from "./types";
3
- export interface PaintOptions {
4
- scheme: ColorScheme;
5
- /** Corner radius of a node box, in px. */
6
- radius: number;
7
- /** Font sizes, from the node metrics for the current control size. */
8
- titleSize: number;
9
- bodySize: number;
10
- padding: number;
11
- /** Milliseconds since the animation started — drives dot travel and pulse. */
12
- time: number;
13
- /** Target px between travelling dots. */
14
- dotSpacing: number;
15
- /** Node ids to keep lit. Empty means "no highlight, draw everything lit". */
16
- highlightNodes: Set<string>;
17
- /** Edge ids to keep lit. */
18
- highlightEdges: Set<string>;
19
- hoveredId: string | null;
20
- selectedId: string | null;
21
- /** Draws each node's progress indicator. */
22
- showProgress: boolean;
23
- /** Device pixel ratio the context was scaled by. */
24
- dpr: number;
25
- /** Resolved icon glyphs, keyed by registry name. */
26
- icons?: Map<string, Path2D>;
27
- fontFamily: string;
28
- }
29
- /**
30
- * Paints one frame. The context is expected to be already scaled for the
31
- * device pixel ratio and translated/scaled for pan and zoom — the painter
32
- * works purely in layout coordinates.
33
- */
34
- export declare const paintConnectionFlow: (ctx: CanvasRenderingContext2D, layout: ConnectionFlowLayout, options: PaintOptions) => void;
35
- /** True when the layout contains anything that needs a new frame. */
36
- export declare const layoutIsAnimated: (layout: ConnectionFlowLayout) => boolean;
@@ -1,28 +0,0 @@
1
- import { type ConnectionFlowLayout, type LaidOutNode } from "../../connectionFlow";
2
- import type { ColorScheme } from "../../connectionFlow";
3
- type __VLS_Props = {
4
- layout: ConnectionFlowLayout;
5
- scheme: ColorScheme;
6
- radius: number;
7
- titleSize: number;
8
- bodySize: number;
9
- padding: number;
10
- dotSpacing: number;
11
- showProgress: boolean;
12
- animated: boolean;
13
- highlightNodes: Set<string>;
14
- highlightEdges: Set<string>;
15
- hoveredId: string | null;
16
- selectedId: string | null;
17
- scale: number;
18
- offsetX: number;
19
- offsetY: number;
20
- };
21
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
- select: (node: LaidOutNode) => any;
23
- hover: (node: LaidOutNode | null) => any;
24
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
25
- onSelect?: ((node: LaidOutNode) => any) | undefined;
26
- onHover?: ((node: LaidOutNode | null) => any) | undefined;
27
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
- export default _default;
@@ -1,45 +0,0 @@
1
- import type { TreeTone } from "../TreeView/types";
2
- import type { ConnectionFlowItem } from "./types";
3
- export interface ColumnGeometry {
4
- /** Total rendered height of the whole column (parent + gap + all children). */
5
- totalHeight: number;
6
- /**
7
- * Y offsets (from the TOP of the column) to the centre of each source card.
8
- * anchors[0] = parent card, anchors[1..] = child cards (or parallel items).
9
- */
10
- anchors: number[];
11
- /** True when this geometry represents a parallel group (not a single-item column). */
12
- isParallelGroup?: boolean;
13
- }
14
- export interface ConnectionFlowColumnProps {
15
- item: ConnectionFlowItem;
16
- globalTone?: TreeTone;
17
- childIndent?: "xs" | "sm" | "md" | "lg";
18
- childRowGap?: number;
19
- animated?: boolean;
20
- showLine?: boolean;
21
- connectorHalf?: boolean;
22
- connectorBorderSize?: "fit" | "xs" | "sm" | "md" | "lg";
23
- dotSpacing?: number;
24
- itemWidth?: number | string;
25
- /** When true, forces all child branches to animate (mirrors parent connection state). */
26
- flowActive?: boolean;
27
- /** When true, cards show a hover lift effect. */
28
- hoverable?: boolean;
29
- }
30
- declare const _default: import("vue").DefineComponent<ConnectionFlowColumnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
31
- geometryChange: (geo: ColumnGeometry) => any;
32
- }, string, import("vue").PublicProps, Readonly<ConnectionFlowColumnProps> & Readonly<{
33
- onGeometryChange?: ((geo: ColumnGeometry) => any) | undefined;
34
- }>, {
35
- animated: boolean;
36
- hoverable: boolean;
37
- showLine: boolean;
38
- dotSpacing: number;
39
- connectorHalf: boolean;
40
- connectorBorderSize: "fit" | "xs" | "sm" | "md" | "lg";
41
- childIndent: "xs" | "sm" | "md" | "lg";
42
- childRowGap: number;
43
- flowActive: boolean;
44
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
45
- export default _default;
@@ -1,103 +0,0 @@
1
- import { type VNodeChild } from "vue";
2
- import type { TreeTone } from "../TreeView/types";
3
- import type { ConnectionState } from "./types";
4
- export interface ConnectionFlowConnectorProps {
5
- state?: ConnectionState;
6
- sourceTone?: TreeTone;
7
- targetTone?: TreeTone;
8
- middleIcon?: VNodeChild;
9
- width?: number;
10
- halfRing?: boolean;
11
- showLine?: boolean;
12
- animated?: boolean;
13
- dotSpacing?: number;
14
- borderSize?: "fit" | "xs" | "sm" | "md" | "lg";
15
- sourceFill?: string;
16
- sourceBorder?: string;
17
- sourceDot?: string;
18
- targetFill?: string;
19
- targetBorder?: string;
20
- targetDot?: string;
21
- dotColor?: string;
22
- /**
23
- * Multi-source mode: Y offsets from the TOP of the connector space for each
24
- * source card's centre (parent first, then children).
25
- * When provided and length > 1, a vertical trunk is drawn on the left side
26
- * connecting all source rings, and each source gets its own dotted line to
27
- * the RIGHT entry ring.
28
- */
29
- leftAnchors?: number[];
30
- /**
31
- * Total height the connector should occupy.
32
- * Defaults to the source column height; pass max(source, target) when heights differ.
33
- */
34
- connectorHeight?: number;
35
- /**
36
- * Y offset of the TARGET card's centre from the top of the connector space.
37
- * When different from the source anchor, a bezier curve is drawn between the
38
- * two ring positions instead of a straight horizontal line.
39
- * Defaults to the source anchor (straight line).
40
- */
41
- rightAnchorY?: number;
42
- /**
43
- * Tones for extra source rings (index 0 = parent, already set via sourceTone).
44
- * Used to colour child source rings independently.
45
- */
46
- extraSourceTones?: TreeTone[];
47
- /**
48
- * Fan-out mode: Y offsets from the TOP of the connector space for each TARGET card's centre.
49
- * When provided and length > 1, a vertical trunk is drawn on the RIGHT side
50
- * connecting all target rings, and each target gets its own dotted line from the LEFT entry ring.
51
- */
52
- rightAnchors?: number[];
53
- /**
54
- * Tones for each right-side ring in fan-out mode.
55
- * Index i corresponds to rightAnchors[i]. Falls back to targetTone.
56
- */
57
- rightAnchorTones?: TreeTone[];
58
- /**
59
- * Per-lane active state for fan-out mode.
60
- * Index i corresponds to rightAnchors[i]. When provided, each lane's animation is
61
- * controlled independently. Falls back to the overall `state`.
62
- */
63
- rightAnchorStates?: ConnectionState[];
64
- /**
65
- * When true, flowing dots are shown even when `state` is `'stopped'`
66
- * (already-traversed / completed connectors also animate).
67
- * Default: false
68
- */
69
- animateCompleted?: boolean;
70
- /**
71
- * When true, the connector stretches to fill available flex space instead of using a
72
- * fixed pixel width. The SVG geometry is recalculated from the measured container width
73
- * so rings stay at correct positions and the middle icon stays at the exact midpoint.
74
- * Default: false
75
- */
76
- fullWidth?: boolean;
77
- }
78
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ConnectionFlowConnectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ConnectionFlowConnectorProps> & Readonly<{}>, {
79
- width: number;
80
- fullWidth: boolean;
81
- animated: boolean;
82
- state: ConnectionState;
83
- sourceTone: TreeTone;
84
- targetTone: TreeTone;
85
- halfRing: boolean;
86
- showLine: boolean;
87
- dotSpacing: number;
88
- borderSize: "fit" | "xs" | "sm" | "md" | "lg";
89
- extraSourceTones: TreeTone[];
90
- rightAnchorTones: TreeTone[];
91
- rightAnchorStates: ConnectionState[];
92
- animateCompleted: boolean;
93
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
94
- middleIcon?: (props: {}) => any;
95
- } & {
96
- middleIcon?: (props: {}) => any;
97
- }>;
98
- export default _default;
99
- type __VLS_WithSlots<T, S> = T & {
100
- new (): {
101
- $slots: S;
102
- };
103
- };
@@ -1,17 +0,0 @@
1
- import type { TreeTone } from "../TreeView/types";
2
- import type { ConnectionFlowItem } from "./types";
3
- import type { ColumnGeometry } from "./ConnectionFlowColumn.vue";
4
- export interface ConnectionFlowParallelGroupProps {
5
- items: ConnectionFlowItem[];
6
- globalTone?: TreeTone;
7
- itemWidth?: number | string;
8
- hoverable?: boolean;
9
- }
10
- declare const _default: import("vue").DefineComponent<ConnectionFlowParallelGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
- geometryChange: (geo: ColumnGeometry) => any;
12
- }, string, import("vue").PublicProps, Readonly<ConnectionFlowParallelGroupProps> & Readonly<{
13
- onGeometryChange?: ((geo: ColumnGeometry) => any) | undefined;
14
- }>, {
15
- hoverable: boolean;
16
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
- export default _default;
@@ -1,220 +0,0 @@
1
- import type { VNodeChild } from "vue";
2
- import type { TreeTone } from "../TreeView/types";
3
- export type ConnectionState = "flowing" | "stopped" | "disabled";
4
- export interface ConnectionFlowConnectorConfig {
5
- /** Active flow state for this connector */
6
- state?: ConnectionState;
7
- /** Optional React element to render in the middle (e.g. an icon) */
8
- icon?: VNodeChild;
9
- /** Width of the connector band in px (default: 56) */
10
- width?: number;
11
- /** Whether to animate the flowing dots (default: true) */
12
- animated?: boolean;
13
- /** target px per dot cycle (default: 60) */
14
- dotSpacing?: number;
15
- /** Connector ring border width (default: 'xs') */
16
- borderSize?: "fit" | "xs" | "sm" | "md" | "lg";
17
- /** Whether to draw half-rings (default: true) */
18
- halfRing?: boolean;
19
- /** Show the horizontal line between rings (default: true) */
20
- showLine?: boolean;
21
- /** Override — force the source-side ring tone instead of inheriting from source item */
22
- sourceTone?: TreeTone;
23
- /** Override — force the target-side ring tone instead of inheriting from this item */
24
- targetTone?: TreeTone;
25
- /** Source ring background fill color (CSS string, e.g. '#22c55e' or 'rgba(...)') */
26
- sourceFill?: string;
27
- /** Source ring stroke/border color */
28
- sourceBorder?: string;
29
- /** Source ring center dot color */
30
- sourceDot?: string;
31
- /** Target ring background fill color */
32
- targetFill?: string;
33
- /** Target ring stroke/border color */
34
- targetBorder?: string;
35
- /** Target ring center dot color */
36
- targetDot?: string;
37
- /** Animated dot color (overrides what is derived from targetTone) */
38
- dotColor?: string;
39
- /**
40
- * When true, flowing dots are shown even when this connector's state is `'stopped'`
41
- * (i.e. already-traversed / completed edges also animate).
42
- * Default: false
43
- */
44
- animateCompleted?: boolean;
45
- }
46
- export interface ConnectionFlowItem {
47
- id: string;
48
- icon?: VNodeChild;
49
- iconClassName?: string;
50
- title?: VNodeChild;
51
- titleClassName?: string;
52
- /** When true, the card title wraps on word boundaries up to 10 lines instead of truncating. Default: false */
53
- titleWrap?: boolean;
54
- /** When true, the card title stays on one line and scrolls horizontally. Default: false */
55
- titleScroll?: boolean;
56
- subtitle?: VNodeChild;
57
- subtitleClassName?: string;
58
- description?: VNodeChild;
59
- descriptionClassName?: string;
60
- /** Optional badge/status slot rendered below description, without tone-derived text styling. */
61
- badge?: VNodeChild;
62
- tone?: TreeTone;
63
- body?: VNodeChild;
64
- defaultExpanded?: boolean;
65
- actions?: VNodeChild;
66
- hoverActions?: VNodeChild;
67
- /**
68
- * Connector config for the edge leading INTO this item.
69
- * If not provided, inherits from the ConnectionFlow's default state.
70
- * Ignored for the first item (it has no predecessor).
71
- */
72
- connector?: ConnectionFlowConnectorConfig;
73
- /**
74
- * Children render vertically below this item's card using TreeView-style
75
- * SVG connectors. The connector between this item and the next sibling
76
- * spans the full column height (parent + children).
77
- */
78
- children?: ConnectionFlowItem[];
79
- /**
80
- * When true, this item has NO right-side connector to the next sibling
81
- * (it terminates the horizontal flow after itself).
82
- * Default: false
83
- */
84
- terminal?: boolean;
85
- /**
86
- * Active state — drives the vertical sub-tree dot animation color.
87
- * Default: false
88
- */
89
- active?: boolean;
90
- /**
91
- * When true, this item is part of a parallel group. Consecutive items with
92
- * parallel=true are rendered as a single vertical column instead of separate
93
- * horizontal nodes. Fan-out (1→N) and fan-in (N→1) connectors are added automatically.
94
- * Default: false
95
- */
96
- parallel?: boolean;
97
- /**
98
- * When true, the card shows a subtle hover lift effect (shadow + translate-y).
99
- * Default: false
100
- */
101
- hoverable?: boolean;
102
- /**
103
- * When true, overlays a pulsing background animation on the card (uses the item's tone).
104
- * Typically combined with `active: true` to indicate in-progress steps.
105
- * Default: false
106
- */
107
- activePulse?: boolean;
108
- /**
109
- * When true, this step was skipped — the execution flow bypassed it.
110
- * A visual bypass arc is drawn from the last non-skipped predecessor to the
111
- * first non-skipped successor, arching over all consecutive skipped items.
112
- * Default: false
113
- */
114
- skipped?: boolean;
115
- }
116
- export interface ConnectionFlowProps {
117
- /** The nodes to render horizontally */
118
- items: ConnectionFlowItem[];
119
- /**
120
- * Fallback state applied to any connector that doesn't have its own `state`.
121
- * Default: 'flowing'
122
- */
123
- flowState?: ConnectionState;
124
- /**
125
- * Fallback icon shown in the middle of connectors (overridden per-item).
126
- */
127
- flowIcon?: VNodeChild;
128
- /**
129
- * Fallback connector width in px.
130
- * Default: 56
131
- */
132
- connectorWidth?: number;
133
- /**
134
- * Whether flowing-dot animation is enabled globally.
135
- * Default: true
136
- */
137
- animated?: boolean;
138
- /**
139
- * Target px between dots globally.
140
- * Default: 60
141
- */
142
- dotSpacing?: number;
143
- /**
144
- * Ring border size globally.
145
- * Default: 'xs'
146
- */
147
- connectorBorderSize?: "fit" | "xs" | "sm" | "md" | "lg";
148
- /**
149
- * Draw half-rings (matching TreeView half-connector style).
150
- * Default: true
151
- */
152
- connectorHalf?: boolean;
153
- /**
154
- * Show the horizontal line between connectors.
155
- * Default: true
156
- */
157
- showLine?: boolean;
158
- /** Indent size for children sub-trees. Default: 'xs' */
159
- childIndent?: "xs" | "sm" | "md" | "lg";
160
- /** Row gap in px between children. Default: 8 */
161
- childRowGap?: number;
162
- /**
163
- * If true, allows the flow to scroll horizontally/vertically if the container is smaller than the flow.
164
- * Default: false
165
- */
166
- allowScroll?: boolean;
167
- /**
168
- * Set a fixed width for all items in the flow (e.g. 250, '300px').
169
- * Primarily useful when `allowScroll` is enabled.
170
- */
171
- itemWidth?: number | string;
172
- /**
173
- * When true, automatically scales the entire flow down to fit the container width.
174
- * Once the scale would go below `minScale`, the flow is clamped and allowed to scroll.
175
- * Default: false
176
- */
177
- autoScale?: boolean;
178
- /**
179
- * Minimum CSS scale factor applied when `autoScale` is true.
180
- * Below this value the flow falls back to horizontal scroll instead of shrinking further.
181
- * Default: 0.55
182
- */
183
- minScale?: number;
184
- /** Extra content to render to the right of the entire flow (e.g. an expand toggle) */
185
- rightAction?: VNodeChild;
186
- /**
187
- * When true, connectors stretch to fill all remaining width instead of using a fixed
188
- * pixel size. Card columns collapse to their natural content width. The connector icon
189
- * is always positioned at the exact midpoint of the expanded connector.
190
- * Default: false
191
- */
192
- fullWidthConnectors?: boolean;
193
- /**
194
- * When true, all cards in the flow show a hover lift effect.
195
- * Default: false
196
- */
197
- hoverable?: boolean;
198
- /**
199
- * When true, flowing dots are rendered on `'stopped'` (completed / already-traversed)
200
- * connectors in addition to `'flowing'` ones. Bypass arcs over skipped steps always
201
- * animate when `animated` is true, regardless of this flag.
202
- * Default: false
203
- */
204
- animateCompleted?: boolean;
205
- /**
206
- * When true, the engine automatically manages connector states and skipped detection
207
- * based purely on each item's `tone`:
208
- *
209
- * - **Connector state** (when no explicit `connector.state` is set):
210
- * - Non-neutral source tone → `'stopped'` (solid toned line — step was traversed)
211
- * - Neutral source tone → `'disabled'` (dashed gray — step not yet reached)
212
- *
213
- * - **Skipped detection**: a neutral-tone item that has at least one non-neutral
214
- * successor is automatically treated as skipped — a bypass arc is drawn over it.
215
- *
216
- * Explicit per-item `connector.state` or `item.skipped` values always take precedence.
217
- * Default: false
218
- */
219
- autoConnectorState?: boolean;
220
- }