@cjlapao/ui-kit-vue 0.2.19 → 0.2.21
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.js +11522 -11360
- package/dist/types/common/gantt/crossings.d.ts +19 -0
- package/dist/types/common/gantt/drag.d.ts +10 -0
- package/dist/types/common/gantt/types.d.ts +6 -3
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GanttPt } from "./drag";
|
|
2
|
+
export interface GanttCrossingRoute {
|
|
3
|
+
id: string;
|
|
4
|
+
points: GanttPt[];
|
|
5
|
+
}
|
|
6
|
+
export interface GanttCrossingPath {
|
|
7
|
+
d: string;
|
|
8
|
+
hitPoints: GanttPt[];
|
|
9
|
+
hopPoints: GanttPt[][];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Decorate true perpendicular route crossings with PCB-style hops.
|
|
13
|
+
*
|
|
14
|
+
* A coarse row-height bucket is used as the broad phase, so exact segment
|
|
15
|
+
* checks only run for horizontal and vertical segments that can share space.
|
|
16
|
+
* Routes without a crossing are omitted from the returned map and therefore
|
|
17
|
+
* retain their existing byte-identical SVG path.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ganttCrossingPaths(routes: readonly GanttCrossingRoute[], cornerRadius: number, jumpRadius?: number): Map<string, GanttCrossingPath>;
|
|
@@ -54,6 +54,8 @@ export declare const LINK_PORT_R = 3.5;
|
|
|
54
54
|
* padding everywhere in the diagram.
|
|
55
55
|
*/
|
|
56
56
|
export declare const LINK_PASS_PADDING = 6;
|
|
57
|
+
/** Minimum centre-to-centre distance between independent connector lanes. */
|
|
58
|
+
export declare const LINK_LANE_SPACING = 16;
|
|
57
59
|
/** How far left of the target's left edge the final corner must sit, so the
|
|
58
60
|
* rounded elbow *and* the arrowhead both sit on a straight approach:
|
|
59
61
|
* corner room + port clearance + arrowhead length + margin. */
|
|
@@ -103,6 +105,8 @@ export declare const LINK_HANDLE_OVERHANG = 4;
|
|
|
103
105
|
/** Blank right gutter (px) past the timeline, so rightmost link routes and
|
|
104
106
|
* their arrowheads never sit at the scroll edge. */
|
|
105
107
|
export declare const LINK_RIGHT_GUTTER = 24;
|
|
108
|
+
/** Extra room past the furthest routed glyph (halo, arrow or selected stroke). */
|
|
109
|
+
export declare const LINK_BOUNDS_PADDING = 8;
|
|
106
110
|
/** Per-bar port slots: `out` = outgoing ports on the right edge, `inc` =
|
|
107
111
|
* incoming ports on the left edge, both as dense arrays of offsets from the
|
|
108
112
|
* bar's centre, in slot order (top → bottom). */
|
|
@@ -158,6 +162,12 @@ export declare function fanHandleOffset(barHeight: number, taken: number[]): num
|
|
|
158
162
|
* a global pass aligns overlapping vertical channels into shared columns.
|
|
159
163
|
*/
|
|
160
164
|
export declare function computeLinkPaths(links: GanttLink[], bars: Map<string, GanttBarGeometry>, defaultColor: TrueColor): GanttLinkPath[];
|
|
165
|
+
/**
|
|
166
|
+
* Width required by the timeline link layer and its scroll content.
|
|
167
|
+
* `LINK_RIGHT_GUTTER` remains the minimum; outside detours expand it only when
|
|
168
|
+
* their final geometry, ports or arrowheads need more room.
|
|
169
|
+
*/
|
|
170
|
+
export declare function ganttLinkLayerWidth(paths: readonly GanttLinkPath[], timelineWidth: number): number;
|
|
161
171
|
/**
|
|
162
172
|
* Compute the rubber-band preview path for a link being dragged from `source`
|
|
163
173
|
* toward a pointer at (px, py).
|
|
@@ -182,11 +182,14 @@ export interface GanttLinkPath {
|
|
|
182
182
|
/** SVG path `d` in the link layer's coordinate space (origin = timeline origin). */
|
|
183
183
|
d: string;
|
|
184
184
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
185
|
+
* Hit-test geometry in the link layer's coordinate space. Normally this is
|
|
186
|
+
* the route polyline; crossing hops include sampled arc points so nearest-
|
|
187
|
+
* route selection follows the visible connector rather than the line below.
|
|
188
188
|
*/
|
|
189
189
|
points: GanttPt[];
|
|
190
|
+
/** Sampled visible bridge arcs. Hit testing gives these priority over the
|
|
191
|
+
* straight connector passing underneath a crossing. */
|
|
192
|
+
hopPoints?: GanttPt[][];
|
|
190
193
|
/**
|
|
191
194
|
* Arrowhead polygon points (SVG `<polygon points>`), or undefined when the
|
|
192
195
|
* approach is too short for a head. Computed in the engine so the
|