@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.
- package/dist/advanced.d.ts +36 -0
- package/dist/advanced.js +159 -154
- package/dist/auto.js +142 -128
- package/dist/auto.mjs +775 -466
- package/dist/block.js +62 -60
- package/dist/chart-meta.js +50 -47
- package/dist/{charts-d3-DH2XA45I.js → charts-d3-25E4VWXO.js} +9 -8
- package/dist/chunk-2CW5ZTNH.js +58 -0
- package/dist/{chunk-PKNNHU7H.js → chunk-2NYXI35Z.js} +17 -10
- package/dist/{chunk-W5KMNC5U.js → chunk-2NZOHEP4.js} +9 -10
- package/dist/{chunk-6DCOIN4W.js → chunk-3FRO35WW.js} +768 -2
- package/dist/{chunk-6AUZPPAV.js → chunk-3KHJJP3J.js} +2 -2
- package/dist/{chunk-X3RXGSCZ.js → chunk-3SBHODJ4.js} +11 -11
- package/dist/{chunk-KUSAVOWZ.js → chunk-3SEEP2JM.js} +3 -3
- package/dist/{chunk-QWIBT6DS.js → chunk-47JNEKJA.js} +10 -10
- package/dist/{chunk-LHILKFDP.js → chunk-4T6OCSJ2.js} +9 -9
- package/dist/{chunk-XQ4KN6JQ.js → chunk-4ZIKWVSQ.js} +16 -15
- package/dist/{chunk-GMAH572Z.js → chunk-5VXU6MND.js} +2 -2
- package/dist/{chunk-HORZ5H2L.js → chunk-5XSNLXU5.js} +17 -17
- package/dist/{chunk-BFDVEO5R.js → chunk-62Y27T4C.js} +2 -2
- package/dist/{chunk-R5NH5BZG.js → chunk-6KL7TFLS.js} +6 -6
- package/dist/{chunk-UVDCHR4E.js → chunk-6OYDOQ2Q.js} +2 -2
- package/dist/{chunk-QI3BOLQB.js → chunk-7K6NDSXH.js} +4 -4
- package/dist/{chunk-27STWBOK.js → chunk-7SP4C6EV.js} +6 -8
- package/dist/{chunk-I46X5VUA.js → chunk-7TF3QOOD.js} +25 -1
- package/dist/{chunk-FGDSTT3F.js → chunk-7U4OR7CD.js} +2 -2
- package/dist/{chunk-VKNCC2GX.js → chunk-7UPFTBOW.js} +13 -13
- package/dist/{chunk-FT7TPPZ5.js → chunk-A3BDLDYG.js} +12 -12
- package/dist/{chunk-AZNXGWDC.js → chunk-ADCHLNWT.js} +7 -7
- package/dist/{chunk-CMVZWP32.js → chunk-AHTTKERF.js} +2 -2
- package/dist/{chunk-GAWKIIPO.js → chunk-AJFHNS67.js} +7 -7
- package/dist/{chunk-Q7AH665U.js → chunk-AQEYUVGJ.js} +111 -35
- package/dist/{chunk-BR7AYN76.js → chunk-B7N5KYXQ.js} +12 -12
- package/dist/chunk-BEOAKGNA.js +484 -0
- package/dist/{chunk-GABSL6TH.js → chunk-BM7MG6HT.js} +3 -3
- package/dist/{chunk-UKP5HWB5.js → chunk-BWYFIVZF.js} +4 -4
- package/dist/{chunk-7GUF6SDR.js → chunk-BZJIITYM.js} +9 -9
- package/dist/{chunk-RW5PEJ7D.js → chunk-C2UORMIA.js} +3 -3
- package/dist/{chunk-FXCB7H5O.js → chunk-CCGWX6AO.js} +2 -2
- package/dist/{chunk-AHXIMHDQ.js → chunk-COJW2NEY.js} +9 -9
- package/dist/{chunk-XY3UDKKH.js → chunk-COVYNAKJ.js} +4 -4
- package/dist/{chunk-GQ644SPD.js → chunk-CSHFU6LT.js} +14 -14
- package/dist/{chunk-JTMSWEIW.js → chunk-DLU643TF.js} +4 -4
- package/dist/{chunk-QAALSCKI.js → chunk-DPGQ5UMO.js} +12 -12
- package/dist/{chunk-I64ECJX3.js → chunk-EAI6XJ7D.js} +3 -3
- package/dist/{chunk-DWUMPMV2.js → chunk-EPRF3ZRV.js} +2 -2
- package/dist/{chunk-AIMLCDAO.js → chunk-EQOMY4PY.js} +2 -2
- package/dist/{chunk-XEAQDIMF.js → chunk-F7XM366V.js} +6 -6
- package/dist/{chunk-SG4PRYO3.js → chunk-FFVFZLRT.js} +49 -18
- package/dist/{chunk-LC3FFD43.js → chunk-FR6UFVSV.js} +12 -12
- package/dist/{chunk-6HTRCTAS.js → chunk-FVMKCZHF.js} +6 -4
- package/dist/{chunk-FUKNRLIJ.js → chunk-GK32ZFZY.js} +6 -6
- package/dist/{chunk-6KY7OCZC.js → chunk-GKYHWJXI.js} +3 -3
- package/dist/{chunk-NNYFQOTK.js → chunk-GQ5ECRP4.js} +10 -8
- package/dist/{chunk-PT4SW76W.js → chunk-HAA25PLC.js} +9 -9
- package/dist/{chunk-J7HI6G3G.js → chunk-HFEOOQ46.js} +6 -6
- package/dist/{chunk-KKHCNSKK.js → chunk-I47VHSPS.js} +5 -5
- package/dist/{chunk-YG2BEIQU.js → chunk-ICKXIMBA.js} +11 -11
- package/dist/{chunk-A44USUV7.js → chunk-ICZ7M6IZ.js} +23 -17
- package/dist/{chunk-HE5J53SZ.js → chunk-IOIMQHQ6.js} +3 -3
- package/dist/{chunk-3BEKKRH5.js → chunk-IYNKLCAZ.js} +8 -8
- package/dist/{chunk-774C2FF3.js → chunk-J7HQPVYH.js} +2 -2
- package/dist/{chunk-UFQJMOVZ.js → chunk-KBVOVDYP.js} +6 -6
- package/dist/{chunk-JHOAH4TI.js → chunk-KDK5EKUR.js} +2 -2
- package/dist/{chunk-VIRANCNY.js → chunk-KINOX74I.js} +14 -14
- package/dist/{chunk-VJHBSPGF.js → chunk-KQ3FNRGR.js} +3 -3
- package/dist/{chunk-U7NKYLX2.js → chunk-KQYQECWQ.js} +13 -13
- package/dist/{chunk-GMIJ35PW.js → chunk-KS5ZSM5T.js} +13 -13
- package/dist/{chunk-FLDC7ZAK.js → chunk-KV4HLIJE.js} +2 -2
- package/dist/{chunk-PYO4TJJ3.js → chunk-LPJ6H5X4.js} +11 -11
- package/dist/{chunk-LQHVDZYC.js → chunk-LRSW4JLE.js} +4 -4
- package/dist/{chunk-VRRDUYOK.js → chunk-M24VXUFG.js} +3 -3
- package/dist/{chunk-22OQWBWD.js → chunk-M3H7ZE6C.js} +10 -10
- package/dist/{chunk-MA3HJZHB.js → chunk-MTZOXISJ.js} +7 -7
- package/dist/{chunk-GWQJKTFS.js → chunk-N7BSBAVP.js} +94 -94
- package/dist/{chunk-65V6IRFN.js → chunk-NUTWTV6G.js} +10 -10
- package/dist/{chunk-HNBY6CNV.js → chunk-O576GYAP.js} +2 -2
- package/dist/{chunk-3CZLWOCI.js → chunk-OJ435DQZ.js} +3 -3
- package/dist/{chunk-BD3WGY4T.js → chunk-OR3R27CU.js} +2 -2
- package/dist/{chunk-2QC4HXCY.js → chunk-OSXQKC3S.js} +8 -10
- package/dist/{chunk-4RGZFA7H.js → chunk-Q5IHQ4NW.js} +11 -1
- package/dist/{chunk-ALYZ3MAA.js → chunk-QBYP2FBZ.js} +8 -476
- package/dist/{chunk-4ASVFYB2.js → chunk-R5BGGBFF.js} +5 -5
- package/dist/{chunk-YR43LJT5.js → chunk-RIEAN4D5.js} +15 -12
- package/dist/{chunk-P3H7QVDH.js → chunk-RRGKMJYL.js} +6 -6
- package/dist/{chunk-XG4NWFPY.js → chunk-S7FOIURR.js} +13 -13
- package/dist/{chunk-NNUMX6WX.js → chunk-S7YFT3PO.js} +40 -15
- package/dist/{chunk-SQCBSFT5.js → chunk-SBOAZ7YK.js} +51 -263
- package/dist/{chunk-VGNIDAPQ.js → chunk-SSHS42QG.js} +4 -4
- package/dist/{chunk-SGPFVDUL.js → chunk-T3FAJAJT.js} +6 -6
- package/dist/{chunk-AN2DQB3G.js → chunk-T7Y554OK.js} +12 -12
- package/dist/chunk-TGOMHUOV.js +218 -0
- package/dist/{chunk-W2DINCHL.js → chunk-TJN2OIVG.js} +31 -16
- package/dist/{chunk-CK2GMDXD.js → chunk-TLNVYWPA.js} +2 -2
- package/dist/{chunk-CQFNIIQN.js → chunk-U4IN6AHE.js} +2 -2
- package/dist/{chunk-HOXKNRON.js → chunk-UEU6IYKY.js} +2 -2
- package/dist/{chunk-UK6DKJLD.js → chunk-UIT7E6UF.js} +4 -4
- package/dist/{chunk-IQJCVREL.js → chunk-VMSBMIHW.js} +6 -6
- package/dist/{chunk-FFXCKZOU.js → chunk-VQFDBNYF.js} +3 -3
- package/dist/{chunk-PV2QO7QL.js → chunk-W6PCFRPL.js} +2 -2
- package/dist/{chunk-UQRIKAMH.js → chunk-WKNAJ4BR.js} +13 -13
- package/dist/{chunk-4WGMGKCZ.js → chunk-WW4BQ744.js} +11 -11
- package/dist/{chunk-ZXUAPTCK.js → chunk-WWHECSYZ.js} +2 -2
- package/dist/{chunk-4K42RUGC.js → chunk-XWODFBHJ.js} +43 -12
- package/dist/{chunk-VAO6ANGC.js → chunk-YENNFS5F.js} +9 -9
- package/dist/cli.cjs +160 -146
- package/dist/completion-registry.d.ts +129 -0
- package/dist/completion-registry.js +1270 -0
- package/dist/{compute-G55RG53N.js → compute-JAP5E2E4.js} +2 -2
- package/dist/dgmo-router-TGZWFIZO.js +88 -0
- package/dist/{dimensions-K6PGYYGT.js → dimensions-L6BXQXXL.js} +8 -8
- package/dist/editor.js +18 -0
- package/dist/element.js +142 -128
- package/dist/element.mjs +775 -466
- package/dist/{flowchart-parser-LALR6J6F.js → flowchart-parser-UKYOW3VM.js} +5 -5
- package/dist/{flowchart-renderer-DXYB5YRF.js → flowchart-renderer-DCFKUDDR.js} +9 -9
- package/dist/highlight.js +18 -0
- package/dist/index.js +65 -62
- package/dist/{layout-WCAIKGZG.js → layout-25Y3VDYF.js} +5 -5
- package/dist/layout-4SPLI4HG.js +15 -0
- package/dist/{layout-E6HR6PXH.js → layout-A6OIGZN2.js} +3 -3
- package/dist/{layout-3BVDMKXI.js → layout-CH4HFFRD.js} +4 -4
- package/dist/{layout-ZE5DRJWX.js → layout-G2ABQJQZ.js} +4 -4
- package/dist/{layout-3V2A4MUE.js → layout-ITLPDG6M.js} +6 -5
- package/dist/{layout-WSMPBQ4Q.js → layout-NF4EWFLT.js} +3 -3
- package/dist/layout-NY7MHJCL.js +15 -0
- package/dist/{layout-4IHCMWZN.js → layout-QBNAMEOA.js} +4 -4
- package/dist/{layout-OL2XFJXA.js → layout-SP7HJWKA.js} +3 -3
- package/dist/{layout-search-34DPZD43.js → layout-search-LUI475P3.js} +9 -4
- package/dist/{legend-constants-P5EQWRQQ.js → legend-constants-B77VKB3R.js} +7 -2
- package/dist/{parser-5QPFOB5F.js → parser-2UWWNTFL.js} +4 -4
- package/dist/{parser-CKA3QMAG.js → parser-3RXYQSA7.js} +5 -5
- package/dist/{parser-GKP2MHHL.js → parser-5C3PEZK3.js} +3 -3
- package/dist/{parser-275KP7JO.js → parser-66RYGJRB.js} +5 -6
- package/dist/{parser-7JHWEWXM.js → parser-6GN5YJBJ.js} +4 -4
- package/dist/{parser-XVPTRWZ4.js → parser-6MQM7WT3.js} +4 -4
- package/dist/{parser-7JVIDLLR.js → parser-7UI6UQ7B.js} +4 -4
- package/dist/{parser-5HQXCNOS.js → parser-B2A7XOAK.js} +3 -3
- package/dist/{parser-UWRX52PC.js → parser-CCNJKDDA.js} +4 -4
- package/dist/{parser-CRKLXGW7.js → parser-ESHNUFME.js} +4 -4
- package/dist/{parser-EXNBDNGY.js → parser-F4FEU57T.js} +3 -3
- package/dist/{parser-IVGHXLZP.js → parser-FHRMFUNX.js} +4 -3
- package/dist/{parser-XNKJCMMA.js → parser-FPCWDYQV.js} +4 -4
- package/dist/{parser-ZQDQTB4X.js → parser-FY3YFFBS.js} +5 -5
- package/dist/{parser-VOERD6XR.js → parser-GML6V2KZ.js} +4 -4
- package/dist/{parser-3CODK6RG.js → parser-HA3PF5FL.js} +4 -4
- package/dist/{parser-GN2MM5CC.js → parser-KTYF6WO5.js} +3 -3
- package/dist/{parser-ZGNXYFPS.js → parser-LTA2BOZO.js} +3 -3
- package/dist/{parser-FOOFEJQU.js → parser-LU7UAKNB.js} +4 -4
- package/dist/{parser-NNIL3HXU.js → parser-MHKYQPC2.js} +3 -3
- package/dist/{parser-IKWK2ZU3.js → parser-MVSYFK63.js} +4 -5
- package/dist/{parser-3VSWEKBF.js → parser-O7YQYFEN.js} +4 -4
- package/dist/{parser-YSLNDFLV.js → parser-OPIXXUY4.js} +4 -5
- package/dist/{parser-RNLTBIJ6.js → parser-S4EJPNVN.js} +4 -4
- package/dist/{parser-G26MTBFS.js → parser-T3D7BV6O.js} +3 -3
- package/dist/{parser-3KIGEEJM.js → parser-VVE4THG3.js} +4 -4
- package/dist/{parser-5FGJSQNS.js → parser-WPPJGB4R.js} +4 -4
- package/dist/{parser-27Z76SN3.js → parser-X5XLFY4Z.js} +4 -4
- package/dist/{parser-6B6SSZT7.js → parser-XCPMEB2Z.js} +3 -3
- package/dist/{parser-6PPHAXXH.js → parser-XRDUX2AR.js} +5 -5
- package/dist/{parser-FF4BMRSB.js → parser-YPWYT46P.js} +4 -4
- package/dist/{parser-4E4I3GNT.js → parser-YULS5MLD.js} +4 -4
- package/dist/{renderer-ZBTEX2JK.js → renderer-2DME63VZ.js} +4 -4
- package/dist/{renderer-RLMOTXZ6.js → renderer-3VY3VXJE.js} +13 -13
- package/dist/{renderer-6WRYVM5R.js → renderer-4A32DX5L.js} +8 -8
- package/dist/{renderer-UPF7NRTI.js → renderer-4K5YYX5R.js} +11 -11
- package/dist/{renderer-HIFQVEJA.js → renderer-6CFML5G3.js} +9 -9
- package/dist/{renderer-7NQSTQMQ.js → renderer-7HMZ5OCJ.js} +4 -4
- package/dist/{renderer-NE5W7CQP.js → renderer-B7Y6I7JX.js} +6 -5
- package/dist/{renderer-LVZAHRP6.js → renderer-C3RI4OPJ.js} +11 -12
- package/dist/{renderer-COLQFSFV.js → renderer-CJ56SUMF.js} +9 -9
- package/dist/{renderer-WFSUBKUL.js → renderer-COJZZ4F6.js} +8 -8
- package/dist/{renderer-SQ54MDSA.js → renderer-FXMGCSRP.js} +9 -9
- package/dist/{renderer-TYHGXAVT.js → renderer-G4UOW3RH.js} +4 -4
- package/dist/{renderer-YUXGXGSW.js → renderer-HQ4JFZOV.js} +9 -9
- package/dist/{renderer-JTCX6PCG.js → renderer-LHVCKEWF.js} +9 -9
- package/dist/{renderer-WNFXYYGL.js → renderer-OZX5KGQM.js} +8 -8
- package/dist/{renderer-CWEFGEIC.js → renderer-P3YQES7B.js} +13 -13
- package/dist/{renderer-UKXW2QPE.js → renderer-PLVIARM7.js} +9 -8
- package/dist/{renderer-5MPN7CXZ.js → renderer-RA4PTAMF.js} +5 -5
- package/dist/{renderer-JCZG6AYU.js → renderer-RMAM2SOJ.js} +10 -10
- package/dist/{renderer-JWGQSTMR.js → renderer-SES7QZYL.js} +14 -14
- package/dist/{renderer-KARQF3F3.js → renderer-TQ5QDZOE.js} +8 -8
- package/dist/{renderer-6EN5XXJZ.js → renderer-V5SNTPAM.js} +10 -10
- package/dist/{renderer-QD2SJF2I.js → renderer-WVD6G2TS.js} +9 -9
- package/dist/{renderer-AK2WO4EI.js → renderer-X2LYSMLU.js} +4 -4
- package/dist/{renderer-VMH6L6CP.js → renderer-Y3NXZINM.js} +8 -8
- package/dist/{renderer-XTXSOK3L.js → renderer-YEFOOULC.js} +10 -10
- package/dist/{renderer-YUKPS27O.js → renderer-YP3P6UVT.js} +8 -8
- package/dist/{renderer-D3BRNOMV.js → renderer-YVMETH6V.js} +11 -11
- package/dist/{renderer-2C6DJRYN.js → renderer-Z4GNKNXO.js} +8 -8
- package/dist/{renderer-radial-WF6VOUOD.js → renderer-radial-VYBZAXXE.js} +9 -9
- package/dist/{state-parser-L7DHZIQO.js → state-parser-VIW2WNA5.js} +5 -5
- package/dist/{state-renderer-TFEUOP4H.js → state-renderer-H22AQD3U.js} +12 -12
- package/package.json +5 -1
- package/dist/chunk-YJVA3QUU.js +0 -734
- package/dist/dgmo-router-B4S23EBH.js +0 -86
- package/dist/layout-3M5UYJHY.js +0 -14
- package/dist/layout-KPQWJNAG.js +0 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stripQuotes,
|
|
3
3
|
tokenizeQuoteAware
|
|
4
|
-
} from "./chunk-
|
|
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-
|
|
253
|
+
//# sourceMappingURL=chunk-AHTTKERF.js.map
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
mapLegendConfig,
|
|
7
7
|
mapLegendGroups,
|
|
8
8
|
parsePathRings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KBVOVDYP.js";
|
|
10
10
|
import {
|
|
11
11
|
renderIntegratedLegend
|
|
12
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
|
428
|
-
|
|
429
|
-
|
|
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 {
|
|
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 {
|
|
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
|
-
|
|
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: ${
|
|
600
|
-
const hint = suggest(
|
|
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+(-?[\
|
|
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
|
-
/(-?[\
|
|
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
|
|
724
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
524
|
+
//# sourceMappingURL=chunk-B7N5KYXQ.js.map
|