@diagrammo/dgmo 0.53.0 → 0.54.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 (199) hide show
  1. package/dist/advanced.d.ts +36 -0
  2. package/dist/advanced.js +159 -154
  3. package/dist/auto.js +142 -128
  4. package/dist/auto.mjs +775 -466
  5. package/dist/block.js +62 -60
  6. package/dist/chart-meta.js +50 -47
  7. package/dist/{charts-d3-DH2XA45I.js → charts-d3-25E4VWXO.js} +9 -8
  8. package/dist/chunk-2CW5ZTNH.js +58 -0
  9. package/dist/{chunk-PKNNHU7H.js → chunk-2NYXI35Z.js} +17 -10
  10. package/dist/{chunk-W5KMNC5U.js → chunk-2NZOHEP4.js} +9 -10
  11. package/dist/{chunk-6DCOIN4W.js → chunk-3FRO35WW.js} +768 -2
  12. package/dist/{chunk-6AUZPPAV.js → chunk-3KHJJP3J.js} +2 -2
  13. package/dist/{chunk-X3RXGSCZ.js → chunk-3SBHODJ4.js} +11 -11
  14. package/dist/{chunk-KUSAVOWZ.js → chunk-3SEEP2JM.js} +3 -3
  15. package/dist/{chunk-QWIBT6DS.js → chunk-47JNEKJA.js} +10 -10
  16. package/dist/{chunk-LHILKFDP.js → chunk-4T6OCSJ2.js} +9 -9
  17. package/dist/{chunk-XQ4KN6JQ.js → chunk-4ZIKWVSQ.js} +16 -15
  18. package/dist/{chunk-GMAH572Z.js → chunk-5VXU6MND.js} +2 -2
  19. package/dist/{chunk-HORZ5H2L.js → chunk-5XSNLXU5.js} +17 -17
  20. package/dist/{chunk-BFDVEO5R.js → chunk-62Y27T4C.js} +2 -2
  21. package/dist/{chunk-R5NH5BZG.js → chunk-6KL7TFLS.js} +6 -6
  22. package/dist/{chunk-UVDCHR4E.js → chunk-6OYDOQ2Q.js} +2 -2
  23. package/dist/{chunk-QI3BOLQB.js → chunk-7K6NDSXH.js} +4 -4
  24. package/dist/{chunk-27STWBOK.js → chunk-7SP4C6EV.js} +6 -8
  25. package/dist/{chunk-I46X5VUA.js → chunk-7TF3QOOD.js} +25 -1
  26. package/dist/{chunk-FGDSTT3F.js → chunk-7U4OR7CD.js} +2 -2
  27. package/dist/{chunk-VKNCC2GX.js → chunk-7UPFTBOW.js} +13 -13
  28. package/dist/{chunk-FT7TPPZ5.js → chunk-A3BDLDYG.js} +12 -12
  29. package/dist/{chunk-AZNXGWDC.js → chunk-ADCHLNWT.js} +7 -7
  30. package/dist/{chunk-CMVZWP32.js → chunk-AHTTKERF.js} +2 -2
  31. package/dist/{chunk-GAWKIIPO.js → chunk-AJFHNS67.js} +7 -7
  32. package/dist/{chunk-Q7AH665U.js → chunk-AQEYUVGJ.js} +111 -35
  33. package/dist/{chunk-BR7AYN76.js → chunk-B7N5KYXQ.js} +12 -12
  34. package/dist/chunk-BEOAKGNA.js +484 -0
  35. package/dist/{chunk-GABSL6TH.js → chunk-BM7MG6HT.js} +3 -3
  36. package/dist/{chunk-UKP5HWB5.js → chunk-BWYFIVZF.js} +4 -4
  37. package/dist/{chunk-7GUF6SDR.js → chunk-BZJIITYM.js} +9 -9
  38. package/dist/{chunk-RW5PEJ7D.js → chunk-C2UORMIA.js} +3 -3
  39. package/dist/{chunk-FXCB7H5O.js → chunk-CCGWX6AO.js} +2 -2
  40. package/dist/{chunk-AHXIMHDQ.js → chunk-COJW2NEY.js} +9 -9
  41. package/dist/{chunk-XY3UDKKH.js → chunk-COVYNAKJ.js} +4 -4
  42. package/dist/{chunk-GQ644SPD.js → chunk-CSHFU6LT.js} +14 -14
  43. package/dist/{chunk-JTMSWEIW.js → chunk-DLU643TF.js} +4 -4
  44. package/dist/{chunk-QAALSCKI.js → chunk-DPGQ5UMO.js} +12 -12
  45. package/dist/{chunk-I64ECJX3.js → chunk-EAI6XJ7D.js} +3 -3
  46. package/dist/{chunk-DWUMPMV2.js → chunk-EPRF3ZRV.js} +2 -2
  47. package/dist/{chunk-AIMLCDAO.js → chunk-EQOMY4PY.js} +2 -2
  48. package/dist/{chunk-XEAQDIMF.js → chunk-F7XM366V.js} +6 -6
  49. package/dist/{chunk-SG4PRYO3.js → chunk-FFVFZLRT.js} +49 -18
  50. package/dist/{chunk-LC3FFD43.js → chunk-FR6UFVSV.js} +12 -12
  51. package/dist/{chunk-6HTRCTAS.js → chunk-FVMKCZHF.js} +6 -4
  52. package/dist/{chunk-FUKNRLIJ.js → chunk-GK32ZFZY.js} +6 -6
  53. package/dist/{chunk-6KY7OCZC.js → chunk-GKYHWJXI.js} +3 -3
  54. package/dist/{chunk-NNYFQOTK.js → chunk-GQ5ECRP4.js} +10 -8
  55. package/dist/{chunk-PT4SW76W.js → chunk-HAA25PLC.js} +9 -9
  56. package/dist/{chunk-J7HI6G3G.js → chunk-HFEOOQ46.js} +6 -6
  57. package/dist/{chunk-KKHCNSKK.js → chunk-I47VHSPS.js} +5 -5
  58. package/dist/{chunk-YG2BEIQU.js → chunk-ICKXIMBA.js} +11 -11
  59. package/dist/{chunk-A44USUV7.js → chunk-ICZ7M6IZ.js} +23 -17
  60. package/dist/{chunk-HE5J53SZ.js → chunk-IOIMQHQ6.js} +3 -3
  61. package/dist/{chunk-3BEKKRH5.js → chunk-IYNKLCAZ.js} +8 -8
  62. package/dist/{chunk-774C2FF3.js → chunk-J7HQPVYH.js} +2 -2
  63. package/dist/{chunk-UFQJMOVZ.js → chunk-KBVOVDYP.js} +6 -6
  64. package/dist/{chunk-JHOAH4TI.js → chunk-KDK5EKUR.js} +2 -2
  65. package/dist/{chunk-VIRANCNY.js → chunk-KINOX74I.js} +14 -14
  66. package/dist/{chunk-VJHBSPGF.js → chunk-KQ3FNRGR.js} +3 -3
  67. package/dist/{chunk-U7NKYLX2.js → chunk-KQYQECWQ.js} +13 -13
  68. package/dist/{chunk-GMIJ35PW.js → chunk-KS5ZSM5T.js} +13 -13
  69. package/dist/{chunk-FLDC7ZAK.js → chunk-KV4HLIJE.js} +2 -2
  70. package/dist/{chunk-PYO4TJJ3.js → chunk-LPJ6H5X4.js} +11 -11
  71. package/dist/{chunk-LQHVDZYC.js → chunk-LRSW4JLE.js} +4 -4
  72. package/dist/{chunk-VRRDUYOK.js → chunk-M24VXUFG.js} +3 -3
  73. package/dist/{chunk-22OQWBWD.js → chunk-M3H7ZE6C.js} +10 -10
  74. package/dist/{chunk-MA3HJZHB.js → chunk-MTZOXISJ.js} +7 -7
  75. package/dist/{chunk-GWQJKTFS.js → chunk-N7BSBAVP.js} +94 -94
  76. package/dist/{chunk-65V6IRFN.js → chunk-NUTWTV6G.js} +10 -10
  77. package/dist/{chunk-HNBY6CNV.js → chunk-O576GYAP.js} +2 -2
  78. package/dist/{chunk-3CZLWOCI.js → chunk-OJ435DQZ.js} +3 -3
  79. package/dist/{chunk-BD3WGY4T.js → chunk-OR3R27CU.js} +2 -2
  80. package/dist/{chunk-2QC4HXCY.js → chunk-OSXQKC3S.js} +8 -10
  81. package/dist/{chunk-4RGZFA7H.js → chunk-Q5IHQ4NW.js} +11 -1
  82. package/dist/{chunk-ALYZ3MAA.js → chunk-QBYP2FBZ.js} +8 -476
  83. package/dist/{chunk-4ASVFYB2.js → chunk-R5BGGBFF.js} +5 -5
  84. package/dist/{chunk-YR43LJT5.js → chunk-RIEAN4D5.js} +15 -12
  85. package/dist/{chunk-P3H7QVDH.js → chunk-RRGKMJYL.js} +6 -6
  86. package/dist/{chunk-XG4NWFPY.js → chunk-S7FOIURR.js} +13 -13
  87. package/dist/{chunk-NNUMX6WX.js → chunk-S7YFT3PO.js} +40 -15
  88. package/dist/{chunk-SQCBSFT5.js → chunk-SBOAZ7YK.js} +51 -263
  89. package/dist/{chunk-VGNIDAPQ.js → chunk-SSHS42QG.js} +4 -4
  90. package/dist/{chunk-SGPFVDUL.js → chunk-T3FAJAJT.js} +6 -6
  91. package/dist/{chunk-AN2DQB3G.js → chunk-T7Y554OK.js} +12 -12
  92. package/dist/chunk-TGOMHUOV.js +218 -0
  93. package/dist/{chunk-W2DINCHL.js → chunk-TJN2OIVG.js} +31 -16
  94. package/dist/{chunk-CK2GMDXD.js → chunk-TLNVYWPA.js} +2 -2
  95. package/dist/{chunk-CQFNIIQN.js → chunk-U4IN6AHE.js} +2 -2
  96. package/dist/{chunk-HOXKNRON.js → chunk-UEU6IYKY.js} +2 -2
  97. package/dist/{chunk-UK6DKJLD.js → chunk-UIT7E6UF.js} +4 -4
  98. package/dist/{chunk-IQJCVREL.js → chunk-VMSBMIHW.js} +6 -6
  99. package/dist/{chunk-FFXCKZOU.js → chunk-VQFDBNYF.js} +3 -3
  100. package/dist/{chunk-PV2QO7QL.js → chunk-W6PCFRPL.js} +2 -2
  101. package/dist/{chunk-UQRIKAMH.js → chunk-WKNAJ4BR.js} +13 -13
  102. package/dist/{chunk-4WGMGKCZ.js → chunk-WW4BQ744.js} +11 -11
  103. package/dist/{chunk-ZXUAPTCK.js → chunk-WWHECSYZ.js} +2 -2
  104. package/dist/{chunk-4K42RUGC.js → chunk-XWODFBHJ.js} +43 -12
  105. package/dist/{chunk-VAO6ANGC.js → chunk-YENNFS5F.js} +9 -9
  106. package/dist/cli.cjs +160 -146
  107. package/dist/completion-registry.d.ts +129 -0
  108. package/dist/completion-registry.js +1270 -0
  109. package/dist/{compute-G55RG53N.js → compute-JAP5E2E4.js} +2 -2
  110. package/dist/dgmo-router-TGZWFIZO.js +88 -0
  111. package/dist/{dimensions-K6PGYYGT.js → dimensions-L6BXQXXL.js} +8 -8
  112. package/dist/editor.js +18 -0
  113. package/dist/element.js +142 -128
  114. package/dist/element.mjs +775 -466
  115. package/dist/{flowchart-parser-LALR6J6F.js → flowchart-parser-UKYOW3VM.js} +5 -5
  116. package/dist/{flowchart-renderer-DXYB5YRF.js → flowchart-renderer-DCFKUDDR.js} +9 -9
  117. package/dist/highlight.js +18 -0
  118. package/dist/index.js +65 -62
  119. package/dist/{layout-WCAIKGZG.js → layout-25Y3VDYF.js} +5 -5
  120. package/dist/layout-4SPLI4HG.js +15 -0
  121. package/dist/{layout-E6HR6PXH.js → layout-A6OIGZN2.js} +3 -3
  122. package/dist/{layout-3BVDMKXI.js → layout-CH4HFFRD.js} +4 -4
  123. package/dist/{layout-ZE5DRJWX.js → layout-G2ABQJQZ.js} +4 -4
  124. package/dist/{layout-3V2A4MUE.js → layout-ITLPDG6M.js} +6 -5
  125. package/dist/{layout-WSMPBQ4Q.js → layout-NF4EWFLT.js} +3 -3
  126. package/dist/layout-NY7MHJCL.js +15 -0
  127. package/dist/{layout-4IHCMWZN.js → layout-QBNAMEOA.js} +4 -4
  128. package/dist/{layout-OL2XFJXA.js → layout-SP7HJWKA.js} +3 -3
  129. package/dist/{layout-search-34DPZD43.js → layout-search-LUI475P3.js} +9 -4
  130. package/dist/{legend-constants-P5EQWRQQ.js → legend-constants-B77VKB3R.js} +7 -2
  131. package/dist/{parser-5QPFOB5F.js → parser-2UWWNTFL.js} +4 -4
  132. package/dist/{parser-CKA3QMAG.js → parser-3RXYQSA7.js} +5 -5
  133. package/dist/{parser-GKP2MHHL.js → parser-5C3PEZK3.js} +3 -3
  134. package/dist/{parser-275KP7JO.js → parser-66RYGJRB.js} +5 -6
  135. package/dist/{parser-7JHWEWXM.js → parser-6GN5YJBJ.js} +4 -4
  136. package/dist/{parser-XVPTRWZ4.js → parser-6MQM7WT3.js} +4 -4
  137. package/dist/{parser-7JVIDLLR.js → parser-7UI6UQ7B.js} +4 -4
  138. package/dist/{parser-5HQXCNOS.js → parser-B2A7XOAK.js} +3 -3
  139. package/dist/{parser-UWRX52PC.js → parser-CCNJKDDA.js} +4 -4
  140. package/dist/{parser-CRKLXGW7.js → parser-ESHNUFME.js} +4 -4
  141. package/dist/{parser-EXNBDNGY.js → parser-F4FEU57T.js} +3 -3
  142. package/dist/{parser-IVGHXLZP.js → parser-FHRMFUNX.js} +4 -3
  143. package/dist/{parser-XNKJCMMA.js → parser-FPCWDYQV.js} +4 -4
  144. package/dist/{parser-ZQDQTB4X.js → parser-FY3YFFBS.js} +5 -5
  145. package/dist/{parser-VOERD6XR.js → parser-GML6V2KZ.js} +4 -4
  146. package/dist/{parser-3CODK6RG.js → parser-HA3PF5FL.js} +4 -4
  147. package/dist/{parser-GN2MM5CC.js → parser-KTYF6WO5.js} +3 -3
  148. package/dist/{parser-ZGNXYFPS.js → parser-LTA2BOZO.js} +3 -3
  149. package/dist/{parser-FOOFEJQU.js → parser-LU7UAKNB.js} +4 -4
  150. package/dist/{parser-NNIL3HXU.js → parser-MHKYQPC2.js} +3 -3
  151. package/dist/{parser-IKWK2ZU3.js → parser-MVSYFK63.js} +4 -5
  152. package/dist/{parser-3VSWEKBF.js → parser-O7YQYFEN.js} +4 -4
  153. package/dist/{parser-YSLNDFLV.js → parser-OPIXXUY4.js} +4 -5
  154. package/dist/{parser-RNLTBIJ6.js → parser-S4EJPNVN.js} +4 -4
  155. package/dist/{parser-G26MTBFS.js → parser-T3D7BV6O.js} +3 -3
  156. package/dist/{parser-3KIGEEJM.js → parser-VVE4THG3.js} +4 -4
  157. package/dist/{parser-5FGJSQNS.js → parser-WPPJGB4R.js} +4 -4
  158. package/dist/{parser-27Z76SN3.js → parser-X5XLFY4Z.js} +4 -4
  159. package/dist/{parser-6B6SSZT7.js → parser-XCPMEB2Z.js} +3 -3
  160. package/dist/{parser-6PPHAXXH.js → parser-XRDUX2AR.js} +5 -5
  161. package/dist/{parser-FF4BMRSB.js → parser-YPWYT46P.js} +4 -4
  162. package/dist/{parser-4E4I3GNT.js → parser-YULS5MLD.js} +4 -4
  163. package/dist/{renderer-ZBTEX2JK.js → renderer-2DME63VZ.js} +4 -4
  164. package/dist/{renderer-RLMOTXZ6.js → renderer-3VY3VXJE.js} +13 -13
  165. package/dist/{renderer-6WRYVM5R.js → renderer-4A32DX5L.js} +8 -8
  166. package/dist/{renderer-UPF7NRTI.js → renderer-4K5YYX5R.js} +11 -11
  167. package/dist/{renderer-HIFQVEJA.js → renderer-6CFML5G3.js} +9 -9
  168. package/dist/{renderer-7NQSTQMQ.js → renderer-7HMZ5OCJ.js} +4 -4
  169. package/dist/{renderer-NE5W7CQP.js → renderer-B7Y6I7JX.js} +6 -5
  170. package/dist/{renderer-LVZAHRP6.js → renderer-C3RI4OPJ.js} +11 -12
  171. package/dist/{renderer-COLQFSFV.js → renderer-CJ56SUMF.js} +9 -9
  172. package/dist/{renderer-WFSUBKUL.js → renderer-COJZZ4F6.js} +8 -8
  173. package/dist/{renderer-SQ54MDSA.js → renderer-FXMGCSRP.js} +9 -9
  174. package/dist/{renderer-TYHGXAVT.js → renderer-G4UOW3RH.js} +4 -4
  175. package/dist/{renderer-YUXGXGSW.js → renderer-HQ4JFZOV.js} +9 -9
  176. package/dist/{renderer-JTCX6PCG.js → renderer-LHVCKEWF.js} +9 -9
  177. package/dist/{renderer-WNFXYYGL.js → renderer-OZX5KGQM.js} +8 -8
  178. package/dist/{renderer-CWEFGEIC.js → renderer-P3YQES7B.js} +13 -13
  179. package/dist/{renderer-UKXW2QPE.js → renderer-PLVIARM7.js} +9 -8
  180. package/dist/{renderer-5MPN7CXZ.js → renderer-RA4PTAMF.js} +5 -5
  181. package/dist/{renderer-JCZG6AYU.js → renderer-RMAM2SOJ.js} +10 -10
  182. package/dist/{renderer-JWGQSTMR.js → renderer-SES7QZYL.js} +14 -14
  183. package/dist/{renderer-KARQF3F3.js → renderer-TQ5QDZOE.js} +8 -8
  184. package/dist/{renderer-6EN5XXJZ.js → renderer-V5SNTPAM.js} +10 -10
  185. package/dist/{renderer-QD2SJF2I.js → renderer-WVD6G2TS.js} +9 -9
  186. package/dist/{renderer-AK2WO4EI.js → renderer-X2LYSMLU.js} +4 -4
  187. package/dist/{renderer-VMH6L6CP.js → renderer-Y3NXZINM.js} +8 -8
  188. package/dist/{renderer-XTXSOK3L.js → renderer-YEFOOULC.js} +10 -10
  189. package/dist/{renderer-YUKPS27O.js → renderer-YP3P6UVT.js} +8 -8
  190. package/dist/{renderer-D3BRNOMV.js → renderer-YVMETH6V.js} +11 -11
  191. package/dist/{renderer-2C6DJRYN.js → renderer-Z4GNKNXO.js} +8 -8
  192. package/dist/{renderer-radial-WF6VOUOD.js → renderer-radial-VYBZAXXE.js} +9 -9
  193. package/dist/{state-parser-L7DHZIQO.js → state-parser-VIW2WNA5.js} +5 -5
  194. package/dist/{state-renderer-TFEUOP4H.js → state-renderer-H22AQD3U.js} +12 -12
  195. package/package.json +5 -1
  196. package/dist/chunk-YJVA3QUU.js +0 -734
  197. package/dist/dgmo-router-B4S23EBH.js +0 -86
  198. package/dist/layout-3M5UYJHY.js +0 -14
  199. package/dist/layout-KPQWJNAG.js +0 -14
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  stripQuotes,
3
3
  tokenizeQuoteAware
4
- } from "./chunk-YJVA3QUU.js";
4
+ } from "./chunk-3FRO35WW.js";
5
5
  import {
6
6
  CATEGORICAL_COLOR_ORDER,
7
7
  RECOGNIZED_COLOR_NAMES,
@@ -250,4 +250,4 @@ export {
250
250
  resolveActiveTagGroup,
251
251
  matchTagBlockHeading
252
252
  };
253
- //# sourceMappingURL=chunk-CMVZWP32.js.map
253
+ //# sourceMappingURL=chunk-AHTTKERF.js.map
@@ -6,10 +6,10 @@ import {
6
6
  mapLegendConfig,
7
7
  mapLegendGroups,
8
8
  parsePathRings
9
- } from "./chunk-UFQJMOVZ.js";
9
+ } from "./chunk-KBVOVDYP.js";
10
10
  import {
11
11
  renderIntegratedLegend
12
- } from "./chunk-W5KMNC5U.js";
12
+ } from "./chunk-2NZOHEP4.js";
13
13
  import {
14
14
  TITLE_FONT_SIZE,
15
15
  TITLE_FONT_WEIGHT,
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-6KFWC4CO.js";
21
21
  import {
22
22
  parseClock
23
- } from "./chunk-FLDC7ZAK.js";
23
+ } from "./chunk-KV4HLIJE.js";
24
24
  import {
25
25
  fixedParts,
26
26
  formatTime,
@@ -28,13 +28,13 @@ import {
28
28
  workStatus,
29
29
  zoneParts
30
30
  } from "./chunk-APKUAJ2L.js";
31
+ import {
32
+ measureText
33
+ } from "./chunk-4ASYQ347.js";
31
34
  import {
32
35
  mix,
33
36
  themeBaseBg
34
37
  } from "./chunk-JYDMBWRP.js";
35
- import {
36
- measureText
37
- } from "./chunk-4ASYQ347.js";
38
38
 
39
39
  // src/map/renderer.ts
40
40
  import * as d3Selection from "d3-selection";
@@ -781,4 +781,4 @@ export {
781
781
  renderMap,
782
782
  renderMapForExport
783
783
  };
784
- //# sourceMappingURL=chunk-GAWKIIPO.js.map
784
+ //# sourceMappingURL=chunk-AJFHNS67.js.map
@@ -1,12 +1,18 @@
1
1
  import {
2
+ isEmphasisToken,
3
+ parseEmphasisDirective
4
+ } from "./chunk-2CW5ZTNH.js";
5
+ import {
6
+ GLOBAL_BOOLEANS,
2
7
  collectIndentedValues,
8
+ detectBadChartTypeDeclaration,
3
9
  extractColor,
4
10
  fillModeFromToken,
5
11
  measureIndent,
6
12
  normalizeNumericToken,
7
13
  parseFirstLine,
8
14
  parseSeriesNames
9
- } from "./chunk-YJVA3QUU.js";
15
+ } from "./chunk-3FRO35WW.js";
10
16
  import {
11
17
  RECOGNIZED_COLOR_NAMES,
12
18
  resolveColorWithDiagnostic
@@ -55,6 +61,11 @@ var KNOWN_BOOLEANS = /* @__PURE__ */ new Set([
55
61
  "fill",
56
62
  "hole"
57
63
  ]);
64
+ var KNOWN_FIRST_TOKENS = /* @__PURE__ */ new Set([
65
+ ...KNOWN_OPTIONS,
66
+ ...KNOWN_BOOLEANS,
67
+ ...GLOBAL_BOOLEANS
68
+ ]);
58
69
  function rejectSeriesHeader(result, keyword, lineNumber) {
59
70
  if (result.type === "bar" && keyword === "series") {
60
71
  const diag = makeDgmoError(
@@ -141,9 +152,13 @@ function parseChart(content, palette) {
141
152
  return fail(lineNumber, msg2);
142
153
  }
143
154
  }
144
- if (!trimmed.includes(" ") && !trimmed.includes(":") && !/\d/.test(trimmed)) {
145
- let msg2 = `Unsupported chart type: ${trimmed}. Supported types: ${[...VALID_TYPES].join(", ")}.`;
146
- const hint2 = suggest(trimmed.toLowerCase(), [...VALID_TYPES]);
155
+ const badType = detectBadChartTypeDeclaration(
156
+ trimmed,
157
+ KNOWN_FIRST_TOKENS
158
+ );
159
+ if (badType) {
160
+ let msg2 = `Unsupported chart type: ${badType}. Supported types: ${[...VALID_TYPES].join(", ")}.`;
161
+ const hint2 = suggest(badType.toLowerCase(), [...VALID_TYPES]);
147
162
  if (hint2) msg2 += ` ${hint2}`;
148
163
  return fail(lineNumber, msg2);
149
164
  }
@@ -329,6 +344,14 @@ function parseChart(content, palette) {
329
344
  ...multiValue && { expectedValues: seriesCount }
330
345
  });
331
346
  if (dataValues) {
347
+ if (multiValue) {
348
+ const surplus = surplusValueDiagnostic(
349
+ dataValues,
350
+ seriesCount,
351
+ lineNumber
352
+ );
353
+ if (surplus) result.diagnostics.push(surplus);
354
+ }
332
355
  const { label: rawLabel, color: pointColor } = extractColor(
333
356
  dataValues.label,
334
357
  palette,
@@ -420,32 +443,72 @@ function parseChart(content, palette) {
420
443
  return result;
421
444
  }
422
445
  function parseDataRowValues(line, options) {
446
+ const quoted = line.match(/^(["'])(.*?)\1\s+(\S.*)$/);
447
+ if (quoted) {
448
+ const label2 = quoted[2].trim();
449
+ if (!label2) return null;
450
+ const valueTokens = quoted[3].trim().split(/\s+/);
451
+ const numeric2 = trailingNumerics(valueTokens, 0);
452
+ if (numeric2.length !== valueTokens.length) return null;
453
+ const limit = options?.multiValue ? options.expectedValues ?? Infinity : 1;
454
+ return {
455
+ label: label2,
456
+ values: numeric2.slice(0, limit),
457
+ bareLabel: label2,
458
+ trailingNumericCount: numeric2.length,
459
+ quotedLabel: true
460
+ };
461
+ }
423
462
  const tokens = line.split(/\s+/);
424
463
  if (tokens.length < 2) return null;
464
+ const numeric = trailingNumerics(tokens, 1);
465
+ if (numeric.length === 0) return null;
466
+ const bareLabel = tokens.slice(0, tokens.length - numeric.length).join(" ");
425
467
  if (options?.multiValue) {
426
468
  const limit = options.expectedValues ?? Infinity;
427
- const values = [];
428
- let idx = tokens.length - 1;
429
- while (idx >= 1 && values.length < limit) {
430
- const tok = tokens[idx];
431
- const normTok = normalizeNumericToken(tok) ?? tok;
432
- const num2 = parseFloat(normTok);
433
- if (isNaN(num2) || !isFinite(Number(normTok))) break;
434
- values.unshift(num2);
435
- idx--;
436
- }
437
- if (values.length === 0) return null;
438
- const label2 = tokens.slice(0, idx + 1).join(" ");
469
+ const take = Math.min(numeric.length, limit);
470
+ const values = numeric.slice(numeric.length - take);
471
+ const label2 = tokens.slice(0, tokens.length - take).join(" ");
439
472
  if (!label2) return null;
440
- return { label: label2, values };
473
+ return {
474
+ label: label2,
475
+ values,
476
+ bareLabel,
477
+ trailingNumericCount: numeric.length,
478
+ quotedLabel: false
479
+ };
441
480
  }
442
- const lastToken = tokens[tokens.length - 1];
443
- const normalizedLast = normalizeNumericToken(lastToken) ?? lastToken;
444
- const num = parseFloat(normalizedLast);
445
- if (isNaN(num) || !isFinite(Number(normalizedLast))) return null;
446
481
  const label = tokens.slice(0, -1).join(" ");
447
482
  if (!label) return null;
448
- return { label, values: [num] };
483
+ return {
484
+ label,
485
+ // numeric.length >= 1 by the guard above.
486
+ values: [numeric[numeric.length - 1]],
487
+ bareLabel,
488
+ trailingNumericCount: numeric.length,
489
+ quotedLabel: false
490
+ };
491
+ }
492
+ function surplusValueDiagnostic(row, expectedValues, lineNumber) {
493
+ if (row.quotedLabel || row.trailingNumericCount <= expectedValues)
494
+ return null;
495
+ const expectation = expectedValues === 1 ? "but only 1 value is expected" : `but ${expectedValues} series defined`;
496
+ return makeDgmoError(
497
+ lineNumber,
498
+ `Data point "${row.bareLabel}" has ${row.trailingNumericCount} value(s), ${expectation}. If the label ends in a number, quote it: "${row.label}" ${row.values.join(" ")}`,
499
+ "warning"
500
+ );
501
+ }
502
+ function trailingNumerics(tokens, minIndex) {
503
+ const values = [];
504
+ for (let idx = tokens.length - 1; idx >= minIndex; idx--) {
505
+ const tok = tokens[idx];
506
+ const normTok = normalizeNumericToken(tok) ?? tok;
507
+ const num = parseFloat(normTok);
508
+ if (isNaN(num) || !isFinite(Number(normTok))) break;
509
+ values.unshift(num);
510
+ }
511
+ return values;
449
512
  }
450
513
 
451
514
  // src/data-chart-parser.ts
@@ -470,7 +533,13 @@ var KNOWN_EXTENDED_OPTIONS = /* @__PURE__ */ new Set([
470
533
  "no-percent",
471
534
  "columns",
472
535
  "rows",
473
- "x"
536
+ "x",
537
+ "highlight",
538
+ "dim"
539
+ ]);
540
+ var KNOWN_EXTENDED_FIRST_TOKENS = /* @__PURE__ */ new Set([
541
+ ...KNOWN_EXTENDED_OPTIONS,
542
+ ...GLOBAL_BOOLEANS
474
543
  ]);
475
544
  function parseScatterRow(line, palette, currentCategory, lineNumber, diagnostics) {
476
545
  const dataRow = parseDataRowValues(line, { multiValue: true });
@@ -594,10 +663,14 @@ function parseExtendedChartFull(content, palette) {
594
663
  return result;
595
664
  }
596
665
  }
597
- if (!trimmed.includes(" ") && !trimmed.includes(":") && !/\d/.test(trimmed)) {
666
+ const badType = detectBadChartTypeDeclaration(
667
+ trimmed,
668
+ KNOWN_EXTENDED_FIRST_TOKENS
669
+ );
670
+ if (badType) {
598
671
  const validTypes = [...VALID_EXTENDED_TYPES];
599
- let msg = `Unsupported chart type: ${trimmed}. Supported types: ${validTypes.join(", ")}.`;
600
- const hint = suggest(trimmed.toLowerCase(), validTypes);
672
+ let msg = `Unsupported chart type: ${badType}. Supported types: ${validTypes.join(", ")}.`;
673
+ const hint = suggest(badType.toLowerCase(), validTypes);
601
674
  if (hint) msg += ` ${hint}`;
602
675
  const diag = makeDgmoError(lineNumber, msg);
603
676
  result.diagnostics.push(diag);
@@ -625,7 +698,7 @@ function parseExtendedChartFull(content, palette) {
625
698
  continue;
626
699
  }
627
700
  const arrowMatch = trimmed.match(
628
- /^(.+?)\s*(->|--)\s*(.+?)\s+(-?[\d_]+(?:\.[\d]+)?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
701
+ /^(.+?)\s*(->|--)\s*(.+?)\s+(-?[\d,_]+(?:\.[\d]+)?)(?:\s+([A-Za-z][A-Za-z0-9_-]*))?\s*$/
629
702
  );
630
703
  if (arrowMatch) {
631
704
  const [, rawSource, arrow, rawTarget, rawVal, rawLinkColor] = arrowMatch;
@@ -674,12 +747,9 @@ function parseExtendedChartFull(content, palette) {
674
747
  }
675
748
  if (sankeyStack.length > 0) {
676
749
  const valColorMatch = trimmed.match(
677
- /(-?[\d_]+(?:\.[\d]+)?)\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\s*$/
750
+ /(-?[\d,_]+(?:\.[\d]+)?)\s+([A-Za-z][A-Za-z0-9_-]*)\s*$/
678
751
  );
679
- const strippedLine = valColorMatch ? trimmed.replace(
680
- /\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\s*$/,
681
- ""
682
- ) : trimmed;
752
+ const strippedLine = valColorMatch ? trimmed.replace(/\s+[A-Za-z][A-Za-z0-9_-]*\s*$/, "") : trimmed;
683
753
  const dataRow2 = parseDataRowValues(strippedLine);
684
754
  if (dataRow2?.values.length === 1) {
685
755
  const source = sankeyStack.at(-1).name;
@@ -720,8 +790,9 @@ function parseExtendedChartFull(content, palette) {
720
790
  const isBareKeywordOption = spaceIdx2 < 0 && /^(fill-tint|fill-solid|fill-outline|no-name|no-value|no-percent|shade|no-title)$/i.test(
721
791
  trimmed
722
792
  );
723
- const isLayoutDirective = spaceIdx2 >= 0 && trimmed.substring(0, spaceIdx2).toLowerCase() === "layout";
724
- if (!hasNumericSuffix && !isBareKeywordOption && !isLayoutDirective) {
793
+ const leadToken = spaceIdx2 >= 0 ? trimmed.substring(0, spaceIdx2).toLowerCase() : "";
794
+ const isValuedDirective = spaceIdx2 >= 0 && (leadToken === "layout" || isEmphasisToken(leadToken));
795
+ if (!hasNumericSuffix && !isBareKeywordOption && !isValuedDirective) {
725
796
  while (sankeyStack.length && sankeyStack.at(-1).indent >= indent) {
726
797
  sankeyStack.pop();
727
798
  }
@@ -760,6 +831,11 @@ function parseExtendedChartFull(content, palette) {
760
831
  }
761
832
  continue;
762
833
  }
834
+ if (isEmphasisToken(firstToken)) {
835
+ const directive = parseEmphasisDirective(trimmed, lineNumber);
836
+ if (directive) result.emphasis = directive;
837
+ continue;
838
+ }
763
839
  if (firstToken === "title") {
764
840
  result.diagnostics.push(emit(TITLE_DIRECTIVE_DX, lineNumber));
765
841
  continue;
@@ -1071,4 +1147,4 @@ export {
1071
1147
  getSimpleChartLegendGroups,
1072
1148
  getExtendedChartLegendGroups
1073
1149
  };
1074
- //# sourceMappingURL=chunk-Q7AH665U.js.map
1150
+ //# sourceMappingURL=chunk-AQEYUVGJ.js.map
@@ -1,15 +1,6 @@
1
- import {
2
- AUTO_TAG_COLOR_SENTINEL,
3
- finalizeAutoTagColors,
4
- matchTagBlockHeading,
5
- stripDefaultModifier,
6
- tagAttrKey,
7
- validateTagGroupNames,
8
- validateTagValues
9
- } from "./chunk-CMVZWP32.js";
10
1
  import {
11
2
  tryCollectNote
12
- } from "./chunk-ZXUAPTCK.js";
3
+ } from "./chunk-WWHECSYZ.js";
13
4
  import {
14
5
  resolveNotes
15
6
  } from "./chunk-QZAW5SFH.js";
@@ -20,6 +11,15 @@ import {
20
11
  displayName,
21
12
  normalizeName
22
13
  } from "./chunk-NOTA6TEI.js";
14
+ import {
15
+ AUTO_TAG_COLOR_SENTINEL,
16
+ finalizeAutoTagColors,
17
+ matchTagBlockHeading,
18
+ stripDefaultModifier,
19
+ tagAttrKey,
20
+ validateTagGroupNames,
21
+ validateTagValues
22
+ } from "./chunk-AHTTKERF.js";
23
23
  import {
24
24
  ER_REGISTRY,
25
25
  OPTION_NOCOLON_RE,
@@ -32,7 +32,7 @@ import {
32
32
  tryParseSharedOption,
33
33
  warnUnknownMetaKeys,
34
34
  withTagAliases
35
- } from "./chunk-YJVA3QUU.js";
35
+ } from "./chunk-3FRO35WW.js";
36
36
  import {
37
37
  resolveColorWithDiagnostic
38
38
  } from "./chunk-ZKPPI6BF.js";
@@ -521,4 +521,4 @@ export {
521
521
  looksLikeERDiagram,
522
522
  extractSymbols
523
523
  };
524
- //# sourceMappingURL=chunk-BR7AYN76.js.map
524
+ //# sourceMappingURL=chunk-B7N5KYXQ.js.map