@diagrammo/dgmo 0.50.2 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/.cursorrules +15 -19
  2. package/.github/copilot-instructions.md +15 -19
  3. package/.windsurfrules +15 -19
  4. package/SKILL.md +15 -19
  5. package/dist/advanced.d.ts +155 -65
  6. package/dist/advanced.js +231 -189
  7. package/dist/{analyzer-UYKBXAKR.js → analyzer-BJ54GIFB.js} +3 -3
  8. package/dist/auto.css +31 -8
  9. package/dist/auto.d.ts +6 -0
  10. package/dist/auto.js +171 -133
  11. package/dist/auto.mjs +3062 -1478
  12. package/dist/block.css +28 -8
  13. package/dist/block.js +138 -72
  14. package/dist/charts-d3-MXEP6BNP.js +26 -0
  15. package/dist/{chunk-3YPY3OXD.js → chunk-3HF5YEFJ.js} +17 -7
  16. package/dist/{chunk-4MJ7M6YL.js → chunk-3HGU63UY.js} +14 -13
  17. package/dist/chunk-3LK5DNED.js +35 -0
  18. package/dist/{chunk-3Y2DRD7S.js → chunk-3QD7VP3U.js} +9 -4
  19. package/dist/{chunk-6BFZKBGD.js → chunk-3YRPZ7ZZ.js} +2 -2
  20. package/dist/{chunk-WW32K72E.js → chunk-44VCIPHF.js} +25 -21
  21. package/dist/{chunk-TN35C5KM.js → chunk-4AQRFDXL.js} +2 -2
  22. package/dist/{chunk-HHXOONLX.js → chunk-4B5YISOR.js} +38 -1
  23. package/dist/{chunk-PGEGPSCZ.js → chunk-4IHAV6O7.js} +2 -2
  24. package/dist/{chunk-7L3R6I3U.js → chunk-4UNQ6X24.js} +10 -7
  25. package/dist/{chunk-O7NUCTFU.js → chunk-4YFKQ5WT.js} +7 -4
  26. package/dist/{chunk-5WFIYXQ6.js → chunk-5223KXFD.js} +122 -242
  27. package/dist/{chunk-PFHVU7UA.js → chunk-5BHJZH62.js} +3 -3
  28. package/dist/{chunk-QYTPPDAO.js → chunk-5HILBT7X.js} +2 -2
  29. package/dist/{chunk-GKC3HILQ.js → chunk-5NGAO4QK.js} +27 -4
  30. package/dist/{chunk-IAEC4KLA.js → chunk-5QKQSSPO.js} +2 -2
  31. package/dist/{chunk-DSWVNQVS.js → chunk-5RP7JRVP.js} +4 -59
  32. package/dist/{chunk-MCZ5LBZD.js → chunk-5SEVICBT.js} +8 -8
  33. package/dist/{chunk-GBE54KY6.js → chunk-6EJITS44.js} +8 -5
  34. package/dist/{chunk-BBGDM4NQ.js → chunk-6HQH6JZE.js} +35 -16
  35. package/dist/{chunk-66NVRO4K.js → chunk-6LBQ7ELG.js} +17 -18
  36. package/dist/{chunk-4XK3FLFB.js → chunk-6NYWYNBI.js} +3 -3
  37. package/dist/{chunk-VBYSIOOY.js → chunk-75G3Q4DK.js} +3 -3
  38. package/dist/{chunk-3NODSS6A.js → chunk-77FGAVZC.js} +13 -10
  39. package/dist/{chunk-6IAA2QQ2.js → chunk-7BIZCTAX.js} +2 -2
  40. package/dist/{chunk-TWQUYVP3.js → chunk-7DF4J4RL.js} +4 -4
  41. package/dist/{chunk-66RUL3XF.js → chunk-7KINELPI.js} +111 -49
  42. package/dist/{chunk-L3UHP6TD.js → chunk-7L4UJOY6.js} +1 -2
  43. package/dist/{chunk-QJP6PG7F.js → chunk-7QE3XMRK.js} +19 -18
  44. package/dist/{chunk-P7CE7LXL.js → chunk-AAXZDUOV.js} +18 -17
  45. package/dist/{chunk-SXRTRMEE.js → chunk-AL672HNE.js} +3 -3
  46. package/dist/chunk-APKUAJ2L.js +220 -0
  47. package/dist/{chunk-SCHXJTZL.js → chunk-ARGMQ3H4.js} +2 -2
  48. package/dist/{chunk-HEVYAHLW.js → chunk-AUIM2NVH.js} +5 -5
  49. package/dist/{chunk-3LH5CLP4.js → chunk-BKVOYV6I.js} +143 -6
  50. package/dist/{chunk-RZ6YKEUJ.js → chunk-BPIZNB5O.js} +17 -15
  51. package/dist/{chunk-QROYX7TT.js → chunk-BPY242XU.js} +6 -4
  52. package/dist/{chunk-OTAL43EH.js → chunk-BRENJ2BQ.js} +39 -3
  53. package/dist/{chunk-FA6K3FWM.js → chunk-CCNDLW7Z.js} +44 -22
  54. package/dist/{chunk-2KGXHFYK.js → chunk-CIRFIL4M.js} +49 -29
  55. package/dist/chunk-DAOFNU6J.js +283 -0
  56. package/dist/{chunk-QJJZSROI.js → chunk-DYWQFQJP.js} +48 -38
  57. package/dist/{chunk-XEGTMVYY.js → chunk-EMLPOL77.js} +15 -8
  58. package/dist/{chunk-NWED7CYO.js → chunk-FHGVORFO.js} +29 -25
  59. package/dist/{chunk-U2HGPLZS.js → chunk-FQ7HTV52.js} +17 -2
  60. package/dist/{chunk-H73FP42Q.js → chunk-FQMUHRVC.js} +70 -31
  61. package/dist/{chunk-BTUTZMPT.js → chunk-FT3ZYWET.js} +108 -42
  62. package/dist/{chunk-T5SHNNGP.js → chunk-FUPF2UYQ.js} +92 -34
  63. package/dist/{chunk-3XPUDB7B.js → chunk-FY5MSZAP.js} +279 -39
  64. package/dist/{chunk-M5RXSRO2.js → chunk-GCYTI3DE.js} +42 -33
  65. package/dist/{chunk-DN66GPY5.js → chunk-GJFAMOGK.js} +24 -3
  66. package/dist/{chunk-F2L5GCQ4.js → chunk-GU46PPT3.js} +3 -3
  67. package/dist/{chunk-6IUAK7RZ.js → chunk-H6PI3KJT.js} +2 -2
  68. package/dist/{chunk-ONA5KPV3.js → chunk-H7KENAZO.js} +18 -14
  69. package/dist/{chunk-SQLNBA64.js → chunk-HBPDFCQY.js} +3 -3
  70. package/dist/{chunk-SCQ5VPUF.js → chunk-HFMYN6N2.js} +2 -2
  71. package/dist/{chunk-FJUNPCYI.js → chunk-HHKO6SKY.js} +2 -2
  72. package/dist/{chunk-DZXYF2F5.js → chunk-HQQNCY7W.js} +21 -8
  73. package/dist/{chunk-7TV5Y53Y.js → chunk-HWX6ZHF3.js} +3 -3
  74. package/dist/{chunk-3P2DKJCG.js → chunk-ICPJPQ5C.js} +2 -2
  75. package/dist/{chunk-VUJGMJE6.js → chunk-IM6PDDCE.js} +4 -4
  76. package/dist/{chunk-JJUOHGX2.js → chunk-INE5YJBZ.js} +13 -8
  77. package/dist/{chunk-HTMN2Z6U.js → chunk-J6QROYDA.js} +58 -11
  78. package/dist/{chunk-NX4EQS3U.js → chunk-J76PIKAT.js} +2 -2
  79. package/dist/{chunk-SVTI362O.js → chunk-J7KJR3R6.js} +129 -109
  80. package/dist/{chunk-JEUJOX5X.js → chunk-J7TLCB2Q.js} +2 -2
  81. package/dist/{chunk-O7WP4ZD4.js → chunk-JED6ZDEE.js} +2 -2
  82. package/dist/{chunk-J6K7RP6P.js → chunk-JRCOYRRH.js} +19 -7
  83. package/dist/{chunk-7QKLIMRZ.js → chunk-K2I2XOZD.js} +46 -51
  84. package/dist/{chunk-EAMEADTV.js → chunk-K4EOKJA6.js} +96 -24
  85. package/dist/{chunk-5OWVC2A6.js → chunk-KGVZ5VGH.js} +13 -10
  86. package/dist/{chunk-DFTFPYUD.js → chunk-LBMS4AW6.js} +22 -21
  87. package/dist/{chunk-VVW3F3MD.js → chunk-LGT3PZCJ.js} +27 -19
  88. package/dist/{chunk-OMNGQPEZ.js → chunk-LTXOLDUZ.js} +9 -6
  89. package/dist/{chunk-Q4V4XQWV.js → chunk-MUE65OTD.js} +5 -4
  90. package/dist/{chunk-5GJYGP5Z.js → chunk-MUVJ57EP.js} +14 -18
  91. package/dist/{chunk-CLD2OKV7.js → chunk-MX2EY5Y7.js} +2 -2
  92. package/dist/{chunk-OTQKUHRS.js → chunk-NNS4E7CW.js} +6 -4
  93. package/dist/{chunk-NNAAJVBU.js → chunk-NR5HCAUD.js} +1 -1
  94. package/dist/{chunk-KFZYNWWO.js → chunk-ONU3U4GL.js} +4 -4
  95. package/dist/{chunk-YNRDWYZP.js → chunk-OQKP2X3D.js} +170 -51
  96. package/dist/{chunk-AHGF2YYA.js → chunk-OTOHI4JO.js} +2 -2
  97. package/dist/{chunk-EOFPYPAU.js → chunk-P3NRSSUU.js} +51 -11
  98. package/dist/{chunk-QXKWYZNR.js → chunk-PRI2OD4E.js} +10 -3
  99. package/dist/{chunk-U6EQI3U6.js → chunk-QBZYACOG.js} +3 -3
  100. package/dist/{chunk-C2CVAM3U.js → chunk-QGATPIPX.js} +170 -91
  101. package/dist/{chunk-PZFVK3IH.js → chunk-QHXCAEMX.js} +8 -5
  102. package/dist/{chunk-BH3UYK36.js → chunk-QJMKPUYK.js} +15 -5
  103. package/dist/{chunk-HQCHYB5F.js → chunk-QOOUC2J5.js} +2 -2
  104. package/dist/{chunk-Z6XJQ6KO.js → chunk-QVENJMNX.js} +2 -2
  105. package/dist/{chunk-IUMPEA64.js → chunk-QZX5S6R3.js} +4 -4
  106. package/dist/{chunk-I7F2A35O.js → chunk-R3YSD62R.js} +25 -47
  107. package/dist/{chunk-NU3XLTGP.js → chunk-REJAIQ5S.js} +4 -4
  108. package/dist/{chunk-2C56LEML.js → chunk-ROOE4R4Y.js} +8 -5
  109. package/dist/{chunk-XHVV4NVW.js → chunk-RT7ACF77.js} +12 -2
  110. package/dist/{chunk-I2WKW7C7.js → chunk-SMRFPVLQ.js} +3 -3
  111. package/dist/{chunk-VDOOQZUD.js → chunk-SWSIKFEB.js} +4 -4
  112. package/dist/{chunk-HLJVEAOF.js → chunk-T4A4TSTJ.js} +19 -45
  113. package/dist/{chunk-KHEYDLMT.js → chunk-TJVLKNGR.js} +20 -10
  114. package/dist/{chunk-GL5UZ6NY.js → chunk-TPFKKXCB.js} +3 -3
  115. package/dist/{chunk-X6EZPSW6.js → chunk-TTIM6YTT.js} +31 -21
  116. package/dist/{chunk-BCYVE3N5.js → chunk-TYS6CSS5.js} +2 -2
  117. package/dist/{chunk-T4VOVZT5.js → chunk-UBLHQTLV.js} +15 -14
  118. package/dist/{chunk-3LKM6FMW.js → chunk-UNURMIQO.js} +2 -2
  119. package/dist/{chunk-TSA237IM.js → chunk-VILVLS7P.js} +5 -3
  120. package/dist/{chunk-HGN652MU.js → chunk-VL2O2F3W.js} +2 -2
  121. package/dist/{chunk-3XGZF2QJ.js → chunk-VQOCMUWI.js} +39 -28
  122. package/dist/{chunk-P6T66CCZ.js → chunk-WBM7ZNDI.js} +3 -2
  123. package/dist/{chunk-CMCR5WBW.js → chunk-WBRZJOEC.js} +3 -3
  124. package/dist/{chunk-5LWQH6QV.js → chunk-WCT3NYCV.js} +1 -1
  125. package/dist/{chunk-C4GQDB5L.js → chunk-WRNFDFPU.js} +2 -2
  126. package/dist/{chunk-6HJBFVLO.js → chunk-XD6ZYURY.js} +9 -4
  127. package/dist/{chunk-C63UWAKM.js → chunk-Y2ZE3MSG.js} +2 -2
  128. package/dist/{chunk-7UEMZREK.js → chunk-YAA6IID3.js} +2 -2
  129. package/dist/{chunk-F7BFXWNQ.js → chunk-YIBAWQGJ.js} +7 -4
  130. package/dist/{chunk-PH5X4GIP.js → chunk-YTMTPUH4.js} +8 -5
  131. package/dist/{chunk-3UIKSPFB.js → chunk-Z5QVYKR7.js} +11 -3
  132. package/dist/{chunk-KQ57MHRO.js → chunk-ZEF5M5MB.js} +155 -87
  133. package/dist/{chunk-LE4MYMLI.js → chunk-ZJV7GYR4.js} +6 -6
  134. package/dist/{chunk-XJLKLU4D.js → chunk-ZNWAYU6N.js} +11 -7
  135. package/dist/cli.cjs +165 -148
  136. package/dist/clock.js +105 -25
  137. package/dist/countdown.js +208 -82
  138. package/dist/dgmo-router-X7ZGAPIE.js +86 -0
  139. package/dist/dimensions-45H6JQEY.js +22 -0
  140. package/dist/editor.js +17 -2
  141. package/dist/element.d.ts +6 -0
  142. package/dist/element.js +172 -134
  143. package/dist/element.mjs +3026 -1463
  144. package/dist/{flowchart-parser-OE4WHLTF.js → flowchart-parser-UKELHBSB.js} +4 -4
  145. package/dist/{flowchart-renderer-GPCSMTOR.js → flowchart-renderer-MNCDS7MV.js} +10 -10
  146. package/dist/highlight.d.ts +21 -1
  147. package/dist/highlight.js +106 -3
  148. package/dist/index.d.ts +2 -2
  149. package/dist/index.js +59 -57
  150. package/dist/{layout-FWODLIMP.js → layout-2L3WMRYU.js} +6 -6
  151. package/dist/{layout-7SKMFYHL.js → layout-46N4JJYK.js} +5 -5
  152. package/dist/{layout-7H4H46CS.js → layout-7QXCNOVS.js} +3 -3
  153. package/dist/layout-A4XWNVID.js +14 -0
  154. package/dist/{layout-46366KBT.js → layout-A5UHRWVH.js} +3 -3
  155. package/dist/{layout-NXG63LWH.js → layout-AM2JWW3X.js} +4 -4
  156. package/dist/{layout-DC4TVXER.js → layout-EE6GE46Y.js} +5 -5
  157. package/dist/{layout-FGQWRYYW.js → layout-F4WO357A.js} +3 -3
  158. package/dist/layout-G23F7LDH.js +9 -0
  159. package/dist/{layout-QNUQLEHU.js → layout-GM4UGR7B.js} +5 -4
  160. package/dist/{layout-7MZ5NF2N.js → layout-GQQJXNYH.js} +5 -5
  161. package/dist/{layout-5BG6DFCU.js → layout-IIE2S5FK.js} +6 -6
  162. package/dist/{layout-34CLNICW.js → layout-OAC4PEAC.js} +5 -5
  163. package/dist/layout-VMCRX66I.js +14 -0
  164. package/dist/{layout-PUQCB6AN.js → layout-ZDOSXL5G.js} +7 -7
  165. package/dist/{layout-search-QS44PI5R.js → layout-search-55FU6HD3.js} +6 -157
  166. package/dist/map-data/gazetteer.json +1 -1
  167. package/dist/{palettes-PRJ2RI6D.js → palettes-UDLZ2SA4.js} +2 -2
  168. package/dist/{parser-D5VILGN2.js → parser-2ECN6JA2.js} +4 -4
  169. package/dist/{parser-LWKKBNSA.js → parser-4WTIHM5J.js} +3 -3
  170. package/dist/{parser-DFFEDKHH.js → parser-5H2BTSJQ.js} +3 -3
  171. package/dist/{parser-4NO6VZ6S.js → parser-75KVXUNS.js} +4 -4
  172. package/dist/{parser-VKOJM7KS.js → parser-774AC53T.js} +4 -4
  173. package/dist/{parser-IBWNAPY4.js → parser-BE4YCSRU.js} +3 -3
  174. package/dist/{parser-4AI5ZN5F.js → parser-CNGUQUQI.js} +3 -3
  175. package/dist/{parser-36HVKU5U.js → parser-DEUUSQIN.js} +7 -6
  176. package/dist/{parser-H3XEPFPV.js → parser-DQAFLUJB.js} +4 -4
  177. package/dist/{parser-5OXGPNBF.js → parser-EYCKNKQA.js} +5 -5
  178. package/dist/{parser-TGQZJ5OT.js → parser-FXISIU6A.js} +4 -4
  179. package/dist/{parser-JJR52VAT.js → parser-GTB4XC7P.js} +5 -5
  180. package/dist/{parser-AGVYTQXV.js → parser-GVEPAUSD.js} +4 -4
  181. package/dist/{parser-WAV5JRPT.js → parser-HSQGTY4G.js} +4 -4
  182. package/dist/{parser-YS7TOS2K.js → parser-HVKRINUS.js} +3 -3
  183. package/dist/{parser-W4PQUGX3.js → parser-J5MIEYO4.js} +5 -5
  184. package/dist/parser-KMZIXLDZ.js +13 -0
  185. package/dist/{parser-HYRTF3DO.js → parser-LJHXWSXU.js} +3 -3
  186. package/dist/{parser-KCR2WS3V.js → parser-PT3W72G5.js} +4 -4
  187. package/dist/{parser-CVMEDULU.js → parser-SBJQDPHL.js} +4 -4
  188. package/dist/{parser-RZPVAQVX.js → parser-SUWWWCMX.js} +4 -3
  189. package/dist/{parser-TXND652E.js → parser-SXDRNZOA.js} +4 -4
  190. package/dist/parser-UMILOW3M.js +14 -0
  191. package/dist/{parser-RV4M6AS2.js → parser-UP3AZ367.js} +4 -4
  192. package/dist/{parser-IJBMRXMC.js → parser-WHPRV3X5.js} +5 -5
  193. package/dist/{parser-MPCE5JBG.js → parser-WX3UODSJ.js} +4 -4
  194. package/dist/{parser-K3XXLMUW.js → parser-XCIEN3KN.js} +4 -4
  195. package/dist/{parser-AXKBDGNO.js → parser-XIRTUMVN.js} +5 -5
  196. package/dist/{parser-B5FVS7O6.js → parser-YKCGIG45.js} +3 -3
  197. package/dist/{parser-PSA4UBSP.js → parser-YKYMQG3B.js} +4 -4
  198. package/dist/{parser-MTOMTWTD.js → parser-ZGM2OJ6Y.js} +6 -5
  199. package/dist/{parser-CSFUN3CT.js → parser-ZL5QUFVH.js} +5 -4
  200. package/dist/pert.d.ts +2 -2
  201. package/dist/{renderer-PPIHO5FI.js → renderer-3F7OS2AX.js} +14 -13
  202. package/dist/{renderer-SBS3YWU5.js → renderer-4QB4K7Q3.js} +9 -9
  203. package/dist/{renderer-GHPZMFU2.js → renderer-5DAKMIU2.js} +3 -3
  204. package/dist/{renderer-R2WNIC2C.js → renderer-5H4SY7YY.js} +9 -9
  205. package/dist/{renderer-DAXMXIKD.js → renderer-5PIQPFOX.js} +5 -4
  206. package/dist/{renderer-45PSOL3E.js → renderer-6MU37QF5.js} +6 -6
  207. package/dist/renderer-AQVMWJ4M.js +27 -0
  208. package/dist/{renderer-A5VE5BCI.js → renderer-BDDW6K7N.js} +9 -9
  209. package/dist/{renderer-AUW2BE6G.js → renderer-BNB3VIDY.js} +10 -10
  210. package/dist/{renderer-4ITCHBT7.js → renderer-CQY6ATOS.js} +6 -6
  211. package/dist/{renderer-6OKF44KS.js → renderer-CVW75CXL.js} +15 -15
  212. package/dist/{renderer-7RH2SI3B.js → renderer-DT4XRFEP.js} +5 -4
  213. package/dist/{renderer-B5TBNZJE.js → renderer-ERHBSTQT.js} +9 -9
  214. package/dist/{renderer-HVCU2C3Z.js → renderer-HSHHVYWF.js} +5 -4
  215. package/dist/renderer-IDPVUFNB.js +28 -0
  216. package/dist/renderer-ILX6BGKR.js +21 -0
  217. package/dist/renderer-JP663HKG.js +22 -0
  218. package/dist/{renderer-KS7YZJE2.js → renderer-KNFTTOBL.js} +11 -11
  219. package/dist/{renderer-2AZ5HJFK.js → renderer-MVUZBESR.js} +5 -5
  220. package/dist/{renderer-QAOBLRXV.js → renderer-N4EBR2FV.js} +11 -11
  221. package/dist/{renderer-P5ROYQGU.js → renderer-NHO46CT2.js} +4 -4
  222. package/dist/{renderer-NGXZTRK6.js → renderer-NO2QJ5LZ.js} +10 -10
  223. package/dist/{renderer-FPE3J5VZ.js → renderer-OGFV5RXX.js} +12 -12
  224. package/dist/{renderer-ODUUOPVT.js → renderer-PDLESJMS.js} +15 -15
  225. package/dist/renderer-T4MTNINC.js +24 -0
  226. package/dist/renderer-TOUGFGTM.js +24 -0
  227. package/dist/{renderer-BSR2O2H6.js → renderer-U3KPD43Y.js} +14 -13
  228. package/dist/{renderer-JCCHNECZ.js → renderer-X334IJU2.js} +10 -10
  229. package/dist/{renderer-5DSEWF74.js → renderer-Y5OAMOCR.js} +9 -9
  230. package/dist/{renderer-5KVCNMOJ.js → renderer-YONAKAJU.js} +5 -3
  231. package/dist/{renderer-7SD6MSBS.js → renderer-YWMI6Y2U.js} +12 -12
  232. package/dist/{renderer-2QPMJ2DA.js → renderer-ZWIH4WDW.js} +10 -10
  233. package/dist/renderer-radial-7CGZMVMS.js +21 -0
  234. package/dist/{resolver-FHBCO3PL.js → resolver-EMTGNR3D.js} +4 -3
  235. package/dist/{state-parser-3REXRK3R.js → state-parser-BATWAID2.js} +4 -4
  236. package/dist/{state-renderer-XYLNRWXR.js → state-renderer-3FKZJ3LP.js} +10 -10
  237. package/dist/{themes-PdPR1-hC.d.ts → themes-32xj5ZTW.d.ts} +27 -0
  238. package/docs/ai-integration.md +15 -19
  239. package/docs/language-reference.md +106 -21
  240. package/gallery/fixtures/clock.dgmo +3 -3
  241. package/gallery/fixtures/countdown-tz.dgmo +5 -0
  242. package/package.json +1 -1
  243. package/dist/charts-d3-MUW3LTML.js +0 -26
  244. package/dist/dgmo-router-CE2G67FV.js +0 -84
  245. package/dist/dimensions-OTBKC5M6.js +0 -22
  246. package/dist/layout-6RDJHS6E.js +0 -9
  247. package/dist/layout-J36454XU.js +0 -14
  248. package/dist/layout-LD6XTLD6.js +0 -14
  249. package/dist/parser-4WQQQXCG.js +0 -13
  250. package/dist/parser-O4HIUN6G.js +0 -13
  251. package/dist/renderer-CYB4LK3G.js +0 -22
  252. package/dist/renderer-FF24KZCI.js +0 -24
  253. package/dist/renderer-FYSVXL7M.js +0 -28
  254. package/dist/renderer-HDCCZURL.js +0 -24
  255. package/dist/renderer-PSMMZCKH.js +0 -21
  256. package/dist/renderer-UYMQQCJK.js +0 -24
  257. package/dist/renderer-radial-F7X5F2VU.js +0 -21
package/dist/clock.js CHANGED
@@ -1,4 +1,32 @@
1
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
+ }
2
30
  var SOON_MIN = 60;
3
31
  var RAD = Math.PI / 180;
4
32
  var DAY_MS = 864e5;
@@ -42,6 +70,33 @@ function zoneParts(zone, nowMs) {
42
70
  function pad2(n) {
43
71
  return n < 10 ? "0" + n : String(n);
44
72
  }
73
+ var WEEKDAY_SHORT = [
74
+ "Sun",
75
+ "Mon",
76
+ "Tue",
77
+ "Wed",
78
+ "Thu",
79
+ "Fri",
80
+ "Sat"
81
+ ];
82
+ function formatOffsetLabel(offsetMin) {
83
+ if (offsetMin === 0) return "UTC";
84
+ const sign = offsetMin < 0 ? "-" : "+";
85
+ const abs = Math.abs(offsetMin);
86
+ const h = Math.floor(abs / 60);
87
+ const mm = abs % 60;
88
+ return `UTC${sign}${h}${mm ? ":" + pad2(mm) : ""}`;
89
+ }
90
+ function fixedParts(offsetMin, nowMs) {
91
+ const d = new Date(nowMs + offsetMin * 6e4);
92
+ return {
93
+ h: d.getUTCHours(),
94
+ m: d.getUTCMinutes(),
95
+ s: d.getUTCSeconds(),
96
+ weekday: WEEKDAY_SHORT[d.getUTCDay()],
97
+ offsetLabel: formatOffsetLabel(offsetMin)
98
+ };
99
+ }
45
100
  function formatTime(h, m, s, hours12) {
46
101
  const sec = pad2(s);
47
102
  if (hours12) {
@@ -129,6 +184,22 @@ function handAngles(h, m, s) {
129
184
  };
130
185
  }
131
186
 
187
+ // src/palettes/color-utils.ts
188
+ function mix(a, b, pct) {
189
+ const parse = (h) => {
190
+ const r = h.replace("#", "");
191
+ const f = r.length === 3 ? [...r].map((c2) => c2 + c2).join("") : r;
192
+ return [
193
+ parseInt(f.substring(0, 2), 16),
194
+ parseInt(f.substring(2, 4), 16),
195
+ parseInt(f.substring(4, 6), 16)
196
+ ];
197
+ };
198
+ const [ar, ag, ab] = parse(a), [br, bg, bb] = parse(b), t = pct / 100;
199
+ const c = (x, y) => Math.round(x * t + y * (1 - t)).toString(16).padStart(2, "0");
200
+ return `#${c(ar, br)}${c(ag, bg)}${c(ab, bb)}`;
201
+ }
202
+
132
203
  // src/clock/ticker.ts
133
204
  function readWork(node) {
134
205
  const start = node.getAttribute("data-dgmo-clock-work-start");
@@ -151,7 +222,8 @@ function setPart(group, sel, textContent) {
151
222
  function updateRow(group, now) {
152
223
  const zone = group.getAttribute("data-dgmo-clock-zone");
153
224
  if (!zone) return;
154
- const parts = zoneParts(zone, now);
225
+ const fixedAttr = group.getAttribute("data-dgmo-clock-fixed-offset");
226
+ const parts = fixedAttr !== null ? fixedParts(Number(fixedAttr), now) : zoneParts(zone, now);
155
227
  const latAttr = group.getAttribute("data-dgmo-clock-lat");
156
228
  const lonAttr = group.getAttribute("data-dgmo-clock-lon");
157
229
  const sunOn = group.getAttribute("data-dgmo-clock-sun") === "1";
@@ -167,21 +239,28 @@ function updateRow(group, now) {
167
239
  setHand(group, "h", ang.hour);
168
240
  setHand(group, "m", ang.minute);
169
241
  setHand(group, "s", ang.second);
170
- const autoSolid = group.getAttribute("data-dgmo-clock-auto-solid");
171
- const autoFace = group.getAttribute("data-dgmo-clock-auto-face");
172
- const faceFill = autoFace ?? stTint;
173
- const handColor = autoSolid ?? stColor;
174
- const face = group.querySelector("[data-dgmo-clock-facebg]");
175
- if (face) face.setAttribute("fill", faceFill);
176
- const ring = group.querySelector("[data-dgmo-clock-facering]");
177
- if (ring && autoSolid) ring.setAttribute("stroke", autoSolid);
178
- const center = group.querySelector("[data-dgmo-clock-center]");
179
- if (center) center.setAttribute("fill", handColor);
180
- const secondHand = group.querySelector('[data-dgmo-clock-hand="s"]');
181
- if (secondHand) secondHand.setAttribute("stroke", handColor);
242
+ const mode = group.getAttribute("data-dgmo-clock-auto-mode");
243
+ const cardFill = group.getAttribute("data-dgmo-clock-cardfill");
244
+ const fillMode = group.getAttribute("data-dgmo-clock-fill-mode");
245
+ let autoSolid = null;
246
+ if (mode === "daylight") autoSolid = up ? c("day") : c("night");
247
+ else if (mode === "time") autoSolid = rampColor(parts.h);
248
+ else if (mode) autoSolid = group.getAttribute("data-dgmo-clock-auto-solid");
249
+ if (!fillMode) {
250
+ const faceFill = autoSolid && cardFill ? mix(autoSolid, cardFill, 20) : group.getAttribute("data-dgmo-clock-auto-face") ?? stTint;
251
+ const handColor = autoSolid ?? stColor;
252
+ const face = group.querySelector("[data-dgmo-clock-facebg]");
253
+ if (face) face.setAttribute("fill", faceFill);
254
+ const ring = group.querySelector("[data-dgmo-clock-facering]");
255
+ if (ring && autoSolid) ring.setAttribute("stroke", autoSolid);
256
+ const center = group.querySelector("[data-dgmo-clock-center]");
257
+ if (center) center.setAttribute("fill", handColor);
258
+ const secondHand = group.querySelector('[data-dgmo-clock-hand="s"]');
259
+ if (secondHand) secondHand.setAttribute("stroke", handColor);
260
+ }
182
261
  setPart(group, '[data-dgmo-clock-digital-part="main"]', ts.main);
183
262
  setPart(group, '[data-dgmo-clock-digital-part="sec"]', `:${ts.sec}`);
184
- setPart(group, '[data-dgmo-clock-digital-part="ap"]', ` ${ts.ap}`);
263
+ setPart(group, '[data-dgmo-clock-digital-part="ap"]', ts.ap);
185
264
  setPart(group, "[data-dgmo-clock-ampm]", ts.ap.toUpperCase());
186
265
  const work = readWork(group);
187
266
  const status = workStatus(parts, work);
@@ -191,17 +270,18 @@ function updateRow(group, now) {
191
270
  if (statusEl.textContent !== status.text)
192
271
  statusEl.textContent = status.text;
193
272
  statusEl.setAttribute("fill", col);
194
- const dot = group.querySelector("[data-dgmo-clock-status-dot]");
195
- if (dot) {
196
- if (status.cls === "off") {
197
- dot.setAttribute("fill", "none");
198
- dot.setAttribute("stroke", col);
199
- dot.setAttribute("stroke-width", "1.4");
200
- } else {
201
- dot.setAttribute("fill", col);
202
- dot.setAttribute("stroke", "none");
203
- }
204
- }
273
+ const icon = group.querySelector("[data-dgmo-clock-status-icon]");
274
+ if (icon) icon.setAttribute("fill", col);
275
+ }
276
+ const lane = group.querySelector("[data-dgmo-clock-lane]");
277
+ if (lane && mode && !fillMode) {
278
+ let laneFill = null;
279
+ if (mode === "daylight") laneFill = stTint;
280
+ else if (mode === "time" && cardFill)
281
+ laneFill = mix(rampColor(parts.h), cardFill, 14);
282
+ else if (mode === "work" && status)
283
+ laneFill = status.cls === "ok" ? c("ok-soft") : status.cls === "soon" ? c("soon-soft") : c("off-soft");
284
+ if (laneFill) lane.setAttribute("fill", laneFill);
205
285
  }
206
286
  const sunEl = group.querySelector("[data-dgmo-clock-sun-line]");
207
287
  if (sun && sunEl) {
package/dist/countdown.js CHANGED
@@ -1,6 +1,102 @@
1
1
  // src/countdown/resolve.ts
2
2
  var DAY_MS = 864e5;
3
3
  var WEEK_MS = 7 * DAY_MS;
4
+ var ZONE_WD = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
5
+ function zoneFields(ms, tz) {
6
+ const d = new Date(ms);
7
+ if (!tz) {
8
+ return {
9
+ year: d.getFullYear(),
10
+ month: d.getMonth(),
11
+ day: d.getDate(),
12
+ hour: d.getHours(),
13
+ minute: d.getMinutes(),
14
+ second: d.getSeconds(),
15
+ weekday: d.getDay()
16
+ };
17
+ }
18
+ try {
19
+ const o = {};
20
+ new Intl.DateTimeFormat("en-US", {
21
+ timeZone: tz,
22
+ hour12: false,
23
+ year: "numeric",
24
+ month: "2-digit",
25
+ day: "2-digit",
26
+ hour: "2-digit",
27
+ minute: "2-digit",
28
+ second: "2-digit",
29
+ weekday: "short"
30
+ }).formatToParts(d).forEach((x) => {
31
+ o[x.type] = x.value;
32
+ });
33
+ return {
34
+ year: Number(o["year"]),
35
+ month: Number(o["month"]) - 1,
36
+ day: Number(o["day"]),
37
+ hour: Number(o["hour"]) % 24,
38
+ minute: Number(o["minute"]),
39
+ second: Number(o["second"]),
40
+ weekday: Math.max(0, ZONE_WD.indexOf(o["weekday"] ?? "Sun"))
41
+ };
42
+ } catch {
43
+ return {
44
+ year: d.getUTCFullYear(),
45
+ month: d.getUTCMonth(),
46
+ day: d.getUTCDate(),
47
+ hour: d.getUTCHours(),
48
+ minute: d.getUTCMinutes(),
49
+ second: d.getUTCSeconds(),
50
+ weekday: d.getUTCDay()
51
+ };
52
+ }
53
+ }
54
+ function zoneOffsetMs(tz, ms) {
55
+ const f = zoneFields(ms, tz);
56
+ const asUTC = Date.UTC(f.year, f.month, f.day, f.hour, f.minute, f.second);
57
+ return asUTC - Math.floor(ms / 1e3) * 1e3;
58
+ }
59
+ function wallToMs(y, mo, d, h, mi, tz) {
60
+ if (!tz) return new Date(y, mo, d, h, mi).getTime();
61
+ const guess = Date.UTC(y, mo, d, h, mi);
62
+ const off1 = zoneOffsetMs(tz, guess);
63
+ const ms = guess - off1;
64
+ const off2 = zoneOffsetMs(tz, ms);
65
+ return off2 === off1 ? ms : guess - off2;
66
+ }
67
+ function zoneOffsetLabel(ms, tz) {
68
+ if (!tz) return "";
69
+ try {
70
+ const off = new Intl.DateTimeFormat("en-US", {
71
+ timeZone: tz,
72
+ timeZoneName: "shortOffset"
73
+ }).formatToParts(new Date(ms)).find((x) => x.type === "timeZoneName");
74
+ return off ? off.value.replace("GMT", "UTC") : "";
75
+ } catch {
76
+ return "";
77
+ }
78
+ }
79
+ var DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
80
+ var LOCAL_DT_RE = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?$/;
81
+ function targetToMs(target, tz = null) {
82
+ const s = target.trim();
83
+ if (DATE_ONLY_RE.test(s)) {
84
+ const [y, m, d] = s.split("-").map(Number);
85
+ return wallToMs(y, m - 1, d, 0, 0, tz);
86
+ }
87
+ const dt = LOCAL_DT_RE.exec(s);
88
+ if (dt) {
89
+ return wallToMs(
90
+ Number(dt[1]),
91
+ Number(dt[2]) - 1,
92
+ Number(dt[3]),
93
+ Number(dt[4]),
94
+ Number(dt[5]),
95
+ tz
96
+ );
97
+ }
98
+ return new Date(s).getTime();
99
+ }
4
100
  function ordinalWord(n) {
5
101
  const abs = Math.abs(n);
6
102
  const tens = abs % 100;
@@ -14,16 +110,24 @@ function ordinalWord(n) {
14
110
  function applyOrdinalTemplate(template, n) {
15
111
  return template.replace(/\bNth\b/g, ordinalWord(n)).replace(/\bN\b/g, String(n));
16
112
  }
17
- function dayStart(ms) {
18
- const d = new Date(ms);
19
- return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
113
+ function dayStart(ms, tz = null) {
114
+ const f = zoneFields(ms, tz);
115
+ return wallToMs(f.year, f.month, f.day, 0, 0, tz);
20
116
  }
21
- function nthWeekdayOfMonth(year, month, weekday, nth, hour, minute) {
117
+ function dayDelta(a, b, tz = null) {
118
+ return Math.round((dayStart(b, tz) - dayStart(a, tz)) / DAY_MS);
119
+ }
120
+ function sameDay(a, b, tz = null) {
121
+ const x = zoneFields(a, tz);
122
+ const y = zoneFields(b, tz);
123
+ return x.year === y.year && x.month === y.month && x.day === y.day;
124
+ }
125
+ function nthWeekdayOfMonth(year, month, weekday, nth, hour, minute, tz) {
22
126
  if (nth < 0) {
23
127
  const last = new Date(year, month + 1, 0).getDate();
24
128
  for (let d = last; d >= 1; d--) {
25
129
  if (new Date(year, month, d).getDay() === weekday) {
26
- return new Date(year, month, d, hour, minute).getTime();
130
+ return wallToMs(year, month, d, hour, minute, tz);
27
131
  }
28
132
  }
29
133
  return null;
@@ -32,20 +136,21 @@ function nthWeekdayOfMonth(year, month, weekday, nth, hour, minute) {
32
136
  const offset = (weekday - firstDow + 7) % 7;
33
137
  const day = 1 + offset + (nth - 1) * 7;
34
138
  if (day > new Date(year, month + 1, 0).getDate()) return null;
35
- return new Date(year, month, day, hour, minute).getTime();
139
+ return wallToMs(year, month, day, hour, minute, tz);
36
140
  }
37
141
  function resolveNext(rule, now) {
38
- const nowD = new Date(now);
142
+ const tz = rule.tz ?? null;
143
+ const nowF = zoneFields(now, tz);
39
144
  const { hour, minute } = rule;
40
- const passes = rule.allDay ? (t) => dayStart(t) >= dayStart(now) : (t) => t > now;
145
+ const passes = rule.allDay ? (t) => dayStart(t, tz) >= dayStart(now, tz) : (t) => t > now;
41
146
  const dayExists = (y, m, d) => new Date(y, m, d).getMonth() === m;
42
147
  switch (rule.kind) {
43
148
  case "month-day": {
44
149
  const month = rule.month;
45
150
  const day = rule.day;
46
- for (let y = nowD.getFullYear(); ; y++) {
151
+ for (let y = nowF.year; ; y++) {
47
152
  if (!dayExists(y, month, day)) continue;
48
- const t = new Date(y, month, day, hour, minute).getTime();
153
+ const t = wallToMs(y, month, day, hour, minute, tz);
49
154
  if (passes(t)) return t;
50
155
  }
51
156
  }
@@ -53,10 +158,10 @@ function resolveNext(rule, now) {
53
158
  case "last-weekday": {
54
159
  const weekday = rule.weekday;
55
160
  const nth = rule.kind === "last-weekday" ? -1 : rule.nth;
56
- let y = nowD.getFullYear();
57
- let m = nowD.getMonth();
161
+ let y = nowF.year;
162
+ let m = nowF.month;
58
163
  for (let i = 0; i < 24; i++) {
59
- const t = nthWeekdayOfMonth(y, m, weekday, nth, hour, minute);
164
+ const t = nthWeekdayOfMonth(y, m, weekday, nth, hour, minute, tz);
60
165
  if (t !== null && passes(t)) return t;
61
166
  m++;
62
167
  if (m > 11) {
@@ -69,14 +174,17 @@ function resolveNext(rule, now) {
69
174
  case "weekly": {
70
175
  const weekday = rule.weekday;
71
176
  for (let i = 0; i < 8; i++) {
72
- const d = new Date(
73
- nowD.getFullYear(),
74
- nowD.getMonth(),
75
- nowD.getDate() + i,
177
+ const cal = new Date(nowF.year, nowF.month, nowF.day + i);
178
+ if (cal.getDay() !== weekday) continue;
179
+ const t = wallToMs(
180
+ cal.getFullYear(),
181
+ cal.getMonth(),
182
+ cal.getDate(),
76
183
  hour,
77
- minute
184
+ minute,
185
+ tz
78
186
  );
79
- if (d.getDay() === weekday && passes(d.getTime())) return d.getTime();
187
+ if (passes(t)) return t;
80
188
  }
81
189
  return now + WEEK_MS;
82
190
  }
@@ -84,15 +192,15 @@ function resolveNext(rule, now) {
84
192
  const n = rule.intervalN ?? 1;
85
193
  const anchor = rule.anchorMs ?? now;
86
194
  if (rule.intervalUnit === "month") {
87
- const a = new Date(anchor);
88
- const day = a.getDate();
195
+ const a = zoneFields(anchor, tz);
196
+ const day = a.day;
89
197
  for (let k = 0; ; k++) {
90
- const y = a.getFullYear();
91
- const m = a.getMonth() + k * n;
198
+ const y = a.year;
199
+ const m = a.month + k * n;
92
200
  const yy = y + Math.floor(m / 12);
93
201
  const mm = (m % 12 + 12) % 12;
94
202
  if (!dayExists(yy, mm, day)) continue;
95
- const t2 = new Date(yy, mm, day, hour, minute).getTime();
203
+ const t2 = wallToMs(yy, mm, day, hour, minute, tz);
96
204
  if (passes(t2)) return t2;
97
205
  }
98
206
  }
@@ -153,6 +261,10 @@ function formatCount(remainingMs, opts) {
153
261
  const dayPrefix = has("d") && days > 0 ? `${days}d${clock ? " " : ""}` : "";
154
262
  return dayPrefix + clock || plural(days, "day");
155
263
  }
264
+ function splitClockSeconds(s) {
265
+ const m = /^(.+:\d{2}):(\d{2})$/.exec(s);
266
+ return m ? { lead: m[1], sec: ":" + m[2] } : { lead: s, sec: null };
267
+ }
156
268
  function formatWordsDetail(remainingMs) {
157
269
  const totalMin = Math.floor(Math.max(0, remainingMs) / 6e4);
158
270
  const d = Math.floor(totalMin / 1440);
@@ -164,15 +276,15 @@ function formatWordsDetail(remainingMs) {
164
276
  parts.push(`${m} minute${m === 1 ? "" : "s"}`);
165
277
  return parts.join(" ");
166
278
  }
167
- function breakdown(nowMs, targetMs) {
168
- const n = new Date(nowMs);
169
- const t = new Date(targetMs);
170
- let y = t.getFullYear() - n.getFullYear();
171
- let mo = t.getMonth() - n.getMonth();
172
- let d = t.getDate() - n.getDate();
173
- let h = t.getHours() - n.getHours();
174
- let mi = t.getMinutes() - n.getMinutes();
175
- let s = t.getSeconds() - n.getSeconds();
279
+ function breakdown(nowMs, targetMs, tz = null) {
280
+ const n = zoneFields(nowMs, tz);
281
+ const t = zoneFields(targetMs, tz);
282
+ let y = t.year - n.year;
283
+ let mo = t.month - n.month;
284
+ let d = t.day - n.day;
285
+ let h = t.hour - n.hour;
286
+ let mi = t.minute - n.minute;
287
+ let s = t.second - n.second;
176
288
  if (s < 0) {
177
289
  s += 60;
178
290
  mi--;
@@ -186,7 +298,7 @@ function breakdown(nowMs, targetMs) {
186
298
  d--;
187
299
  }
188
300
  if (d < 0) {
189
- d += new Date(t.getFullYear(), t.getMonth(), 0).getDate();
301
+ d += new Date(t.year, t.month, 0).getDate();
190
302
  mo--;
191
303
  }
192
304
  if (mo < 0) {
@@ -195,8 +307,8 @@ function breakdown(nowMs, targetMs) {
195
307
  }
196
308
  return { years: y, months: mo, days: d, hours: h, minutes: mi, seconds: s };
197
309
  }
198
- function humanUnits(nowMs, targetMs) {
199
- const b = breakdown(nowMs, targetMs);
310
+ function humanUnits(nowMs, targetMs, tz = null) {
311
+ const b = breakdown(nowMs, targetMs, tz);
200
312
  return [
201
313
  [b.years, "year"],
202
314
  [b.months, "month"],
@@ -205,8 +317,8 @@ function humanUnits(nowMs, targetMs) {
205
317
  [b.minutes, "minute"]
206
318
  ];
207
319
  }
208
- function formatHuman(nowMs, targetMs) {
209
- const units = humanUnits(nowMs, targetMs);
320
+ function formatHuman(nowMs, targetMs, tz = null) {
321
+ const units = humanUnits(nowMs, targetMs, tz);
210
322
  let i = 0;
211
323
  while (i < units.length - 1 && units[i][0] === 0) i++;
212
324
  const rest = units.slice(i);
@@ -215,8 +327,8 @@ function formatHuman(nowMs, targetMs) {
215
327
  const secondary = rest.slice(2).filter((p) => p[0] > 0);
216
328
  return { big: say(primary) || "now", sub: say(secondary) };
217
329
  }
218
- function formatCompound(nowMs, targetMs, maxUnits = 2) {
219
- const all = humanUnits(nowMs, targetMs);
330
+ function formatCompound(nowMs, targetMs, maxUnits = 2, tz = null) {
331
+ const all = humanUnits(nowMs, targetMs, tz);
220
332
  let i = 0;
221
333
  while (i < all.length - 1 && all[i][0] === 0) i++;
222
334
  const chosen = all.slice(i, i + maxUnits).filter((p, idx) => p[0] > 0 || idx === 0);
@@ -238,35 +350,54 @@ var MONTH_ABBR = [
238
350
  "Nov",
239
351
  "Dec"
240
352
  ];
241
- function formatDate(ms) {
242
- const d = new Date(ms);
243
- return `${WEEKDAY_ABBR[d.getDay()]} ${MONTH_ABBR[d.getMonth()]} ${d.getDate()} ${d.getFullYear()}`;
353
+ function formatDate(ms, tz = null) {
354
+ const f = zoneFields(ms, tz);
355
+ return `${WEEKDAY_ABBR[f.weekday]} ${MONTH_ABBR[f.month]} ${f.day} ${f.year}`;
244
356
  }
245
- function formatFooter(resolvedMs, hasTime) {
246
- const parts = [formatDate(resolvedMs)];
357
+ function formatFooter(resolvedMs, hasTime, tz = null) {
358
+ const parts = [formatDate(resolvedMs, tz)];
247
359
  if (hasTime) {
248
- const d = new Date(resolvedMs);
249
- parts.push(`${pad2(d.getHours())}:${pad2(d.getMinutes())}`);
360
+ const f = zoneFields(resolvedMs, tz);
361
+ parts.push(`${pad2(f.hour)}:${pad2(f.minute)}`);
362
+ const label = zoneOffsetLabel(resolvedMs, tz);
363
+ if (label) parts.push(label);
250
364
  }
251
365
  return parts.join(" \xB7 ");
252
366
  }
253
367
 
254
368
  // src/countdown/ticker.ts
255
- var DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
256
- function dayStartLocal(ms) {
257
- const d = new Date(ms);
258
- return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
259
- }
260
- function dayDeltaLocal(aMs, bMs) {
261
- const a = new Date(aMs);
262
- const b = new Date(bMs);
263
- const a0 = new Date(a.getFullYear(), a.getMonth(), a.getDate()).getTime();
264
- const b0 = new Date(b.getFullYear(), b.getMonth(), b.getDate()).getTime();
265
- return Math.round((b0 - a0) / DAY_MS);
266
- }
267
369
  function pad22(n) {
268
370
  return n < 10 ? "0" + n : String(n);
269
371
  }
372
+ var SVG_NS = "http://www.w3.org/2000/svg";
373
+ function setClockText(el, str) {
374
+ if (el.hasAttribute("data-dgmo-cd-clock")) {
375
+ const { lead, sec } = splitClockSeconds(str);
376
+ if (sec !== null) {
377
+ let leadT = el.querySelector("[data-cd-lead]");
378
+ let secT = el.querySelector("[data-cd-sec]");
379
+ if (!leadT || !secT) {
380
+ while (el.firstChild) el.removeChild(el.firstChild);
381
+ const doc = el.ownerDocument;
382
+ leadT = doc.createElementNS(SVG_NS, "tspan");
383
+ leadT.setAttribute("data-cd-lead", "");
384
+ secT = doc.createElementNS(SVG_NS, "tspan");
385
+ secT.setAttribute("data-cd-sec", "");
386
+ const size = el.getAttribute("data-dgmo-cd-sec-size");
387
+ const fill = el.getAttribute("data-dgmo-cd-sec-fill");
388
+ if (size) secT.setAttribute("font-size", size);
389
+ if (fill) secT.setAttribute("fill", fill);
390
+ secT.setAttribute("font-weight", "700");
391
+ el.appendChild(leadT);
392
+ el.appendChild(secT);
393
+ }
394
+ if (leadT.textContent !== lead) leadT.textContent = lead;
395
+ if (secT.textContent !== sec) secT.textContent = sec;
396
+ return;
397
+ }
398
+ }
399
+ if (el.textContent !== str) el.textContent = str;
400
+ }
270
401
  function polar(cx, cy, r, deg) {
271
402
  const a = (deg - 90) * Math.PI / 180;
272
403
  return [cx + r * Math.cos(a), cy + r * Math.sin(a)];
@@ -308,13 +439,8 @@ function updateGauges(svg, remaining) {
308
439
  if (cap.textContent !== t) cap.textContent = t;
309
440
  }
310
441
  }
311
- function targetToMs(target) {
312
- const s = target.trim();
313
- if (DATE_ONLY_RE.test(s)) {
314
- const p = s.split("-").map(Number);
315
- return new Date(p[0], p[1] - 1, p[2]).getTime();
316
- }
317
- const t = new Date(s).getTime();
442
+ function targetToMs2(target, tz) {
443
+ const t = targetToMs(target, tz);
318
444
  return Number.isFinite(t) ? t : null;
319
445
  }
320
446
  function readRule(node) {
@@ -335,14 +461,10 @@ function readRule(node) {
335
461
  allDay: node.getAttribute("data-dgmo-recur-allday") !== "0",
336
462
  intervalN: num("data-dgmo-recur-interval-n"),
337
463
  intervalUnit: node.getAttribute("data-dgmo-recur-interval-unit") ?? void 0,
338
- anchorMs: num("data-dgmo-recur-anchor")
464
+ anchorMs: num("data-dgmo-recur-anchor"),
465
+ tz: node.getAttribute("data-dgmo-recur-tz") ?? void 0
339
466
  };
340
467
  }
341
- function sameLocalDay(a, b) {
342
- const x = new Date(a);
343
- const y = new Date(b);
344
- return x.getFullYear() === y.getFullYear() && x.getMonth() === y.getMonth() && x.getDate() === y.getDate();
345
- }
346
468
  function readFields(node) {
347
469
  const raw = node.getAttribute("data-dgmo-countdown-fields");
348
470
  if (!raw) return ["d", "h", "m", "s"];
@@ -355,13 +477,14 @@ function updateNode(node, now) {
355
477
  const fields = readFields(node);
356
478
  const onDay = node.getAttribute("data-dgmo-countdown-onday");
357
479
  const title = node.getAttribute("data-dgmo-countdown-title");
480
+ const tz = node.getAttribute("data-dgmo-countdown-tz");
358
481
  let resolvedMs;
359
482
  let expiredNow = false;
360
483
  if (rule) {
361
484
  resolvedMs = resolveNext(rule, now);
362
485
  } else {
363
486
  const target = node.getAttribute("data-dgmo-countdown");
364
- resolvedMs = target ? targetToMs(target) : null;
487
+ resolvedMs = target ? targetToMs2(target, tz) : null;
365
488
  if (resolvedMs !== null && resolvedMs - now <= 0) expiredNow = true;
366
489
  }
367
490
  if (resolvedMs === null) return;
@@ -370,7 +493,7 @@ function updateNode(node, now) {
370
493
  const custom = node.getAttribute("data-dgmo-countdown-expired");
371
494
  const hasTime = node.getAttribute("data-dgmo-countdown-hastime") === "1";
372
495
  const frozen = expiredNow && custom !== null;
373
- const clockFinale = hasTime && !frozen && dayDeltaLocal(now, resolvedMs) <= 0;
496
+ const clockFinale = hasTime && !frozen && dayDelta(now, resolvedMs, tz) <= 0;
374
497
  let text;
375
498
  if (frozen) {
376
499
  text = custom;
@@ -383,21 +506,21 @@ function updateNode(node, now) {
383
506
  text = remaining < 0 ? `${clock} ago` : clock;
384
507
  } else if (expiredNow) {
385
508
  if (units === "compound" || units === "human")
386
- text = `${formatCompound(resolvedMs, now)} ago`;
509
+ text = `${formatCompound(resolvedMs, now, 2, tz)} ago`;
387
510
  else {
388
511
  const elapsed = -remaining;
389
512
  text = elapsed <= 0 ? "Now!" : `${formatCount(elapsed, { units, round, fields })} ago`;
390
513
  }
391
- } else if (rule && sameLocalDay(resolvedMs, now)) {
514
+ } else if (rule && sameDay(resolvedMs, now, tz)) {
392
515
  text = onDay ?? "Today!";
393
516
  } else if (units === "human") {
394
- text = hasTime ? formatHuman(now, resolvedMs).big : formatHuman(dayStartLocal(now), dayStartLocal(resolvedMs)).big;
517
+ text = hasTime ? formatHuman(now, resolvedMs, tz).big : formatHuman(dayStart(now, tz), dayStart(resolvedMs, tz), tz).big;
395
518
  } else if (units === "compound") {
396
- text = formatCompound(now, resolvedMs);
519
+ text = formatCompound(now, resolvedMs, 2, tz);
397
520
  } else {
398
521
  text = formatCount(Math.max(0, remaining), { units, round, fields });
399
522
  }
400
- if (node.textContent !== text) node.textContent = text;
523
+ setClockText(node, text);
401
524
  node.setAttribute(
402
525
  "aria-label",
403
526
  title ? `${title}: ${text}` : expiredNow ? text : `${text} remaining`
@@ -407,7 +530,7 @@ function updateNode(node, now) {
407
530
  const footer = svg.querySelector("[data-dgmo-countdown-footer]");
408
531
  if (footer && !expiredNow) {
409
532
  const hasTime2 = node.getAttribute("data-dgmo-countdown-hastime") === "1";
410
- footer.textContent = formatFooter(resolvedMs, hasTime2);
533
+ footer.textContent = formatFooter(resolvedMs, hasTime2, tz);
411
534
  }
412
535
  const eyebrowEl = svg.querySelector("[data-dgmo-countdown-eyebrow]");
413
536
  if (eyebrowEl && sinceAttr) {
@@ -420,9 +543,12 @@ function updateNode(node, now) {
420
543
  const detail = svg.querySelector("[data-dgmo-countdown-detail]");
421
544
  if (detail && !expiredNow && !clockFinale) {
422
545
  if (units === "words") {
423
- detail.textContent = formatWordsDetail(Math.max(0, remaining));
546
+ setClockText(detail, formatWordsDetail(Math.max(0, remaining)));
424
547
  } else if (units === "human" && remaining > 0) {
425
- detail.textContent = hasTime ? formatCount(remaining, { units: "clock", round, fields }) : formatHuman(dayStartLocal(now), dayStartLocal(resolvedMs)).sub;
548
+ setClockText(
549
+ detail,
550
+ hasTime ? formatCount(remaining, { units: "clock", round, fields }) : formatHuman(dayStart(now, tz), dayStart(resolvedMs, tz), tz).sub
551
+ );
426
552
  }
427
553
  }
428
554
  if (clockFinale) updateGauges(svg, remaining);