@diagrammo/dgmo 0.97.0 → 0.98.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 (86) hide show
  1. package/dist/advanced.d.ts +7 -1
  2. package/dist/advanced.js +49 -45
  3. package/dist/block.js +15 -15
  4. package/dist/chart-meta.js +8 -8
  5. package/dist/{chunk-XEMCNQQW.js → chunk-3EDV56HL.js} +5 -5
  6. package/dist/{chunk-3HL6NSSQ.js → chunk-3F74NDUY.js} +1 -1
  7. package/dist/{chunk-LRTSTDJ6.js → chunk-42AZPI2W.js} +31 -7
  8. package/dist/{chunk-W46OMHOK.js → chunk-4PZP6URA.js} +21 -27
  9. package/dist/{chunk-6YBZFOTA.js → chunk-6Q46GMKH.js} +11 -48
  10. package/dist/{chunk-D7KZE2XJ.js → chunk-6YRTBI2F.js} +18 -62
  11. package/dist/{chunk-IAM3IDL4.js → chunk-A3N4UHHL.js} +1 -1
  12. package/dist/{chunk-QLNLRZ37.js → chunk-AHUBG6GR.js} +16 -9
  13. package/dist/{chunk-Q6V342WS.js → chunk-BTFB7W5Z.js} +1 -1
  14. package/dist/{chunk-CUOMNKYW.js → chunk-BWVJTYTJ.js} +2 -2
  15. package/dist/{chunk-DRY4W4W6.js → chunk-CES7REQM.js} +10 -47
  16. package/dist/{chunk-WXGFB2O2.js → chunk-D6XR22KO.js} +1 -1
  17. package/dist/{chunk-SNDCXT5R.js → chunk-D7FHY6DO.js} +1 -1
  18. package/dist/{chunk-CLW45YKE.js → chunk-DA2GIHAY.js} +36 -4
  19. package/dist/{chunk-A5LFM62B.js → chunk-DYI73PFY.js} +2 -2
  20. package/dist/{chunk-YFWIFKRQ.js → chunk-ENXENGW5.js} +1 -1
  21. package/dist/{chunk-26EVL454.js → chunk-F4DGHT3F.js} +20 -0
  22. package/dist/{chunk-YCIBBVI2.js → chunk-FDVUD3PR.js} +2 -2
  23. package/dist/{chunk-VKT3BVRO.js → chunk-FTRW6YGU.js} +2 -2
  24. package/dist/{chunk-74XR7Z3I.js → chunk-G36XKXWT.js} +5 -3
  25. package/dist/{chunk-PSNRB75I.js → chunk-GMJBBFKC.js} +1 -1
  26. package/dist/{chunk-VOO65FKC.js → chunk-GNQYARON.js} +11 -48
  27. package/dist/{chunk-MJ725XHD.js → chunk-GNWCMWTO.js} +43 -43
  28. package/dist/{chunk-J7JF4QKA.js → chunk-H7XXQSYA.js} +24 -24
  29. package/dist/{chunk-F2OAZHOX.js → chunk-IMBFWXHF.js} +2 -2
  30. package/dist/{chunk-ZCKVTZHD.js → chunk-KKJG3LBY.js} +1 -1
  31. package/dist/{chunk-7ASVGFW3.js → chunk-NHN6GBG7.js} +1 -1
  32. package/dist/{chunk-V3ICBS2O.js → chunk-NXOIH5JK.js} +3 -8
  33. package/dist/{chunk-NOZMRPXI.js → chunk-O5APWRZN.js} +105 -86
  34. package/dist/{chunk-ZRW4B4KF.js → chunk-PRYAVMU6.js} +2 -2
  35. package/dist/{chunk-2FMOLWX4.js → chunk-Q6OKTHYL.js} +7 -7
  36. package/dist/{chunk-2SZILMQT.js → chunk-QGSQ2LMB.js} +1 -1
  37. package/dist/{chunk-JULBDTNU.js → chunk-S5VZLZUQ.js} +2 -2
  38. package/dist/{chunk-NN5RUHXV.js → chunk-TGQQD2KC.js} +1 -1
  39. package/dist/{chunk-4TK26YHH.js → chunk-UWWQECLC.js} +1 -1
  40. package/dist/{chunk-6SDEXSJY.js → chunk-VHVQT4EW.js} +1 -1
  41. package/dist/chunk-VTGGPBLW.js +14 -0
  42. package/dist/{chunk-44RLIAYC.js → chunk-VUBCCY65.js} +18 -62
  43. package/dist/{chunk-PT5VFY3B.js → chunk-VYEIMHL5.js} +1 -1
  44. package/dist/{chunk-7TEAFIEJ.js → chunk-XPOEE2RW.js} +1 -1
  45. package/dist/{chunk-GLLYHYGT.js → chunk-Y24QPREP.js} +1 -1
  46. package/dist/{chunk-EEIGHOJR.js → chunk-YCIOLYWL.js} +1 -1
  47. package/dist/{chunk-H7DZYHQF.js → chunk-Z6V73LD6.js} +1 -1
  48. package/dist/{chunk-6S2H6EKN.js → chunk-ZXPSNBZC.js} +3 -3
  49. package/dist/{dgmo-router-RSYWR5IS.js → dgmo-router-RXV7BNPN.js} +10 -10
  50. package/dist/{flowchart-parser-UI5VZNGJ.js → flowchart-parser-JAZRKKKJ.js} +3 -3
  51. package/dist/{flowchart-renderer-IYWPKPCF.js → flowchart-renderer-JED3RESY.js} +9 -9
  52. package/dist/index.d.ts +1 -1
  53. package/dist/index.js +15 -15
  54. package/dist/{layout-R6ULGQJK.js → layout-6QXAC2WA.js} +2 -1
  55. package/dist/{layout-7C2QZCEZ.js → layout-DJOZCSAP.js} +6 -6
  56. package/dist/{layout-G3RVKEC4.js → layout-LCHMEGTV.js} +6 -6
  57. package/dist/{layout-6VY3DHYD.js → layout-VHBM32OD.js} +3 -3
  58. package/dist/{layout-WBH5IHYK.js → layout-ZDMJL4KO.js} +6 -6
  59. package/dist/{layout-search-DSIDKKQO.js → layout-search-UZYZE4PR.js} +4 -4
  60. package/dist/{parser-E4B7HJT2.js → parser-3KMY23A2.js} +1 -1
  61. package/dist/{parser-IU6425JW.js → parser-ASXY2CPV.js} +3 -3
  62. package/dist/{parser-RSWZGQA7.js → parser-GBB5MYAN.js} +3 -3
  63. package/dist/{parser-IZYIXDJX.js → parser-ZSBMGGTD.js} +3 -3
  64. package/dist/{renderer-HIB6LZWZ.js → renderer-37LMEGLD.js} +2 -2
  65. package/dist/{renderer-XMJ6XZGL.js → renderer-3EIZRVO3.js} +3 -3
  66. package/dist/{renderer-HLDRRFZB.js → renderer-4LK2RFHD.js} +2 -2
  67. package/dist/{renderer-2V5NVI3V.js → renderer-4WD4ZIEH.js} +4 -3
  68. package/dist/{renderer-TCTZZ5Y6.js → renderer-67PNYODC.js} +2 -2
  69. package/dist/{renderer-CNDB4JTZ.js → renderer-6VBL2DWH.js} +3 -3
  70. package/dist/{renderer-6IAXRZLK.js → renderer-CUEMI3PI.js} +11 -11
  71. package/dist/{renderer-WIBVOPRC.js → renderer-D6BEC6LI.js} +2 -2
  72. package/dist/{renderer-BXVTYE27.js → renderer-DT2PP7NJ.js} +2 -2
  73. package/dist/{renderer-ITJ67HXO.js → renderer-GHYW6Y3A.js} +2 -2
  74. package/dist/{renderer-E5E3OJ42.js → renderer-HRUKL4T6.js} +2 -2
  75. package/dist/{renderer-4PKYVOYL.js → renderer-KVC7Z4T2.js} +8 -8
  76. package/dist/{renderer-UIHCYXBY.js → renderer-QVUPRQ4L.js} +3 -2
  77. package/dist/{renderer-JLOKFKOZ.js → renderer-RBAMFLZQ.js} +2 -2
  78. package/dist/{renderer-66SCERH7.js → renderer-SGRZKIMS.js} +3 -3
  79. package/dist/{renderer-ASPBBACI.js → renderer-TJPBVNVG.js} +3 -2
  80. package/dist/{renderer-COV2DXTM.js → renderer-WK2BPXND.js} +8 -8
  81. package/dist/{renderer-DXCATVLO.js → renderer-ZG7WOBBN.js} +3 -3
  82. package/dist/{renderer-M2467III.js → renderer-ZRPL5COW.js} +2 -2
  83. package/dist/{state-parser-2PQRH5JE.js → state-parser-LSFAJFMV.js} +3 -3
  84. package/dist/{state-renderer-YP6HWLJR.js → state-renderer-QTDBFB4F.js} +10 -10
  85. package/docs/language-reference.md +1 -1
  86. package/package.json +1 -1
@@ -5,13 +5,17 @@ import {
5
5
  isCollapsibleGroup,
6
6
  isFoldableSequenceNote
7
7
  } from "./chunk-R4U7IIRX.js";
8
+ import {
9
+ SEQUENCE_CYLINDER_RY,
10
+ SEQUENCE_QUEUE_CAP
11
+ } from "./chunk-VTGGPBLW.js";
8
12
  import {
9
13
  ScaleContext
10
14
  } from "./chunk-24YPR5EH.js";
11
15
  import {
12
16
  collapseBarHeight,
13
17
  renderCollapseBar
14
- } from "./chunk-LRTSTDJ6.js";
18
+ } from "./chunk-42AZPI2W.js";
15
19
  import {
16
20
  layoutInlineHeader
17
21
  } from "./chunk-REKLKGR6.js";
@@ -73,6 +77,85 @@ import {
73
77
  // src/sequence/renderer.ts
74
78
  import * as d3Selection from "d3-selection";
75
79
 
80
+ // src/sequence/participant-shapes.ts
81
+ var PARTICIPANT_BOX_HEIGHT = 50;
82
+ var STROKE_WIDTH = 1.5;
83
+ function cylinder(axis, w, h, cap) {
84
+ const v = axis === "y";
85
+ const start = v ? cap : -w / 2 + cap;
86
+ const span = (v ? h : w) - cap * 2;
87
+ const end = start + span;
88
+ const [lo, hi, mid, half] = v ? [-w / 2, w / 2, 0, w / 2] : [0, h, h / 2, h / 2];
89
+ const at = (a, c) => v ? [c, a] : [a, c];
90
+ const capAt = (a) => {
91
+ const [cx, cy] = at(a, mid);
92
+ const [rx, ry] = v ? [half, cap] : [cap, half];
93
+ return { tag: "ellipse", paint: "shape", attrs: { cx, cy, rx, ry } };
94
+ };
95
+ const wall = (c) => {
96
+ const [x1, y1] = at(start, c);
97
+ const [x2, y2] = at(end, c);
98
+ return { tag: "line", paint: "line", attrs: { x1, y1, x2, y2 } };
99
+ };
100
+ const [x, y] = at(start, lo);
101
+ const body = {
102
+ tag: "rect",
103
+ paint: "body",
104
+ attrs: { x, y, width: v ? w : span, height: v ? span : h }
105
+ };
106
+ return [capAt(end), body, wall(lo), wall(hi), capAt(start)];
107
+ }
108
+ function actor(h) {
109
+ const sc = h / PARTICIPANT_BOX_HEIGHT;
110
+ const hip = h * 0.65;
111
+ const legY = h - 2 * sc;
112
+ const line = (x1, y1, x2, y2) => ({
113
+ tag: "line",
114
+ paint: "line",
115
+ attrs: { x1, y1, x2, y2 }
116
+ });
117
+ return {
118
+ parts: [
119
+ {
120
+ tag: "circle",
121
+ paint: "ring",
122
+ attrs: { cx: 0, cy: 10 * sc, r: 8 * sc }
123
+ },
124
+ line(0, 19 * sc, 0, hip),
125
+ line(-16 * sc, 24 * sc, 16 * sc, 24 * sc),
126
+ line(0, hip, -12 * sc, legY),
127
+ line(0, hip, 12 * sc, legY)
128
+ ],
129
+ strokeWidth: Math.max(1.2, 2.5 * sc),
130
+ dashed: false
131
+ };
132
+ }
133
+ function participantShape(type, w, h) {
134
+ const drawn = (parts, dashed = false) => ({
135
+ parts,
136
+ strokeWidth: STROKE_WIDTH,
137
+ dashed
138
+ });
139
+ switch (type) {
140
+ case "actor":
141
+ return actor(h);
142
+ case "database":
143
+ return drawn(cylinder("y", w, h, SEQUENCE_CYLINDER_RY));
144
+ case "cache":
145
+ return drawn(cylinder("y", w, h, SEQUENCE_CYLINDER_RY), true);
146
+ case "queue":
147
+ return drawn(cylinder("x", w, h, SEQUENCE_QUEUE_CAP));
148
+ default:
149
+ return drawn([
150
+ {
151
+ tag: "rect",
152
+ paint: "shape",
153
+ attrs: { x: -w / 2, y: 0, width: w, height: h, rx: 2, ry: 2 }
154
+ }
155
+ ]);
156
+ }
157
+ }
158
+
76
159
  // src/sequence/tag-resolution.ts
77
160
  function propagateGroupTags(participantMeta, groups) {
78
161
  for (const group of [...groups].sort((a, b) => b.depth - a.depth)) {
@@ -159,7 +242,6 @@ function resolveSequenceTags(parsed, activeTagGroup) {
159
242
  // src/sequence/renderer.ts
160
243
  var PARTICIPANT_GAP = 160;
161
244
  var PARTICIPANT_BOX_WIDTH = 120;
162
- var PARTICIPANT_BOX_HEIGHT = 50;
163
245
  var LABEL_FONT_SIZE = 13;
164
246
  var TOP_MARGIN = 20;
165
247
  var TITLE_HEIGHT = 30;
@@ -226,67 +308,23 @@ function wrapLabelWords(words, maxWidth, fontSize, sep = "") {
226
308
  }
227
309
  var fill = (palette, isDark, color, fillMode) => color ? shapeFill(palette, color, isDark, { mode: fillMode }) : isDark ? mix(palette.overlay, palette.surface, 50) : mix(palette.bg, palette.surface, 50);
228
310
  var stroke = (palette, color) => color ?? palette.border;
229
- var SW = 1.5;
230
311
  var W = PARTICIPANT_BOX_WIDTH;
231
312
  var H = PARTICIPANT_BOX_HEIGHT;
232
- function renderRectParticipant(g, palette, isDark, color, fillMode, w = W, h = H) {
233
- g.append("rect").attr("x", -w / 2).attr("y", 0).attr("width", w).attr("height", h).attr("rx", 2).attr("ry", 2).attr("fill", fill(palette, isDark, color, fillMode)).attr("stroke", stroke(palette, color)).attr("stroke-width", SW);
234
- }
235
- function renderActorParticipant(g, palette, color, h = H) {
236
- const sc = h / H;
237
- const headR = 8 * sc;
238
- const cx = 0;
239
- const headY = 10 * sc;
240
- const bodyTopY = 19 * sc;
241
- const bodyBottomY = h * 0.65;
242
- const legY = h - 2 * sc;
243
- const armY = 24 * sc;
244
- const armSpan = 16 * sc;
245
- const legSpan = 12 * sc;
246
- const s = stroke(palette, color);
247
- const actorSW = Math.max(1.2, 2.5 * sc);
248
- g.append("circle").attr("cx", cx).attr("cy", headY).attr("r", headR).attr("fill", "none").attr("stroke", s).attr("stroke-width", actorSW);
249
- g.append("line").attr("x1", cx).attr("y1", bodyTopY).attr("x2", cx).attr("y2", bodyBottomY).attr("stroke", s).attr("stroke-width", actorSW);
250
- g.append("line").attr("x1", cx - armSpan).attr("y1", armY).attr("x2", cx + armSpan).attr("y2", armY).attr("stroke", s).attr("stroke-width", actorSW);
251
- g.append("line").attr("x1", cx).attr("y1", bodyBottomY).attr("x2", cx - legSpan).attr("y2", legY).attr("stroke", s).attr("stroke-width", actorSW);
252
- g.append("line").attr("x1", cx).attr("y1", bodyBottomY).attr("x2", cx + legSpan).attr("y2", legY).attr("stroke", s).attr("stroke-width", actorSW);
253
- }
254
- function renderDatabaseParticipant(g, palette, isDark, color, fillMode, w = W, h = H) {
255
- const ry = 7;
256
- const topY = ry;
257
- const bodyH = h - ry * 2;
258
- const f = fill(palette, isDark, color, fillMode);
259
- const s = stroke(palette, color);
260
- g.append("ellipse").attr("cx", 0).attr("cy", topY + bodyH).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW);
261
- g.append("rect").attr("class", "participant-body").attr("x", -w / 2).attr("y", topY).attr("width", w).attr("height", bodyH).attr("fill", f).attr("stroke", "none");
262
- g.append("line").attr("x1", -w / 2).attr("y1", topY).attr("x2", -w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW);
263
- g.append("line").attr("x1", w / 2).attr("y1", topY).attr("x2", w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW);
264
- g.append("ellipse").attr("cx", 0).attr("cy", topY).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW);
265
- }
266
- function renderQueueParticipant(g, palette, isDark, color, fillMode, w = W, h = H) {
267
- const rx = 10;
268
- const leftX = -w / 2 + rx;
269
- const bodyW = w - rx * 2;
270
- const f = fill(palette, isDark, color, fillMode);
271
- const s = stroke(palette, color);
272
- g.append("ellipse").attr("cx", leftX + bodyW).attr("cy", h / 2).attr("rx", rx).attr("ry", h / 2).attr("fill", f).attr("stroke", s).attr("stroke-width", SW);
273
- g.append("rect").attr("class", "participant-body").attr("x", leftX).attr("y", 0).attr("width", bodyW).attr("height", h).attr("fill", f).attr("stroke", "none");
274
- g.append("line").attr("x1", leftX).attr("y1", 0).attr("x2", leftX + bodyW).attr("y2", 0).attr("stroke", s).attr("stroke-width", SW);
275
- g.append("line").attr("x1", leftX).attr("y1", h).attr("x2", leftX + bodyW).attr("y2", h).attr("stroke", s).attr("stroke-width", SW);
276
- g.append("ellipse").attr("cx", leftX).attr("cy", h / 2).attr("rx", rx).attr("ry", h / 2).attr("fill", f).attr("stroke", s).attr("stroke-width", SW);
277
- }
278
- function renderCacheParticipant(g, palette, isDark, color, fillMode, w = W, h = H) {
279
- const ry = 7;
280
- const topY = ry;
281
- const bodyH = h - ry * 2;
282
- const f = fill(palette, isDark, color, fillMode);
283
- const s = stroke(palette, color);
284
- const dash = EDGE_DASH;
285
- g.append("ellipse").attr("cx", 0).attr("cy", topY + bodyH).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
286
- g.append("rect").attr("class", "participant-body").attr("x", -w / 2).attr("y", topY).attr("width", w).attr("height", bodyH).attr("fill", f).attr("stroke", "none");
287
- g.append("line").attr("x1", -w / 2).attr("y1", topY).attr("x2", -w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
288
- g.append("line").attr("x1", w / 2).attr("y1", topY).attr("x2", w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
289
- g.append("ellipse").attr("cx", 0).attr("cy", topY).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
313
+ function drawParticipantShape(g, shape, fillColor, strokeColor) {
314
+ for (const part of shape.parts) {
315
+ const el = g.append(part.tag);
316
+ if (part.paint === "body") el.attr("class", "participant-body");
317
+ for (const [name, value] of Object.entries(part.attrs))
318
+ el.attr(name, value);
319
+ if (part.paint === "body") {
320
+ el.attr("fill", fillColor).attr("stroke", "none");
321
+ continue;
322
+ }
323
+ if (part.paint !== "line")
324
+ el.attr("fill", part.paint === "ring" ? "none" : fillColor);
325
+ el.attr("stroke", strokeColor).attr("stroke-width", shape.strokeWidth);
326
+ if (shape.dashed) el.attr("stroke-dasharray", EDGE_DASH);
327
+ }
290
328
  }
291
329
  function groupMessagesBySection(elements, messages) {
292
330
  const groups = [];
@@ -2359,31 +2397,12 @@ function renderParticipant(svg, participant, cx, cy, palette, isDark, color, tag
2359
2397
  g.attr(`data-tag-${tagAttrKey(tagAttr.key)}`, tagAttr.value);
2360
2398
  }
2361
2399
  if (overlaid) return;
2362
- switch (participant.type) {
2363
- case "actor":
2364
- renderActorParticipant(g, palette, color, boxH);
2365
- break;
2366
- case "database":
2367
- renderDatabaseParticipant(
2368
- g,
2369
- palette,
2370
- isDark,
2371
- color,
2372
- fillMode,
2373
- boxW,
2374
- boxH
2375
- );
2376
- break;
2377
- case "queue":
2378
- renderQueueParticipant(g, palette, isDark, color, fillMode, boxW, boxH);
2379
- break;
2380
- case "cache":
2381
- renderCacheParticipant(g, palette, isDark, color, fillMode, boxW, boxH);
2382
- break;
2383
- default:
2384
- renderRectParticipant(g, palette, isDark, color, fillMode, boxW, boxH);
2385
- break;
2386
- }
2400
+ drawParticipantShape(
2401
+ g,
2402
+ participantShape(participant.type, boxW, boxH),
2403
+ fill(palette, isDark, color, fillMode),
2404
+ stroke(palette, color)
2405
+ );
2387
2406
  const isActor = participant.type === "actor";
2388
2407
  const labelLines = splitParticipantLabel(
2389
2408
  participant.label,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatDateLabel
3
- } from "./chunk-EEIGHOJR.js";
3
+ } from "./chunk-YCIOLYWL.js";
4
4
  import {
5
5
  parseTimelineDate
6
6
  } from "./chunk-O3HRF25Z.js";
@@ -8,7 +8,7 @@ import {
8
8
  collapseBarHeight,
9
9
  renderCollapseBar,
10
10
  renderNodeCard
11
- } from "./chunk-LRTSTDJ6.js";
11
+ } from "./chunk-42AZPI2W.js";
12
12
  import {
13
13
  layoutInlineHeader
14
14
  } from "./chunk-REKLKGR6.js";
@@ -95,10 +95,10 @@ import {
95
95
  } from "./chunk-FK6HZYGK.js";
96
96
  import {
97
97
  parseBoxesAndLines
98
- } from "./chunk-SNDCXT5R.js";
98
+ } from "./chunk-D7FHY6DO.js";
99
99
  import {
100
100
  parseDgmoChartType
101
- } from "./chunk-XEMCNQQW.js";
101
+ } from "./chunk-3EDV56HL.js";
102
102
  import {
103
103
  parseRaci
104
104
  } from "./chunk-6PUBFB6D.js";
@@ -118,19 +118,19 @@ import {
118
118
  } from "./chunk-ROH4LYBL.js";
119
119
  import {
120
120
  parseOrg
121
- } from "./chunk-YCIBBVI2.js";
121
+ } from "./chunk-FDVUD3PR.js";
122
122
  import {
123
123
  parseState
124
- } from "./chunk-WXGFB2O2.js";
124
+ } from "./chunk-D6XR22KO.js";
125
125
  import {
126
126
  parseFlowchart
127
- } from "./chunk-IAM3IDL4.js";
127
+ } from "./chunk-A3N4UHHL.js";
128
128
  import {
129
129
  GRAPH_DIAGNOSTICS
130
130
  } from "./chunk-TIVMAITN.js";
131
131
  import {
132
132
  parseERDiagram
133
- } from "./chunk-PSNRB75I.js";
133
+ } from "./chunk-GMJBBFKC.js";
134
134
  import {
135
135
  makeYearContext,
136
136
  parseDateToken,
@@ -142,7 +142,7 @@ import {
142
142
  } from "./chunk-CYTFO2LF.js";
143
143
  import {
144
144
  parseClassDiagram
145
- } from "./chunk-H7DZYHQF.js";
145
+ } from "./chunk-Z6V73LD6.js";
146
146
  import {
147
147
  ARROW_DIAGNOSTIC_CODES
148
148
  } from "./chunk-N7VMGZCU.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-24YPR5EH.js";
4
4
  import {
5
5
  renderCollapseBar
6
- } from "./chunk-LRTSTDJ6.js";
6
+ } from "./chunk-42AZPI2W.js";
7
7
  import {
8
8
  TITLE_FONT_SIZE,
9
9
  TITLE_FONT_WEIGHT,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  drawCylinderCard,
3
3
  drawQueueCard
4
- } from "./chunk-74XR7Z3I.js";
4
+ } from "./chunk-G36XKXWT.js";
5
5
  import {
6
6
  CYLINDER_RY,
7
7
  FILE_WAVE,
8
8
  QUEUE_CAP
9
- } from "./chunk-V3ICBS2O.js";
9
+ } from "./chunk-VTGGPBLW.js";
10
10
  import {
11
11
  WHITEBOARD_COLORS,
12
12
  WHITEBOARD_NOTE_COLOR
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-24YPR5EH.js";
10
10
  import {
11
11
  renderCollapseBar
12
- } from "./chunk-LRTSTDJ6.js";
12
+ } from "./chunk-42AZPI2W.js";
13
13
  import {
14
14
  TITLE_FONT_SIZE,
15
15
  TITLE_FONT_WEIGHT
@@ -5,7 +5,7 @@ import {
5
5
  NOTE_GAP,
6
6
  noteBoxSize,
7
7
  noteConnectorPoints
8
- } from "./chunk-CLW45YKE.js";
8
+ } from "./chunk-DA2GIHAY.js";
9
9
  import {
10
10
  extractColor,
11
11
  measureIndent
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-24YPR5EH.js";
14
14
  import {
15
15
  renderCollapseBar
16
- } from "./chunk-LRTSTDJ6.js";
16
+ } from "./chunk-42AZPI2W.js";
17
17
  import {
18
18
  INLINE_HEADER_PAD,
19
19
  layoutInlineHeader
@@ -0,0 +1,14 @@
1
+ // src/shape-caps.ts
2
+ var CYLINDER_RY = 8;
3
+ var QUEUE_CAP = 16;
4
+ var FILE_WAVE = 10;
5
+ var SEQUENCE_CYLINDER_RY = 7;
6
+ var SEQUENCE_QUEUE_CAP = 10;
7
+
8
+ export {
9
+ CYLINDER_RY,
10
+ QUEUE_CAP,
11
+ FILE_WAVE,
12
+ SEQUENCE_CYLINDER_RY,
13
+ SEQUENCE_QUEUE_CAP
14
+ };
@@ -1,11 +1,12 @@
1
1
  import {
2
- edgeSplinePath
3
- } from "./chunk-26EVL454.js";
2
+ edgeSplinePath,
3
+ renderGraphTitle
4
+ } from "./chunk-F4DGHT3F.js";
4
5
  import {
5
6
  NODE_LABEL_LINE_HEIGHT,
6
7
  layoutGraph,
7
8
  wrapNodeLabel
8
- } from "./chunk-6S2H6EKN.js";
9
+ } from "./chunk-ZXPSNBZC.js";
9
10
  import {
10
11
  appendArrowheadMarkers
11
12
  } from "./chunk-XBJJP2HN.js";
@@ -25,7 +26,6 @@ import {
25
26
  } from "./chunk-REKLKGR6.js";
26
27
  import {
27
28
  TITLE_FONT_SIZE,
28
- TITLE_FONT_WEIGHT,
29
29
  TITLE_Y
30
30
  } from "./chunk-GULGSH2Z.js";
31
31
  import {
@@ -37,15 +37,11 @@ import {
37
37
  } from "./chunk-WH6E6SHC.js";
38
38
  import {
39
39
  parseFlowchart
40
- } from "./chunk-IAM3IDL4.js";
40
+ } from "./chunk-A3N4UHHL.js";
41
41
  import {
42
- NOTE_BADGE_RADIUS,
43
42
  NOTE_FONT_SIZE,
44
- noteConnectorPoints,
45
- renderNoteBadge,
46
- renderNoteBox,
47
- renderNoteConnector
48
- } from "./chunk-CLW45YKE.js";
43
+ renderNodeNote
44
+ } from "./chunk-DA2GIHAY.js";
49
45
  import {
50
46
  FONT_FAMILY
51
47
  } from "./chunk-ICLB27PZ.js";
@@ -388,20 +384,16 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
388
384
  colors: edgeColors
389
385
  });
390
386
  if (showTitle) {
391
- const titleEl = svg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", sTitleY).attr("text-anchor", header.titleAnchor).attr("fill", palette.text).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).style(
392
- "cursor",
393
- onClickItem && graph.titleLineNumber ? "pointer" : "default"
394
- ).text(graph.title);
395
- if (graph.titleLineNumber) {
396
- titleEl.attr("data-line-number", graph.titleLineNumber);
397
- if (onClickItem) {
398
- titleEl.on("click", () => onClickItem(graph.titleLineNumber)).on("mouseenter", function() {
399
- d3Selection.select(this).attr("opacity", 0.7);
400
- }).on("mouseleave", function() {
401
- d3Selection.select(this).attr("opacity", 1);
402
- });
403
- }
404
- }
387
+ renderGraphTitle(svg, {
388
+ title: graph.title ?? "",
389
+ titleLineNumber: graph.titleLineNumber,
390
+ x: header.titleX,
391
+ y: sTitleY,
392
+ anchor: header.titleAnchor,
393
+ fontSize: sTitleFontSize,
394
+ color: palette.text,
395
+ onClickItem
396
+ });
405
397
  }
406
398
  const contentG = svg.append("g").attr("transform", `translate(${offsetX}, ${offsetY}) scale(${scale})`);
407
399
  const LABEL_PAD = 8;
@@ -558,43 +550,7 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
558
550
  });
559
551
  }
560
552
  if (hasNote && node.note) {
561
- if (node.note.collapsed) {
562
- renderNoteBadge(
563
- nodeG,
564
- {
565
- x: node.width / 2 - NOTE_BADGE_RADIUS - 3,
566
- y: -node.height / 2 + NOTE_BADGE_RADIUS + 3
567
- },
568
- palette,
569
- {
570
- isDark,
571
- ...node.note.color && { color: node.note.color },
572
- lineNumber: node.note.lineNumber,
573
- endLineNumber: node.note.endLineNumber
574
- }
575
- );
576
- } else {
577
- const [cx1, cy1, cx2, cy2] = noteConnectorPoints(node, node.note);
578
- renderNoteConnector(nodeG, cx1, cy1, cx2, cy2, palette);
579
- renderNoteBox(
580
- nodeG,
581
- {
582
- x: node.note.x,
583
- y: node.note.y,
584
- width: node.note.width,
585
- height: node.note.height
586
- },
587
- node.note.lines,
588
- palette,
589
- {
590
- isDark,
591
- ...node.note.color && { color: node.note.color },
592
- lineNumber: node.note.lineNumber,
593
- endLineNumber: node.note.endLineNumber,
594
- interactive: true
595
- }
596
- );
597
- }
553
+ renderNodeNote(nodeG, node, node.note, palette, isDark);
598
554
  }
599
555
  }
600
556
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-XSVWUOUZ.js";
4
4
  import {
5
5
  renderCollapseBar
6
- } from "./chunk-LRTSTDJ6.js";
6
+ } from "./chunk-42AZPI2W.js";
7
7
  import {
8
8
  layoutInlineHeader
9
9
  } from "./chunk-REKLKGR6.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-C6ME2L4T.js";
5
5
  import {
6
6
  computeNodeSize
7
- } from "./chunk-CUOMNKYW.js";
7
+ } from "./chunk-BWVJTYTJ.js";
8
8
  import {
9
9
  NODE_HEIGHT,
10
10
  NODE_WIDTH
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-24YPR5EH.js";
20
20
  import {
21
21
  renderCollapseBar
22
- } from "./chunk-LRTSTDJ6.js";
22
+ } from "./chunk-42AZPI2W.js";
23
23
  import {
24
24
  layoutInlineHeader
25
25
  } from "./chunk-REKLKGR6.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-24YPR5EH.js";
20
20
  import {
21
21
  renderCollapseBar
22
- } from "./chunk-LRTSTDJ6.js";
22
+ } from "./chunk-42AZPI2W.js";
23
23
  import {
24
24
  EDGE_DASH,
25
25
  GRID_DASH,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  resolveNotes,
6
6
  tryCollectNote
7
- } from "./chunk-4TK26YHH.js";
7
+ } from "./chunk-UWWQECLC.js";
8
8
  import {
9
9
  displayName,
10
10
  normalizeName
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  searchPlacement
3
- } from "./chunk-7ASVGFW3.js";
3
+ } from "./chunk-NHN6GBG7.js";
4
4
  import {
5
5
  noteCanvasShift,
6
6
  placeNotes,
7
7
  resolveNotes
8
- } from "./chunk-4TK26YHH.js";
8
+ } from "./chunk-UWWQECLC.js";
9
9
  import {
10
10
  noteBoxSize
11
- } from "./chunk-CLW45YKE.js";
11
+ } from "./chunk-DA2GIHAY.js";
12
12
 
13
13
  // src/graph/layout.ts
14
14
  import dagre from "@dagrejs/dagre";
@@ -6,7 +6,7 @@ import {
6
6
  isExtendedChartType,
7
7
  knownChartTypeIds,
8
8
  parseDgmo
9
- } from "./chunk-2FMOLWX4.js";
9
+ } from "./chunk-Q6OKTHYL.js";
10
10
  import "./chunk-WPYJAHRP.js";
11
11
  import "./chunk-EOYPX6SF.js";
12
12
  import "./chunk-DKMZ4VMV.js";
@@ -43,36 +43,36 @@ import "./chunk-RC6PISCK.js";
43
43
  import "./chunk-XSVWUOUZ.js";
44
44
  import "./chunk-FK6HZYGK.js";
45
45
  import "./chunk-453IWXZ3.js";
46
- import "./chunk-SNDCXT5R.js";
46
+ import "./chunk-D7FHY6DO.js";
47
47
  import {
48
48
  looksLikeC4,
49
49
  looksLikeGantt,
50
50
  parseDgmoChartType
51
- } from "./chunk-XEMCNQQW.js";
51
+ } from "./chunk-3EDV56HL.js";
52
52
  import "./chunk-6PUBFB6D.js";
53
53
  import "./chunk-KMB754DO.js";
54
54
  import "./chunk-CUTEHGXO.js";
55
55
  import "./chunk-2SKMEL7V.js";
56
56
  import "./chunk-65JFUANT.js";
57
57
  import "./chunk-ROH4LYBL.js";
58
- import "./chunk-YCIBBVI2.js";
59
- import "./chunk-WXGFB2O2.js";
58
+ import "./chunk-FDVUD3PR.js";
59
+ import "./chunk-D6XR22KO.js";
60
60
  import "./chunk-EQW6HOP4.js";
61
- import "./chunk-IAM3IDL4.js";
61
+ import "./chunk-A3N4UHHL.js";
62
62
  import "./chunk-TIVMAITN.js";
63
63
  import "./chunk-NXMESY4J.js";
64
- import "./chunk-PSNRB75I.js";
64
+ import "./chunk-GMJBBFKC.js";
65
65
  import "./chunk-MKSTL6DR.js";
66
66
  import "./chunk-CYTFO2LF.js";
67
67
  import "./chunk-C3Z4DX3V.js";
68
68
  import "./chunk-IYULMRBE.js";
69
- import "./chunk-H7DZYHQF.js";
69
+ import "./chunk-Z6V73LD6.js";
70
70
  import "./chunk-GXCDD6NG.js";
71
71
  import "./chunk-FMAVHTYB.js";
72
72
  import "./chunk-N7VMGZCU.js";
73
- import "./chunk-4TK26YHH.js";
73
+ import "./chunk-UWWQECLC.js";
74
74
  import "./chunk-NOTA6TEI.js";
75
- import "./chunk-CLW45YKE.js";
75
+ import "./chunk-DA2GIHAY.js";
76
76
  import "./chunk-7WEYXYLC.js";
77
77
  import "./chunk-QKPOIJBT.js";
78
78
  import "./chunk-ICLB27PZ.js";
@@ -2,13 +2,13 @@ import {
2
2
  extractSymbols,
3
3
  looksLikeFlowchart,
4
4
  parseFlowchart
5
- } from "./chunk-IAM3IDL4.js";
5
+ } from "./chunk-A3N4UHHL.js";
6
6
  import "./chunk-TIVMAITN.js";
7
7
  import "./chunk-NXMESY4J.js";
8
8
  import "./chunk-N7VMGZCU.js";
9
- import "./chunk-4TK26YHH.js";
9
+ import "./chunk-UWWQECLC.js";
10
10
  import "./chunk-NOTA6TEI.js";
11
- import "./chunk-CLW45YKE.js";
11
+ import "./chunk-DA2GIHAY.js";
12
12
  import "./chunk-7WEYXYLC.js";
13
13
  import "./chunk-QKPOIJBT.js";
14
14
  import "./chunk-ICLB27PZ.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  renderFlowchart,
3
3
  renderFlowchartForExport
4
- } from "./chunk-44RLIAYC.js";
5
- import "./chunk-26EVL454.js";
6
- import "./chunk-6S2H6EKN.js";
7
- import "./chunk-7ASVGFW3.js";
4
+ } from "./chunk-VUBCCY65.js";
5
+ import "./chunk-F4DGHT3F.js";
6
+ import "./chunk-ZXPSNBZC.js";
7
+ import "./chunk-NHN6GBG7.js";
8
8
  import "./chunk-XBJJP2HN.js";
9
- import "./chunk-7TEAFIEJ.js";
9
+ import "./chunk-XPOEE2RW.js";
10
10
  import "./chunk-C6ME2L4T.js";
11
- import "./chunk-CUOMNKYW.js";
11
+ import "./chunk-BWVJTYTJ.js";
12
12
  import "./chunk-WTTIODDV.js";
13
13
  import "./chunk-4NMRS6HW.js";
14
14
  import "./chunk-K7RRXZHS.js";
@@ -17,13 +17,13 @@ import "./chunk-24YPR5EH.js";
17
17
  import "./chunk-REKLKGR6.js";
18
18
  import "./chunk-GULGSH2Z.js";
19
19
  import "./chunk-WH6E6SHC.js";
20
- import "./chunk-IAM3IDL4.js";
20
+ import "./chunk-A3N4UHHL.js";
21
21
  import "./chunk-TIVMAITN.js";
22
22
  import "./chunk-NXMESY4J.js";
23
23
  import "./chunk-N7VMGZCU.js";
24
- import "./chunk-4TK26YHH.js";
24
+ import "./chunk-UWWQECLC.js";
25
25
  import "./chunk-NOTA6TEI.js";
26
- import "./chunk-CLW45YKE.js";
26
+ import "./chunk-DA2GIHAY.js";
27
27
  import "./chunk-7WEYXYLC.js";
28
28
  import "./chunk-QKPOIJBT.js";
29
29
  import "./chunk-ICLB27PZ.js";