@cjlapao/ui-kit-vue 0.2.7 → 0.2.8
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 +14902 -13943
- 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 +29 -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,14 @@ 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
|
+
fromSide?: PortSide;
|
|
82
|
+
toSide?: PortSide;
|
|
83
|
+
}
|
|
76
84
|
/**
|
|
77
85
|
* One of a card's two outcomes, as an edge. `success` without a `to` is the
|
|
78
86
|
* implicit next step and draws nothing extra — it only restyles the walk
|
|
@@ -134,6 +142,13 @@ export interface ConnectionFlowNodeItem {
|
|
|
134
142
|
}
|
|
135
143
|
export interface ConnectionFlowNode {
|
|
136
144
|
id: string;
|
|
145
|
+
/** Optional logical cell for top-level editor nodes. Supply on every top-level
|
|
146
|
+
* node to align rows across columns. Signed integer indices allow adding to
|
|
147
|
+
* any side. Placement does not create connections; use explicit connections. */
|
|
148
|
+
gridPosition?: {
|
|
149
|
+
column: number;
|
|
150
|
+
row: number;
|
|
151
|
+
};
|
|
137
152
|
title?: string;
|
|
138
153
|
subtitle?: string;
|
|
139
154
|
description?: string;
|
|
@@ -278,6 +293,7 @@ export interface LaidOutNode {
|
|
|
278
293
|
}
|
|
279
294
|
export interface LaidOutEdge {
|
|
280
295
|
id: string;
|
|
296
|
+
ringSize?: ConnectionFlowRingSize;
|
|
281
297
|
fromId: string | null;
|
|
282
298
|
toId: string;
|
|
283
299
|
state: ConnectionState;
|
|
@@ -291,6 +307,15 @@ export interface LaidOutEdge {
|
|
|
291
307
|
* and the line they sit on can never disagree about the route.
|
|
292
308
|
*/
|
|
293
309
|
d: string;
|
|
310
|
+
/** Measured, collision-free caption bounds in layout coordinates. */
|
|
311
|
+
caption?: {
|
|
312
|
+
x: number;
|
|
313
|
+
y: number;
|
|
314
|
+
width: number;
|
|
315
|
+
height: number;
|
|
316
|
+
lines: string[];
|
|
317
|
+
lineHeight: number;
|
|
318
|
+
};
|
|
294
319
|
sourceTone: TrueColor;
|
|
295
320
|
targetTone: TrueColor;
|
|
296
321
|
/** A bypass arc travels *over* skipped nodes rather than between neighbours. */
|
|
@@ -334,14 +359,8 @@ export interface LaidOutEdge {
|
|
|
334
359
|
/** Set when `kind` is `"branch"`. */
|
|
335
360
|
branchKind?: "success" | "failure";
|
|
336
361
|
}
|
|
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.
|
|
362
|
+
/** A distinct terminal for one edge endpoint, allocated on a node border.
|
|
363
|
+
* Fan-in and fan-out edges retain independent anchors and highlight states.
|
|
345
364
|
*/
|
|
346
365
|
export interface LaidOutConnector {
|
|
347
366
|
id: string;
|
|
@@ -352,11 +371,11 @@ export interface LaidOutConnector {
|
|
|
352
371
|
/** Which border of the node it sits on. */
|
|
353
372
|
side: PortSide;
|
|
354
373
|
tone: TrueColor;
|
|
355
|
-
/**
|
|
374
|
+
/** State of the edge attached to this terminal. */
|
|
356
375
|
state: ConnectionState;
|
|
357
376
|
/** Something is flowing through this terminal. */
|
|
358
377
|
active: boolean;
|
|
359
|
-
/**
|
|
378
|
+
/** The single edge attached here; retained as an array for API compatibility. */
|
|
360
379
|
edgeIds: string[];
|
|
361
380
|
/** Radius of the border's bulge, in px. */
|
|
362
381
|
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;
|