@diagrammo/dgmo 0.90.0 → 0.91.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 (179) hide show
  1. package/dist/advanced.d.ts +156 -2
  2. package/dist/advanced.js +558 -115
  3. package/dist/block.d.ts +10 -1
  4. package/dist/block.js +46 -39
  5. package/dist/{calculator-PX3JHKAS.js → calculator-3LZUWOBK.js} +1 -1
  6. package/dist/chart-meta.js +12 -12
  7. package/dist/{charts-d3-QW4ERNUE.js → charts-d3-YXD6VGZQ.js} +3 -3
  8. package/dist/{chunk-64KSPLU2.js → chunk-273GB7WK.js} +4 -4
  9. package/dist/{chunk-GYBKG4Z6.js → chunk-2A4OFZ2Z.js} +2 -2
  10. package/dist/{chunk-YWRZG6GN.js → chunk-2AM6VA3A.js} +8 -8
  11. package/dist/{chunk-PQ5NW3QZ.js → chunk-2UV627GG.js} +4 -4
  12. package/dist/{chunk-AAC3XQWV.js → chunk-37QQXKFV.js} +8 -9
  13. package/dist/{chunk-RCBHL2B5.js → chunk-3LINSNJT.js} +112 -112
  14. package/dist/{chunk-5TZPIKNV.js → chunk-3SLRZKLB.js} +2 -2
  15. package/dist/{chunk-X3WYJ5T7.js → chunk-3YTAOMMN.js} +1 -1
  16. package/dist/{chunk-A5EE66RQ.js → chunk-53BJIOLF.js} +1 -1
  17. package/dist/{chunk-QRIW46LR.js → chunk-57L2JPP2.js} +6 -2
  18. package/dist/{chunk-IIOLFAGJ.js → chunk-5DIBB2QG.js} +51 -32
  19. package/dist/{chunk-7Z2VFRP5.js → chunk-5U6DXIMV.js} +47 -24
  20. package/dist/{chunk-5M6PMV5Z.js → chunk-5VPWIC6T.js} +3 -3
  21. package/dist/{chunk-SLO22FPS.js → chunk-634LDSN6.js} +1 -1
  22. package/dist/{chunk-G5BGW4BX.js → chunk-6NO3MNBC.js} +3 -3
  23. package/dist/{chunk-NUYWNKHH.js → chunk-6QEXWMBP.js} +12 -16
  24. package/dist/{chunk-POBNN5DP.js → chunk-7BBRSOKS.js} +2 -2
  25. package/dist/{chunk-NFWRIC2V.js → chunk-AR4QVMWG.js} +4 -1
  26. package/dist/{chunk-JRQ4LBQI.js → chunk-B6EUFLRP.js} +4 -4
  27. package/dist/{chunk-LNQDICFJ.js → chunk-CPGKRI7H.js} +5 -8
  28. package/dist/{chunk-ZNNVI5SR.js → chunk-CU2PZLZP.js} +53 -31
  29. package/dist/{chunk-LBRHDWEA.js → chunk-CVZBLHHW.js} +1 -1
  30. package/dist/{chunk-S4LLHDGK.js → chunk-CXIPV2FY.js} +3 -3
  31. package/dist/{chunk-ICYPGWOV.js → chunk-D7DXNQW5.js} +2 -2
  32. package/dist/{chunk-54YUDXGP.js → chunk-D7PP35BA.js} +1 -1
  33. package/dist/{chunk-RRBV4HIM.js → chunk-DLX7MEN4.js} +1 -1
  34. package/dist/{chunk-S7C32S2T.js → chunk-EDPDAUBL.js} +2 -2
  35. package/dist/{chunk-LC5LY5V2.js → chunk-EP7BT3HU.js} +1 -1
  36. package/dist/{chunk-ICZ7M6IZ.js → chunk-EQJ3U5EW.js} +1 -1
  37. package/dist/{chunk-K4GUO7FV.js → chunk-F2436VRR.js} +1 -1
  38. package/dist/{chunk-5M52RPAS.js → chunk-F26ZPBSF.js} +2 -2
  39. package/dist/{chunk-3BQCSQQJ.js → chunk-FJCYK4K3.js} +11 -11
  40. package/dist/{chunk-PXEUQ7EG.js → chunk-G22UV5AF.js} +4 -4
  41. package/dist/{chunk-CUY56BK4.js → chunk-G3EUQMV4.js} +3 -3
  42. package/dist/{chunk-I6FWHICD.js → chunk-GCDW3WAY.js} +5 -5
  43. package/dist/{chunk-WHRIN7N3.js → chunk-HFG7KQOY.js} +12 -14
  44. package/dist/{chunk-SVQDLYX7.js → chunk-HLVGZXM5.js} +1 -1
  45. package/dist/{chunk-3HBR3YAN.js → chunk-HSGWR2FL.js} +6 -6
  46. package/dist/{chunk-RNXX2GOQ.js → chunk-HWXUQCDY.js} +2 -2
  47. package/dist/{chunk-YE7D2S75.js → chunk-HYV6GSXM.js} +5 -2
  48. package/dist/{chunk-AHWA36O7.js → chunk-II4XJETG.js} +1 -1
  49. package/dist/{chunk-EB7AEM2H.js → chunk-IMKPFW67.js} +3 -3
  50. package/dist/{chunk-C4W62JZO.js → chunk-IS6WFBX7.js} +2 -2
  51. package/dist/{chunk-SMEVBJJJ.js → chunk-IUBCDNT2.js} +1 -1
  52. package/dist/{chunk-TQ644YGV.js → chunk-IWTUXGHN.js} +3 -3
  53. package/dist/{chunk-PNCKZFPE.js → chunk-J2SQNZ6D.js} +1 -1
  54. package/dist/{chunk-YKGUSW6D.js → chunk-JA2S7PHR.js} +7 -7
  55. package/dist/{chunk-IRVQT4GR.js → chunk-JJQWCI35.js} +2 -2
  56. package/dist/chunk-JJUDOR4I.js +110 -0
  57. package/dist/{chunk-VCHYS3RD.js → chunk-K3BYD3WU.js} +1 -1
  58. package/dist/{chunk-EEYQFJVK.js → chunk-KFXY5IW2.js} +2 -2
  59. package/dist/{chunk-Y6GQQ4Y2.js → chunk-LKR4FACF.js} +1 -3
  60. package/dist/{chunk-IJ27L3R4.js → chunk-MA42PIGJ.js} +1 -1
  61. package/dist/{chunk-GQVXYRPC.js → chunk-MI6SJJQU.js} +1 -1
  62. package/dist/{chunk-DXPT2HPH.js → chunk-MJKQ5ZYY.js} +2 -2
  63. package/dist/{chunk-J3ODKAWN.js → chunk-MNL547RV.js} +5 -5
  64. package/dist/{chunk-2EDJPHXQ.js → chunk-N254IJM2.js} +6 -6
  65. package/dist/{layout-search-YKUL4VBV.js → chunk-NWPMLX2V.js} +27 -30
  66. package/dist/{chunk-COPSI54O.js → chunk-PSGSFRRE.js} +2 -2
  67. package/dist/{chunk-FDRHBQUG.js → chunk-PUZ63XZM.js} +8 -8
  68. package/dist/{chunk-MIVSVEK4.js → chunk-PZVTFQI2.js} +2 -2
  69. package/dist/{chunk-W7QN5BC5.js → chunk-Q3N7PI3B.js} +180 -7
  70. package/dist/{chunk-HX2KJEPD.js → chunk-QKJ6MQXW.js} +1 -3
  71. package/dist/{chunk-NJYA4QSN.js → chunk-QVKTAU7P.js} +1 -1
  72. package/dist/{chunk-EK7JYFCL.js → chunk-R7BSF7Z7.js} +1 -1
  73. package/dist/{chunk-PIHAUVA4.js → chunk-RHXIUUWB.js} +1 -1
  74. package/dist/{chunk-GXP344YZ.js → chunk-RMTOZALT.js} +6 -3
  75. package/dist/{chunk-CYF2X3CG.js → chunk-ROCBGUJN.js} +7 -7
  76. package/dist/{chunk-RY5RRKYN.js → chunk-RVTYIGWZ.js} +3 -3
  77. package/dist/{chunk-NMKLX57Y.js → chunk-SKF7XLCM.js} +1 -1
  78. package/dist/{chunk-NP2SE6MQ.js → chunk-SMTWQ66K.js} +5 -5
  79. package/dist/{chunk-3AX6MCI6.js → chunk-SPQVER4T.js} +2 -2
  80. package/dist/{chunk-A5PUOHIS.js → chunk-SWBHH2UW.js} +1 -1
  81. package/dist/{chunk-7TF3QOOD.js → chunk-TIVMAITN.js} +14 -0
  82. package/dist/{chunk-4IYJOXGS.js → chunk-TLPY4ZBI.js} +604 -430
  83. package/dist/{chunk-U762HK4D.js → chunk-TPEYEOXA.js} +4 -4
  84. package/dist/{chunk-FS2LZBHG.js → chunk-UWJP4JSZ.js} +2 -2
  85. package/dist/{chunk-JX4RCC6B.js → chunk-V3KHZQPK.js} +2 -2
  86. package/dist/{chunk-RJYFHEP4.js → chunk-VGSSAMLA.js} +2 -2
  87. package/dist/{chunk-HIVJBESO.js → chunk-VMD2CYVP.js} +35 -36
  88. package/dist/{chunk-OSIUWQ3N.js → chunk-WNTPJZU7.js} +1 -1
  89. package/dist/{chunk-R2PTZ6QM.js → chunk-WTE27AJT.js} +7 -7
  90. package/dist/{chunk-OWJVSJLA.js → chunk-XLAREWBK.js} +2 -2
  91. package/dist/{chunk-NY56FM55.js → chunk-XLPJJ35N.js} +2 -2
  92. package/dist/{chunk-DNMICILX.js → chunk-XQTRGKQ3.js} +3 -3
  93. package/dist/{chunk-QOZ4RVQY.js → chunk-YZG37S7L.js} +3 -3
  94. package/dist/{chunk-62VWZ3SE.js → chunk-ZB2Q67NO.js} +10 -10
  95. package/dist/completion-registry.js +2 -2
  96. package/dist/{compute-JAP5E2E4.js → compute-2XWFVO7K.js} +1 -1
  97. package/dist/{dgmo-router-BJBXSZMV.js → dgmo-router-YHBMKTXY.js} +32 -32
  98. package/dist/{dimensions-AMA2S7RO.js → dimensions-QMGWJQTR.js} +3 -3
  99. package/dist/{flowchart-parser-ADZIFVCH.js → flowchart-parser-BLJ6RA53.js} +2 -2
  100. package/dist/{flowchart-renderer-CAG6ZNJ6.js → flowchart-renderer-FXRQKXAK.js} +10 -6
  101. package/dist/index.js +37 -37
  102. package/dist/{layout-5VSMZPMG.js → layout-5HCEF7VO.js} +1 -1
  103. package/dist/{layout-VQ2USZJ3.js → layout-6PLSBB5X.js} +2 -2
  104. package/dist/{layout-UIV56NUA.js → layout-B7PQRAMB.js} +1 -1
  105. package/dist/{layout-C6MKMOBI.js → layout-CCVCLZ6S.js} +1 -1
  106. package/dist/{layout-T2PGKQUQ.js → layout-CRUAP7JG.js} +2 -2
  107. package/dist/{layout-UFB2O4AO.js → layout-G42FDCF3.js} +2 -2
  108. package/dist/{layout-6OSF2UGP.js → layout-IV4H2FLB.js} +2 -2
  109. package/dist/{layout-4RRC7XU7.js → layout-JTNRSGOS.js} +6 -3
  110. package/dist/{layout-H4K54IW3.js → layout-RBLD5EGX.js} +6 -3
  111. package/dist/{layout-SW3XWYKC.js → layout-ROAVGBUC.js} +1 -1
  112. package/dist/{layout-QS2SESBU.js → layout-T2DQ4M77.js} +6 -2
  113. package/dist/{layout-ZP7XYVXF.js → layout-YKGQRFDM.js} +2 -4
  114. package/dist/layout-search-L75YOBME.js +42 -0
  115. package/dist/{parser-NAUUUCI3.js → parser-2XCDVLSN.js} +2 -2
  116. package/dist/{parser-ESZ5J5IJ.js → parser-4QNRCGU5.js} +2 -2
  117. package/dist/{parser-W2DWCCLO.js → parser-6NSQLPTS.js} +2 -2
  118. package/dist/{parser-223VOHSB.js → parser-6X4GGH2R.js} +2 -2
  119. package/dist/{parser-B2FWP7ZO.js → parser-D6YRVV75.js} +2 -2
  120. package/dist/{parser-T2RVIRDG.js → parser-EY3VJWBE.js} +2 -2
  121. package/dist/{parser-KFIK3EOO.js → parser-EYF4ZSZO.js} +2 -2
  122. package/dist/{parser-2PNV7UI3.js → parser-H2DJEAPG.js} +2 -2
  123. package/dist/{parser-OV2WDSEV.js → parser-ILWAA3QJ.js} +2 -2
  124. package/dist/{parser-FV6RGALQ.js → parser-KMFMNZYI.js} +2 -2
  125. package/dist/{parser-LGUT7KKH.js → parser-MDSVVCJP.js} +2 -2
  126. package/dist/{parser-HPR7G7F6.js → parser-QL4DEPVA.js} +3 -3
  127. package/dist/{parser-BJDQX4KV.js → parser-UEDPLM46.js} +2 -2
  128. package/dist/{parser-E5HFYL7B.js → parser-UL6WN6W5.js} +2 -2
  129. package/dist/{parser-5ZD2NKGU.js → parser-ULSUK36C.js} +2 -2
  130. package/dist/{parser-57YQEEMC.js → parser-UY3K4ROB.js} +1 -1
  131. package/dist/{parser-MYRGCK7Q.js → parser-UYQNNQKT.js} +2 -2
  132. package/dist/{parser-NJ5VEZA3.js → parser-VG747VR6.js} +2 -2
  133. package/dist/{parser-CA5WC5HF.js → parser-VK4PNDX4.js} +2 -2
  134. package/dist/{parser-JFNDS5E5.js → parser-X5FQ36KJ.js} +2 -2
  135. package/dist/{parser-I4HZVIHX.js → parser-XO5IAXMT.js} +2 -2
  136. package/dist/{parser-WFY4ZJUW.js → parser-YVHO2NRM.js} +2 -2
  137. package/dist/{parser-J3BM2AP2.js → parser-YWZGIU3C.js} +2 -2
  138. package/dist/{parser-4B2PIXHI.js → parser-ZFLSULFC.js} +2 -2
  139. package/dist/{parser-RARXAHC7.js → parser-ZR7JAKSW.js} +1 -1
  140. package/dist/{renderer-3QM2DK7I.js → renderer-43IVPARP.js} +3 -3
  141. package/dist/{renderer-GWH5ACJ5.js → renderer-4MEZYGU6.js} +2 -2
  142. package/dist/{renderer-A3PMPUO6.js → renderer-54GXA3UO.js} +5 -5
  143. package/dist/{renderer-W22GX72R.js → renderer-7EAWN7MC.js} +4 -4
  144. package/dist/{renderer-IO3D5E4E.js → renderer-7SEXPBGM.js} +3 -3
  145. package/dist/{renderer-B3CPMS5R.js → renderer-B7B7BQM3.js} +7 -7
  146. package/dist/{renderer-IG72UJHW.js → renderer-I2LYSQBV.js} +3 -3
  147. package/dist/{renderer-OPDSKCQS.js → renderer-J2LOMTBC.js} +3 -3
  148. package/dist/{renderer-TTKTBB4C.js → renderer-JUH6M3XF.js} +6 -6
  149. package/dist/{renderer-COSJM7UG.js → renderer-KY6O5JTX.js} +33 -33
  150. package/dist/{renderer-PLRMST57.js → renderer-LHTDI5RV.js} +4 -4
  151. package/dist/{renderer-3W5T3IU6.js → renderer-LWL3IJOF.js} +3 -3
  152. package/dist/{renderer-SBXCPA3S.js → renderer-NCIDGJ2R.js} +5 -5
  153. package/dist/{renderer-AM4VZSBQ.js → renderer-OPA4JJKX.js} +4 -4
  154. package/dist/{renderer-O5RQHGK2.js → renderer-QMNC7TGN.js} +4 -4
  155. package/dist/{renderer-UVFGW2O6.js → renderer-QQNPJGAP.js} +3 -3
  156. package/dist/{renderer-WQ654YT5.js → renderer-R7RK7FKI.js} +1 -1
  157. package/dist/{renderer-TMQNTUQS.js → renderer-RFP55AW7.js} +10 -7
  158. package/dist/{renderer-FXCVH2M5.js → renderer-S3NFBJCY.js} +10 -7
  159. package/dist/{renderer-OA5D3ZKB.js → renderer-SD4ZHHAR.js} +6 -4
  160. package/dist/{renderer-PSMRAL72.js → renderer-SE7Z5AOL.js} +3 -3
  161. package/dist/{renderer-ON4PTUHJ.js → renderer-T2WUA7MC.js} +5 -5
  162. package/dist/{renderer-KK5BU5K2.js → renderer-TWKEZ3DD.js} +3 -3
  163. package/dist/{renderer-MK47ESCB.js → renderer-U5PD72G7.js} +3 -3
  164. package/dist/{renderer-52CHSV6S.js → renderer-VCTKBUTR.js} +5 -5
  165. package/dist/{renderer-PXGCR7N4.js → renderer-VNZTWATB.js} +3 -3
  166. package/dist/{renderer-4Z7FRQ2A.js → renderer-YDNWK6RI.js} +1 -1
  167. package/dist/{renderer-B4KE3NM4.js → renderer-YDOWBIUB.js} +4 -4
  168. package/dist/{renderer-LD2H7WGP.js → renderer-YQPZ7O2C.js} +1 -1
  169. package/dist/{renderer-6OOJNEQE.js → renderer-ZQ77CM6Y.js} +4 -4
  170. package/dist/{renderer-radial-42LVSG74.js → renderer-radial-TNNEL3YN.js} +4 -4
  171. package/dist/{resolver-XSXE2TRX.js → resolver-6DJLZF6Y.js} +1 -1
  172. package/dist/{state-parser-ROKY5KSI.js → state-parser-NIIVOU2Y.js} +2 -2
  173. package/dist/{state-renderer-MMG23G4W.js → state-renderer-TVLEG32M.js} +11 -7
  174. package/package.json +1 -1
  175. package/dist/chunk-6EK55ART.js +0 -116
  176. package/dist/chunk-HTNLLT34.js +0 -72
  177. /package/dist/{chunk-3FCSOYN4.js → chunk-5P2L5QXE.js} +0 -0
  178. /package/dist/{chunk-HJRP6PXL.js → chunk-BQVTV4LB.js} +0 -0
  179. /package/dist/{chunk-LYRDIVSY.js → chunk-GLCMUTO5.js} +0 -0
@@ -9,7 +9,7 @@ import {
9
9
  stripDefaultModifier,
10
10
  tagAttrKey,
11
11
  validateTagGroupNames
12
- } from "./chunk-HX2KJEPD.js";
12
+ } from "./chunk-QKJ6MQXW.js";
13
13
  import {
14
14
  MAP_DIRECTIVE_KEY_SET,
15
15
  MAP_REGISTRY,
@@ -207,7 +207,10 @@ function parseMap(content, palette) {
207
207
  const activeTagWarning = activeTagNoMatchMessage(
208
208
  result.directives.activeTag,
209
209
  tagGroups,
210
- regions.some((r) => r.value !== void 0) ? [result.directives.regionMetric?.trim() || "Value"] : [],
210
+ regions.some((r) => r.value !== void 0) ? (
211
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- an empty metric name also falls back to 'Value'
212
+ [result.directives.regionMetric?.trim() || "Value"]
213
+ ) : [],
211
214
  "the value ramp"
212
215
  );
213
216
  if (activeTagWarning) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildMapProjection
3
- } from "./chunk-QRIW46LR.js";
3
+ } from "./chunk-57L2JPP2.js";
4
4
  import {
5
5
  TITLE_FONT_SIZE,
6
6
  TITLE_Y
@@ -8,7 +8,7 @@ import {
8
8
  keepSwimlaneToggleFocus,
9
9
  renderIntegratedLegend,
10
10
  wireSwimlaneToggle
11
- } from "./chunk-NJYA4QSN.js";
11
+ } from "./chunk-QVKTAU7P.js";
12
12
  import {
13
13
  CARD_RADIUS
14
14
  } from "./chunk-XCKNFFKM.js";
@@ -27,10 +27,10 @@ import {
27
27
  } from "./chunk-ICLB27PZ.js";
28
28
  import {
29
29
  parseKanban
30
- } from "./chunk-IRVQT4GR.js";
30
+ } from "./chunk-JJQWCI35.js";
31
31
  import {
32
32
  tagAttrKey
33
- } from "./chunk-HX2KJEPD.js";
33
+ } from "./chunk-QKJ6MQXW.js";
34
34
  import {
35
35
  fillModeFromOptions,
36
36
  legendSuppressed
@@ -11,7 +11,7 @@ import {
11
11
  matchTagBlockHeading,
12
12
  stripDefaultModifier,
13
13
  tagAttrKey
14
- } from "./chunk-HX2KJEPD.js";
14
+ } from "./chunk-QKJ6MQXW.js";
15
15
  import {
16
16
  FAMILY_PERSON_REGISTRY,
17
17
  FAMILY_UNION_REGISTRY,
@@ -334,7 +334,7 @@ function parseFamily(content, palette) {
334
334
  const re = peelTrailingColorName(cleanName);
335
335
  if (re.colorName !== void 0) {
336
336
  cleanName = re.label;
337
- if (color === void 0) color = re.colorName;
337
+ color ??= re.colorName;
338
338
  }
339
339
  }
340
340
  }
@@ -9,7 +9,7 @@ import {
9
9
  matchTagBlockHeading,
10
10
  stripDefaultModifier,
11
11
  tagAttrKey
12
- } from "./chunk-HX2KJEPD.js";
12
+ } from "./chunk-QKJ6MQXW.js";
13
13
  import {
14
14
  extractColor,
15
15
  fillModeFromToken,
@@ -9,10 +9,10 @@ import {
9
9
  } from "./chunk-R2K5L4UA.js";
10
10
  import {
11
11
  formatDateLabel
12
- } from "./chunk-3BQCSQQJ.js";
12
+ } from "./chunk-FJCYK4K3.js";
13
13
  import {
14
14
  renderIntegratedLegend
15
- } from "./chunk-NJYA4QSN.js";
15
+ } from "./chunk-QVKTAU7P.js";
16
16
  import {
17
17
  CARD_RADIUS,
18
18
  HAIRLINE_DASH,
@@ -42,7 +42,7 @@ import {
42
42
  UNTAGGED_TAG_COLOR,
43
43
  resolveActiveTagGroup,
44
44
  resolveTagColor
45
- } from "./chunk-HX2KJEPD.js";
45
+ } from "./chunk-QKJ6MQXW.js";
46
46
  import {
47
47
  CHAR_WIDTH_RATIO,
48
48
  wrapTextToWidth
@@ -4,7 +4,7 @@ import {
4
4
  matchTagBlockHeading,
5
5
  stripDefaultModifier,
6
6
  tagAttrKey
7
- } from "./chunk-HX2KJEPD.js";
7
+ } from "./chunk-QKJ6MQXW.js";
8
8
  import {
9
9
  FILL_FAMILY_TOKENS,
10
10
  extractColor,
@@ -4,7 +4,10 @@ import {
4
4
  } from "./chunk-26EVL454.js";
5
5
  import {
6
6
  layoutGraph
7
- } from "./chunk-ZNNVI5SR.js";
7
+ } from "./chunk-CU2PZLZP.js";
8
+ import {
9
+ appendArrowheadMarkers
10
+ } from "./chunk-XBJJP2HN.js";
8
11
  import {
9
12
  NOTE_BADGE_RADIUS,
10
13
  noteConnectorPoints,
@@ -12,9 +15,6 @@ import {
12
15
  renderNoteBox,
13
16
  renderNoteConnector
14
17
  } from "./chunk-KATED53P.js";
15
- import {
16
- appendArrowheadMarkers
17
- } from "./chunk-XBJJP2HN.js";
18
18
  import {
19
19
  fitDiagramToCanvas
20
20
  } from "./chunk-EPDBWATV.js";
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-24YPR5EH.js";
24
24
  import {
25
25
  renderIntegratedLegend
26
- } from "./chunk-NJYA4QSN.js";
26
+ } from "./chunk-QVKTAU7P.js";
27
27
  import {
28
28
  ARROWHEAD_HEIGHT,
29
29
  ARROWHEAD_WIDTH,
@@ -51,13 +51,13 @@ import {
51
51
  } from "./chunk-ICLB27PZ.js";
52
52
  import {
53
53
  parseState
54
- } from "./chunk-NY56FM55.js";
54
+ } from "./chunk-XLPJJ35N.js";
55
55
  import {
56
56
  resolveActiveTagGroup,
57
57
  resolveGroupTagColor,
58
58
  resolveTagColor,
59
59
  tagAttrKey
60
- } from "./chunk-HX2KJEPD.js";
60
+ } from "./chunk-QKJ6MQXW.js";
61
61
  import {
62
62
  fillModeFromOptions,
63
63
  legendInlineRequested,
@@ -9,7 +9,7 @@ import {
9
9
  stripDefaultModifier,
10
10
  tagAttrKey,
11
11
  validateTagGroupNames
12
- } from "./chunk-HX2KJEPD.js";
12
+ } from "./chunk-QKJ6MQXW.js";
13
13
  import {
14
14
  AliasRegistry,
15
15
  KANBAN_REGISTRY,
@@ -353,7 +353,7 @@ function parseKanban(content, palette) {
353
353
  validateTagGroupNames(result.tagGroups, warn, (line, msg) => {
354
354
  const diag = makeDgmoError(line, msg);
355
355
  result.diagnostics.push(diag);
356
- if (!result.error) result.error = formatDgmoError(diag);
356
+ result.error ??= formatDgmoError(diag);
357
357
  });
358
358
  const activeTagWarning = activeTagNoMatchMessage(
359
359
  options["active-tag"],
@@ -0,0 +1,110 @@
1
+ import {
2
+ countEdgeNodePierces,
3
+ countEdgeOverlaps,
4
+ countSplineCrossings,
5
+ deroutePierces,
6
+ searchBudget
7
+ } from "./chunk-NWPMLX2V.js";
8
+
9
+ // src/utils/placement-search.ts
10
+ var SEARCH_RANKERS = ["tight-tree", "longest-path"];
11
+ var SEARCH_SEEDS = 6;
12
+ function seeded(s) {
13
+ return () => {
14
+ s = s + 1831565813 | 0;
15
+ let t = Math.imul(s ^ s >>> 15, 1 | s);
16
+ t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
17
+ return ((t ^ t >>> 14) >>> 0) / 4294967296;
18
+ };
19
+ }
20
+ function shuffler(seed) {
21
+ const r = seeded(seed + 1);
22
+ return (a) => {
23
+ const out = a.slice();
24
+ for (let i = out.length - 1; i > 0; i--) {
25
+ const j = Math.floor(r() * (i + 1));
26
+ [out[i], out[j]] = [out[j], out[i]];
27
+ }
28
+ return out;
29
+ };
30
+ }
31
+ function searchPlacement(direction, place, score) {
32
+ const asScored = (g) => {
33
+ const s = score(g);
34
+ return {
35
+ nodes: s.nodes.map((n) => ({ ...n, label: n.id })),
36
+ edges: s.edges,
37
+ groups: [],
38
+ width: 0,
39
+ height: 0
40
+ };
41
+ };
42
+ const rest = (lay) => countEdgeOverlaps(lay) + countEdgeNodePierces(lay);
43
+ const along = direction === "LR" ? "x" : "y";
44
+ const backward = (lay) => {
45
+ const at = new Map(lay.nodes.map((n) => [n.label, n[along]]));
46
+ const out = /* @__PURE__ */ new Set();
47
+ lay.edges.forEach((e, i) => {
48
+ if (e.source === e.target) return;
49
+ if (at.get(e.target) < at.get(e.source) - 1) out.add(i);
50
+ });
51
+ return out;
52
+ };
53
+ let best = place("network-simplex");
54
+ let bestLay = asScored(best);
55
+ const plainX = countSplineCrossings(bestLay);
56
+ let bestBad = plainX + rest(bestLay);
57
+ if (bestBad === 0) return { g: best };
58
+ const plainBack = backward(bestLay);
59
+ const budget = searchBudget(bestLay.nodes.length, bestLay.edges.length);
60
+ const configs = [
61
+ ...SEARCH_RANKERS.map((ranker) => ({ ranker })),
62
+ ...Array.from(
63
+ { length: Math.min(budget.seeds, SEARCH_SEEDS) },
64
+ (_, seed) => ({
65
+ ranker: "network-simplex",
66
+ seed
67
+ })
68
+ )
69
+ ];
70
+ let attempts = 1;
71
+ for (const cfg of configs) {
72
+ if (bestBad === 0 || attempts >= budget.maxCandidates) break;
73
+ attempts++;
74
+ let g;
75
+ try {
76
+ g = place(
77
+ cfg.ranker,
78
+ cfg.seed === void 0 ? void 0 : shuffler(cfg.seed)
79
+ );
80
+ } catch {
81
+ continue;
82
+ }
83
+ const lay = asScored(g);
84
+ if ([...backward(lay)].some((i) => !plainBack.has(i))) continue;
85
+ const floor = Math.min(plainX, bestBad - 1);
86
+ const x = countSplineCrossings(lay, floor);
87
+ if (x > floor) continue;
88
+ const bad = x + rest(lay);
89
+ if (bad < bestBad) {
90
+ best = g;
91
+ bestLay = lay;
92
+ bestBad = bad;
93
+ }
94
+ }
95
+ const bent = deroutePierces(bestLay);
96
+ if (bent !== bestLay) {
97
+ const floor = Math.min(plainX, bestBad - 1);
98
+ const x = countSplineCrossings(bent, floor);
99
+ if (x <= floor && x + rest(bent) < bestBad)
100
+ return {
101
+ g: best,
102
+ edgePoints: bent.edges.map((e) => e.points)
103
+ };
104
+ }
105
+ return { g: best };
106
+ }
107
+
108
+ export {
109
+ searchPlacement
110
+ };
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  UNTAGGED_TAG_COLOR,
7
7
  tagAttrKey
8
- } from "./chunk-HX2KJEPD.js";
8
+ } from "./chunk-QKJ6MQXW.js";
9
9
  import {
10
10
  legendSuppressed
11
11
  } from "./chunk-MPJQMMBZ.js";
@@ -11,7 +11,7 @@ import {
11
11
  getSimpleChartLegendGroups,
12
12
  parseChart,
13
13
  parseExtendedChart
14
- } from "./chunk-WHRIN7N3.js";
14
+ } from "./chunk-HFG7KQOY.js";
15
15
  import {
16
16
  EMPHASIS_DIM_OPACITY,
17
17
  EMPHASIS_DIM_TEXT_OPACITY,
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-ICLB27PZ.js";
44
44
  import {
45
45
  tagAttrKey
46
- } from "./chunk-HX2KJEPD.js";
46
+ } from "./chunk-QKJ6MQXW.js";
47
47
  import {
48
48
  LEGEND_DOT_R,
49
49
  LEGEND_ENTRY_FONT_SIZE,
@@ -213,9 +213,7 @@ function calculateSchedule(parsed) {
213
213
  breakCycle(nextCycle, taskMap, depOffsetMap);
214
214
  sortedIds = topologicalSort(taskMap);
215
215
  }
216
- if (!sortedIds) {
217
- sortedIds = [...taskMap.keys()];
218
- }
216
+ sortedIds ??= [...taskMap.keys()];
219
217
  }
220
218
  for (const taskId of sortedIds) {
221
219
  const node = taskMap.get(taskId);
@@ -196,7 +196,7 @@ function layoutFamily(parsed, focusId) {
196
196
  const persons = focused ? focused.persons : parsed.persons;
197
197
  const unions = (focused ? focused.unions : parsed.unions).map((u) => ({ ...u, children: sortChildrenByBirth(u.children, persons) }));
198
198
  const focusParents = focused ? focused.parents : [];
199
- const highlightId = parsed.options["highlight"] || null;
199
+ const highlightId = parsed.options["highlight"] ?? null;
200
200
  const litSet = highlightId ? computeBloodline(unions, highlightId) : null;
201
201
  const showGen = parsed.options["generations"] === "true";
202
202
  const ANCESTOR_STAGGER = 20;
@@ -9,7 +9,7 @@ import {
9
9
  injectDefaultTagMetadata,
10
10
  resolveTagColor,
11
11
  tagAttrKey
12
- } from "./chunk-HX2KJEPD.js";
12
+ } from "./chunk-QKJ6MQXW.js";
13
13
  import {
14
14
  legendSuppressed
15
15
  } from "./chunk-MPJQMMBZ.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-24YPR5EH.js";
12
12
  import {
13
13
  renderIntegratedLegend
14
- } from "./chunk-NJYA4QSN.js";
14
+ } from "./chunk-QVKTAU7P.js";
15
15
  import {
16
16
  ARROWHEAD_HEIGHT,
17
17
  ARROWHEAD_WIDTH,
@@ -48,7 +48,7 @@ import {
48
48
  resolveGroupTagColor,
49
49
  resolveTagColor,
50
50
  tagAttrKey
51
- } from "./chunk-HX2KJEPD.js";
51
+ } from "./chunk-QKJ6MQXW.js";
52
52
  import {
53
53
  fitWrapped,
54
54
  measureText
@@ -3,7 +3,10 @@ import {
3
3
  } from "./chunk-26EVL454.js";
4
4
  import {
5
5
  layoutGraph
6
- } from "./chunk-ZNNVI5SR.js";
6
+ } from "./chunk-CU2PZLZP.js";
7
+ import {
8
+ appendArrowheadMarkers
9
+ } from "./chunk-XBJJP2HN.js";
7
10
  import {
8
11
  NOTE_BADGE_RADIUS,
9
12
  noteConnectorPoints,
@@ -11,9 +14,6 @@ import {
11
14
  renderNoteBox,
12
15
  renderNoteConnector
13
16
  } from "./chunk-KATED53P.js";
14
- import {
15
- appendArrowheadMarkers
16
- } from "./chunk-XBJJP2HN.js";
17
17
  import {
18
18
  fitDiagramToCanvas
19
19
  } from "./chunk-EPDBWATV.js";
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-ICLB27PZ.js";
41
41
  import {
42
42
  parseFlowchart
43
- } from "./chunk-SLO22FPS.js";
43
+ } from "./chunk-634LDSN6.js";
44
44
  import {
45
45
  fillModeFromOptions
46
46
  } from "./chunk-MPJQMMBZ.js";
@@ -1,3 +1,7 @@
1
+ import {
2
+ appendArrowheadMarkers,
3
+ appendReverseArrowheadMarkers
4
+ } from "./chunk-XBJJP2HN.js";
1
5
  import {
2
6
  NOTE_BADGE_RADIUS,
3
7
  noteConnectorPoints,
@@ -5,10 +9,6 @@ import {
5
9
  renderNoteBox,
6
10
  renderNoteConnector
7
11
  } from "./chunk-KATED53P.js";
8
- import {
9
- appendArrowheadMarkers,
10
- appendReverseArrowheadMarkers
11
- } from "./chunk-XBJJP2HN.js";
12
12
  import {
13
13
  wrapDescriptionLines
14
14
  } from "./chunk-NPWVOFB3.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-24YPR5EH.js";
22
22
  import {
23
23
  renderIntegratedLegend
24
- } from "./chunk-NJYA4QSN.js";
24
+ } from "./chunk-QVKTAU7P.js";
25
25
  import {
26
26
  ARROWHEAD_HEIGHT,
27
27
  ARROWHEAD_WIDTH,
@@ -50,7 +50,7 @@ import {
50
50
  import {
51
51
  resolveGroupTagColor,
52
52
  resolveTagColor
53
- } from "./chunk-HX2KJEPD.js";
53
+ } from "./chunk-QKJ6MQXW.js";
54
54
  import {
55
55
  fillModeFromOptions,
56
56
  legendInlineRequested,
@@ -1,29 +1,16 @@
1
- import {
2
- computeNodeSize
3
- } from "./chunk-W7QN5BC5.js";
4
1
  import {
5
2
  clipEndpointsToNodes,
6
3
  groupedTierCandidates
7
4
  } from "./chunk-EJS3K44P.js";
5
+ import {
6
+ computeNodeSize
7
+ } from "./chunk-Q3N7PI3B.js";
8
8
  import {
9
9
  EDGE_LABEL_FONT_SIZE,
10
10
  NODE_HEIGHT,
11
11
  NODE_WIDTH,
12
12
  measureEdgeLabel
13
13
  } from "./chunk-QT3KDDXK.js";
14
- import "./chunk-HTNLLT34.js";
15
- import "./chunk-6EK55ART.js";
16
- import "./chunk-RJNZHFNG.js";
17
- import "./chunk-5DH3KYFH.js";
18
- import "./chunk-NPWVOFB3.js";
19
- import "./chunk-S7W75MIM.js";
20
- import "./chunk-Z6DXWULM.js";
21
- import "./chunk-ICLB27PZ.js";
22
- import "./chunk-O753JUEZ.js";
23
- import "./chunk-NOTA6TEI.js";
24
- import "./chunk-KAO7JL4I.js";
25
- import "./chunk-BYU54C3S.js";
26
- import "./chunk-5WRI5ZAA.js";
27
14
 
28
15
  // src/boxes-and-lines/layout-search.ts
29
16
  import dagre from "@dagrejs/dagre";
@@ -816,6 +803,17 @@ var ESCALATE_SEEDS = 18;
816
803
  var ESCALATE_REFINE = 10;
817
804
  var SEARCH_WORK_CAP = 36e3;
818
805
  var MIN_SEARCH_CANDIDATES = 6;
806
+ function searchBudget(nodes, edges) {
807
+ const seeds = nodes <= 12 ? 20 : nodes <= 22 ? 40 : nodes <= 35 ? 22 : 10;
808
+ const size = Math.max(1, nodes + edges);
809
+ return {
810
+ seeds,
811
+ maxCandidates: Math.max(
812
+ MIN_SEARCH_CANDIDATES,
813
+ Math.floor(SEARCH_WORK_CAP / Math.pow(size, 1.5))
814
+ )
815
+ };
816
+ }
819
817
  function rng2(s) {
820
818
  return () => {
821
819
  s |= 0;
@@ -1751,15 +1749,12 @@ async function layoutBoxesAndLinesSearch(parsed, collapseInfo, opts) {
1751
1749
  };
1752
1750
  }
1753
1751
  const n = parsed.nodes.length;
1754
- const seedCount = opts?.seeds ?? (n <= 12 ? 20 : n <= 22 ? 40 : n <= 35 ? 22 : 10);
1752
+ const budget = searchBudget(n, parsed.edges.length);
1753
+ const seedCount = opts?.seeds ?? budget.seeds;
1755
1754
  const REFINE_K = opts?.refineK ?? 6;
1756
1755
  const lambda = opts?.lambda ?? DEFAULT_LAMBDA;
1757
1756
  const prev = opts?.previousPositions;
1758
- const searchSize = Math.max(1, n + parsed.edges.length);
1759
- const maxCandidates = Math.max(
1760
- MIN_SEARCH_CANDIDATES,
1761
- Math.floor(SEARCH_WORK_CAP / Math.pow(searchSize, 1.5))
1762
- );
1757
+ const maxCandidates = budget.maxCandidates;
1763
1758
  let attempts = 0;
1764
1759
  const configs = [];
1765
1760
  if (opts?.configs) {
@@ -1994,16 +1989,18 @@ async function layoutBoxesAndLinesSearch(parsed, collapseInfo, opts) {
1994
1989
  opts?.onTopConfigs?.(topConfigs);
1995
1990
  return clipLayoutEdgesToNodes(best);
1996
1991
  }
1992
+
1997
1993
  export {
1998
- countEdgeNearMiss,
1999
- countEdgeNodePierces,
2000
- countEdgeOverlaps,
2001
- countGroupOverlaps,
1994
+ searchBudget,
2002
1995
  countSplineCrossings,
2003
- deroutePierces,
2004
- detectEdgeNodePierces,
2005
1996
  detectEdgeOverlaps,
1997
+ countEdgeOverlaps,
1998
+ detectEdgeNodePierces,
1999
+ countEdgeNodePierces,
2000
+ deroutePierces,
2001
+ countEdgeNearMiss,
2006
2002
  detectGroupOverlaps,
2007
- layoutBoxesAndLinesSearch,
2008
- separateGroupBands
2003
+ countGroupOverlaps,
2004
+ separateGroupBands,
2005
+ layoutBoxesAndLinesSearch
2009
2006
  };
@@ -9,7 +9,7 @@ import {
9
9
  stripDefaultModifier,
10
10
  tagAttrKey,
11
11
  validateTagGroupNames
12
- } from "./chunk-HX2KJEPD.js";
12
+ } from "./chunk-QKJ6MQXW.js";
13
13
  import {
14
14
  JOURNEY_MAP_REGISTRY,
15
15
  OPTION_NOCOLON_RE,
@@ -340,7 +340,7 @@ function parseJourneyMap(content, palette) {
340
340
  validateTagGroupNames(result.tagGroups, warn, (line, msg) => {
341
341
  const diag = makeDgmoError(line, msg);
342
342
  result.diagnostics.push(diag);
343
- if (!result.error) result.error = formatDgmoError(diag);
343
+ result.error ??= formatDgmoError(diag);
344
344
  });
345
345
  const activeTagWarning = activeTagNoMatchMessage(
346
346
  options["active-tag"],
@@ -1,7 +1,3 @@
1
- import {
2
- appendArrowheadMarkers,
3
- appendReverseArrowheadMarkers
4
- } from "./chunk-XBJJP2HN.js";
5
1
  import {
6
2
  CYLINDER_RY,
7
3
  QUEUE_CAP,
@@ -10,13 +6,17 @@ import {
10
6
  layoutC4Containers,
11
7
  layoutC4Context,
12
8
  layoutC4Deployment
13
- } from "./chunk-VCHYS3RD.js";
9
+ } from "./chunk-K3BYD3WU.js";
10
+ import {
11
+ appendArrowheadMarkers,
12
+ appendReverseArrowheadMarkers
13
+ } from "./chunk-XBJJP2HN.js";
14
14
  import {
15
15
  renderInlineText
16
16
  } from "./chunk-S7W75MIM.js";
17
17
  import {
18
18
  renderIntegratedLegend
19
- } from "./chunk-NJYA4QSN.js";
19
+ } from "./chunk-QVKTAU7P.js";
20
20
  import {
21
21
  ARROWHEAD_HEIGHT,
22
22
  ARROWHEAD_WIDTH,
@@ -43,14 +43,14 @@ import {
43
43
  } from "./chunk-ICLB27PZ.js";
44
44
  import {
45
45
  parseC4
46
- } from "./chunk-LC5LY5V2.js";
46
+ } from "./chunk-EP7BT3HU.js";
47
47
  import {
48
48
  preprocessDescriptionLine
49
49
  } from "./chunk-IYULMRBE.js";
50
50
  import {
51
51
  resolveGroupTagColor,
52
52
  tagAttrKey
53
- } from "./chunk-HX2KJEPD.js";
53
+ } from "./chunk-QKJ6MQXW.js";
54
54
  import {
55
55
  fillModeFromOptions
56
56
  } from "./chunk-MPJQMMBZ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderIntegratedLegend
3
- } from "./chunk-NJYA4QSN.js";
3
+ } from "./chunk-QVKTAU7P.js";
4
4
  import {
5
5
  EDGE_DASH
6
6
  } from "./chunk-XCKNFFKM.js";
@@ -25,7 +25,7 @@ import {
25
25
  import {
26
26
  resolveTagColor,
27
27
  tagAttrKey
28
- } from "./chunk-HX2KJEPD.js";
28
+ } from "./chunk-QKJ6MQXW.js";
29
29
  import {
30
30
  LEGEND_GROUP_GAP
31
31
  } from "./chunk-I6GGMCTV.js";