@arqlet/contracts 0.4.0 → 0.6.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 +295 -7
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -47,7 +47,51 @@ 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
+ taps?: Array<BusTap>,
57
+ /**
58
+ * Provisional: with `taps`, the bus node's kind and parent in the source graph. Omitted when unset.
59
+ */
60
+ kind?: string, parentId?: string, };
61
+
62
+ /**
63
+ * Provisional: where a bus line is drawn (`Snapshot::bus_lines`), in absolute coordinates as the routes are: its bar, and
64
+ * the points of every tap by edge id, in the edge's own direction.
65
+ */
66
+ export type BusLine = { bar: Rect, taps: { [key in string]: Array<Point> }, };
67
+
68
+ /**
69
+ * Provisional: how a bus kept as a node of shape `busLine` is drawn (`LayoutOptions::bus_style`).
70
+ */
71
+ export type BusStyle = "bar" | "trunk";
72
+
73
+ /**
74
+ * Provisional: one edge of a bus line (`Bus::taps`): the edge, the node at its other end, whether the edge runs from that
75
+ * node to the bus (`toBus`) or from the bus to it, and the edge's kind.
76
+ */
77
+ export type BusTap = { edge: string, node: string, toBus: boolean, kind: string, };
78
+
79
+ /**
80
+ * Provisional: the layout state of the taps of the bus lines (`Snapshot::bus_taps`).
81
+ */
82
+ export type BusTapLayout = { routes?: Array<Route>, resolvedPorts?: Array<ResolvedPort>, boundaryCrossings?: Array<BoundaryCrossing>,
83
+ /**
84
+ * The root of every bus network of the layout (one per network), kept so that the next layout of the same networks
85
+ * (a toggle, an edit) grows its trees from the same roots.
86
+ */
87
+ roots?: Array<string>, };
88
+
89
+ /**
90
+ * Provisional: the children that `communities` leaves out of Louvain, so that one hub does not pull a whole container
91
+ * 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.
93
+ */
94
+ export type CommunityHubs = { minLinks?: number, nodes?: Array<string>, };
51
95
 
52
96
  export type ConfigSet = { schemaVersion: number, id: string, layout: LayoutConfig, routing: RoutingConfig,
53
97
  /**
@@ -193,12 +237,34 @@ defaultRouting?: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" |
193
237
  */
194
238
  buses?: Array<Bus>, };
195
239
 
240
+ /**
241
+ * Provisional: the nodes within some hops of nodes of a graph (`overviewNeighbourhood`), without a view.
242
+ */
243
+ export type GraphNeighbourhood = { nodes: Array<string>, edges: Array<string>, hops: { [key in string]: number }, };
244
+
245
+ /**
246
+ * Provisional: a change of the source graph of a view (`patch`): nodes and edges to add, and nodes (each with what it
247
+ * holds and its edges) and edges to remove. Removals apply first.
248
+ */
249
+ export type GraphPatch = { nodes?: Array<Node>, edges?: Array<Edge>, removeNodes?: Array<string>, removeEdges?: Array<string>, };
250
+
251
+ /**
252
+ * Provisional: the paths between two nodes of a graph (`overviewTrace`), without a view: the overview's viewer maps them
253
+ * to its discs. `reversed`: no path from `from` to `to`, the paths are those back; `length` is null without a path.
254
+ */
255
+ export type GraphTrace = { found: boolean, reversed: boolean, length: number | null, nodes: Array<string>, edges: Array<string>, };
256
+
196
257
  /**
197
258
  * What a view hides (provisional, view state set by the `filter` operation): nodes of these kinds, these nodes (each with
198
259
  * everything below it) and edges of these kinds. The layout keeps their room, so what stays keeps its place; the scene
199
260
  * leaves them out, and an edge that stands for collapsed content counts only the edges still shown.
200
261
  */
201
- export type Hidden = { nodeKinds?: Array<string>, nodes?: Array<string>, edgeKinds?: Array<string>, };
262
+ export type Hidden = { nodeKinds?: Array<string>, nodes?: Array<string>, edgeKinds?: Array<string>,
263
+ /**
264
+ * Lay the view out again without what is hidden, so that the rest closes up (positions change); off: the hidden keep
265
+ * their room and nothing else moves. Omitted when off.
266
+ */
267
+ compact?: boolean, };
202
268
 
203
269
  export type HybridCriterion = "compact" | "endToEnd";
204
270
 
@@ -326,6 +392,29 @@ strictClearance?: boolean,
326
392
  * decides between them. Omitted when off, so the default output does not change.
327
393
  */
328
394
  componentPacking?: boolean,
395
+ /**
396
+ * Experimental: the weakly connected components of a container's children (a lone child is one) keep their own
397
+ * arrangement and are packed as boxes in rows towards an aspect ratio (`aspect`, width over height, default 1),
398
+ * largest first, instead of all sharing the ranks of one long drawing. Orders the components in blocks as
399
+ * `component_packing` does. Not for circle containers, containers with a pinned child, or flattened areas. Omitted
400
+ * when off, so the default output does not change.
401
+ */
402
+ packComponents?: PackComponents,
403
+ /**
404
+ * In a container across its parent's flow, the border nodes of edges that cross it share the first or last rank with
405
+ * the side nodes of edges that enter or leave on its sides, when that rank holds only side nodes, instead of opening a
406
+ * rank of their own (which left a rank of one long-edge dummy before the first child). On by default since 0.6.0;
407
+ * written as `false` when turned off.
408
+ */
409
+ sharedBorderRanks?: boolean,
410
+ /**
411
+ * An edge between two containers of adjacent ranks that is the upper one's only edge toward the next rank and the lower
412
+ * one's only edge from the previous rank (a stack of containers, such as the subnets of a zone) forms a block of the
413
+ * placement across the flow with priority, at its ports as the containers' own plans place them: the two containers
414
+ * stand so that the edge runs straight, before the median alignment and with crossing segments giving way, as for
415
+ * segments between dummies. On by default since 0.6.0; written as `false` when turned off.
416
+ */
417
+ alignStacked?: boolean,
329
418
  /**
330
419
  * Experimental: the children of a layered area that have no edge to another child (a file of unrelated functions)
331
420
  * are spread over the ranks as a grid instead of all standing in the first rank, one long column. They fill the
@@ -333,6 +422,69 @@ componentPacking?: boolean,
333
422
  * Omitted when off, so the default output does not change.
334
423
  */
335
424
  isolatedGrid?: boolean,
425
+ /**
426
+ * Provisional: `isolatedGrid` only in the areas with at least this many children that have no edge to another child
427
+ * 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.
429
+ */
430
+ isolatedGridFrom?: number | null,
431
+ /**
432
+ * 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
+ * own with one tap per edge; `trunk` no rank and no bar, one shared line from the bus's head (its member nearest the
434
+ * root of the bus tree) to every other member, drawn as an explicit bus (ADR 0005). Omitted when `bar`.
435
+ */
436
+ busStyle?: BusStyle,
437
+ /**
438
+ * 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
439
+ * with the positive flow, where single pass runs, and mirrored area by area (a container keeps its header at its
440
+ * top); logical edge direction is kept. Not for graphs with pins, label places, explicit ports or buses. On by default
441
+ * since engine 0.5 (S1-4, accepted by measurement); written as `false` when turned off.
442
+ */
443
+ singlePassReversed?: boolean,
444
+ /**
445
+ * ADR 0020, S1-1b: a straight edge that would pass through a node it does not end at is drawn around it instead: its
446
+ * orthogonal route pulled taut around every node it does not end at or lie in, so it stays one segment where nothing
447
+ * is in the way and bends at the blockers' corners elsewhere. On by default since 0.5.0 (S1-4); written as
448
+ * `false` when turned off.
449
+ */
450
+ straightDetours?: boolean,
451
+ /**
452
+ * ADR 0020, S1-2: an edge that leaves a region of another strategy (organic, tree, radial) in a layered parent is
453
+ * routed by the parent to a port on the region's border, on the side its flow uses, and drawn inside the region from
454
+ * that port to its node by the region's routing. Not for graphs with buses or explicit edge ports. On by default since
455
+ * engine 0.5 (S1-4); written as `false` when turned off.
456
+ */
457
+ regionPorts?: boolean,
458
+ /**
459
+ * Experimental (ADR 0020, S1-3): a container with a fixed flow inside an organic or radial area gets border nodes in
460
+ * 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
461
+ * and leave it there, and the area draws them straight from that point. Omitted when off, so the default output does
462
+ * not change.
463
+ */
464
+ regionChildPorts?: boolean,
465
+ /**
466
+ * Single pass: every channel between two ranks is as wide as its tracks need (at least the margin on both sides and a
467
+ * track), narrower than the layer gap where it carries few tracks; the order and the places across the flow are chosen
468
+ * on the layer gap as before. Only in areas with a fixed flow along their parent's axis below fixed flows. On by
469
+ * default since engine 0.5 (no change in crossings or bends on any measured dataset, less area); written as `false`
470
+ * when turned off.
471
+ */
472
+ channelsByDemand?: boolean,
473
+ /**
474
+ * With `straightDetours`, the geometric repair of an organic area that cannot clear every straight line within a
475
+ * bounded budget clears the lines between children of organic areas first and those into its containers within a
476
+ * bounded budget of their own; their detours draw what remains around the nodes in its way. A repair that finishes
477
+ * within the bounded budget is as without the option. On by default since 0.5.0; written as `false` when
478
+ * turned off.
479
+ */
480
+ nestedEdgesByDetour?: boolean,
481
+ /**
482
+ * Experimental: free directions (`auto`) are laid out with their orientations fixed — every free area left to right,
483
+ * and every free area top to bottom — so that single pass constructs the edges between areas (ADR 0017) instead of
484
+ * delegating them, and the drawing with the best published key wins. The snapshot keeps the free directions and the
485
+ * chosen orientations. Omitted when off, so the default output does not change.
486
+ */
487
+ directionsFirst?: boolean,
336
488
  /**
337
489
  * How edges are drawn: orthogonal routes (the default, omitted) or straight segments between the port positions.
338
490
  * Straight routing never bends: an edge that would cross a foreign node is reported as a routing issue.
@@ -357,6 +509,21 @@ vpscOverlapRemoval?: boolean,
357
509
  * Experimental conflict-directed organic repair, with the exhaustive search as a fallback. Off by default.
358
510
  */
359
511
  directedRepair?: boolean,
512
+ /**
513
+ * A fresh organic placement continues after the stress with forces in the manner of d3-force (springs one node spacing
514
+ * long between where the edges end, many-body repulsion, box collision, a push off the straight edges, and a pull
515
+ * toward the centroid), which closes the gaps the stress leaves and leaves the repair little to resolve. Taken per area
516
+ * only where the straight edges cross no more often and pass through no more boxes; a drawing that keeps a geometry
517
+ * issue is laid out again without the forces. A node's loops take a corner where no neighbour lies. On by default
518
+ * since 0.6.0; written as `false` when turned off.
519
+ */
520
+ organicForces?: boolean,
521
+ /**
522
+ * The loops of a node take the corner of the node where no other box lies in their way (then the corner whose sides
523
+ * carry the fewest other edges, as before); the loops take no part in the placement, and a blocked corner made the
524
+ * router take them around the neighbour, with bends. On by default since 0.6.0; written as `false` when turned off.
525
+ */
526
+ loopSpace?: boolean,
360
527
  /**
361
528
  * Experimental bounded repulsion from projected edge chords at the end of organic stress. Off by default.
362
529
  */
@@ -442,10 +609,21 @@ groups?: { [key in string]: Array<string> },
442
609
  * containers that `communities` and `groups` add, which start collapsed.
443
610
  */
444
611
  levelOfDetail?: LevelOfDetail | null,
612
+ /**
613
+ * Provisional: an edge between nodes in different containers is drawn between the outermost containers its ends
614
+ * differ in, and those of one pair of containers as one route with their weights (as between collapsed containers);
615
+ * 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).
617
+ */
618
+ liftEdges?: boolean,
445
619
  /**
446
620
  * Provisional (view state, set by `filter`): what the view hides, keeping the place of the rest. Omitted when empty.
447
621
  */
448
622
  hidden?: Hidden,
623
+ /**
624
+ * Provisional: the children `communities` leaves out of Louvain (hubs). Omitted when empty.
625
+ */
626
+ communityHubs?: CommunityHubs,
449
627
  /**
450
628
  * Provisional (view state, set by `reveal`): containers shown in part. The children listed for a container are shown;
451
629
  * the others are gathered in a collapsed container `rest:<id>` of kind `rest` ("+N more"), which a `toggle` dissolves.
@@ -522,6 +700,13 @@ layerSpacing?: number | null,
522
700
  * default (omitted), so default drawings do not change.
523
701
  */
524
702
  portSides?: boolean,
703
+ /**
704
+ * Provisional: the constructed layered routes search their lanes across the flow only near their ends (as far across as
705
+ * the edge reaches along the flow, at least 16 tracks), and over the whole width only when they find no way there. A
706
+ * search over the whole width costs time quadratic in the number of boxes across the drawing. Off by default (omitted),
707
+ * so default drawings do not change.
708
+ */
709
+ routeSearchWindow?: boolean,
525
710
  /**
526
711
  * Provisional (single pass): areas without a fixed flow (organic, tree, radial) and straight routing are allowed in a
527
712
  * single-pass layout. Those areas keep their own placement and their edges go to the router that completes single pass;
@@ -592,7 +777,18 @@ depth?: number | null,
592
777
  /**
593
778
  * Containers of these kinds.
594
779
  */
595
- kinds?: Array<string>, };
780
+ kinds?: Array<string>,
781
+ /**
782
+ * Provisional (layered view only): the most nodes the first view shows (leaves and collapsed containers; an open
783
+ * container is a frame and does not count). The containers start collapsed and are opened level by level, the
784
+ * outermost first, while the view stays within `nodes` and `edges`; those `depth` and `kinds` name stay collapsed.
785
+ */
786
+ nodes?: number | null,
787
+ /**
788
+ * Provisional (layered view only): the most edges the first view draws, counted as the view draws them (one edge for
789
+ * each pair of ends a collapsed container joins, none inside one). See `nodes`.
790
+ */
791
+ edges?: number | null, };
596
792
 
597
793
  /**
598
794
  * A geometry observation for one element: the realized outline and the revision of the measurement. The revision rises with
@@ -665,6 +861,12 @@ touches: number,
665
861
  */
666
862
  bends: number, bendsMax: number, bendsMean: number, length: number, lengthMean: number, lengthMax: number, };
667
863
 
864
+ /**
865
+ * Provisional: the answer of `neighbourhood` (besides `ok`): the nodes within some hops of nodes, the edges they were
866
+ * reached by, each node's hops, and what of them the view shows (as for `trace`).
867
+ */
868
+ export type NeighbourhoodAnswer = { nodes: Array<string>, edges: Array<string>, hops: { [key in string]: number }, visible: VisibleParts, distance: { [key in string]: number }, };
869
+
668
870
  export type Node = { id: string, kind: string, label: string, parentId: string | null,
669
871
  /**
670
872
  * The outline of the node. `rect` (the default, omitted) uses its size as it is; `square` and `circle` use the larger
@@ -675,7 +877,7 @@ shape?: NodeShape, };
675
877
  /**
676
878
  * The outline of a leaf node (docs/...: step 1 of the shape support). Containers use the same names later.
677
879
  */
678
- export type NodeShape = "rect" | "square" | "circle";
880
+ export type NodeShape = "rect" | "square" | "circle" | "busLine";
679
881
 
680
882
  export type NodeSize = { width: number, height: number, };
681
883
 
@@ -812,7 +1014,22 @@ ticks?: number,
812
1014
  /**
813
1015
  * Groups the data gives: node id → path of group names.
814
1016
  */
815
- groups?: { [key in string]: Array<string> }, };
1017
+ groups?: { [key in string]: Array<string> },
1018
+ /**
1019
+ * Children left out of Louvain (hubs), as `LayoutOptions::community_hubs`.
1020
+ */
1021
+ hubs?: CommunityHubs, };
1022
+
1023
+ /**
1024
+ * Provisional (sessions): the part of an overview that changes while the clusters stay the same, answered for a request
1025
+ * with `positionsOnly` laid out on the clusters of the session's last overview. The host keeps ids, labels, parents,
1026
+ * kinds, edges and links from that answer.
1027
+ */
1028
+ export type OverviewPositions = { schemaVersion: number,
1029
+ /**
1030
+ * Always true: tells this answer from a whole `Overview`.
1031
+ */
1032
+ positionsOnly: boolean, representation: OverviewRepresentation, x: Array<number>, y: Array<number>, r: Array<number>, rootRadius: number, stats: OverviewStats, };
816
1033
 
817
1034
  /**
818
1035
  * Provisional (ADR 0018, addendum): the representation values of an overview request, as the engine checked them.
@@ -844,6 +1061,11 @@ export type OverviewRequest = { graph?: Graph, options?: OverviewLayoutOptions,
844
1061
  * Radii by node id, for clusters a host shows structured.
845
1062
  */
846
1063
  radii?: { [key in string]: number }, start?: OverviewStart,
1064
+ /**
1065
+ * Provisional (sessions): answer only what moves (`OverviewPositions`) when the clusters are those of the session's
1066
+ * last overview; otherwise the whole overview.
1067
+ */
1068
+ positionsOnly?: boolean,
847
1069
  /**
848
1070
  * Worker threads (native only); the answer is the same for any number.
849
1071
  */
@@ -860,6 +1082,15 @@ export type OverviewStart = { x?: Array<number>, y?: Array<number>, r?: Array<nu
860
1082
  */
861
1083
  export type OverviewStats = { nodes: number, containers: number, communities: number, levels: number, edges: number, unresolvedEdges: number, overlaps: number, };
862
1084
 
1085
+ /**
1086
+ * Experimental (`LayoutOptions::pack_components`): how the components of a container are packed.
1087
+ */
1088
+ export type PackComponents = {
1089
+ /**
1090
+ * The width over the height the packed components aim at (default 1: square).
1091
+ */
1092
+ aspect?: number, };
1093
+
863
1094
  export type PlacedLabel = { id: string, kind: string, text: string, bounds: Rect, };
864
1095
 
865
1096
  export type Point = { x: number, y: number, };
@@ -1035,11 +1266,21 @@ buses?: Array<Array<string>>,
1035
1266
  * them as junction dots. Omitted when there is none.
1036
1267
  */
1037
1268
  junctions?: Array<Point>,
1269
+ /**
1270
+ * Provisional: the bus lines of the view (a bus kept as a node of shape `busLine` in the source graph): each a bar with
1271
+ * its taps, one per edge of the bus, in the edge's direction. Omitted when there is none.
1272
+ */
1273
+ busLines?: Array<SceneBusLine>,
1038
1274
  /**
1039
1275
  * Extent of everything drawn, with a 30-unit margin. May start at negative coordinates.
1040
1276
  */
1041
1277
  bounds: Rect, };
1042
1278
 
1279
+ /**
1280
+ * Provisional: one bus line of a scene (`Scene::bus_lines`).
1281
+ */
1282
+ export type SceneBusLine = { id: string, label: string, kind: string, bounds: Rect, taps: Array<SceneTap>, };
1283
+
1043
1284
  /**
1044
1285
  * One conflict of the drawing. A renderer marks every node and route it names and shows `reason` for them.
1045
1286
  */
@@ -1099,10 +1340,20 @@ members?: Array<string>, };
1099
1340
  */
1100
1341
  export type SceneRow = { id: string, label: string, bounds: Rect, };
1101
1342
 
1343
+ /**
1344
+ * Provisional: one tap of a bus line: the edge it stands for, the node it attaches, and its points.
1345
+ */
1346
+ export type SceneTap = { edge: string, node: string, points: Array<Point>, };
1347
+
1102
1348
  /**
1103
1349
  * The outcome of the settling steps after a drag (see `EditReport::settle`).
1104
1350
  */
1105
- export type Settle = { steps: number, residual: number, converged: boolean, };
1351
+ export type Settle = { steps: number, residual: number, converged: boolean,
1352
+ /**
1353
+ * The calls of one settling so far (0 for the first): each takes a smaller step than the one before, so that the
1354
+ * settling converges. Counted on from the report of the snapshot a call continues. Omitted when 0.
1355
+ */
1356
+ round?: number, };
1106
1357
 
1107
1358
  /**
1108
1359
  * A pinned node size, in world units.
@@ -1138,7 +1389,17 @@ areaStrategies?: { [key in string]: LayoutStrategy },
1138
1389
  /**
1139
1390
  * Structured counterpart of the routing diagnostics that name a passed-through node.
1140
1391
  */
1141
- routeConflicts?: Array<RouteConflict>, schemaVersion: number, engineVersion: string, revision: number, layoutVersion: number, baseRevision: number | null, options?: LayoutOptions, graph: Graph, sourceGraph: Graph | 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>,
1392
+ routeConflicts?: Array<RouteConflict>, schemaVersion: number, engineVersion: string, revision: number, layoutVersion: number, baseRevision: number | null, options?: LayoutOptions, graph: Graph,
1393
+ /**
1394
+ * The whole graph a view was taken from (shared, not copied: snapshots of one view, and a session's requests, hold the
1395
+ * same graph; it is replaced, never changed in place).
1396
+ */
1397
+ sourceGraph: Graph | null,
1398
+ /**
1399
+ * Provisional (ADR 0019): set when the source graph was left out of this snapshot (`omitSource`); the fingerprint of
1400
+ * that graph (`source_digest`). A request on such a snapshot brings the graph as `source`, and it must match.
1401
+ */
1402
+ 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>,
1142
1403
  /**
1143
1404
  * The edges drawn as straight segments (the others are orthogonal). Empty when every edge is orthogonal.
1144
1405
  */
@@ -1149,6 +1410,16 @@ straightEdges?: Array<string>,
1149
1410
  * graph has none.
1150
1411
  */
1151
1412
  busBoxes?: { [key in string]: Rect },
1413
+ /**
1414
+ * Provisional: every bus line of the view (`Bus::taps`), by bus id: its bar and its taps. Omitted when empty.
1415
+ */
1416
+ busLines?: { [key in string]: BusLine },
1417
+ /**
1418
+ * Provisional: the layout state of the bus lines' taps (their routes, ports and border crossings, as the layout left
1419
+ * them), kept apart from the view's, so that an operation can continue the layout of the graph with the bus nodes.
1420
+ * Omitted when empty.
1421
+ */
1422
+ busTaps?: BusTapLayout,
1152
1423
  /**
1153
1424
  * The move gesture in progress or the last one finished, for sequence checks. Omitted when there was none.
1154
1425
  */
@@ -1220,7 +1491,24 @@ export type StoredChain = { source: string, target: string, dummies?: Array<stri
1220
1491
  */
1221
1492
  export type StoredLink = { source: string, target: string, };
1222
1493
 
1494
+ /**
1495
+ * Provisional: the answer of `trace` (besides `ok`): the nodes and edges on the paths between two nodes of the source
1496
+ * graph, and what of them the view shows. `reversed`: no path from `from` to `to`, the paths are those back; `length`
1497
+ * is null without a path.
1498
+ */
1499
+ export type TraceAnswer = { found: boolean, reversed: boolean, length: number | null, nodes: Array<string>, edges: Array<string>, visible: VisibleParts,
1500
+ /**
1501
+ * Hops of every visible node from the path through the drawn edges (for fading); unreachable nodes are left out.
1502
+ */
1503
+ distance: { [key in string]: number }, };
1504
+
1223
1505
  /**
1224
1506
  * Metrics of the curated geometry, computed by the shared validator.
1225
1507
  */
1226
1508
  export type ValidationRecord = { metrics: Metrics, };
1509
+
1510
+ /**
1511
+ * Provisional: what of some source-graph nodes and edges the current view shows (`trace`, `neighbourhood`): the visible
1512
+ * boxes that hold the nodes, and the routes that carry the edges.
1513
+ */
1514
+ 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.4.0",
3
+ "version": "0.6.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",