@diagrammo/dgmo 0.48.2 → 0.50.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/.cursorrules +12 -3
- package/.github/copilot-instructions.md +12 -3
- package/.windsurfrules +12 -3
- package/SKILL.md +12 -3
- package/dist/advanced.d.ts +851 -1
- package/dist/advanced.js +601 -177
- package/dist/auto.css +63 -0
- package/dist/auto.js +220 -110
- package/dist/auto.mjs +45920 -33167
- package/dist/block.css +63 -0
- package/dist/block.d.ts +13 -5
- package/dist/block.js +239 -62
- package/dist/{charts-d3-QOZHKTCT.js → charts-d3-DKUD7MQE.js} +9 -8
- package/dist/{chunk-3MQQNXPD.js → chunk-2C56LEML.js} +3 -3
- package/dist/{chunk-L66GEFB6.js → chunk-2JJ2KNPI.js} +4 -4
- package/dist/{chunk-6SM5NJQH.js → chunk-2QYTMIRR.js} +4 -4
- package/dist/{chunk-RJE5JTVK.js → chunk-3G6TMNVF.js} +7 -7
- package/dist/{chunk-MO5YHHMQ.js → chunk-3LKM6FMW.js} +2 -2
- package/dist/{chunk-76OWZ3BA.js → chunk-3P2DKJCG.js} +2 -2
- package/dist/chunk-3TDRHT4J.js +1043 -0
- package/dist/chunk-3XPUDB7B.js +420 -0
- package/dist/{chunk-2LACINWN.js → chunk-3ZPC476N.js} +7 -7
- package/dist/{chunk-G2H74XJZ.js → chunk-4BMJQFNK.js} +8 -8
- package/dist/{chunk-THXCFRTU.js → chunk-4S723I74.js} +9 -9
- package/dist/{chunk-6NYWYNBI.js → chunk-4XK3FLFB.js} +3 -3
- package/dist/chunk-5JSWBPZZ.js +607 -0
- package/dist/{chunk-WCT3NYCV.js → chunk-5LWQH6QV.js} +1 -1
- package/dist/{chunk-7DTWEFUE.js → chunk-5Z736BSU.js} +8 -8
- package/dist/{chunk-ERLBPDGU.js → chunk-6BFZKBGD.js} +2 -2
- package/dist/{chunk-6HO5ZTXK.js → chunk-6IAA2QQ2.js} +2 -2
- package/dist/{chunk-H6PI3KJT.js → chunk-6IUAK7RZ.js} +2 -2
- package/dist/{chunk-RTLBSQ3G.js → chunk-6M5PJFQG.js} +3 -3
- package/dist/{chunk-Z5CGSFJB.js → chunk-6X4AKWLF.js} +4 -4
- package/dist/{chunk-OJR3MQYV.js → chunk-6ZT4U37Q.js} +291 -52
- package/dist/{chunk-5QXL4NYS.js → chunk-7G2ER4CY.js} +10 -5
- package/dist/chunk-7PQYTZMA.js +681 -0
- package/dist/{chunk-OURHMODR.js → chunk-7RB5Q6MB.js} +11 -11
- package/dist/{chunk-YAA6IID3.js → chunk-7UEMZREK.js} +2 -2
- package/dist/{chunk-AN2MOO5T.js → chunk-A3WQVFBS.js} +3 -3
- package/dist/{chunk-VOKGH627.js → chunk-AHGF2YYA.js} +13 -3
- package/dist/{chunk-CI2G3OEB.js → chunk-ASS5YYIZ.js} +12 -12
- package/dist/{chunk-TYS6CSS5.js → chunk-BCYVE3N5.js} +2 -2
- package/dist/chunk-BDXC7MDK.js +2395 -0
- package/dist/chunk-BTUTZMPT.js +482 -0
- package/dist/{chunk-YGJTDXVR.js → chunk-C4GQDB5L.js} +2 -2
- package/dist/{chunk-Y2ZE3MSG.js → chunk-C63UWAKM.js} +2 -2
- package/dist/{chunk-725LDASD.js → chunk-CLD2OKV7.js} +2 -2
- package/dist/{chunk-WBRZJOEC.js → chunk-CMCR5WBW.js} +3 -3
- package/dist/{chunk-IZMRON6C.js → chunk-CVV36CWI.js} +2 -2
- package/dist/chunk-DMJJ3CEQ.js +254 -0
- package/dist/{chunk-MZSBFAPJ.js → chunk-EJTKV7CY.js} +9 -9
- package/dist/{chunk-FITOLXSX.js → chunk-EOFPYPAU.js} +26 -2
- package/dist/{chunk-X5LCYCL5.js → chunk-ER5SCQWQ.js} +5 -5
- package/dist/{chunk-4OHACBGX.js → chunk-F2L5GCQ4.js} +2 -2
- package/dist/{chunk-FCIIHT24.js → chunk-F5UDBSJY.js} +7 -7
- package/dist/{chunk-3JLKYGBQ.js → chunk-F7BFXWNQ.js} +2 -2
- package/dist/{chunk-FANX6UJR.js → chunk-FAL7NOK3.js} +11 -11
- package/dist/{chunk-BUPDIHML.js → chunk-FB2WHOEQ.js} +4 -4
- package/dist/chunk-FL4IOQ37.js +379 -0
- package/dist/{chunk-LIOHW36Z.js → chunk-GBE54KY6.js} +6 -5
- package/dist/{chunk-RUNNI6VE.js → chunk-GL5UZ6NY.js} +3 -3
- package/dist/{chunk-4GRI7MEB.js → chunk-GPWHQ5FJ.js} +6 -6
- package/dist/chunk-GROQGHCT.js +960 -0
- package/dist/{chunk-SGZYXELT.js → chunk-H73FP42Q.js} +9 -6
- package/dist/{chunk-PBAHEPLQ.js → chunk-HGN652MU.js} +7 -6
- package/dist/{chunk-3SMGIJDD.js → chunk-HHXOONLX.js} +13 -1
- package/dist/{chunk-QOOUC2J5.js → chunk-HQCHYB5F.js} +2 -2
- package/dist/{chunk-AELOBFW5.js → chunk-I4IFRCUB.js} +3 -3
- package/dist/{chunk-GMR5MFHJ.js → chunk-I7F2A35O.js} +2 -2
- package/dist/{chunk-T2OE3YQB.js → chunk-IA3FJYWR.js} +3 -3
- package/dist/chunk-IAEC4KLA.js +492 -0
- package/dist/chunk-IVKC4GID.js +32 -0
- package/dist/{chunk-HSH73DP6.js → chunk-JFYIP7XU.js} +139 -39
- package/dist/{chunk-CKNVO24D.js → chunk-JZNMXEIV.js} +2 -2
- package/dist/chunk-KJXIHOVL.js +940 -0
- package/dist/chunk-L2ZTFHAY.js +331 -0
- package/dist/{chunk-B7JUCQUA.js → chunk-M5RXSRO2.js} +4 -4
- package/dist/{chunk-ULOEATBZ.js → chunk-NFFIKVNO.js} +106 -29
- package/dist/{chunk-PZMETGLY.js → chunk-NISQC5KW.js} +358 -122
- package/dist/chunk-O4VUFXIH.js +574 -0
- package/dist/{chunk-RVMRZAPB.js → chunk-O76UD6VJ.js} +3 -3
- package/dist/{chunk-JM4LEPY3.js → chunk-O7NUCTFU.js} +2 -2
- package/dist/{chunk-JED6ZDEE.js → chunk-O7WP4ZD4.js} +2 -2
- package/dist/{chunk-EVCVDTXE.js → chunk-OHQEMBLI.js} +3 -3
- package/dist/{chunk-ZBWMSD5N.js → chunk-ONA5KPV3.js} +4 -4
- package/dist/{chunk-Y3J7VR52.js → chunk-OTAL43EH.js} +34 -2
- package/dist/{chunk-WCSOJFU3.js → chunk-OTP5KVLO.js} +3 -3
- package/dist/{chunk-RYEGFMUO.js → chunk-PGEGPSCZ.js} +2 -2
- package/dist/{chunk-ZO27FGJS.js → chunk-PH5X4GIP.js} +2 -2
- package/dist/{chunk-ZJEL4H2R.js → chunk-PJUGRJHJ.js} +9 -9
- package/dist/{chunk-ZGR7ULFJ.js → chunk-PLZI6KPM.js} +26 -14
- package/dist/{chunk-3R5POCTZ.js → chunk-PMN3Q7RJ.js} +6 -6
- package/dist/{chunk-YGJZWZTY.js → chunk-PZFVK3IH.js} +2 -2
- package/dist/chunk-Q4V4XQWV.js +158 -0
- package/dist/chunk-QDFNCATJ.js +325 -0
- package/dist/{chunk-QEBUY5NY.js → chunk-QFQ35BTO.js} +4 -4
- package/dist/chunk-QQJUTGQH.js +135 -0
- package/dist/{chunk-PWIHZ6NJ.js → chunk-QUJGFNFN.js} +4 -4
- package/dist/{chunk-J5FIXQRT.js → chunk-R56LASIN.js} +4 -4
- package/dist/{chunk-SRTU6HMQ.js → chunk-RV26LTUU.js} +8 -8
- package/dist/chunk-RV6A2B5S.js +354 -0
- package/dist/{chunk-EB6FPQUP.js → chunk-S5GRONXL.js} +3 -3
- package/dist/{chunk-5MLYVTYM.js → chunk-SCHXJTZL.js} +2 -2
- package/dist/{chunk-T3UBLACL.js → chunk-SCQ5VPUF.js} +19 -5
- package/dist/{chunk-PBHE5UG6.js → chunk-SGFZZAUO.js} +46 -12
- package/dist/{chunk-BUVJFRPY.js → chunk-SU2VBK4L.js} +4 -4
- package/dist/{chunk-SML67VPV.js → chunk-T4BRO3Z6.js} +3 -3
- package/dist/{chunk-NURGB5Z4.js → chunk-TSA237IM.js} +2 -2
- package/dist/chunk-TWCLK2GA.js +273 -0
- package/dist/{chunk-IJZFN3HM.js → chunk-TWQUYVP3.js} +4 -4
- package/dist/{chunk-DKEPS5LH.js → chunk-U2HGPLZS.js} +36 -2
- package/dist/{chunk-B65G5DNL.js → chunk-URSQLCTR.js} +3 -3
- package/dist/{chunk-ILKORZ3H.js → chunk-UUS2GIJZ.js} +7 -7
- package/dist/{chunk-XAKEUMEJ.js → chunk-UXOSVCLJ.js} +4 -4
- package/dist/{chunk-QLCCJEJI.js → chunk-WCUHAQKB.js} +2 -2
- package/dist/{chunk-WVAJFAIA.js → chunk-WWN566I7.js} +257 -101
- package/dist/{chunk-IPWPWM6R.js → chunk-X2NMFTG3.js} +111 -10
- package/dist/{chunk-UWN33VNX.js → chunk-XCLHOZAM.js} +10 -10
- package/dist/{chunk-P235SVAH.js → chunk-XDXNDSKO.js} +2 -2
- package/dist/chunk-XHVV4NVW.js +51 -0
- package/dist/{chunk-33LCUH4H.js → chunk-XMVQ5F4M.js} +4 -4
- package/dist/{chunk-MITI6NOL.js → chunk-YA7D2N2O.js} +11 -11
- package/dist/{chunk-7JEGTRLD.js → chunk-YB3FW24O.js} +3 -3
- package/dist/chunk-YNRDWYZP.js +295 -0
- package/dist/{chunk-44CM72SQ.js → chunk-YZLMKW4T.js} +3 -3
- package/dist/chunk-Z6XJQ6KO.js +452 -0
- package/dist/cli.cjs +179 -133
- package/dist/clock.d.ts +10 -0
- package/dist/clock.js +235 -0
- package/dist/countdown.d.ts +12 -0
- package/dist/countdown.js +450 -0
- package/dist/dgmo-router-QOMFCOOV.js +84 -0
- package/dist/dimensions-P5FSX2QN.js +22 -0
- package/dist/editor.js +43 -2
- package/dist/element.js +220 -110
- package/dist/element.mjs +45920 -33167
- package/dist/{flowchart-parser-ZNSKIBVR.js → flowchart-parser-OE4WHLTF.js} +4 -4
- package/dist/{flowchart-renderer-SNDSII4D.js → flowchart-renderer-GPCSMTOR.js} +8 -8
- package/dist/highlight.d.ts +17 -1
- package/dist/highlight.js +163 -6
- package/dist/index.d.ts +5 -1
- package/dist/index.js +199 -233
- package/dist/{layout-HRBZPFCN.js → layout-34CLNICW.js} +5 -5
- package/dist/layout-46366KBT.js +10 -0
- package/dist/{layout-HWDSRX5E.js → layout-5BG6DFCU.js} +6 -6
- package/dist/layout-6RDJHS6E.js +9 -0
- package/dist/{layout-7QXCNOVS.js → layout-7H4H46CS.js} +3 -3
- package/dist/{layout-46N4JJYK.js → layout-7SKMFYHL.js} +5 -5
- package/dist/{layout-EE6GE46Y.js → layout-DC4TVXER.js} +5 -5
- package/dist/layout-FGQWRYYW.js +14 -0
- package/dist/{layout-S2QBYSK2.js → layout-NXG63LWH.js} +3 -3
- package/dist/{layout-N76NR4ZO.js → layout-PUQCB6AN.js} +7 -7
- package/dist/{layout-HYZPWAK5.js → layout-QNUQLEHU.js} +3 -3
- package/dist/{layout-UM5F4DJB.js → layout-T3OZU5QW.js} +5 -5
- package/dist/layout-TJIWF7EM.js +14 -0
- package/dist/layout-VYELEAW7.js +14 -0
- package/dist/{layout-5RA6QWR6.js → layout-WZHNDT2O.js} +6 -6
- package/dist/{layout-search-OYV77HHS.js → layout-search-QS44PI5R.js} +6 -6
- package/dist/{parser-6BTRLKRZ.js → parser-45DENHFZ.js} +4 -4
- package/dist/{parser-TFZFBVWN.js → parser-4AI5ZN5F.js} +3 -3
- package/dist/{parser-XDVELHRK.js → parser-4P36TUVD.js} +4 -4
- package/dist/{parser-ZSDPZYQP.js → parser-5AURY4A6.js} +4 -4
- package/dist/{parser-N5O4IHUN.js → parser-A2BEFMGK.js} +4 -4
- package/dist/parser-B5FVS7O6.js +11 -0
- package/dist/{parser-NGU3ETO6.js → parser-C2HF2C2E.js} +4 -4
- package/dist/parser-CSFUN3CT.js +14 -0
- package/dist/{parser-TRTHDFPP.js → parser-D3QT6GWN.js} +5 -5
- package/dist/parser-D5637H5H.js +15 -0
- package/dist/{parser-VQP2UJ6W.js → parser-DFFEDKHH.js} +3 -3
- package/dist/parser-DOKMZXVZ.js +13 -0
- package/dist/parser-FMPCVFRK.js +15 -0
- package/dist/{parser-Y6WTBU76.js → parser-HYRTF3DO.js} +3 -3
- package/dist/{parser-I6KXEYFK.js → parser-I2UIJKVQ.js} +4 -4
- package/dist/{parser-O5J4VBII.js → parser-IBWNAPY4.js} +3 -3
- package/dist/{parser-PQ3POX45.js → parser-KUQWRPIT.js} +4 -4
- package/dist/{parser-2MFP2H2E.js → parser-LWKKBNSA.js} +3 -3
- package/dist/{parser-OV7NOBW6.js → parser-O4QFCUW7.js} +5 -5
- package/dist/{parser-IXSZZQHY.js → parser-PGMQDD4G.js} +4 -4
- package/dist/{parser-3STE62GB.js → parser-Q4QKCIWQ.js} +4 -4
- package/dist/parser-QTOB4KFL.js +14 -0
- package/dist/{parser-2EWECDSA.js → parser-QYYM4QVW.js} +4 -4
- package/dist/{parser-4OGOBJJ4.js → parser-RZMQP7MM.js} +4 -4
- package/dist/parser-RZPVAQVX.js +11 -0
- package/dist/parser-SOUJOEYI.js +13 -0
- package/dist/{parser-4FL2CMDG.js → parser-UQE5OWZI.js} +5 -5
- package/dist/{parser-NRAI6O25.js → parser-WAV5JRPT.js} +4 -4
- package/dist/{parser-KNSQSKQO.js → parser-YLKYBRIT.js} +5 -5
- package/dist/{parser-XKRP7QKP.js → parser-YS7TOS2K.js} +3 -3
- package/dist/{parser-AQETEVRW.js → parser-ZSOWUBML.js} +5 -5
- package/dist/{parser-CFZD5IBL.js → parser-ZTBATMLX.js} +4 -4
- package/dist/{renderer-VACVQYML.js → renderer-35HSIDMZ.js} +8 -8
- package/dist/{renderer-5MYBMBYO.js → renderer-4ITCHBT7.js} +5 -5
- package/dist/{renderer-CLJHQPBJ.js → renderer-67NPCBIS.js} +11 -11
- package/dist/{renderer-5NDVNDAZ.js → renderer-6GHYK7DX.js} +9 -9
- package/dist/{renderer-Z7I3W2PP.js → renderer-6RNGHC5Z.js} +8 -8
- package/dist/renderer-72LGR2YF.js +14 -0
- package/dist/{renderer-KQB7UGDS.js → renderer-7RH2SI3B.js} +3 -3
- package/dist/renderer-7SWMIFMM.js +21 -0
- package/dist/renderer-BBCEFILK.js +24 -0
- package/dist/{renderer-JGBKUCZD.js → renderer-BSW7SRIZ.js} +4 -4
- package/dist/{renderer-BYCNMBF7.js → renderer-BY533UWU.js} +11 -11
- package/dist/{renderer-6W5462RB.js → renderer-BZSBPTZJ.js} +9 -9
- package/dist/{renderer-7MVLWWQD.js → renderer-CXUC4KAD.js} +9 -9
- package/dist/{renderer-QIWVHWZO.js → renderer-DAXMXIKD.js} +3 -3
- package/dist/renderer-FZUKFUNZ.js +23 -0
- package/dist/renderer-G2NLGNKF.js +17 -0
- package/dist/renderer-GO3FE3RA.js +24 -0
- package/dist/{renderer-ZGNTUWC4.js → renderer-HPGR6USK.js} +8 -8
- package/dist/{renderer-UV6MI64M.js → renderer-HVCU2C3Z.js} +3 -3
- package/dist/renderer-ICJN2SA2.js +24 -0
- package/dist/{renderer-AWWAF6XD.js → renderer-INEXO7B6.js} +10 -10
- package/dist/{renderer-YY2OSF6E.js → renderer-KDYCFRBX.js} +8 -8
- package/dist/renderer-KY4KQBTF.js +19 -0
- package/dist/{renderer-B2OMQIQG.js → renderer-LBN65V45.js} +13 -13
- package/dist/{renderer-N43WR5GV.js → renderer-MGBWOCXG.js} +10 -10
- package/dist/{renderer-PGX2TKVS.js → renderer-O4JKUGKO.js} +8 -8
- package/dist/{renderer-4JHRUBE6.js → renderer-OOGFODWP.js} +10 -10
- package/dist/{renderer-6EEZHMH4.js → renderer-Q6ZKPLS6.js} +9 -9
- package/dist/{renderer-RPOA5YPZ.js → renderer-SZQ326M5.js} +12 -12
- package/dist/{renderer-ZRNG54CW.js → renderer-TKG6LS4U.js} +11 -11
- package/dist/{renderer-W4M6QLIJ.js → renderer-TQMZGDAX.js} +13 -13
- package/dist/renderer-radial-JELMHQ24.js +21 -0
- package/dist/{resolver-NOAA7ID7.js → resolver-FHBCO3PL.js} +3 -3
- package/dist/{state-parser-Z2V23ATR.js → state-parser-3REXRK3R.js} +4 -4
- package/dist/{state-renderer-B4DQBM6M.js → state-renderer-XYLNRWXR.js} +8 -8
- package/docs/ai-integration.md +12 -3
- package/docs/language-reference.md +429 -24
- package/gallery/fixtures/body.dgmo +17 -0
- package/gallery/fixtures/bracket.dgmo +30 -0
- package/gallery/fixtures/clock.dgmo +8 -0
- package/gallery/fixtures/countdown.dgmo +3 -0
- package/gallery/fixtures/family.dgmo +23 -0
- package/gallery/fixtures/goal.dgmo +4 -0
- package/gallery/fixtures/sketch.dgmo +22 -0
- package/package.json +12 -4
- package/dist/chunk-ODZVHU3R.js +0 -153
- package/dist/dgmo-router-X35VLZLM.js +0 -73
- package/dist/dimensions-J3FHIMJ6.js +0 -22
- package/dist/layout-5T6RH5M6.js +0 -14
- package/dist/layout-G23F7LDH.js +0 -9
- package/dist/layout-OB3RI63S.js +0 -14
- package/dist/parser-JAL2HD4I.js +0 -13
- package/dist/renderer-SMIBCRVB.js +0 -24
- package/dist/renderer-radial-C32GPJQ7.js +0 -21
|
@@ -103,6 +103,11 @@ var BOXES_AND_LINES_REGISTRY = staticRegistry([
|
|
|
103
103
|
"description",
|
|
104
104
|
"heat"
|
|
105
105
|
]);
|
|
106
|
+
var SKETCH_REGISTRY = staticRegistry([
|
|
107
|
+
"shape",
|
|
108
|
+
"at",
|
|
109
|
+
"collapsed"
|
|
110
|
+
]);
|
|
106
111
|
var TIMELINE_REGISTRY = staticRegistry([
|
|
107
112
|
"color",
|
|
108
113
|
"description",
|
|
@@ -148,6 +153,19 @@ var RACI_REGISTRY = staticRegistry([
|
|
|
148
153
|
"color",
|
|
149
154
|
"description"
|
|
150
155
|
]);
|
|
156
|
+
var FAMILY_PERSON_REGISTRY = staticRegistry([
|
|
157
|
+
"sex",
|
|
158
|
+
"b",
|
|
159
|
+
"d",
|
|
160
|
+
"bp",
|
|
161
|
+
"dp",
|
|
162
|
+
"occupation",
|
|
163
|
+
"military",
|
|
164
|
+
"education",
|
|
165
|
+
"religion",
|
|
166
|
+
"burial"
|
|
167
|
+
]);
|
|
168
|
+
var FAMILY_UNION_REGISTRY = staticRegistry(["m"]);
|
|
151
169
|
|
|
152
170
|
// src/utils/parsing.ts
|
|
153
171
|
var RECOGNIZED_COLOR_SET = new Set(
|
|
@@ -174,6 +192,7 @@ var ALL_CHART_TYPES = /* @__PURE__ */ new Set([
|
|
|
174
192
|
"venn",
|
|
175
193
|
"quadrant",
|
|
176
194
|
// diagrams
|
|
195
|
+
"body",
|
|
177
196
|
"sequence",
|
|
178
197
|
"flowchart",
|
|
179
198
|
"class",
|
|
@@ -198,8 +217,14 @@ var ALL_CHART_TYPES = /* @__PURE__ */ new Set([
|
|
|
198
217
|
"ring",
|
|
199
218
|
"treemap",
|
|
200
219
|
"block",
|
|
220
|
+
"goal",
|
|
221
|
+
"countdown",
|
|
222
|
+
"clock",
|
|
223
|
+
"sketch",
|
|
201
224
|
"raci",
|
|
202
|
-
"map"
|
|
225
|
+
"map",
|
|
226
|
+
"family",
|
|
227
|
+
"bracket"
|
|
203
228
|
]);
|
|
204
229
|
function measureIndent(line) {
|
|
205
230
|
let indent = 0;
|
|
@@ -548,6 +573,9 @@ function parseMetadataRegion(region, aliasMap, diagnostics, line) {
|
|
|
548
573
|
}
|
|
549
574
|
return meta;
|
|
550
575
|
}
|
|
576
|
+
function cutUnionMetadata(line, registry) {
|
|
577
|
+
return findMetadataCutOffset(line, scanTokens(line), registry);
|
|
578
|
+
}
|
|
551
579
|
function splitNameAndMeta(line, registry, aliasMap = /* @__PURE__ */ new Map(), palette, diagnostics, lineNumber, options = {}) {
|
|
552
580
|
const tokens = scanTokens(line);
|
|
553
581
|
const cutOffset = findMetadataCutOffset(line, tokens, registry);
|
|
@@ -618,6 +646,7 @@ export {
|
|
|
618
646
|
GANTT_REGISTRY,
|
|
619
647
|
PERT_REGISTRY,
|
|
620
648
|
BOXES_AND_LINES_REGISTRY,
|
|
649
|
+
SKETCH_REGISTRY,
|
|
621
650
|
TIMELINE_REGISTRY,
|
|
622
651
|
MINDMAP_REGISTRY,
|
|
623
652
|
TECH_RADAR_REGISTRY,
|
|
@@ -627,6 +656,8 @@ export {
|
|
|
627
656
|
RING_REGISTRY,
|
|
628
657
|
TREEMAP_REGISTRY,
|
|
629
658
|
RACI_REGISTRY,
|
|
659
|
+
FAMILY_PERSON_REGISTRY,
|
|
660
|
+
FAMILY_UNION_REGISTRY,
|
|
630
661
|
ALL_CHART_TYPES,
|
|
631
662
|
measureIndent,
|
|
632
663
|
extractColor,
|
|
@@ -640,7 +671,8 @@ export {
|
|
|
640
671
|
parseSeriesNames,
|
|
641
672
|
peelTrailingColorName,
|
|
642
673
|
peelRampColors,
|
|
674
|
+
cutUnionMetadata,
|
|
643
675
|
splitNameAndMeta,
|
|
644
676
|
warnUnknownMetaKeys
|
|
645
677
|
};
|
|
646
|
-
//# sourceMappingURL=chunk-
|
|
678
|
+
//# sourceMappingURL=chunk-OTAL43EH.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
tagAttrKey,
|
|
8
8
|
validateTagGroupNames,
|
|
9
9
|
validateTagValues
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WCUHAQKB.js";
|
|
11
11
|
import {
|
|
12
12
|
TREEMAP_REGISTRY,
|
|
13
13
|
extractColor,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
stripQuotes,
|
|
19
19
|
warnUnknownMetaKeys,
|
|
20
20
|
withTagAliases
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OTAL43EH.js";
|
|
22
22
|
import {
|
|
23
23
|
emit,
|
|
24
24
|
formatDgmoError,
|
|
@@ -377,4 +377,4 @@ export {
|
|
|
377
377
|
TREEMAP_DIAGNOSTICS,
|
|
378
378
|
parseTreemap
|
|
379
379
|
};
|
|
380
|
-
//# sourceMappingURL=chunk-
|
|
380
|
+
//# sourceMappingURL=chunk-OTP5KVLO.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
splitNameAndMeta,
|
|
11
11
|
tryParseSharedOption,
|
|
12
12
|
warnUnknownMetaKeys
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OTAL43EH.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveColorWithDiagnostic
|
|
16
16
|
} from "./chunk-TLVIHFRO.js";
|
|
@@ -952,4 +952,4 @@ export {
|
|
|
952
952
|
parseRaci,
|
|
953
953
|
allTasks
|
|
954
954
|
};
|
|
955
|
-
//# sourceMappingURL=chunk-
|
|
955
|
+
//# sourceMappingURL=chunk-PGEGPSCZ.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-6KFWC4CO.js";
|
|
11
11
|
import {
|
|
12
12
|
measureText
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5LWQH6QV.js";
|
|
14
14
|
import {
|
|
15
15
|
contrastText,
|
|
16
16
|
mix,
|
|
@@ -551,4 +551,4 @@ function renderModal(parent, node, ctx) {
|
|
|
551
551
|
export {
|
|
552
552
|
renderWireframe
|
|
553
553
|
};
|
|
554
|
-
//# sourceMappingURL=chunk-
|
|
554
|
+
//# sourceMappingURL=chunk-PH5X4GIP.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
layoutJourneyMap,
|
|
4
4
|
scoreToColor,
|
|
5
5
|
scoreToCurveY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-F7BFXWNQ.js";
|
|
7
7
|
import {
|
|
8
8
|
wrapNoteBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BCYVE3N5.js";
|
|
10
10
|
import {
|
|
11
11
|
NOTE_BULLET_INDENT
|
|
12
12
|
} from "./chunk-5DH3KYFH.js";
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
CARD_RADIUS
|
|
18
18
|
} from "./chunk-3CIOJ5YJ.js";
|
|
19
|
-
import {
|
|
20
|
-
renderIntegratedLegend
|
|
21
|
-
} from "./chunk-PWIHZ6NJ.js";
|
|
22
19
|
import {
|
|
23
20
|
ScaleContext
|
|
24
21
|
} from "./chunk-YYVTBZZC.js";
|
|
22
|
+
import {
|
|
23
|
+
renderIntegratedLegend
|
|
24
|
+
} from "./chunk-QUJGFNFN.js";
|
|
25
25
|
import {
|
|
26
26
|
FONT_FAMILY
|
|
27
27
|
} from "./chunk-6KFWC4CO.js";
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
measureText,
|
|
30
30
|
truncateText,
|
|
31
31
|
wrapTextToWidth
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-5LWQH6QV.js";
|
|
33
33
|
import {
|
|
34
34
|
parseJourneyMap
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-YZLMKW4T.js";
|
|
36
36
|
import {
|
|
37
37
|
contrastText,
|
|
38
38
|
mix,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
resolveActiveTagGroup,
|
|
43
43
|
tagAttrKey
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-WCUHAQKB.js";
|
|
45
45
|
|
|
46
46
|
// src/journey-map/renderer.ts
|
|
47
47
|
import * as d3 from "d3-selection";
|
|
@@ -848,4 +848,4 @@ export {
|
|
|
848
848
|
renderJourneyMap,
|
|
849
849
|
renderJourneyMapForExport
|
|
850
850
|
};
|
|
851
|
-
//# sourceMappingURL=chunk-
|
|
851
|
+
//# sourceMappingURL=chunk-PJUGRJHJ.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BMR4CIEO.js";
|
|
7
7
|
import {
|
|
8
8
|
renderNodeCard
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AHGF2YYA.js";
|
|
10
10
|
import {
|
|
11
11
|
CARD_RADIUS,
|
|
12
12
|
HEADER_HEIGHT,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-3CIOJ5YJ.js";
|
|
17
17
|
import {
|
|
18
18
|
formatDateLabel
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XCLHOZAM.js";
|
|
20
20
|
import {
|
|
21
21
|
renderIntegratedLegend
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QUJGFNFN.js";
|
|
23
23
|
import {
|
|
24
24
|
TITLE_FONT_SIZE,
|
|
25
25
|
TITLE_FONT_WEIGHT,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-6KFWC4CO.js";
|
|
31
31
|
import {
|
|
32
32
|
CHAR_WIDTH_RATIO
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-5LWQH6QV.js";
|
|
34
34
|
import {
|
|
35
35
|
contrastText,
|
|
36
36
|
getSeriesColors,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
resolveActiveTagGroup,
|
|
43
43
|
resolveTagColor
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-WCUHAQKB.js";
|
|
45
45
|
import {
|
|
46
46
|
resolveColor
|
|
47
47
|
} from "./chunk-TLVIHFRO.js";
|
|
@@ -152,7 +152,9 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
152
152
|
if (slot.kind === "event") {
|
|
153
153
|
const event = slot.event;
|
|
154
154
|
const solid2 = eventColor(event);
|
|
155
|
-
const cardFill2 = shapeFill(palette, solid2, isDark, {
|
|
155
|
+
const cardFill2 = shapeFill(palette, solid2, isDark, {
|
|
156
|
+
solid: parsed.options.solidFill
|
|
157
|
+
});
|
|
156
158
|
const titleColor2 = contrastText(
|
|
157
159
|
cardFill2,
|
|
158
160
|
palette.textOnFillLight,
|
|
@@ -415,9 +417,9 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
415
417
|
const BOT_PAD = 14;
|
|
416
418
|
const spineY2 = topUsed + TOP_PAD + aboveExt;
|
|
417
419
|
const eraBaseY2 = eraSide === "above" ? spineY2 - (contentAbove + 14) : spineY2 + (contentBelow + 14);
|
|
418
|
-
const
|
|
419
|
-
const totalH2 = exportMode ?
|
|
420
|
-
return { contentW: contentW2, contentH, totalH: totalH2, spineY: spineY2, eraBaseY: eraBaseY2, laneNear: laneNear2 };
|
|
420
|
+
const contentH2 = spineY2 + belowExt + BOT_PAD;
|
|
421
|
+
const totalH2 = exportMode ? contentH2 : Math.max(heightHint, contentH2);
|
|
422
|
+
return { contentW: contentW2, contentH: contentH2, totalH: totalH2, spineY: spineY2, eraBaseY: eraBaseY2, laneNear: laneNear2 };
|
|
421
423
|
};
|
|
422
424
|
const envStretch = Number(
|
|
423
425
|
globalThis.process?.env?.["DGMO_EVT_STRETCH"]
|
|
@@ -450,8 +452,11 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
450
452
|
}
|
|
451
453
|
}
|
|
452
454
|
}
|
|
453
|
-
const { contentW, totalH, spineY, eraBaseY, laneNear } = layout;
|
|
455
|
+
const { contentW, contentH, totalH, spineY, eraBaseY, laneNear } = layout;
|
|
454
456
|
const svg = d3Selection.select(container).append("svg").attr("width", contentW).attr("height", totalH).attr("viewBox", `0 0 ${contentW} ${totalH}`).attr("preserveAspectRatio", "xMidYMin meet").attr("xmlns", "http://www.w3.org/2000/svg").style("font-family", FONT_FAMILY);
|
|
457
|
+
if (!exportMode && totalH > contentH) {
|
|
458
|
+
svg.attr("data-content-height", Math.ceil(contentH));
|
|
459
|
+
}
|
|
455
460
|
if (!exportMode) svg.append("style").text(HOVER_CSS);
|
|
456
461
|
if (showTitle) {
|
|
457
462
|
const t = svg.append("text").attr("class", "chart-title").attr("x", contentW / 2).attr("y", TITLE_Y).attr("text-anchor", "middle").attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).attr("data-line-number", parsed.titleLineNumber ?? 1).text(parsed.title);
|
|
@@ -536,15 +541,22 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
536
541
|
const shelfH = HEADER_HEIGHT + dateH;
|
|
537
542
|
const clipId = `dgmo-evt-shelf-${shelfClipSeq++}`;
|
|
538
543
|
cardG.append("clipPath").attr("id", clipId).append("rect").attr("x", 0).attr("y", shelfTop).attr("width", CARD_W).attr("height", shelfH).attr("rx", SHELF_EDGE);
|
|
539
|
-
cardG.append("rect").attr("x", 0).attr("y", shelfTop).attr("width", CARD_W).attr("height", shelfH).attr("clip-path", `url(#${clipId})`).attr(
|
|
544
|
+
cardG.append("rect").attr("x", 0).attr("y", shelfTop).attr("width", CARD_W).attr("height", shelfH).attr("clip-path", `url(#${clipId})`).attr(
|
|
545
|
+
"fill",
|
|
546
|
+
parsed.options.solidFill ? p.color : mix(p.color, themeBaseBg(palette, isDark), SHELF_TINT)
|
|
547
|
+
);
|
|
540
548
|
const edgeY = titleNearTop ? shelfTop : shelfTop + shelfH - SHELF_EDGE;
|
|
541
549
|
cardG.append("rect").attr("x", 0).attr("y", edgeY).attr("width", CARD_W).attr("height", SHELF_EDGE).attr("clip-path", `url(#${clipId})`).attr("fill", p.color).attr("fill-opacity", p.future ? 0.4 : 1);
|
|
542
|
-
|
|
550
|
+
const shelfText = parsed.options.solidFill ? contrastText(p.color, palette.textOnFillLight, palette.textOnFillDark) : p.color;
|
|
551
|
+
cardG.append("text").attr("x", CARD_PAD).attr("y", headBandTop + HEADER_HEIGHT / 2 + LABEL_FONT_SIZE / 2 - 2).attr("fill", shelfText).attr("font-family", FONT_FAMILY).attr("font-size", LABEL_FONT_SIZE).attr("font-weight", 700).text(p.label);
|
|
543
552
|
if (dateStr) {
|
|
544
553
|
cardG.append("text").attr("x", CARD_PAD).attr(
|
|
545
554
|
"y",
|
|
546
555
|
(titleNearTop ? HEADER_HEIGHT : headBandTop - dateH) + DATE_SUBTITLE_FONT + 2
|
|
547
|
-
).attr(
|
|
556
|
+
).attr(
|
|
557
|
+
"fill",
|
|
558
|
+
parsed.options.solidFill ? mix(shelfText, p.color, 25) : mix(palette.text, palette.bg, 55)
|
|
559
|
+
).attr("font-family", FONT_FAMILY).attr("font-size", DATE_SUBTITLE_FONT).attr("font-weight", 600).text(dateStr);
|
|
548
560
|
}
|
|
549
561
|
if (p.lines.length > 0) {
|
|
550
562
|
const startBaseline = titleNearTop ? CARD_BODY_TOP + dateH + DESC_FONT : CARD_PAD + DESC_FONT;
|
|
@@ -975,4 +987,4 @@ export {
|
|
|
975
987
|
focusEventLine,
|
|
976
988
|
renderEventLineForExport
|
|
977
989
|
};
|
|
978
|
-
//# sourceMappingURL=chunk-
|
|
990
|
+
//# sourceMappingURL=chunk-PLZI6KPM.js.map
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
wrapDescriptionLines
|
|
6
6
|
} from "./chunk-BMR4CIEO.js";
|
|
7
|
-
import {
|
|
8
|
-
renderIntegratedLegend
|
|
9
|
-
} from "./chunk-PWIHZ6NJ.js";
|
|
10
7
|
import {
|
|
11
8
|
ScaleContext
|
|
12
9
|
} from "./chunk-YYVTBZZC.js";
|
|
10
|
+
import {
|
|
11
|
+
renderIntegratedLegend
|
|
12
|
+
} from "./chunk-QUJGFNFN.js";
|
|
13
13
|
import {
|
|
14
14
|
TITLE_FONT_SIZE,
|
|
15
15
|
TITLE_FONT_WEIGHT,
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
} from "./chunk-6KFWC4CO.js";
|
|
21
21
|
import {
|
|
22
22
|
LEGEND_HEIGHT
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HQCHYB5F.js";
|
|
24
24
|
import {
|
|
25
25
|
measureText,
|
|
26
26
|
wrapTextToWidth
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5LWQH6QV.js";
|
|
28
28
|
import {
|
|
29
29
|
contrastText,
|
|
30
30
|
shapeFill
|
|
@@ -964,4 +964,4 @@ export {
|
|
|
964
964
|
renderCycle,
|
|
965
965
|
renderCycleForExport
|
|
966
966
|
};
|
|
967
|
-
//# sourceMappingURL=chunk-
|
|
967
|
+
//# sourceMappingURL=chunk-PMN3Q7RJ.js.map
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
CHAR_WIDTH_RATIO,
|
|
20
20
|
measureText
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5LWQH6QV.js";
|
|
22
22
|
import {
|
|
23
23
|
contrastText,
|
|
24
24
|
getSeriesColors,
|
|
@@ -293,4 +293,4 @@ export {
|
|
|
293
293
|
renderRing,
|
|
294
294
|
renderRingForExport
|
|
295
295
|
};
|
|
296
|
-
//# sourceMappingURL=chunk-
|
|
296
|
+
//# sourceMappingURL=chunk-PZFVK3IH.js.map
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extractColor,
|
|
3
|
+
measureIndent,
|
|
4
|
+
parseFirstLine,
|
|
5
|
+
tryParseSharedOption
|
|
6
|
+
} from "./chunk-OTAL43EH.js";
|
|
7
|
+
import {
|
|
8
|
+
makeDgmoError,
|
|
9
|
+
makeFail
|
|
10
|
+
} from "./chunk-CXK4DZH3.js";
|
|
11
|
+
|
|
12
|
+
// src/goal/parser.ts
|
|
13
|
+
function parseGoalNumber(token) {
|
|
14
|
+
if (token.includes(",")) return null;
|
|
15
|
+
const n = parseFloat(token.replace(/_/g, ""));
|
|
16
|
+
return Number.isFinite(n) ? n : null;
|
|
17
|
+
}
|
|
18
|
+
function parseGoal(content, palette) {
|
|
19
|
+
const options = {
|
|
20
|
+
noPercent: false,
|
|
21
|
+
noValue: false,
|
|
22
|
+
solidFill: false,
|
|
23
|
+
noTitle: false,
|
|
24
|
+
noAutoColor: false,
|
|
25
|
+
noNote: false
|
|
26
|
+
};
|
|
27
|
+
const result = {
|
|
28
|
+
type: "goal",
|
|
29
|
+
title: null,
|
|
30
|
+
titleLineNumber: null,
|
|
31
|
+
description: null,
|
|
32
|
+
mode: "bar",
|
|
33
|
+
now: 0,
|
|
34
|
+
target: 0,
|
|
35
|
+
hasTarget: false,
|
|
36
|
+
options,
|
|
37
|
+
diagnostics: [],
|
|
38
|
+
error: null
|
|
39
|
+
};
|
|
40
|
+
const fail = makeFail(result);
|
|
41
|
+
const warn = (line, message) => {
|
|
42
|
+
result.diagnostics.push(makeDgmoError(line, message, "warning"));
|
|
43
|
+
};
|
|
44
|
+
const softError = (line, message) => {
|
|
45
|
+
result.diagnostics.push(makeDgmoError(line, message, "error"));
|
|
46
|
+
};
|
|
47
|
+
if (!content?.trim()) return fail(0, "No content provided");
|
|
48
|
+
const lines = content.split("\n");
|
|
49
|
+
let headerParsed = false;
|
|
50
|
+
let sawNow = false;
|
|
51
|
+
const sharedOpts = {};
|
|
52
|
+
for (let i = 0; i < lines.length; i++) {
|
|
53
|
+
const lineNum = i + 1;
|
|
54
|
+
const raw = lines[i];
|
|
55
|
+
const trimmed = raw.trim();
|
|
56
|
+
if (!trimmed || trimmed.startsWith("//")) continue;
|
|
57
|
+
if (!headerParsed) {
|
|
58
|
+
const first = parseFirstLine(trimmed);
|
|
59
|
+
if (first?.chartType !== "goal") {
|
|
60
|
+
return fail(lineNum, 'Expected "goal [Title]" as the first line.');
|
|
61
|
+
}
|
|
62
|
+
if (first.title) {
|
|
63
|
+
const { label, color } = extractColor(
|
|
64
|
+
first.title,
|
|
65
|
+
palette,
|
|
66
|
+
result.diagnostics,
|
|
67
|
+
lineNum
|
|
68
|
+
);
|
|
69
|
+
result.title = label || null;
|
|
70
|
+
if (color !== void 0) result.color = color;
|
|
71
|
+
}
|
|
72
|
+
result.titleLineNumber = lineNum;
|
|
73
|
+
headerParsed = true;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const noteHeader = trimmed.match(/^note(?:\s+(.+))?$/i);
|
|
77
|
+
if (noteHeader && measureIndent(raw) === 0) {
|
|
78
|
+
const body = [];
|
|
79
|
+
if (noteHeader[1]) body.push(noteHeader[1].trim());
|
|
80
|
+
while (i + 1 < lines.length && measureIndent(lines[i + 1]) > 0) {
|
|
81
|
+
body.push(lines[i + 1].trim());
|
|
82
|
+
i++;
|
|
83
|
+
}
|
|
84
|
+
result.description = body.length ? body.join("\n") : null;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (measureIndent(raw) > 0) {
|
|
88
|
+
warn(
|
|
89
|
+
lineNum,
|
|
90
|
+
`Indented content "${trimmed}" ignored \u2014 goal is a single value.`
|
|
91
|
+
);
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
const lower = trimmed.toLowerCase();
|
|
95
|
+
if (lower === "thermometer" || lower === "gauge") {
|
|
96
|
+
result.mode = lower;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if (lower === "no-percent") {
|
|
100
|
+
options.noPercent = true;
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
if (lower === "no-value") {
|
|
104
|
+
options.noValue = true;
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
if (lower === "no-auto-color") {
|
|
108
|
+
options.noAutoColor = true;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (lower === "no-note") {
|
|
112
|
+
options.noNote = true;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (tryParseSharedOption(trimmed, sharedOpts)) {
|
|
116
|
+
if (sharedOpts["solid-fill"] === "on") options.solidFill = true;
|
|
117
|
+
if (sharedOpts["no-title"] === "on") options.noTitle = true;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const kv = trimmed.match(/^(now|target)\s+(.+)$/i);
|
|
121
|
+
if (kv) {
|
|
122
|
+
const key = kv[1].toLowerCase();
|
|
123
|
+
const value = parseGoalNumber(kv[2].trim());
|
|
124
|
+
if (value === null) {
|
|
125
|
+
softError(lineNum, `"${key}" needs a number (got "${kv[2].trim()}").`);
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (key === "now") {
|
|
129
|
+
result.now = value;
|
|
130
|
+
sawNow = true;
|
|
131
|
+
} else {
|
|
132
|
+
if (value <= 0) {
|
|
133
|
+
softError(lineNum, '"target" must be greater than 0.');
|
|
134
|
+
} else {
|
|
135
|
+
result.target = value;
|
|
136
|
+
result.hasTarget = true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
warn(lineNum, `Unrecognized line "${trimmed}".`);
|
|
142
|
+
}
|
|
143
|
+
if (!sawNow) {
|
|
144
|
+
warn(result.titleLineNumber ?? 1, 'Missing "now" value \u2014 treating as 0.');
|
|
145
|
+
}
|
|
146
|
+
if (!result.hasTarget) {
|
|
147
|
+
softError(
|
|
148
|
+
result.titleLineNumber ?? 1,
|
|
149
|
+
'Missing or invalid "target" \u2014 a goal needs a target > 0.'
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
return result;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export {
|
|
156
|
+
parseGoal
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=chunk-Q4V4XQWV.js.map
|