@marimo-team/islands 0.14.11-dev2 → 0.14.11-dev21

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 (71) hide show
  1. package/dist/{ConnectedDataExplorerComponent-Dl7Gx8nj.js → ConnectedDataExplorerComponent-B98UAJGl.js} +4 -4
  2. package/dist/{ImageComparisonComponent-IsA0pccG.js → ImageComparisonComponent-3rx-X1eA.js} +1 -1
  3. package/dist/{VegaLite-C3jfIIJl.js → VegaLite-bssctYsi.js} +6961 -7180
  4. package/dist/{_baseUniq-DXGCzwrs.js → _baseUniq-n5nuGCm-.js} +36 -36
  5. package/dist/{any-language-editor-BbtP_crK.js → any-language-editor-CTuUQiXP.js} +1 -1
  6. package/dist/{architectureDiagram-IEHRJDOE-B5UTatfK.js → architectureDiagram-NQ2NVSRB-Ghs-gTjF.js} +897 -894
  7. package/dist/assets/{worker-BcyuOSTi.js → save-worker-fI5ofStJ.js} +1076 -1649
  8. package/dist/assets/{save-worker-BIDtxCd1.js → worker-Bfk1FrzG.js} +1627 -1747
  9. package/dist/assets/worker-BldghCZh.js +3752 -0
  10. package/dist/{blockDiagram-JOT3LUYC-BsdaPVqe.js → blockDiagram-PHRCVELO-BJrdpvE8.js} +534 -522
  11. package/dist/{c4Diagram-VJAJSXHY-mAt84R4z.js → c4Diagram-6F6E4RAY-C3mvzJPu.js} +4 -4
  12. package/dist/{channel-BQIWHLpc.js → channel-Dv_KwBSx.js} +1 -1
  13. package/dist/{chunk-4BMEZGHF-CKIxJWxP.js → chunk-353BL4L5-DE1uUKLI.js} +1 -1
  14. package/dist/{chunk-D6G4REZN-CgGV16Ao.js → chunk-67H74DCK-BSe-uUSS.js} +1 -1
  15. package/dist/chunk-6OLS64BW-lmSfyWue.js +1383 -0
  16. package/dist/{chunk-XZIHB7SX-Bwue5JjE.js → chunk-AACKK3MU-DAmuROVD.js} +1 -1
  17. package/dist/chunk-BFAMUDN2-D9C6R9UM.js +8 -0
  18. package/dist/chunk-E2GYISFI-BzFDmP6o.js +19 -0
  19. package/dist/{chunk-A2AXSNBT-wMvlVMnZ.js → chunk-QEP2MXWD-BILXx23p.js} +30 -27
  20. package/dist/chunk-SKB7J2MH-CxMkQppY.js +20 -0
  21. package/dist/{classDiagram-GIVACNV2-DOmcKRwM.js → classDiagram-BGRH5UQR-BbYr5aD9.js} +2 -2
  22. package/dist/{classDiagram-v2-COTLJTTW-DOmcKRwM.js → classDiagram-v2-O24JOBDK-BbYr5aD9.js} +2 -2
  23. package/dist/{clone-PHSHUhb-.js → clone-DuBujAk0.js} +1 -1
  24. package/dist/{dagre-OKDRZEBW-D5HNBllU.js → dagre-FFZHY6LT-DO5nLpLx.js} +8 -8
  25. package/dist/{data-editor-Coz_zrsX.js → data-editor-C8yM5wyh.js} +213 -201
  26. package/dist/diagram-3EMPZRKU-B1rYMJMS.js +313 -0
  27. package/dist/diagram-5UYTHUR4-BUu8PsmE.js +137 -0
  28. package/dist/{diagram-SSKATNLV-BsO89QJN.js → diagram-ZTM2IBQH-lz_uZrYh.js} +3 -3
  29. package/dist/{erDiagram-Q7BY3M3F-DWIMKTfS.js → erDiagram-R3QVA2FD-D_A2jrJV.js} +6 -5
  30. package/dist/{flowDiagram-4HSFHLVR-CnO0wmaL.js → flowDiagram-PKI6S5ZS-Bv6D_bIf.js} +283 -278
  31. package/dist/{ganttDiagram-APWFNJXF-otclLFL4.js → ganttDiagram-EK5VF46D-CbkaARm4.js} +453 -439
  32. package/dist/{gitGraphDiagram-7IBYFJ6S-C7F3RAja.js → gitGraphDiagram-GW3U2K7C-B8ZGoOT-.js} +35 -35
  33. package/dist/{graph-Btsdly6D.js → graph-txVVq_De.js} +3 -3
  34. package/dist/{index-BreCkhLm.js → index-BI6tloBb.js} +3 -3
  35. package/dist/{index-CcRF-HlA.js → index-CFJazcU-.js} +4 -4
  36. package/dist/{index-BGmzdYRo.js → index-OiR0LgXX.js} +6 -3
  37. package/dist/{index-z8OyYHEh.js → index-fJDj-gSp.js} +1 -1
  38. package/dist/index-pBmAzQJl.js +235 -0
  39. package/dist/{infoDiagram-PH2N3AL5-BwcXDzwE.js → infoDiagram-RLU2ROGC-DJw6nWp0.js} +5 -3
  40. package/dist/journeyDiagram-EWQZEKCU-1oCDdLcB.js +836 -0
  41. package/dist/{kanban-definition-NDS4AKOZ-3NJYjnpz.js → kanban-definition-ILFWEQ3N-nKJ02Ox0.js} +41 -39
  42. package/dist/{layout-qfivsCI_.js → layout-CbUwX9d6.js} +49 -49
  43. package/dist/{linear-D_Kojy5s.js → linear-sn9_bxtB.js} +22 -22
  44. package/dist/{main-DLuap1gp.js → main-D9-48wlP.js} +45053 -45130
  45. package/dist/main.js +1 -1
  46. package/dist/{mermaid-DCIbF0Rd.js → mermaid-CRRCnedu.js} +4925 -4853
  47. package/dist/min-CYaGuxZ4.js +80 -0
  48. package/dist/{mindmap-definition-ALO5MXBD-BtSBR7-c.js → mindmap-definition-CZNETY7S-CV62GMPJ.js} +3 -3
  49. package/dist/{pieDiagram-IB7DONF6-TiB_3g9z.js → pieDiagram-NIOCPIFQ-Bcs4p6kX.js} +3 -3
  50. package/dist/{quadrantDiagram-7GDLP6J5-B0DPjp7Z.js → quadrantDiagram-2OG54O6I-BlY5yea6.js} +2 -2
  51. package/dist/{react-plotly-BXWB3UQ5.js → react-plotly-B1SKP2B-.js} +1 -1
  52. package/dist/{requirementDiagram-KVF5MWMF-D_IlbRr_.js → requirementDiagram-SO3GGRV7-rmiJc5mh.js} +5 -4
  53. package/dist/{sankeyDiagram-QLVOVGJD-BHm9uvp_.js → sankeyDiagram-4UZDY2LN-TVzOLFCA.js} +11 -11
  54. package/dist/{sequenceDiagram-X6HHIX6F-3wcWWNtl.js → sequenceDiagram-ZIKVLSP4-POBNIgPB.js} +151 -149
  55. package/dist/{slides-component-JEGZbKgL.js → slides-component-5Y9DQzeV.js} +969 -962
  56. package/dist/stateDiagram-XX37X6EN-lR-7TG5f.js +264 -0
  57. package/dist/{stateDiagram-v2-YXO3MK2T-DTdt4vFc.js → stateDiagram-v2-GD6S3NHB-CYV2YCSY.js} +2 -2
  58. package/dist/style.css +1 -1
  59. package/dist/{time-DyZM4tB4.js → time-BytuUgXk.js} +2 -2
  60. package/dist/{timeline-definition-BDJGKUSR-Of4cvbYH.js → timeline-definition-RI47OAVP-DOrNrVHk.js} +99 -102
  61. package/dist/{radar-MK3ICKWK-BMSp8zaN.js → treemap-FKARHQ26-BOli4yXg.js} +2469 -2330
  62. package/dist/{vega-component-Dwc_9OTG.js → vega-component-KZ-3GH6H.js} +21 -21
  63. package/dist/{xychartDiagram-VJFVF3MP-5Jc993Va.js → xychartDiagram-H2YORKM3-CUOFDcIy.js} +409 -375
  64. package/package.json +37 -37
  65. package/dist/assets/worker-Dz6PPEGc.js +0 -4115
  66. package/dist/chunk-AEK57VVT-BAi7QtEw.js +0 -1416
  67. package/dist/chunk-RZ5BOZE2-D7Ag0UF8.js +0 -24
  68. package/dist/diagram-VNBRO52H-CA8VTm7L.js +0 -126
  69. package/dist/journeyDiagram-U35MCT3I-Co4hTdu9.js +0 -809
  70. package/dist/min-CQBZldos.js +0 -80
  71. package/dist/stateDiagram-DGXRK772-DbH3Rdz4.js +0 -271
@@ -1,80 +0,0 @@
1
- import { x, au as b, av as m, aw as w, ax as l, D as O, ay as p, az as P, aA as A, aB as I, aC as M, aD as o } from "./main-DLuap1gp.js";
2
- import { d as h, e as y, g as C } from "./_baseUniq-DXGCzwrs.js";
3
- var g = Object.prototype, D = g.hasOwnProperty, J = x(function(a, n) {
4
- a = Object(a);
5
- var r = -1, i = n.length, t = i > 2 ? n[2] : void 0;
6
- for (t && b(n[0], n[1], t) && (i = 1); ++r < i; )
7
- for (var s = n[r], e = m(s), u = -1, v = e.length; ++u < v; ) {
8
- var f = e[u], d = a[f];
9
- (d === void 0 || w(d, g[f]) && !D.call(a, f)) && (a[f] = s[f]);
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 E(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(u) {
23
- return s(t[u], u, 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 F = Math.max;
31
- function L(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 = F(i + t, 0)), y(a, h(n), t);
37
- }
38
- var N = E(L);
39
- function $(a, n) {
40
- var r = -1, i = l(a) ? Array(a.length) : [];
41
- return C(a, function(t, s, e) {
42
- i[++r] = n(t, s, e);
43
- }), i;
44
- }
45
- function Q(a, n) {
46
- var r = A(a) ? P : $;
47
- return r(a, h(n));
48
- }
49
- var q = Object.prototype, z = q.hasOwnProperty;
50
- function B(a, n) {
51
- return a != null && z.call(a, n);
52
- }
53
- function T(a, n) {
54
- return a != null && I(a, n, B);
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 && (u === void 0 ? e === e && !M(e) : r(e, u)))
63
- var u = e, v = s;
64
- }
65
- return v;
66
- }
67
- function U(a) {
68
- return a && a.length ? R(a, o, H) : void 0;
69
- }
70
- export {
71
- H as a,
72
- R as b,
73
- $ 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,271 +0,0 @@
1
- import { s as W, a as P, S as N } from "./chunk-AEK57VVT-BAi7QtEw.js";
2
- import { _ as u, c as t, d as H, l as S, e as C, k as z, u as U } from "./mermaid-DCIbF0Rd.js";
3
- import { G as F } from "./graph-Btsdly6D.js";
4
- import { l as O } from "./layout-qfivsCI_.js";
5
- import { l as J, k as X } from "./timer-BYwnU4DF.js";
6
- var L = {}, D = /* @__PURE__ */ u((e, i) => {
7
- L[e] = i;
8
- }, "set"), Y = /* @__PURE__ */ u((e) => L[e], "get"), G = /* @__PURE__ */ u(() => Object.keys(L), "keys"), I = /* @__PURE__ */ u(() => G().length, "size"), $ = {
9
- get: Y,
10
- set: D,
11
- keys: G,
12
- size: I
13
- }, j = /* @__PURE__ */ u((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"), q = /* @__PURE__ */ u((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"), Z = /* @__PURE__ */ u((e, i) => {
14
- 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), o = d.node().getBBox();
15
- return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", o.width + 2 * t().state.padding).attr("height", o.height + 2 * t().state.padding).attr("rx", t().state.radius), d;
16
- }, "drawSimpleState"), K = /* @__PURE__ */ u((e, i) => {
17
- const d = /* @__PURE__ */ u(function(l, B, m) {
18
- const k = l.append("tspan").attr("x", 2 * t().state.padding).text(B);
19
- m || k.attr("dy", t().state.textHeight);
20
- }, "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(), g = n.height, x = e.append("text").attr("x", t().state.padding).attr(
21
- "y",
22
- g + t().state.padding * 0.4 + t().state.dividerMargin + t().state.textHeight
23
- ).attr("class", "state-description");
24
- let a = true, s = true;
25
- i.descriptions.forEach(function(l) {
26
- a || (d(x, l, s), s = false), a = false;
27
- });
28
- const y = e.append("line").attr("x1", t().state.padding).attr("y1", t().state.padding + g + t().state.dividerMargin / 2).attr("y2", t().state.padding + g + t().state.dividerMargin / 2).attr("class", "descr-divider"), p = x.node().getBBox(), c = Math.max(p.width, n.width);
29
- return y.attr("x2", c + 3 * t().state.padding), e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c + 2 * t().state.padding).attr("height", p.height + g + 2 * t().state.padding).attr("rx", t().state.radius), e;
30
- }, "drawDescrState"), Q = /* @__PURE__ */ u((e, i, d) => {
31
- const o = t().state.padding, n = 2 * t().state.padding, g = e.node().getBBox(), x = g.width, a = g.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;
32
- let c = Math.max(p, x);
33
- c === x && (c = c + n);
34
- let l;
35
- const B = e.node().getBBox();
36
- i.doc, l = a - o, p > x && (l = (x - c) / 2 + o), Math.abs(a - B.x) < o && p > x && (l = a - (p - x) / 2);
37
- const m = 1 - t().state.textHeight;
38
- return e.insert("rect", ":first-child").attr("x", l).attr("y", m).attr("class", d ? "alt-composit" : "composit").attr("width", c).attr(
39
- "height",
40
- B.height + t().state.textHeight + t().state.titleShift + 1
41
- ).attr("rx", "0"), s.attr("x", l + o), p <= x && s.attr("x", a + (c - n) / 2 - p / 2 + o), e.insert("rect", ":first-child").attr("x", l).attr(
42
- "y",
43
- t().state.titleShift - t().state.textHeight - t().state.padding
44
- ).attr("width", c).attr("height", t().state.textHeight * 3).attr("rx", t().state.radius), e.insert("rect", ":first-child").attr("x", l).attr(
45
- "y",
46
- t().state.titleShift - t().state.textHeight - t().state.padding
47
- ).attr("width", c).attr("height", B.height + 3 + 2 * t().state.textHeight).attr("rx", t().state.radius), e;
48
- }, "addTitleAndBox"), V = /* @__PURE__ */ u((e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr(
49
- "cx",
50
- t().state.padding + t().state.sizeUnit + t().state.miniPadding
51
- ).attr(
52
- "cy",
53
- t().state.padding + t().state.sizeUnit + t().state.miniPadding
54
- ), 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"), tt = /* @__PURE__ */ u((e, i) => {
55
- let d = t().state.forkWidth, o = t().state.forkHeight;
56
- if (i.parentId) {
57
- let n = d;
58
- d = o, o = n;
59
- }
60
- return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", d).attr("height", o).attr("x", t().state.padding).attr("y", t().state.padding);
61
- }, "drawForkJoinState"), et = /* @__PURE__ */ u((e, i, d, o) => {
62
- let n = 0;
63
- const g = o.append("text");
64
- g.style("text-anchor", "start"), g.attr("class", "noteText");
65
- let x = e.replace(/\r\n/g, "<br/>");
66
- x = x.replace(/\n/g, "<br/>");
67
- const a = x.split(z.lineBreakRegex);
68
- let s = 1.25 * t().state.noteMargin;
69
- for (const y of a) {
70
- const p = y.trim();
71
- if (p.length > 0) {
72
- const c = g.append("tspan");
73
- if (c.text(p), s === 0) {
74
- const l = c.node().getBBox();
75
- s += l.height;
76
- }
77
- n += s, c.attr("x", i + t().state.noteMargin), c.attr("y", d + n + 1.25 * t().state.noteMargin);
78
- }
79
- }
80
- return { textWidth: g.node().getBBox().width, textHeight: n };
81
- }, "_drawLongText"), at = /* @__PURE__ */ u((e, i) => {
82
- i.attr("class", "state-note");
83
- const d = i.append("rect").attr("x", 0).attr("y", t().state.padding), o = i.append("g"), { textWidth: n, textHeight: g } = et(e, 0, 0, o);
84
- return d.attr("height", g + 2 * t().state.noteMargin), d.attr("width", n + t().state.noteMargin * 2), d;
85
- }, "drawNote"), _ = /* @__PURE__ */ u(function(e, i) {
86
- const d = i.id, o = {
87
- id: d,
88
- label: i.id,
89
- width: 0,
90
- height: 0
91
- }, n = e.append("g").attr("id", d).attr("class", "stateGroup");
92
- i.type === "start" && j(n), i.type === "end" && V(n), (i.type === "fork" || i.type === "join") && tt(n, i), i.type === "note" && at(i.note.text, n), i.type === "divider" && q(n), i.type === "default" && i.descriptions.length === 0 && Z(n, i), i.type === "default" && i.descriptions.length > 0 && K(n, i);
93
- const g = n.node().getBBox();
94
- return o.width = g.width + 2 * t().state.padding, o.height = g.height + 2 * t().state.padding, $.set(d, o), o;
95
- }, "drawState"), A = 0, it = /* @__PURE__ */ u(function(e, i, d) {
96
- const o = /* @__PURE__ */ u(function(s) {
97
- switch (s) {
98
- case N.relationType.AGGREGATION:
99
- return "aggregation";
100
- case N.relationType.EXTENSION:
101
- return "extension";
102
- case N.relationType.COMPOSITION:
103
- return "composition";
104
- case N.relationType.DEPENDENCY:
105
- return "dependency";
106
- }
107
- }, "getRelationType");
108
- i.points = i.points.filter((s) => !Number.isNaN(s.y));
109
- const n = i.points, g = J().x(function(s) {
110
- return s.x;
111
- }).y(function(s) {
112
- return s.y;
113
- }).curve(X), x = e.append("path").attr("d", g(n)).attr("id", "edge" + A).attr("class", "transition");
114
- let a = "";
115
- if (t().state.arrowMarkerAbsolute && (a = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, a = a.replace(/\(/g, "\\("), a = a.replace(/\)/g, "\\)")), x.attr(
116
- "marker-end",
117
- "url(" + a + "#" + o(N.relationType.DEPENDENCY) + "End)"
118
- ), d.title !== void 0) {
119
- const s = e.append("g").attr("class", "stateLabel"), { x: y, y: p } = U.calcLabelPosition(i.points), c = z.getRows(d.title);
120
- let l = 0;
121
- const B = [];
122
- let m = 0, k = 0;
123
- for (let f = 0; f <= c.length; f++) {
124
- const h = s.append("text").attr("text-anchor", "middle").text(c[f]).attr("x", y).attr("y", p + l), w = h.node().getBBox();
125
- m = Math.max(m, w.width), k = Math.min(k, w.x), S.info(w.x, y, p + l), l === 0 && (l = h.node().getBBox().height, S.info("Title height", l, p)), B.push(h);
126
- }
127
- let E = l * c.length;
128
- if (c.length > 1) {
129
- const f = (c.length - 1) * l * 0.5;
130
- B.forEach((h, w) => h.attr("y", p + w * l - f)), E = l * c.length;
131
- }
132
- const r = s.node().getBBox();
133
- s.insert("rect", ":first-child").attr("class", "box").attr("x", y - 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);
134
- }
135
- A++;
136
- }, "drawEdge"), b, T = {}, rt = /* @__PURE__ */ u(function() {
137
- }, "setConf"), nt = /* @__PURE__ */ u(function(e) {
138
- 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");
139
- }, "insertMarkers"), st = /* @__PURE__ */ u(function(e, i, d, o) {
140
- b = t().state;
141
- const n = t().securityLevel;
142
- let g;
143
- n === "sandbox" && (g = H("#i" + i));
144
- const x = n === "sandbox" ? H(g.nodes()[0].contentDocument.body) : H("body"), a = n === "sandbox" ? g.nodes()[0].contentDocument : document;
145
- S.debug("Rendering diagram " + e);
146
- const s = x.select(`[id='${i}']`);
147
- nt(s);
148
- const y = o.db.getRootDoc();
149
- R(y, s, void 0, false, x, a, o);
150
- const p = b.padding, c = s.node().getBBox(), l = c.width + p * 2, B = c.height + p * 2, m = l * 1.75;
151
- C(s, B, m, b.useMaxWidth), s.attr(
152
- "viewBox",
153
- `${c.x - b.padding} ${c.y - b.padding} ` + l + " " + B
154
- );
155
- }, "draw"), dt = /* @__PURE__ */ u((e) => e ? e.length * b.fontSizeFactor : 1, "getLabelWidth"), R = /* @__PURE__ */ u((e, i, d, o, n, g, x) => {
156
- const a = new F({
157
- compound: true,
158
- multigraph: true
159
- });
160
- let s, y = true;
161
- for (s = 0; s < e.length; s++)
162
- if (e[s].stmt === "relation") {
163
- y = false;
164
- break;
165
- }
166
- d ? a.setGraph({
167
- rankdir: "LR",
168
- multigraph: true,
169
- compound: true,
170
- // acyclicer: 'greedy',
171
- ranker: "tight-tree",
172
- ranksep: y ? 1 : b.edgeLengthFactor,
173
- nodeSep: y ? 1 : 50,
174
- isMultiGraph: true
175
- // ranksep: 5,
176
- // nodesep: 1
177
- }) : a.setGraph({
178
- rankdir: "TB",
179
- multigraph: true,
180
- compound: true,
181
- // isCompound: true,
182
- // acyclicer: 'greedy',
183
- // ranker: 'longest-path'
184
- ranksep: y ? 1 : b.edgeLengthFactor,
185
- nodeSep: y ? 1 : 50,
186
- ranker: "tight-tree",
187
- // ranker: 'network-simplex'
188
- isMultiGraph: true
189
- }), a.setDefaultEdgeLabel(function() {
190
- return {};
191
- });
192
- const p = x.db.getStates(), c = x.db.getRelations(), l = Object.keys(p);
193
- for (const r of l) {
194
- const f = p[r];
195
- d && (f.parentId = d);
196
- let h;
197
- if (f.doc) {
198
- let w = i.append("g").attr("id", f.id).attr("class", "stateGroup");
199
- h = R(f.doc, w, f.id, !o, n, g, x);
200
- {
201
- w = Q(w, f, o);
202
- let v = w.node().getBBox();
203
- h.width = v.width, h.height = v.height + b.padding / 2, T[f.id] = { y: b.compositTitleSize };
204
- }
205
- } else
206
- h = _(i, f, a);
207
- if (f.note) {
208
- const w = {
209
- descriptions: [],
210
- id: f.id + "-note",
211
- note: f.note,
212
- type: "note"
213
- }, v = _(i, w, a);
214
- f.note.position === "left of" ? (a.setNode(h.id + "-note", v), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", v)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group");
215
- } else
216
- a.setNode(h.id, h);
217
- }
218
- S.debug("Count=", a.nodeCount(), a);
219
- let B = 0;
220
- c.forEach(function(r) {
221
- B++, S.debug("Setting edge", r), a.setEdge(
222
- r.id1,
223
- r.id2,
224
- {
225
- relation: r,
226
- width: dt(r.title),
227
- height: b.labelHeight * z.getRows(r.title).length,
228
- labelpos: "c"
229
- },
230
- "id" + B
231
- );
232
- }), O(a), S.debug("Graph after layout", a.nodes());
233
- const m = i.node();
234
- a.nodes().forEach(function(r) {
235
- r !== void 0 && a.node(r) !== void 0 ? (S.warn("Node " + r + ": " + JSON.stringify(a.node(r))), n.select("#" + m.id + " #" + r).attr(
236
- "transform",
237
- "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) + " )"
238
- ), n.select("#" + m.id + " #" + r).attr("data-x-shift", a.node(r).x - a.node(r).width / 2), g.querySelectorAll("#" + m.id + " #" + r + " .divider").forEach((h) => {
239
- const w = h.parentElement;
240
- let v = 0, M = 0;
241
- w && (w.parentElement && (v = w.parentElement.getBBox().width), M = parseInt(w.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", v - M - 8);
242
- })) : S.debug("No Node " + r + ": " + JSON.stringify(a.node(r)));
243
- });
244
- let k = m.getBBox();
245
- a.edges().forEach(function(r) {
246
- r !== void 0 && a.edge(r) !== void 0 && (S.debug("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(a.edge(r))), it(i, a.edge(r), a.edge(r).relation));
247
- }), k = m.getBBox();
248
- const E = {
249
- id: d || "root",
250
- label: d || "root",
251
- width: 0,
252
- height: 0
253
- };
254
- return E.width = k.width + 2 * b.padding, E.height = k.height + 2 * b.padding, S.debug("Doc rendered", E, a), E;
255
- }, "renderDoc"), ot = {
256
- setConf: rt,
257
- draw: st
258
- }, xt = {
259
- parser: P,
260
- get db() {
261
- return new N(1);
262
- },
263
- renderer: ot,
264
- styles: W,
265
- init: /* @__PURE__ */ u((e) => {
266
- e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
267
- }, "init")
268
- };
269
- export {
270
- xt as diagram
271
- };