@arqlet/contracts 0.6.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 +108 -9
- 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
|
-
*
|
|
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,
|
|
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
|
/**
|
|
@@ -266,6 +276,12 @@ export type Hidden = { nodeKinds?: Array<string>, nodes?: Array<string>, edgeKin
|
|
|
266
276
|
*/
|
|
267
277
|
compact?: boolean, };
|
|
268
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
|
+
|
|
269
285
|
export type HybridCriterion = "compact" | "endToEnd";
|
|
270
286
|
|
|
271
287
|
export type Integrity = {
|
|
@@ -296,7 +312,12 @@ labelPositions: { [key in string]: Point },
|
|
|
296
312
|
/**
|
|
297
313
|
* The orders the user chose by a drag.
|
|
298
314
|
*/
|
|
299
|
-
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> }, };
|
|
300
321
|
|
|
301
322
|
/**
|
|
302
323
|
* Measured text rectangle. Hosts may supply exact font measurements.
|
|
@@ -425,9 +446,27 @@ isolatedGrid?: boolean,
|
|
|
425
446
|
/**
|
|
426
447
|
* Provisional: `isolatedGrid` only in the areas with at least this many children that have no edge to another child
|
|
427
448
|
* of the area (a container opened with hundreds of unlinked members would stand as one long column). `None` (the
|
|
428
|
-
* default, omitted):
|
|
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`).
|
|
429
451
|
*/
|
|
430
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,
|
|
431
470
|
/**
|
|
432
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
|
|
433
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
|
|
@@ -613,7 +652,9 @@ levelOfDetail?: LevelOfDetail | null,
|
|
|
613
652
|
* Provisional: an edge between nodes in different containers is drawn between the outermost containers its ends
|
|
614
653
|
* differ in, and those of one pair of containers as one route with their weights (as between collapsed containers);
|
|
615
654
|
* 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.
|
|
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.
|
|
617
658
|
*/
|
|
618
659
|
liftEdges?: boolean,
|
|
619
660
|
/**
|
|
@@ -714,6 +755,12 @@ routeSearchWindow?: boolean,
|
|
|
714
755
|
* single pass, as before.
|
|
715
756
|
*/
|
|
716
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,
|
|
717
764
|
/**
|
|
718
765
|
* The clearance routes keep from nodes, their own nodes included beyond the stub at their port. It is a hard
|
|
719
766
|
* constraint (ADR 0005): the default is `DEFAULT_REQUIRED_CLEARANCE`, so it always applies. An explicit `null` is
|
|
@@ -952,7 +999,20 @@ edges: number[],
|
|
|
952
999
|
/**
|
|
953
1000
|
* Per container, the links between its children: child, child, number of edges (flat triples).
|
|
954
1001
|
*/
|
|
955
|
-
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>, };
|
|
956
1016
|
|
|
957
1017
|
/**
|
|
958
1018
|
* Provisional (ADR 0018, addendum): the rules of the data for the cluster overview, the second step of the order
|
|
@@ -1007,6 +1067,10 @@ satellites?: number,
|
|
|
1007
1067
|
* Chains of single children share one disc (false).
|
|
1008
1068
|
*/
|
|
1009
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,
|
|
1010
1074
|
/**
|
|
1011
1075
|
* Force steps per container (1..=10000).
|
|
1012
1076
|
*/
|
|
@@ -1029,7 +1093,11 @@ export type OverviewPositions = { schemaVersion: number,
|
|
|
1029
1093
|
/**
|
|
1030
1094
|
* Always true: tells this answer from a whole `Overview`.
|
|
1031
1095
|
*/
|
|
1032
|
-
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, };
|
|
1033
1101
|
|
|
1034
1102
|
/**
|
|
1035
1103
|
* Provisional (ADR 0018, addendum): the representation values of an overview request, as the engine checked them.
|
|
@@ -1271,6 +1339,10 @@ junctions?: Array<Point>,
|
|
|
1271
1339
|
* its taps, one per edge of the bus, in the edge's direction. Omitted when there is none.
|
|
1272
1340
|
*/
|
|
1273
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>,
|
|
1274
1346
|
/**
|
|
1275
1347
|
* Extent of everything drawn, with a 30-unit margin. May start at negative coordinates.
|
|
1276
1348
|
*/
|
|
@@ -1295,6 +1367,13 @@ kind: string,
|
|
|
1295
1367
|
*/
|
|
1296
1368
|
nodes: Array<string>, routes: Array<string>, reason: string, };
|
|
1297
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
|
+
|
|
1298
1377
|
export type SceneNode = {
|
|
1299
1378
|
/**
|
|
1300
1379
|
* Absolute bounds in scene coordinates.
|
|
@@ -1303,7 +1382,17 @@ bounds: Rect, container: boolean, aggregate: boolean, collapsed: boolean, invali
|
|
|
1303
1382
|
/**
|
|
1304
1383
|
* The rows of the node's content, top to bottom (empty for a node without rows).
|
|
1305
1384
|
*/
|
|
1306
|
-
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,
|
|
1307
1396
|
/**
|
|
1308
1397
|
* The outline of the node. `rect` (the default, omitted) uses its size as it is; `square` and `circle` use the larger
|
|
1309
1398
|
* of its two sizes on both axes. Collision and routing still use the bounding rectangle in this version.
|
|
@@ -1355,6 +1444,11 @@ export type Settle = { steps: number, residual: number, converged: boolean,
|
|
|
1355
1444
|
*/
|
|
1356
1445
|
round?: number, };
|
|
1357
1446
|
|
|
1447
|
+
/**
|
|
1448
|
+
* Provisional: which edges share a track in a channel (`LayoutOptions::shared_tracks`).
|
|
1449
|
+
*/
|
|
1450
|
+
export type SharedTracks = "target";
|
|
1451
|
+
|
|
1358
1452
|
/**
|
|
1359
1453
|
* A pinned node size, in world units.
|
|
1360
1454
|
*/
|
|
@@ -1420,6 +1514,11 @@ busLines?: { [key in string]: BusLine },
|
|
|
1420
1514
|
* Omitted when empty.
|
|
1421
1515
|
*/
|
|
1422
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>,
|
|
1423
1522
|
/**
|
|
1424
1523
|
* The move gesture in progress or the last one finished, for sequence checks. Omitted when there was none.
|
|
1425
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",
|