@diagrammo/dgmo 0.57.0 → 0.59.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 (198) hide show
  1. package/dist/advanced.d.ts +57 -7
  2. package/dist/advanced.js +128 -118
  3. package/dist/auto.css +38 -2
  4. package/dist/auto.js +162 -125
  5. package/dist/auto.mjs +1954 -1456
  6. package/dist/block.css +38 -2
  7. package/dist/block.js +94 -52
  8. package/dist/{calculator-BBKAAQGD.js → calculator-ORAKSL5D.js} +4 -2
  9. package/dist/{chart-meta-CPNVUZ5J.d.ts → chart-meta-C6UaqhTP.d.ts} +1 -1
  10. package/dist/chart-meta.d.ts +2 -2
  11. package/dist/chart-meta.js +44 -42
  12. package/dist/{charts-d3-Z6FOKUAL.js → charts-d3-JBNDV6TY.js} +5 -5
  13. package/dist/{chunk-5J2RQGFG.js → chunk-2NSR6INI.js} +3 -3
  14. package/dist/chunk-2SUUYIFC.js +65 -0
  15. package/dist/{chunk-CQJ5SE5T.js → chunk-3T2PKOTK.js} +4 -4
  16. package/dist/{chunk-5XMDSXZT.js → chunk-4IFPX4J6.js} +2 -2
  17. package/dist/{chunk-KRKU6WRS.js → chunk-4KRYJGBY.js} +4 -4
  18. package/dist/{chunk-6HSRT6WI.js → chunk-4YQI7ELC.js} +3 -3
  19. package/dist/{chunk-ORZQVUGW.js → chunk-5XV3Z3UJ.js} +32 -12
  20. package/dist/{chunk-SADYIA5Q.js → chunk-65AMRH2N.js} +3 -3
  21. package/dist/{chunk-MXDT446P.js → chunk-6F74K4JL.js} +51 -14
  22. package/dist/{chunk-ADKDIWCW.js → chunk-6KWE5553.js} +30 -17
  23. package/dist/{chunk-QMOX5I3G.js → chunk-6M3QPUHL.js} +5 -5
  24. package/dist/{chunk-VSFAJUEF.js → chunk-6XWZKCVS.js} +3 -3
  25. package/dist/{chunk-X32RDWT5.js → chunk-6YY56KU2.js} +7 -5
  26. package/dist/{chunk-G3L4GWLA.js → chunk-75LW3IUQ.js} +3 -3
  27. package/dist/{chunk-INU6ANOH.js → chunk-7XTJGMH6.js} +2 -2
  28. package/dist/{chunk-44GBBTMU.js → chunk-A6L6W43V.js} +2 -2
  29. package/dist/{chunk-OFEUXZPI.js → chunk-AFBQEBKL.js} +3 -3
  30. package/dist/{chunk-K2GDF2ZR.js → chunk-BFAU3OPW.js} +4 -4
  31. package/dist/{chunk-USFZQPJ2.js → chunk-BG23Y7JD.js} +3 -3
  32. package/dist/{chunk-ES3MUYRX.js → chunk-BGBGWFUI.js} +3 -3
  33. package/dist/{chunk-6PRLPGJB.js → chunk-BGT6SAR2.js} +3 -3
  34. package/dist/{chunk-FZECLCCU.js → chunk-BVPRRSMX.js} +3 -3
  35. package/dist/{chunk-3M6MKHIQ.js → chunk-CC6XIQDE.js} +2 -2
  36. package/dist/{chunk-U3DGAE7L.js → chunk-CRE3BAKN.js} +3 -3
  37. package/dist/chunk-D3K4U3ZM.js +232 -0
  38. package/dist/{chunk-T2VMOWAM.js → chunk-DD6EA4DU.js} +3 -3
  39. package/dist/{chunk-NFAHDPCG.js → chunk-DDQ47BMP.js} +3 -3
  40. package/dist/{chunk-KH74OWHU.js → chunk-DH3NCG4B.js} +3 -3
  41. package/dist/{chunk-DUI5SMFX.js → chunk-DKG2ADEN.js} +8 -5
  42. package/dist/{chunk-J6V3SMR3.js → chunk-E6QWV2G4.js} +7 -7
  43. package/dist/{chunk-FMPYKUKI.js → chunk-EIRNPTLH.js} +3 -3
  44. package/dist/{chunk-4MJOBVY7.js → chunk-EKKS325Q.js} +2 -2
  45. package/dist/{chunk-KF575IXC.js → chunk-EQGLGTU2.js} +3 -3
  46. package/dist/{chunk-4MB4UOT5.js → chunk-EYP34TFP.js} +2 -2
  47. package/dist/{chunk-LV5BFA24.js → chunk-GCZQAT4Z.js} +3 -3
  48. package/dist/{chunk-MGLJA5TK.js → chunk-GSVHOF3J.js} +2 -2
  49. package/dist/{chunk-ULR3BVNH.js → chunk-HQI7S72D.js} +4 -4
  50. package/dist/{chunk-TZ72UBOA.js → chunk-HSVVQZLC.js} +2 -2
  51. package/dist/{chunk-SQWWYGPT.js → chunk-I24URUTV.js} +5 -5
  52. package/dist/{chunk-FERE46TP.js → chunk-I53E3L5M.js} +9 -7
  53. package/dist/{chunk-NHZAYL2X.js → chunk-IH3GHOHU.js} +7 -6
  54. package/dist/{chunk-57RE4N22.js → chunk-IMEWQLRD.js} +2 -2
  55. package/dist/{chunk-3KOPPSUQ.js → chunk-IXY2IPOW.js} +30 -4
  56. package/dist/chunk-KJ3FIMPA.js +181 -0
  57. package/dist/{chunk-5VLUAAAE.js → chunk-KZFAEMQQ.js} +3 -3
  58. package/dist/{chunk-3ZONSZOX.js → chunk-LBEZKYAR.js} +2 -2
  59. package/dist/{chunk-D5FANMSG.js → chunk-LLA5C2TM.js} +14 -3
  60. package/dist/{chunk-CY5KE2P5.js → chunk-MM4Z32EH.js} +2 -2
  61. package/dist/{chunk-6DR2GMDM.js → chunk-NCW6NQPD.js} +158 -135
  62. package/dist/{chunk-VS7DGDT3.js → chunk-O66TS32B.js} +5 -5
  63. package/dist/{chunk-3G7BCZ4J.js → chunk-OANGI4EI.js} +5 -5
  64. package/dist/{chunk-OYCIVSL3.js → chunk-OBWIIXSZ.js} +6 -6
  65. package/dist/{chunk-X3ON4M5S.js → chunk-OIL6MTVH.js} +4 -4
  66. package/dist/{chunk-RB4HOOKP.js → chunk-OJD4FU6H.js} +2 -2
  67. package/dist/chunk-ON4MEUC4.js +50 -0
  68. package/dist/{chunk-RQGNELB3.js → chunk-OSXJY6SY.js} +3 -3
  69. package/dist/{chunk-U4FSWAOJ.js → chunk-PH36NIGK.js} +4 -4
  70. package/dist/{chunk-M65UOFJA.js → chunk-PNCACNE5.js} +3 -3
  71. package/dist/{chunk-VYEQPPS6.js → chunk-PSWWCLLI.js} +3 -3
  72. package/dist/{chunk-D76B4DMV.js → chunk-QG3RU7YT.js} +2 -2
  73. package/dist/{chunk-Q772PVKH.js → chunk-QTJZRAXM.js} +2 -2
  74. package/dist/{chunk-XBTJJLAU.js → chunk-R53THUTP.js} +4 -4
  75. package/dist/{chunk-PKFW6GJD.js → chunk-RVCBPDCK.js} +3 -3
  76. package/dist/{chunk-D64FRGKU.js → chunk-S5OQWV54.js} +2 -2
  77. package/dist/{chunk-UG4MWUXE.js → chunk-SEPM6JZV.js} +5 -5
  78. package/dist/{chunk-ST3ZNEUQ.js → chunk-SJT4W23S.js} +2 -2
  79. package/dist/{chunk-YNAHUNMA.js → chunk-SLGHGT76.js} +2 -2
  80. package/dist/{chunk-APD52YJV.js → chunk-SQLVM3G7.js} +4 -4
  81. package/dist/{chunk-BQLJAYVB.js → chunk-TDZRLG7I.js} +2 -2
  82. package/dist/{chunk-WOMXS5R7.js → chunk-TJV3J74Y.js} +3 -3
  83. package/dist/{chunk-RV2N7COG.js → chunk-TL6WZWSZ.js} +2 -2
  84. package/dist/{chunk-LZX3RLRP.js → chunk-TLJPI6WL.js} +6 -6
  85. package/dist/{chunk-SFVG4AIG.js → chunk-TR7WNZFJ.js} +3 -3
  86. package/dist/{chunk-7SXTD7L6.js → chunk-U5UKFXHB.js} +2 -2
  87. package/dist/{chunk-7Q35X3AL.js → chunk-UF7WAYBH.js} +9 -233
  88. package/dist/{chunk-7YPSFQFA.js → chunk-UWJNAEMY.js} +6 -6
  89. package/dist/{chunk-EEKGMS63.js → chunk-UYY7MVJK.js} +3 -3
  90. package/dist/{chunk-CXI6X54X.js → chunk-V5PHEH2M.js} +2 -2
  91. package/dist/{chunk-NIUE5VWY.js → chunk-VGFUVFJA.js} +17 -12
  92. package/dist/{chunk-M3IYDSI7.js → chunk-VIFFJOOR.js} +5 -5
  93. package/dist/{chunk-DIKIHU52.js → chunk-W2Z4KS72.js} +6 -4
  94. package/dist/{chunk-A6XELFU6.js → chunk-WBALHD3K.js} +8 -8
  95. package/dist/{chunk-5LBCOFA5.js → chunk-WCSVZW2W.js} +2 -2
  96. package/dist/{chunk-QWUYFUNO.js → chunk-XS7CL7NX.js} +2 -2
  97. package/dist/{chunk-3NSOKT7C.js → chunk-XVOGT46C.js} +2 -2
  98. package/dist/{chunk-3D6LDLIH.js → chunk-Y7KHN3MQ.js} +2 -2
  99. package/dist/{chunk-PRKPFRC2.js → chunk-YOK3BMEW.js} +4 -4
  100. package/dist/{chunk-PUGUOFM6.js → chunk-YPEMNAC7.js} +3 -3
  101. package/dist/{chunk-VYCV5WKH.js → chunk-YURNIF7Q.js} +60 -44
  102. package/dist/{chunk-OHBIN74X.js → chunk-ZBOSGLES.js} +8 -7
  103. package/dist/{chunk-HBRGNLF5.js → chunk-ZED4URQK.js} +6 -6
  104. package/dist/{chunk-TGOMHUOV.js → chunk-ZEIYC7XO.js} +12 -1
  105. package/dist/{chunk-PFG3EVRD.js → chunk-ZTSBP3AH.js} +8 -5
  106. package/dist/cli.cjs +149 -148
  107. package/dist/cloud-reference.d.ts +15 -8
  108. package/dist/cloud-reference.js +8 -39
  109. package/dist/completion-registry.js +24 -5
  110. package/dist/dgmo-router-I2LJOEAQ.js +90 -0
  111. package/dist/{dimensions-XRWIPAFO.js → dimensions-3IMJDSTT.js} +5 -5
  112. package/dist/editor.js +11 -2
  113. package/dist/element.js +163 -126
  114. package/dist/element.mjs +1954 -1456
  115. package/dist/{flowchart-parser-DA3V2SLH.js → flowchart-parser-PZQY2UC4.js} +4 -4
  116. package/dist/{flowchart-renderer-JGLZB5P5.js → flowchart-renderer-CKUW63MB.js} +5 -5
  117. package/dist/highlight.js +11 -2
  118. package/dist/index.d.ts +13 -4
  119. package/dist/index.js +55 -49
  120. package/dist/{layout-AQXLQVAJ.js → layout-2NWRELPU.js} +4 -4
  121. package/dist/{layout-WHOOLGPO.js → layout-47LIQXNX.js} +4 -4
  122. package/dist/{layout-NU5LQ4UP.js → layout-DH6GSKAH.js} +2 -2
  123. package/dist/{layout-AO3TPZUS.js → layout-IXNU33JR.js} +4 -4
  124. package/dist/{layout-5CX27X7I.js → layout-LH6LNIUV.js} +3 -3
  125. package/dist/{layout-TZKPVXKJ.js → layout-MAMV4RZF.js} +3 -3
  126. package/dist/{layout-EQTOVNEE.js → layout-NHNIMAHX.js} +4 -4
  127. package/dist/{layout-search-6CVR2MTZ.js → layout-search-N6NQI5OQ.js} +5 -5
  128. package/dist/{parser-HMQZPPOK.js → parser-2OJSWKXO.js} +4 -4
  129. package/dist/{parser-O5XCVGZG.js → parser-3QHLZK6F.js} +3 -3
  130. package/dist/{parser-SJ7ECFAP.js → parser-453DEZ4P.js} +4 -4
  131. package/dist/{parser-Q3KNFXQR.js → parser-4QYDFXV2.js} +4 -4
  132. package/dist/{parser-XQNM7BGD.js → parser-55CSWK3N.js} +4 -4
  133. package/dist/{parser-PQXN6SBB.js → parser-56HMQG5C.js} +5 -5
  134. package/dist/{parser-QL2LBPFE.js → parser-5BHZMV3O.js} +4 -4
  135. package/dist/{parser-QEWSTNEJ.js → parser-5I7W54EA.js} +4 -4
  136. package/dist/parser-5KOJWHOR.js +12 -0
  137. package/dist/{parser-DTXM5ROT.js → parser-63LK7YBR.js} +5 -5
  138. package/dist/{parser-5UZWYSIV.js → parser-6HT34DZ3.js} +4 -4
  139. package/dist/{parser-CCAUZLYI.js → parser-6S65S3DX.js} +4 -4
  140. package/dist/{parser-MH62NYKM.js → parser-7C5GZCAU.js} +4 -4
  141. package/dist/{parser-5WMH55UA.js → parser-7W7DPIGR.js} +4 -4
  142. package/dist/{parser-4TX6U4ZU.js → parser-AD5OAVX6.js} +3 -3
  143. package/dist/{parser-A6M25MLK.js → parser-AWO3N6YH.js} +3 -3
  144. package/dist/{parser-OPOGIKFR.js → parser-BLCDJB7N.js} +4 -4
  145. package/dist/{parser-KTVDCWHG.js → parser-BNGLB2VS.js} +4 -4
  146. package/dist/{parser-WT3DSNPQ.js → parser-BVC642CN.js} +4 -4
  147. package/dist/{parser-73YUU35J.js → parser-CXLR6MAY.js} +3 -3
  148. package/dist/{parser-6CM27UPA.js → parser-DROHJTBZ.js} +4 -4
  149. package/dist/{parser-AYZTKZC3.js → parser-G7KP6LZH.js} +3 -3
  150. package/dist/{parser-RBNOWHGM.js → parser-IWQQY5VU.js} +4 -4
  151. package/dist/{parser-Q62VR2UJ.js → parser-NJGZF5MK.js} +5 -5
  152. package/dist/{parser-DQ2DGDYO.js → parser-QCSDU4FU.js} +3 -3
  153. package/dist/{parser-LMNFVTIV.js → parser-QCYEJOLZ.js} +4 -4
  154. package/dist/{parser-PEBXIOPX.js → parser-QJ7XK7AB.js} +4 -4
  155. package/dist/{parser-4ZIJDGPG.js → parser-RMUGOZO3.js} +4 -4
  156. package/dist/{parser-IQLLBMBQ.js → parser-TABGTEHH.js} +3 -3
  157. package/dist/{parser-IPBEW2DG.js → parser-TPCKCQ4Z.js} +4 -4
  158. package/dist/{parser-XWNSCDY6.js → parser-UB6XGLTC.js} +4 -4
  159. package/dist/{parser-QN3GJJ3J.js → parser-WI2B7IL3.js} +3 -3
  160. package/dist/{parser-D7YZX3CH.js → parser-WXZU47Z4.js} +3 -3
  161. package/dist/{registry-CaSw0PSH.d.ts → registry-C0HvobTb.d.ts} +17 -0
  162. package/dist/{renderer-6OFPEBHG.js → renderer-2OQMYNQD.js} +5 -5
  163. package/dist/{renderer-IAJMS5U5.js → renderer-4S5LOABJ.js} +7 -7
  164. package/dist/{renderer-FQLFE3TQ.js → renderer-6NQZLBMX.js} +5 -5
  165. package/dist/{renderer-2TEGR3RX.js → renderer-73L6XERY.js} +5 -5
  166. package/dist/{renderer-3WYLLPQL.js → renderer-7EAS7J35.js} +6 -6
  167. package/dist/{renderer-W5GF5USI.js → renderer-A2APCS6I.js} +5 -5
  168. package/dist/{renderer-HDLM6OY6.js → renderer-AWFHCLXQ.js} +7 -7
  169. package/dist/{renderer-XSZ5MUIF.js → renderer-CQBLODU3.js} +5 -5
  170. package/dist/{renderer-AK2X3VRY.js → renderer-F5YIKPAC.js} +7 -7
  171. package/dist/{renderer-LU4R3BP2.js → renderer-G24W6J6H.js} +4 -4
  172. package/dist/{renderer-KXMKAXPQ.js → renderer-I3WY546K.js} +4 -4
  173. package/dist/{renderer-VWBNIZV3.js → renderer-KYWN5KRD.js} +6 -6
  174. package/dist/{renderer-PLRNQ6T3.js → renderer-LDSHG26O.js} +7 -7
  175. package/dist/{renderer-LRQ3OPNJ.js → renderer-LOTDM5WH.js} +7 -7
  176. package/dist/{renderer-5BFS4NBL.js → renderer-M225GOP2.js} +5 -5
  177. package/dist/{renderer-LMLSA457.js → renderer-NTKY64DL.js} +5 -5
  178. package/dist/{renderer-ND7YIUHD.js → renderer-PQXPBXKE.js} +3 -3
  179. package/dist/{renderer-I2P5FTZ2.js → renderer-QFWLXG6G.js} +7 -7
  180. package/dist/{renderer-W3JK5YVD.js → renderer-QGZBFYMZ.js} +5 -5
  181. package/dist/{renderer-BNEO5W3E.js → renderer-QMOSWMHK.js} +6 -6
  182. package/dist/{renderer-EJ3FETD2.js → renderer-R7JEM7R7.js} +5 -5
  183. package/dist/{renderer-JHYUK5TN.js → renderer-RB3DGCF4.js} +3 -3
  184. package/dist/{renderer-XKMG3SYD.js → renderer-RNTCDM5N.js} +6 -6
  185. package/dist/{renderer-TIIHLRMM.js → renderer-RRIXAQSF.js} +5 -5
  186. package/dist/renderer-T3JBQLLW.js +77 -0
  187. package/dist/{renderer-N4V7XVC3.js → renderer-VHYLVS2K.js} +7 -7
  188. package/dist/{renderer-BZZKS7KQ.js → renderer-VN3RCFHI.js} +7 -7
  189. package/dist/{renderer-B6XOO6EE.js → renderer-WAXZMPYS.js} +3 -3
  190. package/dist/{renderer-LNOBG226.js → renderer-X75XWLQS.js} +7 -7
  191. package/dist/{renderer-Q6TJ52B4.js → renderer-ZHGAY3Y6.js} +5 -5
  192. package/dist/{renderer-radial-LZAPQVM5.js → renderer-radial-C67KGADM.js} +6 -6
  193. package/dist/{state-parser-NQGVYSM3.js → state-parser-PNC2IHIA.js} +5 -5
  194. package/dist/{state-renderer-KSAKMFQ2.js → state-renderer-U4QW5YMY.js} +7 -7
  195. package/dist/{themes-tbBkIVsn.d.ts → themes-l406Vj2z.d.ts} +1 -1
  196. package/docs/language-reference.md +29 -0
  197. package/package.json +1 -1
  198. package/dist/dgmo-router-PMEKTIJ7.js +0 -88
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-6VJCURWU.js";
13
13
  import {
14
14
  renderIntegratedLegend
15
- } from "./chunk-44GBBTMU.js";
15
+ } from "./chunk-A6L6W43V.js";
16
16
  import {
17
17
  getLegendExtent,
18
18
  getMaxLegendReservedHeight
@@ -29,16 +29,16 @@ import {
29
29
  isSequenceBlock,
30
30
  isSequenceNote,
31
31
  isSequenceSection
32
- } from "./chunk-FERE46TP.js";
32
+ } from "./chunk-I53E3L5M.js";
33
33
  import {
34
34
  resolveActiveTagGroup,
35
35
  tagAttrKey
36
- } from "./chunk-D5FANMSG.js";
36
+ } from "./chunk-LLA5C2TM.js";
37
37
  import {
38
38
  fillModeFromOptions,
39
39
  legendInlineRequested,
40
40
  legendSuppressed
41
- } from "./chunk-3KOPPSUQ.js";
41
+ } from "./chunk-IXY2IPOW.js";
42
42
  import {
43
43
  measureText,
44
44
  truncateText
@@ -1907,4 +1907,4 @@ export {
1907
1907
  renderSequenceDiagram,
1908
1908
  buildNoteMessageMap
1909
1909
  };
1910
- //# sourceMappingURL=chunk-SQWWYGPT.js.map
1910
+ //# sourceMappingURL=chunk-I24URUTV.js.map
@@ -16,7 +16,7 @@ import {
16
16
  stripDefaultModifier,
17
17
  validateTagGroupNames,
18
18
  validateTagValues
19
- } from "./chunk-D5FANMSG.js";
19
+ } from "./chunk-LLA5C2TM.js";
20
20
  import {
21
21
  FILL_FAMILY_TOKENS,
22
22
  OPTION_NOCOLON_RE,
@@ -24,11 +24,12 @@ import {
24
24
  extractColor,
25
25
  measureIndent,
26
26
  parseFirstLine,
27
+ peelQuotedName,
27
28
  peelTrailingCollapsedFlag,
28
29
  splitNameAndMeta,
29
30
  warnUnknownMetaKeys,
30
31
  withTagAliases
31
- } from "./chunk-3KOPPSUQ.js";
32
+ } from "./chunk-IXY2IPOW.js";
32
33
  import {
33
34
  NAME_DIAGNOSTIC_CODES,
34
35
  formatDgmoError,
@@ -84,7 +85,7 @@ function parseNoteLine(trimmed, participants, participantIds, sortedParticipants
84
85
  if (!lastMsgFrom) return { kind: "skip" };
85
86
  participantId = lastMsgFrom;
86
87
  }
87
- const lookupKey = normalizeName(participantId);
88
+ const lookupKey = normalizeName(peelQuotedName(participantId));
88
89
  if (participantIds.has(lookupKey)) {
89
90
  const found = participants.find((p) => normalizeName(p.id) === lookupKey);
90
91
  return {
@@ -248,8 +249,9 @@ function parseSequenceDgmo(content, palette) {
248
249
  const participantIds = /* @__PURE__ */ new Set();
249
250
  const idByKey = /* @__PURE__ */ new Map();
250
251
  const addParticipant = (name, lineNumber, extras) => {
251
- const key = normalizeName(name);
252
- const trimmed = name.trim();
252
+ const peeled = peelQuotedName(name);
253
+ const key = normalizeName(peeled);
254
+ const trimmed = peeled.trim();
253
255
  const incomingLabel = extras?.label ?? trimmed;
254
256
  if (participantIds.has(key)) {
255
257
  const existing = result.participants.find(
@@ -281,7 +283,7 @@ function parseSequenceDgmo(content, palette) {
281
283
  result.participants.push({
282
284
  id: trimmed,
283
285
  label: incomingLabel,
284
- type: extras?.type ?? inferParticipantType(name),
286
+ type: extras?.type ?? inferParticipantType(peeled),
285
287
  lineNumber,
286
288
  ...extras?.position !== void 0 ? { position: extras.position } : {},
287
289
  // takePosition() may have emptied the metadata record (position was
@@ -1040,4 +1042,4 @@ export {
1040
1042
  parseSequenceDgmo,
1041
1043
  looksLikeSequence
1042
1044
  };
1043
- //# sourceMappingURL=chunk-FERE46TP.js.map
1045
+ //# sourceMappingURL=chunk-I53E3L5M.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tryCollectNote
3
- } from "./chunk-ST3ZNEUQ.js";
3
+ } from "./chunk-SJT4W23S.js";
4
4
  import {
5
5
  resolveNotes
6
6
  } from "./chunk-7NK42OIB.js";
@@ -19,18 +19,19 @@ import {
19
19
  tagAttrKey,
20
20
  validateTagGroupNames,
21
21
  validateTagValues
22
- } from "./chunk-D5FANMSG.js";
22
+ } from "./chunk-LLA5C2TM.js";
23
23
  import {
24
24
  BOXES_AND_LINES_REGISTRY,
25
25
  OPTION_NOCOLON_RE,
26
26
  extractColor,
27
27
  parseFirstLine,
28
+ peelQuotedName,
28
29
  peelRampColors,
29
30
  splitNameAndMeta,
30
31
  tryParseSharedOption,
31
32
  warnUnknownMetaKeys,
32
33
  withTagAliases
33
- } from "./chunk-3KOPPSUQ.js";
34
+ } from "./chunk-IXY2IPOW.js";
34
35
  import {
35
36
  makeDgmoError,
36
37
  suggest
@@ -601,7 +602,7 @@ function parseNodeLine(trimmed, lineNum, metaAliasMap, diagnostics, nameAliasMap
601
602
  (msg) => diagnostics.push(makeDgmoError(lineNum, msg, "warning")),
602
603
  split.name
603
604
  );
604
- let label = split.name;
605
+ let label = peelQuotedName(split.name);
605
606
  const metadata = { ...split.meta };
606
607
  let description;
607
608
  if (split.color !== void 0) {
@@ -655,7 +656,7 @@ function resolveEndpoint(name, nameAliasMap) {
655
656
  const aliased = nameAliasMap.get(name.trim());
656
657
  if (aliased !== void 0) return aliased;
657
658
  }
658
- return name;
659
+ return peelQuotedName(name);
659
660
  }
660
661
  function parseEdgeLine(trimmed, lineNum, metaAliasMap, diagnostics, nameAliasMap) {
661
662
  const edgeRegistry = withTagAliases(
@@ -833,4 +834,4 @@ export {
833
834
  looksLikeBoxesAndLines,
834
835
  parseBoxesAndLines
835
836
  };
836
- //# sourceMappingURL=chunk-NHZAYL2X.js.map
837
+ //# sourceMappingURL=chunk-IH3GHOHU.js.map
@@ -2,7 +2,7 @@ import {
2
2
  injectDefaultTagMetadata,
3
3
  resolveTagColor,
4
4
  tagAttrKey
5
- } from "./chunk-D5FANMSG.js";
5
+ } from "./chunk-LLA5C2TM.js";
6
6
  import {
7
7
  LEGEND_CAPSULE_PAD,
8
8
  LEGEND_DOT_R,
@@ -617,4 +617,4 @@ function layoutSitemap(parsed, hiddenCounts, activeTagGroup, hiddenAttributes, e
617
617
  export {
618
618
  layoutSitemap
619
619
  };
620
- //# sourceMappingURL=chunk-57RE4N22.js.map
620
+ //# sourceMappingURL=chunk-IMEWQLRD.js.map
@@ -375,7 +375,14 @@ var DIRECTIVES_REGISTRY = [
375
375
  { token: "no-rounds", category: "modifier" },
376
376
  { token: "single-elim", category: "modifier" },
377
377
  { token: "double-elim", category: "modifier" },
378
- { token: "seeded", category: "modifier" }
378
+ { token: "seeded", category: "modifier" },
379
+ // ── Live link (§38) ──────────────────────────────────────
380
+ // The pointer type's one directive. Registered so it highlights and
381
+ // autocompletes like `palette` does — §38 justifies the shape by calling it
382
+ // "the ordinary DGMO directive shape", and an unregistered `url` would make
383
+ // that sentence false in the editor: `editor/tokens.ts` specializes only
384
+ // against the keyword registries, so it would render as plain identifier text.
385
+ { token: "url", category: "directive" }
379
386
  ];
380
387
  function tokensWhere(pred) {
381
388
  const out = /* @__PURE__ */ new Set();
@@ -421,7 +428,12 @@ function staticRegistry(keys) {
421
428
  return { keys: new Set(keys), tagAliases: /* @__PURE__ */ new Set() };
422
429
  }
423
430
  function withTagAliases(base, aliases) {
424
- return { keys: base.keys, tagAliases: aliases };
431
+ const withSlugs = new Set(aliases);
432
+ for (const alias of aliases) withSlugs.add(tagSlug(alias));
433
+ return { keys: base.keys, tagAliases: withSlugs };
434
+ }
435
+ function tagSlug(name) {
436
+ return name.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
425
437
  }
426
438
  function isReservedKey(registry, key) {
427
439
  return registry.keys.has(key) || registry.tagAliases.has(key);
@@ -636,7 +648,9 @@ var ALL_CHART_TYPES = /* @__PURE__ */ new Set([
636
648
  "raci",
637
649
  "map",
638
650
  "family",
639
- "bracket"
651
+ "bracket",
652
+ // pointer, not a drawing — internal (see ChartTypeMeta.internal)
653
+ "live-link"
640
654
  ]);
641
655
  function measureIndent(line) {
642
656
  let indent = 0;
@@ -785,6 +799,17 @@ function stripQuotes(token) {
785
799
  }
786
800
  return token;
787
801
  }
802
+ function peelQuotedName(name) {
803
+ const trimmed = name.trim();
804
+ if (trimmed.length < 2) return name;
805
+ const first = trimmed[0];
806
+ const last = trimmed[trimmed.length - 1];
807
+ if ((first !== '"' || last !== '"') && (first !== "'" || last !== "'"))
808
+ return name;
809
+ const inner = trimmed.slice(1, -1);
810
+ if (inner.length === 0 || inner.includes(first)) return name;
811
+ return inner;
812
+ }
788
813
  function tokenizeQuoteAware(input) {
789
814
  const tokens = [];
790
815
  let i = 0;
@@ -1158,6 +1183,7 @@ export {
1158
1183
  detectBadChartTypeDeclaration,
1159
1184
  normalizeNumericToken,
1160
1185
  stripQuotes,
1186
+ peelQuotedName,
1161
1187
  tokenizeQuoteAware,
1162
1188
  collectIndentedValues,
1163
1189
  parseSeriesNames,
@@ -1169,4 +1195,4 @@ export {
1169
1195
  splitNameAndMeta,
1170
1196
  warnUnknownMetaKeys
1171
1197
  };
1172
- //# sourceMappingURL=chunk-3KOPPSUQ.js.map
1198
+ //# sourceMappingURL=chunk-IXY2IPOW.js.map
@@ -0,0 +1,181 @@
1
+ import {
2
+ parseFirstLine
3
+ } from "./chunk-IXY2IPOW.js";
4
+ import {
5
+ parseCloudReference,
6
+ parseCloudReferenceUrl
7
+ } from "./chunk-ON4MEUC4.js";
8
+ import {
9
+ formatDgmoError,
10
+ makeDgmoError
11
+ } from "./chunk-OLMWTJVU.js";
12
+
13
+ // src/live-link/parser.ts
14
+ var GLOBAL_DIRECTIVES = /* @__PURE__ */ new Set([
15
+ "palette",
16
+ "theme",
17
+ "no-title",
18
+ "legend-inline"
19
+ ]);
20
+ var EXAMPLE_URL = "https://online.diagrammo.app/d/dgm_7f2a91";
21
+ function resolveTarget(value) {
22
+ const trimmed = value.trim();
23
+ const asUrl = parseCloudReferenceUrl(trimmed)?.id;
24
+ if (asUrl) return asUrl;
25
+ if (!/^[^\s[\]]+$/.test(trimmed)) return null;
26
+ return parseCloudReference(`live-link ${trimmed}`)?.id ?? null;
27
+ }
28
+ function pinnedRevision(value) {
29
+ const trimmed = value.trim();
30
+ if (resolveTarget(trimmed) !== null) return null;
31
+ try {
32
+ const url = new URL(trimmed);
33
+ const at2 = url.searchParams.get("at");
34
+ if (at2 !== null) {
35
+ url.searchParams.delete("at");
36
+ if (resolveTarget(url.toString()) !== null) return `?at=${at2}`;
37
+ }
38
+ } catch {
39
+ }
40
+ const at = trimmed.indexOf("@");
41
+ if (at > 0) {
42
+ const pin = trimmed.slice(at);
43
+ if (resolveTarget(trimmed.slice(0, at)) !== null) return pin;
44
+ }
45
+ return null;
46
+ }
47
+ function parseLiveLink(content) {
48
+ const diagnostics = [];
49
+ let error = null;
50
+ const fail = (line, message) => {
51
+ const diag = makeDgmoError(line, message);
52
+ diagnostics.push(diag);
53
+ error ??= formatDgmoError(diag);
54
+ };
55
+ const warn = (line, message) => {
56
+ diagnostics.push(makeDgmoError(line, message, "warning"));
57
+ };
58
+ const lines = content.split("\n");
59
+ const isSkippable = (line) => !line || line.startsWith("//");
60
+ let titleSlot = null;
61
+ let titleLineNumber = 1;
62
+ let bodyStart = lines.length;
63
+ for (let i = 0; i < lines.length; i++) {
64
+ const trimmed = lines[i].trim();
65
+ if (isSkippable(trimmed)) continue;
66
+ const first = parseFirstLine(trimmed);
67
+ titleLineNumber = i + 1;
68
+ titleSlot = first?.title ?? null;
69
+ bodyStart = first ? i + 1 : i;
70
+ break;
71
+ }
72
+ let sawUrlLine = false;
73
+ const urls = [];
74
+ for (let i = bodyStart; i < lines.length; i++) {
75
+ const trimmed = lines[i].trim();
76
+ if (isSkippable(trimmed)) continue;
77
+ const spaceIdx = trimmed.search(/\s/);
78
+ const key = (spaceIdx === -1 ? trimmed : trimmed.slice(0, spaceIdx)).toLowerCase();
79
+ const value = spaceIdx === -1 ? "" : trimmed.slice(spaceIdx + 1).trim();
80
+ if (key === "url") {
81
+ sawUrlLine = true;
82
+ if (!value) {
83
+ fail(
84
+ i + 1,
85
+ `"url" needs a diagram \u2014 a link like ${EXAMPLE_URL}, or a bare diagram id.`
86
+ );
87
+ continue;
88
+ }
89
+ urls.push({ value, line: i + 1 });
90
+ continue;
91
+ }
92
+ if (GLOBAL_DIRECTIVES.has(key)) continue;
93
+ warn(
94
+ i + 1,
95
+ `Unrecognized directive "${key}" \u2014 a live link takes only "url".`
96
+ );
97
+ }
98
+ const titleIsPhrase = titleSlot !== null && /\s/.test(titleSlot);
99
+ const done = (title, id2) => ({
100
+ type: "live-link",
101
+ title,
102
+ titleLineNumber,
103
+ id: id2,
104
+ diagnostics,
105
+ error
106
+ });
107
+ if (!sawUrlLine && titleSlot === null) {
108
+ fail(
109
+ titleLineNumber,
110
+ "A live link needs a diagram \u2014 add `url <link>`, or write `live-link <id>`."
111
+ );
112
+ return done(null, null);
113
+ }
114
+ if (sawUrlLine && urls.length === 0) {
115
+ return done(titleIsPhrase ? titleSlot : null, null);
116
+ }
117
+ if (urls.length > 1) {
118
+ const [a, b] = [urls[0], urls[1]];
119
+ fail(
120
+ b.line,
121
+ `Two targets: "${a.value}" on line ${a.line} and "${b.value}" on line ${b.line}. A live link points at one diagram \u2014 delete one.`
122
+ );
123
+ return done(titleIsPhrase ? titleSlot : null, null);
124
+ }
125
+ const url = urls[0];
126
+ if (url && titleSlot !== null && !titleIsPhrase) {
127
+ fail(
128
+ titleLineNumber,
129
+ `Two targets: "${titleSlot}" on line ${titleLineNumber} and "${url.value}" on line ${url.line}. A live link points at one diagram \u2014 keep the \`url\` line and give line ${titleLineNumber} a title, or delete the \`url\` line.`
130
+ );
131
+ return done(null, null);
132
+ }
133
+ if (url) {
134
+ const pin = pinnedRevision(url.value);
135
+ if (pin !== null) {
136
+ fail(
137
+ url.line,
138
+ `A pinned revision cannot be served \u2014 a live link always shows the publisher's current version. Remove the "${pin}" from the link.`
139
+ );
140
+ return done(titleSlot, null);
141
+ }
142
+ const id2 = resolveTarget(url.value);
143
+ if (id2 === null) {
144
+ fail(
145
+ url.line,
146
+ `"${url.value}" is not a Diagrammo diagram \u2014 use a link like ${EXAMPLE_URL}, or a bare diagram id.`
147
+ );
148
+ return done(titleSlot, null);
149
+ }
150
+ return done(titleSlot, id2);
151
+ }
152
+ if (titleIsPhrase) {
153
+ fail(
154
+ titleLineNumber,
155
+ `"${titleSlot}" is a title, not a diagram id \u2014 add a \`url <link>\` line naming the diagram this points at.`
156
+ );
157
+ return done(titleSlot, null);
158
+ }
159
+ const shorthandPin = pinnedRevision(titleSlot);
160
+ if (shorthandPin !== null) {
161
+ fail(
162
+ titleLineNumber,
163
+ `A pinned revision cannot be served \u2014 a live link always shows the publisher's current version. Remove the "${shorthandPin}" from the id.`
164
+ );
165
+ return done(null, null);
166
+ }
167
+ const id = resolveTarget(titleSlot);
168
+ if (id === null) {
169
+ fail(
170
+ titleLineNumber,
171
+ `"${titleSlot}" is not a diagram id \u2014 use a bare id, or add a \`url <link>\` line.`
172
+ );
173
+ return done(null, null);
174
+ }
175
+ return done(null, id);
176
+ }
177
+
178
+ export {
179
+ parseLiveLink
180
+ };
181
+ //# sourceMappingURL=chunk-KJ3FIMPA.js.map
@@ -4,13 +4,13 @@ import {
4
4
  matchTagBlockHeading,
5
5
  stripDefaultModifier,
6
6
  tagAttrKey
7
- } from "./chunk-D5FANMSG.js";
7
+ } from "./chunk-LLA5C2TM.js";
8
8
  import {
9
9
  FILL_FAMILY_TOKENS,
10
10
  extractColor,
11
11
  measureIndent,
12
12
  parseFirstLine
13
- } from "./chunk-3KOPPSUQ.js";
13
+ } from "./chunk-IXY2IPOW.js";
14
14
  import {
15
15
  emit
16
16
  } from "./chunk-OLMWTJVU.js";
@@ -692,4 +692,4 @@ export {
692
692
  SWIMLANE_DIAGNOSTICS,
693
693
  parseSwimlane
694
694
  };
695
- //# sourceMappingURL=chunk-5VLUAAAE.js.map
695
+ //# sourceMappingURL=chunk-KZFAEMQQ.js.map
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  injectDefaultTagMetadata,
9
9
  resolveTagColor
10
- } from "./chunk-D5FANMSG.js";
10
+ } from "./chunk-LLA5C2TM.js";
11
11
  import {
12
12
  measureText,
13
13
  truncateText
@@ -547,4 +547,4 @@ export {
547
547
  computeNodeText,
548
548
  layoutMindmap
549
549
  };
550
- //# sourceMappingURL=chunk-3ZONSZOX.js.map
550
+ //# sourceMappingURL=chunk-LBEZKYAR.js.map
@@ -1,7 +1,8 @@
1
1
  import {
2
+ peelQuotedName,
2
3
  stripQuotes,
3
4
  tokenizeQuoteAware
4
- } from "./chunk-3KOPPSUQ.js";
5
+ } from "./chunk-IXY2IPOW.js";
5
6
  import {
6
7
  CATEGORICAL_COLOR_ORDER,
7
8
  RECOGNIZED_COLOR_NAMES,
@@ -48,7 +49,17 @@ function assignAutoTagColors(group, palette) {
48
49
  }
49
50
  }
50
51
  function finalizeAutoTagColors(groups, palette) {
51
- for (const g of groups) assignAutoTagColors(g, palette);
52
+ for (const g of groups) {
53
+ for (let i = 0; i < g.entries.length; i++) {
54
+ const entry = g.entries[i];
55
+ const peeled = peelQuotedName(entry.value);
56
+ if (peeled !== entry.value) g.entries[i] = { ...entry, value: peeled };
57
+ }
58
+ if (g.defaultValue !== void 0) {
59
+ g.defaultValue = peelQuotedName(g.defaultValue);
60
+ }
61
+ assignAutoTagColors(g, palette);
62
+ }
52
63
  }
53
64
  var TAG_BLOCK_NOCOLON_RE = /^tag\s+/i;
54
65
  function isAliasToken(token) {
@@ -250,4 +261,4 @@ export {
250
261
  resolveActiveTagGroup,
251
262
  matchTagBlockHeading
252
263
  };
253
- //# sourceMappingURL=chunk-D5FANMSG.js.map
264
+ //# sourceMappingURL=chunk-LLA5C2TM.js.map
@@ -12,7 +12,7 @@ import {
12
12
  normalizeNumericToken,
13
13
  parseFirstLine,
14
14
  parseSeriesNames
15
- } from "./chunk-3KOPPSUQ.js";
15
+ } from "./chunk-IXY2IPOW.js";
16
16
  import {
17
17
  RECOGNIZED_COLOR_NAMES,
18
18
  resolveColorWithDiagnostic
@@ -1204,4 +1204,4 @@ export {
1204
1204
  getSimpleChartLegendGroups,
1205
1205
  getExtendedChartLegendGroups
1206
1206
  };
1207
- //# sourceMappingURL=chunk-CY5KE2P5.js.map
1207
+ //# sourceMappingURL=chunk-MM4Z32EH.js.map