@arqlet/contracts 0.3.0 → 0.5.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.
- package/dist/index.d.ts +310 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,13 @@ export type Bus = { id: string, edges: Array<string>,
|
|
|
49
49
|
*/
|
|
50
50
|
label?: string, };
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Provisional: the children that `communities` leaves out of Louvain, so that one hub does not pull a whole container
|
|
54
|
+
* into one community: those with at least `min_links` links in their container (by edge weight, as Louvain counts them)
|
|
55
|
+
* and those named in `nodes`. A hub stays a direct child of its container. Ids the graph lacks are ignored.
|
|
56
|
+
*/
|
|
57
|
+
export type CommunityHubs = { minLinks?: number, nodes?: Array<string>, };
|
|
58
|
+
|
|
52
59
|
export type ConfigSet = { schemaVersion: number, id: string, layout: LayoutConfig, routing: RoutingConfig,
|
|
53
60
|
/**
|
|
54
61
|
* Display preference. Absent means the config set leaves the current display unchanged.
|
|
@@ -113,7 +120,13 @@ sizePins?: { [key in string]: SizePin },
|
|
|
113
120
|
*/
|
|
114
121
|
labels?: { [key in string]: Point }, };
|
|
115
122
|
|
|
116
|
-
export type Edge = { id: string, kind: string, source: string, target: string | null,
|
|
123
|
+
export type Edge = { id: string, kind: string, source: string, target: string | null,
|
|
124
|
+
/**
|
|
125
|
+
* Provisional: how many edges this edge stands for (a pre-aggregated relation), at least 1; 1 when left out. It
|
|
126
|
+
* counts where edges are counted: a bundled or aggregated route weighs the sum of its edges, and the overview and
|
|
127
|
+
* the communities pull by it. Omitted from output when left out.
|
|
128
|
+
*/
|
|
129
|
+
weight?: number, };
|
|
117
130
|
|
|
118
131
|
export type EdgePorts = { edgeId: string, sourcePort: string | null, targetPort: string | null, };
|
|
119
132
|
|
|
@@ -176,31 +189,47 @@ origin?: Point | null, };
|
|
|
176
189
|
* A graph: the canonical data of a view. Direction and layout strategy are two constraints, each set for the root and for
|
|
177
190
|
* containers and inherited by containers that declare nothing (docs/adr/0003-container-direction-constraints.md).
|
|
178
191
|
*/
|
|
179
|
-
export type Graph = { defaultDirection
|
|
192
|
+
export type Graph = { defaultDirection?: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt">, containerDirections?: { [key in string]: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt"> }, defaultStrategy?: "none" | "tree" | "radial" | "auto" | Array<"none" | "tree" | "radial">, containerStrategies?: { [key in string]: "none" | "tree" | "radial" | "auto" | Array<"none" | "tree" | "radial"> },
|
|
180
193
|
/**
|
|
181
194
|
* The edge routing of the root and its containers (docs/adr/0005-routing-constraints.md).
|
|
182
195
|
*/
|
|
183
|
-
defaultRouting?: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus" | "auto" | Array<"straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus">, containerRouting?: { [key in string]: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus" | "auto" | Array<"straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus"> }, ports
|
|
196
|
+
defaultRouting?: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus" | "auto" | Array<"straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus">, containerRouting?: { [key in string]: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus" | "auto" | Array<"straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus"> }, ports?: Array<Port>, edgePorts?: Array<EdgePorts>, nodes: Array<Node>, edges: Array<Edge>,
|
|
184
197
|
/**
|
|
185
198
|
* Provisional: explicit buses (ADR 0005): each groups edges drawn on one shared trunk with branches. Membership is never
|
|
186
199
|
* inferred. Omitted when empty, so earlier documents and drawings do not change.
|
|
187
200
|
*/
|
|
188
201
|
buses?: Array<Bus>, };
|
|
189
202
|
|
|
190
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Provisional: the nodes within some hops of nodes of a graph (`overviewNeighbourhood`), without a view.
|
|
205
|
+
*/
|
|
206
|
+
export type GraphNeighbourhood = { nodes: Array<string>, edges: Array<string>, hops: { [key in string]: number }, };
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Provisional: a change of the source graph of a view (`patch`): nodes and edges to add, and nodes (each with what it
|
|
210
|
+
* holds and its edges) and edges to remove. Removals apply first.
|
|
211
|
+
*/
|
|
212
|
+
export type GraphPatch = { nodes?: Array<Node>, edges?: Array<Edge>, removeNodes?: Array<string>, removeEdges?: Array<string>, };
|
|
191
213
|
|
|
192
214
|
/**
|
|
193
|
-
*
|
|
215
|
+
* Provisional: the paths between two nodes of a graph (`overviewTrace`), without a view: the overview's viewer maps them
|
|
216
|
+
* to its discs. `reversed`: no path from `from` to `to`, the paths are those back; `length` is null without a path.
|
|
194
217
|
*/
|
|
195
|
-
export type
|
|
218
|
+
export type GraphTrace = { found: boolean, reversed: boolean, length: number | null, nodes: Array<string>, edges: Array<string>, };
|
|
219
|
+
|
|
196
220
|
/**
|
|
197
|
-
*
|
|
221
|
+
* What a view hides (provisional, view state set by the `filter` operation): nodes of these kinds, these nodes (each with
|
|
222
|
+
* everything below it) and edges of these kinds. The layout keeps their room, so what stays keeps its place; the scene
|
|
223
|
+
* leaves them out, and an edge that stands for collapsed content counts only the edges still shown.
|
|
198
224
|
*/
|
|
199
|
-
|
|
225
|
+
export type Hidden = { nodeKinds?: Array<string>, nodes?: Array<string>, edgeKinds?: Array<string>,
|
|
200
226
|
/**
|
|
201
|
-
*
|
|
227
|
+
* Lay the view out again without what is hidden, so that the rest closes up (positions change); off: the hidden keep
|
|
228
|
+
* their room and nothing else moves. Omitted when off.
|
|
202
229
|
*/
|
|
203
|
-
|
|
230
|
+
compact?: boolean, };
|
|
231
|
+
|
|
232
|
+
export type HybridCriterion = "compact" | "endToEnd";
|
|
204
233
|
|
|
205
234
|
export type Integrity = {
|
|
206
235
|
/**
|
|
@@ -326,6 +355,14 @@ strictClearance?: boolean,
|
|
|
326
355
|
* decides between them. Omitted when off, so the default output does not change.
|
|
327
356
|
*/
|
|
328
357
|
componentPacking?: boolean,
|
|
358
|
+
/**
|
|
359
|
+
* Experimental: the weakly connected components of a container's children (a lone child is one) keep their own
|
|
360
|
+
* arrangement and are packed as boxes in rows towards an aspect ratio (`aspect`, width over height, default 1),
|
|
361
|
+
* largest first, instead of all sharing the ranks of one long drawing. Orders the components in blocks as
|
|
362
|
+
* `component_packing` does. Not for circle containers, containers with a pinned child, or flattened areas. Omitted
|
|
363
|
+
* when off, so the default output does not change.
|
|
364
|
+
*/
|
|
365
|
+
packComponents?: PackComponents,
|
|
329
366
|
/**
|
|
330
367
|
* Experimental: the children of a layered area that have no edge to another child (a file of unrelated functions)
|
|
331
368
|
* are spread over the ranks as a grid instead of all standing in the first rank, one long column. They fill the
|
|
@@ -333,6 +370,57 @@ componentPacking?: boolean,
|
|
|
333
370
|
* Omitted when off, so the default output does not change.
|
|
334
371
|
*/
|
|
335
372
|
isolatedGrid?: boolean,
|
|
373
|
+
/**
|
|
374
|
+
* ADR 0020, S1-0 and S1-0b: a graph whose areas all flow right to left (`rl`) or bottom to top (`bt`) is laid out
|
|
375
|
+
* with the positive flow, where single pass runs, and mirrored area by area (a container keeps its header at its
|
|
376
|
+
* top); logical edge direction is kept. Not for graphs with pins, label places, explicit ports or buses. On by default
|
|
377
|
+
* since engine 0.5 (S1-4, accepted by measurement); written as `false` when turned off.
|
|
378
|
+
*/
|
|
379
|
+
singlePassReversed?: boolean,
|
|
380
|
+
/**
|
|
381
|
+
* ADR 0020, S1-1b: a straight edge that would pass through a node it does not end at is drawn around it instead: its
|
|
382
|
+
* orthogonal route pulled taut around every node it does not end at or lie in, so it stays one segment where nothing
|
|
383
|
+
* is in the way and bends at the blockers' corners elsewhere. On by default since 0.5.0 (S1-4); written as
|
|
384
|
+
* `false` when turned off.
|
|
385
|
+
*/
|
|
386
|
+
straightDetours?: boolean,
|
|
387
|
+
/**
|
|
388
|
+
* ADR 0020, S1-2: an edge that leaves a region of another strategy (organic, tree, radial) in a layered parent is
|
|
389
|
+
* routed by the parent to a port on the region's border, on the side its flow uses, and drawn inside the region from
|
|
390
|
+
* that port to its node by the region's routing. Not for graphs with buses or explicit edge ports. On by default since
|
|
391
|
+
* engine 0.5 (S1-4); written as `false` when turned off.
|
|
392
|
+
*/
|
|
393
|
+
regionPorts?: boolean,
|
|
394
|
+
/**
|
|
395
|
+
* Experimental (ADR 0020, S1-3): a container with a fixed flow inside an organic or radial area gets border nodes in
|
|
396
|
+
* its own flow, as in a parent of the same axis: its edges to the outside run inside it along its ranks to its border
|
|
397
|
+
* and leave it there, and the area draws them straight from that point. Omitted when off, so the default output does
|
|
398
|
+
* not change.
|
|
399
|
+
*/
|
|
400
|
+
regionChildPorts?: boolean,
|
|
401
|
+
/**
|
|
402
|
+
* Single pass: every channel between two ranks is as wide as its tracks need (at least the margin on both sides and a
|
|
403
|
+
* track), narrower than the layer gap where it carries few tracks; the order and the places across the flow are chosen
|
|
404
|
+
* on the layer gap as before. Only in areas with a fixed flow along their parent's axis below fixed flows. On by
|
|
405
|
+
* default since engine 0.5 (no change in crossings or bends on any measured dataset, less area); written as `false`
|
|
406
|
+
* when turned off.
|
|
407
|
+
*/
|
|
408
|
+
channelsByDemand?: boolean,
|
|
409
|
+
/**
|
|
410
|
+
* With `straightDetours`, the geometric repair of an organic area that cannot clear every straight line within a
|
|
411
|
+
* bounded budget clears the lines between children of organic areas first and those into its containers within a
|
|
412
|
+
* bounded budget of their own; their detours draw what remains around the nodes in its way. A repair that finishes
|
|
413
|
+
* within the bounded budget is as without the option. On by default since 0.5.0; written as `false` when
|
|
414
|
+
* turned off.
|
|
415
|
+
*/
|
|
416
|
+
nestedEdgesByDetour?: boolean,
|
|
417
|
+
/**
|
|
418
|
+
* Experimental: free directions (`auto`) are laid out with their orientations fixed — every free area left to right,
|
|
419
|
+
* and every free area top to bottom — so that single pass constructs the edges between areas (ADR 0017) instead of
|
|
420
|
+
* delegating them, and the drawing with the best published key wins. The snapshot keeps the free directions and the
|
|
421
|
+
* chosen orientations. Omitted when off, so the default output does not change.
|
|
422
|
+
*/
|
|
423
|
+
directionsFirst?: boolean,
|
|
336
424
|
/**
|
|
337
425
|
* How edges are drawn: orthogonal routes (the default, omitted) or straight segments between the port positions.
|
|
338
426
|
* Straight routing never bends: an edge that would cross a foreign node is reported as a routing issue.
|
|
@@ -431,17 +519,25 @@ visibleNodeBudget?: number,
|
|
|
431
519
|
communities?: number,
|
|
432
520
|
/**
|
|
433
521
|
* Provisional: groups given by the data or its domain, by node id: the path of groups the node belongs to inside its
|
|
434
|
-
* container (`["
|
|
522
|
+
* container (`["Billing", "Invoices"]`). They become containers of kind `group` in the view only, nested along the path,
|
|
435
523
|
* before `communities` divides what is still large. Ids the graph does not have are ignored (a mapping may cover more
|
|
436
524
|
* than the imported view). Omitted when empty.
|
|
437
525
|
*/
|
|
438
526
|
groups?: { [key in string]: Array<string> },
|
|
439
527
|
/**
|
|
440
|
-
* Provisional: which containers an import shows collapsed: those at `depth` or deeper (0: every
|
|
441
|
-
* depth 0) and those of the `kinds` listed. Unset (the default, omitted): none, except the
|
|
442
|
-
* `communities` and `groups` add, which start collapsed.
|
|
528
|
+
* Provisional: the level of detail, which containers an import shows collapsed: those at `depth` or deeper (0: every
|
|
529
|
+
* one; the top level is depth 0) and those of the `kinds` listed. Unset (the default, omitted): none, except the
|
|
530
|
+
* containers that `communities` and `groups` add, which start collapsed.
|
|
531
|
+
*/
|
|
532
|
+
levelOfDetail?: LevelOfDetail | null,
|
|
533
|
+
/**
|
|
534
|
+
* Provisional (view state, set by `filter`): what the view hides, keeping the place of the rest. Omitted when empty.
|
|
535
|
+
*/
|
|
536
|
+
hidden?: Hidden,
|
|
537
|
+
/**
|
|
538
|
+
* Provisional: the children `communities` leaves out of Louvain (hubs). Omitted when empty.
|
|
443
539
|
*/
|
|
444
|
-
|
|
540
|
+
communityHubs?: CommunityHubs,
|
|
445
541
|
/**
|
|
446
542
|
* Provisional (view state, set by `reveal`): containers shown in part. The children listed for a container are shown;
|
|
447
543
|
* the others are gathered in a collapsed container `rest:<id>` of kind `rest` ("+N more"), which a `toggle` dissolves.
|
|
@@ -575,6 +671,21 @@ orderHints?: { [key in string]: OrderHint }, };
|
|
|
575
671
|
*/
|
|
576
672
|
export type LayoutStrategy = "none" | "shortest" | "tree" | "radial" | "organic";
|
|
577
673
|
|
|
674
|
+
/**
|
|
675
|
+
* The level of detail (provisional): which containers a view shows collapsed at first, by depth and by kind; opening
|
|
676
|
+
* them is up to the user (`toggle`, `reveal`, or a click in the cluster overview). The same value for the layered view
|
|
677
|
+
* (`LayoutOptions::level_of_detail`) and the cluster overview (`OverviewConfig::level_of_detail`).
|
|
678
|
+
*/
|
|
679
|
+
export type LevelOfDetail = {
|
|
680
|
+
/**
|
|
681
|
+
* Containers at this depth or deeper (the top level is 0).
|
|
682
|
+
*/
|
|
683
|
+
depth?: number | null,
|
|
684
|
+
/**
|
|
685
|
+
* Containers of these kinds.
|
|
686
|
+
*/
|
|
687
|
+
kinds?: Array<string>, };
|
|
688
|
+
|
|
578
689
|
/**
|
|
579
690
|
* A geometry observation for one element: the realized outline and the revision of the measurement. The revision rises with
|
|
580
691
|
* every new measurement of that element, so that an old one is recognised when it arrives late.
|
|
@@ -646,6 +757,12 @@ touches: number,
|
|
|
646
757
|
*/
|
|
647
758
|
bends: number, bendsMax: number, bendsMean: number, length: number, lengthMean: number, lengthMax: number, };
|
|
648
759
|
|
|
760
|
+
/**
|
|
761
|
+
* Provisional: the answer of `neighbourhood` (besides `ok`): the nodes within some hops of nodes, the edges they were
|
|
762
|
+
* reached by, each node's hops, and what of them the view shows (as for `trace`).
|
|
763
|
+
*/
|
|
764
|
+
export type NeighbourhoodAnswer = { nodes: Array<string>, edges: Array<string>, hops: { [key in string]: number }, visible: VisibleParts, distance: { [key in string]: number }, };
|
|
765
|
+
|
|
649
766
|
export type Node = { id: string, kind: string, label: string, parentId: string | null,
|
|
650
767
|
/**
|
|
651
768
|
* The outline of the node. `rect` (the default, omitted) uses its size as it is; `square` and `circle` use the larger
|
|
@@ -690,6 +807,49 @@ after: string | null, };
|
|
|
690
807
|
*/
|
|
691
808
|
export type Orientation = "lr" | "rl" | "tb" | "bt";
|
|
692
809
|
|
|
810
|
+
/**
|
|
811
|
+
* Provisional (ADR 0018): the answer of the `overview` operation, `{ok, overview}`. Arrays are indexed by node: the
|
|
812
|
+
* graph's nodes in input order, then the clusters the overview added (communities, satellite groups).
|
|
813
|
+
*/
|
|
814
|
+
export type Overview = {
|
|
815
|
+
/**
|
|
816
|
+
* 1.
|
|
817
|
+
*/
|
|
818
|
+
schemaVersion: number,
|
|
819
|
+
/**
|
|
820
|
+
* The values of the order user, rules, zoom, as the engine checked them.
|
|
821
|
+
*/
|
|
822
|
+
representation: OverviewRepresentation, ids: Array<string>,
|
|
823
|
+
/**
|
|
824
|
+
* Each node's label from the data; an added cluster is named after its most connected member (`≈ <name>` for a
|
|
825
|
+
* community, `<name> +<n>` for a hub with its satellites).
|
|
826
|
+
*/
|
|
827
|
+
labels: Array<string>,
|
|
828
|
+
/**
|
|
829
|
+
* The parent's index, or -1 at the top level.
|
|
830
|
+
*/
|
|
831
|
+
parent: number[], x: Array<number>, y: Array<number>,
|
|
832
|
+
/**
|
|
833
|
+
* Disc radii: leaves share the leaf radius, a container holds its children.
|
|
834
|
+
*/
|
|
835
|
+
r: Array<number>,
|
|
836
|
+
/**
|
|
837
|
+
* The radius of the disc around everything, centred on the origin.
|
|
838
|
+
*/
|
|
839
|
+
rootRadius: number,
|
|
840
|
+
/**
|
|
841
|
+
* Node kinds in order of first use (`community` for added clusters), and each node's kind as an index into them.
|
|
842
|
+
*/
|
|
843
|
+
kinds: Array<string>, kind: number[],
|
|
844
|
+
/**
|
|
845
|
+
* Resolved edges as index pairs, source first, in input order (flat).
|
|
846
|
+
*/
|
|
847
|
+
edges: number[],
|
|
848
|
+
/**
|
|
849
|
+
* Per container, the links between its children: child, child, number of edges (flat triples).
|
|
850
|
+
*/
|
|
851
|
+
links: Array<number>, stats: OverviewStats, };
|
|
852
|
+
|
|
693
853
|
/**
|
|
694
854
|
* Provisional (ADR 0018, addendum): the rules of the data for the cluster overview, the second step of the order
|
|
695
855
|
* user, rules, zoom.
|
|
@@ -702,7 +862,12 @@ rules?: { [key in string]: Representation },
|
|
|
702
862
|
/**
|
|
703
863
|
* Whether the zoom decides what neither the user nor a rule decided. Absent: yes.
|
|
704
864
|
*/
|
|
705
|
-
auto?: boolean,
|
|
865
|
+
auto?: boolean,
|
|
866
|
+
/**
|
|
867
|
+
* What is collapsed at first, after the user's decisions and the rules, before the zoom (the same value as
|
|
868
|
+
* `LayoutOptions::level_of_detail`).
|
|
869
|
+
*/
|
|
870
|
+
levelOfDetail?: LevelOfDetail, };
|
|
706
871
|
|
|
707
872
|
/**
|
|
708
873
|
* Provisional (ADR 0018, addendum; ADR 0015): the user's decisions in the cluster overview as one value, by node id.
|
|
@@ -710,6 +875,118 @@ auto?: boolean, };
|
|
|
710
875
|
*/
|
|
711
876
|
export type OverviewIntent = { decisions?: { [key in string]: Representation }, };
|
|
712
877
|
|
|
878
|
+
/**
|
|
879
|
+
* Provisional: the layout options of an overview (defaults in brackets).
|
|
880
|
+
*/
|
|
881
|
+
export type OverviewLayoutOptions = {
|
|
882
|
+
/**
|
|
883
|
+
* The radius of a leaf (4).
|
|
884
|
+
*/
|
|
885
|
+
nodeRadius?: number,
|
|
886
|
+
/**
|
|
887
|
+
* The gap between discs (2).
|
|
888
|
+
*/
|
|
889
|
+
gap?: number,
|
|
890
|
+
/**
|
|
891
|
+
* The padding inside a container (6).
|
|
892
|
+
*/
|
|
893
|
+
padding?: number, charge?: number, gravity?: number,
|
|
894
|
+
/**
|
|
895
|
+
* Children above which a container is divided into communities (120; 0: never).
|
|
896
|
+
*/
|
|
897
|
+
communities?: number,
|
|
898
|
+
/**
|
|
899
|
+
* The share of a hub's links a satellite must have to be gathered with it (0: never; at most 1).
|
|
900
|
+
*/
|
|
901
|
+
satellites?: number,
|
|
902
|
+
/**
|
|
903
|
+
* Chains of single children share one disc (false).
|
|
904
|
+
*/
|
|
905
|
+
chains?: boolean,
|
|
906
|
+
/**
|
|
907
|
+
* Force steps per container (1..=10000).
|
|
908
|
+
*/
|
|
909
|
+
ticks?: number,
|
|
910
|
+
/**
|
|
911
|
+
* Groups the data gives: node id → path of group names.
|
|
912
|
+
*/
|
|
913
|
+
groups?: { [key in string]: Array<string> },
|
|
914
|
+
/**
|
|
915
|
+
* Children left out of Louvain (hubs), as `LayoutOptions::community_hubs`.
|
|
916
|
+
*/
|
|
917
|
+
hubs?: CommunityHubs, };
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Provisional (sessions): the part of an overview that changes while the clusters stay the same, answered for a request
|
|
921
|
+
* with `positionsOnly` laid out on the clusters of the session's last overview. The host keeps ids, labels, parents,
|
|
922
|
+
* kinds, edges and links from that answer.
|
|
923
|
+
*/
|
|
924
|
+
export type OverviewPositions = { schemaVersion: number,
|
|
925
|
+
/**
|
|
926
|
+
* Always true: tells this answer from a whole `Overview`.
|
|
927
|
+
*/
|
|
928
|
+
positionsOnly: boolean, representation: OverviewRepresentation, x: Array<number>, y: Array<number>, r: Array<number>, rootRadius: number, stats: OverviewStats, };
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Provisional (ADR 0018, addendum): the representation values of an overview request, as the engine checked them.
|
|
932
|
+
*/
|
|
933
|
+
export type OverviewRepresentation = {
|
|
934
|
+
/**
|
|
935
|
+
* The user's decisions by node id.
|
|
936
|
+
*/
|
|
937
|
+
decisions: { [key in string]: Representation },
|
|
938
|
+
/**
|
|
939
|
+
* The rules by node kind.
|
|
940
|
+
*/
|
|
941
|
+
rules: { [key in string]: Representation },
|
|
942
|
+
/**
|
|
943
|
+
* Whether the zoom decides what neither a decision nor a rule does.
|
|
944
|
+
*/
|
|
945
|
+
auto: boolean,
|
|
946
|
+
/**
|
|
947
|
+
* Rule kinds the graph does not have (reported, not refused: a config set serves many graphs).
|
|
948
|
+
*/
|
|
949
|
+
unknownKinds: Array<string>, levelOfDetail?: LevelOfDetail, };
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Provisional (ADR 0018): a request of the `overview` operation. In a session `graph` may be left out after the
|
|
953
|
+
* first request, and `start` without positions continues from the last overview.
|
|
954
|
+
*/
|
|
955
|
+
export type OverviewRequest = { graph?: Graph, options?: OverviewLayoutOptions, intent?: OverviewIntent, configSet?: ConfigSet,
|
|
956
|
+
/**
|
|
957
|
+
* Radii by node id, for clusters a host shows structured.
|
|
958
|
+
*/
|
|
959
|
+
radii?: { [key in string]: number }, start?: OverviewStart,
|
|
960
|
+
/**
|
|
961
|
+
* Provisional (sessions): answer only what moves (`OverviewPositions`) when the clusters are those of the session's
|
|
962
|
+
* last overview; otherwise the whole overview.
|
|
963
|
+
*/
|
|
964
|
+
positionsOnly?: boolean,
|
|
965
|
+
/**
|
|
966
|
+
* Worker threads (native only); the answer is the same for any number.
|
|
967
|
+
*/
|
|
968
|
+
threads?: number, };
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Provisional: where an overview continues from. Positions (`x`, `y`, `r`) of a previous overview of the same
|
|
972
|
+
* clusters, or none in a session (its last overview); `settle` lets the changed containers settle again.
|
|
973
|
+
*/
|
|
974
|
+
export type OverviewStart = { x?: Array<number>, y?: Array<number>, r?: Array<number>, settle?: boolean, };
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Provisional: the counts of an overview.
|
|
978
|
+
*/
|
|
979
|
+
export type OverviewStats = { nodes: number, containers: number, communities: number, levels: number, edges: number, unresolvedEdges: number, overlaps: number, };
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Experimental (`LayoutOptions::pack_components`): how the components of a container are packed.
|
|
983
|
+
*/
|
|
984
|
+
export type PackComponents = {
|
|
985
|
+
/**
|
|
986
|
+
* The width over the height the packed components aim at (default 1: square).
|
|
987
|
+
*/
|
|
988
|
+
aspect?: number, };
|
|
989
|
+
|
|
713
990
|
export type PlacedLabel = { id: string, kind: string, text: string, bounds: Rect, };
|
|
714
991
|
|
|
715
992
|
export type Point = { x: number, y: number, };
|
|
@@ -1070,7 +1347,24 @@ export type StoredChain = { source: string, target: string, dummies?: Array<stri
|
|
|
1070
1347
|
*/
|
|
1071
1348
|
export type StoredLink = { source: string, target: string, };
|
|
1072
1349
|
|
|
1350
|
+
/**
|
|
1351
|
+
* Provisional: the answer of `trace` (besides `ok`): the nodes and edges on the paths between two nodes of the source
|
|
1352
|
+
* graph, and what of them the view shows. `reversed`: no path from `from` to `to`, the paths are those back; `length`
|
|
1353
|
+
* is null without a path.
|
|
1354
|
+
*/
|
|
1355
|
+
export type TraceAnswer = { found: boolean, reversed: boolean, length: number | null, nodes: Array<string>, edges: Array<string>, visible: VisibleParts,
|
|
1356
|
+
/**
|
|
1357
|
+
* Hops of every visible node from the path through the drawn edges (for fading); unreachable nodes are left out.
|
|
1358
|
+
*/
|
|
1359
|
+
distance: { [key in string]: number }, };
|
|
1360
|
+
|
|
1073
1361
|
/**
|
|
1074
1362
|
* Metrics of the curated geometry, computed by the shared validator.
|
|
1075
1363
|
*/
|
|
1076
1364
|
export type ValidationRecord = { metrics: Metrics, };
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Provisional: what of some source-graph nodes and edges the current view shows (`trace`, `neighbourhood`): the visible
|
|
1368
|
+
* boxes that hold the nodes, and the routes that carry the edges.
|
|
1369
|
+
*/
|
|
1370
|
+
export type VisibleParts = { nodes: Array<string>, routes: Array<string>, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arqlet/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "TypeScript types of Arqlet's engine contracts (Snapshot, Scene, ConfigSet, LayoutOptions, ...), generated from the Rust types. Types only; provisional.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graph",
|