@dpuse/dpuse-tool-d3-visualiser 1.0.118 → 1.0.121

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.
Files changed (38) hide show
  1. package/README.md +205 -243
  2. package/dist/chordDiagram-Cm91Tmgo.js +1729 -0
  3. package/dist/d3-hierarchy-Dtx4jD78.js +269 -0
  4. package/dist/{linear-CNetDix0.js → d3-scale-BYykLEPO.js} +238 -177
  5. package/dist/{select-SZKizDc7.js → d3-selection-CL8c_tE2.js} +230 -232
  6. package/dist/d3-shape-gf8U18pS.js +1133 -0
  7. package/dist/dpuse-tool-d3-visualiser.es.js +6 -6
  8. package/dist/{erdDiagram-DKsqCN08.js → erdDiagram-DmYSx8Dh.js} +1 -1
  9. package/dist/{networkDiagram-BiCPMNf8.js → networkDiagram-p5z5B_vZ.js} +378 -368
  10. package/dist/{sankeyDiagram-DcI-D1uh.js → sankeyDiagram-Dbl1-v5p.js} +31 -31
  11. package/dist/shipped-packages.json +11 -20
  12. package/dist/{src-DAMkWOaT.js → src-YHHReglY.js} +32 -32
  13. package/dist/{tanStackCharts-5HHGfe6p.js → tanStackCharts-DEINbmRi.js} +1041 -1096
  14. package/dist/treeDiagram-t0oFwi1c.js +49 -0
  15. package/dist/types/src/networkDiagram.d.ts +4 -0
  16. package/package.json +25 -23
  17. package/dist/array-CpxKKsZm.js +0 -12
  18. package/dist/array-CpxKKsZm.js.map +0 -1
  19. package/dist/chordDiagram-Dbu2uT_s.js +0 -3588
  20. package/dist/chordDiagram-Dbu2uT_s.js.map +0 -1
  21. package/dist/dpuse-tool-d3-visualiser.es.js.map +0 -1
  22. package/dist/erdDiagram-DKsqCN08.js.map +0 -1
  23. package/dist/hierarchy-DU9LihDu.js +0 -135
  24. package/dist/hierarchy-DU9LihDu.js.map +0 -1
  25. package/dist/linear-CNetDix0.js.map +0 -1
  26. package/dist/link-CAkrxHYd.js +0 -62
  27. package/dist/link-CAkrxHYd.js.map +0 -1
  28. package/dist/networkDiagram-BiCPMNf8.js.map +0 -1
  29. package/dist/palette-D5DTPmuA.js.map +0 -1
  30. package/dist/point-_U9MxSuk.js +0 -85
  31. package/dist/point-_U9MxSuk.js.map +0 -1
  32. package/dist/sankeyDiagram-DcI-D1uh.js.map +0 -1
  33. package/dist/select-SZKizDc7.js.map +0 -1
  34. package/dist/src-DAMkWOaT.js.map +0 -1
  35. package/dist/string-BzfQLSds.js.map +0 -1
  36. package/dist/tanStackCharts-5HHGfe6p.js.map +0 -1
  37. package/dist/treeDiagram-fmrYqvXl.js +0 -126
  38. package/dist/treeDiagram-fmrYqvXl.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { i as e, n as t, r as n, t as r } from "./palette-D5DTPmuA.js";
2
- import { t as i } from "./select-SZKizDc7.js";
3
- import { t as a } from "./link-CAkrxHYd.js";
1
+ import { i as e } from "./d3-selection-CL8c_tE2.js";
2
+ import { i as t, n, r, t as i } from "./palette-D5DTPmuA.js";
3
+ import { _ as a } from "./d3-shape-gf8U18pS.js";
4
4
  // node_modules/d3-array/src/min.js
5
5
  function o(e, t) {
6
6
  let n;
@@ -66,7 +66,7 @@ function v({ nodes: e }) {
66
66
  }
67
67
  }
68
68
  function y() {
69
- let t = 0, n = 0, r = 1, i = 1, a = 24, y = 8, b, x = m, S = c, C, w, T = h, E = g, D = 6;
69
+ let e = 0, n = 0, r = 1, i = 1, a = 24, y = 8, b, x = m, S = c, C, w, T = h, E = g, D = 6;
70
70
  function O() {
71
71
  let e = {
72
72
  nodes: T.apply(null, arguments),
@@ -92,10 +92,10 @@ function y() {
92
92
  return arguments.length ? (E = typeof e == "function" ? e : l(e), O) : E;
93
93
  }, O.linkSort = function(e) {
94
94
  return arguments.length ? (w = e, O) : w;
95
- }, O.size = function(e) {
96
- return arguments.length ? (t = n = 0, r = +e[0], i = +e[1], O) : [r - t, i - n];
97
- }, O.extent = function(e) {
98
- return arguments.length ? (t = +e[0][0], r = +e[1][0], n = +e[0][1], i = +e[1][1], O) : [[t, n], [r, i]];
95
+ }, O.size = function(t) {
96
+ return arguments.length ? (e = n = 0, r = +t[0], i = +t[1], O) : [r - e, i - n];
97
+ }, O.extent = function(t) {
98
+ return arguments.length ? (e = +t[0][0], r = +t[1][0], n = +t[0][1], i = +t[1][1], O) : [[e, n], [r, i]];
99
99
  }, O.iterations = function(e) {
100
100
  return arguments.length ? (D = +e, O) : D;
101
101
  };
@@ -135,10 +135,10 @@ function y() {
135
135
  }
136
136
  }
137
137
  function N({ nodes: n }) {
138
- let i = e(n, (e) => e.depth) + 1, o = (r - t - a) / (i - 1), s = Array(i);
139
- for (let e of n) {
140
- let n = Math.max(0, Math.min(i - 1, Math.floor(S.call(null, e, i))));
141
- e.layer = n, e.x0 = t + n * o, e.x1 = e.x0 + a, s[n] ? s[n].push(e) : s[n] = [e];
138
+ let i = t(n, (e) => e.depth) + 1, o = (r - e - a) / (i - 1), s = Array(i);
139
+ for (let t of n) {
140
+ let n = Math.max(0, Math.min(i - 1, Math.floor(S.call(null, t, i))));
141
+ t.layer = n, t.x0 = e + n * o, t.x1 = t.x0 + a, s[n] ? s[n].push(t) : s[n] = [t];
142
142
  }
143
143
  if (C) for (let e of s) e.sort(C);
144
144
  return s;
@@ -159,9 +159,9 @@ function y() {
159
159
  H(r);
160
160
  }
161
161
  }
162
- function F(t) {
163
- let r = N(t);
164
- b = Math.min(y, (i - n) / (e(r, (e) => e.length) - 1)), P(r);
162
+ function F(e) {
163
+ let r = N(e);
164
+ b = Math.min(y, (i - n) / (t(r, (e) => e.length) - 1)), P(r);
165
165
  for (let e = 0; e < D; ++e) {
166
166
  let t = .99 ** e, n = Math.max(1 - t, (e + 1) / D);
167
167
  L(r, t, n), I(r, t, n);
@@ -262,10 +262,10 @@ function S() {
262
262
  }
263
263
  // src/sankeyDiagram.ts
264
264
  var C = 16, w = 12, T = 480, E = 640, D = 6;
265
- function O(e, a, o = {}) {
266
- let s = o.colorModeId ?? "light", c = r[s], l = t[s];
265
+ function O(t, a, o = {}) {
266
+ let s = o.colorModeId ?? "light", c = i[s], l = n[s];
267
267
  getComputedStyle(a).position === "static" && (a.style.position = "relative");
268
- let u = i(a).append("div").attr("role", "tooltip").style("position", "absolute").style("pointer-events", "none").style("z-index", "1").style("opacity", "0").style("transition", "opacity 120ms ease").style("padding", "4px 8px").style("border-radius", "4px").style("font", "12px system-ui, -apple-system, \"Segoe UI\", sans-serif").style("white-space", "nowrap").style("background", l.chart).style("color", c.primary).style("border", `1px solid ${l.border}`).style("box-shadow", "0 2px 8px rgba(0,0,0,0.15)");
268
+ let u = e(a).append("div").attr("role", "tooltip").style("position", "absolute").style("pointer-events", "none").style("z-index", "1").style("opacity", "0").style("transition", "opacity 120ms ease").style("padding", "4px 8px").style("border-radius", "4px").style("font", "12px system-ui, -apple-system, \"Segoe UI\", sans-serif").style("white-space", "nowrap").style("background", l.chart).style("color", c.primary).style("border", `1px solid ${l.border}`).style("box-shadow", "0 2px 8px rgba(0,0,0,0.15)");
269
269
  function d(e, t) {
270
270
  let n = a.getBoundingClientRect();
271
271
  u.html(t).style("left", `${String(e.clientX - n.left + 12)}px`).style("top", `${String(e.clientY - n.top + 12)}px`).style("opacity", "1");
@@ -274,27 +274,27 @@ function O(e, a, o = {}) {
274
274
  u.style("opacity", "0");
275
275
  }
276
276
  function p() {
277
- i(a).selectAll("svg").remove();
278
- let t = a.clientWidth || E, r = a.clientHeight || T, l = {
279
- links: e.links.map((e) => ({ ...e })),
280
- nodes: e.nodes.map((e) => ({ ...e }))
281
- }, { links: u, nodes: p } = y().nodeId((e) => e.id).nodeWidth(o.nodeWidth ?? C).nodePadding(o.nodePadding ?? w).extent([[1, 1], [t - 1, r - 1]])(l), m = i(a).insert("svg", "div").attr("viewBox", `0 0 ${String(t)} ${String(r)}`).attr("width", "100%").attr("height", "100%").attr("font-family", "system-ui, -apple-system, \"Segoe UI\", sans-serif").attr("font-size", 12), h = S();
282
- m.append("g").attr("fill", "none").selectAll("path").data(u).join("path").attr("d", h).attr("stroke", (e) => n(p.indexOf(e.source), s)).attr("stroke-opacity", .35).attr("stroke-width", (e) => Math.max(1, e.width ?? 1)).on("mouseenter", (e, t) => {
283
- i(e.currentTarget).attr("stroke-opacity", .6);
284
- let n = t.source, r = t.target;
285
- d(e, `${n.name} → ${r.name}<br>${t.value.toLocaleString()}`);
277
+ e(a).selectAll("svg").remove();
278
+ let n = a.clientWidth || E, i = a.clientHeight || T, l = {
279
+ links: t.links.map((e) => ({ ...e })),
280
+ nodes: t.nodes.map((e) => ({ ...e }))
281
+ }, { links: u, nodes: p } = y().nodeId((e) => e.id).nodeWidth(o.nodeWidth ?? C).nodePadding(o.nodePadding ?? w).extent([[1, 1], [n - 1, i - 1]])(l), m = e(a).insert("svg", "div").attr("viewBox", `0 0 ${String(n)} ${String(i)}`).attr("width", "100%").attr("height", "100%").attr("font-family", "system-ui, -apple-system, \"Segoe UI\", sans-serif").attr("font-size", 12), h = S();
282
+ m.append("g").attr("fill", "none").selectAll("path").data(u).join("path").attr("d", h).attr("stroke", (e) => r(p.indexOf(e.source), s)).attr("stroke-opacity", .35).attr("stroke-width", (e) => Math.max(1, e.width ?? 1)).on("mouseenter", (t, n) => {
283
+ e(t.currentTarget).attr("stroke-opacity", .6);
284
+ let r = n.source, i = n.target;
285
+ d(t, `${r.name} → ${i.name}<br>${n.value.toLocaleString()}`);
286
286
  }).on("mousemove", (e, t) => {
287
287
  let n = t.source, r = t.target;
288
288
  d(e, `${n.name} → ${r.name}<br>${t.value.toLocaleString()}`);
289
- }).on("mouseleave", (e) => {
290
- i(e.currentTarget).attr("stroke-opacity", .35), f();
289
+ }).on("mouseleave", (t) => {
290
+ e(t.currentTarget).attr("stroke-opacity", .35), f();
291
291
  });
292
292
  let g = m.append("g").selectAll("g").data(p).join("g");
293
- g.append("rect").attr("x", (e) => e.x0 ?? 0).attr("y", (e) => e.y0 ?? 0).attr("width", (e) => (e.x1 ?? 0) - (e.x0 ?? 0)).attr("height", (e) => Math.max(1, (e.y1 ?? 0) - (e.y0 ?? 0))).attr("rx", 2).attr("fill", (e, t) => n(t, s)).on("mouseenter", (e, t) => {
293
+ g.append("rect").attr("x", (e) => e.x0 ?? 0).attr("y", (e) => e.y0 ?? 0).attr("width", (e) => (e.x1 ?? 0) - (e.x0 ?? 0)).attr("height", (e) => Math.max(1, (e.y1 ?? 0) - (e.y0 ?? 0))).attr("rx", 2).attr("fill", (e, t) => r(t, s)).on("mouseenter", (e, t) => {
294
294
  d(e, `${t.name}<br>${(t.value ?? 0).toLocaleString()}`);
295
295
  }).on("mousemove", (e, t) => {
296
296
  d(e, `${t.name}<br>${(t.value ?? 0).toLocaleString()}`);
297
- }).on("mouseleave", f), g.append("text").attr("x", (e) => (e.x0 ?? 0) < t / 2 ? (e.x1 ?? 0) + D : (e.x0 ?? 0) - D).attr("y", (e) => ((e.y0 ?? 0) + (e.y1 ?? 0)) / 2).attr("dy", "0.35em").attr("text-anchor", (e) => (e.x0 ?? 0) < t / 2 ? "start" : "end").attr("fill", c.primary).text((e) => e.name);
297
+ }).on("mouseleave", f), g.append("text").attr("x", (e) => (e.x0 ?? 0) < n / 2 ? (e.x1 ?? 0) + D : (e.x0 ?? 0) - D).attr("y", (e) => ((e.y0 ?? 0) + (e.y1 ?? 0)) / 2).attr("dy", "0.35em").attr("text-anchor", (e) => (e.x0 ?? 0) < n / 2 ? "start" : "end").attr("fill", c.primary).text((e) => e.name);
298
298
  let _ = m.node();
299
299
  if (_ == null) throw Error("Failed to create Sankey diagram SVG element.");
300
300
  return _;
@@ -1,37 +1,28 @@
1
1
  {
2
2
  "packages": [
3
3
  "@dagrejs/dagre@3.1.3",
4
- "@emotion/cache@11.14.0",
5
- "@emotion/css@11.13.5",
6
- "@emotion/hash@0.9.2",
7
- "@emotion/memoize@0.9.0",
8
- "@emotion/serialize@1.3.3",
9
- "@emotion/sheet@1.4.0",
10
- "@emotion/unitless@0.10.0",
11
- "@emotion/utils@1.4.2",
12
- "@juggle/resize-observer@3.4.0",
13
- "@tanstack/charts@1.1.0",
14
- "@unovis/ts@1.7.1",
4
+ "@tanstack/charts@1.5.0",
5
+ "@unovis/ts@1.8.1",
15
6
  "d3-array@3.2.4",
16
- "d3-chord@3.0.1",
7
+ "d3-chord@3.0.2",
17
8
  "d3-color@3.1.0",
18
9
  "d3-dispatch@3.0.1",
19
- "d3-drag@3.0.0",
10
+ "d3-drag@3.0.1",
20
11
  "d3-ease@3.0.1",
21
- "d3-force@3.0.0",
12
+ "d3-force@3.0.1",
22
13
  "d3-format@3.1.2",
23
- "d3-hierarchy@3.1.2",
24
- "d3-interpolate-path@2.3.0",
14
+ "d3-hierarchy@3.1.3",
25
15
  "d3-interpolate@3.0.1",
26
- "d3-path@3.1.0",
16
+ "d3-path@3.1.1",
27
17
  "d3-quadtree@3.0.1",
28
18
  "d3-sankey@0.12.3",
29
19
  "d3-scale@4.0.2",
30
- "d3-selection@3.0.0",
31
- "d3-shape@3.2.0",
20
+ "d3-scale@4.0.3",
21
+ "d3-selection@3.0.1",
22
+ "d3-shape@3.2.1",
32
23
  "d3-timer@3.0.1",
33
24
  "d3-transition@3.0.1",
34
- "d3-zoom@3.0.0",
25
+ "d3-zoom@3.0.1",
35
26
  "internmap@2.0.3",
36
27
  "stylis@4.2.0",
37
28
  "throttle-debounce@5.0.2"
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, n, o as r, r as i, s as a } from "./select-SZKizDc7.js";
1
+ import { a as e, c as t, n, o as r, s as i, t as a } from "./d3-selection-CL8c_tE2.js";
2
2
  import { a as o, n as s, r as c, t as l } from "./string-BzfQLSds.js";
3
3
  // node_modules/d3-dispatch/src/dispatch.js
4
4
  var u = { value: () => {} };
@@ -372,8 +372,8 @@ function ge(e, t, n) {
372
372
  };
373
373
  }
374
374
  function _e(e, t) {
375
- var n = a(e), r = n === "transform" ? ae : J;
376
- return this.attrTween(e, typeof t == "function" ? (n.local ? ge : he)(n, r, q(this, "attr." + e, t)) : t == null ? (n.local ? fe : de)(n) : (n.local ? me : pe)(n, r, t));
375
+ var r = n(e), i = r === "transform" ? ae : J;
376
+ return this.attrTween(e, typeof t == "function" ? (r.local ? ge : he)(r, i, q(this, "attr." + e, t)) : t == null ? (r.local ? fe : de)(r) : (r.local ? me : pe)(r, i, t));
377
377
  }
378
378
  // node_modules/d3-transition/src/transition/attrTween.js
379
379
  function ve(e, t) {
@@ -403,12 +403,12 @@ function xe(e, t) {
403
403
  return i._value = t, i;
404
404
  }
405
405
  function Se(e, t) {
406
- var n = "attr." + e;
407
- if (arguments.length < 2) return (n = this.tween(n)) && n._value;
408
- if (t == null) return this.tween(n, null);
406
+ var r = "attr." + e;
407
+ if (arguments.length < 2) return (r = this.tween(r)) && r._value;
408
+ if (t == null) return this.tween(r, null);
409
409
  if (typeof t != "function") throw Error();
410
- var r = a(e);
411
- return this.tween(n, (r.local ? be : xe)(r, t));
410
+ var i = n(e);
411
+ return this.tween(r, (i.local ? be : xe)(i, t));
412
412
  }
413
413
  // node_modules/d3-transition/src/transition/delay.js
414
414
  function Ce(e, t) {
@@ -465,9 +465,9 @@ function Me(e) {
465
465
  }
466
466
  // node_modules/d3-transition/src/transition/filter.js
467
467
  function Ne(e) {
468
- typeof e != "function" && (e = t(e));
469
- for (var n = this._groups, r = n.length, i = Array(r), a = 0; a < r; ++a) for (var o = n[a], s = o.length, c = i[a] = [], l, u = 0; u < s; ++u) (l = o[u]) && e.call(l, l.__data__, u, o) && c.push(l);
470
- return new Z(i, this._parents, this._name, this._id);
468
+ typeof e != "function" && (e = a(e));
469
+ for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var o = t[i], s = o.length, c = r[i] = [], l, u = 0; u < s; ++u) (l = o[u]) && e.call(l, l.__data__, u, o) && c.push(l);
470
+ return new Z(r, this._parents, this._name, this._id);
471
471
  }
472
472
  // node_modules/d3-transition/src/transition/merge.js
473
473
  function Pe(e) {
@@ -513,26 +513,26 @@ function Be(e) {
513
513
  return new Z(o, this._parents, t, n);
514
514
  }
515
515
  // node_modules/d3-transition/src/transition/selectAll.js
516
- function Ve(t) {
517
- var n = this._name, r = this._id;
518
- typeof t != "function" && (t = e(t));
519
- for (var i = this._groups, a = i.length, o = [], s = [], c = 0; c < a; ++c) for (var l = i[c], u = l.length, d, f = 0; f < u; ++f) if (d = l[f]) {
520
- for (var p = t.call(d, d.__data__, f, l), m, h = U(d, r), g = 0, _ = p.length; g < _; ++g) (m = p[g]) && B(m, n, r, g, p, h);
516
+ function Ve(e) {
517
+ var t = this._name, n = this._id;
518
+ typeof e != "function" && (e = i(e));
519
+ for (var r = this._groups, a = r.length, o = [], s = [], c = 0; c < a; ++c) for (var l = r[c], u = l.length, d, f = 0; f < u; ++f) if (d = l[f]) {
520
+ for (var p = e.call(d, d.__data__, f, l), m, h = U(d, n), g = 0, _ = p.length; g < _; ++g) (m = p[g]) && B(m, t, n, g, p, h);
521
521
  o.push(p), s.push(d);
522
522
  }
523
- return new Z(o, s, n, r);
523
+ return new Z(o, s, t, n);
524
524
  }
525
525
  // node_modules/d3-transition/src/transition/selection.js
526
- var He = n.prototype.constructor;
526
+ var He = e.prototype.constructor;
527
527
  function Ue() {
528
528
  return new He(this._groups, this._parents);
529
529
  }
530
530
  // node_modules/d3-transition/src/transition/style.js
531
- function We(e, t) {
532
- var n, r, a;
531
+ function We(e, n) {
532
+ var r, i, a;
533
533
  return function() {
534
- var o = i(this, e), s = (this.style.removeProperty(e), i(this, e));
535
- return o === s ? null : o === n && s === r ? a : a = t(n = o, r = s);
534
+ var o = t(this, e), s = (this.style.removeProperty(e), t(this, e));
535
+ return o === s ? null : o === r && s === i ? a : a = n(r = o, i = s);
536
536
  };
537
537
  }
538
538
  function Y(e) {
@@ -540,18 +540,18 @@ function Y(e) {
540
540
  this.style.removeProperty(e);
541
541
  };
542
542
  }
543
- function Ge(e, t, n) {
544
- var r, a = n + "", o;
543
+ function Ge(e, n, r) {
544
+ var i, a = r + "", o;
545
545
  return function() {
546
- var s = i(this, e);
547
- return s === a ? null : s === r ? o : o = t(r = s, n);
546
+ var s = t(this, e);
547
+ return s === a ? null : s === i ? o : o = n(i = s, r);
548
548
  };
549
549
  }
550
- function Ke(e, t, n) {
551
- var r, a, o;
550
+ function Ke(e, n, r) {
551
+ var i, a, o;
552
552
  return function() {
553
- var s = i(this, e), c = n(this), l = c + "";
554
- return c ?? (l = c = (this.style.removeProperty(e), i(this, e))), s === l ? null : s === r && l === a ? o : (a = l, o = t(r = s, c));
553
+ var s = t(this, e), c = r(this), l = c + "";
554
+ return c ?? (l = c = (this.style.removeProperty(e), t(this, e))), s === l ? null : s === i && l === a ? o : (a = l, o = n(i = s, c));
555
555
  };
556
556
  }
557
557
  function qe(e, t) {
@@ -656,7 +656,7 @@ function Z(e, t, n, r) {
656
656
  function Q() {
657
657
  return ++at;
658
658
  }
659
- var $ = n.prototype;
659
+ var $ = e.prototype;
660
660
  Z.prototype = {
661
661
  constructor: Z,
662
662
  select: Be,
@@ -710,5 +710,5 @@ function lt(e) {
710
710
  for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && B(c, e, t, l, o, n || ct(c, t));
711
711
  return new Z(r, this._parents, e, t);
712
712
  }
713
- n.prototype.interrupt = K, n.prototype.transition = lt;
713
+ e.prototype.interrupt = K, e.prototype.transition = lt;
714
714
  export { k as n, d as r, G as t };