@weasel-js/diagram 1.9.4 → 1.10.1

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.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export { j as BodyFloor, k as BodyNodeSpec, B as BodySpec, l as Bounds, m as BuildBodyOptions, C as COMPASS, p as DEFAULT_NODE_GAP, q as DEFAULT_PORTS, r as DEFAULT_RANK_GAP, f as DiagramNode, u as ForceBody, F as ForceOptions, v as ForceRelaxation, i as Graph, w as GraphEdge, y as GraphNode, E as LayoutAxes, H as LayoutDirection, L as LayoutFn, g as LayoutOptions, h as LayoutResult, M as MeasureRowText, O as Outline, P as Port, c as PortAnchor, e as PortSpec, a as PortsOptions, R as Row, I as RowBox, J as RowNodeData, K as RowPort, N as RowPortBox, Q as RowTextStyle, S as Slot, T as axesFor, U as backEdges, V as bodyOutline, X as boxForContent, Y as buildBody, _ as canvasMeasure, $ as contentBox, av as extent, a4 as force, a5 as forceRelaxation, a6 as forestOf, a7 as graphOrder, aa as layered, ab as layoutBody, ac as layoutRowPorts, ad as measureBody, ae as outlinePath, af as outlinePolyline, ag as packAcross, ai as pinnedSet, aj as portOf, ak as portsOf, al as portsOnOutline, an as ranksOf, ao as rayHit, ap as seededOrder, aq as settle, ar as sizeToBody, as as translated, at as tree, au as untilSettled } from './layout.entry-DyKFfHG5.js';
1
+ export { k as BodyFloor, l as BodyNodeSpec, B as BodySpec, m as Bounds, n as BuildBodyOptions, C as COMPASS, q as DEFAULT_NODE_GAP, r as DEFAULT_PORTS, s as DEFAULT_RANK_GAP, f as DiagramNode, v as ForceBody, F as ForceOptions, w as ForceRelaxation, i as Graph, y as GraphEdge, A as GraphNode, I as LayoutAxes, j as LayoutDirection, L as LayoutFn, g as LayoutOptions, h as LayoutResult, M as MeasureRowText, O as Outline, P as Port, c as PortAnchor, e as PortSpec, a as PortsOptions, R as Row, J as RowBox, K as RowNodeData, N as RowPort, Q as RowPortBox, S as RowTextStyle, T as Slot, U as axesFor, V as backEdges, W as bodyOutline, Y as boxForContent, Z as buildBody, $ as canvasMeasure, a0 as contentBox, aw as extent, a5 as force, a6 as forceRelaxation, a7 as forestOf, a8 as graphOrder, ab as layered, ac as layoutBody, ad as layoutRowPorts, ae as measureBody, af as outlinePath, ag as outlinePolyline, ah as packAcross, aj as pinnedSet, ak as portOf, al as portsOf, am as portsOnOutline, ao as ranksOf, ap as rayHit, aq as seededOrder, ar as settle, as as sizeToBody, at as translated, au as tree, av as untilSettled } from './layout.entry-BUkiRKuX.js';
2
2
  import '@weasel-js/geom';
3
3
  import '@weasel-js/core/math';
4
+ import '@weasel-js/simulation';
@@ -1,5 +1,6 @@
1
1
  import * as _weasel_js_geom from '@weasel-js/geom';
2
- import { Path, PoseDescriptor, Vec2, SimulationNode, createSimulation } from '@weasel-js/core/math';
2
+ import { Path, PoseDescriptor, Vec2 } from '@weasel-js/core/math';
3
+ import { SimulationNode, createSimulation } from '@weasel-js/simulation';
3
4
 
4
5
  /**
5
6
  * The shapes a built body can wear, as paths in the node's bounds.
@@ -56,18 +57,15 @@ declare function boxForContent(outline: Outline, content: {
56
57
  /**
57
58
  * Reading the `DiagramNode` trait off a scene node.
58
59
  *
59
- * Two ways to attach it, both of which this module's default reader answers:
60
+ * Two ways to attach it:
60
61
  *
61
- * - **On the node.** `data.diagram` holds the trait. One node, one answer;
62
- * what a connect gesture writes when the author drags a new edge.
62
+ * - **On the node.** `data.diagram` holds the trait.
63
63
  * - **By kind.** A consumer declares once which data shapes take part, and
64
- * every matching node gets the trait without being stamped. This mirrors
65
- * `createNodeRouting` in the kit — a predicate over `data`, first match
66
- * wins — and is the shape to reach for when the participants are a class
67
- * of node rather than a hand-picked set.
64
+ * every matching node gets the trait without being stamped — a predicate
65
+ * over `data`, first match wins.
68
66
  *
69
67
  * A reader is a plain function, so a consumer whose data lives somewhere else
70
- * entirely passes their own and never touches either form.
68
+ * passes their own.
71
69
  */
72
70
 
73
71
  /** The key on a node's `data` the default reader looks under. */
@@ -98,17 +96,13 @@ interface DiagramNodeEntry {
98
96
  * An edge's trait lives under the same key, so `from` and `to` are what tells
99
97
  * the two apart. Without that test an edge reads as a participant declaring
100
98
  * no ports, and collects the four defaults on the degenerate pose an edge
101
- * carries — four grabbable ports in the middle of nowhere. An edge label's
102
- * `label` trait and an anchored node's `anchor` are the same story, and would
103
- * also take a slot in every layout. */
99
+ * carries. An edge label's `label` trait and an anchored node's `anchor` are
100
+ * excluded the same way. */
104
101
  declare const dataKeyReader: DiagramNodeReader;
105
102
  /**
106
103
  * A reader over declared kinds. A trait on the node's own data still wins, so
107
- * a single node can opt out of, or override, whatever its kind says.
108
- *
109
- * Throws on a duplicate `name`, for the reason `mergeContributions` does: a
110
- * class of node silently losing its ports is what this registry exists to make
111
- * loud.
104
+ * a single node can opt out of, or override, whatever its kind says. Throws on
105
+ * a duplicate `name`.
112
106
  */
113
107
  declare function createDiagramNodes(entries: readonly DiagramNodeEntry[]): DiagramNodeReader;
114
108
  /** The trait `node` carries, through `read` (default: its own `data.diagram`). */
@@ -119,15 +113,10 @@ declare function isPinned(node: DiagramNodeLike, read?: DiagramNodeReader): bool
119
113
  /**
120
114
  * `Graph` — the adjacency index a layout runs over.
121
115
  *
122
- * The scene is the document, so there is no second graph kept in sync with it:
123
- * this one is built from the scene on demand, used, and thrown away. Rebuilding
124
- * per layout invocation is deliberate — a maintained index is a cache to
125
- * invalidate on every add, delete, reparent and `dependsOn` edit, and layout is
126
- * not on the hot path. Measure before changing that.
127
- *
128
- * A node's *identity* is its id and its *size* is its bounds; where it currently
129
- * sits is here too, because a re-layout that ignores where things already are
130
- * scrambles a diagram the author has arranged.
116
+ * Built from the scene on demand, used, and thrown away. Rebuilding per layout
117
+ * invocation is deliberate — a maintained index is a cache to invalidate on
118
+ * every add, delete, reparent, and `dependsOn` edit, and layout is not on the
119
+ * hot path.
131
120
  */
132
121
 
133
122
  /** A scene node as the graph reads it. `dependsOn` is what an edge's two
@@ -161,6 +150,9 @@ interface GraphGroup {
161
150
  members: readonly string[];
162
151
  /** Room the box keeps around what it holds, in world units. */
163
152
  inset: GroupInset;
153
+ /** The narrowest its box may be across the world x axis, which a layout
154
+ * leaves room for. */
155
+ minWidth?: number;
164
156
  /** The group this one is directly inside. */
165
157
  parent?: string;
166
158
  }
@@ -175,8 +167,7 @@ interface GraphEdge {
175
167
  * Nodes, edges, and the two adjacency reads a layout needs.
176
168
  *
177
169
  * Every list is in source order — render order, when the source is a scene —
178
- * which is what a layout's tiebreaks resolve against. There is no RNG anywhere
179
- * downstream of this, and this is where that starts.
170
+ * which is what a layout's tiebreaks resolve against.
180
171
  */
181
172
  interface Graph {
182
173
  readonly nodes: readonly GraphNode[];
@@ -202,9 +193,8 @@ interface BuildGraphOptions<TPose> {
202
193
  * dependencies; a group if its trait carries `group`, with its dependencies as
203
194
  * its members, which may be groups themselves (see `nestGroups`); a participant if the reader hands back any other
204
195
  * `DiagramNode`; and otherwise not in the diagram at all. An edge whose
205
- * endpoints are not both participants or groups is dropped — a dangling edge
206
- * should not be ranking anything — and an edge to a group ranks against its
207
- * members (see `expandGroupEdges`).
196
+ * endpoints are not both participants or groups is dropped, and an edge to a
197
+ * group ranks against its members (see `expandGroupEdges`).
208
198
  */
209
199
  declare function buildGraph<TPose>(source: GraphSource<TPose>, opts?: BuildGraphOptions<TPose>): Graph;
210
200
 
@@ -213,24 +203,19 @@ declare function buildGraph<TPose>(source: GraphSource<TPose>, opts?: BuildGraph
213
203
  *
214
204
  * A layout is a pure function of the graph — no scene, no ops, no history. It
215
205
  * hands back the new top-left for every node that **moves**, and a node already
216
- * standing where the layout wants it is simply absent from the answer. That is
217
- * what makes re-running a layout free rather than destructive, and it is the
218
- * property the idempotence test asserts.
206
+ * standing where the layout wants it is absent from the answer.
219
207
  *
220
- * Three rules keep re-layout non-destructive, and all three live here rather
221
- * than in each algorithm:
208
+ * Three rules keep re-layout non-destructive:
222
209
  *
223
210
  * - **No RNG anywhere.** Every tiebreak falls back to the graph's own node
224
- * order, which is the source's order — render order, for a scene.
211
+ * order.
225
212
  * - **Within-rank order is seeded from where the nodes already are**, read
226
- * off the cross axis, rather than from crossing-minimization. An author who
227
- * dragged two boxes into an order gets that order back.
213
+ * off the cross axis, rather than from crossing-minimization.
228
214
  * - **A pin set nothing moves.** Pinned nodes are never in the result, and
229
215
  * the rest of the layout is translated to sit around them.
230
216
  *
231
- * `layered` and `tree` are idempotent by construction: the second run reads the
232
- * order the first run produced and computes the same slots. `force` is an
233
- * iterative relaxation and makes no such claim — re-running it keeps relaxing.
217
+ * `layered` and `tree` are idempotent; `force` is an iterative relaxation and
218
+ * re-running it keeps relaxing.
234
219
  */
235
220
 
236
221
  /** Which way the ranks stack. `force` ignores it. */
@@ -287,18 +272,13 @@ interface Slot {
287
272
  rank: number;
288
273
  }
289
274
  /**
290
- * Turn canonical slots into the positions to write.
291
- *
292
- * Three steps, in order: map the canonical frame onto the world axes the
293
- * direction names; translate the whole layout so it lands where the graph
294
- * already is; drop everything that is pinned or that would not move.
275
+ * Turn canonical slots into the positions to write: map the canonical frame
276
+ * onto the world axes, translate the whole layout so it lands where the graph
277
+ * already is, and drop everything that is pinned or that would not move.
295
278
  *
296
- * The translation is what makes the layout non-destructive, and it is chosen so
297
- * that a second run lands on the same answer. With a pin, it is whatever keeps
298
- * the first pinned node exactly where it is. Without one, it is whatever puts
299
- * the layout's own bounding box where the graph's bounding box already starts —
300
- * which the first run then makes true, so the second run computes the same
301
- * translation and writes nothing.
279
+ * With a pin, the translation keeps the first pinned node exactly where it is.
280
+ * Without one, it puts the layout's bounding box where the graph's already
281
+ * starts, so a second run computes the same translation and writes nothing.
302
282
  */
303
283
  declare function settle(graph: Graph, slots: ReadonlyMap<string, Slot>, opts?: LayoutOptions): LayoutResult;
304
284
  /**
@@ -306,24 +286,18 @@ declare function settle(graph: Graph, slots: ReadonlyMap<string, Slot>, opts?: L
306
286
  * each node.
307
287
  *
308
288
  * A layout that keeps groups together can move an outsider out of a group's
309
- * column, which changes the order the next run would start from. Its answer
310
- * has to be the arrangement a re-run keeps, so it re-runs here rather than
311
- * leaving the second pass to the caller. `passes` bounds an arrangement that
312
- * never comes to rest.
289
+ * column, which changes the order the next run would start from. `passes`
290
+ * bounds an arrangement that never comes to rest.
313
291
  */
314
292
  declare function untilSettled(once: LayoutFn, graph: Graph, opts?: LayoutOptions, passes?: number): LayoutResult;
315
293
  /**
316
294
  * {@link settle}'s second half, for a layout that already works in world
317
- * coordinates — `force` does, since the integrator moves points around rather
318
- * than filling slots.
295
+ * coordinates.
319
296
  */
320
297
  declare function translated(graph: Graph, placed: ReadonlyMap<string, Vec2>, pinned: ReadonlySet<string>, tolerance?: number): LayoutResult;
321
298
  /**
322
299
  * Lay a list of nodes out along the cross axis, in the order given, and hand
323
300
  * back each one's low corner plus the total span.
324
- *
325
- * Shared by `layered`'s ranks and `tree`'s sibling rows, which pack a row the
326
- * same way and differ only in what decides the order.
327
301
  */
328
302
  declare function packAcross(nodes: readonly GraphNode[], axis: 'x' | 'y', gap: number): {
329
303
  at: Map<string, number>;
@@ -345,7 +319,7 @@ declare function graphOrder(graph: Graph): (id: string) => number;
345
319
  * to its last — including a rank in between that holds none of its members, or
346
320
  * an outsider would land inside the box there. Groups keep one cross position
347
321
  * across every rank, so two groups' columns never cross and their boxes never
348
- * overlap. Ungrouped nodes pack around the columns rank by rank, as before.
322
+ * overlap. Ungrouped nodes pack around the columns rank by rank.
349
323
  *
350
324
  * A group may be a member of another: its column then sits inside its parent's.
351
325
  */
@@ -440,6 +414,9 @@ interface DiagramGroup {
440
414
  /** Room the box keeps around its members, in world units: one number for
441
415
  * every side, or per side. Default 12 on each. */
442
416
  inset?: number | Partial<GroupInset>;
417
+ /** The narrowest the box may be, in world units, as room for its label.
418
+ * A box its members leave narrower grows evenly on both sides. */
419
+ minWidth?: number;
443
420
  }
444
421
  /** A port resolved against a node's current pose: where it is in world
445
422
  * coordinates, and which way an edge leaves it. */
@@ -468,9 +445,7 @@ type Row =
468
445
  value: string;
469
446
  style?: RowTextStyle;
470
447
  }
471
- /** A row that carries ports on its own left and right edges — the
472
- * visual-programming shape, where an operator's inputs line up with the
473
- * rows they feed. */
448
+ /** A row that carries ports on its own left and right edges. */
474
449
  | {
475
450
  kind: 'ports';
476
451
  left?: readonly RowPort[];
@@ -566,8 +541,7 @@ declare function canvasMeasure(ctx: {
566
541
  declare function measureBody(spec: BodySpec, measure?: MeasureRowText): BodyFloor;
567
542
  /**
568
543
  * The authored size, grown to fit the body. Never shrinks: a row removed
569
- * leaves the node the size the author last saw it at, which is the only
570
- * behavior that survives a resize the author did on purpose.
544
+ * leaves the node the size the author last saw it at.
571
545
  */
572
546
  declare function sizeToBody<TPose extends Bounds>(pose: TPose, floor: BodyFloor): TPose;
573
547
  /** Where each row sits inside `bounds`, top to bottom. Rows keep their
@@ -575,8 +549,7 @@ declare function sizeToBody<TPose extends Bounds>(pose: TPose, floor: BodyFloor)
575
549
  * places the block of them within it. */
576
550
  declare function layoutBody(spec: BodySpec, bounds: Bounds, measure?: MeasureRowText): RowBox[];
577
551
  /**
578
- * Where each of a `ports` row's ports goes inside `box`, on the same terms
579
- * `layoutBody` gives one box per row.
552
+ * Where each of a `ports` row's ports goes inside `box`.
580
553
  *
581
554
  * Both sides are cut into the same number of slots — the longer side's count —
582
555
  * so the nth input faces the nth output whichever side has more. A label box
@@ -592,13 +565,12 @@ declare function layoutRowPorts(row: Extract<Row, {
592
565
  * left or right edge.
593
566
  *
594
567
  * Anchors are normalized against `bounds`, so they survive the node being
595
- * resized — which is the whole reason `PortAnchor` is normalized.
568
+ * resized.
596
569
  *
597
570
  * **A row port on a side takes that side's compass default with it.** Both sit
598
571
  * on the same edge, and a row near the vertical middle puts one exactly on top
599
572
  * of `w` or `e` — where the later region wins the hit and the other is
600
- * grabbable nowhere. A body that declares where its inputs attach has said what
601
- * that side is for.
573
+ * grabbable nowhere.
602
574
  */
603
575
  declare function bodyTrait(spec: BodySpec, bounds: Bounds, measure?: MeasureRowText): DiagramNode;
604
576
  /** The outline path for a built body at `bounds` — what paints it, and what a
@@ -626,8 +598,7 @@ interface BuildBodyOptions<TData, TLayer extends string, TPose extends Bounds> {
626
598
  /** One row's data, or `null` to leave that row undrawn. */
627
599
  row: RowNodeData<TData>;
628
600
  /** One row port's label, or `null` to leave it undrawn. Ports with no
629
- * `label` are never offered. Omit to draw none — a body whose ports are
630
- * named only for the width they claim needs nothing here. */
601
+ * `label` are never offered. Omit to draw none. */
631
602
  portLabel?: (text: string, box: RowPortBox) => TData | null;
632
603
  }
633
604
  /**
@@ -635,13 +606,9 @@ interface BuildBodyOptions<TData, TLayer extends string, TPose extends Bounds> {
635
606
  * leaf per row that wants drawing.
636
607
  *
637
608
  * Rows are ordinary scene nodes rather than something this package paints, so
638
- * the kit's own text painter draws them and text editing, styling and
639
- * selection work on them unchanged. The walk that places them is
640
- * `layoutBody` — the same one `bodyTrait` anchors its row ports against, which
641
- * is why a label and its ports cannot drift apart.
642
- *
643
- * The pose is `sizeToBody(at, measureBody(spec))`: the body measures a floor
644
- * and the authored size is grown to clear it, never shrunk.
609
+ * the kit's own text painter draws them and text editing, styling, and
610
+ * selection work on them unchanged. The returned pose is `at` grown to fit the
611
+ * body, never shrunk.
645
612
  */
646
613
  declare function buildBody<TData, TLayer extends string, TPose extends Bounds>(spec: BodySpec, at: TPose, opts: BuildBodyOptions<TData, TLayer, TPose>): {
647
614
  pose: TPose;
@@ -724,15 +691,10 @@ declare function portOf<TPose>(node: DiagramNodeLike, pose: TPose, portId: strin
724
691
  * Seeded from where the nodes already are rather than from a fresh random
725
692
  * scatter: an author who has arranged half a diagram gets that arrangement
726
693
  * relaxed, not replaced. There is no RNG in it at all — two coincident nodes
727
- * are separated along a golden-angle spiral keyed to their index, which is what
728
- * a random jiggle is for elsewhere.
694
+ * are separated along a golden-angle spiral keyed to their index.
729
695
  *
730
- * The integrator is the kit's own `createSimulation`, the same one
731
- * `useSimulation` runs a frame at a time. Only the forces are local, and they
732
- * are the naive O(n²) kind — right for the tens-to-hundreds of nodes an
733
- * edge-per-scene-node diagram is already sized for, wrong for a 10k-node graph,
734
- * which wants d3-force's Barnes–Hut through `useSimulation` and its own render
735
- * layer.
696
+ * The forces are the naive O(n²) kind — right for tens to hundreds of nodes,
697
+ * wrong for a 10k-node graph.
736
698
  *
737
699
  * **This is the one layout that is not idempotent.** A relaxation re-run from
738
700
  * its own output keeps relaxing; `direction` means nothing to it. Pins and the
@@ -769,10 +731,6 @@ interface ForceBody extends SimulationNode {
769
731
  }
770
732
  /**
771
733
  * The bodies and the force list, wound up and ready to tick.
772
- *
773
- * Shared by the one-shot `force` below and the live relaxation in `live.ts`,
774
- * which ticks it a frame at a time. Two copies of a force list drift, and the
775
- * only thing that would say so is the arrangement they produce.
776
734
  */
777
735
  interface ForceRelaxation {
778
736
  bodies: ForceBody[];
@@ -804,6 +762,7 @@ declare function ranksOf(graph: Graph, back: ReadonlySet<string>): Map<string, n
804
762
  * moves nothing — except under `order: 'barycenter'`, which reorders them. */
805
763
  declare const layered: LayoutFn;
806
764
 
765
+ /** A graph read as trees: its roots, each node's children in order, and each node's depth. */
807
766
  interface Forest {
808
767
  roots: GraphNode[];
809
768
  children: Map<string, GraphNode[]>;
@@ -843,4 +802,4 @@ declare function rayHit(poly: readonly number[], center: {
843
802
  */
844
803
  declare function portsOnOutline(ports: readonly Port[], outline: Outline, bounds: Bounds): Port[];
845
804
 
846
- export { contentBox as $, type GroupInset as A, type BodySpec as B, COMPASS as C, type DiagramNodeLike as D, type LayoutAxes as E, type ForceOptions as F, type GraphSource as G, type LayoutDirection as H, type RowBox as I, type RowNodeData as J, type RowPort as K, type LayoutFn as L, type MeasureRowText as M, type RowPortBox as N, type Outline as O, type Port as P, type RowTextStyle as Q, type Row as R, type Slot as S, axesFor as T, backEdges as U, bodyOutline as V, bodyTrait as W, boxForContent as X, buildBody as Y, buildGraph as Z, canvasMeasure as _, type PortsOptions as a, createDiagramNodes as a0, dataKeyReader as a1, diagramNodeOf as a2, expandGroupEdges as a3, force as a4, forceRelaxation as a5, forestOf as a6, graphOrder as a7, insetOf as a8, isPinned as a9, layered as aa, layoutBody as ab, layoutRowPorts as ac, measureBody as ad, outlinePath as ae, outlinePolyline as af, packAcross as ag, packClusters as ah, pinnedSet as ai, portOf as aj, portsOf as ak, portsOnOutline as al, rankGaps as am, ranksOf as an, rayHit as ao, seededOrder as ap, settle as aq, sizeToBody as ar, translated as as, tree as at, untilSettled as au, extent as av, type DiagramNodeReader as b, type PortAnchor as c, type DiagramGroup as d, type PortSpec as e, type DiagramNode as f, type LayoutOptions as g, type LayoutResult as h, type Graph as i, type BodyFloor as j, type BodyNodeSpec as k, type Bounds as l, type BuildBodyOptions as m, type BuildGraphOptions as n, DEFAULT_GROUP_INSET as o, DEFAULT_NODE_GAP as p, DEFAULT_PORTS as q, DEFAULT_RANK_GAP as r, DIAGRAM_TRAIT_KEY as s, type DiagramNodeEntry as t, type ForceBody as u, type ForceRelaxation as v, type GraphEdge as w, type GraphGroup as x, type GraphNode as y, type GraphNodeLike as z };
805
+ export { canvasMeasure as $, type GraphNode as A, type BodySpec as B, COMPASS as C, type DiagramNodeLike as D, type GraphNodeLike as E, type ForceOptions as F, type GraphSource as G, type GroupInset as H, type LayoutAxes as I, type RowBox as J, type RowNodeData as K, type LayoutFn as L, type MeasureRowText as M, type RowPort as N, type Outline as O, type Port as P, type RowPortBox as Q, type Row as R, type RowTextStyle as S, type Slot as T, axesFor as U, backEdges as V, bodyOutline as W, bodyTrait as X, boxForContent as Y, buildBody as Z, buildGraph as _, type PortsOptions as a, contentBox as a0, createDiagramNodes as a1, dataKeyReader as a2, diagramNodeOf as a3, expandGroupEdges as a4, force as a5, forceRelaxation as a6, forestOf as a7, graphOrder as a8, insetOf as a9, isPinned as aa, layered as ab, layoutBody as ac, layoutRowPorts as ad, measureBody as ae, outlinePath as af, outlinePolyline as ag, packAcross as ah, packClusters as ai, pinnedSet as aj, portOf as ak, portsOf as al, portsOnOutline as am, rankGaps as an, ranksOf as ao, rayHit as ap, seededOrder as aq, settle as ar, sizeToBody as as, translated as at, tree as au, untilSettled as av, extent as aw, type DiagramNodeReader as b, type PortAnchor as c, type DiagramGroup as d, type PortSpec as e, type DiagramNode as f, type LayoutOptions as g, type LayoutResult as h, type Graph as i, type LayoutDirection as j, type BodyFloor as k, type BodyNodeSpec as l, type Bounds as m, type BuildBodyOptions as n, type BuildGraphOptions as o, DEFAULT_GROUP_INSET as p, DEFAULT_NODE_GAP as q, DEFAULT_PORTS as r, DEFAULT_RANK_GAP as s, DIAGRAM_TRAIT_KEY as t, type DiagramNodeEntry as u, type ForceBody as v, type ForceRelaxation as w, type Forest as x, type GraphEdge as y, type GraphGroup as z };
package/dist/layout.js CHANGED
@@ -1,3 +1,3 @@
1
- export { COMPASS, DEFAULT_NODE_GAP, DEFAULT_PORTS, DEFAULT_RANK_GAP, axesFor, backEdges, bodyOutline, boxForContent, buildBody, canvasMeasure, contentBox, extent, force, forceRelaxation, forestOf, graphOrder, layered, layoutBody, layoutRowPorts, measureBody, outlinePath, outlinePolyline, packAcross, pinnedSet, portOf, portsOf, portsOnOutline, ranksOf, rayHit, seededOrder, settle, sizeToBody, translated, tree, untilSettled } from './chunk-EDSBULQM.js';
1
+ export { COMPASS, DEFAULT_NODE_GAP, DEFAULT_PORTS, DEFAULT_RANK_GAP, axesFor, backEdges, bodyOutline, boxForContent, buildBody, canvasMeasure, contentBox, extent, force, forceRelaxation, forestOf, graphOrder, layered, layoutBody, layoutRowPorts, measureBody, outlinePath, outlinePolyline, packAcross, pinnedSet, portOf, portsOf, portsOnOutline, ranksOf, rayHit, seededOrder, settle, sizeToBody, translated, tree, untilSettled } from './chunk-JZ4CVLAB.js';
2
2
  //# sourceMappingURL=layout.js.map
3
3
  //# sourceMappingURL=layout.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weasel-js/diagram",
3
- "version": "1.9.4",
3
+ "version": "1.10.1",
4
4
  "description": "Node-link diagramming for weasel: any scene node becomes a diagram participant, with ports on its perimeter and an optional body builder for flowchart-shaped boxes.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,9 +21,11 @@
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=18",
24
- "@weasel-js/core": "1.9.4",
25
- "@weasel-js/font": "1.9.4",
26
- "@weasel-js/geom": "1.9.4"
24
+ "@weasel-js/animator": "1.10.1",
25
+ "@weasel-js/core": "1.10.1",
26
+ "@weasel-js/font": "1.10.1",
27
+ "@weasel-js/geom": "1.10.1",
28
+ "@weasel-js/simulation": "1.10.1"
27
29
  },
28
30
  "author": "orochi235",
29
31
  "homepage": "https://orochi235.github.io/weasel/",