@diagrammo/dgmo 0.50.2 → 0.51.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 +85 -23
- package/dist/advanced.js +207 -161
- package/dist/{analyzer-UYKBXAKR.js → analyzer-BJ54GIFB.js} +3 -3
- package/dist/auto.css +31 -8
- package/dist/auto.d.ts +6 -0
- package/dist/auto.js +169 -133
- package/dist/auto.mjs +2148 -1024
- package/dist/block.css +28 -8
- package/dist/block.js +97 -68
- package/dist/{charts-d3-MUW3LTML.js → charts-d3-7E4B4IMW.js} +9 -9
- package/dist/{chunk-6IAA2QQ2.js → chunk-2EQMXBBQ.js} +2 -2
- package/dist/{chunk-XJLKLU4D.js → chunk-2ILHQOL3.js} +3 -3
- package/dist/{chunk-SXRTRMEE.js → chunk-2UJSV2VT.js} +3 -3
- package/dist/{chunk-LE4MYMLI.js → chunk-32XPAAET.js} +5 -5
- package/dist/{chunk-NU3XLTGP.js → chunk-332ZR4QU.js} +4 -4
- package/dist/{chunk-F7BFXWNQ.js → chunk-3JLKYGBQ.js} +2 -2
- package/dist/{chunk-QROYX7TT.js → chunk-3LV2NCB6.js} +3 -3
- package/dist/{chunk-SVTI362O.js → chunk-3ODS2VGL.js} +97 -97
- package/dist/{chunk-3XGZF2QJ.js → chunk-3YSQZ75W.js} +6 -6
- package/dist/{chunk-FJUNPCYI.js → chunk-467TVMQL.js} +2 -2
- package/dist/{chunk-HHXOONLX.js → chunk-4B5YISOR.js} +38 -1
- package/dist/{chunk-6HJBFVLO.js → chunk-4QZ43D7I.js} +3 -3
- package/dist/{chunk-QJJZSROI.js → chunk-4VWJ4LW2.js} +7 -7
- package/dist/chunk-4XFBQT5O.js +35 -0
- package/dist/{chunk-2C56LEML.js → chunk-5F5ELR3V.js} +3 -3
- package/dist/{chunk-EAMEADTV.js → chunk-5PDTIBLV.js} +83 -21
- package/dist/{chunk-C2CVAM3U.js → chunk-5PZT4DQG.js} +160 -87
- package/dist/{chunk-IAEC4KLA.js → chunk-5QKQSSPO.js} +2 -2
- package/dist/{chunk-5OWVC2A6.js → chunk-5SVOCD5W.js} +6 -6
- package/dist/{chunk-VBYSIOOY.js → chunk-5WPNFSXP.js} +3 -3
- package/dist/{chunk-4MJ7M6YL.js → chunk-5X6YQA2J.js} +7 -7
- package/dist/{chunk-JJUOHGX2.js → chunk-65WJYYKJ.js} +4 -4
- package/dist/{chunk-3UIKSPFB.js → chunk-6BQFET7X.js} +3 -3
- package/dist/{chunk-U2HGPLZS.js → chunk-6H7O2OPM.js} +14 -1
- package/dist/{chunk-DZXYF2F5.js → chunk-6K2M4VSR.js} +3 -3
- package/dist/{chunk-PGEGPSCZ.js → chunk-6MNGECP2.js} +2 -2
- package/dist/{chunk-3XPUDB7B.js → chunk-6NFYEQDX.js} +266 -38
- package/dist/{chunk-4XK3FLFB.js → chunk-6NYWYNBI.js} +3 -3
- package/dist/{chunk-TWQUYVP3.js → chunk-7DF4J4RL.js} +4 -4
- package/dist/{chunk-H73FP42Q.js → chunk-7DYOELRK.js} +3 -3
- package/dist/{chunk-L3UHP6TD.js → chunk-7L4UJOY6.js} +1 -2
- package/dist/{chunk-QJP6PG7F.js → chunk-AB7INMR5.js} +9 -9
- package/dist/{chunk-3LKM6FMW.js → chunk-AE7II3E3.js} +2 -2
- package/dist/{chunk-BTUTZMPT.js → chunk-AFIEPDLX.js} +97 -42
- package/dist/chunk-APKUAJ2L.js +220 -0
- package/dist/{chunk-X6EZPSW6.js → chunk-AXW3M6OQ.js} +7 -7
- package/dist/{chunk-66RUL3XF.js → chunk-B63YB7X3.js} +5 -5
- package/dist/{chunk-DSWVNQVS.js → chunk-BGP54HVR.js} +4 -59
- package/dist/{chunk-3NODSS6A.js → chunk-BYJBIALT.js} +7 -7
- package/dist/{chunk-3YPY3OXD.js → chunk-CC4YRBWV.js} +2 -2
- package/dist/{chunk-HLJVEAOF.js → chunk-DY7XLRHK.js} +8 -33
- package/dist/{chunk-OMNGQPEZ.js → chunk-E7Y3SYKW.js} +3 -3
- package/dist/{chunk-HTMN2Z6U.js → chunk-EDA6C7MV.js} +50 -7
- package/dist/{chunk-7L3R6I3U.js → chunk-ENRS56GC.js} +3 -3
- package/dist/{chunk-2KGXHFYK.js → chunk-EXOQP75F.js} +7 -7
- package/dist/{chunk-BBGDM4NQ.js → chunk-F3FYUFUH.js} +26 -8
- package/dist/{chunk-GL5UZ6NY.js → chunk-FC5I2KXV.js} +3 -3
- package/dist/{chunk-VVW3F3MD.js → chunk-FTBZV6NE.js} +9 -9
- package/dist/{chunk-7QKLIMRZ.js → chunk-G3PF3S7P.js} +41 -46
- package/dist/{chunk-J6K7RP6P.js → chunk-GD6L76WD.js} +3 -3
- package/dist/{chunk-I2WKW7C7.js → chunk-GGHRAITI.js} +3 -3
- package/dist/{chunk-DN66GPY5.js → chunk-GNSFLJAA.js} +24 -3
- package/dist/{chunk-IUMPEA64.js → chunk-GROLTAWZ.js} +4 -4
- package/dist/{chunk-Q4V4XQWV.js → chunk-GTWKD3QT.js} +2 -2
- package/dist/{chunk-F2L5GCQ4.js → chunk-GU46PPT3.js} +3 -3
- package/dist/{chunk-6IUAK7RZ.js → chunk-H6PI3KJT.js} +2 -2
- package/dist/{chunk-SCQ5VPUF.js → chunk-HFMYN6N2.js} +2 -2
- package/dist/{chunk-GKC3HILQ.js → chunk-I2QZFCS2.js} +27 -4
- package/dist/{chunk-MCZ5LBZD.js → chunk-IE477RQZ.js} +7 -7
- package/dist/{chunk-3Y2DRD7S.js → chunk-IEDMFNU7.js} +3 -3
- package/dist/{chunk-M5RXSRO2.js → chunk-IEWG6J7C.js} +4 -4
- package/dist/{chunk-P7CE7LXL.js → chunk-IUJODQKX.js} +6 -6
- package/dist/{chunk-NWED7CYO.js → chunk-IUO34HKW.js} +6 -6
- package/dist/{chunk-NX4EQS3U.js → chunk-J76PIKAT.js} +2 -2
- package/dist/{chunk-O7WP4ZD4.js → chunk-JED6ZDEE.js} +2 -2
- package/dist/{chunk-6BFZKBGD.js → chunk-JJXGQIRV.js} +2 -2
- package/dist/{chunk-O7NUCTFU.js → chunk-JM4LEPY3.js} +2 -2
- package/dist/{chunk-VDOOQZUD.js → chunk-JSSX2SX4.js} +4 -4
- package/dist/{chunk-SQLNBA64.js → chunk-KFNWFNAA.js} +3 -3
- package/dist/{chunk-KQ57MHRO.js → chunk-KJGG2JKQ.js} +143 -82
- package/dist/{chunk-OTAL43EH.js → chunk-LV4BETUU.js} +8 -2
- package/dist/{chunk-VUJGMJE6.js → chunk-MVN25IF6.js} +4 -4
- package/dist/{chunk-CLD2OKV7.js → chunk-MX2EY5Y7.js} +2 -2
- package/dist/{chunk-T5SHNNGP.js → chunk-ND76YJCN.js} +59 -25
- package/dist/{chunk-KFZYNWWO.js → chunk-NEQ6GJXB.js} +4 -4
- package/dist/{chunk-PFHVU7UA.js → chunk-NI3XQBPB.js} +2 -2
- package/dist/{chunk-WW32K72E.js → chunk-OJTXTQA2.js} +9 -9
- package/dist/{chunk-YNRDWYZP.js → chunk-OQKP2X3D.js} +170 -51
- package/dist/{chunk-AHGF2YYA.js → chunk-OTOHI4JO.js} +2 -2
- package/dist/{chunk-HEVYAHLW.js → chunk-OU7HLO7I.js} +4 -4
- package/dist/{chunk-GBE54KY6.js → chunk-OZPBJM5Q.js} +3 -3
- package/dist/{chunk-EOFPYPAU.js → chunk-P3NRSSUU.js} +51 -11
- package/dist/{chunk-TSA237IM.js → chunk-PZDBOK2Q.js} +2 -2
- package/dist/{chunk-3P2DKJCG.js → chunk-Q62FEYK3.js} +2 -2
- package/dist/{chunk-DFTFPYUD.js → chunk-QHI5XVUJ.js} +7 -7
- package/dist/{chunk-HQCHYB5F.js → chunk-QOOUC2J5.js} +2 -2
- package/dist/{chunk-XEGTMVYY.js → chunk-QZPEGJOM.js} +2 -2
- package/dist/{chunk-TN35C5KM.js → chunk-RAHVMKBG.js} +2 -2
- package/dist/chunk-RBDIYLA5.js +267 -0
- package/dist/{chunk-OTQKUHRS.js → chunk-RBHWPDBB.js} +3 -3
- package/dist/{chunk-BH3UYK36.js → chunk-RLFVAKEO.js} +3 -3
- package/dist/{chunk-3LH5CLP4.js → chunk-RXKTSFDL.js} +150 -5
- package/dist/{chunk-RZ6YKEUJ.js → chunk-TK2VQQX2.js} +6 -6
- package/dist/{chunk-I7F2A35O.js → chunk-TMACGPW5.js} +25 -47
- package/dist/{chunk-5GJYGP5Z.js → chunk-TRM2J7ZN.js} +8 -8
- package/dist/{chunk-BCYVE3N5.js → chunk-TYS6CSS5.js} +2 -2
- package/dist/{chunk-5WFIYXQ6.js → chunk-U5SI5NIM.js} +91 -228
- package/dist/{chunk-KHEYDLMT.js → chunk-VB4UJ3H2.js} +2 -2
- package/dist/{chunk-HGN652MU.js → chunk-VL2O2F3W.js} +2 -2
- package/dist/{chunk-ONA5KPV3.js → chunk-VNSXLA6G.js} +4 -4
- package/dist/{chunk-CMCR5WBW.js → chunk-WBRZJOEC.js} +3 -3
- package/dist/{chunk-5LWQH6QV.js → chunk-WCT3NYCV.js} +1 -1
- package/dist/{chunk-T4VOVZT5.js → chunk-WJ7RW65H.js} +4 -4
- package/dist/{chunk-SCHXJTZL.js → chunk-WQLMU7VG.js} +2 -2
- package/dist/{chunk-C4GQDB5L.js → chunk-WRNFDFPU.js} +2 -2
- package/dist/{chunk-66NVRO4K.js → chunk-X7EC3L2H.js} +7 -7
- package/dist/{chunk-QXKWYZNR.js → chunk-XEQXCIBC.js} +3 -3
- package/dist/{chunk-C63UWAKM.js → chunk-Y2ZE3MSG.js} +2 -2
- package/dist/{chunk-FA6K3FWM.js → chunk-Y6GBQTBK.js} +6 -6
- package/dist/{chunk-7UEMZREK.js → chunk-YAA6IID3.js} +2 -2
- package/dist/{chunk-PZFVK3IH.js → chunk-YGJZWZTY.js} +2 -2
- package/dist/{chunk-7TV5Y53Y.js → chunk-ZJ3LS7DW.js} +3 -3
- package/dist/{chunk-PH5X4GIP.js → chunk-ZO27FGJS.js} +2 -2
- package/dist/cli.cjs +163 -147
- package/dist/clock.js +91 -5
- package/dist/countdown.js +208 -82
- package/dist/dgmo-router-Y2VEX46B.js +86 -0
- package/dist/dimensions-F7B5C4BJ.js +22 -0
- package/dist/editor.js +14 -1
- package/dist/element.d.ts +6 -0
- package/dist/element.js +170 -134
- package/dist/element.mjs +2112 -1009
- package/dist/{flowchart-parser-OE4WHLTF.js → flowchart-parser-MY53QWTZ.js} +4 -4
- package/dist/{flowchart-renderer-GPCSMTOR.js → flowchart-renderer-AQSMEMYF.js} +8 -8
- package/dist/highlight.js +14 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +55 -53
- package/dist/{layout-7SKMFYHL.js → layout-46N4JJYK.js} +5 -5
- package/dist/layout-4DIUOX2T.js +14 -0
- package/dist/{layout-7H4H46CS.js → layout-7QXCNOVS.js} +3 -3
- package/dist/{layout-NXG63LWH.js → layout-AM2JWW3X.js} +4 -4
- package/dist/{layout-7MZ5NF2N.js → layout-CBCLPMSG.js} +5 -5
- package/dist/{layout-DC4TVXER.js → layout-EE6GE46Y.js} +5 -5
- package/dist/{layout-FGQWRYYW.js → layout-F4WO357A.js} +3 -3
- package/dist/layout-G23F7LDH.js +9 -0
- package/dist/{layout-QNUQLEHU.js → layout-HYZPWAK5.js} +3 -3
- package/dist/{layout-FWODLIMP.js → layout-JDJAEQ3P.js} +6 -6
- package/dist/layout-MUPRALE5.js +14 -0
- package/dist/{layout-34CLNICW.js → layout-OAC4PEAC.js} +5 -5
- package/dist/{layout-5BG6DFCU.js → layout-YVTNOTN4.js} +6 -6
- package/dist/{layout-PUQCB6AN.js → layout-ZDOSXL5G.js} +7 -7
- package/dist/{layout-search-QS44PI5R.js → layout-search-55FU6HD3.js} +6 -157
- package/dist/map-data/gazetteer.json +1 -1
- package/dist/{parser-36HVKU5U.js → parser-2Q2T4C3B.js} +6 -5
- package/dist/{parser-B5FVS7O6.js → parser-3A42DZ72.js} +3 -3
- package/dist/{parser-CSFUN3CT.js → parser-4RFTKAQX.js} +5 -4
- package/dist/{parser-IJBMRXMC.js → parser-57ILIFZ2.js} +5 -5
- package/dist/{parser-DFFEDKHH.js → parser-5A2UWU6B.js} +3 -3
- package/dist/{parser-H3XEPFPV.js → parser-5PDYJGWA.js} +4 -4
- package/dist/{parser-O4HIUN6G.js → parser-6BJEXUFX.js} +4 -4
- package/dist/{parser-MTOMTWTD.js → parser-6ZKABF5S.js} +6 -5
- package/dist/{parser-WAV5JRPT.js → parser-AIMHGJRR.js} +4 -4
- package/dist/{parser-TXND652E.js → parser-AZJ25OKK.js} +4 -4
- package/dist/{parser-4AI5ZN5F.js → parser-B77S5SZM.js} +3 -3
- package/dist/{parser-IBWNAPY4.js → parser-BEPSWJAD.js} +3 -3
- package/dist/{parser-D5VILGN2.js → parser-BKI42XBQ.js} +4 -4
- package/dist/{parser-LWKKBNSA.js → parser-C3D7MVXY.js} +3 -3
- package/dist/{parser-HYRTF3DO.js → parser-CDG7CHV5.js} +3 -3
- package/dist/{parser-CVMEDULU.js → parser-CZOJ7XQ6.js} +4 -4
- package/dist/{parser-AXKBDGNO.js → parser-E2RL6JYF.js} +5 -5
- package/dist/{parser-PSA4UBSP.js → parser-EH5VE7ZN.js} +4 -4
- package/dist/{parser-K3XXLMUW.js → parser-FQ6GZFMR.js} +4 -4
- package/dist/{parser-RV4M6AS2.js → parser-GKLZKEIK.js} +4 -4
- package/dist/{parser-MPCE5JBG.js → parser-H6ABKHZZ.js} +4 -4
- package/dist/{parser-RZPVAQVX.js → parser-I6GGFKOQ.js} +4 -3
- package/dist/{parser-W4PQUGX3.js → parser-JA7JQ7NF.js} +4 -4
- package/dist/{parser-5OXGPNBF.js → parser-KKTJ6M3Y.js} +5 -5
- package/dist/parser-OK22AC6Y.js +14 -0
- package/dist/{parser-4NO6VZ6S.js → parser-OK2ILHRT.js} +4 -4
- package/dist/{parser-YS7TOS2K.js → parser-OUTPNJWC.js} +3 -3
- package/dist/{parser-KCR2WS3V.js → parser-PORDUX5E.js} +4 -4
- package/dist/{parser-VKOJM7KS.js → parser-SRVFR7PM.js} +4 -4
- package/dist/{parser-TGQZJ5OT.js → parser-UKFFZCFJ.js} +4 -4
- package/dist/{parser-JJR52VAT.js → parser-UMWPLORP.js} +5 -5
- package/dist/{parser-AGVYTQXV.js → parser-Z4TZV2CB.js} +4 -4
- package/dist/{renderer-A5VE5BCI.js → renderer-2AUFT3E2.js} +8 -8
- package/dist/{renderer-FPE3J5VZ.js → renderer-2HTNBIF2.js} +11 -11
- package/dist/{renderer-R2WNIC2C.js → renderer-3K3IB7D5.js} +8 -8
- package/dist/{renderer-2AZ5HJFK.js → renderer-3YNIWF5I.js} +4 -4
- package/dist/{renderer-P5ROYQGU.js → renderer-3YPZHMOU.js} +3 -3
- package/dist/{renderer-JCCHNECZ.js → renderer-4WR6WMVF.js} +9 -9
- package/dist/{renderer-HDCCZURL.js → renderer-66MERVQ2.js} +9 -9
- package/dist/{renderer-2QPMJ2DA.js → renderer-6RKQPNJI.js} +9 -9
- package/dist/{renderer-FYSVXL7M.js → renderer-ARMJBP6C.js} +11 -11
- package/dist/{renderer-6OKF44KS.js → renderer-CO2DW7S7.js} +13 -13
- package/dist/{renderer-BSR2O2H6.js → renderer-EDJ2O4S5.js} +13 -12
- package/dist/{renderer-CYB4LK3G.js → renderer-F7U3MFCV.js} +9 -9
- package/dist/{renderer-5KVCNMOJ.js → renderer-GD2COXVL.js} +4 -2
- package/dist/{renderer-B5TBNZJE.js → renderer-GQIESYEM.js} +8 -8
- package/dist/{renderer-ODUUOPVT.js → renderer-HCKJDFXD.js} +13 -13
- package/dist/{renderer-QAOBLRXV.js → renderer-HYGHO4SJ.js} +10 -10
- package/dist/{renderer-5DSEWF74.js → renderer-JC3RDUT7.js} +8 -8
- package/dist/{renderer-7RH2SI3B.js → renderer-KQB7UGDS.js} +3 -3
- package/dist/{renderer-45PSOL3E.js → renderer-NKJ24TEA.js} +5 -5
- package/dist/{renderer-AUW2BE6G.js → renderer-OYO67VZK.js} +9 -9
- package/dist/{renderer-DAXMXIKD.js → renderer-QIWVHWZO.js} +3 -3
- package/dist/{renderer-PSMMZCKH.js → renderer-QRWACQRI.js} +8 -8
- package/dist/{renderer-4ITCHBT7.js → renderer-QXGN5H3A.js} +5 -5
- package/dist/renderer-QXPP4TA2.js +27 -0
- package/dist/{renderer-KS7YZJE2.js → renderer-RGIYOTKJ.js} +10 -10
- package/dist/{renderer-FF24KZCI.js → renderer-RHT4MHFU.js} +8 -8
- package/dist/{renderer-PPIHO5FI.js → renderer-RYR3TJ46.js} +12 -11
- package/dist/{renderer-NGXZTRK6.js → renderer-SRKDNDFB.js} +8 -8
- package/dist/{renderer-SBS3YWU5.js → renderer-TGTUABCI.js} +8 -8
- package/dist/{renderer-7SD6MSBS.js → renderer-TXJFKPOG.js} +11 -11
- package/dist/{renderer-HVCU2C3Z.js → renderer-UV6MI64M.js} +3 -3
- package/dist/renderer-radial-FWABAZHB.js +21 -0
- package/dist/{resolver-FHBCO3PL.js → resolver-EMTGNR3D.js} +4 -3
- package/dist/{state-parser-3REXRK3R.js → state-parser-6T6CNMPX.js} +4 -4
- package/dist/{state-renderer-XYLNRWXR.js → state-renderer-AWZ3ECAX.js} +8 -8
- package/dist/{themes-PdPR1-hC.d.ts → themes-32xj5ZTW.d.ts} +27 -0
- package/docs/language-reference.md +93 -10
- package/gallery/fixtures/clock.dgmo +3 -3
- package/gallery/fixtures/countdown-tz.dgmo +5 -0
- package/package.json +1 -1
- package/dist/dgmo-router-CE2G67FV.js +0 -84
- package/dist/dimensions-OTBKC5M6.js +0 -22
- package/dist/layout-6RDJHS6E.js +0 -9
- package/dist/layout-J36454XU.js +0 -14
- package/dist/layout-LD6XTLD6.js +0 -14
- package/dist/parser-4WQQQXCG.js +0 -13
- package/dist/renderer-UYMQQCJK.js +0 -24
- package/dist/renderer-radial-F7X5F2VU.js +0 -21
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
monthIndex,
|
|
3
3
|
resolveNext,
|
|
4
|
+
targetToMs,
|
|
4
5
|
weekdayIndex
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OQKP2X3D.js";
|
|
7
|
+
import {
|
|
8
|
+
normalizeDate
|
|
9
|
+
} from "./chunk-RBDIYLA5.js";
|
|
6
10
|
import {
|
|
7
11
|
extractColor,
|
|
8
12
|
measureIndent,
|
|
9
13
|
parseFirstLine
|
|
10
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LV4BETUU.js";
|
|
11
15
|
import {
|
|
12
16
|
makeDgmoError,
|
|
13
17
|
makeFail
|
|
14
18
|
} from "./chunk-CXK4DZH3.js";
|
|
15
19
|
|
|
16
20
|
// src/countdown/parser.ts
|
|
17
|
-
var DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
18
21
|
var TIME_24H_RE = /^(\d{1,2}):(\d{2})$/;
|
|
19
22
|
var AMPM_RE = /^(\d{1,2})(?::(\d{2}))?\s*([ap]m)$/i;
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
function targetToMs2(target, tz = null) {
|
|
24
|
+
const ms = targetToMs(target, tz);
|
|
25
|
+
return Number.isFinite(ms) ? ms : null;
|
|
26
|
+
}
|
|
27
|
+
function isValidZone(zone) {
|
|
28
|
+
try {
|
|
29
|
+
new Intl.DateTimeFormat("en-US", { timeZone: zone });
|
|
30
|
+
return true;
|
|
31
|
+
} catch {
|
|
32
|
+
return false;
|
|
25
33
|
}
|
|
26
|
-
const t = new Date(s).getTime();
|
|
27
|
-
return Number.isFinite(t) ? t : null;
|
|
28
34
|
}
|
|
29
35
|
function ordinalToken(tok) {
|
|
30
36
|
const t = tok.toLowerCase();
|
|
@@ -71,6 +77,7 @@ function parseCountdown(content, palette) {
|
|
|
71
77
|
rule: null,
|
|
72
78
|
resolvedMs: null,
|
|
73
79
|
hasTime: false,
|
|
80
|
+
tz: null,
|
|
74
81
|
since: null,
|
|
75
82
|
sinceLabel: null,
|
|
76
83
|
units: "human",
|
|
@@ -99,12 +106,19 @@ function parseCountdown(content, palette) {
|
|
|
99
106
|
let intervalUnit = "day";
|
|
100
107
|
let onSpec = null;
|
|
101
108
|
let atTime = null;
|
|
109
|
+
let targetRaw = null;
|
|
110
|
+
let targetIsNow = false;
|
|
111
|
+
let targetLine = 1;
|
|
112
|
+
let fromRaw = null;
|
|
113
|
+
let fromLine = 1;
|
|
102
114
|
let anchorMs = null;
|
|
103
115
|
let targetMs = null;
|
|
104
116
|
let hasTargetLine = false;
|
|
105
117
|
let hasEvery = false;
|
|
106
118
|
const noteBody = [];
|
|
107
119
|
let inNote = false;
|
|
120
|
+
let dateOrder = "mdy";
|
|
121
|
+
let baseYear = null;
|
|
108
122
|
for (let i = 0; i < lines.length; i++) {
|
|
109
123
|
const lineNum = i + 1;
|
|
110
124
|
const raw = lines[i];
|
|
@@ -146,22 +160,14 @@ function parseCountdown(content, palette) {
|
|
|
146
160
|
// ── One-shot target ──
|
|
147
161
|
case "target": {
|
|
148
162
|
hasTargetLine = true;
|
|
163
|
+
targetLine = lineNum;
|
|
149
164
|
if (/^now$/i.test(rest)) {
|
|
150
|
-
|
|
151
|
-
result.target = new Date(targetMs).toISOString();
|
|
165
|
+
targetIsNow = true;
|
|
152
166
|
result.hasTime = true;
|
|
153
167
|
} else {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
lineNum,
|
|
158
|
-
`"target" needs an ISO date/datetime or "now" (got "${rest}").`
|
|
159
|
-
);
|
|
160
|
-
} else {
|
|
161
|
-
result.target = rest;
|
|
162
|
-
targetMs = ms;
|
|
163
|
-
if (rest.includes("T")) result.hasTime = true;
|
|
164
|
-
}
|
|
168
|
+
targetRaw = rest;
|
|
169
|
+
result.target = rest;
|
|
170
|
+
if (rest.includes("T")) result.hasTime = true;
|
|
165
171
|
}
|
|
166
172
|
break;
|
|
167
173
|
}
|
|
@@ -217,15 +223,8 @@ function parseCountdown(content, palette) {
|
|
|
217
223
|
if (seg.at.length)
|
|
218
224
|
atTime = parseAt(seg.at.join(" "), lineNum, softError);
|
|
219
225
|
if (seg.from.length) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
softError(
|
|
223
|
-
lineNum,
|
|
224
|
-
`"from" needs an anchor date (got "${seg.from.join(" ")}").`
|
|
225
|
-
);
|
|
226
|
-
} else {
|
|
227
|
-
anchorMs = ms;
|
|
228
|
-
}
|
|
226
|
+
fromRaw = seg.from.join(" ");
|
|
227
|
+
fromLine = lineNum;
|
|
229
228
|
}
|
|
230
229
|
break;
|
|
231
230
|
}
|
|
@@ -240,12 +239,22 @@ function parseCountdown(content, palette) {
|
|
|
240
239
|
break;
|
|
241
240
|
}
|
|
242
241
|
case "from": {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
fromRaw = rest;
|
|
243
|
+
fromLine = lineNum;
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
// ── Universal date directives (§ BL-121) ──
|
|
247
|
+
case "date-order": {
|
|
248
|
+
const v = rest.toLowerCase();
|
|
249
|
+
if (v === "mdy" || v === "dmy") dateOrder = v;
|
|
250
|
+
else
|
|
251
|
+
softError(lineNum, `"date-order" is "mdy" or "dmy" (got "${rest}").`);
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
case "year": {
|
|
255
|
+
const y = parseInt(rest, 10);
|
|
256
|
+
if (Number.isInteger(y) && y > 0) baseYear = y;
|
|
257
|
+
else softError(lineNum, `"year" needs a 4-digit year (got "${rest}").`);
|
|
249
258
|
break;
|
|
250
259
|
}
|
|
251
260
|
// ── Ordinal / since — numbers a yearly occurrence (resolvedYear − since) ──
|
|
@@ -291,6 +300,22 @@ function parseCountdown(content, palette) {
|
|
|
291
300
|
case "lang":
|
|
292
301
|
result.lang = rest.toLowerCase() || "en";
|
|
293
302
|
break;
|
|
303
|
+
// ── `tz <IANA>` — pin authored wall-clock times to a zone (§36 tz slot).
|
|
304
|
+
// Space-separated (no colon), an IANA id like `America/New_York`. ──
|
|
305
|
+
case "tz": {
|
|
306
|
+
const zone = rest.trim();
|
|
307
|
+
if (!zone) {
|
|
308
|
+
warn(lineNum, '"tz" needs an IANA zone like America/New_York.');
|
|
309
|
+
} else if (!isValidZone(zone)) {
|
|
310
|
+
warn(
|
|
311
|
+
lineNum,
|
|
312
|
+
`Unknown time zone "${zone}" \u2014 use an IANA id like America/New_York. Counting viewer-local.`
|
|
313
|
+
);
|
|
314
|
+
} else {
|
|
315
|
+
result.tz = zone;
|
|
316
|
+
}
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
294
319
|
case "on-day":
|
|
295
320
|
result.onDay = rest || null;
|
|
296
321
|
break;
|
|
@@ -311,6 +336,35 @@ function parseCountdown(content, palette) {
|
|
|
311
336
|
}
|
|
312
337
|
}
|
|
313
338
|
if (noteBody.length) result.note = noteBody.join("\n");
|
|
339
|
+
if (targetIsNow) {
|
|
340
|
+
targetMs = Date.now();
|
|
341
|
+
result.target = new Date(targetMs).toISOString();
|
|
342
|
+
} else if (targetRaw !== null) {
|
|
343
|
+
const iso = normalizeDate(targetRaw, { order: dateOrder, year: baseYear });
|
|
344
|
+
const effective = iso ?? targetRaw;
|
|
345
|
+
const ms = targetToMs2(effective, result.tz);
|
|
346
|
+
if (ms === null) {
|
|
347
|
+
softError(
|
|
348
|
+
targetLine,
|
|
349
|
+
`"target" needs a date/datetime or "now" (got "${targetRaw}").`
|
|
350
|
+
);
|
|
351
|
+
} else {
|
|
352
|
+
targetMs = ms;
|
|
353
|
+
if (iso) {
|
|
354
|
+
result.target = iso;
|
|
355
|
+
if (iso.includes(":")) result.hasTime = true;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (fromRaw !== null) {
|
|
360
|
+
const iso = normalizeDate(fromRaw, { order: dateOrder, year: baseYear });
|
|
361
|
+
const ms = targetToMs2(iso ?? fromRaw, result.tz);
|
|
362
|
+
if (ms === null) {
|
|
363
|
+
softError(fromLine, `"from" needs an anchor date (got "${fromRaw}").`);
|
|
364
|
+
} else {
|
|
365
|
+
anchorMs = ms;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
314
368
|
if (hasEvery && hasTargetLine) {
|
|
315
369
|
softError(
|
|
316
370
|
result.titleLineNumber ?? 1,
|
|
@@ -333,8 +387,9 @@ function parseCountdown(content, palette) {
|
|
|
333
387
|
softError
|
|
334
388
|
);
|
|
335
389
|
if (rule) {
|
|
336
|
-
result.rule
|
|
337
|
-
result.
|
|
390
|
+
const tzRule = result.tz ? { ...rule, tz: result.tz } : rule;
|
|
391
|
+
result.rule = tzRule;
|
|
392
|
+
result.resolvedMs = resolveNext(tzRule, Date.now());
|
|
338
393
|
if (atTime) result.hasTime = true;
|
|
339
394
|
}
|
|
340
395
|
} else if (targetMs !== null) {
|
|
@@ -476,7 +531,7 @@ function emitFreeProseError(lineNum, rest, softError) {
|
|
|
476
531
|
}
|
|
477
532
|
|
|
478
533
|
export {
|
|
479
|
-
targetToMs,
|
|
534
|
+
targetToMs2 as targetToMs,
|
|
480
535
|
parseCountdown
|
|
481
536
|
};
|
|
482
|
-
//# sourceMappingURL=chunk-
|
|
537
|
+
//# sourceMappingURL=chunk-AFIEPDLX.js.map
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
// src/clock/resolve.ts
|
|
2
|
+
var CLOCK_RAMP = [
|
|
3
|
+
[0, "#3d478f"],
|
|
4
|
+
[4, "#4a4d8c"],
|
|
5
|
+
[6, "#c98a6b"],
|
|
6
|
+
[8, "#d9a441"],
|
|
7
|
+
[11, "#e0b23c"],
|
|
8
|
+
[13, "#4f96c4"],
|
|
9
|
+
[16, "#cc7a33"],
|
|
10
|
+
[19, "#8a5aa0"],
|
|
11
|
+
[24, "#3d478f"]
|
|
12
|
+
];
|
|
13
|
+
function hexLerp(a, b, t) {
|
|
14
|
+
const pa = [1, 3, 5].map((i) => parseInt(a.slice(i, i + 2), 16));
|
|
15
|
+
const pb = [1, 3, 5].map((i) => parseInt(b.slice(i, i + 2), 16));
|
|
16
|
+
const c = pa.map(
|
|
17
|
+
(v, i) => Math.round(v + (pb[i] - v) * t).toString(16).padStart(2, "0")
|
|
18
|
+
);
|
|
19
|
+
return `#${c.join("")}`;
|
|
20
|
+
}
|
|
21
|
+
function rampColor(h) {
|
|
22
|
+
const hh = (h % 24 + 24) % 24;
|
|
23
|
+
for (let i = 0; i < CLOCK_RAMP.length - 1; i++) {
|
|
24
|
+
const [h0, c0] = CLOCK_RAMP[i];
|
|
25
|
+
const [h1, c1] = CLOCK_RAMP[i + 1];
|
|
26
|
+
if (hh >= h0 && hh <= h1) return hexLerp(c0, c1, (hh - h0) / (h1 - h0));
|
|
27
|
+
}
|
|
28
|
+
return CLOCK_RAMP[0][1];
|
|
29
|
+
}
|
|
30
|
+
var SOON_MIN = 60;
|
|
31
|
+
var RAD = Math.PI / 180;
|
|
32
|
+
var DAY_MS = 864e5;
|
|
33
|
+
var J1970 = 2440588;
|
|
34
|
+
var J2000 = 2451545;
|
|
35
|
+
function zoneParts(zone, nowMs) {
|
|
36
|
+
const d = new Date(nowMs);
|
|
37
|
+
try {
|
|
38
|
+
const o = {};
|
|
39
|
+
new Intl.DateTimeFormat("en-US", {
|
|
40
|
+
timeZone: zone,
|
|
41
|
+
hour12: false,
|
|
42
|
+
hour: "2-digit",
|
|
43
|
+
minute: "2-digit",
|
|
44
|
+
second: "2-digit",
|
|
45
|
+
weekday: "short"
|
|
46
|
+
}).formatToParts(d).forEach((x) => {
|
|
47
|
+
o[x.type] = x.value;
|
|
48
|
+
});
|
|
49
|
+
const off = new Intl.DateTimeFormat("en-US", {
|
|
50
|
+
timeZone: zone,
|
|
51
|
+
timeZoneName: "shortOffset"
|
|
52
|
+
}).formatToParts(d).find((x) => x.type === "timeZoneName");
|
|
53
|
+
return {
|
|
54
|
+
h: parseInt(o["hour"], 10) % 24,
|
|
55
|
+
m: parseInt(o["minute"], 10),
|
|
56
|
+
s: parseInt(o["second"], 10),
|
|
57
|
+
weekday: o["weekday"],
|
|
58
|
+
offsetLabel: off ? off.value.replace("GMT", "UTC") : ""
|
|
59
|
+
};
|
|
60
|
+
} catch {
|
|
61
|
+
return {
|
|
62
|
+
h: d.getUTCHours(),
|
|
63
|
+
m: d.getUTCMinutes(),
|
|
64
|
+
s: d.getUTCSeconds(),
|
|
65
|
+
weekday: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][d.getUTCDay()],
|
|
66
|
+
offsetLabel: "UTC"
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function pad2(n) {
|
|
71
|
+
return n < 10 ? "0" + n : String(n);
|
|
72
|
+
}
|
|
73
|
+
function isValidZone(zone) {
|
|
74
|
+
try {
|
|
75
|
+
new Intl.DateTimeFormat("en-US", { timeZone: zone });
|
|
76
|
+
return true;
|
|
77
|
+
} catch {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
var WEEKDAY_SHORT = [
|
|
82
|
+
"Sun",
|
|
83
|
+
"Mon",
|
|
84
|
+
"Tue",
|
|
85
|
+
"Wed",
|
|
86
|
+
"Thu",
|
|
87
|
+
"Fri",
|
|
88
|
+
"Sat"
|
|
89
|
+
];
|
|
90
|
+
function parseFixedOffset(token) {
|
|
91
|
+
const m = token.trim().match(/^(?:UTC|GMT)\s*([+-])?\s*(\d{1,2})?(?::?(\d{2}))?$/i);
|
|
92
|
+
if (!m) return null;
|
|
93
|
+
if (!m[1] && !m[2] && !m[3]) return 0;
|
|
94
|
+
if (!m[1] || !m[2]) return null;
|
|
95
|
+
const sign = m[1] === "-" ? -1 : 1;
|
|
96
|
+
const h = Number(m[2]);
|
|
97
|
+
const mm = m[3] ? Number(m[3]) : 0;
|
|
98
|
+
if (h > 14 || mm > 59) return null;
|
|
99
|
+
const total = sign * (h * 60 + mm);
|
|
100
|
+
if (total < -12 * 60 || total > 14 * 60) return null;
|
|
101
|
+
return total;
|
|
102
|
+
}
|
|
103
|
+
function formatOffsetLabel(offsetMin) {
|
|
104
|
+
if (offsetMin === 0) return "UTC";
|
|
105
|
+
const sign = offsetMin < 0 ? "-" : "+";
|
|
106
|
+
const abs = Math.abs(offsetMin);
|
|
107
|
+
const h = Math.floor(abs / 60);
|
|
108
|
+
const mm = abs % 60;
|
|
109
|
+
return `UTC${sign}${h}${mm ? ":" + pad2(mm) : ""}`;
|
|
110
|
+
}
|
|
111
|
+
function fixedParts(offsetMin, nowMs) {
|
|
112
|
+
const d = new Date(nowMs + offsetMin * 6e4);
|
|
113
|
+
return {
|
|
114
|
+
h: d.getUTCHours(),
|
|
115
|
+
m: d.getUTCMinutes(),
|
|
116
|
+
s: d.getUTCSeconds(),
|
|
117
|
+
weekday: WEEKDAY_SHORT[d.getUTCDay()],
|
|
118
|
+
offsetLabel: formatOffsetLabel(offsetMin)
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function formatTime(h, m, s, hours12) {
|
|
122
|
+
const sec = pad2(s);
|
|
123
|
+
if (hours12) {
|
|
124
|
+
const ap = h < 12 ? "am" : "pm";
|
|
125
|
+
let hr = h % 12;
|
|
126
|
+
if (hr === 0) hr = 12;
|
|
127
|
+
return { main: `${hr}:${pad2(m)}`, sec, ap };
|
|
128
|
+
}
|
|
129
|
+
return { main: `${pad2(h)}:${pad2(m)}`, sec, ap: "" };
|
|
130
|
+
}
|
|
131
|
+
function fmtDelta(ms) {
|
|
132
|
+
const m = Math.max(0, Math.round(ms / 6e4));
|
|
133
|
+
if (m < 90) return `${m}m`;
|
|
134
|
+
return `${Math.floor(m / 60)}h ${m % 60}m`;
|
|
135
|
+
}
|
|
136
|
+
function workStatus(parts, work) {
|
|
137
|
+
if (!work) return null;
|
|
138
|
+
const min = parts.h * 60 + parts.m;
|
|
139
|
+
if (!work.days[parts.weekday]) return { cls: "off", text: "Weekend" };
|
|
140
|
+
if (min < work.startMin) {
|
|
141
|
+
const d = work.startMin - min;
|
|
142
|
+
return {
|
|
143
|
+
cls: d <= SOON_MIN ? "soon" : "off",
|
|
144
|
+
text: `starts in ${fmtDelta(d * 6e4)}`
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
if (min < work.endMin) {
|
|
148
|
+
return { cls: "ok", text: `${fmtDelta((work.endMin - min) * 6e4)} left` };
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
cls: "off",
|
|
152
|
+
text: `ended ${fmtDelta((min - work.endMin) * 6e4)} ago`
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function toJulian(ms) {
|
|
156
|
+
return ms / DAY_MS - 0.5 + J1970;
|
|
157
|
+
}
|
|
158
|
+
function fromJulian(j) {
|
|
159
|
+
return (j + 0.5 - J1970) * DAY_MS;
|
|
160
|
+
}
|
|
161
|
+
function sunTimes(nowMs, lat, lon) {
|
|
162
|
+
const lw = -lon * RAD;
|
|
163
|
+
const phi = lat * RAD;
|
|
164
|
+
const J = toJulian(nowMs);
|
|
165
|
+
const n = Math.round(J - J2000 - 9e-4 - lw / (2 * Math.PI));
|
|
166
|
+
const Jn = J2000 + 9e-4 + lw / (2 * Math.PI) + n;
|
|
167
|
+
const M = (357.5291 + 0.98560028 * (Jn - J2000)) * RAD;
|
|
168
|
+
const C = (1.9148 * Math.sin(M) + 0.02 * Math.sin(2 * M) + 3e-4 * Math.sin(3 * M)) * RAD;
|
|
169
|
+
const L = M + C + Math.PI + 102.9372 * RAD;
|
|
170
|
+
const Jt = Jn + 53e-4 * Math.sin(M) - 69e-4 * Math.sin(2 * L);
|
|
171
|
+
const dec = Math.asin(Math.sin(L) * Math.sin(23.44 * RAD));
|
|
172
|
+
const cw = (Math.sin(-0.833 * RAD) - Math.sin(phi) * Math.sin(dec)) / (Math.cos(phi) * Math.cos(dec));
|
|
173
|
+
if (cw > 1) return { polar: "night" };
|
|
174
|
+
if (cw < -1) return { polar: "day" };
|
|
175
|
+
const w = Math.acos(cw);
|
|
176
|
+
const Jset = J2000 + 9e-4 + (w + lw) / (2 * Math.PI) + n + 53e-4 * Math.sin(M) - 69e-4 * Math.sin(2 * L);
|
|
177
|
+
return {
|
|
178
|
+
sunriseMs: fromJulian(Jt - (Jset - Jt)),
|
|
179
|
+
sunsetMs: fromJulian(Jset)
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function sunLine(nowMs, lat, lon) {
|
|
183
|
+
const t = sunTimes(nowMs, lat, lon);
|
|
184
|
+
if (t.polar) {
|
|
185
|
+
return {
|
|
186
|
+
up: t.polar === "day",
|
|
187
|
+
text: t.polar === "day" ? "midnight sun" : "polar night"
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (nowMs < t.sunriseMs) {
|
|
191
|
+
return { up: false, text: `sunrise in ${fmtDelta(t.sunriseMs - nowMs)}` };
|
|
192
|
+
}
|
|
193
|
+
if (nowMs < t.sunsetMs) {
|
|
194
|
+
return { up: true, text: `sunset in ${fmtDelta(t.sunsetMs - nowMs)}` };
|
|
195
|
+
}
|
|
196
|
+
const tm = sunTimes(nowMs + DAY_MS, lat, lon);
|
|
197
|
+
if (tm.polar) return { up: false, text: "sunrise in \u2014" };
|
|
198
|
+
return { up: false, text: `sunrise in ${fmtDelta(tm.sunriseMs - nowMs)}` };
|
|
199
|
+
}
|
|
200
|
+
function handAngles(h, m, s) {
|
|
201
|
+
return {
|
|
202
|
+
hour: (h % 12 + m / 60) * 30,
|
|
203
|
+
minute: (m + s / 60) * 6,
|
|
204
|
+
second: s * 6
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export {
|
|
209
|
+
rampColor,
|
|
210
|
+
zoneParts,
|
|
211
|
+
isValidZone,
|
|
212
|
+
parseFixedOffset,
|
|
213
|
+
formatOffsetLabel,
|
|
214
|
+
fixedParts,
|
|
215
|
+
formatTime,
|
|
216
|
+
workStatus,
|
|
217
|
+
sunLine,
|
|
218
|
+
handAngles
|
|
219
|
+
};
|
|
220
|
+
//# sourceMappingURL=chunk-APKUAJ2L.js.map
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-YYVTBZZC.js";
|
|
10
10
|
import {
|
|
11
11
|
renderIntegratedLegend
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OU7HLO7I.js";
|
|
13
13
|
import {
|
|
14
14
|
getMaxLegendReservedHeight
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YAA6IID3.js";
|
|
16
16
|
import {
|
|
17
17
|
TITLE_FONT_SIZE,
|
|
18
18
|
TITLE_FONT_WEIGHT
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
LEGEND_HEIGHT,
|
|
25
25
|
measureLegendText
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QOOUC2J5.js";
|
|
27
27
|
import {
|
|
28
28
|
measureText
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WCT3NYCV.js";
|
|
30
30
|
import {
|
|
31
31
|
parseKanban
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-IEDMFNU7.js";
|
|
33
33
|
import {
|
|
34
34
|
contrastText,
|
|
35
35
|
mix,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "./chunk-P6T66CCZ.js";
|
|
38
38
|
import {
|
|
39
39
|
tagAttrKey
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-467TVMQL.js";
|
|
41
41
|
|
|
42
42
|
// src/kanban/renderer.ts
|
|
43
43
|
import * as d3Selection from "d3-selection";
|
|
@@ -882,4 +882,4 @@ export {
|
|
|
882
882
|
renderKanban,
|
|
883
883
|
renderKanbanForExport
|
|
884
884
|
};
|
|
885
|
-
//# sourceMappingURL=chunk-
|
|
885
|
+
//# sourceMappingURL=chunk-AXW3M6OQ.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-YYVTBZZC.js";
|
|
8
8
|
import {
|
|
9
9
|
renderIntegratedLegend
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OU7HLO7I.js";
|
|
11
11
|
import {
|
|
12
12
|
createTooltip,
|
|
13
13
|
hideTooltip,
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
LEGEND_PILL_PAD,
|
|
29
29
|
measureLegendText,
|
|
30
30
|
truncateLegendText
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QOOUC2J5.js";
|
|
32
32
|
import {
|
|
33
33
|
parseTimelineDate
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-TMACGPW5.js";
|
|
35
35
|
import {
|
|
36
36
|
getSeriesColors,
|
|
37
37
|
mix,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
resolveTagColor,
|
|
43
43
|
tagAttrKey
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-467TVMQL.js";
|
|
45
45
|
|
|
46
46
|
// src/timeline/renderer.ts
|
|
47
47
|
import * as d3Scale from "d3-scale";
|
|
@@ -1607,4 +1607,4 @@ export {
|
|
|
1607
1607
|
formatDateLabel,
|
|
1608
1608
|
renderTimeline
|
|
1609
1609
|
};
|
|
1610
|
-
//# sourceMappingURL=chunk-
|
|
1610
|
+
//# sourceMappingURL=chunk-B63YB7X3.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
tagAttrKey,
|
|
8
8
|
validateTagGroupNames,
|
|
9
9
|
validateTagValues
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-467TVMQL.js";
|
|
11
11
|
import {
|
|
12
12
|
tryCollectNote
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WQLMU7VG.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveNotes
|
|
16
16
|
} from "./chunk-FMDSF3OV.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
tryParseSharedOption,
|
|
31
31
|
warnUnknownMetaKeys,
|
|
32
32
|
withTagAliases
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LV4BETUU.js";
|
|
34
34
|
import {
|
|
35
35
|
makeDgmoError,
|
|
36
36
|
suggest
|
|
@@ -82,7 +82,6 @@ function parseBoxesAndLines(content, palette) {
|
|
|
82
82
|
const nodes = [];
|
|
83
83
|
const edges = [];
|
|
84
84
|
const groups = [];
|
|
85
|
-
const nodePositions = /* @__PURE__ */ new Map();
|
|
86
85
|
const result = {
|
|
87
86
|
type: "boxes-and-lines",
|
|
88
87
|
title: null,
|
|
@@ -116,8 +115,6 @@ function parseBoxesAndLines(content, palette) {
|
|
|
116
115
|
}
|
|
117
116
|
const groupStack = [];
|
|
118
117
|
let contentStarted = false;
|
|
119
|
-
let inLayoutBlock = false;
|
|
120
|
-
const LAYOUT_ENTRY_RE = /^(.+?):\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*$/;
|
|
121
118
|
let currentTagGroup = null;
|
|
122
119
|
const metaAliasMap = /* @__PURE__ */ new Map();
|
|
123
120
|
const nameAliasMap = /* @__PURE__ */ new Map();
|
|
@@ -318,42 +315,6 @@ function parseBoxesAndLines(content, palette) {
|
|
|
318
315
|
if (currentTagGroup && indent === 0) {
|
|
319
316
|
currentTagGroup = null;
|
|
320
317
|
}
|
|
321
|
-
if (!inLayoutBlock && indent === 0 && trimmed === "layout") {
|
|
322
|
-
let isBlock = false;
|
|
323
|
-
for (let j = i + 1; j < lines.length; j++) {
|
|
324
|
-
const peek = lines[j];
|
|
325
|
-
if (!peek.trim()) continue;
|
|
326
|
-
isBlock = measureIndent(peek) > 0 && LAYOUT_ENTRY_RE.test(peek.trim());
|
|
327
|
-
break;
|
|
328
|
-
}
|
|
329
|
-
if (isBlock) {
|
|
330
|
-
flushDescription();
|
|
331
|
-
closeGroupsToIndent(0);
|
|
332
|
-
inLayoutBlock = true;
|
|
333
|
-
continue;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
if (inLayoutBlock) {
|
|
337
|
-
if (indent > 0) {
|
|
338
|
-
const lm = trimmed.match(LAYOUT_ENTRY_RE);
|
|
339
|
-
if (lm) {
|
|
340
|
-
nodePositions.set(lm[1].trim(), {
|
|
341
|
-
x: Number(lm[2]),
|
|
342
|
-
y: Number(lm[3])
|
|
343
|
-
});
|
|
344
|
-
} else {
|
|
345
|
-
result.diagnostics.push(
|
|
346
|
-
makeDgmoError(
|
|
347
|
-
lineNum,
|
|
348
|
-
`Invalid layout entry "${trimmed}" \u2014 expected "<node-id>: <x>, <y>"`,
|
|
349
|
-
"warning"
|
|
350
|
-
)
|
|
351
|
-
);
|
|
352
|
-
}
|
|
353
|
-
continue;
|
|
354
|
-
}
|
|
355
|
-
inLayoutBlock = false;
|
|
356
|
-
}
|
|
357
318
|
if (descState !== null) {
|
|
358
319
|
if (indent > descState.indent) {
|
|
359
320
|
if (trimmed.includes("->") || trimmed.includes("<->")) {
|
|
@@ -606,22 +567,6 @@ function parseBoxesAndLines(content, palette) {
|
|
|
606
567
|
);
|
|
607
568
|
}
|
|
608
569
|
finalizeAutoTagColors(result.tagGroups);
|
|
609
|
-
if (nodePositions.size > 0) {
|
|
610
|
-
const nodeLabelSet = new Set(result.nodes.map((n) => n.label));
|
|
611
|
-
for (const id of nodePositions.keys()) {
|
|
612
|
-
if (!nodeLabelSet.has(id)) {
|
|
613
|
-
pushWarning(0, `layout entry for unknown node "${id}" (ignored)`);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
const unpositioned = result.nodes.filter((n) => !nodePositions.has(n.label)).map((n) => n.label);
|
|
617
|
-
if (unpositioned.length > 0) {
|
|
618
|
-
pushWarning(
|
|
619
|
-
0,
|
|
620
|
-
`layout block is partial \u2014 ${unpositioned.length} node(s) without coordinates (${unpositioned.slice(0, 5).join(", ")}${unpositioned.length > 5 ? "\u2026" : ""}); ignoring the block and auto-laying-out`
|
|
621
|
-
);
|
|
622
|
-
}
|
|
623
|
-
result.nodePositions = nodePositions;
|
|
624
|
-
}
|
|
625
570
|
if (result.tagGroups.length > 0) {
|
|
626
571
|
injectDefaultTagMetadata(result.nodes, result.tagGroups);
|
|
627
572
|
validateTagValues(result.nodes, result.tagGroups, pushWarning, suggest);
|
|
@@ -884,4 +829,4 @@ export {
|
|
|
884
829
|
looksLikeBoxesAndLines,
|
|
885
830
|
parseBoxesAndLines
|
|
886
831
|
};
|
|
887
|
-
//# sourceMappingURL=chunk-
|
|
832
|
+
//# sourceMappingURL=chunk-BGP54HVR.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-JEUJOX5X.js";
|
|
8
8
|
import {
|
|
9
9
|
layoutERDiagram
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6NYWYNBI.js";
|
|
11
11
|
import {
|
|
12
12
|
EDGE_STROKE_WIDTH,
|
|
13
13
|
NODE_STROKE_WIDTH
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-YYVTBZZC.js";
|
|
18
18
|
import {
|
|
19
19
|
renderIntegratedLegend
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OU7HLO7I.js";
|
|
21
21
|
import {
|
|
22
22
|
TITLE_FONT_SIZE,
|
|
23
23
|
TITLE_FONT_WEIGHT,
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
} from "./chunk-6KFWC4CO.js";
|
|
29
29
|
import {
|
|
30
30
|
LEGEND_HEIGHT
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QOOUC2J5.js";
|
|
32
32
|
import {
|
|
33
33
|
measureText
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-WCT3NYCV.js";
|
|
35
35
|
import {
|
|
36
36
|
parseERDiagram
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-332ZR4QU.js";
|
|
38
38
|
import {
|
|
39
39
|
contrastText,
|
|
40
40
|
getSeriesColors,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
import {
|
|
44
44
|
resolveTagColor,
|
|
45
45
|
tagAttrKey
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-467TVMQL.js";
|
|
47
47
|
|
|
48
48
|
// src/er/renderer.ts
|
|
49
49
|
import * as d3Selection from "d3-selection";
|
|
@@ -545,4 +545,4 @@ export {
|
|
|
545
545
|
renderERDiagram,
|
|
546
546
|
renderERDiagramForExport
|
|
547
547
|
};
|
|
548
|
-
//# sourceMappingURL=chunk-
|
|
548
|
+
//# sourceMappingURL=chunk-BYJBIALT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compactNumber
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NI3XQBPB.js";
|
|
4
4
|
import {
|
|
5
5
|
parseInlineMarkdown
|
|
6
6
|
} from "./chunk-3HDBAXF5.js";
|
|
@@ -351,4 +351,4 @@ export {
|
|
|
351
351
|
renderGoal,
|
|
352
352
|
renderGoalForExport
|
|
353
353
|
};
|
|
354
|
-
//# sourceMappingURL=chunk-
|
|
354
|
+
//# sourceMappingURL=chunk-CC4YRBWV.js.map
|