@diagrammo/dgmo 0.56.0 → 0.57.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 (128) hide show
  1. package/dist/advanced.js +138 -138
  2. package/dist/auto.css +24 -0
  3. package/dist/auto.js +139 -115
  4. package/dist/auto.mjs +177 -104
  5. package/dist/block.css +24 -0
  6. package/dist/block.d.ts +12 -0
  7. package/dist/block.js +55 -26
  8. package/dist/chart-meta.js +21 -21
  9. package/dist/{charts-d3-D67V6KHE.js → charts-d3-Z6FOKUAL.js} +4 -4
  10. package/dist/{chunk-SOBGK35Z.js → chunk-3D6LDLIH.js} +8 -8
  11. package/dist/{chunk-A4DAZO3U.js → chunk-3G7BCZ4J.js} +12 -12
  12. package/dist/{chunk-R7ECJQTB.js → chunk-3M6MKHIQ.js} +3 -3
  13. package/dist/{chunk-UZ6L5VQJ.js → chunk-3NSOKT7C.js} +3 -3
  14. package/dist/{chunk-23THM67F.js → chunk-3ZONSZOX.js} +5 -5
  15. package/dist/{chunk-QDOYT6UW.js → chunk-44GBBTMU.js} +4 -4
  16. package/dist/{chunk-D3WTEBGT.js → chunk-46NVO5UA.js} +2 -2
  17. package/dist/{chunk-KIGV66SP.js → chunk-57RE4N22.js} +6 -6
  18. package/dist/{chunk-U7ZQTUZT.js → chunk-5LBCOFA5.js} +4 -4
  19. package/dist/{chunk-2JMNOEAU.js → chunk-6DR2GMDM.js} +59 -59
  20. package/dist/{chunk-OWLGERJL.js → chunk-6HSRT6WI.js} +6 -6
  21. package/dist/{chunk-HODUM6LY.js → chunk-6PRLPGJB.js} +10 -10
  22. package/dist/{chunk-ZMMYCERO.js → chunk-7Q35X3AL.js} +2 -2
  23. package/dist/{chunk-HPJITTF7.js → chunk-7YPSFQFA.js} +14 -14
  24. package/dist/{chunk-HKKPUUNK.js → chunk-A6XELFU6.js} +10 -10
  25. package/dist/{chunk-Y2L2LET6.js → chunk-ADKDIWCW.js} +4 -4
  26. package/dist/{chunk-NVQXIDLE.js → chunk-BIWMOFSE.js} +7 -7
  27. package/dist/{chunk-GG7TK3IA.js → chunk-BQLJAYVB.js} +5 -5
  28. package/dist/{chunk-KSPCR75O.js → chunk-CQJ5SE5T.js} +6 -6
  29. package/dist/{chunk-VU3DOZ6C.js → chunk-D76B4DMV.js} +4 -4
  30. package/dist/{chunk-GUVVQW3Y.js → chunk-FMPYKUKI.js} +6 -6
  31. package/dist/{chunk-3R67RRPC.js → chunk-G3L4GWLA.js} +7 -7
  32. package/dist/{chunk-U2BKSEKU.js → chunk-H52HJ26L.js} +2 -2
  33. package/dist/{chunk-JXFB3APA.js → chunk-HBRGNLF5.js} +13 -13
  34. package/dist/{chunk-YWPWRR7W.js → chunk-INU6ANOH.js} +2 -2
  35. package/dist/{chunk-5ZDHXS5N.js → chunk-J6V3SMR3.js} +9 -9
  36. package/dist/{chunk-ULONXAOD.js → chunk-K2GDF2ZR.js} +6 -6
  37. package/dist/{chunk-HOPTF3ZP.js → chunk-KH74OWHU.js} +7 -7
  38. package/dist/{chunk-HIMDUQT7.js → chunk-KRKU6WRS.js} +6 -6
  39. package/dist/{chunk-5HWPEYWB.js → chunk-LDVUPGWC.js} +2 -2
  40. package/dist/{chunk-SK7PCW4F.js → chunk-LSFZDBAP.js} +2 -2
  41. package/dist/{chunk-W2I2EXSC.js → chunk-LZX3RLRP.js} +14 -14
  42. package/dist/{chunk-N2KO445N.js → chunk-M3IYDSI7.js} +15 -15
  43. package/dist/{chunk-JE3SMHRZ.js → chunk-M65UOFJA.js} +9 -9
  44. package/dist/{chunk-FXVPSTDT.js → chunk-MXDT446P.js} +4 -4
  45. package/dist/chunk-NCT22MOD.js +93 -0
  46. package/dist/{chunk-FCA2UGJT.js → chunk-NIUE5VWY.js} +4 -4
  47. package/dist/{chunk-BR2VSKHI.js → chunk-OFEUXZPI.js} +4 -4
  48. package/dist/{chunk-CQOC2MD6.js → chunk-ORZQVUGW.js} +17 -16
  49. package/dist/{chunk-YH62K5D4.js → chunk-OYCIVSL3.js} +13 -13
  50. package/dist/{chunk-RBIX3HQQ.js → chunk-PKFW6GJD.js} +9 -9
  51. package/dist/{chunk-AIH6M5J6.js → chunk-PRKPFRC2.js} +3 -3
  52. package/dist/{chunk-XN4ZSACM.js → chunk-PUGUOFM6.js} +7 -7
  53. package/dist/{chunk-YM2ZQIVG.js → chunk-Q772PVKH.js} +9 -17
  54. package/dist/{chunk-RK3Y4WMV.js → chunk-QMOX5I3G.js} +13 -13
  55. package/dist/{chunk-2UZVMWSQ.js → chunk-RB4HOOKP.js} +4 -4
  56. package/dist/{chunk-AOJJSGXE.js → chunk-SADYIA5Q.js} +7 -7
  57. package/dist/{chunk-PECYPUJJ.js → chunk-SFVG4AIG.js} +6 -6
  58. package/dist/{chunk-P6XFQVYY.js → chunk-SQWWYGPT.js} +16 -16
  59. package/dist/{chunk-AN465MXC.js → chunk-SZCZOA2L.js} +2 -2
  60. package/dist/{chunk-VKN7YW4Q.js → chunk-T2VMOWAM.js} +6 -6
  61. package/dist/{chunk-HE57UQHL.js → chunk-TZ72UBOA.js} +4 -4
  62. package/dist/{chunk-C3BWDEYN.js → chunk-U3DGAE7L.js} +7 -7
  63. package/dist/{chunk-WK3UFCZC.js → chunk-U4FSWAOJ.js} +11 -11
  64. package/dist/{chunk-AMC2OGXF.js → chunk-UG4MWUXE.js} +13 -13
  65. package/dist/{chunk-UU6LUYUH.js → chunk-VJARCVMH.js} +2 -2
  66. package/dist/{chunk-YG5KQ55U.js → chunk-VS7DGDT3.js} +12 -20
  67. package/dist/{chunk-GDGOVO2I.js → chunk-VYCV5WKH.js} +21 -21
  68. package/dist/{chunk-3HDBAXF5.js → chunk-WGC42WJU.js} +8 -1
  69. package/dist/{chunk-YJUF2N3C.js → chunk-X3ON4M5S.js} +9 -9
  70. package/dist/{chunk-WFX6AUQO.js → chunk-XBTJJLAU.js} +6 -1
  71. package/dist/cli.cjs +137 -137
  72. package/dist/cloud-reference.d.ts +69 -0
  73. package/dist/cloud-reference.js +49 -0
  74. package/dist/{dgmo-router-GSWUPLP2.js → dgmo-router-PMEKTIJ7.js} +17 -17
  75. package/dist/{dimensions-PLECMFTR.js → dimensions-XRWIPAFO.js} +5 -5
  76. package/dist/element.js +140 -116
  77. package/dist/element.mjs +177 -104
  78. package/dist/{flowchart-renderer-UQVXOUW4.js → flowchart-renderer-JGLZB5P5.js} +9 -9
  79. package/dist/index.js +27 -27
  80. package/dist/{layout-UXMNKETK.js → layout-5CX27X7I.js} +6 -5
  81. package/dist/{layout-HIK4ZJFQ.js → layout-AO3TPZUS.js} +3 -3
  82. package/dist/{layout-WDXNSQQF.js → layout-AQXLQVAJ.js} +4 -4
  83. package/dist/{layout-A5UVXINF.js → layout-EQTOVNEE.js} +4 -4
  84. package/dist/{layout-2BJDECLZ.js → layout-NU5LQ4UP.js} +7 -6
  85. package/dist/{layout-UFZQI6SX.js → layout-RIS5VTGL.js} +7 -6
  86. package/dist/{layout-3XFPPFXI.js → layout-TCWNJ2OZ.js} +7 -6
  87. package/dist/{layout-QRVYYYZ3.js → layout-TZKPVXKJ.js} +3 -3
  88. package/dist/{layout-SNIEAZ2I.js → layout-WHOOLGPO.js} +4 -4
  89. package/dist/{layout-search-I4VNIRGT.js → layout-search-6CVR2MTZ.js} +7 -6
  90. package/dist/{parser-LNEAHGXF.js → parser-5WMH55UA.js} +4 -4
  91. package/dist/{parser-GGCDY65M.js → parser-DTXM5ROT.js} +2 -2
  92. package/dist/{parser-LQDEU22S.js → parser-IQLLBMBQ.js} +3 -3
  93. package/dist/{parser-VVTCMQWY.js → parser-LMNFVTIV.js} +3 -3
  94. package/dist/{parser-JWAGGYLL.js → parser-XQNM7BGD.js} +3 -3
  95. package/dist/{renderer-I5MAFUKX.js → renderer-2TEGR3RX.js} +6 -6
  96. package/dist/{renderer-5CU6GYF2.js → renderer-3WYLLPQL.js} +7 -7
  97. package/dist/{renderer-JNC6VJMN.js → renderer-5BFS4NBL.js} +7 -7
  98. package/dist/{renderer-FRBPMKPP.js → renderer-6OFPEBHG.js} +6 -6
  99. package/dist/{renderer-O4ECS2BI.js → renderer-AK2X3VRY.js} +9 -9
  100. package/dist/{renderer-TOKGYFTG.js → renderer-B6XOO6EE.js} +5 -5
  101. package/dist/{renderer-P7O6OUYC.js → renderer-BNEO5W3E.js} +9 -9
  102. package/dist/{renderer-YVCD55ZX.js → renderer-BZZKS7KQ.js} +8 -8
  103. package/dist/{renderer-52S6JM5R.js → renderer-EJ3FETD2.js} +8 -8
  104. package/dist/{renderer-DZ5N6BHW.js → renderer-FQLFE3TQ.js} +5 -5
  105. package/dist/{renderer-J5TL5ZX4.js → renderer-HDLM6OY6.js} +13 -13
  106. package/dist/{renderer-4VLQKKTV.js → renderer-I2P5FTZ2.js} +12 -12
  107. package/dist/{renderer-3IETIUZB.js → renderer-IAJMS5U5.js} +7 -7
  108. package/dist/{renderer-KUIZNLAQ.js → renderer-JHYUK5TN.js} +5 -5
  109. package/dist/{renderer-CL4SAUA5.js → renderer-KXMKAXPQ.js} +5 -5
  110. package/dist/{renderer-Q3A7572V.js → renderer-LMLSA457.js} +5 -5
  111. package/dist/{renderer-J5MMVCGN.js → renderer-LNOBG226.js} +7 -7
  112. package/dist/{renderer-WWC5VGHH.js → renderer-LRQ3OPNJ.js} +6 -6
  113. package/dist/{renderer-YWYX6WAI.js → renderer-LU4R3BP2.js} +3 -3
  114. package/dist/{renderer-OZIPP7VF.js → renderer-N4V7XVC3.js} +10 -10
  115. package/dist/{renderer-SYT4L7GE.js → renderer-ND7YIUHD.js} +3 -3
  116. package/dist/{renderer-IWNHBIZ6.js → renderer-NKVIQA3C.js} +4 -4
  117. package/dist/{renderer-2NU7M5PN.js → renderer-PLRNQ6T3.js} +7 -7
  118. package/dist/{renderer-M6AFKVLS.js → renderer-Q6TJ52B4.js} +5 -5
  119. package/dist/{renderer-53FU55KK.js → renderer-TIIHLRMM.js} +5 -5
  120. package/dist/{renderer-5G3PORFD.js → renderer-VWBNIZV3.js} +8 -8
  121. package/dist/{renderer-QRX7Q2YN.js → renderer-W3JK5YVD.js} +6 -6
  122. package/dist/{renderer-CB2DOQ2O.js → renderer-W5GF5USI.js} +5 -5
  123. package/dist/{renderer-MLDGFZDW.js → renderer-XKMG3SYD.js} +6 -6
  124. package/dist/{renderer-CRAIC4ER.js → renderer-XSZ5MUIF.js} +6 -6
  125. package/dist/{renderer-radial-QG644QYY.js → renderer-radial-LZAPQVM5.js} +6 -6
  126. package/dist/{state-renderer-NKV5B3KH.js → state-renderer-KSAKMFQ2.js} +11 -11
  127. package/package.json +5 -1
  128. package/dist/chunk-BMR4CIEO.js +0 -41
package/dist/element.mjs CHANGED
@@ -9677,88 +9677,6 @@ var init_constants = __esm({
9677
9677
  }
9678
9678
  });
9679
9679
 
9680
- // src/utils/wrapped-desc.ts
9681
- function wrapDescriptionLines(lines, charsPerLine, lengthFn = (s) => s.length) {
9682
- const result = [];
9683
- for (const line11 of lines) {
9684
- if (!line11.startsWith(BULLET_PREFIX)) {
9685
- const wrapped2 = wrapPlainLine(line11, charsPerLine, lengthFn);
9686
- for (const w of wrapped2) result.push({ text: w, kind: "plain" });
9687
- continue;
9688
- }
9689
- const body = line11.slice(BULLET_PREFIX.length);
9690
- const bodyLimit = Math.max(8, charsPerLine - BULLET_INDENT_CHARS);
9691
- const wrapped = wrapPlainLine(body, bodyLimit, lengthFn);
9692
- wrapped.forEach((w, i) => {
9693
- result.push({ text: w, kind: i === 0 ? "bullet-first" : "bullet-cont" });
9694
- });
9695
- }
9696
- return result;
9697
- }
9698
- function wrapPlainLine(line11, charsPerLine, lengthFn) {
9699
- const words = line11.split(/\s+/);
9700
- const result = [];
9701
- let current = "";
9702
- for (const word of words) {
9703
- const test = current ? `${current} ${word}` : word;
9704
- if (lengthFn(test) > charsPerLine && current) {
9705
- result.push(current);
9706
- current = word;
9707
- } else {
9708
- current = test;
9709
- }
9710
- }
9711
- if (current) result.push(current);
9712
- return result;
9713
- }
9714
- var BULLET_PREFIX, BULLET_INDENT_CHARS;
9715
- var init_wrapped_desc = __esm({
9716
- "src/utils/wrapped-desc.ts"() {
9717
- "use strict";
9718
- BULLET_PREFIX = "\u2022 ";
9719
- BULLET_INDENT_CHARS = 2;
9720
- }
9721
- });
9722
-
9723
- // src/utils/note-box/metrics.ts
9724
- function normalizeBulletLine(line11) {
9725
- return line11.replace(/^\s*[-*]\s+/, "\u2022 ");
9726
- }
9727
- function wrapNoteBody(body, textMaxWidth, fontSize = NOTE_FONT_SIZE) {
9728
- const sourceLines = body.split("\n").map(normalizeBulletLine);
9729
- return wrapDescriptionLines(
9730
- sourceLines,
9731
- textMaxWidth,
9732
- (s) => measureText(s, fontSize)
9733
- );
9734
- }
9735
- function noteBoxSize(body, opts = {}) {
9736
- const fontSize = opts.fontSize ?? NOTE_FONT_SIZE;
9737
- const maxW = opts.maxW ?? NOTE_MAX_W;
9738
- const textMaxWidth = maxW - NOTE_PAD_H * 2;
9739
- const lines = wrapNoteBody(body, textMaxWidth, fontSize);
9740
- let maxLineW = 0;
9741
- for (const line11 of lines) {
9742
- const indent = line11.kind === "plain" ? 0 : NOTE_BULLET_INDENT;
9743
- const w = measureText(line11.text, fontSize) + indent;
9744
- if (w > maxLineW) maxLineW = w;
9745
- }
9746
- const width = Math.min(
9747
- maxW,
9748
- Math.max(80, maxLineW + NOTE_PAD_H * 2 + NOTE_FOLD)
9749
- );
9750
- const height = Math.max(1, lines.length) * NOTE_LINE_H + NOTE_PAD_V * 2;
9751
- return { width, height, lines };
9752
- }
9753
- var init_metrics = __esm({
9754
- "src/utils/note-box/metrics.ts"() {
9755
- "use strict";
9756
- init_wrapped_desc();
9757
- init_text_measure();
9758
- init_constants();
9759
- }
9760
- });
9761
-
9762
9680
  // src/utils/safe-href.ts
9763
9681
  function safeHref(url) {
9764
9682
  if (typeof url !== "string") return null;
@@ -9818,6 +9736,12 @@ function truncateBareUrl(url) {
9818
9736
  if (stripped.length <= BARE_URL_MAX_DISPLAY) return stripped;
9819
9737
  return stripped.slice(0, BARE_URL_MAX_DISPLAY - 1) + "\u2026";
9820
9738
  }
9739
+ function stripInlineMarkdown(text) {
9740
+ return text.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1").replace(
9741
+ /https?:\/\/[^\s)>\]]+|www\.[^\s)>\]]+/g,
9742
+ (u) => truncateBareUrl(u)
9743
+ ).replace(/\*\*|__|[*_`]/g, "");
9744
+ }
9821
9745
  function renderInlineText(textEl, text, palette, fontSize) {
9822
9746
  const spans = parseInlineMarkdown(text);
9823
9747
  for (const span of spans) {
@@ -9851,6 +9775,137 @@ var init_inline_markdown = __esm({
9851
9775
  }
9852
9776
  });
9853
9777
 
9778
+ // src/utils/wrapped-desc.ts
9779
+ function reflowDescriptionLines(lines) {
9780
+ const blocks = [];
9781
+ let open = null;
9782
+ let gapPending = false;
9783
+ let breakPending = false;
9784
+ const openBlock = (kind, text) => {
9785
+ const block = {
9786
+ kind,
9787
+ segments: [text],
9788
+ gapBefore: gapPending && blocks.length > 0
9789
+ };
9790
+ blocks.push(block);
9791
+ gapPending = false;
9792
+ return block;
9793
+ };
9794
+ for (const raw of lines) {
9795
+ const line11 = raw.trimEnd();
9796
+ if (!line11) {
9797
+ open = null;
9798
+ breakPending = false;
9799
+ gapPending = blocks.length > 0;
9800
+ continue;
9801
+ }
9802
+ const hard = line11.endsWith(HARD_BREAK);
9803
+ const text = hard ? line11.slice(0, -1).trimEnd() : line11;
9804
+ if (!text) {
9805
+ breakPending = hard;
9806
+ continue;
9807
+ }
9808
+ if (text.startsWith(BULLET_PREFIX)) {
9809
+ open = openBlock("bullet", text.slice(BULLET_PREFIX.length));
9810
+ } else if (open) {
9811
+ if (breakPending) open.segments.push(text);
9812
+ else open.segments[open.segments.length - 1] += ` ${text}`;
9813
+ } else {
9814
+ open = openBlock("plain", text);
9815
+ }
9816
+ breakPending = hard;
9817
+ }
9818
+ return blocks;
9819
+ }
9820
+ function wrapDescriptionLines(lines, charsPerLine, lengthFn = (s) => s.length) {
9821
+ const measure = (s) => lengthFn(stripInlineMarkdown(s));
9822
+ const result = [];
9823
+ for (const block of reflowDescriptionLines(lines)) {
9824
+ if (block.gapBefore && result.length > 0)
9825
+ result.push({ text: "", kind: "plain" });
9826
+ if (block.kind === "plain") {
9827
+ for (const segment of block.segments)
9828
+ for (const w of wrapPlainLine(segment, charsPerLine, measure))
9829
+ result.push({ text: w, kind: "plain" });
9830
+ continue;
9831
+ }
9832
+ const bodyLimit = Math.max(8, charsPerLine - BULLET_INDENT_CHARS);
9833
+ let first = true;
9834
+ for (const segment of block.segments) {
9835
+ for (const w of wrapPlainLine(segment, bodyLimit, measure)) {
9836
+ result.push({ text: w, kind: first ? "bullet-first" : "bullet-cont" });
9837
+ first = false;
9838
+ }
9839
+ }
9840
+ }
9841
+ return result;
9842
+ }
9843
+ function wrapPlainLine(line11, charsPerLine, lengthFn) {
9844
+ const words = line11.split(/\s+/);
9845
+ const result = [];
9846
+ let current = "";
9847
+ for (const word of words) {
9848
+ const test = current ? `${current} ${word}` : word;
9849
+ if (lengthFn(test) > charsPerLine && current) {
9850
+ result.push(current);
9851
+ current = word;
9852
+ } else {
9853
+ current = test;
9854
+ }
9855
+ }
9856
+ if (current) result.push(current);
9857
+ return result;
9858
+ }
9859
+ var BULLET_PREFIX, BULLET_INDENT_CHARS, HARD_BREAK;
9860
+ var init_wrapped_desc = __esm({
9861
+ "src/utils/wrapped-desc.ts"() {
9862
+ "use strict";
9863
+ init_inline_markdown();
9864
+ BULLET_PREFIX = "\u2022 ";
9865
+ BULLET_INDENT_CHARS = 2;
9866
+ HARD_BREAK = "\\";
9867
+ }
9868
+ });
9869
+
9870
+ // src/utils/note-box/metrics.ts
9871
+ function normalizeBulletLine(line11) {
9872
+ return line11.replace(/^\s*[-*]\s+/, "\u2022 ");
9873
+ }
9874
+ function wrapNoteBody(body, textMaxWidth, fontSize = NOTE_FONT_SIZE) {
9875
+ const sourceLines = body.split("\n").map(normalizeBulletLine);
9876
+ return wrapDescriptionLines(
9877
+ sourceLines,
9878
+ textMaxWidth,
9879
+ (s) => measureText(s, fontSize)
9880
+ );
9881
+ }
9882
+ function noteBoxSize(body, opts = {}) {
9883
+ const fontSize = opts.fontSize ?? NOTE_FONT_SIZE;
9884
+ const maxW = opts.maxW ?? NOTE_MAX_W;
9885
+ const textMaxWidth = maxW - NOTE_PAD_H * 2;
9886
+ const lines = wrapNoteBody(body, textMaxWidth, fontSize);
9887
+ let maxLineW = 0;
9888
+ for (const line11 of lines) {
9889
+ const indent = line11.kind === "plain" ? 0 : NOTE_BULLET_INDENT;
9890
+ const w = measureText(line11.text, fontSize) + indent;
9891
+ if (w > maxLineW) maxLineW = w;
9892
+ }
9893
+ const width = Math.min(
9894
+ maxW,
9895
+ Math.max(80, maxLineW + NOTE_PAD_H * 2 + NOTE_FOLD)
9896
+ );
9897
+ const height = Math.max(1, lines.length) * NOTE_LINE_H + NOTE_PAD_V * 2;
9898
+ return { width, height, lines };
9899
+ }
9900
+ var init_metrics = __esm({
9901
+ "src/utils/note-box/metrics.ts"() {
9902
+ "use strict";
9903
+ init_wrapped_desc();
9904
+ init_text_measure();
9905
+ init_constants();
9906
+ }
9907
+ });
9908
+
9854
9909
  // src/utils/note-box/svg.ts
9855
9910
  function renderNoteConnector(parent, x1, y1, x2, y2, palette) {
9856
9911
  parent.append("line").attr("x1", x1).attr("y1", y1).attr("x2", x2).attr("y2", y2).attr("stroke", palette.textMuted).attr("stroke-width", NOTE_STROKE_WIDTH).attr("stroke-opacity", NOTE_STROKE_OPACITY).attr("class", "note-connector").style("pointer-events", "none");
@@ -16114,6 +16169,7 @@ function parseEventLine(content, palette) {
16114
16169
  let currentEra = null;
16115
16170
  let eraIndent = -1;
16116
16171
  let currentEventIndent = 0;
16172
+ let pendingDescBreak = false;
16117
16173
  const aliasMap = /* @__PURE__ */ new Map();
16118
16174
  for (let i = 0; i < lines.length; i++) {
16119
16175
  const line11 = lines[i];
@@ -16121,6 +16177,7 @@ function parseEventLine(content, palette) {
16121
16177
  const trimmed = line11.trim();
16122
16178
  if (!trimmed) {
16123
16179
  currentTagGroup = null;
16180
+ pendingDescBreak = true;
16124
16181
  continue;
16125
16182
  }
16126
16183
  if (trimmed.startsWith("//")) continue;
@@ -16188,6 +16245,9 @@ function parseEventLine(content, palette) {
16188
16245
  continue;
16189
16246
  }
16190
16247
  if (currentEvent && indent > currentEventIndent) {
16248
+ if (pendingDescBreak && currentEvent.description.length > 0)
16249
+ currentEvent.description.push("");
16250
+ pendingDescBreak = false;
16191
16251
  const descLine = trimmed.startsWith("- ") ? `\u2022 ${trimmed.substring(2)}` : trimmed;
16192
16252
  currentEvent.description.push(descLine);
16193
16253
  continue;
@@ -37010,15 +37070,7 @@ function axisBreakPaths(cx, cy) {
37010
37070
  return [wave(cx - BREAK_GAP / 2), wave(cx + BREAK_GAP / 2)];
37011
37071
  }
37012
37072
  function wrapDescription(lines, charsPerLine) {
37013
- const out = [];
37014
- for (const line11 of lines) {
37015
- if (line11 === "") {
37016
- out.push({ text: "", kind: "plain" });
37017
- continue;
37018
- }
37019
- out.push(...wrapDescriptionLines([line11], charsPerLine));
37020
- }
37021
- return out;
37073
+ return wrapDescriptionLines([...lines], charsPerLine);
37022
37074
  }
37023
37075
  function renderBody(cardG, lines, bodyColor, palette, startBaseline = CARD_BODY_TOP + DESC_FONT, bulletColors = [], bulletMeta = []) {
37024
37076
  let y = startBaseline;
@@ -44984,7 +45036,7 @@ function renderBoxesAndLines(container, parsed, layout, palette, isDark, options
44984
45036
  maxTextWidth / (sDescFontSize * CHAR_WIDTH_RATIO)
44985
45037
  );
44986
45038
  const descLineH = sDescFontSize * DESC_LINE_HEIGHT;
44987
- const displayLen2 = (text) => text.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\*\*(.+?)\*\*/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/`(.+?)`/g, "$1").replace(/https?:\/\/\S+/g, (u) => u.slice(0, 20)).length;
45039
+ const displayLen2 = (text) => stripInlineMarkdown(text).length;
44988
45040
  const normalizedLines = [];
44989
45041
  for (const descLine of desc) {
44990
45042
  let normalized = descLine.startsWith("- ") ? "\u2022 " + descLine.slice(2) : descLine;
@@ -74512,15 +74564,7 @@ function wrapDescription2(lines, maxWidth, fontSize) {
74512
74564
  const normalized = lines.map(
74513
74565
  (l) => l.startsWith("- ") ? "\u2022 " + l.slice(2) : l
74514
74566
  );
74515
- const out = [];
74516
- for (const line11 of normalized) {
74517
- if (line11 === "") {
74518
- out.push({ text: "", kind: "plain" });
74519
- continue;
74520
- }
74521
- out.push(...wrapDescriptionLines([line11], maxChars));
74522
- }
74523
- return out;
74567
+ return wrapDescriptionLines(normalized, maxChars);
74524
74568
  }
74525
74569
  function clamp2(x, lo, hi) {
74526
74570
  return Math.max(lo, Math.min(hi, x));
@@ -77372,7 +77416,7 @@ function renderCountdown(container, parsed, palette, isDark, exportDims) {
77372
77416
  const w = estWidth2(t, base);
77373
77417
  return w <= maxW ? base : Math.max(min, Math.floor(base * maxW / w));
77374
77418
  };
77375
- const dispLen = (s) => parseInlineMarkdown(s).reduce((n, sp) => n + sp.text.length, 0);
77419
+ const dispLen = (s) => stripInlineMarkdown(s).length;
77376
77420
  const padX = Math.max(30, Math.round(width * 0.045));
77377
77421
  const padY = Math.max(26, Math.round(width * 0.03));
77378
77422
  const contentW = width - 2 * padX;
@@ -87135,6 +87179,30 @@ var BLOCK_CSS = `
87135
87179
  color: #616e88;
87136
87180
  font-style: italic;
87137
87181
  }
87182
+
87183
+ /* === Cloud references ===
87184
+ * A withdrawn reference's placeholder, and the "this moved" affordance a host's
87185
+ * client script falls back to when it can see a diagram has changed but cannot
87186
+ * safely swap it in. Both are deliberately quiet: a page peppered with badges
87187
+ * is worse than one that is a few days behind. */
87188
+ .dgmo--tombstone {
87189
+ border: 1px dashed currentColor;
87190
+ border-radius: 6px;
87191
+ opacity: 0.6;
87192
+ padding: 1.5rem;
87193
+ text-align: center;
87194
+ }
87195
+ .dgmo-tombstone-text {
87196
+ font-size: 0.9em;
87197
+ margin: 0;
87198
+ }
87199
+ .dgmo-updated {
87200
+ display: block;
87201
+ font-size: 0.8em;
87202
+ margin-top: 0.4rem;
87203
+ opacity: 0.7;
87204
+ text-align: right;
87205
+ }
87138
87206
  `;
87139
87207
 
87140
87208
  // src/embed/index.ts
@@ -87155,6 +87223,7 @@ function resolveBlockOptions(opts) {
87155
87223
  wrapper: opts.wrapper ?? "figure",
87156
87224
  className: opts.className ?? "dgmo",
87157
87225
  legacyClassNames: opts.legacyClassNames ?? [],
87226
+ dataAttributes: opts.dataAttributes ?? {},
87158
87227
  title: opts.title,
87159
87228
  onWarn: opts.onWarn ?? ((message) => console.warn(message))
87160
87229
  };
@@ -87180,8 +87249,12 @@ function assembleBlock(source, svgsHtml, opts) {
87180
87249
  const showcase = opts.mode === "showcase";
87181
87250
  const variant = showcase ? "showcase" : "diagram";
87182
87251
  const ariaAttr = opts.title ? ` aria-label="${escapeAttr(opts.title)}"` : "";
87252
+ const dataAttrs = dataAttributeString(opts.dataAttributes);
87183
87253
  const sourceHtml = sourceDisclosure(source, opts);
87184
- return `<${Wrapper} class="${escapeAttr(wrapperClasses(opts, variant))}"${ariaAttr}>` + svgsHtml + sourceHtml + `</${Wrapper}>`;
87254
+ return `<${Wrapper} class="${escapeAttr(wrapperClasses(opts, variant))}"${ariaAttr}${dataAttrs}>` + svgsHtml + sourceHtml + `</${Wrapper}>`;
87255
+ }
87256
+ function dataAttributeString(attrs) {
87257
+ return Object.entries(attrs).filter(([name]) => /^[a-z][a-z0-9-]*$/.test(name)).map(([name, value]) => ` data-${name}="${escapeAttr(value)}"`).join("");
87185
87258
  }
87186
87259
  var CODE_ICON = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m10 4.5 4 3.5-4 3.5"/><path d="m6 4.5-4 3.5 4 3.5"/></svg>`;
87187
87260
  var COPY_ICON = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="5.5" y="5.5" width="8" height="8" rx="1.5"/><path d="M10.5 5.5V3a1.5 1.5 0 0 0-1.5-1.5H3A1.5 1.5 0 0 0 1.5 3v6A1.5 1.5 0 0 0 3 10.5h2.5"/></svg>`;
@@ -87254,7 +87327,7 @@ var CSS = AUTO_BASE_CSS + "\n" + BLOCK_CSS + "\n" + darkScopedBlockCss(BLOCK_CSS
87254
87327
 
87255
87328
  // src/auto/shared.ts
87256
87329
  init_safe_href();
87257
- var VERSION = "0.56.0";
87330
+ var VERSION = "0.57.0";
87258
87331
  var ARIA_LABEL_MAX = 200;
87259
87332
  var COPIED_INTERACTION_MS = 1500;
87260
87333
  var LOG_PREFIX = "[dgmo]";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  renderFlowchart,
3
3
  renderFlowchartForExport
4
- } from "./chunk-VKN7YW4Q.js";
4
+ } from "./chunk-T2VMOWAM.js";
5
5
  import "./chunk-PDKUANDZ.js";
6
- import "./chunk-SK7PCW4F.js";
6
+ import "./chunk-LSFZDBAP.js";
7
7
  import "./chunk-LP7EC4MI.js";
8
- import "./chunk-U2BKSEKU.js";
8
+ import "./chunk-H52HJ26L.js";
9
9
  import "./chunk-6EK55ART.js";
10
- import "./chunk-UU6LUYUH.js";
10
+ import "./chunk-VJARCVMH.js";
11
11
  import "./chunk-5DH3KYFH.js";
12
- import "./chunk-3HDBAXF5.js";
13
12
  import "./chunk-3CIOJ5YJ.js";
14
- import "./chunk-BMR4CIEO.js";
13
+ import "./chunk-NCT22MOD.js";
14
+ import "./chunk-WGC42WJU.js";
15
15
  import "./chunk-YYVTBZZC.js";
16
16
  import "./chunk-NZ5QVASG.js";
17
17
  import "./chunk-A4GOY3PE.js";
@@ -21,11 +21,11 @@ import "./chunk-7TF3QOOD.js";
21
21
  import "./chunk-NXMESY4J.js";
22
22
  import "./chunk-ST3ZNEUQ.js";
23
23
  import "./chunk-7NK42OIB.js";
24
- import "./chunk-4ASYQ347.js";
25
- import "./chunk-42IT4BG2.js";
26
24
  import "./chunk-RRX4Z4TH.js";
27
25
  import "./chunk-NOTA6TEI.js";
28
26
  import "./chunk-3KOPPSUQ.js";
27
+ import "./chunk-4ASYQ347.js";
28
+ import "./chunk-42IT4BG2.js";
29
29
  import "./chunk-EXNKNJ65.js";
30
30
  import "./chunk-OLMWTJVU.js";
31
31
  import "./chunk-5WRI5ZAA.js";
@@ -33,4 +33,4 @@ export {
33
33
  renderFlowchart,
34
34
  renderFlowchartForExport
35
35
  };
36
- //# sourceMappingURL=flowchart-renderer-UQVXOUW4.js.map
36
+ //# sourceMappingURL=flowchart-renderer-JGLZB5P5.js.map
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  getEmbedSvgViewBox,
4
4
  normalizeSvgForEmbed,
5
5
  renderErrorCard
6
- } from "./chunk-ZMMYCERO.js";
6
+ } from "./chunk-7Q35X3AL.js";
7
7
  import {
8
8
  completeMapPlaces,
9
9
  completeMapRegions,
@@ -15,20 +15,20 @@ import {
15
15
  } from "./chunk-4B5YISOR.js";
16
16
  import {
17
17
  render
18
- } from "./chunk-2JMNOEAU.js";
18
+ } from "./chunk-6DR2GMDM.js";
19
19
  import {
20
20
  D3_DATA_CHART_TYPES,
21
21
  renderDataChartD3,
22
22
  supportsD3DataChart
23
- } from "./chunk-BR2VSKHI.js";
23
+ } from "./chunk-OFEUXZPI.js";
24
24
  import "./chunk-VHO3YBTB.js";
25
- import "./chunk-HIMDUQT7.js";
25
+ import "./chunk-KRKU6WRS.js";
26
26
  import "./chunk-YRYKTYMQ.js";
27
27
  import "./chunk-YYVTBZZC.js";
28
28
  import "./chunk-CQ7Y3O67.js";
29
29
  import "./chunk-6VJCURWU.js";
30
30
  import "./chunk-NZ5QVASG.js";
31
- import "./chunk-QDOYT6UW.js";
31
+ import "./chunk-44GBBTMU.js";
32
32
  import "./chunk-ES66QH6J.js";
33
33
  import "./chunk-A4GOY3PE.js";
34
34
  import "./chunk-6KFWC4CO.js";
@@ -39,13 +39,15 @@ import {
39
39
  import {
40
40
  REGISTRY_BY_ID,
41
41
  parseDgmo
42
- } from "./chunk-GDGOVO2I.js";
42
+ } from "./chunk-VYCV5WKH.js";
43
+ import "./chunk-BQLJAYVB.js";
43
44
  import {
44
45
  BODY_DIAGNOSTICS
45
46
  } from "./chunk-EEKGMS63.js";
46
47
  import "./chunk-CY5KE2P5.js";
47
48
  import "./chunk-2CW5ZTNH.js";
48
49
  import "./chunk-BDXC7MDK.js";
50
+ import "./chunk-MGLJA5TK.js";
49
51
  import "./chunk-RV2N7COG.js";
50
52
  import {
51
53
  TREEMAP_DIAGNOSTICS
@@ -58,7 +60,10 @@ import "./chunk-OQKP2X3D.js";
58
60
  import "./chunk-YNAHUNMA.js";
59
61
  import "./chunk-A2RUBBVT.js";
60
62
  import "./chunk-NFAHDPCG.js";
61
- import "./chunk-GG7TK3IA.js";
63
+ import "./chunk-USFZQPJ2.js";
64
+ import {
65
+ SKETCH_DIAGNOSTICS
66
+ } from "./chunk-RT7ACF77.js";
62
67
  import {
63
68
  SWIMLANE_DIAGNOSTICS
64
69
  } from "./chunk-5VLUAAAE.js";
@@ -70,20 +75,21 @@ import "./chunk-KF575IXC.js";
70
75
  import "./chunk-CXI6X54X.js";
71
76
  import "./chunk-4MB4UOT5.js";
72
77
  import "./chunk-RQGNELB3.js";
73
- import "./chunk-MGLJA5TK.js";
78
+ import {
79
+ EVENT_LINE_DIAGNOSTICS
80
+ } from "./chunk-XBTJJLAU.js";
81
+ import "./chunk-4MJOBVY7.js";
74
82
  import {
75
83
  VERSION_CONTROL_DIAGNOSTICS
76
84
  } from "./chunk-D64FRGKU.js";
77
85
  import "./chunk-X32RDWT5.js";
78
- import "./chunk-FCA2UGJT.js";
79
- import "./chunk-FXVPSTDT.js";
80
- import "./chunk-Y2L2LET6.js";
86
+ import "./chunk-NIUE5VWY.js";
87
+ import "./chunk-MXDT446P.js";
88
+ import "./chunk-ADKDIWCW.js";
81
89
  import "./chunk-WOMXS5R7.js";
82
90
  import "./chunk-NHZAYL2X.js";
83
- import "./chunk-USFZQPJ2.js";
84
- import {
85
- SKETCH_DIAGNOSTICS
86
- } from "./chunk-RT7ACF77.js";
91
+ import "./chunk-FERE46TP.js";
92
+ import "./chunk-C3Z4DX3V.js";
87
93
  import "./chunk-LV5BFA24.js";
88
94
  import {
89
95
  GRAPH_DIAGNOSTICS
@@ -94,6 +100,9 @@ import "./chunk-VYEQPPS6.js";
94
100
  import "./chunk-ULR3BVNH.js";
95
101
  import "./chunk-ST3ZNEUQ.js";
96
102
  import "./chunk-7NK42OIB.js";
103
+ import {
104
+ ARROW_DIAGNOSTIC_CODES
105
+ } from "./chunk-RRX4Z4TH.js";
97
106
  import "./chunk-PFG3EVRD.js";
98
107
  import "./chunk-OHBIN74X.js";
99
108
  import "./chunk-IYULMRBE.js";
@@ -102,11 +111,8 @@ import {
102
111
  } from "./chunk-DIKIHU52.js";
103
112
  import "./chunk-3TYUXC7D.js";
104
113
  import "./chunk-EQW6HOP4.js";
105
- import {
106
- EVENT_LINE_DIAGNOSTICS
107
- } from "./chunk-WFX6AUQO.js";
108
- import "./chunk-4MJOBVY7.js";
109
114
  import "./chunk-DAOFNU6J.js";
115
+ import "./chunk-NOTA6TEI.js";
110
116
  import {
111
117
  chartTypes
112
118
  } from "./chunk-TGOMHUOV.js";
@@ -114,6 +120,8 @@ import {
114
120
  RACI_DIAGNOSTICS
115
121
  } from "./chunk-I55PVEIX.js";
116
122
  import "./chunk-FZECLCCU.js";
123
+ import "./chunk-D5FANMSG.js";
124
+ import "./chunk-3KOPPSUQ.js";
117
125
  import {
118
126
  getPalette,
119
127
  palettes,
@@ -122,14 +130,6 @@ import {
122
130
  import "./chunk-SCJ7CAJF.js";
123
131
  import "./chunk-4ASYQ347.js";
124
132
  import "./chunk-42IT4BG2.js";
125
- import "./chunk-FERE46TP.js";
126
- import "./chunk-C3Z4DX3V.js";
127
- import {
128
- ARROW_DIAGNOSTIC_CODES
129
- } from "./chunk-RRX4Z4TH.js";
130
- import "./chunk-NOTA6TEI.js";
131
- import "./chunk-D5FANMSG.js";
132
- import "./chunk-3KOPPSUQ.js";
133
133
  import "./chunk-EXNKNJ65.js";
134
134
  import {
135
135
  NEGATIVE_VALUE_DX,
@@ -1,20 +1,21 @@
1
1
  import {
2
2
  layoutGraph
3
- } from "./chunk-SK7PCW4F.js";
3
+ } from "./chunk-LSFZDBAP.js";
4
4
  import "./chunk-6EK55ART.js";
5
- import "./chunk-UU6LUYUH.js";
5
+ import "./chunk-VJARCVMH.js";
6
6
  import "./chunk-5DH3KYFH.js";
7
- import "./chunk-BMR4CIEO.js";
7
+ import "./chunk-NCT22MOD.js";
8
+ import "./chunk-WGC42WJU.js";
8
9
  import "./chunk-NXMESY4J.js";
9
10
  import "./chunk-ST3ZNEUQ.js";
10
11
  import "./chunk-7NK42OIB.js";
11
- import "./chunk-4ASYQ347.js";
12
12
  import "./chunk-NOTA6TEI.js";
13
13
  import "./chunk-3KOPPSUQ.js";
14
+ import "./chunk-4ASYQ347.js";
14
15
  import "./chunk-EXNKNJ65.js";
15
16
  import "./chunk-OLMWTJVU.js";
16
17
  import "./chunk-5WRI5ZAA.js";
17
18
  export {
18
19
  layoutGraph
19
20
  };
20
- //# sourceMappingURL=layout-UXMNKETK.js.map
21
+ //# sourceMappingURL=layout-5CX27X7I.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  layoutMindmap
3
- } from "./chunk-23THM67F.js";
3
+ } from "./chunk-3ZONSZOX.js";
4
4
  import "./chunk-YYVTBZZC.js";
5
5
  import "./chunk-IYULMRBE.js";
6
- import "./chunk-4ASYQ347.js";
7
6
  import "./chunk-D5FANMSG.js";
8
7
  import "./chunk-3KOPPSUQ.js";
8
+ import "./chunk-4ASYQ347.js";
9
9
  import "./chunk-EXNKNJ65.js";
10
10
  import "./chunk-OLMWTJVU.js";
11
11
  import "./chunk-5WRI5ZAA.js";
12
12
  export {
13
13
  layoutMindmap
14
14
  };
15
- //# sourceMappingURL=layout-HIK4ZJFQ.js.map
15
+ //# sourceMappingURL=layout-AO3TPZUS.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  layoutOrg
3
- } from "./chunk-RBIX3HQQ.js";
3
+ } from "./chunk-PKFW6GJD.js";
4
+ import "./chunk-D5FANMSG.js";
5
+ import "./chunk-3KOPPSUQ.js";
4
6
  import "./chunk-SCJ7CAJF.js";
5
7
  import "./chunk-4ASYQ347.js";
6
8
  import "./chunk-42IT4BG2.js";
7
- import "./chunk-D5FANMSG.js";
8
- import "./chunk-3KOPPSUQ.js";
9
9
  import "./chunk-EXNKNJ65.js";
10
10
  import "./chunk-OLMWTJVU.js";
11
11
  import "./chunk-5WRI5ZAA.js";
12
12
  export {
13
13
  layoutOrg
14
14
  };
15
- //# sourceMappingURL=layout-WDXNSQQF.js.map
15
+ //# sourceMappingURL=layout-AQXLQVAJ.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  layoutSitemap
3
- } from "./chunk-KIGV66SP.js";
3
+ } from "./chunk-57RE4N22.js";
4
+ import "./chunk-D5FANMSG.js";
5
+ import "./chunk-3KOPPSUQ.js";
4
6
  import "./chunk-SCJ7CAJF.js";
5
7
  import "./chunk-4ASYQ347.js";
6
8
  import "./chunk-42IT4BG2.js";
7
- import "./chunk-D5FANMSG.js";
8
- import "./chunk-3KOPPSUQ.js";
9
9
  import "./chunk-EXNKNJ65.js";
10
10
  import "./chunk-OLMWTJVU.js";
11
11
  import "./chunk-5WRI5ZAA.js";
12
12
  export {
13
13
  layoutSitemap
14
14
  };
15
- //# sourceMappingURL=layout-A5UVXINF.js.map
15
+ //# sourceMappingURL=layout-EQTOVNEE.js.map
@@ -1,20 +1,21 @@
1
1
  import {
2
2
  computeNodeSize,
3
3
  layoutBoxesAndLines
4
- } from "./chunk-R7ECJQTB.js";
4
+ } from "./chunk-3M6MKHIQ.js";
5
5
  import "./chunk-WTTIODDV.js";
6
- import "./chunk-5HWPEYWB.js";
6
+ import "./chunk-LDVUPGWC.js";
7
7
  import "./chunk-6EK55ART.js";
8
- import "./chunk-UU6LUYUH.js";
8
+ import "./chunk-VJARCVMH.js";
9
9
  import "./chunk-5DH3KYFH.js";
10
- import "./chunk-BMR4CIEO.js";
10
+ import "./chunk-NCT22MOD.js";
11
+ import "./chunk-WGC42WJU.js";
11
12
  import "./chunk-7NK42OIB.js";
12
- import "./chunk-4ASYQ347.js";
13
13
  import "./chunk-NOTA6TEI.js";
14
+ import "./chunk-4ASYQ347.js";
14
15
  import "./chunk-OLMWTJVU.js";
15
16
  import "./chunk-5WRI5ZAA.js";
16
17
  export {
17
18
  computeNodeSize,
18
19
  layoutBoxesAndLines
19
20
  };
20
- //# sourceMappingURL=layout-2BJDECLZ.js.map
21
+ //# sourceMappingURL=layout-NU5LQ4UP.js.map