@dpuse/dpuse-tool-d3-visualiser 1.0.122 → 1.0.123

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 CHANGED
@@ -238,17 +238,17 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
238
238
 
239
239
  | Chunk/Module/File | Composition |
240
240
  | :------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
241
- | **All 14 files** | 406.9 kB · gzip 119.8 kB |
242
- | **dist/tanStackCharts-DEINbmRi.js** | 125.4 kB · gzip 36.7 kB · 30.8% of the build |
241
+ | **All 14 files** | 412.8 kB · gzip 121.7 kB |
242
+ | **dist/tanStackCharts-DEINbmRi.js** | 125.4 kB · gzip 36.7 kB · 30.4% of the build |
243
243
  |     @tanstack/charts → dist/scene.js + 41 more | `██████████████████░░` 90.1% · 113.0 kB |
244
244
  |     d3-scale → src/band.js + 2 more | `░░░░░░░░░░░░░░░░░░░░` 1.7% · 2.1 kB |
245
245
  |     src → tanStackCharts.ts | `░░░░░░░░░░░░░░░░░░░░` 0.6% · 717 B |
246
246
  |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 7.7% · 9.6 kB |
247
- | **dist/erdDiagram-DmYSx8Dh.js** | 63.4 kB · gzip 18.4 kB · 15.6% of the build |
247
+ | **dist/erdDiagram-DmYSx8Dh.js** | 63.4 kB · gzip 18.4 kB · 15.4% of the build |
248
248
  |     @dagrejs/dagre → dist/dagre.esm.js | `██████████████████░░` 88.3% · 56.0 kB |
249
249
  |     src → erdDiagram.ts | `█░░░░░░░░░░░░░░░░░░░` 5.4% · 3.4 kB |
250
250
  |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 6.3% · 4.0 kB |
251
- | **dist/chordDiagram-Cm91Tmgo.js** | 56.8 kB · gzip 17.7 kB · 14.0% of the build |
251
+ | **dist/chordDiagram-Cm91Tmgo.js** | 56.8 kB · gzip 17.7 kB · 13.8% of the build |
252
252
  |     @unovis/ts → components/chord-diagram/index.js + 36 more | `██████████████░░░░░░` 71.0% · 40.3 kB |
253
253
  |     stylis → src/Parser.js + 5 more | `██░░░░░░░░░░░░░░░░░░` 8.4% · 4.8 kB |
254
254
  |     d3-chord → dist/d3-chord.mjs | `█░░░░░░░░░░░░░░░░░░░` 4.2% · 2.4 kB |
@@ -256,41 +256,41 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
256
256
  |     src → chordDiagram.ts | `░░░░░░░░░░░░░░░░░░░░` 0.8% · 494 B |
257
257
  |     d3-array → src/group.js + 1 more | `░░░░░░░░░░░░░░░░░░░░` 0.8% · 487 B |
258
258
  |     (bundler output, whitespace & JSON) | `███░░░░░░░░░░░░░░░░░` 13.5% · 7.6 kB |
259
- | **dist/d3-shape-gf8U18pS.js** | 36.9 kB · gzip 7.9 kB · 9.1% of the build |
259
+ | **dist/networkDiagram-LVvHZcSF.js** | 41.3 kB · gzip 12.6 kB · 10.0% of the build |
260
+ |     d3-zoom → dist/d3-zoom.mjs | `█████░░░░░░░░░░░░░░░` 26.0% · 10.7 kB |
261
+ |     src → networkDiagram.ts | `████░░░░░░░░░░░░░░░░` 20.5% · 8.4 kB |
262
+ |     d3-force → dist/d3-force.mjs | `████░░░░░░░░░░░░░░░░` 18.5% · 7.6 kB |
263
+ |     d3-quadtree → src/add.js + 13 more | `███░░░░░░░░░░░░░░░░░` 15.0% · 6.2 kB |
264
+ |     d3-drag → dist/d3-drag.mjs | `██░░░░░░░░░░░░░░░░░░` 10.4% · 4.3 kB |
265
+ |     d3-interpolate → src/zoom.js | `░░░░░░░░░░░░░░░░░░░░` 2.4% · 1004 B |
266
+ |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 7.2% · 3.0 kB |
267
+ | **dist/d3-shape-gf8U18pS.js** | 36.9 kB · gzip 7.9 kB · 8.9% of the build |
260
268
  |     d3-shape → dist/d3-shape.mjs | `█████████████████░░░` 86.2% · 31.8 kB |
261
269
  |     d3-path → dist/d3-path.mjs | `██░░░░░░░░░░░░░░░░░░` 8.1% · 3.0 kB |
262
270
  |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 5.8% · 2.1 kB |
263
- | **dist/networkDiagram-UdFs1ySs.js** | 35.4 kB · gzip 10.6 kB · 8.7% of the build |
264
- |     d3-zoom → dist/d3-zoom.mjs | `██████░░░░░░░░░░░░░░` 30.3% · 10.7 kB |
265
- |     d3-force → dist/d3-force.mjs | `████░░░░░░░░░░░░░░░░` 17.6% · 6.2 kB |
266
- |     d3-quadtree → src/add.js + 13 more | `████░░░░░░░░░░░░░░░░` 17.5% · 6.2 kB |
267
- |     src → networkDiagram.ts | `██░░░░░░░░░░░░░░░░░░` 12.1% · 4.3 kB |
268
- |     d3-drag → dist/d3-drag.mjs | `██░░░░░░░░░░░░░░░░░░` 12.1% · 4.3 kB |
269
- |     d3-interpolate → src/zoom.js | `█░░░░░░░░░░░░░░░░░░░` 2.8% · 1004 B |
270
- |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 7.5% · 2.7 kB |
271
- | **dist/src-YHHReglY.js** | 21.1 kB · gzip 6.1 kB · 5.2% of the build |
271
+ | **dist/src-YHHReglY.js** | 21.1 kB · gzip 6.1 kB · 5.1% of the build |
272
272
  |     d3-transition → src/transition/schedule.js + 26 more | `████████████░░░░░░░░` 60.6% · 12.8 kB |
273
273
  |     d3-interpolate → src/transform/index.js + 2 more | `██░░░░░░░░░░░░░░░░░░` 10.2% · 2.2 kB |
274
274
  |     d3-dispatch → src/dispatch.js | `██░░░░░░░░░░░░░░░░░░` 8.5% · 1.8 kB |
275
275
  |     d3-timer → src/timer.js + 1 more | `██░░░░░░░░░░░░░░░░░░` 7.8% · 1.7 kB |
276
276
  |     d3-ease → src/cubic.js | `░░░░░░░░░░░░░░░░░░░░` 0.4% · 82 B |
277
277
  |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 12.4% · 2.6 kB |
278
- | **dist/d3-scale-BYykLEPO.js** | 18.2 kB · gzip 5.9 kB · 4.5% of the build |
278
+ | **dist/d3-scale-BYykLEPO.js** | 18.2 kB · gzip 5.9 kB · 4.4% of the build |
279
279
  |     d3-format → src/locale.js + 14 more | `███████░░░░░░░░░░░░░` 32.9% · 6.0 kB |
280
280
  |     d3-scale → dist/d3-scale.mjs | `██████░░░░░░░░░░░░░░` 31.2% · 5.7 kB |
281
281
  |     d3-array → src/ticks.js + 6 more | `███░░░░░░░░░░░░░░░░░` 12.8% · 2.3 kB |
282
282
  |     d3-interpolate → src/value.js + 5 more | `█░░░░░░░░░░░░░░░░░░░` 7.2% · 1.3 kB |
283
283
  |     internmap → src/index.js | `█░░░░░░░░░░░░░░░░░░░` 4.1% · 768 B |
284
284
  |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 11.8% · 2.1 kB |
285
- | **dist/d3-selection-CL8c_tE2.js** | 15.7 kB · gzip 4.5 kB · 3.9% of the build |
285
+ | **dist/d3-selection-CL8c_tE2.js** | 15.7 kB · gzip 4.5 kB · 3.8% of the build |
286
286
  |     d3-selection → dist/d3-selection.mjs | `███████████████████░` 96.0% · 15.0 kB |
287
287
  |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 4.0% · 643 B |
288
- | **dist/sankeyDiagram-Dbl1-v5p.js** | 10.5 kB · gzip 3.3 kB · 2.6% of the build |
288
+ | **dist/sankeyDiagram-Dbl1-v5p.js** | 10.5 kB · gzip 3.3 kB · 2.5% of the build |
289
289
  |     d3-sankey → src/sankey.js + 3 more | `████████████░░░░░░░░` 58.1% · 6.1 kB |
290
290
  |     src → sankeyDiagram.ts | `██████░░░░░░░░░░░░░░` 28.5% · 3.0 kB |
291
291
  |     d3-array → src/min.js + 1 more | `█░░░░░░░░░░░░░░░░░░░` 3.8% · 406 B |
292
292
  |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 9.6% · 1.0 kB |
293
- | **dist/string-BzfQLSds.js** | 10.4 kB · gzip 3.9 kB · 2.6% of the build |
293
+ | **dist/string-BzfQLSds.js** | 10.4 kB · gzip 3.9 kB · 2.5% of the build |
294
294
  |     d3-color → src/color.js + 1 more | `████████████████░░░░` 79.4% · 8.3 kB |
295
295
  |     d3-interpolate → src/string.js + 4 more | `███░░░░░░░░░░░░░░░░░` 14.4% · 1.5 kB |
296
296
  |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 6.2% · 660 B |
@@ -300,9 +300,9 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
300
300
  | **dist/treeDiagram-t0oFwi1c.js** | 2.2 kB · gzip 1.0 kB · 0.5% of the build |
301
301
  |     src → treeDiagram.ts | `█████████████████░░░` 87.2% · 1.9 kB |
302
302
  |     (bundler output, whitespace & JSON) | `███░░░░░░░░░░░░░░░░░` 12.8% · 290 B |
303
- | **dist/dpuse-tool-d3-visualiser.es.js** | 1.6 kB · gzip 429 B · 0.4% of the build |
303
+ | **dist/dpuse-tool-d3-visualiser.es.js** | 1.6 kB · gzip 439 B · 0.4% of the build |
304
304
  |     src → index.ts | `██████████████████░░` 88.0% · 1.4 kB |
305
- |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 12.0% · 191 B |
305
+ |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 12.0% · 194 B |
306
306
  | **dist/palette-D5DTPmuA.js** | 1.2 kB · gzip 567 B · 0.3% of the build |
307
307
  |     src → palette.ts | `█████████████░░░░░░░` 64.2% · 774 B |
308
308
  |     d3-array → src/max.js | `████░░░░░░░░░░░░░░░░` 20.0% · 241 B |
@@ -32,7 +32,7 @@ var e = class {
32
32
  };
33
33
  }
34
34
  async renderNetworkDiagram(e, t, n, r) {
35
- let { renderNetworkDiagram: i } = await import("./networkDiagram-UdFs1ySs.js"), a = i(e, t, n);
35
+ let { renderNetworkDiagram: i } = await import("./networkDiagram-LVvHZcSF.js"), a = i(e, t, n);
36
36
  return r?.(), {
37
37
  destroy: a.destroy,
38
38
  resize: a.resize,
@@ -40,6 +40,7 @@ var e = class {
40
40
  return a.svg;
41
41
  },
42
42
  triggerAutoLayout: a.triggerAutoLayout,
43
+ update: a.update,
43
44
  vendorId: "d3"
44
45
  };
45
46
  }
@@ -1,5 +1,5 @@
1
- import { i as e, r as t } from "./d3-selection-CL8c_tE2.js";
2
- import { n, r, t as i } from "./src-YHHReglY.js";
1
+ import { n as e, r as t, t as n } from "./src-YHHReglY.js";
2
+ import { i as r, r as i } from "./d3-selection-CL8c_tE2.js";
3
3
  // node_modules/d3-quadtree/src/add.js
4
4
  function a(e) {
5
5
  let t = +this._x.call(null, e), n = +this._y.call(null, e);
@@ -224,16 +224,57 @@ function O(e) {
224
224
  function k(e) {
225
225
  return (e() - .5) * 1e-6;
226
226
  }
227
+ function A(e) {
228
+ return e.x + e.vx;
229
+ }
230
+ function j(e) {
231
+ return e.y + e.vy;
232
+ }
227
233
  function ee(e) {
234
+ var t, n, r, i = 1, a = 1;
235
+ typeof e != "function" && (e = O(e == null ? 1 : +e));
236
+ function o() {
237
+ for (var e, o = t.length, c, l, u, d, f, p, m = 0; m < a; ++m) for (c = C(t, A, j).visitAfter(s), e = 0; e < o; ++e) l = t[e], f = n[l.index], p = f * f, u = l.x + l.vx, d = l.y + l.vy, c.visit(h);
238
+ function h(e, t, n, a, o) {
239
+ var s = e.data, c = e.r, m = f + c;
240
+ if (s) {
241
+ if (s.index > l.index) {
242
+ var h = u - s.x - s.vx, g = d - s.y - s.vy, _ = h * h + g * g;
243
+ _ < m * m && (h === 0 && (h = k(r), _ += h * h), g === 0 && (g = k(r), _ += g * g), _ = (m - (_ = Math.sqrt(_))) / _ * i, l.vx += (h *= _) * (m = (c *= c) / (p + c)), l.vy += (g *= _) * m, s.vx -= h * (m = 1 - m), s.vy -= g * m);
244
+ }
245
+ } else return t > u + m || a < u - m || n > d + m || o < d - m;
246
+ }
247
+ }
248
+ function s(e) {
249
+ if (e.data) return e.r = n[e.data.index];
250
+ for (var t = e.r = 0; t < 4; ++t) e[t] && e[t].r > e.r && (e.r = e[t].r);
251
+ }
252
+ function c() {
253
+ if (t) {
254
+ var r, i = t.length, a;
255
+ for (n = Array(i), r = 0; r < i; ++r) a = t[r], n[a.index] = +e(a, r, t);
256
+ }
257
+ }
258
+ return o.initialize = function(e, n) {
259
+ t = e, r = n, c();
260
+ }, o.iterations = function(e) {
261
+ return arguments.length ? (a = +e, o) : a;
262
+ }, o.strength = function(e) {
263
+ return arguments.length ? (i = +e, o) : i;
264
+ }, o.radius = function(t) {
265
+ return arguments.length ? (e = typeof t == "function" ? t : O(+t), c(), o) : e;
266
+ }, o;
267
+ }
268
+ function M(e) {
228
269
  return e.index;
229
270
  }
230
- function A(e, t) {
271
+ function N(e, t) {
231
272
  var n = e.get(t);
232
273
  if (!n) throw Error("node not found: " + t);
233
274
  return n;
234
275
  }
235
- function j(e) {
236
- var t = ee, n = d, r, i = O(30), a, o, s, c, l, u = 1;
276
+ function te(e) {
277
+ var t = M, n = d, r, i = O(30), a, o, s, c, l, u = 1;
237
278
  e ??= [];
238
279
  function d(e) {
239
280
  return 1 / Math.min(s[e.source.index], s[e.target.index]);
@@ -244,7 +285,7 @@ function j(e) {
244
285
  function p() {
245
286
  if (o) {
246
287
  var n, i = o.length, l = e.length, u = new Map(o.map((e, n) => [t(e, n, o), e])), d;
247
- for (n = 0, s = Array(i); n < l; ++n) d = e[n], d.index = n, typeof d.source != "object" && (d.source = A(u, d.source)), typeof d.target != "object" && (d.target = A(u, d.target)), s[d.source.index] = (s[d.source.index] || 0) + 1, s[d.target.index] = (s[d.target.index] || 0) + 1;
288
+ for (n = 0, s = Array(i); n < l; ++n) d = e[n], d.index = n, typeof d.source != "object" && (d.source = N(u, d.source)), typeof d.target != "object" && (d.target = N(u, d.target)), s[d.source.index] = (s[d.source.index] || 0) + 1, s[d.target.index] = (s[d.target.index] || 0) + 1;
248
289
  for (n = 0, c = Array(l); n < l; ++n) d = e[n], c[n] = s[d.source.index] / (s[d.source.index] + s[d.target.index]);
249
290
  r = Array(l), m(), a = Array(l), h();
250
291
  }
@@ -269,90 +310,90 @@ function j(e) {
269
310
  return arguments.length ? (i = typeof e == "function" ? e : O(+e), h(), f) : i;
270
311
  }, f;
271
312
  }
272
- var M = 1664525, te = 1013904223, N = 4294967296;
273
- function ne() {
313
+ var ne = 1664525, re = 1013904223, ie = 4294967296;
314
+ function ae() {
274
315
  let e = 1;
275
- return () => (e = (M * e + te) % N) / N;
316
+ return () => (e = (ne * e + re) % ie) / ie;
276
317
  }
277
- function re(e) {
318
+ function oe(e) {
278
319
  return e.x;
279
320
  }
280
- function ie(e) {
321
+ function se(e) {
281
322
  return e.y;
282
323
  }
283
- var ae = 10, oe = Math.PI * (3 - Math.sqrt(5));
284
- function se(e) {
285
- var t, i = 1, a = .001, o = 1 - a ** (1 / 300), s = 0, c = .6, l = /* @__PURE__ */ new Map(), u = n(p), d = r("tick", "end"), f = ne();
286
- e ??= [];
324
+ var ce = 10, le = Math.PI * (3 - Math.sqrt(5));
325
+ function ue(n) {
326
+ var r, i = 1, a = .001, o = 1 - a ** (1 / 300), s = 0, c = .6, l = /* @__PURE__ */ new Map(), u = e(p), d = t("tick", "end"), f = ae();
327
+ n ??= [];
287
328
  function p() {
288
- m(), d.call("tick", t), i < a && (u.stop(), d.call("end", t));
329
+ m(), d.call("tick", r), i < a && (u.stop(), d.call("end", r));
289
330
  }
290
- function m(n) {
291
- var r, a = e.length, u;
292
- n === void 0 && (n = 1);
293
- for (var d = 0; d < n; ++d) for (i += (s - i) * o, l.forEach(function(e) {
331
+ function m(e) {
332
+ var t, a = n.length, u;
333
+ e === void 0 && (e = 1);
334
+ for (var d = 0; d < e; ++d) for (i += (s - i) * o, l.forEach(function(e) {
294
335
  e(i);
295
- }), r = 0; r < a; ++r) u = e[r], u.fx == null ? u.x += u.vx *= c : (u.x = u.fx, u.vx = 0), u.fy == null ? u.y += u.vy *= c : (u.y = u.fy, u.vy = 0);
296
- return t;
336
+ }), t = 0; t < a; ++t) u = n[t], u.fx == null ? u.x += u.vx *= c : (u.x = u.fx, u.vx = 0), u.fy == null ? u.y += u.vy *= c : (u.y = u.fy, u.vy = 0);
337
+ return r;
297
338
  }
298
339
  function h() {
299
- for (var t = 0, n = e.length, r; t < n; ++t) {
300
- if (r = e[t], r.index = t, r.fx != null && (r.x = r.fx), r.fy != null && (r.y = r.fy), isNaN(r.x) || isNaN(r.y)) {
301
- var i = ae * Math.sqrt(.5 + t), a = t * oe;
340
+ for (var e = 0, t = n.length, r; e < t; ++e) {
341
+ if (r = n[e], r.index = e, r.fx != null && (r.x = r.fx), r.fy != null && (r.y = r.fy), isNaN(r.x) || isNaN(r.y)) {
342
+ var i = ce * Math.sqrt(.5 + e), a = e * le;
302
343
  r.x = i * Math.cos(a), r.y = i * Math.sin(a);
303
344
  }
304
345
  (isNaN(r.vx) || isNaN(r.vy)) && (r.vx = r.vy = 0);
305
346
  }
306
347
  }
307
- function g(t) {
308
- return t.initialize && t.initialize(e, f), t;
348
+ function g(e) {
349
+ return e.initialize && e.initialize(n, f), e;
309
350
  }
310
- return h(), t = {
351
+ return h(), r = {
311
352
  tick: m,
312
353
  restart: function() {
313
- return u.restart(p), t;
354
+ return u.restart(p), r;
314
355
  },
315
356
  stop: function() {
316
- return u.stop(), t;
357
+ return u.stop(), r;
317
358
  },
318
- nodes: function(n) {
319
- return arguments.length ? (e = n, h(), l.forEach(g), t) : e;
359
+ nodes: function(e) {
360
+ return arguments.length ? (n = e, h(), l.forEach(g), r) : n;
320
361
  },
321
362
  alpha: function(e) {
322
- return arguments.length ? (i = +e, t) : i;
363
+ return arguments.length ? (i = +e, r) : i;
323
364
  },
324
365
  alphaMin: function(e) {
325
- return arguments.length ? (a = +e, t) : a;
366
+ return arguments.length ? (a = +e, r) : a;
326
367
  },
327
368
  alphaDecay: function(e) {
328
- return arguments.length ? (o = +e, t) : +o;
369
+ return arguments.length ? (o = +e, r) : +o;
329
370
  },
330
371
  alphaTarget: function(e) {
331
- return arguments.length ? (s = +e, t) : s;
372
+ return arguments.length ? (s = +e, r) : s;
332
373
  },
333
374
  velocityDecay: function(e) {
334
- return arguments.length ? (c = 1 - e, t) : 1 - c;
375
+ return arguments.length ? (c = 1 - e, r) : 1 - c;
335
376
  },
336
377
  randomSource: function(e) {
337
- return arguments.length ? (f = e, l.forEach(g), t) : f;
378
+ return arguments.length ? (f = e, l.forEach(g), r) : f;
338
379
  },
339
- force: function(e, n) {
340
- return arguments.length > 1 ? (n == null ? l.delete(e) : l.set(e, g(n)), t) : l.get(e);
380
+ force: function(e, t) {
381
+ return arguments.length > 1 ? (t == null ? l.delete(e) : l.set(e, g(t)), r) : l.get(e);
341
382
  },
342
- find: function(t, n, r) {
343
- var i = 0, a = e.length, o, s, c, l, u;
344
- for (r == null ? r = Infinity : r *= r, i = 0; i < a; ++i) l = e[i], o = t - l.x, s = n - l.y, c = o * o + s * s, c < r && (u = l, r = c);
383
+ find: function(e, t, r) {
384
+ var i = 0, a = n.length, o, s, c, l, u;
385
+ for (r == null ? r = Infinity : r *= r, i = 0; i < a; ++i) l = n[i], o = e - l.x, s = t - l.y, c = o * o + s * s, c < r && (u = l, r = c);
345
386
  return u;
346
387
  },
347
- on: function(e, n) {
348
- return arguments.length > 1 ? (d.on(e, n), t) : d.on(e);
388
+ on: function(e, t) {
389
+ return arguments.length > 1 ? (d.on(e, t), r) : d.on(e);
349
390
  }
350
391
  };
351
392
  }
352
- function ce() {
393
+ function de() {
353
394
  var e, t, n, r, i = O(-30), a, o = 1, s = Infinity, c = .81;
354
395
  function l(n) {
355
- var i, a = e.length, o = C(e, re, ie).visitAfter(d);
396
+ var i, a = e.length, o = C(e, oe, se).visitAfter(d);
356
397
  for (r = n, i = 0; i < a; ++i) t = e[i], o.visit(f);
357
398
  }
358
399
  function u() {
@@ -398,20 +439,20 @@ function ce() {
398
439
  }, l;
399
440
  }
400
441
  // node_modules/d3-interpolate/src/zoom.js
401
- var le = 1e-12;
442
+ var fe = 1e-12;
402
443
  function P(e) {
403
444
  return ((e = Math.exp(e)) + 1 / e) / 2;
404
445
  }
405
- function ue(e) {
446
+ function pe(e) {
406
447
  return ((e = Math.exp(e)) - 1 / e) / 2;
407
448
  }
408
- function de(e) {
449
+ function me(e) {
409
450
  return ((e = Math.exp(2 * e)) - 1) / (e + 1);
410
451
  }
411
- var fe = (function e(t, n, r) {
452
+ var he = (function e(t, n, r) {
412
453
  function i(e, i) {
413
454
  var a = e[0], o = e[1], s = e[2], c = i[0], l = i[1], u = i[2], d = c - a, f = l - o, p = d * d + f * f, m, h;
414
- if (p < le) h = Math.log(u / s) / t, m = function(e) {
455
+ if (p < fe) h = Math.log(u / s) / t, m = function(e) {
415
456
  return [
416
457
  a + e * d,
417
458
  o + e * f,
@@ -421,7 +462,7 @@ var fe = (function e(t, n, r) {
421
462
  else {
422
463
  var g = Math.sqrt(p), _ = (u * u - s * s + r * p) / (2 * s * n * g), v = (u * u - s * s - r * p) / (2 * u * n * g), y = Math.log(Math.sqrt(_ * _ + 1) - _);
423
464
  h = (Math.log(Math.sqrt(v * v + 1) - v) - y) / t, m = function(e) {
424
- var r = e * h, i = P(y), c = s / (n * g) * (i * de(t * r + y) - ue(y));
465
+ var r = e * h, i = P(y), c = s / (n * g) * (i * me(t * r + y) - pe(y));
425
466
  return [
426
467
  a + c * d,
427
468
  o + c * f,
@@ -435,7 +476,7 @@ var fe = (function e(t, n, r) {
435
476
  var n = Math.max(.001, +t), r = n * n;
436
477
  return e(n, r, r * r);
437
478
  }, i;
438
- })(Math.SQRT2, 2, 4), pe = { passive: !1 }, F = {
479
+ })(Math.SQRT2, 2, 4), ge = { passive: !1 }, F = {
439
480
  capture: !0,
440
481
  passive: !1
441
482
  };
@@ -445,18 +486,18 @@ function I(e) {
445
486
  function L(e) {
446
487
  e.preventDefault(), e.stopImmediatePropagation();
447
488
  }
448
- function R(t) {
449
- var n = t.document.documentElement, r = e(t).on("dragstart.drag", L, F);
450
- "onselectstart" in n ? r.on("selectstart.drag", L, F) : (n.__noselect = n.style.MozUserSelect, n.style.MozUserSelect = "none");
489
+ function _e(e) {
490
+ var t = e.document.documentElement, n = r(e).on("dragstart.drag", L, F);
491
+ "onselectstart" in t ? n.on("selectstart.drag", L, F) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
451
492
  }
452
- function z(t, n) {
453
- var r = t.document.documentElement, i = e(t).on("dragstart.drag", null);
454
- n && (i.on("click.drag", L, F), setTimeout(function() {
493
+ function ve(e, t) {
494
+ var n = e.document.documentElement, i = r(e).on("dragstart.drag", null);
495
+ t && (i.on("click.drag", L, F), setTimeout(function() {
455
496
  i.on("click.drag", null);
456
- }, 0)), "onselectstart" in r ? i.on("selectstart.drag", null) : (r.style.MozUserSelect = r.__noselect, delete r.__noselect);
497
+ }, 0)), "onselectstart" in n ? i.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
457
498
  }
458
- var B = (e) => () => e;
459
- function V(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
499
+ var R = (e) => () => e;
500
+ function z(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
460
501
  Object.defineProperties(this, {
461
502
  type: {
462
503
  value: e,
@@ -511,34 +552,34 @@ function V(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a,
511
552
  _: { value: u }
512
553
  });
513
554
  }
514
- V.prototype.on = function() {
555
+ z.prototype.on = function() {
515
556
  var e = this._.on.apply(this._, arguments);
516
557
  return e === this._ ? this : e;
517
558
  };
518
- function me(e) {
559
+ function ye(e) {
519
560
  return !e.ctrlKey && !e.button;
520
561
  }
521
- function he() {
562
+ function be() {
522
563
  return this.parentNode;
523
564
  }
524
- function ge(e, t) {
565
+ function xe(e, t) {
525
566
  return t ?? {
526
567
  x: e.x,
527
568
  y: e.y
528
569
  };
529
570
  }
530
- function _e() {
571
+ function Se() {
531
572
  return navigator.maxTouchPoints || "ontouchstart" in this;
532
573
  }
533
- function ve() {
534
- var n = me, i = he, a = ge, o = _e, s = {}, c = r("start", "drag", "end"), l = 0, u, d, f, p, m = 0;
574
+ function Ce() {
575
+ var e = ye, n = be, a = xe, o = Se, s = {}, c = t("start", "drag", "end"), l = 0, u, d, f, p, m = 0;
535
576
  function h(e) {
536
- e.on("mousedown.drag", g).filter(o).on("touchstart.drag", y).on("touchmove.drag", b, pe).on("touchend.drag touchcancel.drag", x).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
577
+ e.on("mousedown.drag", g).filter(o).on("touchstart.drag", y).on("touchmove.drag", b, ge).on("touchend.drag touchcancel.drag", x).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
537
578
  }
538
- function g(t, r) {
539
- if (!p && n.call(this, t, r)) {
540
- var a = S(this, i.call(this, t, r), t, r, "mouse");
541
- a && (e(t.view).on("mousemove.drag", _, F).on("mouseup.drag", v, F), R(t.view), I(t), f = !1, u = t.clientX, d = t.clientY, a("start", t));
579
+ function g(t, i) {
580
+ if (!p && e.call(this, t, i)) {
581
+ var a = S(this, n.call(this, t, i), t, i, "mouse");
582
+ a && (r(t.view).on("mousemove.drag", _, F).on("mouseup.drag", v, F), _e(t.view), I(t), f = !1, u = t.clientX, d = t.clientY, a("start", t));
542
583
  }
543
584
  }
544
585
  function _(e) {
@@ -548,11 +589,11 @@ function ve() {
548
589
  }
549
590
  s.mouse("drag", e);
550
591
  }
551
- function v(t) {
552
- e(t.view).on("mousemove.drag mouseup.drag", null), z(t.view, f), L(t), s.mouse("end", t);
592
+ function v(e) {
593
+ r(e.view).on("mousemove.drag mouseup.drag", null), ve(e.view, f), L(e), s.mouse("end", e);
553
594
  }
554
- function y(e, t) {
555
- if (n.call(this, e, t)) for (var r = e.changedTouches, a = i.call(this, e, t), o = r.length, s = 0, c; s < o; ++s) (c = S(this, a, e, t, r[s].identifier, r[s])) && (I(e), c("start", e, r[s]));
595
+ function y(t, r) {
596
+ if (e.call(this, t, r)) for (var i = t.changedTouches, a = n.call(this, t, r), o = i.length, s = 0, c; s < o; ++s) (c = S(this, a, t, r, i[s].identifier, i[s])) && (I(t), c("start", t, i[s]));
556
597
  }
557
598
  function b(e) {
558
599
  for (var t = e.changedTouches, n = t.length, r = 0, i; r < n; ++r) (i = s[t[r].identifier]) && (L(e), i("drag", e, t[r]));
@@ -563,10 +604,10 @@ function ve() {
563
604
  p = null;
564
605
  }, 500), r = 0; r < n; ++r) (i = s[t[r].identifier]) && (I(e), i("end", e, t[r]));
565
606
  }
566
- function S(e, n, r, i, o, u) {
567
- var d = c.copy(), f = t(u || r, n), p, m, g;
568
- if ((g = a.call(e, new V("beforestart", {
569
- sourceEvent: r,
607
+ function S(e, t, n, r, o, u) {
608
+ var d = c.copy(), f = i(u || n, t), p, m, g;
609
+ if ((g = a.call(e, new z("beforestart", {
610
+ sourceEvent: n,
570
611
  target: h,
571
612
  identifier: o,
572
613
  active: l,
@@ -575,16 +616,16 @@ function ve() {
575
616
  dx: 0,
576
617
  dy: 0,
577
618
  dispatch: d
578
- }), i)) != null) return p = g.x - f[0] || 0, m = g.y - f[1] || 0, function r(a, c, u) {
619
+ }), r)) != null) return p = g.x - f[0] || 0, m = g.y - f[1] || 0, function n(a, c, u) {
579
620
  var _ = f, v;
580
621
  switch (a) {
581
622
  case "start":
582
- s[o] = r, v = l++;
623
+ s[o] = n, v = l++;
583
624
  break;
584
625
  case "end": delete s[o], --l;
585
- case "drag": f = t(u || c, n), v = l;
626
+ case "drag": f = i(u || c, t), v = l;
586
627
  }
587
- d.call(a, e, new V(a, {
628
+ d.call(a, e, new z(a, {
588
629
  sourceEvent: c,
589
630
  subject: g,
590
631
  target: h,
@@ -595,17 +636,17 @@ function ve() {
595
636
  dx: f[0] - _[0],
596
637
  dy: f[1] - _[1],
597
638
  dispatch: d
598
- }), i);
639
+ }), r);
599
640
  };
600
641
  }
601
- return h.filter = function(e) {
602
- return arguments.length ? (n = typeof e == "function" ? e : B(!!e), h) : n;
642
+ return h.filter = function(t) {
643
+ return arguments.length ? (e = typeof t == "function" ? t : R(!!t), h) : e;
603
644
  }, h.container = function(e) {
604
- return arguments.length ? (i = typeof e == "function" ? e : B(e), h) : i;
645
+ return arguments.length ? (n = typeof e == "function" ? e : R(e), h) : n;
605
646
  }, h.subject = function(e) {
606
- return arguments.length ? (a = typeof e == "function" ? e : B(e), h) : a;
647
+ return arguments.length ? (a = typeof e == "function" ? e : R(e), h) : a;
607
648
  }, h.touchable = function(e) {
608
- return arguments.length ? (o = typeof e == "function" ? e : B(!!e), h) : o;
649
+ return arguments.length ? (o = typeof e == "function" ? e : R(!!e), h) : o;
609
650
  }, h.on = function() {
610
651
  var e = c.on.apply(c, arguments);
611
652
  return e === c ? h : e;
@@ -614,8 +655,8 @@ function ve() {
614
655
  }, h;
615
656
  }
616
657
  // node_modules/d3-zoom/dist/d3-zoom.mjs
617
- var H = (e) => () => e;
618
- function ye(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
658
+ var B = (e) => () => e;
659
+ function we(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
619
660
  Object.defineProperties(this, {
620
661
  type: {
621
662
  value: e,
@@ -640,16 +681,16 @@ function ye(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
640
681
  _: { value: i }
641
682
  });
642
683
  }
643
- function U(e, t, n) {
684
+ function V(e, t, n) {
644
685
  this.k = e, this.x = t, this.y = n;
645
686
  }
646
- U.prototype = {
647
- constructor: U,
687
+ V.prototype = {
688
+ constructor: V,
648
689
  scale: function(e) {
649
- return e === 1 ? this : new U(this.k * e, this.x, this.y);
690
+ return e === 1 ? this : new V(this.k * e, this.x, this.y);
650
691
  },
651
692
  translate: function(e, t) {
652
- return e === 0 & t === 0 ? this : new U(this.k, this.x + this.k * e, this.y + this.k * t);
693
+ return e === 0 & t === 0 ? this : new V(this.k, this.x + this.k * e, this.y + this.k * t);
653
694
  },
654
695
  apply: function(e) {
655
696
  return [e[0] * this.k + this.x, e[1] * this.k + this.y];
@@ -679,46 +720,46 @@ U.prototype = {
679
720
  return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
680
721
  }
681
722
  };
682
- var W = new U(1, 0, 0);
683
- be.prototype = U.prototype;
684
- function be(e) {
685
- for (; !e.__zoom;) if (!(e = e.parentNode)) return W;
723
+ var H = new V(1, 0, 0);
724
+ Te.prototype = V.prototype;
725
+ function Te(e) {
726
+ for (; !e.__zoom;) if (!(e = e.parentNode)) return H;
686
727
  return e.__zoom;
687
728
  }
688
- function G(e) {
729
+ function U(e) {
689
730
  e.stopImmediatePropagation();
690
731
  }
691
- function K(e) {
732
+ function W(e) {
692
733
  e.preventDefault(), e.stopImmediatePropagation();
693
734
  }
694
- function xe(e) {
735
+ function Ee(e) {
695
736
  return (!e.ctrlKey || e.type === "wheel") && !e.button;
696
737
  }
697
- function Se() {
738
+ function De() {
698
739
  var e = this;
699
740
  return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
700
741
  }
701
- function q() {
702
- return this.__zoom || W;
742
+ function Oe() {
743
+ return this.__zoom || H;
703
744
  }
704
- function Ce(e) {
745
+ function ke(e) {
705
746
  return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * (e.ctrlKey ? 10 : 1);
706
747
  }
707
- function we() {
748
+ function Ae() {
708
749
  return navigator.maxTouchPoints || "ontouchstart" in this;
709
750
  }
710
- function Te(e, t, n) {
751
+ function je(e, t, n) {
711
752
  var r = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], a = e.invertY(t[0][1]) - n[0][1], o = e.invertY(t[1][1]) - n[1][1];
712
753
  return e.translate(i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i), o > a ? (a + o) / 2 : Math.min(0, a) || Math.max(0, o));
713
754
  }
714
- function Ee() {
715
- var n = xe, a = Se, o = Te, s = Ce, c = we, l = [0, Infinity], u = [[-Infinity, -Infinity], [Infinity, Infinity]], d = 250, f = fe, p = r("start", "zoom", "end"), m, h, g, _ = 500, v = 150, y = 0, b = 10;
755
+ function Me() {
756
+ var e = Ee, a = De, o = je, s = ke, c = Ae, l = [0, Infinity], u = [[-Infinity, -Infinity], [Infinity, Infinity]], d = 250, f = he, p = t("start", "zoom", "end"), m, h, g, _ = 500, v = 150, y = 0, b = 10;
716
757
  function x(e) {
717
- e.property("__zoom", q).on("wheel.zoom", O, { passive: !1 }).on("mousedown.zoom", k).on("dblclick.zoom", ee).filter(c).on("touchstart.zoom", A).on("touchmove.zoom", j).on("touchend.zoom touchcancel.zoom", M).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
758
+ e.property("__zoom", Oe).on("wheel.zoom", O, { passive: !1 }).on("mousedown.zoom", k).on("dblclick.zoom", A).filter(c).on("touchstart.zoom", j).on("touchmove.zoom", ee).on("touchend.zoom touchcancel.zoom", M).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
718
759
  }
719
760
  x.transform = function(e, t, n, r) {
720
761
  var i = e.selection ? e.selection() : e;
721
- i.property("__zoom", q), e === i ? i.interrupt().each(function() {
762
+ i.property("__zoom", Oe), e === i ? i.interrupt().each(function() {
722
763
  E(this, arguments).event(r).start().zoom(null, typeof t == "function" ? t.apply(this, arguments) : t).end();
723
764
  }) : T(e, t, n, r);
724
765
  }, x.scaleBy = function(e, t, n, r) {
@@ -737,15 +778,15 @@ function Ee() {
737
778
  }, x.translateTo = function(e, t, n, r, i) {
738
779
  x.transform(e, function() {
739
780
  var e = a.apply(this, arguments), i = this.__zoom, s = r == null ? w(e) : typeof r == "function" ? r.apply(this, arguments) : r;
740
- return o(W.translate(s[0], s[1]).scale(i.k).translate(typeof t == "function" ? -t.apply(this, arguments) : -t, typeof n == "function" ? -n.apply(this, arguments) : -n), e, u);
781
+ return o(H.translate(s[0], s[1]).scale(i.k).translate(typeof t == "function" ? -t.apply(this, arguments) : -t, typeof n == "function" ? -n.apply(this, arguments) : -n), e, u);
741
782
  }, r, i);
742
783
  };
743
784
  function S(e, t) {
744
- return t = Math.max(l[0], Math.min(l[1], t)), t === e.k ? e : new U(t, e.x, e.y);
785
+ return t = Math.max(l[0], Math.min(l[1], t)), t === e.k ? e : new V(t, e.x, e.y);
745
786
  }
746
787
  function C(e, t, n) {
747
788
  var r = t[0] - n[0] * e.k, i = t[1] - n[1] * e.k;
748
- return r === e.x && i === e.y ? e : new U(e.k, r, i);
789
+ return r === e.x && i === e.y ? e : new V(e.k, r, i);
749
790
  }
750
791
  function w(e) {
751
792
  return [(+e[0][0] + +e[1][0]) / 2, (+e[0][1] + +e[1][1]) / 2];
@@ -761,7 +802,7 @@ function Ee() {
761
802
  if (e === 1) e = d;
762
803
  else {
763
804
  var t = p(e), n = l / t[2];
764
- e = new U(n, c[0] - t[0] * n, c[1] - t[1] * n);
805
+ e = new V(n, c[0] - t[0] * n, c[1] - t[1] * n);
765
806
  }
766
807
  o.zoom(null, e);
767
808
  };
@@ -786,94 +827,94 @@ function Ee() {
786
827
  end: function() {
787
828
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
788
829
  },
789
- emit: function(t) {
790
- var n = e(this.that).datum();
791
- p.call(t, this.that, new ye(t, {
830
+ emit: function(e) {
831
+ var t = r(this.that).datum();
832
+ p.call(e, this.that, new we(e, {
792
833
  sourceEvent: this.sourceEvent,
793
834
  target: x,
794
835
  transform: this.that.__zoom,
795
836
  dispatch: p
796
- }), n);
837
+ }), t);
797
838
  }
798
839
  };
799
- function O(e, ...r) {
800
- if (!n.apply(this, arguments)) return;
801
- var a = E(this, r).event(e), c = this.__zoom, d = Math.max(l[0], Math.min(l[1], c.k * 2 ** s.apply(this, arguments))), f = t(e);
840
+ function O(t, ...r) {
841
+ if (!e.apply(this, arguments)) return;
842
+ var a = E(this, r).event(t), c = this.__zoom, d = Math.max(l[0], Math.min(l[1], c.k * 2 ** s.apply(this, arguments))), f = i(t);
802
843
  if (a.wheel) (a.mouse[0][0] !== f[0] || a.mouse[0][1] !== f[1]) && (a.mouse[1] = c.invert(a.mouse[0] = f)), clearTimeout(a.wheel);
803
844
  else if (c.k === d) return;
804
- else a.mouse = [f, c.invert(f)], i(this), a.start();
805
- K(e), a.wheel = setTimeout(p, v), a.zoom("mouse", o(C(S(c, d), a.mouse[0], a.mouse[1]), a.extent, u));
845
+ else a.mouse = [f, c.invert(f)], n(this), a.start();
846
+ W(t), a.wheel = setTimeout(p, v), a.zoom("mouse", o(C(S(c, d), a.mouse[0], a.mouse[1]), a.extent, u));
806
847
  function p() {
807
848
  a.wheel = null, a.end();
808
849
  }
809
850
  }
810
- function k(r, ...a) {
811
- if (g || !n.apply(this, arguments)) return;
812
- var s = r.currentTarget, c = E(this, a, !0).event(r), l = e(r.view).on("mousemove.zoom", m, !0).on("mouseup.zoom", h, !0), d = t(r, s), f = r.clientX, p = r.clientY;
813
- R(r.view), G(r), c.mouse = [d, this.__zoom.invert(d)], i(this), c.start();
851
+ function k(t, ...a) {
852
+ if (g || !e.apply(this, arguments)) return;
853
+ var s = t.currentTarget, c = E(this, a, !0).event(t), l = r(t.view).on("mousemove.zoom", m, !0).on("mouseup.zoom", h, !0), d = i(t, s), f = t.clientX, p = t.clientY;
854
+ _e(t.view), U(t), c.mouse = [d, this.__zoom.invert(d)], n(this), c.start();
814
855
  function m(e) {
815
- if (K(e), !c.moved) {
816
- var n = e.clientX - f, r = e.clientY - p;
817
- c.moved = n * n + r * r > y;
856
+ if (W(e), !c.moved) {
857
+ var t = e.clientX - f, n = e.clientY - p;
858
+ c.moved = t * t + n * n > y;
818
859
  }
819
- c.event(e).zoom("mouse", o(C(c.that.__zoom, c.mouse[0] = t(e, s), c.mouse[1]), c.extent, u));
860
+ c.event(e).zoom("mouse", o(C(c.that.__zoom, c.mouse[0] = i(e, s), c.mouse[1]), c.extent, u));
820
861
  }
821
862
  function h(e) {
822
- l.on("mousemove.zoom mouseup.zoom", null), z(e.view, c.moved), K(e), c.event(e).end();
863
+ l.on("mousemove.zoom mouseup.zoom", null), ve(e.view, c.moved), W(e), c.event(e).end();
823
864
  }
824
865
  }
825
- function ee(r, ...i) {
826
- if (n.apply(this, arguments)) {
827
- var s = this.__zoom, c = t(r.changedTouches ? r.changedTouches[0] : r, this), l = s.invert(c), f = s.k * (r.shiftKey ? .5 : 2), p = o(C(S(s, f), c, l), a.apply(this, i), u);
828
- K(r), d > 0 ? e(this).transition().duration(d).call(T, p, c, r) : e(this).call(x.transform, p, c, r);
866
+ function A(t, ...n) {
867
+ if (e.apply(this, arguments)) {
868
+ var s = this.__zoom, c = i(t.changedTouches ? t.changedTouches[0] : t, this), l = s.invert(c), f = s.k * (t.shiftKey ? .5 : 2), p = o(C(S(s, f), c, l), a.apply(this, n), u);
869
+ W(t), d > 0 ? r(this).transition().duration(d).call(T, p, c, t) : r(this).call(x.transform, p, c, t);
829
870
  }
830
871
  }
831
- function A(e, ...r) {
832
- if (n.apply(this, arguments)) {
833
- var a = e.touches, o = a.length, s = E(this, r, e.changedTouches.length === o).event(e), c, l, u, d;
834
- for (G(e), l = 0; l < o; ++l) u = a[l], d = t(u, this), d = [
872
+ function j(t, ...r) {
873
+ if (e.apply(this, arguments)) {
874
+ var a = t.touches, o = a.length, s = E(this, r, t.changedTouches.length === o).event(t), c, l, u, d;
875
+ for (U(t), l = 0; l < o; ++l) u = a[l], d = i(u, this), d = [
835
876
  d,
836
877
  this.__zoom.invert(d),
837
878
  u.identifier
838
879
  ], s.touch0 ? !s.touch1 && s.touch0[2] !== d[2] && (s.touch1 = d, s.taps = 0) : (s.touch0 = d, c = !0, s.taps = 1 + !!m);
839
880
  m &&= clearTimeout(m), c && (s.taps < 2 && (h = d[0], m = setTimeout(function() {
840
881
  m = null;
841
- }, _)), i(this), s.start());
882
+ }, _)), n(this), s.start());
842
883
  }
843
884
  }
844
- function j(e, ...n) {
885
+ function ee(e, ...t) {
845
886
  if (this.__zooming) {
846
- var r = E(this, n).event(e), i = e.changedTouches, a = i.length, s, c, l, d;
847
- for (K(e), s = 0; s < a; ++s) c = i[s], l = t(c, this), r.touch0 && r.touch0[2] === c.identifier ? r.touch0[0] = l : r.touch1 && r.touch1[2] === c.identifier && (r.touch1[0] = l);
848
- if (c = r.that.__zoom, r.touch1) {
849
- var f = r.touch0[0], p = r.touch0[1], m = r.touch1[0], h = r.touch1[1], g = (g = m[0] - f[0]) * g + (g = m[1] - f[1]) * g, _ = (_ = h[0] - p[0]) * _ + (_ = h[1] - p[1]) * _;
887
+ var n = E(this, t).event(e), r = e.changedTouches, a = r.length, s, c, l, d;
888
+ for (W(e), s = 0; s < a; ++s) c = r[s], l = i(c, this), n.touch0 && n.touch0[2] === c.identifier ? n.touch0[0] = l : n.touch1 && n.touch1[2] === c.identifier && (n.touch1[0] = l);
889
+ if (c = n.that.__zoom, n.touch1) {
890
+ var f = n.touch0[0], p = n.touch0[1], m = n.touch1[0], h = n.touch1[1], g = (g = m[0] - f[0]) * g + (g = m[1] - f[1]) * g, _ = (_ = h[0] - p[0]) * _ + (_ = h[1] - p[1]) * _;
850
891
  c = S(c, Math.sqrt(g / _)), l = [(f[0] + m[0]) / 2, (f[1] + m[1]) / 2], d = [(p[0] + h[0]) / 2, (p[1] + h[1]) / 2];
851
- } else if (r.touch0) l = r.touch0[0], d = r.touch0[1];
892
+ } else if (n.touch0) l = n.touch0[0], d = n.touch0[1];
852
893
  else return;
853
- r.zoom("touch", o(C(c, l, d), r.extent, u));
894
+ n.zoom("touch", o(C(c, l, d), n.extent, u));
854
895
  }
855
896
  }
856
- function M(n, ...r) {
897
+ function M(e, ...t) {
857
898
  if (this.__zooming) {
858
- var i = E(this, r).event(n), a = n.changedTouches, o = a.length, s, c;
859
- for (G(n), g && clearTimeout(g), g = setTimeout(function() {
899
+ var n = E(this, t).event(e), a = e.changedTouches, o = a.length, s, c;
900
+ for (U(e), g && clearTimeout(g), g = setTimeout(function() {
860
901
  g = null;
861
- }, _), s = 0; s < o; ++s) c = a[s], i.touch0 && i.touch0[2] === c.identifier ? delete i.touch0 : i.touch1 && i.touch1[2] === c.identifier && delete i.touch1;
862
- if (i.touch1 && !i.touch0 && (i.touch0 = i.touch1, delete i.touch1), i.touch0) i.touch0[1] = this.__zoom.invert(i.touch0[0]);
863
- else if (i.end(), i.taps === 2 && (c = t(c, this), Math.hypot(h[0] - c[0], h[1] - c[1]) < b)) {
864
- var l = e(this).on("dblclick.zoom");
902
+ }, _), s = 0; s < o; ++s) c = a[s], n.touch0 && n.touch0[2] === c.identifier ? delete n.touch0 : n.touch1 && n.touch1[2] === c.identifier && delete n.touch1;
903
+ if (n.touch1 && !n.touch0 && (n.touch0 = n.touch1, delete n.touch1), n.touch0) n.touch0[1] = this.__zoom.invert(n.touch0[0]);
904
+ else if (n.end(), n.taps === 2 && (c = i(c, this), Math.hypot(h[0] - c[0], h[1] - c[1]) < b)) {
905
+ var l = r(this).on("dblclick.zoom");
865
906
  l && l.apply(this, arguments);
866
907
  }
867
908
  }
868
909
  }
869
910
  return x.wheelDelta = function(e) {
870
- return arguments.length ? (s = typeof e == "function" ? e : H(+e), x) : s;
871
- }, x.filter = function(e) {
872
- return arguments.length ? (n = typeof e == "function" ? e : H(!!e), x) : n;
911
+ return arguments.length ? (s = typeof e == "function" ? e : B(+e), x) : s;
912
+ }, x.filter = function(t) {
913
+ return arguments.length ? (e = typeof t == "function" ? t : B(!!t), x) : e;
873
914
  }, x.touchable = function(e) {
874
- return arguments.length ? (c = typeof e == "function" ? e : H(!!e), x) : c;
915
+ return arguments.length ? (c = typeof e == "function" ? e : B(!!e), x) : c;
875
916
  }, x.extent = function(e) {
876
- return arguments.length ? (a = typeof e == "function" ? e : H([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), x) : a;
917
+ return arguments.length ? (a = typeof e == "function" ? e : B([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), x) : a;
877
918
  }, x.scaleExtent = function(e) {
878
919
  return arguments.length ? (l[0] = +e[0], l[1] = +e[1], x) : [l[0], l[1]];
879
920
  }, x.translateExtent = function(e) {
@@ -894,12 +935,12 @@ function Ee() {
894
935
  }, x;
895
936
  }
896
937
  // src/networkDiagram.ts
897
- var De = -300, Oe = 100, J = 640, Y = 480, ke = 180, Ae = 1, je = 2, Me = 14, X = .25, Ne = 4, Z = {
938
+ var Ne = -300, Pe = 100, Fe = 400, G = 640, K = 480, Ie = 180, Le = 1, Re = 2, ze = 14, Be = 70, Ve = 130, He = .25, Ue = 4, We = 12, Ge = 14, Ke = 6.2, qe = 8, Je = .35, Ye = 14, Xe = .6, Ze = 16, Qe = 10, $e = 3, et = 12, q = {
898
939
  linkStroke: "#9ca3af",
899
940
  nodeFillSelected: "#f59e0b",
900
941
  nodeStrokeSelected: "#b45309",
901
942
  nodeText: "#ffffff"
902
- }, Pe = [
943
+ }, tt = [
903
944
  {
904
945
  fill: "#475569",
905
946
  fillHovered: "#64748b",
@@ -936,77 +977,206 @@ var De = -300, Oe = 100, J = 640, Y = 480, ke = 180, Ae = 1, je = 2, Me = 14, X
936
977
  strokeHovered: "#be185d"
937
978
  }
938
979
  ];
939
- function Fe(t, n, r = {}) {
940
- let i = n.clientWidth || J, a = n.clientHeight || Y, o = t.nodes.map((e) => ({ ...e })), s = t.links.map((e) => ({ ...e })), c = Math.min(i, a) * .22;
941
- for (let [e, t] of o.entries()) {
942
- let n = e / o.length * Math.PI * 2;
943
- t.x = i / 2 + Math.cos(n) * c, t.y = a / 2 + Math.sin(n) * c;
944
- }
945
- let l = se(o).force("link", j(s).id((e) => e.id).distance(r.linkDistance ?? Oe)).force("charge", ce().strength(r.chargeStrength ?? De)).force("center", D(i / 2, a / 2)), u = e(n).append("svg").attr("width", i).attr("height", a).attr("viewBox", `0 0 ${String(i)} ${String(a)}`).style("touch-action", "none"), d = u.append("g"), f = d.selectAll("line").data(s).join("line").attr("stroke", Z.linkStroke).attr("stroke-width", 2), p = d.selectAll("g").data(o).join("g").style("cursor", "pointer");
946
- p.append("circle").attr("r", (e) => Q(e).radius).attr("fill", (e) => Q(e).fill).attr("stroke", (e) => Q(e).stroke).attr("stroke-width", 2), p.append("text").text((e) => e.label ?? e.id).attr("text-anchor", "middle").attr("dy", (e) => e.label == null ? 4 : Q(e).radius + Me).attr("font-size", (e) => e.label == null ? null : 12).attr("fill", (e) => e.label == null ? Z.nodeText : "currentColor");
947
- let m = null, h = null, g = () => {
948
- p.selectAll("circle").attr("fill", (e) => e.id === m ? Z.nodeFillSelected : e.id === h ? Q(e).fillHovered : Q(e).fill).attr("stroke", (e) => e.id === m ? Z.nodeStrokeSelected : e.id === h ? Q(e).strokeHovered : Q(e).stroke).attr("stroke-width", (e) => e.id === m ? 3 : 2).attr("r", (e) => {
949
- let t = e.id === m || e.id === h;
950
- return Q(e).radius + (t ? je : 0);
951
- });
980
+ function nt(e, t, n = {}) {
981
+ let i = n.labelPlacementId ?? "below", a = n.transitionDuration ?? Fe, o = t.clientWidth || G, s = t.clientHeight || K, c = te().id((e) => e.id), l = ue().force("link", c).force("charge", de().strength(n.chargeStrength ?? Ne)).force("center", D(o / 2, s / 2));
982
+ n.reservesLabelRoom === !0 && l.force("collide", ee((e) => Z(e).radius + Qe)), l.stop();
983
+ let u = r(t).append("svg").attr("width", o).attr("height", s).attr("viewBox", `0 0 ${String(o)} ${String(s)}`).style("touch-action", "none"), d = u.append("g"), f = d.append("g"), p = d.append("g"), m = u.node();
984
+ if (m == null) throw Error("Failed to create network diagram SVG element.");
985
+ let h = e, g = [], _ = [], v = /* @__PURE__ */ new Map(), y, b = null, x = null, S = f.selectAll("line"), C = p.selectAll("g"), w = (e, t) => {
986
+ let r = v.get(e) ?? [];
987
+ if (r.length < $e) return 0;
988
+ let i = 0;
989
+ for (let e of r) {
990
+ let r = t.get(e);
991
+ if (!r) continue;
992
+ let a = r.label == null ? 0 : rt(J(r, n.wrapsLabels === !0)) * Xe;
993
+ i += Math.max(Z(r).radius * 2, a) + Ze;
994
+ }
995
+ return i / (Math.PI * 2);
996
+ };
997
+ c.distance((e) => {
998
+ let t = n.linkDistance ?? Pe;
999
+ if (n.reservesLabelRoom !== !0) return t;
1000
+ let r = new Map(g.map((e) => [e.id, e]));
1001
+ return Math.max(t, w(Y(e.source), r), w(Y(e.target), r));
1002
+ });
1003
+ let T = () => {
1004
+ C.select("circle").attr("fill", (e) => e.id === b ? q.nodeFillSelected : e.id === x ? Z(e).fillHovered : Z(e).fill).attr("stroke", (e) => e.id === b ? q.nodeStrokeSelected : e.id === x ? Z(e).strokeHovered : Z(e).stroke).attr("stroke-width", (e) => e.id === b ? 3 : 2).attr("r", (e) => Z(e).radius + (e.id === b || e.id === x ? Re : 0));
952
1005
  };
953
- p.on("mouseenter", (e, t) => {
954
- h = t.id, g();
955
- }).on("mouseleave", (e, t) => {
956
- h === t.id && (h = null), g();
957
- }).on("click", (e, n) => {
958
- e.stopPropagation(), m = m === n.id ? null : n.id, g(), r.onNodeClick?.($(t.nodes.find((e) => e.id === n.id)));
959
- }), u.on("click", () => {
960
- m = null, g();
1006
+ u.on("click", () => {
1007
+ b = null, T();
961
1008
  });
962
- let _ = Ee().scaleExtent([X, Ne]).on("zoom", (e) => {
1009
+ let E = Me().scaleExtent([He, Ue]).on("zoom", (e) => {
963
1010
  d.attr("transform", e.transform.toString());
964
1011
  });
965
- u.call(_).on("dblclick.zoom", null);
966
- let v = (e, t) => typeof e == "object" ? e[t] ?? 0 : 0, y = () => {
967
- f.attr("x1", (e) => v(e.source, "x")).attr("y1", (e) => v(e.source, "y")).attr("x2", (e) => v(e.target, "x")).attr("y2", (e) => v(e.target, "y")), p.attr("transform", (e) => `translate(${String(e.x ?? 0)},${String(e.y ?? 0)})`);
968
- }, b = () => {
969
- if (o.length === 0) return;
970
- let e = o.map((e) => e.x ?? 0), t = o.map((e) => e.y ?? 0), [r, i, a, s] = [
1012
+ u.call(E).on("dblclick.zoom", null);
1013
+ let O = () => {
1014
+ S.attr("x1", (e) => X(e.source, "x")).attr("y1", (e) => X(e.source, "y")).attr("x2", (e) => X(e.target, "x")).attr("y2", (e) => X(e.target, "y")), C.attr("transform", (e) => `translate(${String(e.x ?? 0)},${String(e.y ?? 0)})`);
1015
+ let e = new Map(g.map((e) => [e.id, e]));
1016
+ C.each((t, a, o) => {
1017
+ if (t.label == null) return;
1018
+ let s = (v.get(t.id) ?? []).map((t) => e.get(t)).filter((e) => e !== void 0), c = J(t, n.wrapsLabels === !0).length, l = it(t, s, i, c);
1019
+ r($(o[a])).select("text").attr("text-anchor", l.anchor).attr("y", l.y).selectAll("tspan").attr("x", l.x);
1020
+ });
1021
+ }, k = () => {
1022
+ if (g.length === 0) return;
1023
+ let e = g.map((e) => e.x ?? 0), n = g.map((e) => e.y ?? 0), [r, a, o, s] = [
971
1024
  Math.min(...e),
972
1025
  Math.max(...e),
973
- Math.min(...t),
974
- Math.max(...t)
975
- ], c = n.clientWidth || J, l = n.clientHeight || Y, d = Math.max(X, Math.min(1, c / (i - r + 140), l / (s - a + 140))), f = W.translate(c / 2, l / 2).scale(d).translate(-(r + i) / 2, -(a + s) / 2);
976
- u.call((e) => {
977
- _.transform(e, f);
1026
+ Math.min(...n),
1027
+ Math.max(...n)
1028
+ ], c = t.clientWidth || G, l = t.clientHeight || K, u = i === "outside" ? Ve : Be, d = Math.max(He, Math.min(1, c / (a - r + u * 2), l / (s - o + u * 2)));
1029
+ return H.translate(c / 2, l / 2).scale(d).translate(-(r + a) / 2, -(o + s) / 2);
1030
+ }, A = (e) => {
1031
+ u.call((t) => {
1032
+ E.transform(t, e);
978
1033
  });
1034
+ }, j = () => {
1035
+ l.alpha(1);
1036
+ for (let e = 0; e < Ie; e += 1) l.tick();
1037
+ l.stop();
1038
+ }, M = () => {
1039
+ y !== void 0 && cancelAnimationFrame(y), y = void 0;
1040
+ }, N = (e) => {
1041
+ let t = new Map(g.map((e) => [e.id, e]));
1042
+ h = e, v = at(e), g = e.nodes.map((e) => ({ ...e })), _ = e.links.map((e) => ({ ...e }));
1043
+ let r = Math.min(o, s) * .22;
1044
+ for (let [e, n] of g.entries()) {
1045
+ let i = t.get(n.id), a = (v.get(n.id) ?? []).find((e) => t.has(e)), c = a == null ? void 0 : t.get(a), l = e / g.length * Math.PI * 2;
1046
+ i ? (n.x = i.x, n.y = i.y) : c ? (n.x = (c.x ?? 0) + Math.cos(l) * et, n.y = (c.y ?? 0) + Math.sin(l) * et) : (n.x = o / 2 + Math.cos(l) * r, n.y = s / 2 + Math.sin(l) * r);
1047
+ }
1048
+ l.nodes(g), c.links(_);
1049
+ let i = S.data(_, ot), a = i.exit();
1050
+ S = i.enter().append("line").attr("stroke", q.linkStroke).attr("stroke-width", 2).merge(i);
1051
+ let u = C.data(g, (e) => e.id), d = u.exit().style("pointer-events", "none"), f = u.enter().append("g").style("cursor", "pointer");
1052
+ return f.append("circle").attr("stroke-width", 2), f.append("text"), f.on("mouseenter", (e, t) => {
1053
+ x = t.id, T();
1054
+ }).on("mouseleave", (e, t) => {
1055
+ x === t.id && (x = null), T();
1056
+ }).on("click", (e, t) => {
1057
+ e.stopPropagation(), b = b === t.id ? null : t.id, T(), n.onNodeClick?.($(h.nodes.find((e) => e.id === t.id)));
1058
+ }).call(Ce().on("start", (e, t) => {
1059
+ e.sourceEvent?.stopPropagation(), t.fx = t.x, t.fy = t.y;
1060
+ }).on("drag", (e, t) => {
1061
+ t.x = e.x, t.y = e.y, t.fx = e.x, t.fy = e.y, O();
1062
+ }).on("end", (e, t) => {
1063
+ t.fx = null, t.fy = null;
1064
+ })), C = f.merge(u), C.select("text").attr("text-anchor", "middle").attr("y", (e) => e.label == null ? 4 : Z(e).radius + ze).attr("font-size", (e) => e.label == null ? null : We).attr("fill", (e) => e.label == null ? q.nodeText : "currentColor").selectAll("tspan").data((e) => J(e, n.wrapsLabels === !0)).join("tspan").attr("x", 0).attr("dy", (e, t) => t === 0 ? 0 : Ge).text((e) => e), T(), {
1065
+ enteringNodes: f,
1066
+ exitingLinks: a,
1067
+ exitingNodes: d
1068
+ };
979
1069
  };
980
- l.stop(), p.call(ve().on("start", (e, t) => {
981
- e.sourceEvent?.stopPropagation(), t.fx = t.x, t.fy = t.y;
982
- }).on("drag", (e, t) => {
983
- t.x = e.x, t.y = e.y, t.fx = e.x, t.fy = e.y, y();
984
- }).on("end", (e, t) => {
985
- t.fx = null, t.fy = null;
986
- })), y();
987
- let x = u.node();
988
- if (x == null) throw Error("Failed to create network diagram SVG element.");
989
- return {
1070
+ return N(e), O(), {
990
1071
  destroy: () => {
991
- l.stop(), u.remove();
1072
+ M(), l.stop(), u.remove();
992
1073
  },
993
1074
  resize: () => {
994
- let e = n.clientWidth || J, t = n.clientHeight || Y;
995
- u.attr("width", e).attr("height", t).attr("viewBox", `0 0 ${String(e)} ${String(t)}`), l.force("center", D(e / 2, t / 2));
1075
+ let e = t.clientWidth || G, n = t.clientHeight || K;
1076
+ u.attr("width", e).attr("height", n).attr("viewBox", `0 0 ${String(e)} ${String(n)}`), l.force("center", D(e / 2, n / 2));
996
1077
  },
997
- svg: x,
1078
+ svg: m,
998
1079
  triggerAutoLayout: () => {
999
- l.alpha(1);
1000
- for (let e = 0; e < ke; e += 1) l.tick();
1001
- l.stop(), y(), r.fitsView === !0 && b();
1080
+ M(), j(), O();
1081
+ let e = n.fitsView === !0 ? k() : void 0;
1082
+ e && A(e);
1083
+ },
1084
+ update: (e) => {
1085
+ M();
1086
+ let { enteringNodes: t, exitingLinks: r, exitingNodes: i } = N(e), o = new Map(g.map((e) => [e.id, {
1087
+ x: e.x ?? 0,
1088
+ y: e.y ?? 0
1089
+ }]));
1090
+ j();
1091
+ let s = new Map(g.map((e) => [e.id, {
1092
+ x: e.x ?? 0,
1093
+ y: e.y ?? 0
1094
+ }])), c = Te(m), l = (n.fitsView === !0 ? k() : void 0) ?? c, u = (e) => {
1095
+ for (let t of g) {
1096
+ let n = st($(o.get(t.id)), $(s.get(t.id)), e);
1097
+ t.x = n.x, t.y = n.y;
1098
+ }
1099
+ O(), t.style("opacity", e), i.style("opacity", 1 - e), r.style("opacity", 1 - e), A(H.translate(Q(c.x, l.x, e), Q(c.y, l.y, e)).scale(Q(c.k, l.k, e))), e < 1 || (t.style("opacity", null), i.remove(), r.remove());
1100
+ };
1101
+ if (a <= 0) {
1102
+ u(1);
1103
+ return;
1104
+ }
1105
+ u(0);
1106
+ let d = performance.now(), f = (e) => {
1107
+ let t = Math.min(1, (e - d) / a);
1108
+ u(ct(t)), y = t < 1 ? requestAnimationFrame(f) : void 0;
1109
+ };
1110
+ y = requestAnimationFrame(f);
1002
1111
  }
1003
1112
  };
1004
1113
  }
1005
- function Q(e) {
1006
- return $(Pe[Math.max(0, Math.min(e.level ?? Ae, Pe.length - 1))]);
1114
+ function J(e, t) {
1115
+ let n = e.label ?? e.id;
1116
+ if (!t || e.label == null || n.length <= Ye) return [n];
1117
+ let r = n.length / 2, i = -1;
1118
+ for (let e = n.indexOf(" "); e !== -1; e = n.indexOf(" ", e + 1)) (i === -1 || Math.abs(e - r) < Math.abs(i - r)) && (i = e);
1119
+ return i === -1 ? [n] : [n.slice(0, i), n.slice(i + 1)];
1120
+ }
1121
+ function rt(e) {
1122
+ return Math.max(...e.map((e) => e.length)) * Ke;
1123
+ }
1124
+ function it(e, t, n, r) {
1125
+ let { radius: i } = Z(e), a = {
1126
+ anchor: "middle",
1127
+ x: 0,
1128
+ y: i + ze
1129
+ };
1130
+ if (n === "below" || t.length === 0) return a;
1131
+ let o = t.map((t) => Math.atan2((t.y ?? 0) - (e.y ?? 0), (t.x ?? 0) - (e.x ?? 0))).toSorted((e, t) => e - t), s = 0, c = 0;
1132
+ for (let [e, t] of o.entries()) {
1133
+ let n = e === o.length - 1 ? $(o[0]) + Math.PI * 2 : $(o[e + 1]);
1134
+ n - t <= s || (s = n - t, c = t + s / 2);
1135
+ }
1136
+ let l = Math.cos(c), u = Math.sin(c), d = (r - 1) * Ge;
1137
+ if (Math.abs(l) < Je) return u > 0 ? a : {
1138
+ anchor: "middle",
1139
+ x: 0,
1140
+ y: -(i + qe) - d
1141
+ };
1142
+ let f = i + qe;
1143
+ return {
1144
+ anchor: l > 0 ? "start" : "end",
1145
+ x: l * f,
1146
+ y: u * f + We / 3 - d / 2
1147
+ };
1148
+ }
1149
+ function at(e) {
1150
+ let t = /* @__PURE__ */ new Map();
1151
+ for (let n of e.links) t.set(n.source, [...t.get(n.source) ?? [], n.target]), t.set(n.target, [...t.get(n.target) ?? [], n.source]);
1152
+ return t;
1153
+ }
1154
+ function ot(e) {
1155
+ return `${Y(e.source)}>${Y(e.target)}`;
1156
+ }
1157
+ function Y(e) {
1158
+ return typeof e == "object" ? e.id : String(e);
1159
+ }
1160
+ function X(e, t) {
1161
+ return typeof e == "object" ? e[t] ?? 0 : 0;
1162
+ }
1163
+ function Z(e) {
1164
+ return $(tt[Math.max(0, Math.min(e.level ?? Le, tt.length - 1))]);
1165
+ }
1166
+ function Q(e, t, n) {
1167
+ return e + (t - e) * n;
1168
+ }
1169
+ function st(e, t, n) {
1170
+ return {
1171
+ x: Q(e.x, t.x, n),
1172
+ y: Q(e.y, t.y, n)
1173
+ };
1174
+ }
1175
+ function ct(e) {
1176
+ return e < .5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2;
1007
1177
  }
1008
1178
  function $(e) {
1009
1179
  if (e === void 0) throw Error("Expected a value in the network diagram.");
1010
1180
  return e;
1011
1181
  }
1012
- export { Fe as renderNetworkDiagram };
1182
+ export { nt as renderNetworkDiagram };
@@ -8,7 +8,7 @@ import { TreeDiagramNode, TreeDiagramOptions } from './treeDiagram';
8
8
  export type { BarChartData, BarChartSeries } from './tanStackCharts';
9
9
  export type { ChordDiagramData, ChordDiagramLink, ChordDiagramNode, ChordDiagramOptions } from './chordDiagram';
10
10
  export type { ErdDiagramData, ErdDiagramEdge, ErdDiagramNode, ErdDiagramNodeTypeId, ErdDiagramOptions } from './erdDiagram';
11
- export type { NetworkDiagramData, NetworkDiagramLink, NetworkDiagramNode, NetworkDiagramOptions } from './networkDiagram';
11
+ export type { NetworkDiagramData, NetworkDiagramLabelPlacementId, NetworkDiagramLink, NetworkDiagramNode, NetworkDiagramOptions } from './networkDiagram';
12
12
  export type { SankeyDiagramData, SankeyDiagramLink, SankeyDiagramNode, SankeyDiagramOptions } from './sankeyDiagram';
13
13
  export type { TreeDiagramNode, TreeDiagramNodeRoleId, TreeDiagramOptions } from './treeDiagram';
14
14
  export interface D3View extends PresentationView {
@@ -17,6 +17,7 @@ export interface D3View extends PresentationView {
17
17
  export interface D3NetworkView extends D3View {
18
18
  destroy: () => void;
19
19
  triggerAutoLayout: () => void;
20
+ update: (data: NetworkDiagramData) => void;
20
21
  }
21
22
  export interface D3TanStackChartsView extends D3View {
22
23
  destroy: () => void;
@@ -14,13 +14,19 @@ export interface NetworkDiagramData {
14
14
  export interface NetworkDiagramOptions {
15
15
  chargeStrength?: number;
16
16
  fitsView?: boolean;
17
+ labelPlacementId?: NetworkDiagramLabelPlacementId;
17
18
  linkDistance?: number;
18
19
  onNodeClick?: (node: NetworkDiagramNode) => void;
20
+ reservesLabelRoom?: boolean;
21
+ transitionDuration?: number;
22
+ wrapsLabels?: boolean;
19
23
  }
24
+ export type NetworkDiagramLabelPlacementId = 'below' | 'outside';
20
25
  export interface NetworkDiagramHandle {
21
26
  destroy: () => void;
22
27
  resize: () => void;
23
28
  svg: SVGSVGElement;
24
29
  triggerAutoLayout: () => void;
30
+ update: (data: NetworkDiagramData) => void;
25
31
  }
26
32
  export declare function renderNetworkDiagram(data: NetworkDiagramData, renderTo: HTMLElement, options?: NetworkDiagramOptions): NetworkDiagramHandle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpuse/dpuse-tool-d3-visualiser",
3
- "version": "1.0.122",
3
+ "version": "1.0.123",
4
4
  "private": false,
5
5
  "description": "A TypeScript wrapper for D3, TanStack Charts, and Unovis that implements the Data Positioning chart-rendering interface, providing ERD (dagre), Sankey (d3-sankey), chord (Unovis), network (d3-force), tree (d3-hierarchy), and bar chart (TanStack Charts) renderers.",
6
6
  "license": "MIT",
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "@dagrejs/dagre": "^3.1.3",
66
- "@dpuse/dpuse-shared": "^1.0.251",
66
+ "@dpuse/dpuse-shared": "^1.0.252",
67
67
  "@tanstack/charts": "^1.5.0",
68
68
  "@unovis/ts": "^1.8.1",
69
69
  "d3-drag": "^3.0.1",