@arqlet/contracts 0.5.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.
- package/dist/index.d.ts +149 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -47,7 +47,44 @@ 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>, };
|
|
51
88
|
|
|
52
89
|
/**
|
|
53
90
|
* Provisional: the children that `communities` leaves out of Louvain, so that one hub does not pull a whole container
|
|
@@ -363,6 +400,21 @@ componentPacking?: boolean,
|
|
|
363
400
|
* when off, so the default output does not change.
|
|
364
401
|
*/
|
|
365
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,
|
|
366
418
|
/**
|
|
367
419
|
* Experimental: the children of a layered area that have no edge to another child (a file of unrelated functions)
|
|
368
420
|
* are spread over the ranks as a grid instead of all standing in the first rank, one long column. They fill the
|
|
@@ -370,6 +422,18 @@ packComponents?: PackComponents,
|
|
|
370
422
|
* Omitted when off, so the default output does not change.
|
|
371
423
|
*/
|
|
372
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,
|
|
373
437
|
/**
|
|
374
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
|
|
375
439
|
* with the positive flow, where single pass runs, and mirrored area by area (a container keeps its header at its
|
|
@@ -445,6 +509,21 @@ vpscOverlapRemoval?: boolean,
|
|
|
445
509
|
* Experimental conflict-directed organic repair, with the exhaustive search as a fallback. Off by default.
|
|
446
510
|
*/
|
|
447
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,
|
|
448
527
|
/**
|
|
449
528
|
* Experimental bounded repulsion from projected edge chords at the end of organic stress. Off by default.
|
|
450
529
|
*/
|
|
@@ -530,6 +609,13 @@ groups?: { [key in string]: Array<string> },
|
|
|
530
609
|
* containers that `communities` and `groups` add, which start collapsed.
|
|
531
610
|
*/
|
|
532
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,
|
|
533
619
|
/**
|
|
534
620
|
* Provisional (view state, set by `filter`): what the view hides, keeping the place of the rest. Omitted when empty.
|
|
535
621
|
*/
|
|
@@ -614,6 +700,13 @@ layerSpacing?: number | null,
|
|
|
614
700
|
* default (omitted), so default drawings do not change.
|
|
615
701
|
*/
|
|
616
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,
|
|
617
710
|
/**
|
|
618
711
|
* Provisional (single pass): areas without a fixed flow (organic, tree, radial) and straight routing are allowed in a
|
|
619
712
|
* single-pass layout. Those areas keep their own placement and their edges go to the router that completes single pass;
|
|
@@ -684,7 +777,18 @@ depth?: number | null,
|
|
|
684
777
|
/**
|
|
685
778
|
* Containers of these kinds.
|
|
686
779
|
*/
|
|
687
|
-
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, };
|
|
688
792
|
|
|
689
793
|
/**
|
|
690
794
|
* A geometry observation for one element: the realized outline and the revision of the measurement. The revision rises with
|
|
@@ -773,7 +877,7 @@ shape?: NodeShape, };
|
|
|
773
877
|
/**
|
|
774
878
|
* The outline of a leaf node (docs/...: step 1 of the shape support). Containers use the same names later.
|
|
775
879
|
*/
|
|
776
|
-
export type NodeShape = "rect" | "square" | "circle";
|
|
880
|
+
export type NodeShape = "rect" | "square" | "circle" | "busLine";
|
|
777
881
|
|
|
778
882
|
export type NodeSize = { width: number, height: number, };
|
|
779
883
|
|
|
@@ -1162,11 +1266,21 @@ buses?: Array<Array<string>>,
|
|
|
1162
1266
|
* them as junction dots. Omitted when there is none.
|
|
1163
1267
|
*/
|
|
1164
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>,
|
|
1165
1274
|
/**
|
|
1166
1275
|
* Extent of everything drawn, with a 30-unit margin. May start at negative coordinates.
|
|
1167
1276
|
*/
|
|
1168
1277
|
bounds: Rect, };
|
|
1169
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
|
+
|
|
1170
1284
|
/**
|
|
1171
1285
|
* One conflict of the drawing. A renderer marks every node and route it names and shows `reason` for them.
|
|
1172
1286
|
*/
|
|
@@ -1226,10 +1340,20 @@ members?: Array<string>, };
|
|
|
1226
1340
|
*/
|
|
1227
1341
|
export type SceneRow = { id: string, label: string, bounds: Rect, };
|
|
1228
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
|
+
|
|
1229
1348
|
/**
|
|
1230
1349
|
* The outcome of the settling steps after a drag (see `EditReport::settle`).
|
|
1231
1350
|
*/
|
|
1232
|
-
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, };
|
|
1233
1357
|
|
|
1234
1358
|
/**
|
|
1235
1359
|
* A pinned node size, in world units.
|
|
@@ -1265,7 +1389,17 @@ areaStrategies?: { [key in string]: LayoutStrategy },
|
|
|
1265
1389
|
/**
|
|
1266
1390
|
* Structured counterpart of the routing diagnostics that name a passed-through node.
|
|
1267
1391
|
*/
|
|
1268
|
-
routeConflicts?: Array<RouteConflict>, schemaVersion: number, engineVersion: string, revision: number, layoutVersion: number, baseRevision: number | null, options?: LayoutOptions, graph: Graph,
|
|
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>,
|
|
1269
1403
|
/**
|
|
1270
1404
|
* The edges drawn as straight segments (the others are orthogonal). Empty when every edge is orthogonal.
|
|
1271
1405
|
*/
|
|
@@ -1276,6 +1410,16 @@ straightEdges?: Array<string>,
|
|
|
1276
1410
|
* graph has none.
|
|
1277
1411
|
*/
|
|
1278
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,
|
|
1279
1423
|
/**
|
|
1280
1424
|
* The move gesture in progress or the last one finished, for sequence checks. Omitted when there was none.
|
|
1281
1425
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arqlet/contracts",
|
|
3
|
-
"version": "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",
|