@weasel-js/diagram 1.9.4 → 1.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/README.md +2 -2
- package/dist/{chunk-EDSBULQM.js → chunk-BWQJYEA3.js} +4 -3
- package/dist/chunk-BWQJYEA3.js.map +1 -0
- package/dist/index.d.ts +83 -150
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +2 -1
- package/dist/{layout.entry-DyKFfHG5.d.ts → layout.entry-CIdRpG2i.d.ts} +48 -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 { 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,
|
|
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, x as GraphEdge, z as GraphNode, H as LayoutAxes, I 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-CIdRpG2i.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
|
|
@@ -175,8 +164,7 @@ interface GraphEdge {
|
|
|
175
164
|
* Nodes, edges, and the two adjacency reads a layout needs.
|
|
176
165
|
*
|
|
177
166
|
* 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.
|
|
167
|
+
* which is what a layout's tiebreaks resolve against.
|
|
180
168
|
*/
|
|
181
169
|
interface Graph {
|
|
182
170
|
readonly nodes: readonly GraphNode[];
|
|
@@ -202,9 +190,8 @@ interface BuildGraphOptions<TPose> {
|
|
|
202
190
|
* dependencies; a group if its trait carries `group`, with its dependencies as
|
|
203
191
|
* its members, which may be groups themselves (see `nestGroups`); a participant if the reader hands back any other
|
|
204
192
|
* `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`).
|
|
193
|
+
* endpoints are not both participants or groups is dropped, and an edge to a
|
|
194
|
+
* group ranks against its members (see `expandGroupEdges`).
|
|
208
195
|
*/
|
|
209
196
|
declare function buildGraph<TPose>(source: GraphSource<TPose>, opts?: BuildGraphOptions<TPose>): Graph;
|
|
210
197
|
|
|
@@ -213,24 +200,19 @@ declare function buildGraph<TPose>(source: GraphSource<TPose>, opts?: BuildGraph
|
|
|
213
200
|
*
|
|
214
201
|
* A layout is a pure function of the graph — no scene, no ops, no history. It
|
|
215
202
|
* 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.
|
|
203
|
+
* standing where the layout wants it is absent from the answer.
|
|
219
204
|
*
|
|
220
|
-
* Three rules keep re-layout non-destructive
|
|
221
|
-
* than in each algorithm:
|
|
205
|
+
* Three rules keep re-layout non-destructive:
|
|
222
206
|
*
|
|
223
207
|
* - **No RNG anywhere.** Every tiebreak falls back to the graph's own node
|
|
224
|
-
* order
|
|
208
|
+
* order.
|
|
225
209
|
* - **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.
|
|
210
|
+
* off the cross axis, rather than from crossing-minimization.
|
|
228
211
|
* - **A pin set nothing moves.** Pinned nodes are never in the result, and
|
|
229
212
|
* the rest of the layout is translated to sit around them.
|
|
230
213
|
*
|
|
231
|
-
* `layered` and `tree` are idempotent
|
|
232
|
-
*
|
|
233
|
-
* iterative relaxation and makes no such claim — re-running it keeps relaxing.
|
|
214
|
+
* `layered` and `tree` are idempotent; `force` is an iterative relaxation and
|
|
215
|
+
* re-running it keeps relaxing.
|
|
234
216
|
*/
|
|
235
217
|
|
|
236
218
|
/** Which way the ranks stack. `force` ignores it. */
|
|
@@ -287,18 +269,13 @@ interface Slot {
|
|
|
287
269
|
rank: number;
|
|
288
270
|
}
|
|
289
271
|
/**
|
|
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.
|
|
272
|
+
* Turn canonical slots into the positions to write: map the canonical frame
|
|
273
|
+
* onto the world axes, translate the whole layout so it lands where the graph
|
|
274
|
+
* already is, and drop everything that is pinned or that would not move.
|
|
295
275
|
*
|
|
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.
|
|
276
|
+
* With a pin, the translation keeps the first pinned node exactly where it is.
|
|
277
|
+
* Without one, it puts the layout's bounding box where the graph's already
|
|
278
|
+
* starts, so a second run computes the same translation and writes nothing.
|
|
302
279
|
*/
|
|
303
280
|
declare function settle(graph: Graph, slots: ReadonlyMap<string, Slot>, opts?: LayoutOptions): LayoutResult;
|
|
304
281
|
/**
|
|
@@ -306,24 +283,18 @@ declare function settle(graph: Graph, slots: ReadonlyMap<string, Slot>, opts?: L
|
|
|
306
283
|
* each node.
|
|
307
284
|
*
|
|
308
285
|
* 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.
|
|
286
|
+
* column, which changes the order the next run would start from. `passes`
|
|
287
|
+
* bounds an arrangement that never comes to rest.
|
|
313
288
|
*/
|
|
314
289
|
declare function untilSettled(once: LayoutFn, graph: Graph, opts?: LayoutOptions, passes?: number): LayoutResult;
|
|
315
290
|
/**
|
|
316
291
|
* {@link settle}'s second half, for a layout that already works in world
|
|
317
|
-
* coordinates
|
|
318
|
-
* than filling slots.
|
|
292
|
+
* coordinates.
|
|
319
293
|
*/
|
|
320
294
|
declare function translated(graph: Graph, placed: ReadonlyMap<string, Vec2>, pinned: ReadonlySet<string>, tolerance?: number): LayoutResult;
|
|
321
295
|
/**
|
|
322
296
|
* Lay a list of nodes out along the cross axis, in the order given, and hand
|
|
323
297
|
* 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
298
|
*/
|
|
328
299
|
declare function packAcross(nodes: readonly GraphNode[], axis: 'x' | 'y', gap: number): {
|
|
329
300
|
at: Map<string, number>;
|
|
@@ -345,7 +316,7 @@ declare function graphOrder(graph: Graph): (id: string) => number;
|
|
|
345
316
|
* to its last — including a rank in between that holds none of its members, or
|
|
346
317
|
* an outsider would land inside the box there. Groups keep one cross position
|
|
347
318
|
* across every rank, so two groups' columns never cross and their boxes never
|
|
348
|
-
* overlap. Ungrouped nodes pack around the columns rank by rank
|
|
319
|
+
* overlap. Ungrouped nodes pack around the columns rank by rank.
|
|
349
320
|
*
|
|
350
321
|
* A group may be a member of another: its column then sits inside its parent's.
|
|
351
322
|
*/
|
|
@@ -468,9 +439,7 @@ type Row =
|
|
|
468
439
|
value: string;
|
|
469
440
|
style?: RowTextStyle;
|
|
470
441
|
}
|
|
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. */
|
|
442
|
+
/** A row that carries ports on its own left and right edges. */
|
|
474
443
|
| {
|
|
475
444
|
kind: 'ports';
|
|
476
445
|
left?: readonly RowPort[];
|
|
@@ -566,8 +535,7 @@ declare function canvasMeasure(ctx: {
|
|
|
566
535
|
declare function measureBody(spec: BodySpec, measure?: MeasureRowText): BodyFloor;
|
|
567
536
|
/**
|
|
568
537
|
* 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.
|
|
538
|
+
* leaves the node the size the author last saw it at.
|
|
571
539
|
*/
|
|
572
540
|
declare function sizeToBody<TPose extends Bounds>(pose: TPose, floor: BodyFloor): TPose;
|
|
573
541
|
/** Where each row sits inside `bounds`, top to bottom. Rows keep their
|
|
@@ -575,8 +543,7 @@ declare function sizeToBody<TPose extends Bounds>(pose: TPose, floor: BodyFloor)
|
|
|
575
543
|
* places the block of them within it. */
|
|
576
544
|
declare function layoutBody(spec: BodySpec, bounds: Bounds, measure?: MeasureRowText): RowBox[];
|
|
577
545
|
/**
|
|
578
|
-
* Where each of a `ports` row's ports goes inside `box
|
|
579
|
-
* `layoutBody` gives one box per row.
|
|
546
|
+
* Where each of a `ports` row's ports goes inside `box`.
|
|
580
547
|
*
|
|
581
548
|
* Both sides are cut into the same number of slots — the longer side's count —
|
|
582
549
|
* so the nth input faces the nth output whichever side has more. A label box
|
|
@@ -592,13 +559,12 @@ declare function layoutRowPorts(row: Extract<Row, {
|
|
|
592
559
|
* left or right edge.
|
|
593
560
|
*
|
|
594
561
|
* Anchors are normalized against `bounds`, so they survive the node being
|
|
595
|
-
* resized
|
|
562
|
+
* resized.
|
|
596
563
|
*
|
|
597
564
|
* **A row port on a side takes that side's compass default with it.** Both sit
|
|
598
565
|
* on the same edge, and a row near the vertical middle puts one exactly on top
|
|
599
566
|
* of `w` or `e` — where the later region wins the hit and the other is
|
|
600
|
-
* grabbable nowhere.
|
|
601
|
-
* that side is for.
|
|
567
|
+
* grabbable nowhere.
|
|
602
568
|
*/
|
|
603
569
|
declare function bodyTrait(spec: BodySpec, bounds: Bounds, measure?: MeasureRowText): DiagramNode;
|
|
604
570
|
/** The outline path for a built body at `bounds` — what paints it, and what a
|
|
@@ -626,8 +592,7 @@ interface BuildBodyOptions<TData, TLayer extends string, TPose extends Bounds> {
|
|
|
626
592
|
/** One row's data, or `null` to leave that row undrawn. */
|
|
627
593
|
row: RowNodeData<TData>;
|
|
628
594
|
/** 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. */
|
|
595
|
+
* `label` are never offered. Omit to draw none. */
|
|
631
596
|
portLabel?: (text: string, box: RowPortBox) => TData | null;
|
|
632
597
|
}
|
|
633
598
|
/**
|
|
@@ -635,13 +600,9 @@ interface BuildBodyOptions<TData, TLayer extends string, TPose extends Bounds> {
|
|
|
635
600
|
* leaf per row that wants drawing.
|
|
636
601
|
*
|
|
637
602
|
* 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.
|
|
603
|
+
* the kit's own text painter draws them and text editing, styling, and
|
|
604
|
+
* selection work on them unchanged. The returned pose is `at` grown to fit the
|
|
605
|
+
* body, never shrunk.
|
|
645
606
|
*/
|
|
646
607
|
declare function buildBody<TData, TLayer extends string, TPose extends Bounds>(spec: BodySpec, at: TPose, opts: BuildBodyOptions<TData, TLayer, TPose>): {
|
|
647
608
|
pose: TPose;
|
|
@@ -724,15 +685,10 @@ declare function portOf<TPose>(node: DiagramNodeLike, pose: TPose, portId: strin
|
|
|
724
685
|
* Seeded from where the nodes already are rather than from a fresh random
|
|
725
686
|
* scatter: an author who has arranged half a diagram gets that arrangement
|
|
726
687
|
* 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.
|
|
688
|
+
* are separated along a golden-angle spiral keyed to their index.
|
|
729
689
|
*
|
|
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.
|
|
690
|
+
* The forces are the naive O(n²) kind — right for tens to hundreds of nodes,
|
|
691
|
+
* wrong for a 10k-node graph.
|
|
736
692
|
*
|
|
737
693
|
* **This is the one layout that is not idempotent.** A relaxation re-run from
|
|
738
694
|
* its own output keeps relaxing; `direction` means nothing to it. Pins and the
|
|
@@ -769,10 +725,6 @@ interface ForceBody extends SimulationNode {
|
|
|
769
725
|
}
|
|
770
726
|
/**
|
|
771
727
|
* 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
728
|
*/
|
|
777
729
|
interface ForceRelaxation {
|
|
778
730
|
bodies: ForceBody[];
|
|
@@ -804,6 +756,7 @@ declare function ranksOf(graph: Graph, back: ReadonlySet<string>): Map<string, n
|
|
|
804
756
|
* moves nothing — except under `order: 'barycenter'`, which reorders them. */
|
|
805
757
|
declare const layered: LayoutFn;
|
|
806
758
|
|
|
759
|
+
/** A graph read as trees: its roots, each node's children in order, and each node's depth. */
|
|
807
760
|
interface Forest {
|
|
808
761
|
roots: GraphNode[];
|
|
809
762
|
children: Map<string, GraphNode[]>;
|
|
@@ -843,4 +796,4 @@ declare function rayHit(poly: readonly number[], center: {
|
|
|
843
796
|
*/
|
|
844
797
|
declare function portsOnOutline(ports: readonly Port[], outline: Outline, bounds: Bounds): Port[];
|
|
845
798
|
|
|
846
|
-
export {
|
|
799
|
+
export { canvasMeasure as $, type GraphNodeLike as A, type BodySpec as B, COMPASS as C, type DiagramNodeLike as D, type GroupInset as E, type ForceOptions as F, type GraphSource as G, type LayoutAxes as H, type LayoutDirection 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 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 Forest as w, type GraphEdge as x, type GraphGroup as y, type GraphNode 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-BWQJYEA3.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.0",
|
|
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.0",
|
|
25
|
+
"@weasel-js/core": "1.10.0",
|
|
26
|
+
"@weasel-js/font": "1.10.0",
|
|
27
|
+
"@weasel-js/geom": "1.10.0",
|
|
28
|
+
"@weasel-js/simulation": "1.10.0"
|
|
27
29
|
},
|
|
28
30
|
"author": "orochi235",
|
|
29
31
|
"homepage": "https://orochi235.github.io/weasel/",
|