@arqlet/contracts 0.5.0 → 0.7.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 +254 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -47,14 +47,61 @@ export type Bus = { id: string, edges: Array<string>,
|
|
|
47
47
|
* What the bus is called in the drawing ("CAN 500 kbit/s"). Placed like an edge label when the options give its size
|
|
48
48
|
* under `edge_labels["bus:<id>"]`; omitted when none.
|
|
49
49
|
*/
|
|
50
|
-
label?: string,
|
|
50
|
+
label?: string,
|
|
51
|
+
/**
|
|
52
|
+
* Provisional: a bus line, the view of a node of shape `busLine` (ADR 0019 view model): the source graph keeps the bus
|
|
53
|
+
* as a node with its edges; the view leaves the node and those edges out and keeps them here, one tap per edge, drawn
|
|
54
|
+
* as a bar past the nodes they attach (`Snapshot::bus_lines`). Omitted when empty (a bus of shared edges).
|
|
55
|
+
*
|
|
56
|
+
* Also an input (buses as data): a bus given with `taps` and no node of its own is drawn the same way, and `trace`,
|
|
57
|
+
* `neighbourhood` and `filter` treat it as a shared medium as they do a `busLine` node (`id` names the bus; the taps'
|
|
58
|
+
* `edge` ids must not collide with the graph's edges).
|
|
59
|
+
*/
|
|
60
|
+
taps?: Array<BusTap>,
|
|
61
|
+
/**
|
|
62
|
+
* Provisional: with `taps`, the bus node's kind and parent in the source graph. Omitted when unset.
|
|
63
|
+
*/
|
|
64
|
+
kind?: string, parentId?: string, };
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Provisional: where a bus line is drawn (`Snapshot::bus_lines`), in absolute coordinates as the routes are: its bar, and
|
|
68
|
+
* the points of every tap by edge id, in the edge's own direction.
|
|
69
|
+
*/
|
|
70
|
+
export type BusLine = { bar: Rect, taps: { [key in string]: Array<Point> }, };
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Provisional: how a bus kept as a node of shape `busLine` is drawn (`LayoutOptions::bus_style`).
|
|
74
|
+
*/
|
|
75
|
+
export type BusStyle = "bar" | "trunk" | "lines";
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Provisional: one edge of a bus line (`Bus::taps`): the edge, the node at its other end, whether the edge runs from that
|
|
79
|
+
* node to the bus (`toBus`) or from the bus to it, and the edge's kind.
|
|
80
|
+
*/
|
|
81
|
+
export type BusTap = { edge: string, node: string, toBus: boolean, kind: string, };
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Provisional: the layout state of the taps of the bus lines (`Snapshot::bus_taps`).
|
|
85
|
+
*/
|
|
86
|
+
export type BusTapLayout = { routes?: Array<Route>, resolvedPorts?: Array<ResolvedPort>, boundaryCrossings?: Array<BoundaryCrossing>,
|
|
87
|
+
/**
|
|
88
|
+
* The root of every bus network of the layout (one per network), kept so that the next layout of the same networks
|
|
89
|
+
* (a toggle, an edit) grows its trees from the same roots.
|
|
90
|
+
*/
|
|
91
|
+
roots?: Array<string>, };
|
|
51
92
|
|
|
52
93
|
/**
|
|
53
94
|
* Provisional: the children that `communities` leaves out of Louvain, so that one hub does not pull a whole container
|
|
54
95
|
* into one community: those with at least `min_links` links in their container (by edge weight, as Louvain counts them)
|
|
55
|
-
*
|
|
96
|
+
* those among the share `top` of a container's linked children with the most links (by weight; `0.01`: the top 1 %, at
|
|
97
|
+
* least one; ties by the children's order), and those named in `nodes`. A hub stays a direct child of its container.
|
|
98
|
+
* Ids the graph lacks are ignored.
|
|
56
99
|
*/
|
|
57
|
-
export type CommunityHubs = { minLinks?: number,
|
|
100
|
+
export type CommunityHubs = { minLinks?: number,
|
|
101
|
+
/**
|
|
102
|
+
* Provisional: a relative threshold, a share in (0, 1] of a container's linked children.
|
|
103
|
+
*/
|
|
104
|
+
top?: number, nodes?: Array<string>, };
|
|
58
105
|
|
|
59
106
|
export type ConfigSet = { schemaVersion: number, id: string, layout: LayoutConfig, routing: RoutingConfig,
|
|
60
107
|
/**
|
|
@@ -229,6 +276,12 @@ export type Hidden = { nodeKinds?: Array<string>, nodes?: Array<string>, edgeKin
|
|
|
229
276
|
*/
|
|
230
277
|
compact?: boolean, };
|
|
231
278
|
|
|
279
|
+
/**
|
|
280
|
+
* Provisional: an edge drawn as a reference to a hub (`Snapshot::hub_refs`): the edge, its kind, the node it is drawn at,
|
|
281
|
+
* the hub, and whether it runs from the node to the hub (`outgoing`) or from the hub to the node.
|
|
282
|
+
*/
|
|
283
|
+
export type HubRef = { edge: string, kind: string, node: string, hub: string, outgoing: boolean, };
|
|
284
|
+
|
|
232
285
|
export type HybridCriterion = "compact" | "endToEnd";
|
|
233
286
|
|
|
234
287
|
export type Integrity = {
|
|
@@ -259,7 +312,12 @@ labelPositions: { [key in string]: Point },
|
|
|
259
312
|
/**
|
|
260
313
|
* The orders the user chose by a drag.
|
|
261
314
|
*/
|
|
262
|
-
orderHints?: { [key in string]: OrderHint },
|
|
315
|
+
orderHints?: { [key in string]: OrderHint },
|
|
316
|
+
/**
|
|
317
|
+
* Provisional: the containers shown in part (`LayoutOptions::partial`, set by `reveal`), so that a step back undoes a
|
|
318
|
+
* reveal or a page of `+N more`. Omitted when empty.
|
|
319
|
+
*/
|
|
320
|
+
partial?: { [key in string]: Array<string> }, };
|
|
263
321
|
|
|
264
322
|
/**
|
|
265
323
|
* Measured text rectangle. Hosts may supply exact font measurements.
|
|
@@ -363,6 +421,21 @@ componentPacking?: boolean,
|
|
|
363
421
|
* when off, so the default output does not change.
|
|
364
422
|
*/
|
|
365
423
|
packComponents?: PackComponents,
|
|
424
|
+
/**
|
|
425
|
+
* In a container across its parent's flow, the border nodes of edges that cross it share the first or last rank with
|
|
426
|
+
* the side nodes of edges that enter or leave on its sides, when that rank holds only side nodes, instead of opening a
|
|
427
|
+
* rank of their own (which left a rank of one long-edge dummy before the first child). On by default since 0.6.0;
|
|
428
|
+
* written as `false` when turned off.
|
|
429
|
+
*/
|
|
430
|
+
sharedBorderRanks?: boolean,
|
|
431
|
+
/**
|
|
432
|
+
* An edge between two containers of adjacent ranks that is the upper one's only edge toward the next rank and the lower
|
|
433
|
+
* one's only edge from the previous rank (a stack of containers, such as the subnets of a zone) forms a block of the
|
|
434
|
+
* placement across the flow with priority, at its ports as the containers' own plans place them: the two containers
|
|
435
|
+
* stand so that the edge runs straight, before the median alignment and with crossing segments giving way, as for
|
|
436
|
+
* segments between dummies. On by default since 0.6.0; written as `false` when turned off.
|
|
437
|
+
*/
|
|
438
|
+
alignStacked?: boolean,
|
|
366
439
|
/**
|
|
367
440
|
* Experimental: the children of a layered area that have no edge to another child (a file of unrelated functions)
|
|
368
441
|
* are spread over the ranks as a grid instead of all standing in the first rank, one long column. They fill the
|
|
@@ -370,6 +443,36 @@ packComponents?: PackComponents,
|
|
|
370
443
|
* Omitted when off, so the default output does not change.
|
|
371
444
|
*/
|
|
372
445
|
isolatedGrid?: boolean,
|
|
446
|
+
/**
|
|
447
|
+
* Provisional: `isolatedGrid` only in the areas with at least this many children that have no edge to another child
|
|
448
|
+
* of the area (a container opened with hundreds of unlinked members would stand as one long column). `None` (the
|
|
449
|
+
* default, omitted): 50 in views that start abstract (`levelOfDetail` or `communities` set, and `isolatedGrid` off),
|
|
450
|
+
* else as `isolatedGrid` says. `0`: no such grid (`isolated_grid_threshold`).
|
|
451
|
+
*/
|
|
452
|
+
isolatedGridFrom?: number | null,
|
|
453
|
+
/**
|
|
454
|
+
* Provisional (hub references): an edge of a node with at least this many edges in the view is not laid out or routed;
|
|
455
|
+
* it is drawn as a short stub at its other end, named after the hub (`Snapshot::hub_refs`), as a wiring diagram refers
|
|
456
|
+
* to another sheet. `None` (the default, omitted): every edge is routed.
|
|
457
|
+
*/
|
|
458
|
+
hubRefs?: number,
|
|
459
|
+
/**
|
|
460
|
+
* Provisional (single pass, request 27): edges that share a track in a channel instead of one track each. `target`:
|
|
461
|
+
* the edges of a channel into the same node run on one track there, drawn over each other like a bus into the node
|
|
462
|
+
* (as ELK's merged edges). `None` (the default, omitted): one track per edge.
|
|
463
|
+
*/
|
|
464
|
+
sharedTracks?: SharedTracks,
|
|
465
|
+
/**
|
|
466
|
+
* Provisional, computed by the layout with `hubRefs`: the room the references' stubs and names take between two ranks
|
|
467
|
+
* (added to the layer spacing), kept with the snapshot so that every later operation spaces alike. 0 (omitted): none.
|
|
468
|
+
*/
|
|
469
|
+
hubRefRoom?: number,
|
|
470
|
+
/**
|
|
471
|
+
* Provisional: how the view draws a bus kept as a node of shape `busLine`: `bar` (the default) a bar in a rank of its
|
|
472
|
+
* own with one tap per edge; `trunk` no rank and no bar, one shared line from the bus's head (its member nearest the
|
|
473
|
+
* root of the bus tree) to every other member, drawn as an explicit bus (ADR 0005). Omitted when `bar`.
|
|
474
|
+
*/
|
|
475
|
+
busStyle?: BusStyle,
|
|
373
476
|
/**
|
|
374
477
|
* 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
478
|
* with the positive flow, where single pass runs, and mirrored area by area (a container keeps its header at its
|
|
@@ -445,6 +548,21 @@ vpscOverlapRemoval?: boolean,
|
|
|
445
548
|
* Experimental conflict-directed organic repair, with the exhaustive search as a fallback. Off by default.
|
|
446
549
|
*/
|
|
447
550
|
directedRepair?: boolean,
|
|
551
|
+
/**
|
|
552
|
+
* A fresh organic placement continues after the stress with forces in the manner of d3-force (springs one node spacing
|
|
553
|
+
* long between where the edges end, many-body repulsion, box collision, a push off the straight edges, and a pull
|
|
554
|
+
* toward the centroid), which closes the gaps the stress leaves and leaves the repair little to resolve. Taken per area
|
|
555
|
+
* only where the straight edges cross no more often and pass through no more boxes; a drawing that keeps a geometry
|
|
556
|
+
* issue is laid out again without the forces. A node's loops take a corner where no neighbour lies. On by default
|
|
557
|
+
* since 0.6.0; written as `false` when turned off.
|
|
558
|
+
*/
|
|
559
|
+
organicForces?: boolean,
|
|
560
|
+
/**
|
|
561
|
+
* The loops of a node take the corner of the node where no other box lies in their way (then the corner whose sides
|
|
562
|
+
* carry the fewest other edges, as before); the loops take no part in the placement, and a blocked corner made the
|
|
563
|
+
* router take them around the neighbour, with bends. On by default since 0.6.0; written as `false` when turned off.
|
|
564
|
+
*/
|
|
565
|
+
loopSpace?: boolean,
|
|
448
566
|
/**
|
|
449
567
|
* Experimental bounded repulsion from projected edge chords at the end of organic stress. Off by default.
|
|
450
568
|
*/
|
|
@@ -530,6 +648,15 @@ groups?: { [key in string]: Array<string> },
|
|
|
530
648
|
* containers that `communities` and `groups` add, which start collapsed.
|
|
531
649
|
*/
|
|
532
650
|
levelOfDetail?: LevelOfDetail | null,
|
|
651
|
+
/**
|
|
652
|
+
* Provisional: an edge between nodes in different containers is drawn between the outermost containers its ends
|
|
653
|
+
* differ in, and those of one pair of containers as one route with their weights (as between collapsed containers);
|
|
654
|
+
* edges between siblings stay as they are. A view of many open groups with dense traffic between them draws one route
|
|
655
|
+
* per pair of groups instead of one per edge. `None` (the default, omitted): on in views that start abstract (with
|
|
656
|
+
* `levelOfDetail` or `communities`, where member edges between opened containers otherwise make the drawing grow to a
|
|
657
|
+
* million units), off elsewhere; `true` or `false` sets it.
|
|
658
|
+
*/
|
|
659
|
+
liftEdges?: boolean,
|
|
533
660
|
/**
|
|
534
661
|
* Provisional (view state, set by `filter`): what the view hides, keeping the place of the rest. Omitted when empty.
|
|
535
662
|
*/
|
|
@@ -614,6 +741,13 @@ layerSpacing?: number | null,
|
|
|
614
741
|
* default (omitted), so default drawings do not change.
|
|
615
742
|
*/
|
|
616
743
|
portSides?: boolean,
|
|
744
|
+
/**
|
|
745
|
+
* Provisional: the constructed layered routes search their lanes across the flow only near their ends (as far across as
|
|
746
|
+
* the edge reaches along the flow, at least 16 tracks), and over the whole width only when they find no way there. A
|
|
747
|
+
* search over the whole width costs time quadratic in the number of boxes across the drawing. Off by default (omitted),
|
|
748
|
+
* so default drawings do not change.
|
|
749
|
+
*/
|
|
750
|
+
routeSearchWindow?: boolean,
|
|
617
751
|
/**
|
|
618
752
|
* Provisional (single pass): areas without a fixed flow (organic, tree, radial) and straight routing are allowed in a
|
|
619
753
|
* single-pass layout. Those areas keep their own placement and their edges go to the router that completes single pass;
|
|
@@ -621,6 +755,12 @@ portSides?: boolean,
|
|
|
621
755
|
* single pass, as before.
|
|
622
756
|
*/
|
|
623
757
|
singlePassMixed?: boolean,
|
|
758
|
+
/**
|
|
759
|
+
* Polyline routing (`polyline`, `roundedPolyline`) in single pass: the layout routes such edges orthogonally, as it
|
|
760
|
+
* always did, and the scene pulls them taut; before, a graph with polyline routing fell back to the pipeline before
|
|
761
|
+
* single pass. On by default since 0.7.0; written as `false` when turned off (then such graphs fall back as before).
|
|
762
|
+
*/
|
|
763
|
+
singlePassPolyline?: boolean,
|
|
624
764
|
/**
|
|
625
765
|
* The clearance routes keep from nodes, their own nodes included beyond the stub at their port. It is a hard
|
|
626
766
|
* constraint (ADR 0005): the default is `DEFAULT_REQUIRED_CLEARANCE`, so it always applies. An explicit `null` is
|
|
@@ -684,7 +824,18 @@ depth?: number | null,
|
|
|
684
824
|
/**
|
|
685
825
|
* Containers of these kinds.
|
|
686
826
|
*/
|
|
687
|
-
kinds?: Array<string>,
|
|
827
|
+
kinds?: Array<string>,
|
|
828
|
+
/**
|
|
829
|
+
* Provisional (layered view only): the most nodes the first view shows (leaves and collapsed containers; an open
|
|
830
|
+
* container is a frame and does not count). The containers start collapsed and are opened level by level, the
|
|
831
|
+
* outermost first, while the view stays within `nodes` and `edges`; those `depth` and `kinds` name stay collapsed.
|
|
832
|
+
*/
|
|
833
|
+
nodes?: number | null,
|
|
834
|
+
/**
|
|
835
|
+
* Provisional (layered view only): the most edges the first view draws, counted as the view draws them (one edge for
|
|
836
|
+
* each pair of ends a collapsed container joins, none inside one). See `nodes`.
|
|
837
|
+
*/
|
|
838
|
+
edges?: number | null, };
|
|
688
839
|
|
|
689
840
|
/**
|
|
690
841
|
* A geometry observation for one element: the realized outline and the revision of the measurement. The revision rises with
|
|
@@ -773,7 +924,7 @@ shape?: NodeShape, };
|
|
|
773
924
|
/**
|
|
774
925
|
* The outline of a leaf node (docs/...: step 1 of the shape support). Containers use the same names later.
|
|
775
926
|
*/
|
|
776
|
-
export type NodeShape = "rect" | "square" | "circle";
|
|
927
|
+
export type NodeShape = "rect" | "square" | "circle" | "busLine";
|
|
777
928
|
|
|
778
929
|
export type NodeSize = { width: number, height: number, };
|
|
779
930
|
|
|
@@ -848,7 +999,20 @@ edges: number[],
|
|
|
848
999
|
/**
|
|
849
1000
|
* Per container, the links between its children: child, child, number of edges (flat triples).
|
|
850
1001
|
*/
|
|
851
|
-
links: Array<number>,
|
|
1002
|
+
links: Array<number>,
|
|
1003
|
+
/**
|
|
1004
|
+
* Provisional: every node of shape `busLine` as a line instead of a disc (a viewer draws the line and its taps, not
|
|
1005
|
+
* the node's disc). Omitted when there is none.
|
|
1006
|
+
*/
|
|
1007
|
+
busLines?: Array<OverviewBusLine>, stats: OverviewStats, };
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Provisional: a bus of the overview drawn as a line (`Overview::bus_lines`): the bus node's index, the line from
|
|
1011
|
+
* (`x1`, `y1`) to (`x2`, `y2`), horizontal or vertical (whichever its members spread more along), and per member (`taps`,
|
|
1012
|
+
* node indices) the point of the line its tap meets (`feet`, x and y alternating): straight across from the member, or
|
|
1013
|
+
* the line's end for a member beyond it.
|
|
1014
|
+
*/
|
|
1015
|
+
export type OverviewBusLine = { node: number, x1: number, y1: number, x2: number, y2: number, taps: Array<number>, feet: Array<number>, };
|
|
852
1016
|
|
|
853
1017
|
/**
|
|
854
1018
|
* Provisional (ADR 0018, addendum): the rules of the data for the cluster overview, the second step of the order
|
|
@@ -903,6 +1067,10 @@ satellites?: number,
|
|
|
903
1067
|
* Chains of single children share one disc (false).
|
|
904
1068
|
*/
|
|
905
1069
|
chains?: boolean,
|
|
1070
|
+
/**
|
|
1071
|
+
* Provisional: the members of every bus line (node shape `busLine`) in a row on its line, after the forces (false).
|
|
1072
|
+
*/
|
|
1073
|
+
busRows?: boolean,
|
|
906
1074
|
/**
|
|
907
1075
|
* Force steps per container (1..=10000).
|
|
908
1076
|
*/
|
|
@@ -925,7 +1093,11 @@ export type OverviewPositions = { schemaVersion: number,
|
|
|
925
1093
|
/**
|
|
926
1094
|
* Always true: tells this answer from a whole `Overview`.
|
|
927
1095
|
*/
|
|
928
|
-
positionsOnly: boolean, representation: OverviewRepresentation, x: Array<number>, y: Array<number>, r: Array<number>, rootRadius: number,
|
|
1096
|
+
positionsOnly: boolean, representation: OverviewRepresentation, x: Array<number>, y: Array<number>, r: Array<number>, rootRadius: number,
|
|
1097
|
+
/**
|
|
1098
|
+
* The bus lines move with the nodes (`Overview::bus_lines`). Omitted when there is none.
|
|
1099
|
+
*/
|
|
1100
|
+
busLines?: Array<OverviewBusLine>, stats: OverviewStats, };
|
|
929
1101
|
|
|
930
1102
|
/**
|
|
931
1103
|
* Provisional (ADR 0018, addendum): the representation values of an overview request, as the engine checked them.
|
|
@@ -1162,11 +1334,25 @@ buses?: Array<Array<string>>,
|
|
|
1162
1334
|
* them as junction dots. Omitted when there is none.
|
|
1163
1335
|
*/
|
|
1164
1336
|
junctions?: Array<Point>,
|
|
1337
|
+
/**
|
|
1338
|
+
* Provisional: the bus lines of the view (a bus kept as a node of shape `busLine` in the source graph): each a bar with
|
|
1339
|
+
* its taps, one per edge of the bus, in the edge's direction. Omitted when there is none.
|
|
1340
|
+
*/
|
|
1341
|
+
busLines?: Array<SceneBusLine>,
|
|
1342
|
+
/**
|
|
1343
|
+
* Provisional (`hubRefs`): edges of hubs drawn as stubs at their other end, named after the hub. Omitted when none.
|
|
1344
|
+
*/
|
|
1345
|
+
hubRefs?: Array<SceneHubRef>,
|
|
1165
1346
|
/**
|
|
1166
1347
|
* Extent of everything drawn, with a 30-unit margin. May start at negative coordinates.
|
|
1167
1348
|
*/
|
|
1168
1349
|
bounds: Rect, };
|
|
1169
1350
|
|
|
1351
|
+
/**
|
|
1352
|
+
* Provisional: one bus line of a scene (`Scene::bus_lines`).
|
|
1353
|
+
*/
|
|
1354
|
+
export type SceneBusLine = { id: string, label: string, kind: string, bounds: Rect, taps: Array<SceneTap>, };
|
|
1355
|
+
|
|
1170
1356
|
/**
|
|
1171
1357
|
* One conflict of the drawing. A renderer marks every node and route it names and shows `reason` for them.
|
|
1172
1358
|
*/
|
|
@@ -1181,6 +1367,13 @@ kind: string,
|
|
|
1181
1367
|
*/
|
|
1182
1368
|
nodes: Array<string>, routes: Array<string>, reason: string, };
|
|
1183
1369
|
|
|
1370
|
+
/**
|
|
1371
|
+
* Provisional: an edge drawn as a reference to a hub (`Scene::hub_refs`): a short stub at `node` (out of its right side for
|
|
1372
|
+
* an edge to the hub, into its left side for one from it), in the edge's direction, and the hub's name (`text`) in
|
|
1373
|
+
* `label` beside the stub's free end.
|
|
1374
|
+
*/
|
|
1375
|
+
export type SceneHubRef = { edge: string, node: string, hub: string, outgoing: boolean, text: string, points: Array<Point>, label: Rect, };
|
|
1376
|
+
|
|
1184
1377
|
export type SceneNode = {
|
|
1185
1378
|
/**
|
|
1186
1379
|
* Absolute bounds in scene coordinates.
|
|
@@ -1189,7 +1382,17 @@ bounds: Rect, container: boolean, aggregate: boolean, collapsed: boolean, invali
|
|
|
1189
1382
|
/**
|
|
1190
1383
|
* The rows of the node's content, top to bottom (empty for a node without rows).
|
|
1191
1384
|
*/
|
|
1192
|
-
rows?: Array<SceneRow>,
|
|
1385
|
+
rows?: Array<SceneRow>,
|
|
1386
|
+
/**
|
|
1387
|
+
* Provisional: for a container, how many children it holds in the view (the communities and groups it adds count
|
|
1388
|
+
* as children; a partly shown container counts the children in its rest too). Omitted for a leaf.
|
|
1389
|
+
*/
|
|
1390
|
+
childCount?: number,
|
|
1391
|
+
/**
|
|
1392
|
+
* Provisional: of those, how many are not drawn: all of them for a collapsed container, those in its rest (`+N more`)
|
|
1393
|
+
* for a partly shown one. Omitted when every child is drawn.
|
|
1394
|
+
*/
|
|
1395
|
+
hiddenCount?: number, id: string, kind: string, label: string, parentId: string | null,
|
|
1193
1396
|
/**
|
|
1194
1397
|
* The outline of the node. `rect` (the default, omitted) uses its size as it is; `square` and `circle` use the larger
|
|
1195
1398
|
* of its two sizes on both axes. Collision and routing still use the bounding rectangle in this version.
|
|
@@ -1226,10 +1429,25 @@ members?: Array<string>, };
|
|
|
1226
1429
|
*/
|
|
1227
1430
|
export type SceneRow = { id: string, label: string, bounds: Rect, };
|
|
1228
1431
|
|
|
1432
|
+
/**
|
|
1433
|
+
* Provisional: one tap of a bus line: the edge it stands for, the node it attaches, and its points.
|
|
1434
|
+
*/
|
|
1435
|
+
export type SceneTap = { edge: string, node: string, points: Array<Point>, };
|
|
1436
|
+
|
|
1229
1437
|
/**
|
|
1230
1438
|
* The outcome of the settling steps after a drag (see `EditReport::settle`).
|
|
1231
1439
|
*/
|
|
1232
|
-
export type Settle = { steps: number, residual: number, converged: boolean,
|
|
1440
|
+
export type Settle = { steps: number, residual: number, converged: boolean,
|
|
1441
|
+
/**
|
|
1442
|
+
* The calls of one settling so far (0 for the first): each takes a smaller step than the one before, so that the
|
|
1443
|
+
* settling converges. Counted on from the report of the snapshot a call continues. Omitted when 0.
|
|
1444
|
+
*/
|
|
1445
|
+
round?: number, };
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* Provisional: which edges share a track in a channel (`LayoutOptions::shared_tracks`).
|
|
1449
|
+
*/
|
|
1450
|
+
export type SharedTracks = "target";
|
|
1233
1451
|
|
|
1234
1452
|
/**
|
|
1235
1453
|
* A pinned node size, in world units.
|
|
@@ -1265,7 +1483,17 @@ areaStrategies?: { [key in string]: LayoutStrategy },
|
|
|
1265
1483
|
/**
|
|
1266
1484
|
* Structured counterpart of the routing diagnostics that name a passed-through node.
|
|
1267
1485
|
*/
|
|
1268
|
-
routeConflicts?: Array<RouteConflict>, schemaVersion: number, engineVersion: string, revision: number, layoutVersion: number, baseRevision: number | null, options?: LayoutOptions, graph: Graph,
|
|
1486
|
+
routeConflicts?: Array<RouteConflict>, schemaVersion: number, engineVersion: string, revision: number, layoutVersion: number, baseRevision: number | null, options?: LayoutOptions, graph: Graph,
|
|
1487
|
+
/**
|
|
1488
|
+
* The whole graph a view was taken from (shared, not copied: snapshots of one view, and a session's requests, hold the
|
|
1489
|
+
* same graph; it is replaced, never changed in place).
|
|
1490
|
+
*/
|
|
1491
|
+
sourceGraph: Graph | null,
|
|
1492
|
+
/**
|
|
1493
|
+
* Provisional (ADR 0019): set when the source graph was left out of this snapshot (`omitSource`); the fingerprint of
|
|
1494
|
+
* that graph (`source_digest`). A request on such a snapshot brings the graph as `source`, and it must match.
|
|
1495
|
+
*/
|
|
1496
|
+
sourceDigest?: string | null, collapsedIds: Array<string>, boxes: { [key in string]: Rect }, routes: Array<Route>, recomputedContainers: Array<string>, optimization?: OptimizationReport | null, omittedUnresolvedEdges: number, geometryIssues: Array<GeometryIssue>, resolvedPorts: Array<ResolvedPort>, boundaryCrossings: Array<BoundaryCrossing>,
|
|
1269
1497
|
/**
|
|
1270
1498
|
* The edges drawn as straight segments (the others are orthogonal). Empty when every edge is orthogonal.
|
|
1271
1499
|
*/
|
|
@@ -1276,6 +1504,21 @@ straightEdges?: Array<string>,
|
|
|
1276
1504
|
* graph has none.
|
|
1277
1505
|
*/
|
|
1278
1506
|
busBoxes?: { [key in string]: Rect },
|
|
1507
|
+
/**
|
|
1508
|
+
* Provisional: every bus line of the view (`Bus::taps`), by bus id: its bar and its taps. Omitted when empty.
|
|
1509
|
+
*/
|
|
1510
|
+
busLines?: { [key in string]: BusLine },
|
|
1511
|
+
/**
|
|
1512
|
+
* Provisional: the layout state of the bus lines' taps (their routes, ports and border crossings, as the layout left
|
|
1513
|
+
* them), kept apart from the view's, so that an operation can continue the layout of the graph with the bus nodes.
|
|
1514
|
+
* Omitted when empty.
|
|
1515
|
+
*/
|
|
1516
|
+
busTaps?: BusTapLayout,
|
|
1517
|
+
/**
|
|
1518
|
+
* Provisional (`hubRefs`): the edges of the view that were not laid out because one end is a hub, each drawn as a stub
|
|
1519
|
+
* at its other end (`node`) named after the hub. Omitted when empty.
|
|
1520
|
+
*/
|
|
1521
|
+
hubRefs?: Array<HubRef>,
|
|
1279
1522
|
/**
|
|
1280
1523
|
* The move gesture in progress or the last one finished, for sequence checks. Omitted when there was none.
|
|
1281
1524
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arqlet/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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",
|