@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/README.md +13 -4
- package/dist/{chunk-EDSBULQM.js → chunk-JZ4CVLAB.js} +13 -5
- package/dist/chunk-JZ4CVLAB.js.map +1 -0
- package/dist/index.d.ts +152 -153
- package/dist/index.js +183 -50
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +2 -1
- package/dist/{layout.entry-DyKFfHG5.d.ts → layout.entry-BUkiRKuX.d.ts} +54 -95
- package/dist/layout.js +1 -1
- package/package.json +6 -4
- package/dist/chunk-EDSBULQM.js.map +0 -1
package/dist/layout.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export {
|
|
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
|
|
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
|
|
60
|
+
* Two ways to attach it:
|
|
60
61
|
*
|
|
61
|
-
* - **On the node.** `data.diagram` holds the trait.
|
|
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
|
|
65
|
-
*
|
|
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
|
-
*
|
|
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
|
|
102
|
-
*
|
|
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
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
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.
|
|
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
|
|
206
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
232
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
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.
|
|
310
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
640
|
-
*
|
|
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
|
|
728
|
-
* a random jiggle is for elsewhere.
|
|
694
|
+
* are separated along a golden-angle spiral keyed to their index.
|
|
729
695
|
*
|
|
730
|
-
* The
|
|
731
|
-
*
|
|
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 {
|
|
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-
|
|
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.
|
|
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/
|
|
25
|
-
"@weasel-js/
|
|
26
|
-
"@weasel-js/
|
|
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/",
|