@eightkk/vue-weave 0.0.0-stage → 1.1.0

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +525 -0
  2. package/CONTRIBUTING.md +116 -0
  3. package/LICENSE +21 -0
  4. package/README.ja.md +278 -0
  5. package/README.md +275 -2
  6. package/THIRD_PARTY_NOTICES.md +25 -0
  7. package/dist/core-LWK21xl4.js +13672 -0
  8. package/dist/core.js +1 -0
  9. package/dist/index.js +8505 -0
  10. package/dist/style.css +2 -0
  11. package/dist/types/components/GanttChart.vue.d.ts +353 -0
  12. package/dist/types/components/NetworkGraph.vue.d.ts +252 -0
  13. package/dist/types/components/types.d.ts +27 -0
  14. package/dist/types/composables/useAsyncGraphLayout.d.ts +163 -0
  15. package/dist/types/composables/useEditHistory.d.ts +13 -0
  16. package/dist/types/composables/useEditTransaction.d.ts +46 -0
  17. package/dist/types/composables/useLinkedSelection.d.ts +118 -0
  18. package/dist/types/composables/useTimelineView.d.ts +24 -0
  19. package/dist/types/composables/useWindowedData.d.ts +83 -0
  20. package/dist/types/core/actuals.d.ts +170 -0
  21. package/dist/types/core/calendarFormat.d.ts +65 -0
  22. package/dist/types/core/editTransaction.d.ts +96 -0
  23. package/dist/types/core/exportSvg.d.ts +236 -0
  24. package/dist/types/core/fieldEditing.d.ts +114 -0
  25. package/dist/types/core/graph.d.ts +196 -0
  26. package/dist/types/core/graphAlgorithms.d.ts +51 -0
  27. package/dist/types/core/graphAnalysis.d.ts +96 -0
  28. package/dist/types/core/graphCollapse.d.ts +62 -0
  29. package/dist/types/core/graphCrossings.d.ts +25 -0
  30. package/dist/types/core/graphEditing.d.ts +52 -0
  31. package/dist/types/core/graphExpansion.d.ts +71 -0
  32. package/dist/types/core/graphFlow.d.ts +184 -0
  33. package/dist/types/core/graphForce.d.ts +29 -0
  34. package/dist/types/core/graphGeometry.d.ts +31 -0
  35. package/dist/types/core/graphIncremental.d.ts +93 -0
  36. package/dist/types/core/graphLasso.d.ts +15 -0
  37. package/dist/types/core/graphLayoutRequests.d.ts +218 -0
  38. package/dist/types/core/graphLayouts.d.ts +81 -0
  39. package/dist/types/core/graphObstacleRouting.d.ts +68 -0
  40. package/dist/types/core/graphPortRules.d.ts +111 -0
  41. package/dist/types/core/graphRouting.d.ts +84 -0
  42. package/dist/types/core/graphSnapping.d.ts +34 -0
  43. package/dist/types/core/graphSpatial.d.ts +49 -0
  44. package/dist/types/core/graphSwimlanes.d.ts +77 -0
  45. package/dist/types/core/graphTraversal.d.ts +51 -0
  46. package/dist/types/core/graphView.d.ts +73 -0
  47. package/dist/types/core/index.d.ts +76 -0
  48. package/dist/types/core/interchange.d.ts +6 -0
  49. package/dist/types/core/interchangeCsv.d.ts +75 -0
  50. package/dist/types/core/interchangeICalendar.d.ts +111 -0
  51. package/dist/types/core/interchangeMsProject.d.ts +339 -0
  52. package/dist/types/core/leveling.d.ts +57 -0
  53. package/dist/types/core/pert.d.ts +62 -0
  54. package/dist/types/core/placement.d.ts +100 -0
  55. package/dist/types/core/planComparison.d.ts +275 -0
  56. package/dist/types/core/resourceLoad.d.ts +65 -0
  57. package/dist/types/core/resourceTimeline.d.ts +179 -0
  58. package/dist/types/core/rowHierarchy.d.ts +25 -0
  59. package/dist/types/core/scheduleDiagnostics.d.ts +37 -0
  60. package/dist/types/core/scheduleModel.d.ts +187 -0
  61. package/dist/types/core/scheduleTrace.d.ts +118 -0
  62. package/dist/types/core/scheduling.d.ts +194 -0
  63. package/dist/types/core/sheetEditing.d.ts +36 -0
  64. package/dist/types/core/snapshot.d.ts +388 -0
  65. package/dist/types/core/statusDate.d.ts +36 -0
  66. package/dist/types/core/timeRangeTargets.d.ts +67 -0
  67. package/dist/types/core/timeline.d.ts +194 -0
  68. package/dist/types/core/timelineView.d.ts +101 -0
  69. package/dist/types/core/types.d.ts +805 -0
  70. package/dist/types/core/viewBindings.d.ts +112 -0
  71. package/dist/types/core/windowedData.d.ts +255 -0
  72. package/dist/types/core/workCalendar.d.ts +41 -0
  73. package/dist/types/core/workingTimeScale.d.ts +33 -0
  74. package/dist/types/index.d.ts +52 -0
  75. package/docs/api.md +2009 -0
  76. package/docs/architecture.md +112 -0
  77. package/docs/code-of-conduct.md +24 -0
  78. package/docs/integration.md +964 -0
  79. package/docs/scheduling.md +586 -0
  80. package/docs/security.md +26 -0
  81. package/docs/third-party-licenses.md +33 -0
  82. package/package.json +79 -4
@@ -0,0 +1,84 @@
1
+ import { type GraphEdge, type GraphLayout, type GraphLayoutDirection, type GraphPoint, type IdentifiedNode } from './graph.js';
2
+ import { type GraphRoutingPolicy } from './graphGeometry.js';
3
+ import { type GraphObstacleAvoidance } from './graphObstacleRouting.js';
4
+ /** How NetworkGraph and `routeGraphEdges` draw edges. `curve` is the layout's own routing. */
5
+ export type GraphEdgeStyle = 'curve' | 'orthogonal' | 'straight';
6
+ export interface GraphEdgeRouteOptions {
7
+ /**
8
+ * Default 'curve': only edges with waypoints are rerouted, every other path is kept. An edge's own `edgeStyle`
9
+ * overrides it for that edge.
10
+ */
11
+ style?: GraphEdgeStyle;
12
+ /** Layout direction; picks the sides an orthogonal edge leaves and enters. Default 'LR'. */
13
+ direction?: GraphLayoutDirection;
14
+ /** Radius of the rounded corners of orthogonal routes, in chart units. Default 0 (sharp corners). */
15
+ cornerRadius?: number;
16
+ /**
17
+ * Default 'builtin'. 'preserve' keeps every path the layout drew while it still fits its nodes and ports (see
18
+ * `isGraphRouteValid`), whatever the style, and routes only the other edges: edges with `points`, edges of moved or
19
+ * resized nodes, edges whose port changed, and edges the port routing redrew.
20
+ */
21
+ policy?: GraphRoutingPolicy;
22
+ /**
23
+ * Opt-in distance, in chart units, between parallel edges: edges between the same two nodes (in either direction)
24
+ * that have no `points` and no named ports, and self-loops of one node without them. They are spread symmetrically
25
+ * around the line between the box centres, in every style; self-loops are nested. A single edge is not changed.
26
+ * Default undefined: parallel edges are drawn on top of each other.
27
+ */
28
+ parallelSpacing?: number;
29
+ /**
30
+ * Opt-in: orthogonal edges without waypoints go around the node boxes, `true` for the defaults or the settings (see
31
+ * `findOrthogonalRoute`). Every box of the layout is an obstacle, collapsed-group proxies included. An edge that has no
32
+ * route around the boxes keeps the plain orthogonal route. Default undefined: routes do not avoid boxes.
33
+ */
34
+ avoidNodes?: boolean | GraphObstacleAvoidance;
35
+ }
36
+ /**
37
+ * Internal: the place of an edge among the parallel edges between the same two nodes, or among the self-loops of one
38
+ * node. `reversed` is true when the edge runs from the node with the greater ID to the other one.
39
+ */
40
+ export interface GraphParallelSlot {
41
+ index: number;
42
+ count: number;
43
+ reversed: boolean;
44
+ }
45
+ /**
46
+ * Internal: the parallel slots of a list of edges, by edge ID. Edges without waypoints and named ports between the same
47
+ * unordered pair of nodes (or self-loops of the same node) form a group in input order; an edge alone gets no slot.
48
+ */
49
+ export declare function graphParallelSlots(edges: readonly GraphEdge[]): Map<string, GraphParallelSlot>;
50
+ /**
51
+ * SVG path data of a polyline through `points`. A positive `cornerRadius` rounds each corner with a quadratic curve,
52
+ * never cutting more than half of either adjoining segment. Throws RangeError for a non-finite point or a negative or
53
+ * non-finite corner radius.
54
+ */
55
+ export declare function graphPolylinePath(points: readonly GraphPoint[], cornerRadius?: number): string;
56
+ /**
57
+ * SVG path data of a smooth curve through every point (a Catmull-Rom spline drawn with cubic Bézier segments). Throws
58
+ * RangeError for a non-finite point.
59
+ */
60
+ export declare function graphSmoothPath(points: readonly GraphPoint[]): string;
61
+ /**
62
+ * Reroutes the edges of a finished layout (after positions and sizes) in an edge style: the `style` option, or the
63
+ * edge's own `edgeStyle`. `straight` draws straight lines between the nodes, clipped on the line between the box
64
+ * centres to the box border, or to the outline of a `diamond`, `ellipse` or `hexagon` node; `orthogonal` draws
65
+ * axis-aligned segments that leave and enter along the layout direction and keeps a long-edge bypass lane the layout
66
+ * already drew between the current boxes. Named ports keep their anchors and sides. An edge with `points` goes through
67
+ * its waypoints in every style, smoothly in `curve`. With `curve`, edges without waypoints keep their paths, so the
68
+ * result is the input layout when no edge has waypoints, a style of its own or (with `parallelSpacing`) a parallel edge.
69
+ * With `parallelSpacing`, parallel edges are spread apart (see `GraphEdgeRouteOptions`). With `policy: 'preserve'` every
70
+ * valid path from the layout is kept, whatever the style, and is not spread. Route metadata (`layout.routes`) is carried
71
+ * over when the layout has it, with the entries of redrawn edges replaced. Throws Error for an unknown endpoint,
72
+ * RangeError for a non-finite waypoint, an unknown style (of the options or of an edge), direction or policy, a bad
73
+ * corner radius or a parallel spacing that is not a positive finite number. Boxes are kept; width and height grow to
74
+ * include the routes. With `avoidNodes`, orthogonal edges without waypoints (self-loops excepted) are routed around every
75
+ * box of the layout with `findOrthogonalRoute`, and a bypass lane is kept only while it crosses no other box; an edge
76
+ * without such a route keeps the plain orthogonal route. A bad `avoidNodes` value throws RangeError.
77
+ */
78
+ export declare function routeGraphEdges(layout: GraphLayout, edges: readonly GraphEdge[], nodes: ReadonlyMap<string, IdentifiedNode>, options?: GraphEdgeRouteOptions): GraphLayout;
79
+ /**
80
+ * Internal: `routeGraphEdges` with the parallel slots of another edge list, so NetworkGraph can route a few edges of a
81
+ * graph the way the whole graph routes them. Without `parallelSpacing` the slots are ignored. With `reuseObstacles`, the
82
+ * obstacle index of `avoidNodes` is cached per box map, which the caller must then never change.
83
+ */
84
+ export declare function routeGraphEdgesWithSlots(layout: GraphLayout, edges: readonly GraphEdge[], nodes: ReadonlyMap<string, IdentifiedNode>, options: GraphEdgeRouteOptions, slots: ReadonlyMap<string, GraphParallelSlot> | undefined, reuseObstacles?: boolean): GraphLayout;
@@ -0,0 +1,34 @@
1
+ import type { GraphPoint } from './graph.js';
2
+ import type { GraphRect } from './graphView.js';
3
+ /**
4
+ * An alignment guide in chart coordinates. Axis `x` is a vertical line at `x = position` that runs from `y = from`
5
+ * to `y = to`; axis `y` is a horizontal line at `y = position` that runs from `x = from` to `x = to`.
6
+ */
7
+ export interface GraphAlignmentGuide {
8
+ axis: 'x' | 'y';
9
+ position: number;
10
+ from: number;
11
+ to: number;
12
+ }
13
+ /** The shift that aligns a moving rectangle with its nearest neighbours, and the guides of the aligned position. */
14
+ export interface GraphAlignment {
15
+ dx: number;
16
+ dy: number;
17
+ guides: GraphAlignmentGuide[];
18
+ }
19
+ /**
20
+ * Aligns a moving rectangle with other rectangles. On each axis the start, centre and end of `moving` (left, centre
21
+ * and right on x; top, middle and bottom on y) are compared with the same three anchors of every rectangle in
22
+ * `others`, and the smallest shift whose distance is at most `threshold` is returned as `dx` or `dy` (0 when nothing
23
+ * is close enough). Ties go to the earlier rectangle in `others`, then to the start, centre and end anchors of
24
+ * `moving` in that order, then to those of the other rectangle. `guides` lists one line per aligned position of the
25
+ * shifted rectangle, x guides first, each sorted by position and spanning the shifted rectangle and every rectangle
26
+ * aligned at that position. All values are in chart units. Throws a RangeError for a negative or non-finite
27
+ * threshold and for rectangles with non-finite values or a negative size.
28
+ */
29
+ export declare function graphAlignmentGuides(moving: GraphRect, others: readonly GraphRect[], threshold: number): GraphAlignment;
30
+ /**
31
+ * Rounds both coordinates of a point to the nearest multiple of `grid`. Throws a RangeError for a grid that is not a
32
+ * positive finite number or a point with non-finite coordinates. Returns a new point.
33
+ */
34
+ export declare function snapGraphPoint(point: GraphPoint, grid: number): GraphPoint;
@@ -0,0 +1,49 @@
1
+ import type { GraphPoint } from './graph.js';
2
+ /** An axis-aligned rectangle by its corners. */
3
+ export interface SpatialRect {
4
+ x1: number;
5
+ y1: number;
6
+ x2: number;
7
+ y2: number;
8
+ }
9
+ /**
10
+ * A bucket grid of rectangles identified by their insertion index. Each rectangle is entered in the cells it covers, or
11
+ * in a short list when it is very large or far out, so a query visits the rectangles near an area in time proportional
12
+ * to their number. Rectangles can be moved and removed.
13
+ */
14
+ export declare class SpatialGrid {
15
+ readonly cell: number;
16
+ private readonly buckets;
17
+ private readonly large;
18
+ private readonly rects;
19
+ private readonly stamps;
20
+ private stamp;
21
+ constructor(cell: number);
22
+ get size(): number;
23
+ rect(index: number): SpatialRect | undefined;
24
+ private span;
25
+ private enter;
26
+ private leave;
27
+ /** Adds a rectangle and returns its index. */
28
+ insert(rect: SpatialRect): number;
29
+ /** Moves a rectangle to a new place. */
30
+ move(index: number, rect: SpatialRect): void;
31
+ /**
32
+ * Calls `visit` once with every rectangle whose cells overlap the area, until it returns true; the caller tests the
33
+ * exact geometry. Returns true when `visit` did.
34
+ */
35
+ visit(area: SpatialRect, visit: (index: number, rect: SpatialRect) => boolean | void): boolean;
36
+ }
37
+ /** The number of arguments of each SVG path command, by upper-case command letter. */
38
+ export declare const svgPathArgumentCounts: Readonly<Record<string, number>>;
39
+ /**
40
+ * The polylines an SVG path traces, one per subpath: lines and corners as they are, cubic and quadratic Bézier curves
41
+ * sampled at 16 steps, and arcs and the smooth shorthand commands (S, T) approximated by their control and end points.
42
+ * Absolute and relative commands are read. Malformed data ends the path where it stops making sense.
43
+ */
44
+ export declare function graphPathPolylines(path: string): GraphPoint[][];
45
+ /**
46
+ * Whether the segment from `a` to `b` meets the rectangle. With `open`, only the interior counts (shrunk by `eps`), so
47
+ * a segment along a border or ending on it does not; otherwise the border counts too (grown by `eps`).
48
+ */
49
+ export declare function segmentMeetsRect(a: GraphPoint, b: GraphPoint, rect: SpatialRect, open: boolean, eps?: number): boolean;
@@ -0,0 +1,77 @@
1
+ import type { GraphEdge, GraphLayout, GraphLayoutOptions, GraphPoint, IdentifiedNode } from './graph.js';
2
+ import type { GraphRect } from './graphView.js';
3
+ /** One lane of a swimlane layout, in the order the caller lists it. `label` defaults to the ID. */
4
+ export interface GraphSwimlaneSpec {
5
+ id: string;
6
+ label?: string;
7
+ }
8
+ /**
9
+ * The drawn geometry of one lane: the band across the whole flow (header included) and its header (title) area, in
10
+ * layout coordinates. NetworkGraph `lanes` and `renderGraphSvg` `lanes` take this shape.
11
+ */
12
+ export interface GraphSwimlaneBand extends GraphRect {
13
+ id: string;
14
+ label: string;
15
+ /** The title area at the flow start of the band; it lies inside the band. A zero size draws no header. */
16
+ header: GraphRect;
17
+ }
18
+ /** A lane of a `layoutSwimlaneGraph` result: its band plus its position in the lane order and its nodes. */
19
+ export interface GraphSwimlane extends GraphSwimlaneBand {
20
+ /** Position in the caller's lane order, from 0. */
21
+ index: number;
22
+ /** IDs of the nodes in the lane, by rank and then by their order inside the lane. */
23
+ nodeIds: string[];
24
+ }
25
+ /** The result of `layoutSwimlaneGraph`: a `GraphLayout` for the NetworkGraph `layout` prop plus the lane geometry. */
26
+ export interface GraphSwimlaneLayout extends GraphLayout {
27
+ /** Every lane in the caller's order, empty lanes included. */
28
+ lanes: GraphSwimlane[];
29
+ }
30
+ /**
31
+ * Options of `layoutSwimlaneGraph`: the shared layout options plus the lanes. `N` is the node type, so a `laneOf`
32
+ * function receives your own nodes. `direction` LR and RL give horizontal lanes stacked top to bottom; TB and BT give
33
+ * vertical lanes stacked left to right. `rowGap` is the distance between nodes of one lane in one rank, and `padding`
34
+ * the margin around the bands.
35
+ */
36
+ export interface GraphSwimlaneLayoutOptions<N extends IdentifiedNode = IdentifiedNode> extends GraphLayoutOptions {
37
+ /** The lanes in display order: IDs or `{ id, label }`. The order is never changed; a lane without nodes still gets a band. */
38
+ lanes: readonly (string | GraphSwimlaneSpec)[];
39
+ /** The lane of each node: a function of the node or a map of node ID to lane ID. Every node needs a known lane. */
40
+ laneOf: ((node: N) => string | undefined) | ReadonlyMap<string, string>;
41
+ /** Free space between neighbouring lane bands. Default 0. */
42
+ laneGap?: number;
43
+ /** Space between a band's edges (and its header) and the nodes in it. Default 12. */
44
+ lanePadding?: number;
45
+ /** Smallest band thickness across the flow. Default 0 (one node plus the padding). */
46
+ minLaneSize?: number;
47
+ /** Thickness of the title area along the flow, at the flow start of each band. Default 120 for LR and RL, 32 for TB and BT. */
48
+ headerSize?: number;
49
+ /** Ordering of the nodes of one lane in one rank. Lanes never change order. Default `barycenter`. */
50
+ crossingReduction?: 'none' | 'barycenter';
51
+ /** Maximum number of alternating sweeps of the crossing reduction. Default 8. */
52
+ crossingSweeps?: number;
53
+ }
54
+ /**
55
+ * Throws a descriptive error for a lane list that cannot be drawn: an empty or repeated ID (Error) or a band or header
56
+ * that is not finite or has a negative size (RangeError). `where` names the caller in the message.
57
+ */
58
+ export declare function assertGraphSwimlaneBands(lanes: readonly GraphSwimlaneBand[], where: string): void;
59
+ /**
60
+ * The lane whose band contains a point, or the centre of a rectangle such as a node box, or undefined when it lies in
61
+ * no band (in a gap between lanes or outside them all). Bands are half-open: a point on the far edge of one band
62
+ * belongs to the next. Use it to turn a `node-move` proposal into a lane change, or to reject a move out of every lane.
63
+ */
64
+ export declare function graphSwimlaneAt<L extends GraphSwimlaneBand>(lanes: readonly L[], target: GraphPoint | GraphRect): L | undefined;
65
+ /**
66
+ * Swimlane layout: one band per lane in the caller's order, with the flow running along the bands. A node's rank
67
+ * (position along the flow) comes from the dependency structure exactly as in `layoutLayeredGraph`, so every node of a
68
+ * cycle shares one rank. Across the flow a node sits in its own lane's band; several nodes of one lane in one rank are
69
+ * stacked inside it and the band grows to fit. With `crossingReduction: 'barycenter'` (the default) the nodes of one
70
+ * lane in one rank are reordered to reduce crossings; the lane order itself never changes, and a lane without nodes
71
+ * still gets a band, so adding a node or an edge keeps every lane in place relative to the others. Deterministic.
72
+ *
73
+ * Throws an Error for a duplicate or empty lane ID, a node without a lane or with an unknown lane, and the graph errors
74
+ * of `indexGraph`; a RangeError for an unknown direction or crossing method and for sizes that are not finite and
75
+ * nonnegative (node sizes positive). Traversals are iterative.
76
+ */
77
+ export declare function layoutSwimlaneGraph<N extends IdentifiedNode>(nodes: readonly N[], edges: readonly GraphEdge[], options: GraphSwimlaneLayoutOptions<N>): GraphSwimlaneLayout;
@@ -0,0 +1,51 @@
1
+ import type { GraphEdge } from './graph.js';
2
+ import type { GraphCollapseResult } from './graphCollapse.js';
3
+ export type GraphTraversalDirection = 'forward' | 'backward' | 'both';
4
+ export interface GraphTraversalOptions {
5
+ /** `forward` follows edges from source to target, `backward` the reverse. Default: `both`. */
6
+ direction?: GraphTraversalDirection;
7
+ /** Largest number of edges between a start node and a reached node. A nonnegative integer or Infinity. Default: Infinity. */
8
+ maxHops?: number;
9
+ }
10
+ export interface GraphTraversalResult {
11
+ /** The known start nodes and every node reached from them, in discovery order. */
12
+ nodeIds: string[];
13
+ /** Every edge followed from a node that was expanded, in discovery order. */
14
+ edgeIds: string[];
15
+ /** Start IDs that are not nodes of the graph, deduplicated, in input order. */
16
+ unknownIds: string[];
17
+ }
18
+ /**
19
+ * Finds the nodes and edges reached from `startIds` along `options.direction` within `options.maxHops`. With `both`,
20
+ * the two directions are walked independently, so a shared parent does not pull in its other children. The walk is
21
+ * iterative, so it handles long chains, and it terminates on cycles. Unknown start IDs are reported in `unknownIds`
22
+ * instead of throwing. Throws RangeError for an invalid `maxHops` or direction and Error for an edge with an unknown
23
+ * endpoint or a duplicate or empty edge ID. The inputs are not modified.
24
+ */
25
+ export declare function traverseGraph(graph: {
26
+ nodes: readonly {
27
+ id: string;
28
+ }[];
29
+ edges: readonly GraphEdge[];
30
+ }, startIds: Iterable<string>, options?: GraphTraversalOptions): GraphTraversalResult;
31
+ export interface CollapsedTargetsResult {
32
+ /** Visible node or proxy IDs that stand for the given node IDs, deduplicated, in input order. */
33
+ nodeIds: string[];
34
+ /** Visible edge IDs (kept or merged) that stand for the given edge IDs, deduplicated, in input order. */
35
+ edgeIds: string[];
36
+ /** Given node IDs that are neither visible nor hidden inside a collapsed group. */
37
+ unknownNodeIds: string[];
38
+ /** Given edge IDs that are neither visible, merged nor hidden inside a collapsed group. */
39
+ unknownEdgeIds: string[];
40
+ }
41
+ /**
42
+ * Resolves node and edge IDs of the full graph to what a `collapseGraphGroups` result shows. A visible node stays as it
43
+ * is and a hidden node resolves to its proxy through `owners`. A visible edge stays, an edge merged into a re-attached
44
+ * edge resolves to the merged edge, and an edge dropped because both ends are inside one collapsed group resolves to
45
+ * that group's proxy node, which is added to `nodeIds`. `edges` must be the edges that were given to
46
+ * `collapseGraphGroups`; they supply the endpoints of dropped edges. The inputs are not modified.
47
+ */
48
+ export declare function resolveCollapsedTargets(collapse: Pick<GraphCollapseResult, 'nodes' | 'edges' | 'owners' | 'mergedEdges' | 'hiddenEdgeIds'>, ids: {
49
+ nodeIds?: Iterable<string>;
50
+ edgeIds?: Iterable<string>;
51
+ }, edges: readonly GraphEdge[]): CollapsedTargetsResult;
@@ -0,0 +1,73 @@
1
+ import type { GraphLayout, GraphPoint } from './graph.js';
2
+ import type { GraphViewport } from './types.js';
3
+ /** An axis-aligned rectangle in graph (world) coordinates. */
4
+ export interface GraphRect {
5
+ x: number;
6
+ y: number;
7
+ width: number;
8
+ height: number;
9
+ }
10
+ /** Bounding rectangles of the nodes and edges of a layout, keyed by ID. */
11
+ export interface GraphBounds {
12
+ nodes: Map<string, GraphRect>;
13
+ edges: Map<string, GraphRect>;
14
+ }
15
+ export interface GraphCullKeep {
16
+ nodes?: Iterable<string>;
17
+ edges?: Iterable<string>;
18
+ }
19
+ export interface GraphVisibleIds {
20
+ nodes: Set<string>;
21
+ edges: Set<string>;
22
+ }
23
+ /**
24
+ * Returns the part of the world that a camera shows. `overscan` is a margin in screen pixels added on every side,
25
+ * so it covers the same screen distance at every zoom level.
26
+ */
27
+ export declare function graphViewportRect(camera: GraphViewport, size: {
28
+ width: number;
29
+ height: number;
30
+ }, overscan?: number): GraphRect;
31
+ /**
32
+ * Whether the interiors of two rectangles overlap: on each axis, each rectangle starts strictly before the other ends
33
+ * (open intervals, compared exactly, without a tolerance). Rectangles that only touch, along an edge or at a corner,
34
+ * do not intersect. A rectangle of zero width or height (a segment or a point) intersects a rectangle whose interior it
35
+ * passes through, but not one whose border it only lies on, and never another zero-size rectangle at the same place.
36
+ */
37
+ export declare function graphRectsIntersect(a: GraphRect, b: GraphRect): boolean;
38
+ /**
39
+ * Bounding rectangle of an SVG path string. The result can be larger than the drawn stroke but never smaller:
40
+ * Bézier curves (C, S, Q and T, including the implicit reflected control point of S and T) are bounded by their
41
+ * control points, which always contain the curve. Elliptical arcs are bounded exactly: the end points plus the
42
+ * horizontal and vertical extrema of the rotated ellipse that fall inside the swept angle, after the radius
43
+ * correction of the SVG implementation notes. Stroke width is not included. Returns undefined when the path has
44
+ * no coordinates. Throws when the path data is malformed (including data that does not begin with a moveto) or uses
45
+ * an unsupported command.
46
+ */
47
+ export declare function graphPathBounds(path: string): GraphRect | undefined;
48
+ /**
49
+ * First and last point of an SVG path string: the point of its first moveto, and the current point after its last
50
+ * segment (the subpath start after a closing Z). Returns undefined when the path has no coordinates. Throws like
51
+ * `graphPathBounds` for malformed data.
52
+ */
53
+ export declare function graphPathEndpoints(path: string): {
54
+ start: GraphPoint;
55
+ end: GraphPoint;
56
+ } | undefined;
57
+ /** Computes the bounding rectangle of every node and edge path in a layout. Edge labels are included. */
58
+ export declare function graphLayoutBounds(layout: Pick<GraphLayout, 'boxes' | 'paths' | 'edgeLabels'>, labelReach?: number): GraphBounds;
59
+ /**
60
+ * Selects the nodes and edges whose bounds intersect or touch `view` (closed intervals, unlike graphRectsIntersect): the
61
+ * bounds leave out the stroke width, so an element whose bounds only touch the view edge can still draw into it. IDs
62
+ * listed in `keep` are always included when they exist, which lets a caller retain the selected, focused or currently
63
+ * edited elements.
64
+ */
65
+ export declare function cullGraphElements(bounds: GraphBounds, view: GraphRect, keep?: GraphCullKeep): GraphVisibleIds;
66
+ /** Camera that centers a world point at the given scale. */
67
+ export declare function graphCameraAt(point: {
68
+ x: number;
69
+ y: number;
70
+ }, size: {
71
+ width: number;
72
+ height: number;
73
+ }, scale: number): GraphViewport;
@@ -0,0 +1,76 @@
1
+ export * from './graph.js';
2
+ export * from './timeline.js';
3
+ export * from './types.js';
4
+ export { createWorkingTimeScale, defaultNonWorkingRatio } from './workingTimeScale.js';
5
+ export { buildWorkPeriods, invertWorkPeriods, normalizeWorkPeriods } from './workCalendar.js';
6
+ export type { WorkCalendar, WorkShift, WeeklyShift, WorkWeek } from './workCalendar.js';
7
+ export * from './scheduling.js';
8
+ export * from './resourceLoad.js';
9
+ export * from './fieldEditing.js';
10
+ export * from './sheetEditing.js';
11
+ export * from './timelineView.js';
12
+ export { intlTimeFormatter, calendarZoomPresets } from './calendarFormat.js';
13
+ export type { IntlTimeFormatterOptions, CalendarZoomLevel, CalendarZoomPresetOptions, CalendarZoomPreset } from './calendarFormat.js';
14
+ export { countGraphCrossings } from './graphCrossings.js';
15
+ export { layoutTreeGraph, layoutRadialGraph, layoutCircularGraph, layoutGridGraph, layoutConcentricGraph } from './graphLayouts.js';
16
+ export type { GraphTreeLayoutOptions, GraphRadialLayoutOptions, GraphCircularLayoutOptions, GraphGridLayoutOptions, GraphConcentricLayoutOptions } from './graphLayouts.js';
17
+ export { layoutSwimlaneGraph, graphSwimlaneAt } from './graphSwimlanes.js';
18
+ export type { GraphSwimlaneSpec, GraphSwimlaneBand, GraphSwimlane, GraphSwimlaneLayout, GraphSwimlaneLayoutOptions } from './graphSwimlanes.js';
19
+ export { layoutForceGraph } from './graphForce.js';
20
+ export type { GraphForceLayoutOptions } from './graphForce.js';
21
+ export { layoutFlowGraph, graphFlowBands } from './graphFlow.js';
22
+ export type { GraphFlowScale, GraphFlowOptions, GraphFlowNode, GraphFlowBand, GraphFlowExcludedEdge, GraphFlowLayout, GraphEdgeBand, } from './graphFlow.js';
23
+ export { topologicalOrder, findGraphCycles, shortestGraphPath, searchGraphNodes, filterGraph } from './graphAlgorithms.js';
24
+ export { graphComponents, graphDegreeCentrality, graphBetweennessCentrality, graphPageRank, detectGraphCommunities, graphCommunityGroups, } from './graphAnalysis.js';
25
+ export type { GraphDegreeCentralityOptions, GraphBetweennessOptions, GraphPageRankOptions, GraphPageRankResult, GraphCommunityOptions, GraphCommunityResult, GraphCommunityGroupsOptions, } from './graphAnalysis.js';
26
+ export type { TopologicalOrderResult, ShortestGraphPathOptions, GraphPathResult, GraphSearchOptions, GraphFilterOptions, GraphNodeMatch, } from './graphAlgorithms.js';
27
+ export * from './graphView.js';
28
+ export { graphPointInPolygon, graphNodesInPolygon } from './graphLasso.js';
29
+ export { graphDeletion, removeGraphElements, cloneGraphElements } from './graphEditing.js';
30
+ export type { GraphDeletion, GraphCloneOptions, GraphCloneResult } from './graphEditing.js';
31
+ export { createGraphConnectionChecker, checkGraphConnection, graphConnectionTargets, graphConnectionViolations, graphConnectionValidator, } from './graphPortRules.js';
32
+ export type { GraphPortDirection, GraphPortRule, GraphPortRules, GraphConnectionRejectionCode, GraphConnectionRejection, GraphConnectionCheck, GraphConnectionViolation, GraphConnectionOrigin, GraphConnectionTargets, GraphConnectionChecker, } from './graphPortRules.js';
33
+ export { graphAlignmentGuides, snapGraphPoint } from './graphSnapping.js';
34
+ export type { GraphAlignment, GraphAlignmentGuide } from './graphSnapping.js';
35
+ export { collapseGraphGroups } from './graphCollapse.js';
36
+ export type { GraphCollapsedGroup, GraphCollapsedNode, GraphCollapsedNodeData, GraphCollapseOptions, GraphCollapseResult, GraphShownEdge, GraphShownNode, } from './graphCollapse.js';
37
+ export { routeGraphEdges, graphPolylinePath, graphSmoothPath } from './graphRouting.js';
38
+ export type { GraphEdgeStyle, GraphEdgeRouteOptions } from './graphRouting.js';
39
+ export { findOrthogonalRoute } from './graphObstacleRouting.js';
40
+ export type { GraphObstacleAvoidance, GraphRouteEnd } from './graphObstacleRouting.js';
41
+ export * from './leveling.js';
42
+ export * from './exportSvg.js';
43
+ export { timelineWbsCodes, timelineRowPosition, moveTimelineRow, indentTimelineRow, outdentTimelineRow, } from './rowHierarchy.js';
44
+ export { rescheduleFromStatusDate } from './statusDate.js';
45
+ export { rescheduleFromActuals, actualsTimelineBars } from './actuals.js';
46
+ export type { TaskActuals, ActualsDiagnostic, ActualsDiagnosticCode, ActualsTask, ActualsTaskState, RescheduleFromActualsResult, RescheduleFromActualsFields, ActualsTimelineBarOptions, } from './actuals.js';
47
+ export { toMsProjectXml, fromMsProjectXml, timelineFromMsProject, workCalendarsFromMsProject, resourceLoadFromMsProject, toICalendar, fromICalendar, timelineFromICalendar, toCsv, timelineCsvTable, parseCsv, timelineFromCsvTable, } from './interchange.js';
48
+ export type { MsProjectTask, MsProjectBaseline, MsProjectDependency, MsProjectInput, MsProjectXmlOptions, MsProjectImport, MsProjectImportTask, MsProjectImportWarning, MsProjectImportWarningCode, MsProjectTimelineOptions, MsProjectTimeline, MsProjectCalendar, MsProjectResource, MsProjectAssignment, MsProjectResourceLoadOptions, MsProjectResourceLoad, ICalendarEvent, ICalendarOptions, ICalendarImport, ICalendarImportEvent, ICalendarImportOptions, ICalendarImportWarning, ICalendarImportWarningCode, ICalendarTimeline, CsvCell, TimelineCsvColumn, TimelineCsvOptions, CsvParseOptions, TimelineCsvImportOptions, TimelineCsvImport, } from './interchange.js';
49
+ export { scheduleToGraph } from './pert.js';
50
+ export type { ScheduleGraph, ScheduleGraphOptions, ScheduleGraphNodeData, ScheduleGraphEdgeData } from './pert.js';
51
+ export * from './viewBindings.js';
52
+ export * from './editTransaction.js';
53
+ export * from './graphTraversal.js';
54
+ export { timelineBarsInRange, resolveTimeRangeTargets } from './timeRangeTargets.js';
55
+ export type { TimelineBarActivity, TimelineBarsInRangeOptions, TimeRangeTargetsOptions, TimeRangeTargets } from './timeRangeTargets.js';
56
+ export { projectResourceTimeline, createResourceTimelineProjector, resourceTimelineBarId, resolveResourceTimelineEdit, resolveResourceTimelineEdits, resourceTimelineCascade, proposeResourceAssignment, } from './resourceTimeline.js';
57
+ export type { ResourceTimelineResource, ResourceTimelineTask, ResourceTimelineInput, ResourceTimelineOptions, ResourceBarOrigin, ResourceTimelineProjection, ResourceTimelineScheduleChange, ResourceAssignmentReplacement, ResourceTimelineRejectionCode, ResourceTimelineRejection, ResourceTimelineEditsResolution, ResourceTimelineEditResolution, ResourceAssignmentState, ResourceAssignmentRequest, ResourceAssignmentProposal, } from './resourceTimeline.js';
58
+ export { buildPlacementInput } from './placement.js';
59
+ export type { PlacementInput, PlacementDiagnostic, PlacementPredecessorDiagnostic, PlacementSummaryDiagnostic, PlacementResult, PlacementRetargetedDependency, } from './placement.js';
60
+ export * from './snapshot.js';
61
+ export { toPlanningDiagnostics } from './scheduleDiagnostics.js';
62
+ export type { PlanningDiagnostic, PlanningDiagnosticCode, PlanningDiagnosticSeverity } from './scheduleDiagnostics.js';
63
+ export { collectScheduleReasons } from './scheduleTrace.js';
64
+ export type { ScheduleReason, ScheduleReasonPhase, ScheduleReasonKind, ScheduleReasonBound, ScheduleTrace, ScheduleOptions, ExplainedScheduleSuccess, ExplainedScheduleResult, ExplainedLevelResourcesSuccess, ExplainedLevelResourcesResult, CollectScheduleReasonsOptions, } from './scheduleTrace.js';
65
+ export { isGraphRouteValid } from './graphGeometry.js';
66
+ export type { GraphRoutingPolicy } from './graphGeometry.js';
67
+ export { graphLayoutInputKey, buildGraphLayoutRequests, validateGraphLayoutResponse, completeGraphLayout, graphLayoutToJson, graphLayoutFromJson, graphLayoutMessageToJson, graphLayoutMessageFromJson, parseGraphLayoutMessage, } from './graphLayoutRequests.js';
68
+ export type { GraphLayoutScope, GraphLayoutRequestInput, GraphLayoutRequest, GraphLayoutResponse, GraphLayoutRequests, GraphLayoutKeyInput, GraphLayoutCompletionOptions, GraphLayoutCompletion, GraphLayoutRequestMessage, GraphLayoutCancelMessage, GraphLayoutSuccessMessage, GraphLayoutFailureMessage, GraphLayoutWorkerMessage, GraphLayoutJson, GraphLayoutRequestJson, GraphLayoutWorkerJsonMessage, } from './graphLayoutRequests.js';
69
+ export { comparePlans, planComparisonTargets, planBaselines } from './planComparison.js';
70
+ export type { PlanComparisonTask, PlanComparisonInput, PlanScenario, PlanScheduleState, PlanTaskSide, PlanFieldChange, PlanCollectionDiff, PlanAssignmentChange, PlanAssignmentDiff, PlanInputDiff, PlanViolation, PlanTaskComparison, PlanResourceOverload, PlanResultDiff, PlanComparison, PlanComparisonTargetOptions, PlanComparisonTargets, } from './planComparison.js';
71
+ export { createWindowedDataState, setWindowedView, resolveWindowedRequest, rejectWindowedRequest, retryWindowedData, invalidateWindowedData, cancelWindowedRequests, resetWindowedData, windowedCellStatus, windowedCoverage, splitDanglingLinks, } from './windowedData.js';
72
+ export type { WindowedCellStatus, WindowedView, TimelineVisibleWindow, WindowedDataOptions, WindowedDataRequest, WindowedDataPage, WindowedCell, WindowedDataNormalizedOptions, WindowedInFlightRequest, WindowedDataState, WindowedDataTransition, WindowedDataSettlement, WindowedCoverage, DanglingLink, SplitDanglingLinksOptions, SplitDanglingLinks, } from './windowedData.js';
73
+ export { createGraphExpansion, beginGraphExpansion, cancelGraphExpansion, mergeGraphExpansionPage, graphExpansionView, } from './graphExpansion.js';
74
+ export type { GraphExpansionState, GraphExpansionPage, GraphExpansionView } from './graphExpansion.js';
75
+ export { layoutGraphIncrementally, graphLayoutChangeMetrics } from './graphIncremental.js';
76
+ export type { GraphKnownPosition, GraphIncrementalLayoutOptions, GraphIncrementalLayout, GraphLayoutChangeOptions, GraphLayoutChangeMetrics, } from './graphIncremental.js';
@@ -0,0 +1,6 @@
1
+ export { toMsProjectXml, fromMsProjectXml, workCalendarsFromMsProject, resourceLoadFromMsProject, timelineFromMsProject, } from './interchangeMsProject.js';
2
+ export type { MsProjectTask, MsProjectCalendar, MsProjectResource, MsProjectAssignment, MsProjectBaseline, MsProjectDependency, MsProjectInput, MsProjectXmlOptions, MsProjectImportTask, MsProjectImportWarningCode, MsProjectImportWarning, MsProjectImport, MsProjectResourceLoadOptions, MsProjectResourceLoad, MsProjectTimelineOptions, MsProjectTimeline, } from './interchangeMsProject.js';
3
+ export { toICalendar, fromICalendar, timelineFromICalendar } from './interchangeICalendar.js';
4
+ export type { ICalendarEvent, ICalendarOptions, ICalendarImportEvent, ICalendarImportOptions, ICalendarImportWarningCode, ICalendarImportWarning, ICalendarImport, ICalendarTimeline, } from './interchangeICalendar.js';
5
+ export { toCsv, timelineCsvTable, parseCsv, timelineFromCsvTable } from './interchangeCsv.js';
6
+ export type { CsvCell, TimelineCsvColumn, TimelineCsvOptions, CsvParseOptions, TimelineCsvImportOptions, TimelineCsvImport, } from './interchangeCsv.js';
@@ -0,0 +1,75 @@
1
+ import type { TimelineBar, TimelineRow } from './types.js';
2
+ /** A CSV cell: text, a finite number or an empty cell. */
3
+ export type CsvCell = string | number | undefined;
4
+ /**
5
+ * Build RFC 4180 CSV text: fields separated by commas, records ended by CRLF, and fields that contain a comma, a
6
+ * double quote, CR or LF enclosed in double quotes with inner quotes doubled. `undefined` is an empty field. Throws a
7
+ * RangeError for a non-finite number. Spreadsheet formulas are not neutralized; prefix cells that start with `=`,
8
+ * `+`, `-` or `@` yourself when the file is opened in a spreadsheet and the text is untrusted.
9
+ */
10
+ export declare function toCsv(table: readonly (readonly CsvCell[])[]): string;
11
+ /** A column of `timelineCsvTable`. */
12
+ export type TimelineCsvColumn = 'row' | 'wbs' | 'bar' | 'start' | 'end' | 'progress';
13
+ export interface TimelineCsvOptions {
14
+ /** Start and end text. Default ISO 8601 in UTC, such as 2026-11-09T08:00:00.000Z. */
15
+ formatTime?: (time: number) => string;
16
+ /** Columns in order. Default all: row, wbs, bar, start, end, progress. */
17
+ columns?: readonly TimelineCsvColumn[];
18
+ /** Header texts. Defaults: Row, WBS, Bar, Start, End, Progress. */
19
+ headers?: Partial<Record<TimelineCsvColumn, string>>;
20
+ }
21
+ /**
22
+ * A table for `toCsv`: a header record and one record per bar, ordered by row in tree preorder and then by bar input
23
+ * order. Cells are the row label, the row's WBS code (`timelineWbsCodes`), the bar label, the formatted start and end
24
+ * and the progress from 0 to 1 (empty without progress). Throws an Error for invalid rows, a bar of an unknown row and
25
+ * an unknown column.
26
+ */
27
+ export declare function timelineCsvTable(rows: readonly TimelineRow[], bars: readonly TimelineBar[], options?: TimelineCsvOptions): CsvCell[][];
28
+ export interface CsvParseOptions {
29
+ /** Field separator: one character other than a double quote, CR or LF. Default `,`. */
30
+ delimiter?: string;
31
+ }
32
+ /**
33
+ * Parse RFC 4180 CSV text into records of fields, the inverse of `toCsv`. Records end with CRLF, LF or a lone CR, and a
34
+ * final line break is optional. Fields enclosed in double quotes can contain the delimiter, line breaks and doubled
35
+ * quotes (`""` is one quote). A quote inside an unquoted field is kept as text. A leading byte order mark is removed.
36
+ * Every field is a string; an empty line is a record with one empty field, and empty text has no records.
37
+ *
38
+ * Throws an Error with the line and column for an unterminated quoted field or text after a closing quote, and an
39
+ * Error for an invalid delimiter.
40
+ */
41
+ export declare function parseCsv(text: string, options?: CsvParseOptions): string[][];
42
+ export interface TimelineCsvImportOptions {
43
+ /** Read a start or end cell as a time; return NaN for text that is not a time. */
44
+ parseTime: (text: string) => number;
45
+ /**
46
+ * The column of each field, in order, as `timelineCsvTable` wrote them. The first record is a header and is
47
+ * skipped. Default: the columns are found by matching the header record against `headers`, ignoring case and
48
+ * surrounding white space, and fields under other headers are ignored.
49
+ */
50
+ columns?: readonly (TimelineCsvColumn | undefined)[];
51
+ /** Header texts to look for without `columns`. Defaults: Row, WBS, Bar, Start, End, Progress. */
52
+ headers?: Partial<Record<TimelineCsvColumn, string>>;
53
+ }
54
+ export interface TimelineCsvImport {
55
+ rows: TimelineRow[];
56
+ bars: TimelineBar[];
57
+ }
58
+ /**
59
+ * Read a table written by `timelineCsvTable` (for example from `parseCsv`) back into rows and bars. The table needs a
60
+ * `bar`, `start` and `end` column and a `row` or `wbs` column; `progress` is optional.
61
+ *
62
+ * With a WBS column, each distinct code is a row with the ID `row-<code>`, the label of the first of its `row` cells
63
+ * that is not blank (or the code when there is none) and the row of the code without its last part as parent. A
64
+ * parent code that has no record of its own becomes a row labelled with its code. Without a WBS column, each distinct row label is a top-level row with the
65
+ * ID `row-1`, `row-2`, … in order of appearance. Rows are returned in tree preorder; sibling order follows the WBS
66
+ * numbers, or the order of appearance without WBS codes. Bars get the IDs `bar-1`, `bar-2`, … in record order, the
67
+ * label of their `bar` cell, the parsed start and end and, when the progress cell is not empty, the progress from 0
68
+ * to 1. Records whose fields are all empty are skipped.
69
+ *
70
+ * A custom header takes precedence over another column's default header. Throws an Error for missing or repeated
71
+ * columns, for two custom headers that are equal (ignoring case and surrounding white space) and an Error naming the line (the one-based record number, with the
72
+ * header on line 1) for an invalid WBS code, a time that `parseTime` cannot read, an end before the start and a
73
+ * progress that is not a plain decimal number from 0 to 1 (such as `0.5`; not `0x1` or `1e0`).
74
+ */
75
+ export declare function timelineFromCsvTable(table: readonly (readonly CsvCell[])[], options: TimelineCsvImportOptions): TimelineCsvImport;