@arqlet/contracts 0.8.0 → 0.9.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 +73 -9
  2. 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, edges: Array<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
  */
@@ -361,7 +372,15 @@ 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.
@@ -409,7 +428,7 @@ export type Intent = { pins: { [key in string]: Point }, containerSizing: { [key
409
428
  /**
410
429
  * The shape of every node that is not the default rectangle.
411
430
  */
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"> },
431
+ 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
432
  /**
414
433
  * The ports the graph declares and the edge ends bound to them, which includes those a user placed by hand.
415
434
  */
@@ -667,6 +686,12 @@ forceDirected?: boolean,
667
686
  * Iteration budget of the organic (stress) placement. Omitted when unset; the default is 300.
668
687
  */
669
688
  organicIterations?: number | null,
689
+ /**
690
+ * Provisional (#156): the gap between two boxes of an organic area, in layout units. Omitted when unset; the default
691
+ * 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
692
+ * than the default leaves a route room to leave a node that faces a neighbour.
693
+ */
694
+ organicGap?: number | null,
670
695
  /**
671
696
  * Experimental minimum-displacement overlap constraints for organic placement and repair. Off by default.
672
697
  */
@@ -936,7 +961,7 @@ orderHints?: { [key in string]: OrderHint }, };
936
961
  * `shortest` choose an orientation per area; `tree` places a tree or forest along the area's direction; `radial` places a
937
962
  * tree or forest on rings. Compatible with the values `hybrid` and `shortest` of earlier graphs.
938
963
  */
939
- export type LayoutStrategy = "none" | "shortest" | "tree" | "radial" | "organic";
964
+ export type LayoutStrategy = "none" | "shortest" | "tree" | "radial" | "organic" | "octilinear";
940
965
 
941
966
  /**
942
967
  * The level of detail (provisional): which containers a view shows collapsed at first, by depth and by kind; opening
@@ -1597,6 +1622,11 @@ membershipHulls?: Array<SceneHull>,
1597
1622
  * Omitted when there is none.
1598
1623
  */
1599
1624
  membershipReport?: Array<SceneMembershipReport>,
1625
+ /**
1626
+ * Provisional (ADR 0022 §3, M2b): the members of the soft groups that fell into too many pieces to be drawn as hulls,
1627
+ * marked one by one instead (a colour or a badge on the box, no polygon). Omitted when there is none.
1628
+ */
1629
+ membershipMarks?: Array<SceneMark>,
1600
1630
  /**
1601
1631
  * Extent of everything drawn, with a 30-unit margin. May start at negative coordinates.
1602
1632
  */
@@ -1648,9 +1678,28 @@ label: string, points: Array<Point>,
1648
1678
  boxes: Array<string>,
1649
1679
  /**
1650
1680
  * 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).
1681
+ * layout kept apart, and one of the two numbers a later default depends on (ADR 0022 §6). Empty once a group is split
1682
+ * (M2b): a group is split exactly so that no piece encloses a foreign box.
1652
1683
  */
1653
- intruders: Array<string>, };
1684
+ intruders: Array<string>,
1685
+ /**
1686
+ * Provisional (ADR 0022 §3, M2b): this hull is piece `piece` (from 0) of `pieces` of its group. A group whose whole
1687
+ * hull would enclose a foreign box is drawn in pieces — one per owner, then by distance within an owner.
1688
+ */
1689
+ piece: number, pieces: number, };
1690
+
1691
+ /**
1692
+ * Provisional (ADR 0022 §3, M2b): one member of a marked group — the box to mark, and the group it belongs to.
1693
+ */
1694
+ export type SceneMark = { dimension: string, dimensionLabel: string, group: string,
1695
+ /**
1696
+ * What to write in the mark's tooltip or legend: the group's label, or its id where it has none.
1697
+ */
1698
+ label: string,
1699
+ /**
1700
+ * The box that carries the mark: the member's own box, or the box that stands for it.
1701
+ */
1702
+ node: string, };
1654
1703
 
1655
1704
  /**
1656
1705
  * Provisional (ADR 0022 §5): what one membership dimension did in this drawing. Typed, because one line of text per
@@ -1697,7 +1746,22 @@ multipleOwners: number,
1697
1746
  /**
1698
1747
  * Nodes no listed criterion assigns (rule 3), placed at the root. Counted on the first criterion's entry only.
1699
1748
  */
1700
- unassigned: number, summary: string, };
1749
+ unassigned: number,
1750
+ /**
1751
+ * Provisional (ADR 0022 §3, M2b): groups drawn in more than one piece (`grouping-split`), and groups drawn as marks
1752
+ * because they fell into more pieces than `MARKS_ABOVE_PIECES` (`grouping-marked`).
1753
+ */
1754
+ split: number, marked: number,
1755
+ /**
1756
+ * The foreign leaf boxes the groups' hulls would enclose if each group were drawn whole, as the first slice drew them.
1757
+ * Kept beside `intruders` for one version: splitting lowers `intruders` by construction, which is not a layout gain.
1758
+ */
1759
+ intrudersWhole: number,
1760
+ /**
1761
+ * Groups the view still draws as a box that lost some members to another criterion: only those members are drawn,
1762
+ * joined to the box where that encloses nothing foreign (ADR 0022 §3). The box shows the rest.
1763
+ */
1764
+ keptBox: number, summary: string, };
1701
1765
 
1702
1766
  export type SceneNode = {
1703
1767
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arqlet/contracts",
3
- "version": "0.8.0",
3
+ "version": "0.9.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",