@arqlet/contracts 0.6.0 → 0.8.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 (2) hide show
  1. package/dist/index.d.ts +435 -11
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -52,6 +52,10 @@ label?: string,
52
52
  * Provisional: a bus line, the view of a node of shape `busLine` (ADR 0019 view model): the source graph keeps the bus
53
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
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).
55
59
  */
56
60
  taps?: Array<BusTap>,
57
61
  /**
@@ -68,7 +72,7 @@ export type BusLine = { bar: Rect, taps: { [key in string]: Array<Point> }, };
68
72
  /**
69
73
  * Provisional: how a bus kept as a node of shape `busLine` is drawn (`LayoutOptions::bus_style`).
70
74
  */
71
- export type BusStyle = "bar" | "trunk";
75
+ export type BusStyle = "bar" | "trunk" | "lines";
72
76
 
73
77
  /**
74
78
  * Provisional: one edge of a bus line (`Bus::taps`): the edge, the node at its other end, whether the edge runs from that
@@ -89,9 +93,15 @@ roots?: Array<string>, };
89
93
  /**
90
94
  * Provisional: the children that `communities` leaves out of Louvain, so that one hub does not pull a whole container
91
95
  * into one community: those with at least `min_links` links in their container (by edge weight, as Louvain counts them)
92
- * and those named in `nodes`. A hub stays a direct child of its container. Ids the graph lacks are ignored.
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.
93
99
  */
94
- export type CommunityHubs = { minLinks?: number, nodes?: Array<string>, };
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>, };
95
105
 
96
106
  export type ConfigSet = { schemaVersion: number, id: string, layout: LayoutConfig, routing: RoutingConfig,
97
107
  /**
@@ -157,6 +167,30 @@ sizePins?: { [key in string]: SizePin },
157
167
  */
158
168
  labels?: { [key in string]: Point }, };
159
169
 
170
+ /**
171
+ * Provisional (view details): the answer of `details` (besides `ok`) for a node or an edge: what the engine knows about it
172
+ * and the host cannot see in the scene (the groups above it, what a collapsed box holds, the edges a drawn line stands
173
+ * for). Domain attributes stay with the host, which looks them up by id. Read only.
174
+ */
175
+ export type DetailsAnswer = {
176
+ /**
177
+ * The node asked for (`nodeId`).
178
+ */
179
+ node?: NodeDetails,
180
+ /**
181
+ * The edge of the source graph asked for (`edgeId` naming one).
182
+ */
183
+ edge?: EdgeDetails,
184
+ /**
185
+ * The drawn line asked for (`edgeId` naming a route), or the one that carries the edge asked for.
186
+ */
187
+ route?: LineDetails,
188
+ /**
189
+ * Provisional (ADR 0023, R1): the revision of the session's content the properties were read at; omitted without
190
+ * content.
191
+ */
192
+ contentRevision?: bigint, };
193
+
160
194
  export type Edge = { id: string, kind: string, source: string, target: string | null,
161
195
  /**
162
196
  * Provisional: how many edges this edge stands for (a pre-aggregated relation), at least 1; 1 when left out. It
@@ -165,6 +199,19 @@ export type Edge = { id: string, kind: string, source: string, target: string |
165
199
  */
166
200
  weight?: number, };
167
201
 
202
+ /**
203
+ * Provisional: an edge of the source graph (`details`).
204
+ */
205
+ export type EdgeDetails = { id: string, kind: string, source: string, target: string | null,
206
+ /**
207
+ * The drawn line that carries it, or null when the view does not show it (an end hidden, both ends in one box).
208
+ */
209
+ route: string | null,
210
+ /**
211
+ * Provisional (ADR 0023, R1): the edge's properties from the session's content; omitted when it has none.
212
+ */
213
+ properties?: Record<string, unknown>, };
214
+
168
215
  export type EdgePorts = { edgeId: string, sourcePort: string | null, targetPort: string | null, };
169
216
 
170
217
  /**
@@ -200,6 +247,27 @@ preview?: boolean,
200
247
  */
201
248
  settle?: Settle | null, };
202
249
 
250
+ /**
251
+ * Provisional (search): the answer of `find` (besides `ok`): the nodes of the source graph whose label or id contains the
252
+ * query (ignoring case), best first: an exact match, then a prefix, then a word start, then anywhere; equal ones by label
253
+ * and id. At most `limit` matches; `total` counts them all.
254
+ */
255
+ export type FindAnswer = { matches: Array<FindMatch>, total: number,
256
+ /**
257
+ * Provisional (ADR 0023, R1): with `key`, the revision of the session's content that was searched.
258
+ */
259
+ contentRevision?: bigint, };
260
+
261
+ /**
262
+ * Provisional: a node `find` found, with the containers above it (outermost first) and the visible box that shows it
263
+ * (itself, the collapsed container it is in, or null when the view hides it), so that a host can `reveal` it.
264
+ */
265
+ export type FindMatch = { id: string, label: string, kind: string, parents: Array<string>, shownAs: string | null,
266
+ /**
267
+ * Provisional (ADR 0023, R1): with `key`, the value of that property that matched.
268
+ */
269
+ value?: unknown, };
270
+
203
271
  export type GeometryIssue = { kind: string, nodeIds: Array<string>, message: string, };
204
272
 
205
273
  /**
@@ -235,7 +303,13 @@ defaultRouting?: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" |
235
303
  * Provisional: explicit buses (ADR 0005): each groups edges drawn on one shared trunk with branches. Membership is never
236
304
  * inferred. Omitted when empty, so earlier documents and drawings do not change.
237
305
  */
238
- buses?: Array<Bus>, };
306
+ buses?: Array<Bus>,
307
+ /**
308
+ * Provisional (ADR 0022): memberships across the hierarchy — the groupings a node belongs to besides its container,
309
+ * by dimension. Never inferred, and never a second containment tree. Omitted when empty, so earlier documents and
310
+ * drawings do not change.
311
+ */
312
+ memberships?: Memberships, };
239
313
 
240
314
  /**
241
315
  * Provisional: the nodes within some hops of nodes of a graph (`overviewNeighbourhood`), without a view.
@@ -246,7 +320,19 @@ export type GraphNeighbourhood = { nodes: Array<string>, edges: Array<string>, h
246
320
  * Provisional: a change of the source graph of a view (`patch`): nodes and edges to add, and nodes (each with what it
247
321
  * holds and its edges) and edges to remove. Removals apply first.
248
322
  */
249
- export type GraphPatch = { nodes?: Array<Node>, edges?: Array<Edge>, removeNodes?: Array<string>, removeEdges?: Array<string>, };
323
+ export type GraphPatch = { nodes?: Array<Node>, edges?: Array<Edge>, removeNodes?: Array<string>, removeEdges?: Array<string>,
324
+ /**
325
+ * Provisional (ADR 0022 §5b): dimensions and groups to add or replace, as `nodes` and `edges` add: a dimension of the
326
+ * same id takes the groups given (a group of the same id replaced, a new one appended) and a label if one is given; a
327
+ * new dimension is appended. Applied after `removeMemberships`. Member ids the graph does not have are kept and
328
+ * counted, as anywhere.
329
+ */
330
+ memberships?: Memberships,
331
+ /**
332
+ * Provisional (ADR 0022 §5b): whole dimensions, or groups within one (with the groups nested in them), to remove;
333
+ * applied first. Unknown ones are refused.
334
+ */
335
+ removeMemberships?: Array<MembershipRemoval>, };
250
336
 
251
337
  /**
252
338
  * Provisional: the paths between two nodes of a graph (`overviewTrace`), without a view: the overview's viewer maps them
@@ -254,6 +340,34 @@ export type GraphPatch = { nodes?: Array<Node>, edges?: Array<Edge>, removeNodes
254
340
  */
255
341
  export type GraphTrace = { found: boolean, reversed: boolean, length: number | null, nodes: Array<string>, edges: Array<string>, };
256
342
 
343
+ /**
344
+ * Provisional (ADR 0022 §2): one criterion of `LayoutOptions::grouping_priority`.
345
+ */
346
+ export type GroupingCriterion = {
347
+ /**
348
+ * `parent` (containment from `parentId`) or the id of a declared membership dimension.
349
+ */
350
+ by: string,
351
+ /**
352
+ * The value priority of a dimension: when a node is in several of its groups that are not one path, the first of
353
+ * these that holds it owns it. Unlisted groups follow in their declared order. Not allowed on `parent`.
354
+ */
355
+ values?: Array<string>,
356
+ /**
357
+ * How the criterion's groups are rendered where it owns nodes. `lanes` is accepted and reported as not yet applied
358
+ * (ADR 0022, M4); its groups are drawn as containers until then.
359
+ */
360
+ as?: GroupingRendering,
361
+ /**
362
+ * The shape of this criterion's hulls where it holds nodes softly; `LayoutOptions::membership_hull` without it.
363
+ */
364
+ hull?: HullShape, };
365
+
366
+ /**
367
+ * Provisional (ADR 0022 §3): how an owning criterion's groups are drawn.
368
+ */
369
+ export type GroupingRendering = "containers" | "lanes";
370
+
257
371
  /**
258
372
  * What a view hides (provisional, view state set by the `filter` operation): nodes of these kinds, these nodes (each with
259
373
  * everything below it) and edges of these kinds. The layout keeps their room, so what stays keeps its place; the scene
@@ -266,6 +380,17 @@ export type Hidden = { nodeKinds?: Array<string>, nodes?: Array<string>, edgeKin
266
380
  */
267
381
  compact?: boolean, };
268
382
 
383
+ /**
384
+ * Provisional: an edge drawn as a reference to a hub (`Snapshot::hub_refs`): the edge, its kind, the node it is drawn at,
385
+ * the hub, and whether it runs from the node to the hub (`outgoing`) or from the hub to the node.
386
+ */
387
+ export type HubRef = { edge: string, kind: string, node: string, hub: string, outgoing: boolean, };
388
+
389
+ /**
390
+ * Provisional (ADR 0022 §3): the outline of a membership hull. Both are comparison geometry, no trigonometry.
391
+ */
392
+ export type HullShape = "rectangle" | "polygon";
393
+
269
394
  export type HybridCriterion = "compact" | "endToEnd";
270
395
 
271
396
  export type Integrity = {
@@ -296,7 +421,17 @@ labelPositions: { [key in string]: Point },
296
421
  /**
297
422
  * The orders the user chose by a drag.
298
423
  */
299
- orderHints?: { [key in string]: OrderHint }, };
424
+ orderHints?: { [key in string]: OrderHint },
425
+ /**
426
+ * Provisional: the containers shown in part (`LayoutOptions::partial`, set by `reveal`), so that a step back undoes a
427
+ * reveal or a page of `+N more`. Omitted when empty.
428
+ */
429
+ partial?: { [key in string]: Array<string> },
430
+ /**
431
+ * Provisional: what the view hides (`LayoutOptions::hidden`, set by `filter`), so that a step back undoes a filter.
432
+ * Omitted when nothing is hidden.
433
+ */
434
+ hidden?: Hidden, };
300
435
 
301
436
  /**
302
437
  * Measured text rectangle. Hosts may supply exact font measurements.
@@ -425,9 +560,40 @@ isolatedGrid?: boolean,
425
560
  /**
426
561
  * Provisional: `isolatedGrid` only in the areas with at least this many children that have no edge to another child
427
562
  * of the area (a container opened with hundreds of unlinked members would stand as one long column). `None` (the
428
- * default, omitted): as `isolatedGrid` says.
563
+ * default, omitted): 50 in views that start abstract (`levelOfDetail` or `communities` set, and `isolatedGrid` off),
564
+ * else as `isolatedGrid` says. `0`: no such grid (`isolated_grid_threshold`).
429
565
  */
430
566
  isolatedGridFrom?: number | null,
567
+ /**
568
+ * Provisional (hub references): an edge of a node with at least this many edges in the view is not laid out or routed;
569
+ * it is drawn as a short stub at its other end, named after the hub (`Snapshot::hub_refs`), as a wiring diagram refers
570
+ * to another sheet. `None` (the default, omitted): every edge is routed.
571
+ */
572
+ hubRefs?: number,
573
+ /**
574
+ * Provisional (single pass, request 27): edges that share a track in a channel instead of one track each. `target`:
575
+ * the edges of a channel into the same node run on one track there, drawn over each other like a bus into the node
576
+ * (as ELK's merged edges). `None` (the default, omitted): one track per edge.
577
+ */
578
+ sharedTracks?: SharedTracks,
579
+ /**
580
+ * Provisional (ADR 0022 §2): the structures the view shows, ranked. A criterion is the parent hierarchy (`parent`) or
581
+ * a membership dimension; the first criterion that assigns a node owns it in the view (its container), and every
582
+ * later one holds it softly (drawn as hulls). A dimension that is not listed is neither drawn nor read. Empty (the
583
+ * default, omitted) means `[parent]`: today's view, byte-identical. See `grouping::owners`.
584
+ */
585
+ groupingPriority?: Array<GroupingCriterion>,
586
+ /**
587
+ * Provisional (ADR 0022 §3): the shape of a membership hull. `rectangle` (the default, omitted) draws the padded
588
+ * bounding box of the group's boxes, which looks like a container and may overlap one; `polygon` draws the padded
589
+ * convex hull. A criterion of `groupingPriority` may override it (M1).
590
+ */
591
+ membershipHull?: HullShape,
592
+ /**
593
+ * Provisional, computed by the layout with `hubRefs`: the room the references' stubs and names take between two ranks
594
+ * (added to the layer spacing), kept with the snapshot so that every later operation spaces alike. 0 (omitted): none.
595
+ */
596
+ hubRefRoom?: number,
431
597
  /**
432
598
  * Provisional: how the view draws a bus kept as a node of shape `busLine`: `bar` (the default) a bar in a rank of its
433
599
  * own with one tap per edge; `trunk` no rank and no bar, one shared line from the bus's head (its member nearest the
@@ -613,7 +779,9 @@ levelOfDetail?: LevelOfDetail | null,
613
779
  * Provisional: an edge between nodes in different containers is drawn between the outermost containers its ends
614
780
  * differ in, and those of one pair of containers as one route with their weights (as between collapsed containers);
615
781
  * edges between siblings stay as they are. A view of many open groups with dense traffic between them draws one route
616
- * per pair of groups instead of one per edge. Off by default (omitted).
782
+ * per pair of groups instead of one per edge. `None` (the default, omitted): on in views that start abstract (with
783
+ * `levelOfDetail` or `communities`, where member edges between opened containers otherwise make the drawing grow to a
784
+ * million units), off elsewhere; `true` or `false` sets it.
617
785
  */
618
786
  liftEdges?: boolean,
619
787
  /**
@@ -714,6 +882,12 @@ routeSearchWindow?: boolean,
714
882
  * single pass, as before.
715
883
  */
716
884
  singlePassMixed?: boolean,
885
+ /**
886
+ * Polyline routing (`polyline`, `roundedPolyline`) in single pass: the layout routes such edges orthogonally, as it
887
+ * always did, and the scene pulls them taut; before, a graph with polyline routing fell back to the pipeline before
888
+ * single pass. On by default since 0.7.0; written as `false` when turned off (then such graphs fall back as before).
889
+ */
890
+ singlePassPolyline?: boolean,
717
891
  /**
718
892
  * The clearance routes keep from nodes, their own nodes included beyond the stub at their port. It is a hard
719
893
  * constraint (ADR 0005): the default is `DEFAULT_REQUIRED_CLEARANCE`, so it always applies. An explicit `null` is
@@ -790,12 +964,74 @@ nodes?: number | null,
790
964
  */
791
965
  edges?: number | null, };
792
966
 
967
+ /**
968
+ * Provisional: a drawn line (`details`): its visible ends, its shape, and the edges of the source graph it stands for in
969
+ * its own direction (`edges`) and in the other (`opposite`), at most `limit` ids each (the counts are complete).
970
+ */
971
+ export type LineDetails = { id: string, kind: string, source: string, target: string, length: number, bends: number,
972
+ /**
973
+ * Edges drawn along it (one unless it leads a bundle).
974
+ */
975
+ weight: number,
976
+ /**
977
+ * The line it is bundled into, or null.
978
+ */
979
+ bundleOf: string | null,
980
+ /**
981
+ * The lines bundled into it.
982
+ */
983
+ bundled: Array<string>, edges: Array<string>, edgeCount: number, opposite: Array<string>, oppositeCount: number, };
984
+
793
985
  /**
794
986
  * A geometry observation for one element: the realized outline and the revision of the measurement. The revision rises with
795
987
  * every new measurement of that element, so that an old one is recognised when it arrives late.
796
988
  */
797
989
  export type Measurement = { contour: Contour, geometryRevision: bigint, };
798
990
 
991
+ /**
992
+ * Provisional (ADR 0022): one dimension of memberships (`zone`, `team`, `layer`, …) with its groups in the order they
993
+ * are declared. That order is the lane order, the legend order and the iteration order of everything derived from it.
994
+ */
995
+ export type MembershipDimension = { id: string,
996
+ /**
997
+ * What the dimension is called in the drawing. The engine does not read it; it is carried to the viewer.
998
+ */
999
+ label?: string, groups?: Array<MembershipGroup>, };
1000
+
1001
+ /**
1002
+ * Provisional (ADR 0022): one group of a dimension. `members` are node ids; an id the graph does not have is ignored
1003
+ * and counted, not an error, because a host mapping may cover more than the imported view.
1004
+ */
1005
+ export type MembershipGroup = { id: string,
1006
+ /**
1007
+ * What the group is called in the drawing; its id where this is empty.
1008
+ */
1009
+ label?: string,
1010
+ /**
1011
+ * Nests this group inside another group of the same dimension, so membership here implies membership there: a group
1012
+ * covers its own members and those of every group below it, and a parent does not list them again. An overlay
1013
+ * therefore draws a sub-zone inside its zone.
1014
+ */
1015
+ parent?: string, members?: Array<string>, };
1016
+
1017
+ /**
1018
+ * Provisional (ADR 0022 §5b): a dimension to remove, or with `group` one group of it (and the groups nested in it).
1019
+ */
1020
+ export type MembershipRemoval = { dimension: string, group?: string, };
1021
+
1022
+ /**
1023
+ * Provisional (ADR 0022): the membership dimensions of a graph. A node has one container (`Node::parent_id`); a
1024
+ * membership says that it also belongs to a zone, a team or a layer, and several of those at once. Memberships are
1025
+ * authored domain data, like `Graph::buses`: the engine never derives them, and they never change the containment tree.
1026
+ * How a dimension is shown is a view option (`LayoutOptions::grouping_priority`), not data. Omitted when empty, so a
1027
+ * graph without memberships serializes exactly as before.
1028
+ */
1029
+ export type Memberships = {
1030
+ /**
1031
+ * The dimensions in the order they are declared, which is the order everything derived uses.
1032
+ */
1033
+ dimensions?: Array<MembershipDimension>, };
1034
+
799
1035
  export type Metrics = { version: number, nodes: number, edges: number, width: number, height: number, area: number,
800
1036
  /**
801
1037
  * Overlapping node pairs under the same parent.
@@ -874,6 +1110,60 @@ export type Node = { id: string, kind: string, label: string, parentId: string |
874
1110
  */
875
1111
  shape?: NodeShape, };
876
1112
 
1113
+ /**
1114
+ * Provisional: a node of the source graph in the current view (`details`).
1115
+ */
1116
+ export type NodeDetails = { id: string, kind: string, label: string,
1117
+ /**
1118
+ * The containers above it, outermost first.
1119
+ */
1120
+ parents: Array<string>,
1121
+ /**
1122
+ * The visible box that shows it: itself, the collapsed container it is in, or null when the view hides it (a filter,
1123
+ * outside the view).
1124
+ */
1125
+ shownAs: string | null,
1126
+ /**
1127
+ * That box's bounds in the scene's (absolute) coordinates, or null.
1128
+ */
1129
+ bounds: { x: number, y: number, width: number, height: number } | null, collapsed: boolean,
1130
+ /**
1131
+ * Its direct children and all nodes inside it, in the source graph.
1132
+ */
1133
+ children: number, descendants: number,
1134
+ /**
1135
+ * Edges of the source graph that end and start at the node itself (a self-loop counts in both).
1136
+ */
1137
+ incoming: number, outgoing: number,
1138
+ /**
1139
+ * Provisional (ADR 0023, R1): the node's properties from the session's content; omitted when it has none.
1140
+ */
1141
+ properties?: Record<string, unknown>,
1142
+ /**
1143
+ * Provisional (ADR 0022 §7): the node's groups per criterion of a non-default `groupingPriority`, in the order of
1144
+ * the ranks: the one that owns it (`owner`) and those that hold it softly. Kept apart from `parents`, which is the
1145
+ * containment of the source. Omitted when empty — always under the default priority — so a typed host built before
1146
+ * it keeps deserializing the answer.
1147
+ */
1148
+ groupings?: Array<NodeGrouping>, };
1149
+
1150
+ /**
1151
+ * Provisional (ADR 0022 §7): one group of a node under one criterion of the grouping priority (`NodeDetails::groupings`).
1152
+ */
1153
+ export type NodeGrouping = {
1154
+ /**
1155
+ * The criterion: `parent` or a dimension id.
1156
+ */
1157
+ by: string,
1158
+ /**
1159
+ * The group: a container id for `parent`, a group id for a dimension.
1160
+ */
1161
+ group: string,
1162
+ /**
1163
+ * Whether this group owns the node in the view (its container), rather than holding it softly.
1164
+ */
1165
+ owner: boolean, };
1166
+
877
1167
  /**
878
1168
  * The outline of a leaf node (docs/...: step 1 of the shape support). Containers use the same names later.
879
1169
  */
@@ -952,7 +1242,20 @@ edges: number[],
952
1242
  /**
953
1243
  * Per container, the links between its children: child, child, number of edges (flat triples).
954
1244
  */
955
- links: Array<number>, stats: OverviewStats, };
1245
+ links: Array<number>,
1246
+ /**
1247
+ * Provisional: every node of shape `busLine` as a line instead of a disc (a viewer draws the line and its taps, not
1248
+ * the node's disc). Omitted when there is none.
1249
+ */
1250
+ busLines?: Array<OverviewBusLine>, stats: OverviewStats, };
1251
+
1252
+ /**
1253
+ * Provisional: a bus of the overview drawn as a line (`Overview::bus_lines`): the bus node's index, the line from
1254
+ * (`x1`, `y1`) to (`x2`, `y2`), horizontal or vertical (whichever its members spread more along), and per member (`taps`,
1255
+ * node indices) the point of the line its tap meets (`feet`, x and y alternating): straight across from the member, or
1256
+ * the line's end for a member beyond it.
1257
+ */
1258
+ export type OverviewBusLine = { node: number, x1: number, y1: number, x2: number, y2: number, taps: Array<number>, feet: Array<number>, };
956
1259
 
957
1260
  /**
958
1261
  * Provisional (ADR 0018, addendum): the rules of the data for the cluster overview, the second step of the order
@@ -1007,6 +1310,10 @@ satellites?: number,
1007
1310
  * Chains of single children share one disc (false).
1008
1311
  */
1009
1312
  chains?: boolean,
1313
+ /**
1314
+ * Provisional: the members of every bus line (node shape `busLine`) in a row on its line, after the forces (false).
1315
+ */
1316
+ busRows?: boolean,
1010
1317
  /**
1011
1318
  * Force steps per container (1..=10000).
1012
1319
  */
@@ -1029,7 +1336,11 @@ export type OverviewPositions = { schemaVersion: number,
1029
1336
  /**
1030
1337
  * Always true: tells this answer from a whole `Overview`.
1031
1338
  */
1032
- positionsOnly: boolean, representation: OverviewRepresentation, x: Array<number>, y: Array<number>, r: Array<number>, rootRadius: number, stats: OverviewStats, };
1339
+ positionsOnly: boolean, representation: OverviewRepresentation, x: Array<number>, y: Array<number>, r: Array<number>, rootRadius: number,
1340
+ /**
1341
+ * The bus lines move with the nodes (`Overview::bus_lines`). Omitted when there is none.
1342
+ */
1343
+ busLines?: Array<OverviewBusLine>, stats: OverviewStats, };
1033
1344
 
1034
1345
  /**
1035
1346
  * Provisional (ADR 0018, addendum): the representation values of an overview request, as the engine checked them.
@@ -1271,6 +1582,21 @@ junctions?: Array<Point>,
1271
1582
  * its taps, one per edge of the bus, in the edge's direction. Omitted when there is none.
1272
1583
  */
1273
1584
  busLines?: Array<SceneBusLine>,
1585
+ /**
1586
+ * Provisional (`hubRefs`): edges of hubs drawn as stubs at their other end, named after the hub. Omitted when none.
1587
+ */
1588
+ hubRefs?: Array<SceneHubRef>,
1589
+ /**
1590
+ * Provisional (ADR 0022, the soft criteria of `groupingPriority`): a hull per membership group, to be drawn behind the
1591
+ * nodes. In the declared order of the dimensions and of their groups. Omitted when there is none, so every drawing
1592
+ * without the option is unchanged.
1593
+ */
1594
+ membershipHulls?: Array<SceneHull>,
1595
+ /**
1596
+ * Provisional (ADR 0022 §5): one entry per dimension the options name, with its counts and one summary line.
1597
+ * Omitted when there is none.
1598
+ */
1599
+ membershipReport?: Array<SceneMembershipReport>,
1274
1600
  /**
1275
1601
  * Extent of everything drawn, with a 30-unit margin. May start at negative coordinates.
1276
1602
  */
@@ -1295,6 +1621,84 @@ kind: string,
1295
1621
  */
1296
1622
  nodes: Array<string>, routes: Array<string>, reason: string, };
1297
1623
 
1624
+ /**
1625
+ * Provisional: an edge drawn as a reference to a hub (`Scene::hub_refs`): a short stub at `node` (out of its right side for
1626
+ * 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
1627
+ * `label` beside the stub's free end.
1628
+ */
1629
+ export type SceneHubRef = { edge: string, node: string, hub: string, outgoing: boolean, text: string, points: Array<Point>, label: Rect, };
1630
+
1631
+ /**
1632
+ * Provisional (ADR 0022, first slice): the hull of one membership group, drawn behind the nodes. `points` is a closed
1633
+ * polygon (the last point joins the first) and is empty for no group: a group whose members the view does not show is
1634
+ * left out instead. The hull is **not an obstacle**: the router never saw it, and routes may cross it.
1635
+ */
1636
+ export type SceneHull = {
1637
+ /**
1638
+ * The dimension this group belongs to, and its label for a legend.
1639
+ */
1640
+ dimension: string, dimensionLabel: string, group: string,
1641
+ /**
1642
+ * What to write on the hull: the group's label, or its id where it has none.
1643
+ */
1644
+ label: string, points: Array<Point>,
1645
+ /**
1646
+ * The boxes the hull was built from: a member's own box, or the box that stands for it (a collapsed container).
1647
+ */
1648
+ boxes: Array<string>,
1649
+ /**
1650
+ * Leaf boxes inside the hull that are not members of the group. The honest cost of drawing a hull around nodes the
1651
+ * layout kept apart, and one of the two numbers a later default depends on (ADR 0022 §6).
1652
+ */
1653
+ intruders: Array<string>, };
1654
+
1655
+ /**
1656
+ * Provisional (ADR 0022 §5): what one membership dimension did in this drawing. Typed, because one line of text per
1657
+ * group would be thousands of lines on a real graph; `summary` is the single line a host can simply print.
1658
+ */
1659
+ export type SceneMembershipReport = { dimension: string,
1660
+ /**
1661
+ * The mode the options asked for (`overlay`, `hierarchy`, `lanes`).
1662
+ */
1663
+ mode: string,
1664
+ /**
1665
+ * Whether this drawing applied it. `hierarchy` and `lanes` are accepted and not yet applied (ADR 0022, M1 and M4).
1666
+ */
1667
+ applied: boolean,
1668
+ /**
1669
+ * Groups the dimension declares, and how many of them were drawn.
1670
+ */
1671
+ groups: number, drawn: number,
1672
+ /**
1673
+ * Leaf boxes inside a hull they do not belong to, summed over the dimension's groups.
1674
+ */
1675
+ intruders: number,
1676
+ /**
1677
+ * Pairs of this dimension's hulls that overlap. Hulls of *different* dimensions are expected to overlap — that is
1678
+ * what cutting across each other means — so only pairs within one dimension are counted.
1679
+ */
1680
+ overlappingPairs: number,
1681
+ /**
1682
+ * Member ids the source graph does not have. Information, not a conflict (ADR 0022 §1).
1683
+ */
1684
+ unknownMembers: number,
1685
+ /**
1686
+ * Members the view does not show and for which no box stands in (filtered out, or outside the view).
1687
+ */
1688
+ hiddenMembers: number,
1689
+ /**
1690
+ * Nodes this criterion owns: it is the first that assigns them (ADR 0022 §2, rule 1).
1691
+ */
1692
+ owned: number,
1693
+ /**
1694
+ * Of those, the nodes in several of its groups that are not one path: the value order chose (rule 2).
1695
+ */
1696
+ multipleOwners: number,
1697
+ /**
1698
+ * Nodes no listed criterion assigns (rule 3), placed at the root. Counted on the first criterion's entry only.
1699
+ */
1700
+ unassigned: number, summary: string, };
1701
+
1298
1702
  export type SceneNode = {
1299
1703
  /**
1300
1704
  * Absolute bounds in scene coordinates.
@@ -1303,7 +1707,17 @@ bounds: Rect, container: boolean, aggregate: boolean, collapsed: boolean, invali
1303
1707
  /**
1304
1708
  * The rows of the node's content, top to bottom (empty for a node without rows).
1305
1709
  */
1306
- rows?: Array<SceneRow>, id: string, kind: string, label: string, parentId: string | null,
1710
+ rows?: Array<SceneRow>,
1711
+ /**
1712
+ * Provisional: for a container, how many children it holds in the view (the communities and groups it adds count
1713
+ * as children; a partly shown container counts the children in its rest too). Omitted for a leaf.
1714
+ */
1715
+ childCount?: number,
1716
+ /**
1717
+ * Provisional: of those, how many are not drawn: all of them for a collapsed container, those in its rest (`+N more`)
1718
+ * for a partly shown one. Omitted when every child is drawn.
1719
+ */
1720
+ hiddenCount?: number, id: string, kind: string, label: string, parentId: string | null,
1307
1721
  /**
1308
1722
  * The outline of the node. `rect` (the default, omitted) uses its size as it is; `square` and `circle` use the larger
1309
1723
  * of its two sizes on both axes. Collision and routing still use the bounding rectangle in this version.
@@ -1355,6 +1769,11 @@ export type Settle = { steps: number, residual: number, converged: boolean,
1355
1769
  */
1356
1770
  round?: number, };
1357
1771
 
1772
+ /**
1773
+ * Provisional: which edges share a track in a channel (`LayoutOptions::shared_tracks`).
1774
+ */
1775
+ export type SharedTracks = "target";
1776
+
1358
1777
  /**
1359
1778
  * A pinned node size, in world units.
1360
1779
  */
@@ -1420,6 +1839,11 @@ busLines?: { [key in string]: BusLine },
1420
1839
  * Omitted when empty.
1421
1840
  */
1422
1841
  busTaps?: BusTapLayout,
1842
+ /**
1843
+ * Provisional (`hubRefs`): the edges of the view that were not laid out because one end is a hub, each drawn as a stub
1844
+ * at its other end (`node`) named after the hub. Omitted when empty.
1845
+ */
1846
+ hubRefs?: Array<HubRef>,
1423
1847
  /**
1424
1848
  * The move gesture in progress or the last one finished, for sequence checks. Omitted when there was none.
1425
1849
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arqlet/contracts",
3
- "version": "0.6.0",
3
+ "version": "0.8.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",