@cjlapao/ui-kit-vue 0.2.7 → 0.2.9
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/index.cjs +17 -17
- package/dist/index.css +611 -0
- package/dist/index.js +14926 -13942
- package/dist/types/common/connectionFlow/anchors.d.ts +4 -0
- package/dist/types/common/connectionFlow/captions.d.ts +21 -0
- package/dist/types/common/connectionFlow/layout.d.ts +3 -1
- package/dist/types/common/connectionFlow/router.d.ts +27 -1
- package/dist/types/common/connectionFlow/types.d.ts +41 -10
- package/dist/types/vue/src/components/Gantt/Gantt.vue.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConnectionFlowLayoutOptions, LaidOutConnector, LaidOutEdge, LaidOutNode } from "./types";
|
|
2
|
+
/** Allocate one terminal per edge endpoint. Overflow uses the nearest free side;
|
|
3
|
+
* each route reserves its own lane, including fan-in and fan-out connections. */
|
|
4
|
+
export declare function separateAnchors(nodes: LaidOutNode[], edges: LaidOutEdge[], connectors: Map<string, LaidOutConnector>, options: ConnectionFlowLayoutOptions): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ConnectionFlowLayoutOptions, type LaidOutConnector, type LaidOutEdge, type LaidOutNode } from "./types";
|
|
2
|
+
/** Conservative glyph advances at the renderer's fixed 10px font size. */
|
|
3
|
+
export declare const captionTextWidth: (text: string) => number;
|
|
4
|
+
export declare function wrapCaption(text: string, width: number): string[];
|
|
5
|
+
/** Captions own real corridor area, not a rectangle painted over the board.
|
|
6
|
+
* Place labelled routes in order, reserve their bounds, then route unlabelled
|
|
7
|
+
* paths around them. Previously placed captions never move under a later edge.
|
|
8
|
+
*/
|
|
9
|
+
export declare function layoutCaptions(nodes: LaidOutNode[], edges: LaidOutEdge[], connectors: Map<string, LaidOutConnector>, options: ConnectionFlowLayoutOptions): void;
|
|
10
|
+
/** Per-node seam budgets. A retry reserves the seam on the side of its
|
|
11
|
+
* target; a normal connector reserves the seam before its destination. */
|
|
12
|
+
export declare function captionSpacing(nodes: readonly import("./types").ConnectionFlowNode[], options: ConnectionFlowLayoutOptions): {
|
|
13
|
+
before: Map<string, {
|
|
14
|
+
horizontal: number;
|
|
15
|
+
vertical: number;
|
|
16
|
+
}>;
|
|
17
|
+
after: Map<string, {
|
|
18
|
+
horizontal: number;
|
|
19
|
+
vertical: number;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConnectionFlowLayout, type ConnectionFlowLayoutOptions, type ConnectionFlowNode, type ConnectionState, type LaidOutNode } from "./types";
|
|
1
|
+
import { type ConnectionFlowConnection, type ConnectionFlowLayout, type ConnectionFlowLayoutOptions, type ConnectionFlowNode, type ConnectionState, type LaidOutNode } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* A column on the main track: one `step`/`branch` node, or a stack of
|
|
4
4
|
* consecutive `parallel` ones.
|
|
@@ -26,6 +26,8 @@ export declare const buildColumns: (nodes: ConnectionFlowNode[]) => Column[];
|
|
|
26
26
|
export declare const resolveSkipped: (columns: Column[], autoSkip: boolean) => Set<number>;
|
|
27
27
|
export interface LayoutInput {
|
|
28
28
|
nodes: ConnectionFlowNode[];
|
|
29
|
+
/** When supplied, draw only these connections, including an empty array. */
|
|
30
|
+
connections?: readonly ConnectionFlowConnection[];
|
|
29
31
|
options?: Partial<ConnectionFlowLayoutOptions>;
|
|
30
32
|
/** Fallback state for edges that do not declare one. */
|
|
31
33
|
flowState?: ConnectionState;
|
|
@@ -88,6 +88,11 @@ export interface Route {
|
|
|
88
88
|
d: string;
|
|
89
89
|
}
|
|
90
90
|
export declare const routePorts: (fromPort: Port, toPort: Port, options: RouteOptions) => Route;
|
|
91
|
+
/** Rebuild an existing corridor after moving a terminal along its side. */
|
|
92
|
+
export declare const routePolyline: (points: {
|
|
93
|
+
x: number;
|
|
94
|
+
y: number;
|
|
95
|
+
}[], style: ConnectionFlowEdgeStyle, radius: number) => Route;
|
|
91
96
|
/** Total length of a waypoint list. */
|
|
92
97
|
export declare const routeLength: (points: {
|
|
93
98
|
x: number;
|
|
@@ -143,6 +148,8 @@ export interface PathEndpoint {
|
|
|
143
148
|
* straitjacket — a card in the way always outranks the idiom.
|
|
144
149
|
*/
|
|
145
150
|
preferSides?: PortSide[];
|
|
151
|
+
/** Optional hard constraint for already allocated terminal sides. */
|
|
152
|
+
sides?: PortSide[];
|
|
146
153
|
}
|
|
147
154
|
/**
|
|
148
155
|
* Shared lane accounting. Every route the engine returns charges its grid
|
|
@@ -153,6 +160,8 @@ export interface PathEndpoint {
|
|
|
153
160
|
export type LaneUse = Map<string, number>;
|
|
154
161
|
export declare const createLaneUse: () => LaneUse;
|
|
155
162
|
export interface PathOptions {
|
|
163
|
+
/** Require all obstacle interiors to remain clear (caption corridor routing). */
|
|
164
|
+
strictObstacles?: boolean;
|
|
156
165
|
style: ConnectionFlowEdgeStyle;
|
|
157
166
|
/** How far a line must run out of a port before it may turn. */
|
|
158
167
|
stub?: number;
|
|
@@ -174,7 +183,24 @@ export interface PathOptions {
|
|
|
174
183
|
preferBonus?: number;
|
|
175
184
|
/** Shared across one layout run — see `createLaneUse`. */
|
|
176
185
|
laneUse?: LaneUse;
|
|
186
|
+
/** Minimum distance between parallel independent lanes. */
|
|
187
|
+
laneSpacing?: number;
|
|
188
|
+
/** Existing routes: charge crowding and expose adjacent lanes. */
|
|
189
|
+
occupied?: readonly (readonly {
|
|
190
|
+
x: number;
|
|
191
|
+
y: number;
|
|
192
|
+
}[])[];
|
|
177
193
|
}
|
|
194
|
+
/** Minimum centre-to-centre lane distance, including room for a 6px hop. */
|
|
195
|
+
export declare const routingLaneSpacing: (clearance: number, cornerRadius: number) => number;
|
|
196
|
+
/** Length of parallel overlap within a lane; perpendicular crossings use bridges. */
|
|
197
|
+
export declare const parallelOverlap: (a: readonly {
|
|
198
|
+
x: number;
|
|
199
|
+
y: number;
|
|
200
|
+
}[], b: readonly {
|
|
201
|
+
x: number;
|
|
202
|
+
y: number;
|
|
203
|
+
}[], spacing?: number) => number;
|
|
178
204
|
/** Does any segment of this waypoint list pass through the interior of a box? */
|
|
179
205
|
export declare const segmentsCrossBoxes: (points: {
|
|
180
206
|
x: number;
|
|
@@ -212,7 +238,7 @@ export interface RoutableEdge {
|
|
|
212
238
|
/**
|
|
213
239
|
* The crossing pass: compare every pair of routed edges and give the
|
|
214
240
|
* horizontal one of each crossing a hop. Returns the new `d` for the edges
|
|
215
|
-
* that gained hops
|
|
241
|
+
* that gained hops or needed a tighter corner to preserve a crossing.
|
|
216
242
|
*/
|
|
217
243
|
export declare const routeCrossings: (edges: RoutableEdge[], options?: {
|
|
218
244
|
cornerRadius?: number;
|
|
@@ -73,6 +73,26 @@ export interface ConnectionFlowConnectorConfig {
|
|
|
73
73
|
/** Caption rendered along the edge. */
|
|
74
74
|
label?: string;
|
|
75
75
|
}
|
|
76
|
+
/** Explicit topology. Supplying a connections array disables inferred edges. */
|
|
77
|
+
export interface ConnectionFlowConnection extends ConnectionFlowConnectorConfig {
|
|
78
|
+
id: string;
|
|
79
|
+
fromId: string;
|
|
80
|
+
toId: string;
|
|
81
|
+
/** Overall connection color. Defaults to the source node's tone. */
|
|
82
|
+
tone?: TrueColor;
|
|
83
|
+
/** Application-defined category (for example success, failure or condition). */
|
|
84
|
+
type?: string;
|
|
85
|
+
/** Supporting text for connection editors and accessible descriptions. */
|
|
86
|
+
description?: string;
|
|
87
|
+
/** Application-owned condition, rule or other metadata; never executed by the kit. */
|
|
88
|
+
data?: unknown;
|
|
89
|
+
/** Allow edit requests for this connection. @default true */
|
|
90
|
+
editable?: boolean;
|
|
91
|
+
/** Allow removal requests for this connection. @default true */
|
|
92
|
+
deletable?: boolean;
|
|
93
|
+
fromSide?: PortSide;
|
|
94
|
+
toSide?: PortSide;
|
|
95
|
+
}
|
|
76
96
|
/**
|
|
77
97
|
* One of a card's two outcomes, as an edge. `success` without a `to` is the
|
|
78
98
|
* implicit next step and draws nothing extra — it only restyles the walk
|
|
@@ -134,6 +154,13 @@ export interface ConnectionFlowNodeItem {
|
|
|
134
154
|
}
|
|
135
155
|
export interface ConnectionFlowNode {
|
|
136
156
|
id: string;
|
|
157
|
+
/** Optional logical cell for top-level editor nodes. Supply on every top-level
|
|
158
|
+
* node to align rows across columns. Signed integer indices allow adding to
|
|
159
|
+
* any side. Placement does not create connections; use explicit connections. */
|
|
160
|
+
gridPosition?: {
|
|
161
|
+
column: number;
|
|
162
|
+
row: number;
|
|
163
|
+
};
|
|
137
164
|
title?: string;
|
|
138
165
|
subtitle?: string;
|
|
139
166
|
description?: string;
|
|
@@ -278,6 +305,7 @@ export interface LaidOutNode {
|
|
|
278
305
|
}
|
|
279
306
|
export interface LaidOutEdge {
|
|
280
307
|
id: string;
|
|
308
|
+
ringSize?: ConnectionFlowRingSize;
|
|
281
309
|
fromId: string | null;
|
|
282
310
|
toId: string;
|
|
283
311
|
state: ConnectionState;
|
|
@@ -291,6 +319,15 @@ export interface LaidOutEdge {
|
|
|
291
319
|
* and the line they sit on can never disagree about the route.
|
|
292
320
|
*/
|
|
293
321
|
d: string;
|
|
322
|
+
/** Measured, collision-free caption bounds in layout coordinates. */
|
|
323
|
+
caption?: {
|
|
324
|
+
x: number;
|
|
325
|
+
y: number;
|
|
326
|
+
width: number;
|
|
327
|
+
height: number;
|
|
328
|
+
lines: string[];
|
|
329
|
+
lineHeight: number;
|
|
330
|
+
};
|
|
294
331
|
sourceTone: TrueColor;
|
|
295
332
|
targetTone: TrueColor;
|
|
296
333
|
/** A bypass arc travels *over* skipped nodes rather than between neighbours. */
|
|
@@ -334,14 +371,8 @@ export interface LaidOutEdge {
|
|
|
334
371
|
/** Set when `kind` is `"branch"`. */
|
|
335
372
|
branchKind?: "success" | "failure";
|
|
336
373
|
}
|
|
337
|
-
/**
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
* These are layout output rather than something each edge draws for itself.
|
|
341
|
-
* When three edges fan out of one card they share a single port, and an edge
|
|
342
|
-
* that painted its own endpoints stamped three identical rings on that one
|
|
343
|
-
* spot — which the highlight then dimmed three times over, so a "dimmed"
|
|
344
|
-
* connector came out darker than a lit one.
|
|
374
|
+
/** A distinct terminal for one edge endpoint, allocated on a node border.
|
|
375
|
+
* Fan-in and fan-out edges retain independent anchors and highlight states.
|
|
345
376
|
*/
|
|
346
377
|
export interface LaidOutConnector {
|
|
347
378
|
id: string;
|
|
@@ -352,11 +383,11 @@ export interface LaidOutConnector {
|
|
|
352
383
|
/** Which border of the node it sits on. */
|
|
353
384
|
side: PortSide;
|
|
354
385
|
tone: TrueColor;
|
|
355
|
-
/**
|
|
386
|
+
/** State of the edge attached to this terminal. */
|
|
356
387
|
state: ConnectionState;
|
|
357
388
|
/** Something is flowing through this terminal. */
|
|
358
389
|
active: boolean;
|
|
359
|
-
/**
|
|
390
|
+
/** The single edge attached here; retained as an array for API compatibility. */
|
|
360
391
|
edgeIds: string[];
|
|
361
392
|
/** Radius of the border's bulge, in px. */
|
|
362
393
|
radius: number;
|
|
@@ -140,11 +140,11 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<GanttProps
|
|
|
140
140
|
color: TrueColor;
|
|
141
141
|
variant: GanttVariant;
|
|
142
142
|
corner: GanttCorner;
|
|
143
|
+
links: GanttLink[];
|
|
143
144
|
padding: GanttPadding;
|
|
144
145
|
resizableColumns: boolean;
|
|
145
146
|
minZoom: number;
|
|
146
147
|
maxZoom: number;
|
|
147
|
-
links: GanttLink[];
|
|
148
148
|
initialZoom: number;
|
|
149
149
|
snap: GanttSnap;
|
|
150
150
|
showToday: boolean;
|