@kong-ui-public/documentation 1.5.78 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/{arc-DZdQjcG8-C_2Dx6GQ.js → arc-DZdQjcG8-CduayE88.js} +2 -2
  2. package/dist/{architectureDiagram-3BPJPVTR-By_DXDyu-DTj86bUZ.js → architectureDiagram-3BPJPVTR-By_DXDyu-U3MSLbOU.js} +1506 -1513
  3. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CKP-SiVG.js +3268 -0
  4. package/dist/{c4Diagram-AAUBKEIU-ftdwlfdB-CYiERTWJ.js → c4Diagram-AAUBKEIU-ftdwlfdB-D3A61SdV.js} +11 -12
  5. package/dist/{channel-DM9j7IFL-CjNPz4Hd.js → channel-DM9j7IFL-DxqBUxfY.js} +1 -1
  6. package/dist/{chunk-2J33WTMH-CBbjVzWb-BAAd-TK5.js → chunk-2J33WTMH-CBbjVzWb-0og4LHQ-.js} +7 -8
  7. package/dist/chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js +8 -0
  8. package/dist/{chunk-55IACEB6-DZn1aNO0-_bs5ibIB.js → chunk-55IACEB6-DZn1aNO0-A3zOZ7dT.js} +1 -1
  9. package/dist/{chunk-727SXJPM-B2_6_WLv-CzbzsbtK.js → chunk-727SXJPM-B2_6_WLv-Bs3CxHaX.js} +548 -549
  10. package/dist/{chunk-AQP2D5EJ-DEAEiJjW-BPr5JvkB.js → chunk-AQP2D5EJ-DEAEiJjW-DTbwZT8N.js} +446 -458
  11. package/dist/{chunk-FMBD7UC4-D_tZ4Dxg-BUygZnCT.js → chunk-FMBD7UC4-D_tZ4Dxg-DwjoPGUH.js} +1 -1
  12. package/dist/{chunk-ND2GUHAM-Duw3k8MU-Dr8SD23L.js → chunk-ND2GUHAM-Duw3k8MU-HmrdHLJ9.js} +1 -1
  13. package/dist/{chunk-QZHKN3VN-DN6nBdn0-DxWE5zsM.js → chunk-QZHKN3VN-DN6nBdn0-BvQOETVz.js} +1 -1
  14. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-BqXc0etQ.js +17 -0
  15. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-BqXc0etQ.js +17 -0
  16. package/dist/{cose-bilkent-S5V4N54A-0ZumbVgj-BKcFQWbE.js → cose-bilkent-S5V4N54A-0ZumbVgj-0z7CQbIH.js} +465 -465
  17. package/dist/{cytoscape.esm-BDIiOYYO-BbddfVIJ.js → cytoscape.esm-BDIiOYYO-C1jMBhD8.js} +356 -371
  18. package/dist/dagre-BM42HDAG-qMWMsyLb-DGMrq3i3.js +288 -0
  19. package/dist/{dagre-DJxg_nfI-BzVw7cNP.js → dagre-DJxg_nfI-hVOVexz-.js} +9 -9
  20. package/dist/{diagram-2AECGRRQ-B2gF_dHe-DCRSlKG-.js → diagram-2AECGRRQ-B2gF_dHe-Bv_EpxRz.js} +10 -14
  21. package/dist/{diagram-5GNKFQAL-DJ9WwRrD-DtSWJY6-.js → diagram-5GNKFQAL-DJ9WwRrD-WVvm0Icu.js} +4 -4
  22. package/dist/{diagram-KO2AKTUF-RfkqD-VW-ZR9mxccc.js → diagram-KO2AKTUF-RfkqD-VW-yyAds1Qq.js} +153 -156
  23. package/dist/{diagram-LMA3HP47-Ct7s9hIt-DXtPBRn4.js → diagram-LMA3HP47-Ct7s9hIt-Dy6f9BAO.js} +21 -22
  24. package/dist/{diagram-OG6HWLK6-BSYJ2CoI-DX1BfXw6.js → diagram-OG6HWLK6-BSYJ2CoI-ckmfat-L.js} +79 -81
  25. package/dist/documentation.es.js +1 -1
  26. package/dist/documentation.umd.js +374 -374
  27. package/dist/{erDiagram-TEJ5UH35-BudwiSYX-BPA5-1u6.js → erDiagram-TEJ5UH35-BudwiSYX-bVzp1Kjr.js} +134 -135
  28. package/dist/{flowDiagram-I6XJVG4X-B23Smlxp-Cb24VZnb.js → flowDiagram-I6XJVG4X-B23Smlxp-ClHvdCdJ.js} +842 -849
  29. package/dist/{ganttDiagram-6RSMTGT7-C-i89z_P-DEdTFlTH.js → ganttDiagram-6RSMTGT7-C-i89z_P-t5UAyRM5.js} +46 -46
  30. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-Cg3smOdz.js +734 -0
  31. package/dist/{graphlib-D2YdGpuK-CM8PX5pf.js → graphlib-D2YdGpuK-CnQPmzkS.js} +17 -17
  32. package/dist/{index-Dpyqhws4.js → index-DfVKdDwj.js} +16258 -16515
  33. package/dist/{infoDiagram-5YYISTIA-CDUwzFql-BsbTK2Me.js → infoDiagram-5YYISTIA-CDUwzFql-Bmthmcp4.js} +2 -2
  34. package/dist/{ishikawaDiagram-YF4QCWOH-MfYdx0rK-DsWP0O6d.js → ishikawaDiagram-YF4QCWOH-MfYdx0rK-cbltssua.js} +137 -138
  35. package/dist/{journeyDiagram-JHISSGLW-C_udOPtJ-BkIf9B4Q.js → journeyDiagram-JHISSGLW-C_udOPtJ-BjAvgSAR.js} +13 -13
  36. package/dist/{kanban-definition-UN3LZRKU-C1Su-UOY-6sw-wDwK.js → kanban-definition-UN3LZRKU-C1Su-UOY-DZ93dsWZ.js} +334 -336
  37. package/dist/{katex-D7tFlpqA-B7yKriH4.js → katex-D7tFlpqA-BOSQxXe1.js} +254 -256
  38. package/dist/{linear-1MXhYum8-CfR5ywK4.js → linear-1MXhYum8-9C1jno9G.js} +5 -5
  39. package/dist/{mindmap-definition-RKZ34NQL-MuSV765K-Cv2rDIFS.js → mindmap-definition-RKZ34NQL-MuSV765K-Kub1iXFv.js} +94 -97
  40. package/dist/{ordinal-D9ksOc8y-CrGveXkB.js → ordinal-D9ksOc8y-2hZwLyEk.js} +1 -1
  41. package/dist/{pieDiagram-4H26LBE5-TgFp7J6_-C8m2xJbj.js → pieDiagram-4H26LBE5-TgFp7J6_-i6NxP3Xz.js} +43 -44
  42. package/dist/{quadrantDiagram-W4KKPZXB-DKPne3o_-D0Tfl8NQ.js → quadrantDiagram-W4KKPZXB-DKPne3o_-DXLHqRuR.js} +351 -353
  43. package/dist/{requirementDiagram-4Y6WPE33-vh8uUAp_-C5zLx-_o.js → requirementDiagram-4Y6WPE33-vh8uUAp_-CHtsISxP.js} +384 -386
  44. package/dist/{sankeyDiagram-5OEKKPKP-Cgs6W_El-DBrv4QL_.js → sankeyDiagram-5OEKKPKP-Cgs6W_El-D7GZyd8n.js} +178 -178
  45. package/dist/{sequenceDiagram-3UESZ5HK-C5F57Dkt-D6DqZiJP.js → sequenceDiagram-3UESZ5HK-C5F57Dkt-BW1Hb7UW.js} +643 -653
  46. package/dist/{stateDiagram-AJRCARHV-09dUKG6Y-9QhAIhCk.js → stateDiagram-AJRCARHV-09dUKG6Y-Dm2a1vNu.js} +5 -5
  47. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-DbWzZ-j-.js +16 -0
  48. package/dist/style.css +1 -1
  49. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-B5CT96H-.js +1095 -0
  50. package/dist/{vennDiagram-CIIHVFJN-DQfKxM3L-086u82L3.js → vennDiagram-CIIHVFJN-DQfKxM3L-qUaKEl7l.js} +596 -603
  51. package/dist/{wardley-L42UT6IY-BjAkE_cs-li1xYed9.js → wardley-L42UT6IY-BjAkE_cs-C-giFqos.js} +5760 -5809
  52. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-DXPF2Ee9.js +639 -0
  53. package/dist/{xychartDiagram-2RQKCTM6-ChNH3q1U--vbcTXH5.js → xychartDiagram-2RQKCTM6-ChNH3q1U-a59DsJDA.js} +10 -10
  54. package/package.json +4 -4
  55. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CSQRWfog.js +0 -3278
  56. package/dist/chunk-4BX2VUAB-C_NnimAy-B-8x_g6K.js +0 -9
  57. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-DLmqgbj1.js +0 -17
  58. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-DLmqgbj1.js +0 -17
  59. package/dist/dagre-BM42HDAG-qMWMsyLb-BzK2-5zM.js +0 -291
  60. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-BtfdBLxW.js +0 -747
  61. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-Br5eF-5b.js +0 -16
  62. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-CkhwKYjQ.js +0 -1106
  63. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-CCMCDU5F.js +0 -647
@@ -1,55 +1,55 @@
1
- import { i as oe, f as le, G as se, K as de, W as me, U as xe, p as o, g, Z as R, q as ce, r as ue, H as fe, s as ge, o as B, F as he, c as y, D as P, b9 as be } from "./index-Dpyqhws4.js";
2
- import { r as pe, U as we } from "./wardley-L42UT6IY-BjAkE_cs-li1xYed9.js";
3
- import { t as ve } from "./chunk-4BX2VUAB-C_NnimAy-B-8x_g6K.js";
4
- var H = "position frame", O = "frame positioned", M = "position relation", T = "relation positioned", ye = /* @__PURE__ */ o(function(e) {
1
+ import { i as re, f as oe, G as le, K as se, W as de, U as me, p as o, g, Z as E, q as xe, r as ce, H as ue, s as fe, o as S, F as ge, c as v, D as y, b9 as he } from "./index-DfVKdDwj.js";
2
+ import { r as be, U as pe } from "./wardley-L42UT6IY-BjAkE_cs-C-giFqos.js";
3
+ import { t as we } from "./chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js";
4
+ var W = "position frame", R = "frame positioned", P = "position relation", H = "relation positioned", ve = /* @__PURE__ */ o(function(e) {
5
5
  g.debug("options str", e);
6
- }, "setOptions"), Pe = /* @__PURE__ */ o(function() {
6
+ }, "setOptions"), ye = /* @__PURE__ */ o(function() {
7
7
  return {};
8
- }, "getOptions"), Me = /* @__PURE__ */ o(function() {
9
- U(), fe();
8
+ }, "getOptions"), Pe = /* @__PURE__ */ o(function() {
9
+ O(), ue();
10
10
  }, "clear");
11
- function U() {
12
- F = {};
11
+ function O() {
12
+ B = {};
13
13
  }
14
- o(U, "reset");
15
- var ke = he.eventmodeling, Se = /* @__PURE__ */ o(() => ge({
16
- ...ke,
17
- ...B().eventmodeling
18
- }), "getConfig"), F = {};
19
- function D() {
20
- let e = Be, { ast: a } = F, t = $();
14
+ o(O, "reset");
15
+ var Me = ge.eventmodeling, ke = /* @__PURE__ */ o(() => fe({
16
+ ...Me,
17
+ ...S().eventmodeling
18
+ }), "getConfig"), B = {};
19
+ function T() {
20
+ let e = Se, { ast: a } = B, t = F();
21
21
  if (!a) throw Error("No data for EventModel");
22
22
  return a.frames.forEach((i, n) => {
23
- let r = X(i, a.dataEntities, t);
24
- e = v(e, {
25
- $kind: H,
23
+ let r = G(i, a.dataEntities, t);
24
+ e = w(e, {
25
+ $kind: W,
26
26
  index: n,
27
27
  frame: i,
28
28
  textProps: r
29
29
  });
30
- let s;
31
- Z(i) ? (g.debug("source frame", i.sourceFrames), s = a.frames.filter((d) => i.sourceFrames.some((m) => m.$refText === d.name)), s.forEach((d) => {
32
- e = v(e, {
33
- $kind: M,
30
+ let d;
31
+ K(i) ? (g.debug("source frame", i.sourceFrames), d = a.frames.filter((s) => i.sourceFrames.some((m) => m.$refText === s.name)), d.forEach((s) => {
32
+ e = w(e, {
33
+ $kind: P,
34
34
  index: n,
35
35
  frame: i,
36
- sourceFrame: d
36
+ sourceFrame: s
37
37
  });
38
- })) : e = v(e, {
39
- $kind: M,
38
+ })) : e = w(e, {
39
+ $kind: P,
40
40
  index: n,
41
41
  frame: i
42
42
  });
43
43
  }), e = {
44
44
  ...e,
45
- sortedSwimlanesArray: A(e.swimlanes)
45
+ sortedSwimlanesArray: $(e.swimlanes)
46
46
  }, e;
47
47
  }
48
- o(D, "getState");
49
- function I(e) {
50
- F.ast = e;
48
+ o(T, "getState");
49
+ function U(e) {
50
+ B.ast = e;
51
51
  }
52
- o(I, "setAst");
52
+ o(U, "setAst");
53
53
  var l = {
54
54
  swimlaneMinHeight: 70,
55
55
  swimlanePadding: 15,
@@ -73,40 +73,40 @@ var l = {
73
73
  labelEvents: "Events",
74
74
  labelEventsPrefix: "Stream: "
75
75
  };
76
- function $() {
76
+ function F() {
77
77
  return l;
78
78
  }
79
- o($, "getDiagramProps");
80
- var Be = {
79
+ o(F, "getDiagramProps");
80
+ var Se = {
81
81
  boxes: [],
82
82
  swimlanes: {},
83
83
  relations: [],
84
84
  maxR: 0,
85
85
  sortedSwimlanesArray: []
86
86
  };
87
- function C(e) {
87
+ function D(e) {
88
88
  let a = e.split(".");
89
89
  if (a.length === 2) return a[0];
90
90
  }
91
- o(C, "extractNamespace");
92
- function N(e) {
91
+ o(D, "extractNamespace");
92
+ function I(e) {
93
93
  let a = e.split(".");
94
94
  return a.length === 2 ? a[1] : e;
95
95
  }
96
- o(N, "extractName");
97
- function j(e, a) {
96
+ o(I, "extractName");
97
+ function C(e, a) {
98
98
  if (!(!a || a.length === 0)) return Object.values(e).find((t) => t.namespace === a);
99
99
  }
100
- o(j, "findSwimlaneByNamespace");
101
- function w(e, a, t) {
100
+ o(C, "findSwimlaneByNamespace");
101
+ function p(e, a, t) {
102
102
  return Math.max(a, ...Object.keys(e).filter((i) => {
103
103
  let n = Number.parseInt(i);
104
104
  return n > a && n < t;
105
105
  }).map((i) => Number.parseInt(i))) + 1;
106
106
  }
107
- o(w, "findNextAvailableIndex");
108
- function G(e, a) {
109
- let t = C(e.entityIdentifier), i = j(a, t);
107
+ o(p, "findNextAvailableIndex");
108
+ function N(e, a) {
109
+ let t = D(e.entityIdentifier), i = C(a, t);
110
110
  switch (e.modelEntityType) {
111
111
  case "ui":
112
112
  case "pcr":
@@ -115,7 +115,7 @@ function G(e, a) {
115
115
  index: i.index,
116
116
  label: i.namespace || l.labelUiAutomation
117
117
  } : t ? {
118
- index: w(a, 0, 100),
118
+ index: p(a, 0, 100),
119
119
  label: l.labelUiAutomationPrefix + t
120
120
  } : {
121
121
  index: 0,
@@ -129,7 +129,7 @@ function G(e, a) {
129
129
  index: i.index,
130
130
  label: i.namespace || l.labelCommandReadModel
131
131
  } : t ? {
132
- index: w(a, 100, 200),
132
+ index: p(a, 100, 200),
133
133
  label: l.labelCommandReadModelPrefix + t
134
134
  } : {
135
135
  index: 100,
@@ -140,7 +140,7 @@ function G(e, a) {
140
140
  index: i.index,
141
141
  label: i.namespace || l.labelEvents
142
142
  } : t ? {
143
- index: w(a, 200, 300),
143
+ index: p(a, 200, 300),
144
144
  label: l.labelEventsPrefix + t
145
145
  } : {
146
146
  index: 200,
@@ -148,9 +148,9 @@ function G(e, a) {
148
148
  };
149
149
  }
150
150
  }
151
- o(G, "calculateSwimlaneProps");
152
- function V(e) {
153
- let { themeVariables: a } = B();
151
+ o(N, "calculateSwimlaneProps");
152
+ function j(e) {
153
+ let { themeVariables: a } = S();
154
154
  switch (e.modelEntityType) {
155
155
  case "ui":
156
156
  return {
@@ -188,43 +188,40 @@ function V(e) {
188
188
  };
189
189
  }
190
190
  }
191
- o(V, "calculateEntityVisualProps");
192
- function X(e, a, t) {
193
- let i = B(), n = y(N(e.entityIdentifier) ?? "", i), r, s = {
191
+ o(j, "calculateEntityVisualProps");
192
+ function G(e, a, t) {
193
+ let i = S(), n = v(I(e.entityIdentifier) ?? "", i), r, d = {
194
194
  fontSize: 16,
195
195
  fontWeight: 700,
196
196
  fontFamily: '"trebuchet ms", verdana, arial, sans-serif',
197
197
  joinWith: "<br/>"
198
- }, d = `<b>${P(n, t.textMaxWidth, s)}</b>`;
199
- if (e.dataInlineValue && (r = e.dataInlineValue, r = r.substring(r.indexOf("{") + 1), r = r.substring(0, r.lastIndexOf("}") - 1), r = y(r, i), r = P(r, t.textMaxWidth, s), r = r.replaceAll(" ", "&nbsp;")), e.dataReference) {
200
- let f = a.find((b) => {
201
- var p;
202
- return b.name === ((p = e.dataReference) == null ? void 0 : p.$refText);
203
- });
198
+ }, s = `<b>${y(n, t.textMaxWidth, d)}</b>`;
199
+ if (e.dataInlineValue && (r = e.dataInlineValue, r = r.substring(r.indexOf("{") + 1), r = r.substring(0, r.lastIndexOf("}") - 1), r = v(r, i), r = y(r, t.textMaxWidth, d), r = r.replaceAll(" ", "&nbsp;")), e.dataReference) {
200
+ let f = a.find((b) => b.name === e.dataReference?.$refText);
204
201
  f && (r = f.dataBlockValue, r = r.substring(r.indexOf(`{
205
- `) + 2), r = r.substring(0, r.lastIndexOf("}") - 1), r = y(r, i), r = P(r, t.textMaxWidth, s), r = r.replaceAll(" ", "&nbsp;"), r += "<br/>");
202
+ `) + 2), r = r.substring(0, r.lastIndexOf("}") - 1), r = v(r, i), r = y(r, t.textMaxWidth, d), r = r.replaceAll(" ", "&nbsp;"), r += "<br/>");
206
203
  }
207
204
  let m = r !== void 0;
208
- m && (d += `<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);
205
+ m && (s += `<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);
209
206
  let c = {
210
- fontSize: s.fontSize,
211
- fontWeight: s.fontWeight,
212
- fontFamily: s.fontFamily
213
- }, x = be(d, c), u = m ? x.width / 3 : x.width, h = {
214
- content: d,
207
+ fontSize: d.fontSize,
208
+ fontWeight: d.fontWeight,
209
+ fontFamily: d.fontFamily
210
+ }, x = he(s, c), u = m ? x.width / 3 : x.width, h = {
211
+ content: s,
215
212
  width: u,
216
213
  height: x.height
217
214
  };
218
215
  return g.debug(`[${e.name}] ${e.entityIdentifier} text`, h), h;
219
216
  }
220
- o(X, "calculateTextProps");
221
- function q(e, a) {
222
- let t = a, i = V(t.frame), n = {
217
+ o(G, "calculateTextProps");
218
+ function V(e, a) {
219
+ let t = a, i = j(t.frame), n = {
223
220
  width: t.textProps.width + 2 * l.boxTextPadding,
224
221
  height: t.textProps.height + 2 * l.boxTextPadding
225
222
  };
226
223
  return [{
227
- $kind: O,
224
+ $kind: R,
228
225
  frame: t.frame,
229
226
  index: t.index,
230
227
  visual: i,
@@ -232,22 +229,22 @@ function q(e, a) {
232
229
  textProps: t.textProps
233
230
  }];
234
231
  }
235
- o(q, "decidePositionFrame");
236
- function z(e, a, t) {
232
+ o(V, "decidePositionFrame");
233
+ function X(e, a, t) {
237
234
  return a === void 0 ? l.contentStartX : a.index === e.index && e.r ? e.r + l.boxPadding : t === void 0 ? l.contentStartX : t.r - l.boxOverlap + l.boxPadding;
238
235
  }
239
- o(z, "calculateX");
240
- function Y(e, a) {
236
+ o(X, "calculateX");
237
+ function q(e, a) {
241
238
  let t = [...e.map((i) => i.r), a];
242
239
  return Math.max(...t);
243
240
  }
244
- o(Y, "calculateMaxRight");
245
- function A(e) {
241
+ o(q, "calculateMaxRight");
242
+ function $(e) {
246
243
  return Object.values(e).sort((a, t) => a.index - t.index);
247
244
  }
248
- o(A, "sortedSwimlanesArray");
249
- function K(e, a) {
250
- let t = a, i = G(t.frame, e.swimlanes), n;
245
+ o($, "sortedSwimlanesArray");
246
+ function z(e, a) {
247
+ let t = a, i = N(t.frame, e.swimlanes), n;
251
248
  n = i.index in e.swimlanes ? e.swimlanes[i.index] : {
252
249
  index: i.index,
253
250
  label: i.label,
@@ -256,16 +253,16 @@ function K(e, a) {
256
253
  height: l.swimlaneMinHeight,
257
254
  maxHeight: l.swimlaneMinHeight
258
255
  };
259
- let r = e.boxes.length > 0 ? e.boxes[e.boxes.length - 1] : void 0, s = e.previousSwimlaneNumber === void 0 ? void 0 : e.swimlanes[e.previousSwimlaneNumber], d = {
256
+ let r = e.boxes.length > 0 ? e.boxes[e.boxes.length - 1] : void 0, d = e.previousSwimlaneNumber === void 0 ? void 0 : e.swimlanes[e.previousSwimlaneNumber], s = {
260
257
  width: Math.max(l.boxMinWidth, Math.min(l.boxMaxWidth, t.dimension.width)) + 2 * l.boxPadding,
261
258
  height: Math.max(l.boxMinHeight, Math.min(l.boxMaxHeight, t.dimension.height)) + 2 * l.boxPadding
262
- }, m = z(n, s, r), c = m + d.width + l.boxPadding, x = Y(Object.values(e.swimlanes), c);
263
- n.r = m + d.width, n.maxHeight = Math.max(n.maxHeight, d.height), n.height = Math.max(l.swimlaneMinHeight, n.maxHeight) + 2 * l.swimlanePadding;
259
+ }, m = X(n, d, r), c = m + s.width + l.boxPadding, x = q(Object.values(e.swimlanes), c);
260
+ n.r = m + s.width, n.maxHeight = Math.max(n.maxHeight, s.height), n.height = Math.max(l.swimlaneMinHeight, n.maxHeight) + 2 * l.swimlanePadding;
264
261
  let u = {
265
262
  x: m,
266
263
  y: l.swimlanePadding + n.y,
267
264
  r: c,
268
- dimension: d,
265
+ dimension: s,
269
266
  leftSibling: !1,
270
267
  swimlane: n,
271
268
  visual: t.visual,
@@ -282,50 +279,50 @@ function K(e, a) {
282
279
  previousSwimlaneNumber: i.index,
283
280
  previousFrame: t.frame,
284
281
  maxR: x
285
- }, f = A(h.swimlanes);
282
+ }, f = $(h.swimlanes);
286
283
  f.length > 0 && (f[0].y = 0);
287
284
  for (let b = 1; b < f.length; b++) {
288
- let p = f[b], E = f[b - 1];
289
- p.y = E.y + E.height + l.swimlaneGap;
285
+ let ne = f[b], A = f[b - 1];
286
+ ne.y = A.y + A.height + l.swimlaneGap;
290
287
  }
291
288
  return h;
292
289
  }
293
- o(K, "evolveFramePositioned");
294
- function L(e, a) {
290
+ o(z, "evolveFramePositioned");
291
+ function Y(e, a) {
295
292
  return e === 0 && a.sourceFrames.length === 0;
296
293
  }
297
- o(L, "isFirstFrame");
298
- function Z(e) {
294
+ o(Y, "isFirstFrame");
295
+ function K(e) {
299
296
  return e.sourceFrames !== void 0 && e.sourceFrames !== null && e.sourceFrames.length > 0;
300
297
  }
301
- o(Z, "hasSourceFrame");
302
- function k(e, a) {
298
+ o(K, "hasSourceFrame");
299
+ function M(e, a) {
303
300
  if (a != null) return e.find((t) => t.frame.name === a.name);
304
301
  }
305
- o(k, "findBoxByFrame");
306
- function J(e, a, t) {
302
+ o(M, "findBoxByFrame");
303
+ function L(e, a, t) {
307
304
  if (!(t < 0)) for (let i = t; i >= 0; i--) {
308
305
  let n = e[i];
309
306
  if (n.swimlane.index !== a) return n;
310
307
  }
311
308
  }
312
- o(J, "findBoxByLineIndex");
313
- function Q(e, a) {
309
+ o(L, "findBoxByLineIndex");
310
+ function Z(e, a) {
314
311
  let t = a;
315
- if (we(t.frame) || L(t.index, t.frame)) return [];
316
- let i = k(e.boxes, t.frame);
312
+ if (pe(t.frame) || Y(t.index, t.frame)) return [];
313
+ let i = M(e.boxes, t.frame);
317
314
  if (i === void 0) throw Error(`Target box not found for frame ${t.frame.name}`);
318
315
  let n;
319
- return n = t.sourceFrame ? k(e.boxes, t.sourceFrame) : J(e.boxes, i.swimlane.index, t.index - 1), n === void 0 ? [] : [{
320
- $kind: T,
316
+ return n = t.sourceFrame ? M(e.boxes, t.sourceFrame) : L(e.boxes, i.swimlane.index, t.index - 1), n === void 0 ? [] : [{
317
+ $kind: H,
321
318
  frame: t.frame,
322
319
  index: t.index,
323
320
  sourceBox: n,
324
321
  targetBox: i
325
322
  }];
326
323
  }
327
- o(Q, "decidePositionRelation");
328
- function _(e, a) {
324
+ o(Z, "decidePositionRelation");
325
+ function J(e, a) {
329
326
  let t = a, i = {
330
327
  visual: {
331
328
  fill: "none",
@@ -347,24 +344,24 @@ function _(e, a) {
347
344
  relations: [...e.relations, i]
348
345
  };
349
346
  }
350
- o(_, "evolveRelationPositioned");
351
- var Fe = {
352
- [H]: q,
353
- [M]: Q
354
- }, $e = {
355
- [O]: K,
356
- [T]: _
347
+ o(J, "evolveRelationPositioned");
348
+ var Be = {
349
+ [W]: V,
350
+ [P]: Z
351
+ }, Fe = {
352
+ [R]: z,
353
+ [H]: J
357
354
  };
358
- function ee(e, a) {
359
- let t = Fe[a.$kind];
355
+ function Q(e, a) {
356
+ let t = Be[a.$kind];
360
357
  if (t == null) return [];
361
358
  let i = t(e, a);
362
359
  return g.debug("decided events", i), i;
363
360
  }
364
- o(ee, "decide");
365
- function te(e, a) {
361
+ o(Q, "decide");
362
+ function _(e, a) {
366
363
  let t = a.reduce((i, n) => {
367
- let r = $e[n.$kind];
364
+ let r = Fe[n.$kind];
368
365
  return r == null ? i : r(i, n);
369
366
  }, e);
370
367
  return g.debug("evolve events", {
@@ -373,70 +370,70 @@ function te(e, a) {
373
370
  events: a
374
371
  }), t;
375
372
  }
376
- o(te, "evolve");
377
- function v(e, a) {
378
- return te(e, ee(e, a));
373
+ o(_, "evolve");
374
+ function w(e, a) {
375
+ return _(e, Q(e, a));
379
376
  }
380
- o(v, "dispatch");
381
- var S = {
382
- getConfig: Se,
383
- setOptions: ye,
384
- getOptions: Pe,
385
- clear: Me,
386
- setAccTitle: xe,
387
- getAccTitle: me,
388
- getAccDescription: de,
389
- setAccDescription: se,
390
- setDiagramTitle: le,
391
- getDiagramTitle: oe,
392
- setAst: I,
393
- getDiagramProps: $,
394
- getState: D
395
- }, Ae = { parse: /* @__PURE__ */ o(async (e) => {
396
- let a = await pe("eventmodeling", e);
397
- g.debug(a), S.setAst(a), ve(a, S);
398
- }, "parse") }, W, Ee = (W = R()) == null ? void 0 : W.eventmodeling;
399
- function ae(e, a) {
377
+ o(w, "dispatch");
378
+ var k = {
379
+ getConfig: ke,
380
+ setOptions: ve,
381
+ getOptions: ye,
382
+ clear: Pe,
383
+ setAccTitle: me,
384
+ getAccTitle: de,
385
+ getAccDescription: se,
386
+ setAccDescription: le,
387
+ setDiagramTitle: oe,
388
+ getDiagramTitle: re,
389
+ setAst: U,
390
+ getDiagramProps: F,
391
+ getState: T
392
+ }, $e = { parse: /* @__PURE__ */ o(async (e) => {
393
+ let a = await be("eventmodeling", e);
394
+ g.debug(a), k.setAst(a), we(a, k);
395
+ }, "parse") }, Ae = E()?.eventmodeling;
396
+ function ee(e, a) {
400
397
  return (t) => {
401
398
  let i = t.swimlane.y + a.swimlanePadding, n = e.append("g").attr("class", "em-box");
402
399
  n.append("rect").attr("x", t.x).attr("y", i).attr("rx", "3").attr("width", t.dimension.width).attr("height", t.dimension.height).attr("stroke", t.visual.stroke).attr("fill", t.visual.fill), n.append("foreignObject").attr("x", t.x + a.boxPadding).attr("y", i + 10).attr("width", t.dimension.width - 2 * a.boxPadding).attr("height", t.dimension.height - 2 * a.boxPadding).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%").append("span").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").html(t.text);
403
400
  };
404
401
  }
405
- o(ae, "renderD3Box");
406
- function ie(e, a) {
402
+ o(ee, "renderD3Box");
403
+ function te(e, a) {
407
404
  return e > a;
408
405
  }
409
- o(ie, "dirUpwards");
410
- function ne(e, a, t, i) {
406
+ o(te, "dirUpwards");
407
+ function ae(e, a, t, i) {
411
408
  return (n) => {
412
- let r = n.sourceBox.swimlane.y + a.swimlanePadding, s = n.targetBox.swimlane.y + a.swimlanePadding, d = ie(r, s), m = n.sourceBox.x + n.sourceBox.dimension.width * 2 / 3, c = n.targetBox.x + n.targetBox.dimension.width / 3, x, u;
413
- g.debug(`rendering relation up=${d} for `, {
409
+ let r = n.sourceBox.swimlane.y + a.swimlanePadding, d = n.targetBox.swimlane.y + a.swimlanePadding, s = te(r, d), m = n.sourceBox.x + n.sourceBox.dimension.width * 2 / 3, c = n.targetBox.x + n.targetBox.dimension.width / 3, x, u;
410
+ g.debug(`rendering relation up=${s} for `, {
414
411
  sourceBox: n.sourceBox,
415
412
  targetBox: n.targetBox
416
- }), d ? (x = r, u = s + n.targetBox.dimension.height) : (x = r + n.sourceBox.dimension.height, u = s);
413
+ }), s ? (x = r, u = d + n.targetBox.dimension.height) : (x = r + n.sourceBox.dimension.height, u = d);
417
414
  let h = i.emRelationStroke ?? n.visual.stroke;
418
415
  e.append("path").attr("class", "em-relation").attr("fill", n.visual.fill).attr("stroke", h).attr("stroke-width", "1").attr("marker-end", `url(#${t})`).attr("d", `M${m} ${x} L${c} ${u}`);
419
416
  };
420
417
  }
421
- o(ne, "renderD3Relation");
422
- function re(e, a, t, i) {
418
+ o(ae, "renderD3Relation");
419
+ function ie(e, a, t, i) {
423
420
  return (n) => {
424
- let r = e.append("g").attr("class", "em-swimlane"), s = i.emSwimlaneBackgroundOdd ?? "rgb(250,250,250)", d = i.emSwimlaneBackgroundStroke ?? "rgb(240,240,240)";
425
- r.append("rect").attr("x", 0).attr("y", n.y).attr("rx", "3").attr("width", a + t.swimlanePadding).attr("height", n.height).attr("fill", s).attr("stroke", d), r.append("text").attr("font-weight", t.swimlaneTextFontWeight).attr("x", 30).attr("y", n.y + 30).text(n.label);
421
+ let r = e.append("g").attr("class", "em-swimlane"), d = i.emSwimlaneBackgroundOdd ?? "rgb(250,250,250)", s = i.emSwimlaneBackgroundStroke ?? "rgb(240,240,240)";
422
+ r.append("rect").attr("x", 0).attr("y", n.y).attr("rx", "3").attr("width", a + t.swimlanePadding).attr("height", n.height).attr("fill", d).attr("stroke", s), r.append("text").attr("font-weight", t.swimlaneTextFontWeight).attr("x", 30).attr("y", n.y + 30).text(n.label);
426
423
  };
427
424
  }
428
- o(re, "renderD3Swimlane");
429
- var Oe = {
430
- parser: Ae,
431
- db: S,
425
+ o(ie, "renderD3Swimlane");
426
+ var He = {
427
+ parser: $e,
428
+ db: k,
432
429
  renderer: { draw: /* @__PURE__ */ o(function(e, a, t, i) {
433
430
  if (g.debug("in eventmodeling renderer", e + `
434
- `, "id:", a, t), !Ee) throw Error("EventModeling config not found");
435
- let n = i.db, { themeVariables: r, eventmodeling: s } = R(), d = ce(`[id="${a}"]`), m = n.getDiagramProps(), c = n.getState(), x = `em-arrowhead-${a}`, u = r.emArrowhead ?? "#000000";
436
- c.sortedSwimlanesArray.forEach(re(d, c.maxR, m, r)), c.boxes.forEach(ae(d, m)), c.relations.forEach(ne(d, m, x, r)), d.append("defs").append("marker").attr("id", x).attr("markerWidth", "10").attr("markerHeight", "7").attr("refX", "10").attr("refY", "3.5").attr("orient", "auto").append("polygon").attr("points", "0 0, 10 3.5, 0 7").attr("fill", u), ue(void 0, d, (s == null ? void 0 : s.padding) ?? 30, s == null ? void 0 : s.useMaxWidth);
431
+ `, "id:", a, t), !Ae) throw Error("EventModeling config not found");
432
+ let n = i.db, { themeVariables: r, eventmodeling: d } = E(), s = xe(`[id="${a}"]`), m = n.getDiagramProps(), c = n.getState(), x = `em-arrowhead-${a}`, u = r.emArrowhead ?? "#000000";
433
+ c.sortedSwimlanesArray.forEach(ie(s, c.maxR, m, r)), c.boxes.forEach(ee(s, m)), c.relations.forEach(ae(s, m, x, r)), s.append("defs").append("marker").attr("id", x).attr("markerWidth", "10").attr("markerHeight", "7").attr("refX", "10").attr("refY", "3.5").attr("orient", "auto").append("polygon").attr("points", "0 0, 10 3.5, 0 7").attr("fill", u), ce(void 0, s, d?.padding ?? 30, d?.useMaxWidth);
437
434
  }, "draw") },
438
435
  styles: /* @__PURE__ */ o((e) => "", "getStyles")
439
436
  };
440
437
  export {
441
- Oe as diagram
438
+ He as diagram
442
439
  };
@@ -1,6 +1,6 @@
1
- import { p as f, s as m, a0 as C, A as v, g as w, U as P, W as F, f as S, i as W, K as z, G as E, o as T, F as D, H as A } from "./index-Dpyqhws4.js";
2
- import { t as H } from "./chunk-4BX2VUAB-C_NnimAy-B-8x_g6K.js";
3
- import { r as G } from "./wardley-L42UT6IY-BjAkE_cs-li1xYed9.js";
1
+ import { p as f, s as m, a0 as C, A as v, g as w, U as P, W as F, f as S, i as W, K as z, G as E, o as T, F as D, H as A } from "./index-DfVKdDwj.js";
2
+ import { t as H } from "./chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js";
3
+ import { r as G } from "./wardley-L42UT6IY-BjAkE_cs-C-giFqos.js";
4
4
  var R = D.packet, u, y = (u = class {
5
5
  constructor() {
6
6
  this.packet = [], this.setAccTitle = P, this.getAccTitle = F, this.setDiagramTitle = S, this.getDiagramTitle = W, this.getAccDescription = z, this.setAccDescription = E;
@@ -23,34 +23,34 @@ var R = D.packet, u, y = (u = class {
23
23
  }
24
24
  }, f(u, "PacketDB"), u), Y = 1e4, K = /* @__PURE__ */ f((e, t) => {
25
25
  H(e, t);
26
- let i = -1, r = [], l = 1, { bitsPerRow: n } = t.getConfig();
26
+ let r = -1, i = [], l = 1, { bitsPerRow: n } = t.getConfig();
27
27
  for (let { start: a, end: o, bits: c, label: d } of e.blocks) {
28
28
  if (a !== void 0 && o !== void 0 && o < a) throw Error(`Packet block ${a} - ${o} is invalid. End must be greater than start.`);
29
- if (a ?? (a = i + 1), a !== i + 1) throw Error(`Packet block ${a} - ${o ?? a} is not contiguous. It should start from ${i + 1}.`);
29
+ if (a ??= r + 1, a !== r + 1) throw Error(`Packet block ${a} - ${o ?? a} is not contiguous. It should start from ${r + 1}.`);
30
30
  if (c === 0) throw Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
31
- for (o ?? (o = a + (c ?? 1) - 1), c ?? (c = o - a + 1), i = o, w.debug(`Packet block ${a} - ${i} with label ${d}`); r.length <= n + 1 && t.getPacket().length < Y; ) {
31
+ for (o ??= a + (c ?? 1) - 1, c ??= o - a + 1, r = o, w.debug(`Packet block ${a} - ${r} with label ${d}`); i.length <= n + 1 && t.getPacket().length < Y; ) {
32
32
  let [p, s] = L({
33
33
  start: a,
34
34
  end: o,
35
35
  bits: c,
36
36
  label: d
37
37
  }, l, n);
38
- if (r.push(p), p.end + 1 === l * n && (t.pushWord(r), r = [], l++), !s) break;
38
+ if (i.push(p), p.end + 1 === l * n && (t.pushWord(i), i = [], l++), !s) break;
39
39
  ({ start: a, end: o, bits: c, label: d } = s);
40
40
  }
41
41
  }
42
- t.pushWord(r);
43
- }, "populate"), L = /* @__PURE__ */ f((e, t, i) => {
42
+ t.pushWord(i);
43
+ }, "populate"), L = /* @__PURE__ */ f((e, t, r) => {
44
44
  if (e.start === void 0) throw Error("start should have been set during first phase");
45
45
  if (e.end === void 0) throw Error("end should have been set during first phase");
46
46
  if (e.start > e.end) throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);
47
- if (e.end + 1 <= t * i) return [e, void 0];
48
- let r = t * i - 1, l = t * i;
47
+ if (e.end + 1 <= t * r) return [e, void 0];
48
+ let i = t * r - 1, l = t * r;
49
49
  return [{
50
50
  start: e.start,
51
- end: r,
51
+ end: i,
52
52
  label: e.label,
53
- bits: r - e.start
53
+ bits: i - e.start
54
54
  }, {
55
55
  start: l,
56
56
  end: e.end,
@@ -60,21 +60,20 @@ var R = D.packet, u, y = (u = class {
60
60
  }, "getNextFittingBlock"), x = {
61
61
  parser: { yy: void 0 },
62
62
  parse: /* @__PURE__ */ f(async (e) => {
63
- var r;
64
- let t = await G("packet", e), i = (r = x.parser) == null ? void 0 : r.yy;
65
- if (!(i instanceof y)) throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
66
- w.debug(t), K(t, i);
63
+ let t = await G("packet", e), r = x.parser?.yy;
64
+ if (!(r instanceof y)) throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
65
+ w.debug(t), K(t, r);
67
66
  }, "parse")
68
- }, M = /* @__PURE__ */ f((e, t, i, r) => {
69
- let l = r.db, n = l.getConfig(), { rowHeight: a, paddingY: o, bitWidth: c, bitsPerRow: d } = n, p = l.getPacket(), s = l.getDiagramTitle(), b = a + o, h = b * (p.length + 1) - (s ? 0 : a), k = c * d + 2, g = C(t);
67
+ }, M = /* @__PURE__ */ f((e, t, r, i) => {
68
+ let l = i.db, n = l.getConfig(), { rowHeight: a, paddingY: o, bitWidth: c, bitsPerRow: d } = n, p = l.getPacket(), s = l.getDiagramTitle(), b = a + o, h = b * (p.length + 1) - (s ? 0 : a), k = c * d + 2, g = C(t);
70
69
  g.attr("viewBox", `0 0 ${k} ${h}`), v(g, h, k, n.useMaxWidth);
71
70
  for (let [$, B] of p.entries()) U(g, B, $, n);
72
71
  g.append("text").text(s).attr("x", k / 2).attr("y", h - b / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
73
- }, "draw"), U = /* @__PURE__ */ f((e, t, i, { rowHeight: r, paddingX: l, paddingY: n, bitWidth: a, bitsPerRow: o, showBits: c }) => {
74
- let d = e.append("g"), p = i * (r + n) + n;
72
+ }, "draw"), U = /* @__PURE__ */ f((e, t, r, { rowHeight: i, paddingX: l, paddingY: n, bitWidth: a, bitsPerRow: o, showBits: c }) => {
73
+ let d = e.append("g"), p = r * (i + n) + n;
75
74
  for (let s of t) {
76
75
  let b = s.start % o * a + 1, h = (s.end - s.start + 1) * a - l;
77
- if (d.append("rect").attr("x", b).attr("y", p).attr("width", h).attr("height", r).attr("class", "packetBlock"), d.append("text").attr("x", b + h / 2).attr("y", p + r / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(s.label), !c) continue;
76
+ if (d.append("rect").attr("x", b).attr("y", p).attr("width", h).attr("height", i).attr("class", "packetBlock"), d.append("text").attr("x", b + h / 2).attr("y", p + i / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(s.label), !c) continue;
78
77
  let k = s.end === s.start, g = p - 2;
79
78
  d.append("text").attr("x", b + (k ? h / 2 : 0)).attr("y", g).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(s.start), k || d.append("text").attr("x", b + h).attr("y", g).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(s.end);
80
79
  }