@adecore/diagram 0.54.2 → 0.54.3

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/layout.js CHANGED
@@ -63,9 +63,9 @@ function sizeOfEdgeLabel(text) {
63
63
  }
64
64
  /*
65
65
  * The layer of every node: the longest path to it from a node without incoming edges. A cycle has
66
- * no such path, so it is broken first by a depth-first walk in file order (sources first, then every
67
- * node still unvisited) and every edge that points back at a node still on the walk is left out of
68
- * the layering. The walk only depends on the order of the file, so the same file breaks the same edges.
66
+ * no such path, so a depth-first walk in file order (sources first, then every node still unvisited)
67
+ * breaks it first. Every edge that points back at a node still on the walk stays out of the layering.
68
+ * The walk only depends on the order of the file, so the same file breaks the same edges.
69
69
  */
70
70
  export function layersOf(nodes, edges) {
71
71
  const known = new Set(nodes.map((node) => node.id));
package/dist/order.js CHANGED
@@ -3,10 +3,10 @@ import { bandCode, bandOfCode } from './graph.js';
3
3
  const SWEEPS = 12;
4
4
  /*
5
5
  * The order inside every layer, in place. A unit moves to the average position of the units it is
6
- * joined to in the layer it was compared with, a tie keeps the order it had (file order to begin
6
+ * joined to in the layer it was compared with. A tie keeps the order it had (file order to begin
7
7
  * with), and the members of a group stay together as one block. The blocks of groups keep one order
8
- * in every layer, and a unit that is not in a group stays on the same side of a group from one layer
9
- * to the next inside it, so no hop has to cross a group it does not belong to.
8
+ * in every layer. A unit outside a group stays on the same side of that group in every layer the
9
+ * group spans, so no hop has to cross a group it does not belong to.
10
10
  */
11
11
  export function orderLayers(layering) {
12
12
  const { units, hops, bands, items } = layering;
package/dist/route.js CHANGED
@@ -57,7 +57,7 @@ function sketchOf(hop, track) {
57
57
  /*
58
58
  * The inside of one channel between two layers. Every hop that changes place across the flow gets a
59
59
  * vertical track of its own where its range meets another's, in the order that crosses the fewest
60
- * lines; labels go in a lane before the tracks, beside the line their hop leaves on, and the lane
60
+ * lines. Labels go in a lane before the tracks, beside the line their hop leaves on, and the lane
61
61
  * grows a column where two labels would otherwise cover each other.
62
62
  */
63
63
  export function routeChannel(input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/diagram",
3
- "version": "0.54.2",
3
+ "version": "0.54.3",
4
4
  "description": "Directed graph schemas, layered layout, SVG export and reading order.",
5
5
  "license": "FSL-1.1-MIT",
6
6
  "author": "Bas Milius",
@@ -45,7 +45,7 @@
45
45
  "typescript": "^7.0.2"
46
46
  },
47
47
  "dependencies": {
48
- "@adecore/drawing": "0.54.2",
48
+ "@adecore/drawing": "0.54.3",
49
49
  "zod": "^4.6.7"
50
50
  }
51
51
  }
package/src/layout.ts CHANGED
@@ -126,9 +126,9 @@ function sizeOfEdgeLabel(text: string): { w: number; h: number; lines: string[]
126
126
 
127
127
  /*
128
128
  * The layer of every node: the longest path to it from a node without incoming edges. A cycle has
129
- * no such path, so it is broken first by a depth-first walk in file order (sources first, then every
130
- * node still unvisited) and every edge that points back at a node still on the walk is left out of
131
- * the layering. The walk only depends on the order of the file, so the same file breaks the same edges.
129
+ * no such path, so a depth-first walk in file order (sources first, then every node still unvisited)
130
+ * breaks it first. Every edge that points back at a node still on the walk stays out of the layering.
131
+ * The walk only depends on the order of the file, so the same file breaks the same edges.
132
132
  */
133
133
  export function layersOf(nodes: readonly Pick<DiagramNode, 'id'>[], edges: readonly Pick<DiagramEdge, 'from' | 'to'>[]): Map<string, number> {
134
134
  const known = new Set(nodes.map((node) => node.id));
package/src/order.ts CHANGED
@@ -5,10 +5,10 @@ const SWEEPS = 12;
5
5
 
6
6
  /*
7
7
  * The order inside every layer, in place. A unit moves to the average position of the units it is
8
- * joined to in the layer it was compared with, a tie keeps the order it had (file order to begin
8
+ * joined to in the layer it was compared with. A tie keeps the order it had (file order to begin
9
9
  * with), and the members of a group stay together as one block. The blocks of groups keep one order
10
- * in every layer, and a unit that is not in a group stays on the same side of a group from one layer
11
- * to the next inside it, so no hop has to cross a group it does not belong to.
10
+ * in every layer. A unit outside a group stays on the same side of that group in every layer the
11
+ * group spans, so no hop has to cross a group it does not belong to.
12
12
  */
13
13
  export function orderLayers(layering: Layering): void {
14
14
  const { units, hops, bands, items } = layering;
package/src/route.ts CHANGED
@@ -106,7 +106,7 @@ function sketchOf(hop: ChannelHop, track: number): Point[] {
106
106
  /*
107
107
  * The inside of one channel between two layers. Every hop that changes place across the flow gets a
108
108
  * vertical track of its own where its range meets another's, in the order that crosses the fewest
109
- * lines; labels go in a lane before the tracks, beside the line their hop leaves on, and the lane
109
+ * lines. Labels go in a lane before the tracks, beside the line their hop leaves on, and the lane
110
110
  * grows a column where two labels would otherwise cover each other.
111
111
  */
112
112
  export function routeChannel(input: ChannelInput): ChannelResult {