@diagrammo/dgmo 0.92.1 → 0.94.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 (174) hide show
  1. package/dist/advanced.d.ts +103 -38
  2. package/dist/advanced.js +457 -423
  3. package/dist/block.d.ts +2 -2
  4. package/dist/block.js +75 -70
  5. package/dist/{chart-meta-BBqLnv5q.d.ts → chart-meta-BbjsRY7o.d.ts} +2 -2
  6. package/dist/chart-meta.d.ts +3 -3
  7. package/dist/chart-meta.js +25 -19
  8. package/dist/{chart-types-CbXlZFLd.d.ts → chart-types-Cppnp31G.d.ts} +173 -4
  9. package/dist/{charts-d3-QUUDVETP.js → charts-d3-SZV2SFTM.js} +7 -6
  10. package/dist/{chunk-ADNIO3XY.js → chunk-2FDQEQID.js} +5 -5
  11. package/dist/{chunk-QUGC7GWB.js → chunk-2HSHWPTO.js} +15 -15
  12. package/dist/{chunk-L5NW3PVL.js → chunk-2I4UQG7W.js} +1 -1
  13. package/dist/{chunk-2YAFDND3.js → chunk-2MS623GW.js} +4 -6
  14. package/dist/{chunk-73EYNV4O.js → chunk-2XMTZ5JR.js} +4 -6
  15. package/dist/{chunk-ZJAK6C7Y.js → chunk-3PP746YM.js} +6 -1
  16. package/dist/{chunk-MDVJYRJT.js → chunk-3TWBMU7K.js} +22 -22
  17. package/dist/{chunk-FTUMRSGT.js → chunk-3ZP3QC47.js} +8 -288
  18. package/dist/{chunk-J2E7EUER.js → chunk-4EX4OKGZ.js} +86 -23
  19. package/dist/{chunk-Y2V5AEVG.js → chunk-4SP6OUO7.js} +1952 -1824
  20. package/dist/{chunk-HIWHIYLD.js → chunk-4TEPDQHJ.js} +19 -19
  21. package/dist/{chunk-DEFBUZWV.js → chunk-5HAYT43L.js} +70 -54
  22. package/dist/{chunk-6WVX4KNP.js → chunk-5ZUZZDW5.js} +97 -297
  23. package/dist/{chunk-X5BUX2GK.js → chunk-6JCTW74W.js} +7 -5
  24. package/dist/{chunk-Q6W2K33N.js → chunk-6XLMTAEX.js} +1 -1
  25. package/dist/{chunk-ONYO5WJW.js → chunk-7IOZ6JE4.js} +21 -21
  26. package/dist/chunk-7SXV7NUS.js +416 -0
  27. package/dist/{chunk-NPWVOFB3.js → chunk-7WEYXYLC.js} +1 -1
  28. package/dist/{chunk-GE7ICBX6.js → chunk-AM42TLSZ.js} +102 -97
  29. package/dist/{chunk-WLLO3PZ3.js → chunk-AYUSD4Z6.js} +45 -19
  30. package/dist/{chunk-45QUTYPD.js → chunk-B25IWGDH.js} +69 -20
  31. package/dist/{chunk-JKST4RTT.js → chunk-BH2SF4TT.js} +6 -6
  32. package/dist/{chunk-6OIMUSDX.js → chunk-C6G36F5S.js} +9 -9
  33. package/dist/{chunk-DRFGIOZ6.js → chunk-CIHHTS5B.js} +4 -6
  34. package/dist/chunk-CYTFO2LF.js +209 -0
  35. package/dist/{chunk-Q2UFOKPB.js → chunk-DDIOWNHS.js} +22 -22
  36. package/dist/{chunk-Q6ZQX2HX.js → chunk-DLJJOCIT.js} +4 -6
  37. package/dist/{chunk-26BBJUBW.js → chunk-DNM3XZCK.js} +4 -6
  38. package/dist/{chunk-AUS7V54P.js → chunk-ERT7XDQW.js} +1 -1
  39. package/dist/{chunk-7ENDOHAA.js → chunk-FMAVHTYB.js} +919 -927
  40. package/dist/{chunk-URQIWIKX.js → chunk-FWVE373X.js} +4 -4
  41. package/dist/{chunk-VOR32OHN.js → chunk-G3HZ4PGE.js} +13 -15
  42. package/dist/{chunk-RBFJT23E.js → chunk-GWQRTA5W.js} +6 -6
  43. package/dist/chunk-GXCDD6NG.js +24 -0
  44. package/dist/{chunk-3PFMGNOM.js → chunk-HHVIE45A.js} +26 -11
  45. package/dist/{chunk-MXAP37W6.js → chunk-HI6R27YA.js} +16 -7
  46. package/dist/{chunk-QQPNCXAO.js → chunk-I37S3EZE.js} +18 -18
  47. package/dist/{chunk-YITHYQCL.js → chunk-IGJEKO2P.js} +8 -8
  48. package/dist/{chunk-BZX7QCXJ.js → chunk-IHN6WDEY.js} +15 -15
  49. package/dist/{chunk-QT3KDDXK.js → chunk-IN7XI6NO.js} +0 -7
  50. package/dist/{chunk-4QLGGQNO.js → chunk-IZHGT5HD.js} +44 -18
  51. package/dist/{chunk-5SSTVFPX.js → chunk-JT2BG7LM.js} +5 -7
  52. package/dist/{chunk-2BJW7FSF.js → chunk-KBEWVCK3.js} +1 -1
  53. package/dist/{chunk-DUPZ2BBY.js → chunk-KBHT5XEY.js} +143 -6
  54. package/dist/{chunk-V4D2ZQBE.js → chunk-KRPLP5LP.js} +6 -1
  55. package/dist/{chunk-QKY6W4NA.js → chunk-KSZB7TIY.js} +25 -25
  56. package/dist/{chunk-6ZL2XYM7.js → chunk-MLY5ALOV.js} +6 -6
  57. package/dist/{chunk-VSOZZYLK.js → chunk-NERQSSYD.js} +20 -9
  58. package/dist/{chunk-OQW4ETJX.js → chunk-NM5V5EKY.js} +6 -1
  59. package/dist/{chunk-EBSFSOJC.js → chunk-NOQB4KMV.js} +22 -22
  60. package/dist/{chunk-6BNNLVAR.js → chunk-NPDVWFAQ.js} +6 -1
  61. package/dist/{chunk-FSJ3ZA6N.js → chunk-OSSTOSXU.js} +12 -12
  62. package/dist/chunk-P7TRFL4P.js +54 -0
  63. package/dist/{chunk-A4PNWAUW.js → chunk-PGSGJLUR.js} +6 -1
  64. package/dist/{chunk-S7W75MIM.js → chunk-QKPOIJBT.js} +23 -5
  65. package/dist/{chunk-YO6AQU4A.js → chunk-QPQWY5RU.js} +12 -12
  66. package/dist/{chunk-NREU4JFE.js → chunk-RBVFNUAL.js} +6 -8
  67. package/dist/{chunk-5EBYPETE.js → chunk-RESEJSCV.js} +3 -5
  68. package/dist/{chunk-BRSM6Z34.js → chunk-RITTLIDJ.js} +14 -14
  69. package/dist/{chunk-MX4SZLSV.js → chunk-S5Y3OO3V.js} +16 -8
  70. package/dist/{chunk-O5WUZGPV.js → chunk-TASRGDYP.js} +18 -18
  71. package/dist/{chunk-HXULJZA2.js → chunk-TDAGJJPZ.js} +6 -1
  72. package/dist/chunk-UCHZJJIT.js +421 -0
  73. package/dist/{chunk-42UJ23H3.js → chunk-UIEKW4SG.js} +1 -0
  74. package/dist/{chunk-WFA6IULY.js → chunk-URRAWU5D.js} +5 -0
  75. package/dist/{chunk-IGKFOHBG.js → chunk-VBMRZCMQ.js} +13 -13
  76. package/dist/{chunk-JRWUHLRP.js → chunk-VDY2GR6U.js} +51 -8
  77. package/dist/{chunk-EJS3K44P.js → chunk-VGAMBOOC.js} +5 -3
  78. package/dist/{chunk-B5PEKSRH.js → chunk-VSAKEMDD.js} +6 -1
  79. package/dist/chunk-WTTIODDV.js +9 -0
  80. package/dist/{chunk-JLU52ZDT.js → chunk-XJQ6Z3FO.js} +10 -10
  81. package/dist/{chunk-KTGZDMDX.js → chunk-XKCRKD2B.js} +140 -53
  82. package/dist/{chunk-LRP5FXST.js → chunk-YQMIKX54.js} +61 -24
  83. package/dist/{chunk-H5UEVW6Q.js → chunk-ZD3QCNB7.js} +1 -1
  84. package/dist/clock.js +168 -0
  85. package/dist/completion-registry.js +3 -1
  86. package/dist/countdown.js +36 -395
  87. package/dist/{dgmo-router-4UAPPIKN.js → dgmo-router-E5O7RJSW.js} +50 -43
  88. package/dist/{dimensions-SCNVYLRF.js → dimensions-DS6FWLRY.js} +3 -3
  89. package/dist/{d3-BThYBTQk.d.ts → export-context-Ceh3wr0E.d.ts} +2 -8
  90. package/dist/{flowchart-parser-NA75YQ77.js → flowchart-parser-NZXASOZG.js} +8 -3
  91. package/dist/{flowchart-renderer-6MGGX4RC.js → flowchart-renderer-PTCRIANF.js} +17 -19
  92. package/dist/index.d.ts +8 -7
  93. package/dist/index.js +80 -74
  94. package/dist/{layout-MBVBAMPA.js → layout-3TSVAGWH.js} +2 -2
  95. package/dist/layout-ISSBWBH7.js +24 -0
  96. package/dist/layout-IT4ZTV6C.js +24 -0
  97. package/dist/{layout-BNLFQHSB.js → layout-U3AH6M7J.js} +9 -10
  98. package/dist/layout-VC3MXRB4.js +29 -0
  99. package/dist/layout-VDCJOZSH.js +11 -0
  100. package/dist/{layout-search-PMYL3VWS.js → layout-search-BBX2BMEF.js} +11 -12
  101. package/dist/{palettes-IN7ZFRJM.js → palettes-4Y7CL2QL.js} +4 -2
  102. package/dist/{parser-QYISOAGR.js → parser-4RFY7D52.js} +8 -3
  103. package/dist/{parser-3MK56JZC.js → parser-4Y6PODW6.js} +2 -2
  104. package/dist/{parser-GX5YLRIP.js → parser-7QKQ4P4P.js} +8 -3
  105. package/dist/{parser-2NWH5JUS.js → parser-A3AN76RQ.js} +2 -1
  106. package/dist/{parser-LCJ76UXS.js → parser-BT4NI6JY.js} +5 -1
  107. package/dist/{parser-FXDS4JDK.js → parser-F7NDRPMA.js} +2 -2
  108. package/dist/{parser-BES6LV3G.js → parser-GDLKUBTO.js} +5 -1
  109. package/dist/{parser-SEUTXN6U.js → parser-KJPPUN4D.js} +2 -2
  110. package/dist/{parser-SIKL4PLF.js → parser-KMKVFET2.js} +5 -1
  111. package/dist/{parser-5LW5JDYG.js → parser-NL73FSFI.js} +5 -1
  112. package/dist/{parser-VA7ZQQTA.js → parser-NUU3DVW4.js} +5 -1
  113. package/dist/{parser-XZUKNZPB.js → parser-R3LPEQIT.js} +7 -1
  114. package/dist/{parser-X23GRTQJ.js → parser-RCIEKN7Y.js} +5 -1
  115. package/dist/{parser-L6RWDXQN.js → parser-TAYRTCPR.js} +8 -3
  116. package/dist/redraw-AHW7EUUF.js +1698 -0
  117. package/dist/redraw-STZ4WJAI.js +73 -0
  118. package/dist/{renderer-LM4ICK6I.js → renderer-2LYX6NHN.js} +4 -5
  119. package/dist/{renderer-NHTR7IRR.js → renderer-3NLDX7DQ.js} +4 -5
  120. package/dist/{renderer-TO2NVJP3.js → renderer-4SE7R22T.js} +50 -45
  121. package/dist/{renderer-3IHQI4A4.js → renderer-53B523PM.js} +11 -10
  122. package/dist/{renderer-3JY6JAQJ.js → renderer-7OGGV327.js} +5 -6
  123. package/dist/{renderer-2FVUPBGV.js → renderer-AM7P4LN7.js} +1 -1
  124. package/dist/{renderer-5VKPB4LL.js → renderer-BXD5KVSR.js} +5 -5
  125. package/dist/{renderer-OAR5VPH4.js → renderer-DAZWHNLI.js} +2 -2
  126. package/dist/{renderer-WIU5BJUK.js → renderer-DDWDCM2K.js} +2 -2
  127. package/dist/{renderer-3QAFDXEY.js → renderer-FMTLSOCX.js} +16 -12
  128. package/dist/{renderer-JEJT3YET.js → renderer-HX6ICPDX.js} +2 -3
  129. package/dist/{renderer-NDA2FFYB.js → renderer-ISQJ2ELA.js} +5 -5
  130. package/dist/{renderer-XGG2UNXT.js → renderer-IXBOT6DU.js} +3 -4
  131. package/dist/{renderer-S3YCLJKL.js → renderer-J3GPDK73.js} +20 -22
  132. package/dist/{renderer-DVNMCYHZ.js → renderer-J7ZSTJUE.js} +15 -15
  133. package/dist/{renderer-ALWVK3EJ.js → renderer-JJ4QW3SK.js} +6 -6
  134. package/dist/{renderer-RUSFL7WU.js → renderer-JYHA6R2D.js} +8 -7
  135. package/dist/{renderer-5TZVFQ7K.js → renderer-KJ3V5BYP.js} +7 -8
  136. package/dist/{renderer-RSK6QFWN.js → renderer-LNP23NSM.js} +7 -9
  137. package/dist/{renderer-ZHGHTSNG.js → renderer-M5DUMITP.js} +13 -12
  138. package/dist/{renderer-O6DY46AV.js → renderer-MWZC7TMD.js} +7 -7
  139. package/dist/{renderer-DC7C5Q3G.js → renderer-NOYLNVTI.js} +2 -2
  140. package/dist/{renderer-ISSDGK54.js → renderer-O6RP52CQ.js} +3 -3
  141. package/dist/{renderer-ZGY7P4BM.js → renderer-OUDHH5MV.js} +19 -22
  142. package/dist/{renderer-QGIHLZOJ.js → renderer-PHLCYVSN.js} +9 -10
  143. package/dist/{renderer-VPIELEE5.js → renderer-QTPWRRJ7.js} +8 -9
  144. package/dist/{renderer-LQP3AGEJ.js → renderer-RUSQJFFC.js} +3 -4
  145. package/dist/{renderer-MM27BSBO.js → renderer-TINHO2IO.js} +3 -4
  146. package/dist/{renderer-7ZZG5HR3.js → renderer-UTEEJDGB.js} +9 -9
  147. package/dist/{renderer-J5FKF423.js → renderer-W4MUMXJE.js} +7 -4
  148. package/dist/{renderer-XO57LTU4.js → renderer-WPN2SXGT.js} +5 -5
  149. package/dist/{renderer-ZZ6MWVB7.js → renderer-XCLARXCK.js} +4 -4
  150. package/dist/{renderer-J666LZXJ.js → renderer-XOWDERU2.js} +8 -8
  151. package/dist/{state-parser-TIR2ORJY.js → state-parser-KPVW5CRI.js} +8 -3
  152. package/dist/{state-renderer-G6SUXU4J.js → state-renderer-ZVEI265C.js} +18 -21
  153. package/dist/{tag-groups-DsoVpAY-.d.ts → tag-groups-DydewK3D.d.ts} +2 -173
  154. package/dist/{themes-DRNjxX7Q.d.ts → themes-DzIH3Hjv.d.ts} +3 -2
  155. package/docs/ai-integration.md +1 -1
  156. package/docs/language-reference.md +23 -2
  157. package/gallery/fixtures/whiteboard.dgmo +3 -0
  158. package/package.json +2 -6
  159. package/dist/chunk-3Y63RFJL.js +0 -75
  160. package/dist/chunk-5DH3KYFH.js +0 -20
  161. package/dist/chunk-O753JUEZ.js +0 -67
  162. package/dist/chunk-RJNZHFNG.js +0 -51
  163. package/dist/chunk-Z6DXWULM.js +0 -23
  164. package/dist/layout-5USEVQBY.js +0 -25
  165. package/dist/layout-J3AGFZZ7.js +0 -10
  166. package/dist/layout-S3RLVPH4.js +0 -25
  167. package/dist/layout-WRG4APSJ.js +0 -32
  168. package/dist/{chunk-DGUGE67L.js → chunk-CDYV46JE.js} +3 -3
  169. package/dist/{chunk-TKAB3FTK.js → chunk-DRQSB72S.js} +11 -11
  170. package/dist/{chunk-ZKP77MB3.js → chunk-FVTYJUXR.js} +5 -5
  171. package/dist/{chunk-MA42PIGJ.js → chunk-H5NVCOEJ.js} +4 -4
  172. package/dist/{chunk-BEA4D7OS.js → chunk-IXHWS2HI.js} +3 -3
  173. package/dist/{chunk-SOHZDW6N.js → chunk-UXNA2H2V.js} +3 -3
  174. package/dist/{chunk-NO3UX6AP.js → chunk-V2NQV7VL.js} +4 -4
@@ -1,15 +1,14 @@
1
- import {
2
- wrapDescriptionLines
3
- } from "./chunk-NPWVOFB3.js";
4
- import {
5
- renderInlineText
6
- } from "./chunk-S7W75MIM.js";
7
1
  import {
8
2
  ScaleContext
9
3
  } from "./chunk-24YPR5EH.js";
10
4
  import {
11
- renderIntegratedLegend
12
- } from "./chunk-NMS5XSLX.js";
5
+ layoutInlineHeader
6
+ } from "./chunk-UIEKW4SG.js";
7
+ import {
8
+ TITLE_FONT_SIZE,
9
+ TITLE_FONT_WEIGHT,
10
+ TITLE_Y
11
+ } from "./chunk-VLC6WNRD.js";
13
12
  import {
14
13
  ARROWHEAD_HEIGHT,
15
14
  ARROWHEAD_WIDTH,
@@ -18,25 +17,26 @@ import {
18
17
  HAIRLINE_DASH
19
18
  } from "./chunk-XCKNFFKM.js";
20
19
  import {
21
- layoutInlineHeader
22
- } from "./chunk-42UJ23H3.js";
20
+ renderIntegratedLegend
21
+ } from "./chunk-NMS5XSLX.js";
23
22
  import {
24
23
  getLegendExtent,
25
24
  getMaxLegendReservedHeight
26
25
  } from "./chunk-JILEYZ2V.js";
27
- import {
28
- TITLE_FONT_SIZE,
29
- TITLE_FONT_WEIGHT,
30
- TITLE_Y
31
- } from "./chunk-VLC6WNRD.js";
32
- import {
33
- FONT_FAMILY
34
- } from "./chunk-ICLB27PZ.js";
35
26
  import {
36
27
  isSequenceBlock,
37
28
  isSequenceNote,
38
29
  isSequenceSection
39
- } from "./chunk-B5PEKSRH.js";
30
+ } from "./chunk-VSAKEMDD.js";
31
+ import {
32
+ wrapDescriptionLines
33
+ } from "./chunk-7WEYXYLC.js";
34
+ import {
35
+ renderInlineText
36
+ } from "./chunk-QKPOIJBT.js";
37
+ import {
38
+ FONT_FAMILY
39
+ } from "./chunk-ICLB27PZ.js";
40
40
  import {
41
41
  resolveActiveTagGroup,
42
42
  tagAttrKey
@@ -64,7 +64,17 @@ import {
64
64
  import * as d3Selection from "d3-selection";
65
65
 
66
66
  // src/sequence/collapse.ts
67
- function applyCollapseProjection(parsed, collapsedGroups) {
67
+ function isCollapsibleGroup(group) {
68
+ return group.participantIds.length > 1;
69
+ }
70
+ function collapsedGroupId(group, groups) {
71
+ const shared = groups.some((g) => g !== group && g.name === group.name);
72
+ return shared ? `${group.name}@${group.lineNumber}` : group.name;
73
+ }
74
+ function applyCollapseProjection(parsed, requestedGroups) {
75
+ const collapsedGroups = new Set(
76
+ parsed.groups.filter((g) => requestedGroups.has(g.lineNumber) && isCollapsibleGroup(g)).map((g) => g.lineNumber)
77
+ );
68
78
  if (collapsedGroups.size === 0) {
69
79
  return {
70
80
  participants: parsed.participants,
@@ -88,37 +98,37 @@ function applyCollapseProjection(parsed, collapsedGroups) {
88
98
  return false;
89
99
  };
90
100
  const memberToGroup = /* @__PURE__ */ new Map();
91
- const collapsedGroupNames = /* @__PURE__ */ new Set();
101
+ const virtualIds = /* @__PURE__ */ new Set();
102
+ const groupById = /* @__PURE__ */ new Map();
92
103
  const byDepth = [...parsed.groups].sort((a, b) => a.depth - b.depth);
93
104
  for (const group of byDepth) {
94
105
  if (!collapsedGroups.has(group.lineNumber)) continue;
95
106
  if (insideCollapsed(group)) continue;
96
- collapsedGroupNames.add(group.name);
107
+ const id = collapsedGroupId(group, parsed.groups);
108
+ virtualIds.add(id);
109
+ groupById.set(id, group);
97
110
  for (const memberId of group.participantIds) {
98
111
  if (!memberToGroup.has(memberId)) {
99
- memberToGroup.set(memberId, group.name);
112
+ memberToGroup.set(memberId, id);
100
113
  }
101
114
  }
102
115
  }
103
116
  const participants = [];
104
117
  const insertedGroups = /* @__PURE__ */ new Set();
105
118
  for (const p of parsed.participants) {
106
- const groupName = memberToGroup.get(p.id);
107
- if (groupName) {
108
- if (!insertedGroups.has(groupName)) {
109
- insertedGroups.add(groupName);
110
- const group = parsed.groups.find(
111
- (g) => g.name === groupName && collapsedGroups.has(g.lineNumber)
112
- );
119
+ const groupId = memberToGroup.get(p.id);
120
+ if (groupId) {
121
+ if (!insertedGroups.has(groupId)) {
122
+ insertedGroups.add(groupId);
123
+ const group = groupById.get(groupId);
113
124
  participants.push({
114
- id: groupName,
115
- // already ParticipantId from memberToGroup value type
116
- label: groupName,
125
+ id: groupId,
126
+ label: group.name,
117
127
  type: "default",
118
128
  lineNumber: group.lineNumber
119
129
  });
120
130
  }
121
- } else if (collapsedGroupNames.has(p.id)) {
131
+ } else if (virtualIds.has(p.id)) {
122
132
  } else {
123
133
  participants.push(p);
124
134
  }
@@ -301,10 +311,12 @@ function wrapTextLines(text, maxWidth, fontSize) {
301
311
  );
302
312
  }
303
313
  var labelTextWidth = (boxW) => boxW - 10;
314
+ var PARTICIPANT_LABEL_PAD_V = 2;
315
+ var participantLabelHeight = (lines, fontSize) => lines * (fontSize + 2) + PARTICIPANT_LABEL_PAD_V * 2;
304
316
  function splitParticipantLabel(label, maxWidth, fontSize) {
305
317
  if (measureText(label, fontSize) <= maxWidth) return [label];
306
318
  if (label.includes(" ")) {
307
- return wrapLabelWords(label.split(" "), maxWidth, fontSize);
319
+ return wrapLabelWords(label.split(" "), maxWidth, fontSize, " ");
308
320
  }
309
321
  if (/[-_:/]/.test(label)) {
310
322
  const parts = label.split(/[-_:/]+/);
@@ -316,11 +328,11 @@ function splitParticipantLabel(label, maxWidth, fontSize) {
316
328
  }
317
329
  return [label];
318
330
  }
319
- function wrapLabelWords(words, maxWidth, fontSize) {
331
+ function wrapLabelWords(words, maxWidth, fontSize, sep = "") {
320
332
  const lines = [];
321
333
  let current = "";
322
334
  for (const word of words) {
323
- const test = current ? current + word : word;
335
+ const test = current ? current + sep + word : word;
324
336
  if (measureText(test, fontSize) > maxWidth && current) {
325
337
  lines.push(current);
326
338
  current = word;
@@ -615,6 +627,22 @@ function applyPositionOverrides(participants) {
615
627
  }
616
628
  return result;
617
629
  }
630
+ function foldCollapsedParticipants(parsed, view) {
631
+ const expanded = applyPositionOverrides(
632
+ applyGroupOrdering(parsed.participants, parsed.groups, parsed.messages)
633
+ );
634
+ const byId = new Map(view.participants.map((p) => [p.id, p]));
635
+ const result = [];
636
+ const placed = /* @__PURE__ */ new Set();
637
+ for (const p of expanded) {
638
+ const id = view.collapsedGroupIds.get(p.id) ?? p.id;
639
+ const target = byId.get(id);
640
+ if (!target || placed.has(id)) continue;
641
+ placed.add(id);
642
+ result.push(target);
643
+ }
644
+ return result;
645
+ }
618
646
  function applyGroupOrdering(participants, groups, messages = []) {
619
647
  const idToGroup = /* @__PURE__ */ new Map();
620
648
  for (const group of groups) {
@@ -686,10 +714,49 @@ function isSectionCollapsed(sec, collapsedSections) {
686
714
  return collapsedSections?.has(sec.lineNumber) ?? false;
687
715
  }
688
716
  function layoutSequence(parsed, containerWidth, options) {
717
+ let layout = layoutSequencePass(parsed, containerWidth, options);
718
+ if (options?.exportWidth) return layout;
719
+ const target = containerWidth - 1;
720
+ let prev = null;
721
+ for (let i = 0; i < 4 && layout && !layout.ctx.isBelowFloor; i++) {
722
+ if (layout.svgWidth <= containerWidth) return layout;
723
+ let factor = layout.ctx.factor * target / layout.svgWidth;
724
+ if (prev && prev.ctx.factor !== layout.ctx.factor) {
725
+ const slope = (prev.svgWidth - layout.svgWidth) / (prev.ctx.factor - layout.ctx.factor);
726
+ if (slope > 0)
727
+ factor = layout.ctx.factor - (layout.svgWidth - target) / slope;
728
+ }
729
+ prev = layout;
730
+ layout = layoutSequencePass(
731
+ parsed,
732
+ containerWidth,
733
+ options,
734
+ ScaleContext.fromFactor(factor)
735
+ );
736
+ }
737
+ if (layout && !layout.ctx.isBelowFloor && layout.svgWidth > containerWidth) {
738
+ layout = layoutSequencePass(
739
+ parsed,
740
+ containerWidth,
741
+ options,
742
+ ScaleContext.fromFactor(0)
743
+ );
744
+ }
745
+ return layout;
746
+ }
747
+ function layoutSequencePass(parsed, containerWidth, options, fit) {
689
748
  const { title, options: parsedOptions } = parsed;
690
- const effectiveCollapsedGroups = options?.collapsedGroups ? new Set(options.collapsedGroups) : new Set(
749
+ const requestedCollapsedGroups = options?.collapsedGroups ? new Set(options.collapsedGroups) : new Set(
691
750
  parsed.groups.filter((g) => g.collapsed).map((g) => g.lineNumber)
692
751
  );
752
+ const collapsibleGroupLines = new Set(
753
+ parsed.groups.filter(isCollapsibleGroup).map((g) => g.lineNumber)
754
+ );
755
+ const effectiveCollapsedGroups = new Set(
756
+ parsed.groups.map((g) => g.lineNumber).filter(
757
+ (line) => requestedCollapsedGroups.has(line) && collapsibleGroupLines.has(line)
758
+ )
759
+ );
693
760
  const collapsed = effectiveCollapsedGroups.size > 0 ? applyCollapseProjection(parsed, effectiveCollapsedGroups) : null;
694
761
  const messages = collapsed ? collapsed.messages : parsed.messages;
695
762
  const elements = collapsed ? collapsed.elements : parsed.elements;
@@ -709,9 +776,8 @@ function layoutSequence(parsed, containerWidth, options) {
709
776
  if (number === void 0) return step.label;
710
777
  return step.label ? `${number}. ${step.label}` : String(number);
711
778
  };
712
- const sourceParticipants = collapsed ? collapsed.participants : parsed.participants;
713
- const participants = applyPositionOverrides(
714
- applyGroupOrdering(sourceParticipants, groups, messages)
779
+ const participants = collapsed ? foldCollapsedParticipants(parsed, collapsed) : applyPositionOverrides(
780
+ applyGroupOrdering(parsed.participants, parsed.groups, parsed.messages)
715
781
  );
716
782
  if (participants.length === 0) return null;
717
783
  const groupBoundaryIds = /* @__PURE__ */ new Set();
@@ -752,10 +818,9 @@ function layoutSequence(parsed, containerWidth, options) {
752
818
  participants.length * effectiveGap,
753
819
  uniformBoxWidth + 40
754
820
  );
755
- const ctx = options?.exportWidth ? ScaleContext.identity() : ScaleContext.from(containerWidth, idealWidth);
821
+ const ctx = fit ?? (options?.exportWidth ? ScaleContext.identity() : ScaleContext.from(containerWidth, idealWidth));
756
822
  const sGap = ctx.structural(effectiveGap);
757
823
  const sBoxW = ctx.structural(uniformBoxWidth);
758
- const sBoxH = ctx.structural(PARTICIPANT_BOX_HEIGHT);
759
824
  const sTopMargin = ctx.aesthetic(TOP_MARGIN);
760
825
  const sTitleHeight = ctx.aesthetic(TITLE_HEIGHT);
761
826
  const sParticipantYOffset = ctx.aesthetic(PARTICIPANT_Y_OFFSET);
@@ -777,6 +842,20 @@ function layoutSequence(parsed, containerWidth, options) {
777
842
  const sNoteLaneMax = sGap - sActivationWidth - sNoteGap;
778
843
  const sLabelFontSize = ctx.text(LABEL_FONT_SIZE);
779
844
  const sLabelTextWidth = labelTextWidth(sBoxW);
845
+ let maxInBoxLines = 1;
846
+ for (const p of participants) {
847
+ if (p.type === "actor") continue;
848
+ const n = splitParticipantLabel(
849
+ p.label,
850
+ sLabelTextWidth,
851
+ sLabelFontSize
852
+ ).length;
853
+ maxInBoxLines = Math.max(maxInBoxLines, n);
854
+ }
855
+ const sBoxH = Math.max(
856
+ ctx.structural(PARTICIPANT_BOX_HEIGHT),
857
+ participantLabelHeight(maxInBoxLines, sLabelFontSize)
858
+ );
780
859
  const participantIndexMap = /* @__PURE__ */ new Map();
781
860
  participants.forEach((p, i) => participantIndexMap.set(p.id, i));
782
861
  const effectiveNotePosition = (note) => {
@@ -1398,8 +1477,10 @@ function layoutSequence(parsed, containerWidth, options) {
1398
1477
  }
1399
1478
  };
1400
1479
  for (let pass = 0; pass < 4; pass++) {
1401
- let contentLeft = 0;
1402
- let contentRight = svgWidth;
1480
+ const extentLeft = offsetX - leftMargin;
1481
+ const extentRight = extentLeft + totalWidth;
1482
+ let contentLeft = extentLeft;
1483
+ let contentRight = extentRight;
1403
1484
  for (const step of renderSteps) {
1404
1485
  const displayLabel = displayMessageLabel(step);
1405
1486
  if (!displayLabel) continue;
@@ -1428,8 +1509,8 @@ function layoutSequence(parsed, containerWidth, options) {
1428
1509
  scanNotes(elements, acc);
1429
1510
  contentRight = acc.right;
1430
1511
  }
1431
- const neededLeftPad = Math.max(0, -contentLeft);
1432
- const neededRightPad = Math.max(0, contentRight - svgWidth);
1512
+ const neededLeftPad = Math.max(0, extentLeft - contentLeft);
1513
+ const neededRightPad = Math.max(0, contentRight - extentRight);
1433
1514
  if (neededLeftPad <= 0.5 && neededRightPad <= 0.5) break;
1434
1515
  leftMargin += neededLeftPad;
1435
1516
  rightMargin += neededRightPad;
@@ -1448,7 +1529,8 @@ function layoutSequence(parsed, containerWidth, options) {
1448
1529
  const padBottom = hasExpandedGroup ? groupBottomPad(group.depth, maxGroupDepth) : 0;
1449
1530
  const height = sBoxH + padTop + padBottom;
1450
1531
  const barHeight = ctx.structural(COLLAPSE_BAR_HEIGHT);
1451
- collapsedGroupBoxes.set(group.name, {
1532
+ collapsedGroupBoxes.set(collapsedGroupId(group, parsed.groups), {
1533
+ name: group.name,
1452
1534
  lineNumber: group.lineNumber,
1453
1535
  depth: group.depth,
1454
1536
  participantIds: group.participantIds,
@@ -1992,7 +2074,14 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1992
2074
  const groupTagColor = getTagColor(groupTagValue);
1993
2075
  const fillColor = groupTagColor ? mix(groupTagColor, themeBaseBg(palette, isDark), isDark ? 15 : 20) : isDark ? palette.surface : palette.bg;
1994
2076
  const strokeColor = groupTagColor ?? palette.textMuted;
1995
- const groupG = svg.append("g").attr("class", "group-box-wrapper").attr("data-group-toggle", "").attr("data-group-line", String(group.lineNumber)).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "true").attr("aria-label", groupToggleName(group.name, group.participantIds)).attr("cursor", "pointer");
2077
+ const source = parsed.groups.find((g) => g.lineNumber === group.lineNumber);
2078
+ const collapsible = source !== void 0 && isCollapsibleGroup(source);
2079
+ const groupG = svg.append("g").attr("class", "group-box-wrapper");
2080
+ if (collapsible) groupG.attr("data-group-toggle", "");
2081
+ groupG.attr("data-group-line", String(group.lineNumber));
2082
+ if (collapsible) {
2083
+ groupG.attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "true").attr("aria-label", groupToggleName(group.name, group.participantIds)).attr("cursor", "pointer");
2084
+ }
1996
2085
  groupG.append("rect").attr("x", frame.x).attr("y", frame.y).attr("width", frame.width).attr("height", frame.height).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("pointer-events", "none").attr("class", "group-box");
1997
2086
  groupG.append("rect").attr("x", frame.x).attr("y", frame.y).attr("width", frame.width).attr("height", frame.headerHeight).attr("fill", "transparent").attr("class", "group-label-hit");
1998
2087
  groupG.append("text").attr("x", frame.labelX).attr("y", frame.labelY).attr("text-anchor", "middle").attr("fill", strokeColor).attr("font-size", sGroupLabelSize).attr("font-weight", GROUP_LABEL_WEIGHT).attr("opacity", 0.7).attr("pointer-events", "none").attr("class", "group-label").text(group.name);
@@ -2029,10 +2118,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2029
2118
  const participantG = svg.select(
2030
2119
  `.participant[data-participant-id="${participant.id}"]`
2031
2120
  );
2032
- participantG.attr("data-group-toggle", "").attr("data-group-line", String(meta.lineNumber)).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "false").attr(
2033
- "aria-label",
2034
- groupToggleName(participant.id, meta.participantIds)
2035
- ).attr("cursor", "pointer");
2121
+ participantG.attr("data-group-toggle", "").attr("data-group-line", String(meta.lineNumber)).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "false").attr("aria-label", groupToggleName(meta.name, meta.participantIds)).attr("cursor", "pointer");
2036
2122
  const pFill = effectiveTagColor ? mix(effectiveTagColor, themeBaseBg(palette, isDark), isDark ? 30 : 40) : isDark ? mix(palette.overlay, palette.surface, 50) : mix(palette.bg, palette.surface, 50);
2037
2123
  const pStroke = effectiveTagColor ?? palette.border;
2038
2124
  participantG.append("rect").attr("x", -boxW / 2).attr("y", -padTop).attr("width", boxW).attr("height", fullH).attr("rx", 6).attr("fill", pFill).attr("stroke", pStroke).attr("stroke-width", 1.5);
@@ -2376,6 +2462,7 @@ export {
2376
2462
  buildRenderSequence,
2377
2463
  computeActivations,
2378
2464
  applyPositionOverrides,
2465
+ foldCollapsedParticipants,
2379
2466
  applyGroupOrdering,
2380
2467
  layoutSequence,
2381
2468
  renderSequenceDiagram,
@@ -1,3 +1,9 @@
1
+ import {
2
+ getExtendedChartLegendGroups,
3
+ getSimpleChartLegendGroups,
4
+ parseChart,
5
+ parseExtendedChart
6
+ } from "./chunk-H6BT45SN.js";
1
7
  import {
2
8
  computeQuadrantPointLabels,
3
9
  rectCircleOverlap,
@@ -6,17 +12,6 @@ import {
6
12
  import {
7
13
  MIN_CANVAS_WIDTH
8
14
  } from "./chunk-EPDBWATV.js";
9
- import {
10
- getExtendedChartLegendGroups,
11
- getSimpleChartLegendGroups,
12
- parseChart,
13
- parseExtendedChart
14
- } from "./chunk-H6BT45SN.js";
15
- import {
16
- EMPHASIS_DIM_OPACITY,
17
- EMPHASIS_DIM_TEXT_OPACITY,
18
- resolveEmphasis
19
- } from "./chunk-2CW5ZTNH.js";
20
15
  import {
21
16
  EXPORT_HEIGHT,
22
17
  EXPORT_WIDTH,
@@ -25,19 +20,24 @@ import {
25
20
  initD3Chart,
26
21
  renderChartTitle,
27
22
  resolveExportPalette
28
- } from "./chunk-Q6W2K33N.js";
23
+ } from "./chunk-6XLMTAEX.js";
29
24
  import {
30
- layoutInlineHeader
31
- } from "./chunk-42UJ23H3.js";
25
+ EMPHASIS_DIM_OPACITY,
26
+ EMPHASIS_DIM_TEXT_OPACITY,
27
+ resolveEmphasis
28
+ } from "./chunk-2CW5ZTNH.js";
32
29
  import {
33
- computeLegendLayout
34
- } from "./chunk-JILEYZ2V.js";
30
+ layoutInlineHeader
31
+ } from "./chunk-UIEKW4SG.js";
35
32
  import {
36
33
  TITLE_FONT_SIZE,
37
34
  TITLE_FONT_WEIGHT,
38
35
  TITLE_OFFSET,
39
36
  TITLE_Y
40
37
  } from "./chunk-VLC6WNRD.js";
38
+ import {
39
+ computeLegendLayout
40
+ } from "./chunk-JILEYZ2V.js";
41
41
  import {
42
42
  FONT_FAMILY
43
43
  } from "./chunk-ICLB27PZ.js";
@@ -373,6 +373,7 @@ function drawValueLabel(svg, text, x, y, color, anchor = "middle") {
373
373
  svg.append("text").attr("x", x).attr("y", y).attr("text-anchor", anchor).attr("fill", color).attr("font-size", VALUE_FONT).attr("font-family", FONT_FAMILY).text(text);
374
374
  }
375
375
  var LABEL_ROTATE_DEG = 40;
376
+ var NEVER_THIN_MAX = 12;
376
377
  var LABEL_GAP = 8;
377
378
  var LABEL_LINE_HEIGHT = 1.25;
378
379
  function spreadIndices(total, count) {
@@ -406,12 +407,12 @@ function planCategoryLabels(labels, slot, font = TICK_FONT) {
406
407
  };
407
408
  }
408
409
  const flatStride = Math.ceil(flatNeeds / slot);
409
- if (flatStride <= 2) {
410
+ if (flatStride <= 2 && n > NEVER_THIN_MAX) {
410
411
  return { rotate: false, stride: 2, height: flatHeight, keep: all(2) };
411
412
  }
412
413
  const rad = LABEL_ROTATE_DEG * Math.PI / 180;
413
414
  const rotNeeds = font * LABEL_LINE_HEIGHT / Math.sin(rad);
414
- const stride = Math.max(1, Math.ceil(rotNeeds / slot));
415
+ const stride = n <= NEVER_THIN_MAX ? 1 : Math.max(1, Math.ceil(rotNeeds / slot));
415
416
  return {
416
417
  rotate: true,
417
418
  stride,
@@ -1218,6 +1219,13 @@ function renderFunnel(svg, chart, width, height, colors, palette, isDark, topIns
1218
1219
  }
1219
1220
 
1220
1221
  // src/charts-d3/heatmap.ts
1222
+ var ROW_LABEL_SHARE = 0.35;
1223
+ var COL_LABEL_MAX_W = 140;
1224
+ var COL_BAND_SHARE = 0.3;
1225
+ var COL_ANGLE = 40 * Math.PI / 180;
1226
+ var ROW_FONT = 13;
1227
+ var COL_FONT = 12;
1228
+ var EDGE_GAP = 4;
1221
1229
  function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bgColor, topInset) {
1222
1230
  const rows = chart.heatmapRows ?? [];
1223
1231
  if (rows.length === 0) return;
@@ -1256,11 +1264,39 @@ function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bg
1256
1264
  const targetL = isDark ? 72 : 30;
1257
1265
  return hslToHex(h, targetS, targetL);
1258
1266
  };
1259
- const rowLabelW = Math.max(0, ...rows.map((r) => measureText(r.label, 13))) + 16;
1267
+ const rowLabelMax = width * ROW_LABEL_SHARE;
1268
+ const rowShown = rows.map(
1269
+ (r) => truncateText(r.label, ROW_FONT, rowLabelMax)
1270
+ );
1271
+ const rowLabelW = Math.max(0, ...rowShown.map((t) => measureText(t, ROW_FONT))) + 16;
1260
1272
  const left = 20 + rowLabelW;
1261
- const top = topInset + 28;
1262
- const right = 24;
1263
1273
  const bottom = 24;
1274
+ const cw0 = (width - left - 24) / ncols;
1275
+ const rotate = cols.some((c) => measureText(c, COL_FONT) > cw0 * 0.85);
1276
+ const colShown = rotate ? cols.map(
1277
+ (c) => truncateText(
1278
+ c,
1279
+ COL_FONT,
1280
+ Math.min(
1281
+ COL_LABEL_MAX_W,
1282
+ height * COL_BAND_SHARE / Math.sin(COL_ANGLE)
1283
+ )
1284
+ )
1285
+ ) : cols;
1286
+ const colW = colShown.map((c) => measureText(c, COL_FONT));
1287
+ const sin = Math.sin(COL_ANGLE);
1288
+ const cos = Math.cos(COL_ANGLE);
1289
+ const band = rotate ? Math.max(28, 8 + Math.max(0, ...colW) * sin + COL_FONT * cos + EDGE_GAP) : 28;
1290
+ const top = topInset + band;
1291
+ let right = 24;
1292
+ if (rotate) {
1293
+ const P = width - left;
1294
+ colW.forEach((w, i) => {
1295
+ const reach = w * cos + COL_FONT * 0.25 * sin;
1296
+ const need = P - ncols * (P - EDGE_GAP - reach) / (i + 0.5);
1297
+ right = Math.max(right, need);
1298
+ });
1299
+ }
1264
1300
  const plotW = width - left - right;
1265
1301
  const plotH = height - top - bottom;
1266
1302
  const cw = plotW / ncols;
@@ -1276,10 +1312,10 @@ function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bg
1276
1312
  11,
1277
1313
  Math.min(ch * 0.55, cw * 0.7 * REF / maxValueW)
1278
1314
  );
1279
- const rotate = cols.some((c) => measureText(c, 12) > cw * 0.85);
1280
1315
  cols.forEach((c, ci) => {
1281
1316
  const x = left + ci * cw + cw / 2;
1282
- const t = svg.append("text").attr("class", "dgmo-axis-label").attr("data-filter-attr", "data-col-key").attr("data-filter-value", c).attr("fill", textColor).attr("font-size", 12).attr("font-family", FONT_FAMILY).text(c);
1317
+ const t = svg.append("text").attr("class", "dgmo-axis-label").attr("data-filter-attr", "data-col-key").attr("data-filter-value", c).attr("fill", textColor).attr("font-size", COL_FONT).attr("font-family", FONT_FAMILY).text(colShown[ci]);
1318
+ if (colShown[ci] !== c) t.append("title").text(c);
1283
1319
  if (rotate) {
1284
1320
  t.attr("transform", `translate(${x},${top - 8}) rotate(-40)`).attr(
1285
1321
  "text-anchor",
@@ -1290,7 +1326,8 @@ function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bg
1290
1326
  }
1291
1327
  });
1292
1328
  rows.forEach((row, ri) => {
1293
- svg.append("text").attr("class", "dgmo-axis-label").attr("data-filter-attr", "data-row-key").attr("data-filter-value", row.label).attr("x", left - 10).attr("y", top + ri * ch + ch / 2 + 4).attr("text-anchor", "end").attr("fill", textColor).attr("font-size", 13).attr("font-family", FONT_FAMILY).text(row.label);
1329
+ const rowLabel = svg.append("text").attr("class", "dgmo-axis-label").attr("data-filter-attr", "data-row-key").attr("data-filter-value", row.label).attr("x", left - 10).attr("y", top + ri * ch + ch / 2 + 4).attr("text-anchor", "end").attr("fill", textColor).attr("font-size", ROW_FONT).attr("font-family", FONT_FAMILY).text(rowShown[ri]);
1330
+ if (rowShown[ri] !== row.label) rowLabel.append("title").text(row.label);
1294
1331
  row.values.forEach((v, ci) => {
1295
1332
  const t = maxValue === minValue ? 0.5 : (v - minValue) / (maxValue - minValue);
1296
1333
  const ramp = gradientAt(t);
@@ -25,7 +25,7 @@ import {
25
25
 
26
26
  // src/body/renderer.ts
27
27
  import * as d3Selection from "d3-selection";
28
- var esc = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
28
+ var esc = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
29
29
  function partAttrs(line, emph, tagAttr) {
30
30
  const tag = tagAttr && emph ? ` ${tagAttr}="${esc(emph)}"` : "";
31
31
  return ` class="dgmo-body-part" data-line-number="${line}" data-emph-key="${esc(emph)}"${tag}`;
package/dist/clock.js CHANGED
@@ -196,6 +196,174 @@ function handAngles(h, m, s) {
196
196
  };
197
197
  }
198
198
 
199
+ // src/colors.ts
200
+ var nord = {
201
+ // Polar Night (dark)
202
+ nord0: "#2e3440",
203
+ nord1: "#3b4252",
204
+ nord2: "#434c5e",
205
+ nord3: "#4c566a",
206
+ // Snow Storm (light)
207
+ nord4: "#d8dee9",
208
+ nord5: "#e5e9f0",
209
+ nord6: "#eceff4",
210
+ // Frost (accent blues)
211
+ nord7: "#8fbcbb",
212
+ nord8: "#88c0d0",
213
+ nord9: "#81a1c1",
214
+ nord10: "#5e81ac",
215
+ // Aurora (colors)
216
+ nord11: "#bf616a",
217
+ // red
218
+ nord12: "#d08770",
219
+ // orange
220
+ nord13: "#ebcb8b",
221
+ // yellow
222
+ nord14: "#a3be8c",
223
+ // green
224
+ nord15: "#b48ead"
225
+ // purple
226
+ };
227
+ var colorNames = {
228
+ red: nord.nord11,
229
+ orange: nord.nord12,
230
+ yellow: nord.nord13,
231
+ green: nord.nord14,
232
+ blue: nord.nord10,
233
+ purple: nord.nord15,
234
+ teal: nord.nord7,
235
+ cyan: nord.nord8,
236
+ gray: nord.nord3,
237
+ black: nord.nord0,
238
+ white: nord.nord6
239
+ };
240
+ var RECOGNIZED_COLOR_NAMES = Object.freeze([
241
+ "red",
242
+ "orange",
243
+ "yellow",
244
+ "green",
245
+ "blue",
246
+ "purple",
247
+ "teal",
248
+ "cyan",
249
+ "gray",
250
+ "black",
251
+ "white"
252
+ ]);
253
+ var CATEGORICAL_COLOR_ORDER = Object.freeze([
254
+ "red",
255
+ "green",
256
+ "blue",
257
+ "yellow",
258
+ "teal",
259
+ "purple",
260
+ "orange",
261
+ "cyan"
262
+ ]);
263
+ var INVALID_CSS_COLOR_HEX = Object.freeze({
264
+ pink: "#ffc0cb",
265
+ hotpink: "#ff69b4",
266
+ deeppink: "#ff1493",
267
+ lightpink: "#ffb6c1",
268
+ palevioletred: "#db7093",
269
+ crimson: "#dc143c",
270
+ scarlet: "#ff2400",
271
+ firebrick: "#b22222",
272
+ darkred: "#8b0000",
273
+ maroon: "#800000",
274
+ salmon: "#fa8072",
275
+ lightsalmon: "#ffa07a",
276
+ darksalmon: "#e9967a",
277
+ coral: "#ff7f50",
278
+ lightcoral: "#f08080",
279
+ tomato: "#ff6347",
280
+ orangered: "#ff4500",
281
+ darkorange: "#ff8c00",
282
+ gold: "#ffd700",
283
+ goldenrod: "#daa520",
284
+ darkgoldenrod: "#b8860b",
285
+ khaki: "#f0e68c",
286
+ darkkhaki: "#bdb76b",
287
+ amber: "#ffbf00",
288
+ lavender: "#e6e6fa",
289
+ violet: "#ee82ee",
290
+ magenta: "#ff00ff",
291
+ fuchsia: "#ff00ff",
292
+ orchid: "#da70d6",
293
+ plum: "#dda0dd",
294
+ indigo: "#4b0082",
295
+ navy: "#000080",
296
+ midnightblue: "#191970",
297
+ darkblue: "#00008b",
298
+ mediumblue: "#0000cd",
299
+ royalblue: "#4169e1",
300
+ cornflowerblue: "#6495ed",
301
+ dodgerblue: "#1e90ff",
302
+ deepskyblue: "#00bfff",
303
+ skyblue: "#87ceeb",
304
+ lightskyblue: "#87cefa",
305
+ lightblue: "#add8e6",
306
+ powderblue: "#b0e0e6",
307
+ steelblue: "#4682b4",
308
+ slateblue: "#6a5acd",
309
+ cadetblue: "#5f9ea0",
310
+ turquoise: "#40e0d0",
311
+ aqua: "#00ffff",
312
+ aquamarine: "#7fffd4",
313
+ lime: "#00ff00",
314
+ limegreen: "#32cd32",
315
+ lightgreen: "#90ee90",
316
+ palegreen: "#98fb98",
317
+ seagreen: "#2e8b57",
318
+ mediumseagreen: "#3cb371",
319
+ forestgreen: "#228b22",
320
+ darkgreen: "#006400",
321
+ olive: "#808000",
322
+ olivedrab: "#6b8e23",
323
+ darkolivegreen: "#556b2f",
324
+ chartreuse: "#7fff00",
325
+ lawngreen: "#7cfc00",
326
+ springgreen: "#00ff7f",
327
+ greenyellow: "#adff2f",
328
+ brown: "#a52a2a",
329
+ sienna: "#a0522d",
330
+ chocolate: "#d2691e",
331
+ peru: "#cd853f",
332
+ tan: "#d2b48c",
333
+ beige: "#f5f5dc",
334
+ wheat: "#f5deb3",
335
+ ivory: "#fffff0",
336
+ silver: "#c0c0c0",
337
+ lightgray: "#d3d3d3",
338
+ lightgrey: "#d3d3d3",
339
+ darkgray: "#a9a9a9",
340
+ darkgrey: "#a9a9a9",
341
+ dimgray: "#696969",
342
+ dimgrey: "#696969",
343
+ slategray: "#708090",
344
+ slategrey: "#708090",
345
+ gainsboro: "#dcdcdc",
346
+ grey: "#808080"
347
+ });
348
+ var seriesColors = [
349
+ nord.nord10,
350
+ // blue
351
+ nord.nord14,
352
+ // green
353
+ nord.nord13,
354
+ // yellow
355
+ nord.nord12,
356
+ // orange
357
+ nord.nord15,
358
+ // purple
359
+ nord.nord11,
360
+ // red
361
+ nord.nord7,
362
+ // teal
363
+ nord.nord8
364
+ // light blue
365
+ ];
366
+
199
367
  // src/palettes/color-utils.ts
200
368
  var MIX_CACHE = /* @__PURE__ */ new Map();
201
369
  var MIX_CACHE_MAX = 5e3;