@marimo-team/islands 0.14.11-dev49 → 0.14.11-dev5

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 (72) hide show
  1. package/dist/{ConnectedDataExplorerComponent-Cjgd64vA.js → ConnectedDataExplorerComponent-B6aOzVS5.js} +4 -4
  2. package/dist/{ImageComparisonComponent-Qeku_ie5.js → ImageComparisonComponent-CaS90zDG.js} +1 -1
  3. package/dist/{VegaLite-D6IST6Ce.js → VegaLite-9cmh1ip6.js} +7180 -6961
  4. package/dist/{_baseUniq-Do0IJELs.js → _baseUniq-Ds8rwzoS.js} +36 -36
  5. package/dist/{any-language-editor-SACSjHCy.js → any-language-editor-C34_nddD.js} +1 -1
  6. package/dist/{architectureDiagram-NQ2NVSRB-Q2fo4rir.js → architectureDiagram-IEHRJDOE-DWqKs7Qi.js} +894 -897
  7. package/dist/assets/{save-worker-fI5ofStJ.js → save-worker-BIDtxCd1.js} +1405 -1040
  8. package/dist/assets/worker-BcyuOSTi.js +4117 -0
  9. package/dist/assets/worker-Dz6PPEGc.js +4115 -0
  10. package/dist/{blockDiagram-PHRCVELO-8qw31lrR.js → blockDiagram-JOT3LUYC-B8mmQaZh.js} +522 -534
  11. package/dist/{c4Diagram-6F6E4RAY-CArmib1-.js → c4Diagram-VJAJSXHY-NBxdZlrN.js} +4 -4
  12. package/dist/{channel-BUGDWrfw.js → channel-BfAGxCrV.js} +1 -1
  13. package/dist/{chunk-353BL4L5-AUMBixjG.js → chunk-4BMEZGHF-CfUGSQT8.js} +1 -1
  14. package/dist/{chunk-QEP2MXWD-plVSeoMW.js → chunk-A2AXSNBT-D9M3y1n_.js} +27 -30
  15. package/dist/chunk-AEK57VVT-BldYiOIL.js +1416 -0
  16. package/dist/{chunk-67H74DCK-C02qOCjM.js → chunk-D6G4REZN-CyHRetd2.js} +1 -1
  17. package/dist/chunk-RZ5BOZE2-CjaUyB8M.js +24 -0
  18. package/dist/{chunk-AACKK3MU-D3l0oDeF.js → chunk-XZIHB7SX-D0pR7dGZ.js} +1 -1
  19. package/dist/{classDiagram-v2-O24JOBDK-B5S549Al.js → classDiagram-GIVACNV2-3XsZMDod.js} +2 -2
  20. package/dist/{classDiagram-BGRH5UQR-B5S549Al.js → classDiagram-v2-COTLJTTW-3XsZMDod.js} +2 -2
  21. package/dist/{clone-Co1yOt-c.js → clone-BDrnEEqw.js} +1 -1
  22. package/dist/{dagre-FFZHY6LT-DXH8QnTc.js → dagre-OKDRZEBW-BrHyk4NP.js} +8 -8
  23. package/dist/{data-editor-BpvURRan.js → data-editor-DBpvDeMB.js} +201 -213
  24. package/dist/{diagram-ZTM2IBQH-BXkf88er.js → diagram-SSKATNLV-bT_2B2w4.js} +3 -3
  25. package/dist/diagram-VNBRO52H-Bx_L7C2d.js +126 -0
  26. package/dist/{erDiagram-R3QVA2FD-Ds55spqv.js → erDiagram-Q7BY3M3F-Cd6Gjs6W.js} +5 -6
  27. package/dist/{flowDiagram-PKI6S5ZS-DLPCzaBD.js → flowDiagram-4HSFHLVR-D5lAXTlL.js} +278 -283
  28. package/dist/{ganttDiagram-EK5VF46D-C9wOzyJL.js → ganttDiagram-APWFNJXF-CbcUsNgP.js} +439 -453
  29. package/dist/{gitGraphDiagram-GW3U2K7C-B66inUMB.js → gitGraphDiagram-7IBYFJ6S-DR03grHL.js} +35 -35
  30. package/dist/{graph-BOlYxZBQ.js → graph-CQTQpTWU.js} +3 -3
  31. package/dist/{index-DvIxMHfc.js → index-BKMrrnUX.js} +3 -6
  32. package/dist/{index-Dcw_N-Rg.js → index-BxxoKW3o.js} +3 -3
  33. package/dist/{index-CGLu-j79.js → index-RqSu7HQG.js} +4 -4
  34. package/dist/{index-DQpARYi4.js → index-XRHtpm1H.js} +1 -1
  35. package/dist/{infoDiagram-RLU2ROGC-HQpy1gT3.js → infoDiagram-PH2N3AL5-DmCmqvJx.js} +3 -5
  36. package/dist/journeyDiagram-U35MCT3I-BflroP5I.js +809 -0
  37. package/dist/{kanban-definition-ILFWEQ3N-B4AID9Od.js → kanban-definition-NDS4AKOZ-B_RdTOOY.js} +39 -41
  38. package/dist/{layout-DxzRbPiB.js → layout-BYUcheG3.js} +49 -49
  39. package/dist/{linear-DIVzEcR4.js → linear-Pho_-o0k.js} +22 -22
  40. package/dist/{main-BeXVO5bP.js → main-CO9iYCvD.js} +47536 -47436
  41. package/dist/main.js +1 -1
  42. package/dist/{mermaid-JHGCAKzw.js → mermaid-oDnDwuNj.js} +4855 -4927
  43. package/dist/min-BwXjKDSF.js +80 -0
  44. package/dist/{mindmap-definition-CZNETY7S-BXQ5XCcz.js → mindmap-definition-ALO5MXBD-2sChpaQs.js} +3 -3
  45. package/dist/{pieDiagram-NIOCPIFQ-895lf8im.js → pieDiagram-IB7DONF6-C4ZvKiEQ.js} +3 -3
  46. package/dist/{quadrantDiagram-2OG54O6I-CBBUV5iR.js → quadrantDiagram-7GDLP6J5-_vvEille.js} +2 -2
  47. package/dist/{treemap-FKARHQ26-CMMvaLsx.js → radar-MK3ICKWK-VDaCQnlN.js} +2330 -2469
  48. package/dist/{react-plotly-CZBwcgAP.js → react-plotly-D4mgeEiy.js} +1 -1
  49. package/dist/{requirementDiagram-SO3GGRV7-BnG_1SSx.js → requirementDiagram-KVF5MWMF-CrMsjj-E.js} +4 -5
  50. package/dist/{sankeyDiagram-4UZDY2LN-BxI2YWmf.js → sankeyDiagram-QLVOVGJD-Hskxq1Uc.js} +11 -11
  51. package/dist/{sequenceDiagram-ZIKVLSP4-BHELIY98.js → sequenceDiagram-X6HHIX6F-DdGYx0eb.js} +149 -151
  52. package/dist/{slides-component-BrudS1J1.js → slides-component-DE8MjAak.js} +962 -969
  53. package/dist/stateDiagram-DGXRK772-BHn53RsP.js +271 -0
  54. package/dist/{stateDiagram-v2-GD6S3NHB-CFPXJm7p.js → stateDiagram-v2-YXO3MK2T-DylItl1O.js} +2 -2
  55. package/dist/style.css +1 -1
  56. package/dist/{time-neXIHh1L.js → time-DG0kV8zC.js} +2 -2
  57. package/dist/{timeline-definition-RI47OAVP-Bd5AkZb8.js → timeline-definition-BDJGKUSR-BInePNNr.js} +102 -99
  58. package/dist/{vega-component-wfOWzfhh.js → vega-component-BYpF4iO2.js} +21 -21
  59. package/dist/{xychartDiagram-H2YORKM3-bHSCCvRr.js → xychartDiagram-VJFVF3MP-BGKy2-hw.js} +375 -409
  60. package/package.json +42 -42
  61. package/dist/assets/worker-BLUAwPAO.js +0 -3790
  62. package/dist/assets/worker-BldghCZh.js +0 -3752
  63. package/dist/chunk-6OLS64BW-16X0Uidz.js +0 -1383
  64. package/dist/chunk-BFAMUDN2-DZwGSiFQ.js +0 -8
  65. package/dist/chunk-E2GYISFI-CULRZUnK.js +0 -19
  66. package/dist/chunk-SKB7J2MH-D4DCF3Aj.js +0 -20
  67. package/dist/diagram-3EMPZRKU-EmSpmmwd.js +0 -313
  68. package/dist/diagram-5UYTHUR4-B_aCA5SY.js +0 -137
  69. package/dist/index-pBmAzQJl.js +0 -235
  70. package/dist/journeyDiagram-EWQZEKCU-B9uyFd6q.js +0 -836
  71. package/dist/min-DvrE6jkv.js +0 -80
  72. package/dist/stateDiagram-XX37X6EN-GyGZ3vmD.js +0 -264
@@ -1,80 +0,0 @@
1
- import { y as b, av as x, aw as m, ax as w, ay as l, F as O, az as p, aA as P, aB as y, aC as A, aD as I, aE as M } from "./main-BeXVO5bP.js";
2
- import { d as h, e as o, g as E } from "./_baseUniq-Do0IJELs.js";
3
- var g = Object.prototype, F = g.hasOwnProperty, J = b(function(a, n) {
4
- a = Object(a);
5
- var r = -1, i = n.length, t = i > 2 ? n[2] : void 0;
6
- for (t && x(n[0], n[1], t) && (i = 1); ++r < i; )
7
- for (var s = n[r], e = m(s), f = -1, v = e.length; ++f < v; ) {
8
- var u = e[f], d = a[u];
9
- (d === void 0 || w(d, g[u]) && !F.call(a, u)) && (a[u] = s[u]);
10
- }
11
- return a;
12
- });
13
- function K(a) {
14
- var n = a == null ? 0 : a.length;
15
- return n ? a[n - 1] : void 0;
16
- }
17
- function C(a) {
18
- return function(n, r, i) {
19
- var t = Object(n);
20
- if (!l(n)) {
21
- var s = h(r);
22
- n = O(n), r = function(f) {
23
- return s(t[f], f, t);
24
- };
25
- }
26
- var e = a(n, r, i);
27
- return e > -1 ? t[s ? n[e] : e] : void 0;
28
- };
29
- }
30
- var L = Math.max;
31
- function $(a, n, r) {
32
- var i = a == null ? 0 : a.length;
33
- if (!i)
34
- return -1;
35
- var t = r == null ? 0 : p(r);
36
- return t < 0 && (t = L(i + t, 0)), o(a, h(n), t);
37
- }
38
- var N = C($);
39
- function q(a, n) {
40
- var r = -1, i = l(a) ? Array(a.length) : [];
41
- return E(a, function(t, s, e) {
42
- i[++r] = n(t, s, e);
43
- }), i;
44
- }
45
- function Q(a, n) {
46
- var r = y(a) ? P : q;
47
- return r(a, h(n));
48
- }
49
- var z = Object.prototype, B = z.hasOwnProperty;
50
- function D(a, n) {
51
- return a != null && B.call(a, n);
52
- }
53
- function T(a, n) {
54
- return a != null && A(a, n, D);
55
- }
56
- function H(a, n) {
57
- return a < n;
58
- }
59
- function R(a, n, r) {
60
- for (var i = -1, t = a.length; ++i < t; ) {
61
- var s = a[i], e = n(s);
62
- if (e != null && (f === void 0 ? e === e && !I(e) : r(e, f)))
63
- var f = e, v = s;
64
- }
65
- return v;
66
- }
67
- function U(a) {
68
- return a && a.length ? R(a, M, H) : void 0;
69
- }
70
- export {
71
- H as a,
72
- R as b,
73
- q as c,
74
- U as d,
75
- J as e,
76
- N as f,
77
- T as h,
78
- K as l,
79
- Q as m
80
- };
@@ -1,264 +0,0 @@
1
- import { s as R, a as W, S as N } from "./chunk-6OLS64BW-16X0Uidz.js";
2
- import { _ as f, c as t, d as H, l as S, e as P, k as z, Q as _, u as U } from "./mermaid-JHGCAKzw.js";
3
- import { G as C } from "./graph-BOlYxZBQ.js";
4
- import { l as F } from "./layout-DxzRbPiB.js";
5
- import { l as O, k as J } from "./timer-BYwnU4DF.js";
6
- var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), "drawStartState"), D = /* @__PURE__ */ f((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), Y = /* @__PURE__ */ f((e, i) => {
7
- const d = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), c = d.node().getBBox();
8
- return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c.width + 2 * t().state.padding).attr("height", c.height + 2 * t().state.padding).attr("rx", t().state.radius), d;
9
- }, "drawSimpleState"), I = /* @__PURE__ */ f((e, i) => {
10
- const d = /* @__PURE__ */ f(function(g, B, m) {
11
- const v = g.append("tspan").attr("x", 2 * t().state.padding).text(B);
12
- m || v.attr("dy", t().state.textHeight);
13
- }, "addTspan"), n = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 1.3 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.descriptions[0]).node().getBBox(), l = n.height, x = e.append("text").attr("x", t().state.padding).attr(
14
- "y",
15
- l + t().state.padding * 0.4 + t().state.dividerMargin + t().state.textHeight
16
- ).attr("class", "state-description");
17
- let a = true, s = true;
18
- i.descriptions.forEach(function(g) {
19
- a || (d(x, g, s), s = false), a = false;
20
- });
21
- const w = e.append("line").attr("x1", t().state.padding).attr("y1", t().state.padding + l + t().state.dividerMargin / 2).attr("y2", t().state.padding + l + t().state.dividerMargin / 2).attr("class", "descr-divider"), p = x.node().getBBox(), o = Math.max(p.width, n.width);
22
- return w.attr("x2", o + 3 * t().state.padding), e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", o + 2 * t().state.padding).attr("height", p.height + l + 2 * t().state.padding).attr("rx", t().state.radius), e;
23
- }, "drawDescrState"), $ = /* @__PURE__ */ f((e, i, d) => {
24
- const c = t().state.padding, n = 2 * t().state.padding, l = e.node().getBBox(), x = l.width, a = l.x, s = e.append("text").attr("x", 0).attr("y", t().state.titleShift).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), p = s.node().getBBox().width + n;
25
- let o = Math.max(p, x);
26
- o === x && (o = o + n);
27
- let g;
28
- const B = e.node().getBBox();
29
- i.doc, g = a - c, p > x && (g = (x - o) / 2 + c), Math.abs(a - B.x) < c && p > x && (g = a - (p - x) / 2);
30
- const m = 1 - t().state.textHeight;
31
- return e.insert("rect", ":first-child").attr("x", g).attr("y", m).attr("class", d ? "alt-composit" : "composit").attr("width", o).attr(
32
- "height",
33
- B.height + t().state.textHeight + t().state.titleShift + 1
34
- ).attr("rx", "0"), s.attr("x", g + c), p <= x && s.attr("x", a + (o - n) / 2 - p / 2 + c), e.insert("rect", ":first-child").attr("x", g).attr(
35
- "y",
36
- t().state.titleShift - t().state.textHeight - t().state.padding
37
- ).attr("width", o).attr("height", t().state.textHeight * 3).attr("rx", t().state.radius), e.insert("rect", ":first-child").attr("x", g).attr(
38
- "y",
39
- t().state.titleShift - t().state.textHeight - t().state.padding
40
- ).attr("width", o).attr("height", B.height + 3 + 2 * t().state.textHeight).attr("rx", t().state.radius), e;
41
- }, "addTitleAndBox"), q = /* @__PURE__ */ f((e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr(
42
- "cx",
43
- t().state.padding + t().state.sizeUnit + t().state.miniPadding
44
- ).attr(
45
- "cy",
46
- t().state.padding + t().state.sizeUnit + t().state.miniPadding
47
- ), e.append("circle").attr("class", "end-state-inner").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit + 2).attr("cy", t().state.padding + t().state.sizeUnit + 2)), "drawEndState"), Q = /* @__PURE__ */ f((e, i) => {
48
- let d = t().state.forkWidth, c = t().state.forkHeight;
49
- if (i.parentId) {
50
- let n = d;
51
- d = c, c = n;
52
- }
53
- return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", d).attr("height", c).attr("x", t().state.padding).attr("y", t().state.padding);
54
- }, "drawForkJoinState"), Z = /* @__PURE__ */ f((e, i, d, c) => {
55
- let n = 0;
56
- const l = c.append("text");
57
- l.style("text-anchor", "start"), l.attr("class", "noteText");
58
- let x = e.replace(/\r\n/g, "<br/>");
59
- x = x.replace(/\n/g, "<br/>");
60
- const a = x.split(z.lineBreakRegex);
61
- let s = 1.25 * t().state.noteMargin;
62
- for (const w of a) {
63
- const p = w.trim();
64
- if (p.length > 0) {
65
- const o = l.append("tspan");
66
- if (o.text(p), s === 0) {
67
- const g = o.node().getBBox();
68
- s += g.height;
69
- }
70
- n += s, o.attr("x", i + t().state.noteMargin), o.attr("y", d + n + 1.25 * t().state.noteMargin);
71
- }
72
- }
73
- return { textWidth: l.node().getBBox().width, textHeight: n };
74
- }, "_drawLongText"), j = /* @__PURE__ */ f((e, i) => {
75
- i.attr("class", "state-note");
76
- const d = i.append("rect").attr("x", 0).attr("y", t().state.padding), c = i.append("g"), { textWidth: n, textHeight: l } = Z(e, 0, 0, c);
77
- return d.attr("height", l + 2 * t().state.noteMargin), d.attr("width", n + t().state.noteMargin * 2), d;
78
- }, "drawNote"), L = /* @__PURE__ */ f(function(e, i) {
79
- const d = i.id, c = {
80
- id: d,
81
- label: i.id,
82
- width: 0,
83
- height: 0
84
- }, n = e.append("g").attr("id", d).attr("class", "stateGroup");
85
- i.type === "start" && X(n), i.type === "end" && q(n), (i.type === "fork" || i.type === "join") && Q(n, i), i.type === "note" && j(i.note.text, n), i.type === "divider" && D(n), i.type === "default" && i.descriptions.length === 0 && Y(n, i), i.type === "default" && i.descriptions.length > 0 && I(n, i);
86
- const l = n.node().getBBox();
87
- return c.width = l.width + 2 * t().state.padding, c.height = l.height + 2 * t().state.padding, c;
88
- }, "drawState"), A = 0, K = /* @__PURE__ */ f(function(e, i, d) {
89
- const c = /* @__PURE__ */ f(function(s) {
90
- switch (s) {
91
- case N.relationType.AGGREGATION:
92
- return "aggregation";
93
- case N.relationType.EXTENSION:
94
- return "extension";
95
- case N.relationType.COMPOSITION:
96
- return "composition";
97
- case N.relationType.DEPENDENCY:
98
- return "dependency";
99
- }
100
- }, "getRelationType");
101
- i.points = i.points.filter((s) => !Number.isNaN(s.y));
102
- const n = i.points, l = O().x(function(s) {
103
- return s.x;
104
- }).y(function(s) {
105
- return s.y;
106
- }).curve(J), x = e.append("path").attr("d", l(n)).attr("id", "edge" + A).attr("class", "transition");
107
- let a = "";
108
- if (t().state.arrowMarkerAbsolute && (a = _(true)), x.attr(
109
- "marker-end",
110
- "url(" + a + "#" + c(N.relationType.DEPENDENCY) + "End)"
111
- ), d.title !== void 0) {
112
- const s = e.append("g").attr("class", "stateLabel"), { x: w, y: p } = U.calcLabelPosition(i.points), o = z.getRows(d.title);
113
- let g = 0;
114
- const B = [];
115
- let m = 0, v = 0;
116
- for (let u = 0; u <= o.length; u++) {
117
- const h = s.append("text").attr("text-anchor", "middle").text(o[u]).attr("x", w).attr("y", p + g), y = h.node().getBBox();
118
- m = Math.max(m, y.width), v = Math.min(v, y.x), S.info(y.x, w, p + g), g === 0 && (g = h.node().getBBox().height, S.info("Title height", g, p)), B.push(h);
119
- }
120
- let E = g * o.length;
121
- if (o.length > 1) {
122
- const u = (o.length - 1) * g * 0.5;
123
- B.forEach((h, y) => h.attr("y", p + y * g - u)), E = g * o.length;
124
- }
125
- const r = s.node().getBBox();
126
- s.insert("rect", ":first-child").attr("class", "box").attr("x", w - m / 2 - t().state.padding / 2).attr("y", p - E / 2 - t().state.padding / 2 - 3.5).attr("width", m + t().state.padding).attr("height", E + t().state.padding), S.info(r);
127
- }
128
- A++;
129
- }, "drawEdge"), b, T = {}, V = /* @__PURE__ */ f(function() {
130
- }, "setConf"), tt = /* @__PURE__ */ f(function(e) {
131
- e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
132
- }, "insertMarkers"), et = /* @__PURE__ */ f(function(e, i, d, c) {
133
- b = t().state;
134
- const n = t().securityLevel;
135
- let l;
136
- n === "sandbox" && (l = H("#i" + i));
137
- const x = n === "sandbox" ? H(l.nodes()[0].contentDocument.body) : H("body"), a = n === "sandbox" ? l.nodes()[0].contentDocument : document;
138
- S.debug("Rendering diagram " + e);
139
- const s = x.select(`[id='${i}']`);
140
- tt(s);
141
- const w = c.db.getRootDoc();
142
- G(w, s, void 0, false, x, a, c);
143
- const p = b.padding, o = s.node().getBBox(), g = o.width + p * 2, B = o.height + p * 2, m = g * 1.75;
144
- P(s, B, m, b.useMaxWidth), s.attr(
145
- "viewBox",
146
- `${o.x - b.padding} ${o.y - b.padding} ` + g + " " + B
147
- );
148
- }, "draw"), at = /* @__PURE__ */ f((e) => e ? e.length * b.fontSizeFactor : 1, "getLabelWidth"), G = /* @__PURE__ */ f((e, i, d, c, n, l, x) => {
149
- const a = new C({
150
- compound: true,
151
- multigraph: true
152
- });
153
- let s, w = true;
154
- for (s = 0; s < e.length; s++)
155
- if (e[s].stmt === "relation") {
156
- w = false;
157
- break;
158
- }
159
- d ? a.setGraph({
160
- rankdir: "LR",
161
- multigraph: true,
162
- compound: true,
163
- // acyclicer: 'greedy',
164
- ranker: "tight-tree",
165
- ranksep: w ? 1 : b.edgeLengthFactor,
166
- nodeSep: w ? 1 : 50,
167
- isMultiGraph: true
168
- // ranksep: 5,
169
- // nodesep: 1
170
- }) : a.setGraph({
171
- rankdir: "TB",
172
- multigraph: true,
173
- compound: true,
174
- // isCompound: true,
175
- // acyclicer: 'greedy',
176
- // ranker: 'longest-path'
177
- ranksep: w ? 1 : b.edgeLengthFactor,
178
- nodeSep: w ? 1 : 50,
179
- ranker: "tight-tree",
180
- // ranker: 'network-simplex'
181
- isMultiGraph: true
182
- }), a.setDefaultEdgeLabel(function() {
183
- return {};
184
- });
185
- const p = x.db.getStates(), o = x.db.getRelations(), g = Object.keys(p);
186
- for (const r of g) {
187
- const u = p[r];
188
- d && (u.parentId = d);
189
- let h;
190
- if (u.doc) {
191
- let y = i.append("g").attr("id", u.id).attr("class", "stateGroup");
192
- h = G(u.doc, y, u.id, !c, n, l, x);
193
- {
194
- y = $(y, u, c);
195
- let k = y.node().getBBox();
196
- h.width = k.width, h.height = k.height + b.padding / 2, T[u.id] = { y: b.compositTitleSize };
197
- }
198
- } else
199
- h = L(i, u, a);
200
- if (u.note) {
201
- const y = {
202
- descriptions: [],
203
- id: u.id + "-note",
204
- note: u.note,
205
- type: "note"
206
- }, k = L(i, y, a);
207
- u.note.position === "left of" ? (a.setNode(h.id + "-note", k), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", k)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group");
208
- } else
209
- a.setNode(h.id, h);
210
- }
211
- S.debug("Count=", a.nodeCount(), a);
212
- let B = 0;
213
- o.forEach(function(r) {
214
- B++, S.debug("Setting edge", r), a.setEdge(
215
- r.id1,
216
- r.id2,
217
- {
218
- relation: r,
219
- width: at(r.title),
220
- height: b.labelHeight * z.getRows(r.title).length,
221
- labelpos: "c"
222
- },
223
- "id" + B
224
- );
225
- }), F(a), S.debug("Graph after layout", a.nodes());
226
- const m = i.node();
227
- a.nodes().forEach(function(r) {
228
- r !== void 0 && a.node(r) !== void 0 ? (S.warn("Node " + r + ": " + JSON.stringify(a.node(r))), n.select("#" + m.id + " #" + r).attr(
229
- "transform",
230
- "translate(" + (a.node(r).x - a.node(r).width / 2) + "," + (a.node(r).y + (T[r] ? T[r].y : 0) - a.node(r).height / 2) + " )"
231
- ), n.select("#" + m.id + " #" + r).attr("data-x-shift", a.node(r).x - a.node(r).width / 2), l.querySelectorAll("#" + m.id + " #" + r + " .divider").forEach((h) => {
232
- const y = h.parentElement;
233
- let k = 0, M = 0;
234
- y && (y.parentElement && (k = y.parentElement.getBBox().width), M = parseInt(y.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", k - M - 8);
235
- })) : S.debug("No Node " + r + ": " + JSON.stringify(a.node(r)));
236
- });
237
- let v = m.getBBox();
238
- a.edges().forEach(function(r) {
239
- r !== void 0 && a.edge(r) !== void 0 && (S.debug("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(a.edge(r))), K(i, a.edge(r), a.edge(r).relation));
240
- }), v = m.getBBox();
241
- const E = {
242
- id: d || "root",
243
- label: d || "root",
244
- width: 0,
245
- height: 0
246
- };
247
- return E.width = v.width + 2 * b.padding, E.height = v.height + 2 * b.padding, S.debug("Doc rendered", E, a), E;
248
- }, "renderDoc"), it = {
249
- setConf: V,
250
- draw: et
251
- }, ct = {
252
- parser: W,
253
- get db() {
254
- return new N(1);
255
- },
256
- renderer: it,
257
- styles: R,
258
- init: /* @__PURE__ */ f((e) => {
259
- e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
260
- }, "init")
261
- };
262
- export {
263
- ct as diagram
264
- };