@arqlet/contracts 0.8.0 → 0.10.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 +252 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,12 @@ severity?: string | null, };
|
|
|
21
21
|
/**
|
|
22
22
|
* Renderer settings never change graph topology or explicit port contracts.
|
|
23
23
|
*/
|
|
24
|
-
export type AppearanceConfig = { showPorts: boolean,
|
|
24
|
+
export type AppearanceConfig = { showPorts: boolean,
|
|
25
|
+
/**
|
|
26
|
+
* Provisional: bridges (line hops) where two routes cross: the route drawn later passes over the other in a small
|
|
27
|
+
* half circle; drawn by every renderer from the scene's points. Off by default (omitted).
|
|
28
|
+
*/
|
|
29
|
+
bridges?: boolean, };
|
|
25
30
|
|
|
26
31
|
/**
|
|
27
32
|
* One entry of the bounded archive of measured candidates at a publication (metadata only; the snapshot is not kept).
|
|
@@ -42,7 +47,13 @@ export type Bundling = "none" | "complete";
|
|
|
42
47
|
* An explicit bus (`Graph::buses`): edges drawn with one shared trunk. The edges that share an end (all one source,
|
|
43
48
|
* or all one target) leave (enter) that node by one port and share the way to where they branch off.
|
|
44
49
|
*/
|
|
45
|
-
export type Bus = { id: string,
|
|
50
|
+
export type Bus = { id: string,
|
|
51
|
+
/**
|
|
52
|
+
* The member edges of a bus drawn on shared routes. Optional in input (`[]`); a bus with `taps` is a shared medium
|
|
53
|
+
* whatever its input `edges` hold: they are dropped at the import (`Graph::taps_as_media`, #145), and the view fills
|
|
54
|
+
* them with the lines it draws.
|
|
55
|
+
*/
|
|
56
|
+
edges?: Array<string>,
|
|
46
57
|
/**
|
|
47
58
|
* What the bus is called in the drawing ("CAN 500 kbit/s"). Placed like an edge label when the options give its size
|
|
48
59
|
* under `edge_labels["bus:<id>"]`; omitted when none.
|
|
@@ -294,7 +305,7 @@ origin?: Point | null, };
|
|
|
294
305
|
* A graph: the canonical data of a view. Direction and layout strategy are two constraints, each set for the root and for
|
|
295
306
|
* containers and inherited by containers that declare nothing (docs/adr/0003-container-direction-constraints.md).
|
|
296
307
|
*/
|
|
297
|
-
export type Graph = { defaultDirection?: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt">, containerDirections?: { [key in string]: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt"> }, defaultStrategy?: "none" | "tree" | "radial" | "auto" | Array<"none" | "tree" | "radial">, containerStrategies?: { [key in string]: "none" | "tree" | "radial" | "auto" | Array<"none" | "tree" | "radial"> },
|
|
308
|
+
export type Graph = { defaultDirection?: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt">, containerDirections?: { [key in string]: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt"> }, defaultStrategy?: "none" | "tree" | "radial" | "octilinear" | "auto" | Array<"none" | "tree" | "radial" | "octilinear">, containerStrategies?: { [key in string]: "none" | "tree" | "radial" | "octilinear" | "auto" | Array<"none" | "tree" | "radial" | "octilinear"> },
|
|
298
309
|
/**
|
|
299
310
|
* The edge routing of the root and its containers (docs/adr/0005-routing-constraints.md).
|
|
300
311
|
*/
|
|
@@ -354,20 +365,33 @@ by: string,
|
|
|
354
365
|
*/
|
|
355
366
|
values?: Array<string>,
|
|
356
367
|
/**
|
|
357
|
-
* How the criterion's groups are rendered where it owns nodes. `lanes` is accepted and reported as not yet applied
|
|
368
|
+
* How the criterion's groups are rendered where it owns nodes. `lanes` of the first criterion are bands across the flow of the top level (M4a); elsewhere it is accepted and reported as not yet applied
|
|
358
369
|
* (ADR 0022, M4); its groups are drawn as containers until then.
|
|
359
370
|
*/
|
|
360
371
|
as?: GroupingRendering,
|
|
361
372
|
/**
|
|
362
373
|
* The shape of this criterion's hulls where it holds nodes softly; `LayoutOptions::membership_hull` without it.
|
|
363
374
|
*/
|
|
364
|
-
hull?: HullShape,
|
|
375
|
+
hull?: HullShape,
|
|
376
|
+
/**
|
|
377
|
+
* The groups of a dimension this criterion considers; empty (the default) considers them all. Considered groups take
|
|
378
|
+
* part in everything the criterion does — they own nodes as containers, are held softly in the layout (M3) and are
|
|
379
|
+
* drawn — and a member of a nested group belongs to the deepest considered group on its path. A group not considered
|
|
380
|
+
* takes part in none of it, so the nodes it would own fall to the next criterion. Not allowed on `parent`. Lets a
|
|
381
|
+
* view work with one document among hundreds (ADR 0022 §2).
|
|
382
|
+
*/
|
|
383
|
+
consider?: Array<string>, };
|
|
365
384
|
|
|
366
385
|
/**
|
|
367
386
|
* Provisional (ADR 0022 §3): how an owning criterion's groups are drawn.
|
|
368
387
|
*/
|
|
369
388
|
export type GroupingRendering = "containers" | "lanes";
|
|
370
389
|
|
|
390
|
+
/**
|
|
391
|
+
* Provisional (ADR 0022 M3b): a membership group a layout holds together (`Snapshot::held_groups`).
|
|
392
|
+
*/
|
|
393
|
+
export type HeldGroup = { dimension: string, group: string, };
|
|
394
|
+
|
|
371
395
|
/**
|
|
372
396
|
* What a view hides (provisional, view state set by the `filter` operation): nodes of these kinds, these nodes (each with
|
|
373
397
|
* everything below it) and edges of these kinds. The layout keeps their room, so what stays keeps its place; the scene
|
|
@@ -380,6 +404,25 @@ export type Hidden = { nodeKinds?: Array<string>, nodes?: Array<string>, edgeKin
|
|
|
380
404
|
*/
|
|
381
405
|
compact?: boolean, };
|
|
382
406
|
|
|
407
|
+
/**
|
|
408
|
+
* Provisional (ADR 0022 M3b): the cost of all held groups together. Edges against the flow are counted, not limited: a
|
|
409
|
+
* group held around a node between its members turns an edge back.
|
|
410
|
+
*/
|
|
411
|
+
export type HoldingCost = { crossingsBefore: number, crossings: number, bendsBefore: number, bends: number, againstFlowBefore: number, againstFlow: number, };
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Provisional (ADR 0022 M3b): what `LayoutOptions::hold_memberships` did besides `Snapshot::held_groups`.
|
|
415
|
+
*/
|
|
416
|
+
export type HoldingReport = {
|
|
417
|
+
/**
|
|
418
|
+
* The soft groups with at least two shown members that are neither held nor whole without holding.
|
|
419
|
+
*/
|
|
420
|
+
released: Array<ReleasedGroup>,
|
|
421
|
+
/**
|
|
422
|
+
* The drawing without holding against this one. Only after a complete layout: an edit has nothing to compare with.
|
|
423
|
+
*/
|
|
424
|
+
cost?: HoldingCost, };
|
|
425
|
+
|
|
383
426
|
/**
|
|
384
427
|
* Provisional: an edge drawn as a reference to a hub (`Snapshot::hub_refs`): the edge, its kind, the node it is drawn at,
|
|
385
428
|
* the hub, and whether it runs from the node to the hub (`outgoing`) or from the hub to the node.
|
|
@@ -409,7 +452,7 @@ export type Intent = { pins: { [key in string]: Point }, containerSizing: { [key
|
|
|
409
452
|
/**
|
|
410
453
|
* The shape of every node that is not the default rectangle.
|
|
411
454
|
*/
|
|
412
|
-
shapes: { [key in string]: NodeShape }, defaultDirection: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt">, containerDirections: { [key in string]: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt"> }, defaultStrategy: "none" | "tree" | "radial" | "auto" | Array<"none" | "tree" | "radial">, containerStrategies: { [key in string]: "none" | "tree" | "radial" | "auto" | Array<"none" | "tree" | "radial"> }, defaultRouting: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus" | "auto" | Array<"straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus">, containerRouting: { [key in string]: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus" | "auto" | Array<"straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus"> },
|
|
455
|
+
shapes: { [key in string]: NodeShape }, defaultDirection: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt">, containerDirections: { [key in string]: "lr" | "rl" | "tb" | "bt" | "auto" | Array<"lr" | "rl" | "tb" | "bt"> }, defaultStrategy: "none" | "tree" | "radial" | "octilinear" | "auto" | Array<"none" | "tree" | "radial" | "octilinear">, containerStrategies: { [key in string]: "none" | "tree" | "radial" | "octilinear" | "auto" | Array<"none" | "tree" | "radial" | "octilinear"> }, defaultRouting: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus" | "auto" | Array<"straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus">, containerRouting: { [key in string]: "straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus" | "auto" | Array<"straight" | "orthogonal" | "roundedOrthogonal" | "polyline" | "roundedPolyline" | "octilinear" | "curve" | "bus"> },
|
|
413
456
|
/**
|
|
414
457
|
* The ports the graph declares and the edge ends bound to them, which includes those a user placed by hand.
|
|
415
458
|
*/
|
|
@@ -589,6 +632,12 @@ groupingPriority?: Array<GroupingCriterion>,
|
|
|
589
632
|
* convex hull. A criterion of `groupingPriority` may override it (M1).
|
|
590
633
|
*/
|
|
591
634
|
membershipHull?: HullShape,
|
|
635
|
+
/**
|
|
636
|
+
* Provisional (ADR 0022 M3b): hold the soft membership groups whose shown members have one container in the view
|
|
637
|
+
* together there, each where the cost in crossings and bends stays in a budget that halves with the rank. The held
|
|
638
|
+
* group is drawn as its hull; its members keep their container. Off by default (omitted).
|
|
639
|
+
*/
|
|
640
|
+
holdMemberships?: boolean,
|
|
592
641
|
/**
|
|
593
642
|
* Provisional, computed by the layout with `hubRefs`: the room the references' stubs and names take between two ranks
|
|
594
643
|
* (added to the layer spacing), kept with the snapshot so that every later operation spaces alike. 0 (omitted): none.
|
|
@@ -667,6 +716,29 @@ forceDirected?: boolean,
|
|
|
667
716
|
* Iteration budget of the organic (stress) placement. Omitted when unset; the default is 300.
|
|
668
717
|
*/
|
|
669
718
|
organicIterations?: number | null,
|
|
719
|
+
/**
|
|
720
|
+
* Provisional (#156): the gap between two boxes of an organic area, in layout units. Omitted when unset; the default
|
|
721
|
+
* is 24. A route between two boxes needs the router's clearance on both sides and a stub at its port, so a gap wider
|
|
722
|
+
* than the default leaves a route room to leave a node that faces a neighbour.
|
|
723
|
+
*/
|
|
724
|
+
organicGap?: number | null,
|
|
725
|
+
/**
|
|
726
|
+
* Provisional (#203): the repair of the default router, when the grid of the whole view is over its bound, searches a
|
|
727
|
+
* sparse grid of the whole view first, with a cost per bend: a line only in a gap between box edges that offers a way
|
|
728
|
+
* no neighbouring gap offers, which still holds a way whenever the rectangles leave one wider than a rounding error.
|
|
729
|
+
* Without it such a route is searched only on grids around it, and one without a way there keeps its shape through the
|
|
730
|
+
* boxes. Views within the bound are drawn as without the option. Omitted when off.
|
|
731
|
+
*/
|
|
732
|
+
sparseRepairGrid?: boolean,
|
|
733
|
+
/**
|
|
734
|
+
* Experimental (ADR 0016, amendment *Pins in single pass*, steps P1 and P2): under single pass, and in the
|
|
735
|
+
* hierarchical pipeline it falls back to, a pinned node (leaf or container) of an area that flows left to right or top
|
|
736
|
+
* to bottom is a constraint of the arrangement: the pin chooses its rank and its order there and holds its place
|
|
737
|
+
* across the flow, and along the flow it stands in its rank's band (the difference is reported in the layout
|
|
738
|
+
* diagnostics). Without it, and when any pin of the view is another one (in an area of another strategy or of a
|
|
739
|
+
* reversed flow), the pins are handled as before and take the view off that pipeline. Omitted when off.
|
|
740
|
+
*/
|
|
741
|
+
pinsInSinglePass?: boolean,
|
|
670
742
|
/**
|
|
671
743
|
* Experimental minimum-displacement overlap constraints for organic placement and repair. Off by default.
|
|
672
744
|
*/
|
|
@@ -936,7 +1008,7 @@ orderHints?: { [key in string]: OrderHint }, };
|
|
|
936
1008
|
* `shortest` choose an orientation per area; `tree` places a tree or forest along the area's direction; `radial` places a
|
|
937
1009
|
* tree or forest on rings. Compatible with the values `hybrid` and `shortest` of earlier graphs.
|
|
938
1010
|
*/
|
|
939
|
-
export type LayoutStrategy = "none" | "shortest" | "tree" | "radial" | "organic";
|
|
1011
|
+
export type LayoutStrategy = "none" | "shortest" | "tree" | "radial" | "organic" | "octilinear";
|
|
940
1012
|
|
|
941
1013
|
/**
|
|
942
1014
|
* The level of detail (provisional): which containers a view shows collapsed at first, by depth and by kind; opening
|
|
@@ -1247,7 +1319,25 @@ links: Array<number>,
|
|
|
1247
1319
|
* Provisional: every node of shape `busLine` as a line instead of a disc (a viewer draws the line and its taps, not
|
|
1248
1320
|
* the node's disc). Omitted when there is none.
|
|
1249
1321
|
*/
|
|
1250
|
-
busLines?: Array<OverviewBusLine>, stats: OverviewStats,
|
|
1322
|
+
busLines?: Array<OverviewBusLine>, stats: OverviewStats,
|
|
1323
|
+
/**
|
|
1324
|
+
* Provisional, for a request with `edgeData`: the edge kinds in order of first use.
|
|
1325
|
+
*/
|
|
1326
|
+
edgeKinds?: Array<string>,
|
|
1327
|
+
/**
|
|
1328
|
+
* Provisional, for a request with `edgeData`: each edge's kind as an index into `edgeKinds`; entry `k` belongs to
|
|
1329
|
+
* the edge `edges[2k]` to `edges[2k + 1]`.
|
|
1330
|
+
*/
|
|
1331
|
+
edgeKind?: number[],
|
|
1332
|
+
/**
|
|
1333
|
+
* Provisional, for a request with `edgeData`: how many edges each edge stands for (`Edge::weight`), indexed as
|
|
1334
|
+
* `edgeKind`. Omitted when every edge counts 1.
|
|
1335
|
+
*/
|
|
1336
|
+
edgeWeight?: number[],
|
|
1337
|
+
/**
|
|
1338
|
+
* Provisional, for a request with `start.nodes`: what became of the earlier places.
|
|
1339
|
+
*/
|
|
1340
|
+
continuation?: OverviewContinuation, };
|
|
1251
1341
|
|
|
1252
1342
|
/**
|
|
1253
1343
|
* Provisional: a bus of the overview drawn as a line (`Overview::bus_lines`): the bus node's index, the line from
|
|
@@ -1276,6 +1366,25 @@ auto?: boolean,
|
|
|
1276
1366
|
*/
|
|
1277
1367
|
levelOfDetail?: LevelOfDetail, };
|
|
1278
1368
|
|
|
1369
|
+
/**
|
|
1370
|
+
* Provisional: what became of the places given by node id (`OverviewStart::nodes`).
|
|
1371
|
+
*/
|
|
1372
|
+
export type OverviewContinuation = {
|
|
1373
|
+
/**
|
|
1374
|
+
* Nodes of the graph that continued from their entry. Clusters the overview added are not counted.
|
|
1375
|
+
*/
|
|
1376
|
+
continued: number,
|
|
1377
|
+
/**
|
|
1378
|
+
* Nodes of the graph placed anew: without an entry, in a container without one, or in another container than the
|
|
1379
|
+
* one the entry lay in.
|
|
1380
|
+
*/
|
|
1381
|
+
anew: number,
|
|
1382
|
+
/**
|
|
1383
|
+
* Ids of entries that name no node of the overview (removed nodes), in id order. Ids of clusters the overview
|
|
1384
|
+
* added (`community:…`) that are gone are not listed.
|
|
1385
|
+
*/
|
|
1386
|
+
ignored: Array<string>, };
|
|
1387
|
+
|
|
1279
1388
|
/**
|
|
1280
1389
|
* Provisional (ADR 0018, addendum; ADR 0015): the user's decisions in the cluster overview as one value, by node id.
|
|
1281
1390
|
* The first step of the order user, rules, zoom; it always holds.
|
|
@@ -1327,10 +1436,21 @@ groups?: { [key in string]: Array<string> },
|
|
|
1327
1436
|
*/
|
|
1328
1437
|
hubs?: CommunityHubs, };
|
|
1329
1438
|
|
|
1439
|
+
/**
|
|
1440
|
+
* Provisional: the disc of a node in an earlier overview (its `x`, `y` and `r`), and what held it.
|
|
1441
|
+
*/
|
|
1442
|
+
export type OverviewPlace = { x: number, y: number, r: number,
|
|
1443
|
+
/**
|
|
1444
|
+
* The id of its parent in that overview (`ids[parent[i]]`), a node of the graph or an added cluster; left out at
|
|
1445
|
+
* the top level. Where given, it says what held the node instead of the discs, which cannot tell it for a cluster
|
|
1446
|
+
* the host set smaller than its content (`radii`). A parent that names nothing counts as left out.
|
|
1447
|
+
*/
|
|
1448
|
+
parent?: string, };
|
|
1449
|
+
|
|
1330
1450
|
/**
|
|
1331
1451
|
* Provisional (sessions): the part of an overview that changes while the clusters stay the same, answered for a request
|
|
1332
|
-
* with `positionsOnly` laid out on the clusters of the session's last overview
|
|
1333
|
-
* kinds, edges and links from that answer.
|
|
1452
|
+
* with `positionsOnly` laid out on the clusters of the session's last overview, with the same `edgeData`. The host keeps
|
|
1453
|
+
* ids, labels, parents, kinds, edges (with their data) and links from that answer.
|
|
1334
1454
|
*/
|
|
1335
1455
|
export type OverviewPositions = { schemaVersion: number,
|
|
1336
1456
|
/**
|
|
@@ -1340,7 +1460,11 @@ positionsOnly: boolean, representation: OverviewRepresentation, x: Array<number>
|
|
|
1340
1460
|
/**
|
|
1341
1461
|
* The bus lines move with the nodes (`Overview::bus_lines`). Omitted when there is none.
|
|
1342
1462
|
*/
|
|
1343
|
-
busLines?: Array<OverviewBusLine>, stats: OverviewStats,
|
|
1463
|
+
busLines?: Array<OverviewBusLine>, stats: OverviewStats,
|
|
1464
|
+
/**
|
|
1465
|
+
* For a request with `start.nodes` (`Overview::continuation`).
|
|
1466
|
+
*/
|
|
1467
|
+
continuation?: OverviewContinuation, };
|
|
1344
1468
|
|
|
1345
1469
|
/**
|
|
1346
1470
|
* Provisional (ADR 0018, addendum): the representation values of an overview request, as the engine checked them.
|
|
@@ -1374,19 +1498,36 @@ export type OverviewRequest = { graph?: Graph, options?: OverviewLayoutOptions,
|
|
|
1374
1498
|
radii?: { [key in string]: number }, start?: OverviewStart,
|
|
1375
1499
|
/**
|
|
1376
1500
|
* Provisional (sessions): answer only what moves (`OverviewPositions`) when the clusters are those of the session's
|
|
1377
|
-
* last overview; otherwise the whole overview.
|
|
1501
|
+
* last overview and `edgeData` is as it was there; otherwise the whole overview.
|
|
1378
1502
|
*/
|
|
1379
1503
|
positionsOnly?: boolean,
|
|
1504
|
+
/**
|
|
1505
|
+
* Provisional: answer each edge's kind and weight too (`Overview::edge_kinds`, `edge_kind`, `edge_weight`), for a
|
|
1506
|
+
* host that does not have the graph.
|
|
1507
|
+
*/
|
|
1508
|
+
edgeData?: boolean,
|
|
1380
1509
|
/**
|
|
1381
1510
|
* Worker threads (native only); the answer is the same for any number.
|
|
1382
1511
|
*/
|
|
1383
1512
|
threads?: number, };
|
|
1384
1513
|
|
|
1385
1514
|
/**
|
|
1386
|
-
* Provisional: where an overview continues from. Positions
|
|
1387
|
-
* clusters, or
|
|
1515
|
+
* Provisional: where an overview continues from. Positions of a previous overview, either `x`, `y`, `r` by node index
|
|
1516
|
+
* (the same clusters) or `nodes` by node id (also a changed graph), or neither in a session (its last overview);
|
|
1517
|
+
* `settle` lets the changed containers settle again.
|
|
1518
|
+
*/
|
|
1519
|
+
export type OverviewStart = { x?: Array<number>, y?: Array<number>, r?: Array<number>,
|
|
1520
|
+
/**
|
|
1521
|
+
* Provisional: the places of an earlier overview by node id, added clusters included, for the overview of a graph
|
|
1522
|
+
* that may have changed: those clusters continue with their ids. Not with `x`, `y` or `r`. A later request without
|
|
1523
|
+
* a session continues the answer by id again.
|
|
1524
|
+
*/
|
|
1525
|
+
nodes?: { [key in string]: OverviewPlace }, settle?: boolean,
|
|
1526
|
+
/**
|
|
1527
|
+
* Provisional: nodes the user moved, by id, to their new centres: each one's container settles around it. Needs
|
|
1528
|
+
* earlier places (`x`, `y`, `r`, `nodes`, or a session's), and with `nodes` an earlier place of that node.
|
|
1388
1529
|
*/
|
|
1389
|
-
|
|
1530
|
+
moved?: { [key in string]: Point }, };
|
|
1390
1531
|
|
|
1391
1532
|
/**
|
|
1392
1533
|
* Provisional: the counts of an overview.
|
|
@@ -1493,6 +1634,16 @@ inputHash: string, baseline: Snapshot, curated: CuratedScene, annotations: Array
|
|
|
1493
1634
|
*/
|
|
1494
1635
|
export type ReferenceInput = { graph: Graph, collapsedIds: Array<string>, options: LayoutOptions, };
|
|
1495
1636
|
|
|
1637
|
+
/**
|
|
1638
|
+
* Provisional (ADR 0022 M3b): why a group is not held.
|
|
1639
|
+
*/
|
|
1640
|
+
export type ReleaseReason = "acrossContainers" | "fixedPlace" | "overlapsHeld" | "refused" | "notWhole" | "breaksOther" | "violation" | "budget" | "trials" | "edit" | "buses";
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* Provisional (ADR 0022 M3b): a group the layout does not hold.
|
|
1644
|
+
*/
|
|
1645
|
+
export type ReleasedGroup = { dimension: string, group: string, reason: ReleaseReason, };
|
|
1646
|
+
|
|
1496
1647
|
/**
|
|
1497
1648
|
* The outcome of validating a document that passed structural checks.
|
|
1498
1649
|
*/
|
|
@@ -1597,6 +1748,16 @@ membershipHulls?: Array<SceneHull>,
|
|
|
1597
1748
|
* Omitted when there is none.
|
|
1598
1749
|
*/
|
|
1599
1750
|
membershipReport?: Array<SceneMembershipReport>,
|
|
1751
|
+
/**
|
|
1752
|
+
* Provisional (ADR 0022 §3, M2b): the members of the soft groups that fell into too many pieces to be drawn as hulls,
|
|
1753
|
+
* marked one by one instead (a colour or a badge on the box, no polygon). Omitted when there is none.
|
|
1754
|
+
*/
|
|
1755
|
+
membershipMarks?: Array<SceneMark>,
|
|
1756
|
+
/**
|
|
1757
|
+
* Provisional (ADR 0022 M4c): the bands of the first criterion's lanes (`as: lanes`), in their declared order, to be
|
|
1758
|
+
* drawn behind everything else. Omitted when there is none.
|
|
1759
|
+
*/
|
|
1760
|
+
membershipLanes?: Array<SceneLane>,
|
|
1600
1761
|
/**
|
|
1601
1762
|
* Extent of everything drawn, with a 30-unit margin. May start at negative coordinates.
|
|
1602
1763
|
*/
|
|
@@ -1648,9 +1809,52 @@ label: string, points: Array<Point>,
|
|
|
1648
1809
|
boxes: Array<string>,
|
|
1649
1810
|
/**
|
|
1650
1811
|
* 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).
|
|
1812
|
+
* layout kept apart, and one of the two numbers a later default depends on (ADR 0022 §6). Empty once a group is split
|
|
1813
|
+
* (M2b): a group is split exactly so that no piece encloses a foreign box.
|
|
1814
|
+
*/
|
|
1815
|
+
intruders: Array<string>,
|
|
1816
|
+
/**
|
|
1817
|
+
* Provisional (ADR 0022 §3, M2b): this hull is piece `piece` (from 0) of `pieces` of its group. A group whose whole
|
|
1818
|
+
* hull would enclose a foreign box is drawn in pieces — one per owner, then by distance within an owner.
|
|
1652
1819
|
*/
|
|
1653
|
-
|
|
1820
|
+
piece: number, pieces: number, };
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* Provisional (ADR 0022 M4c): the band of one lane. It spans the whole drawing along the flow; `vertical` says that the bands
|
|
1824
|
+
* stand side by side across x (the flow runs along y). Bands of neighbouring lanes meet in the middle of the gap between them.
|
|
1825
|
+
*/
|
|
1826
|
+
export type SceneLane = { dimension: string, dimensionLabel: string, group: string,
|
|
1827
|
+
/**
|
|
1828
|
+
* What to write on the band: the group's label, or its id where it has none.
|
|
1829
|
+
*/
|
|
1830
|
+
label: string, rect: Rect, vertical: boolean,
|
|
1831
|
+
/**
|
|
1832
|
+
* A phase along the flow (the second criterion as lanes, M4b), not a lane across it. Phases have a header strip for their
|
|
1833
|
+
* names on the side where the lanes start.
|
|
1834
|
+
*/
|
|
1835
|
+
phase?: boolean,
|
|
1836
|
+
/**
|
|
1837
|
+
* Provisional (ADR 0022 M4d): the container whose children the band divides, for lanes of a later criterion inside every
|
|
1838
|
+
* container. Absent for bands over the whole drawing. A renderer draws such a band above its container's frame.
|
|
1839
|
+
*/
|
|
1840
|
+
area?: string, };
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* Provisional (ADR 0022 §3, M2b): one member of a marked group — the box to mark, and the group it belongs to.
|
|
1844
|
+
*/
|
|
1845
|
+
export type SceneMark = { dimension: string, dimensionLabel: string, group: string,
|
|
1846
|
+
/**
|
|
1847
|
+
* What to write in the mark's tooltip or legend: the group's label, or its id where it has none.
|
|
1848
|
+
*/
|
|
1849
|
+
label: string,
|
|
1850
|
+
/**
|
|
1851
|
+
* The box that carries the mark: the member's own box, or the box that stands for it.
|
|
1852
|
+
*/
|
|
1853
|
+
node: string,
|
|
1854
|
+
/**
|
|
1855
|
+
* The group's own box, when the view still draws it and this member left it: what the mark points back to.
|
|
1856
|
+
*/
|
|
1857
|
+
ownBox?: string, };
|
|
1654
1858
|
|
|
1655
1859
|
/**
|
|
1656
1860
|
* Provisional (ADR 0022 §5): what one membership dimension did in this drawing. Typed, because one line of text per
|
|
@@ -1697,7 +1901,26 @@ multipleOwners: number,
|
|
|
1697
1901
|
/**
|
|
1698
1902
|
* Nodes no listed criterion assigns (rule 3), placed at the root. Counted on the first criterion's entry only.
|
|
1699
1903
|
*/
|
|
1700
|
-
unassigned: number,
|
|
1904
|
+
unassigned: number,
|
|
1905
|
+
/**
|
|
1906
|
+
* Provisional (ADR 0022 §3, M2b): groups drawn in more than one piece (`grouping-split`), and groups drawn as marks
|
|
1907
|
+
* because they fell into more pieces than `MARKS_ABOVE_PIECES` (`grouping-marked`).
|
|
1908
|
+
*/
|
|
1909
|
+
split: number, marked: number,
|
|
1910
|
+
/**
|
|
1911
|
+
* The foreign leaf boxes the groups' hulls would enclose if each group were drawn whole, as the first slice drew them.
|
|
1912
|
+
* Kept beside `intruders` for one version: splitting lowers `intruders` by construction, which is not a layout gain.
|
|
1913
|
+
*/
|
|
1914
|
+
intrudersWhole: number,
|
|
1915
|
+
/**
|
|
1916
|
+
* Groups the view still draws as a box that lost some members to another criterion: only those members are drawn,
|
|
1917
|
+
* joined to the box where that is compact and encloses nothing foreign, else marked (ADR 0022 §3). The box shows the rest.
|
|
1918
|
+
*/
|
|
1919
|
+
keptBox: number,
|
|
1920
|
+
/**
|
|
1921
|
+
* Provisional (ADR 0022 M3b): groups the layout holds together inside their owner (`LayoutOptions::hold_memberships`).
|
|
1922
|
+
*/
|
|
1923
|
+
held?: number, summary: string, };
|
|
1701
1924
|
|
|
1702
1925
|
export type SceneNode = {
|
|
1703
1926
|
/**
|
|
@@ -1853,7 +2076,17 @@ gesture?: Gesture | null,
|
|
|
1853
2076
|
* (`"<root>"` for the top level), kept so that a later pass reuses the plans of the areas it does not place again.
|
|
1854
2077
|
* Empty (and omitted) without the option.
|
|
1855
2078
|
*/
|
|
1856
|
-
layeredPlans?: { [key in string]: StoredAreaPlan },
|
|
2079
|
+
layeredPlans?: { [key in string]: StoredAreaPlan },
|
|
2080
|
+
/**
|
|
2081
|
+
* Provisional (ADR 0022 M3b): the membership groups this layout holds together inside their owner
|
|
2082
|
+
* (`LayoutOptions::hold_memberships`). Omitted when empty.
|
|
2083
|
+
*/
|
|
2084
|
+
heldGroups?: Array<HeldGroup>,
|
|
2085
|
+
/**
|
|
2086
|
+
* Provisional (ADR 0022 M3b): which soft groups the layout does not hold and why, and what holding the others costs.
|
|
2087
|
+
* Omitted without `LayoutOptions::hold_memberships`.
|
|
2088
|
+
*/
|
|
2089
|
+
holding?: HoldingReport | null, };
|
|
1857
2090
|
|
|
1858
2091
|
export type Status = "draft" | "accepted" | "retired";
|
|
1859
2092
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arqlet/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.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",
|