@tabler/charts 0.1.0 → 0.3.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 (445) hide show
  1. package/README.md +92 -4
  2. package/dist/{annotations-Bp7HwtF5.d.ts → annotations-B02GR_KU.d.ts} +3 -8
  3. package/dist/{annotations-BszTTjf9.js → annotations-BQ8l-qHs.js} +6 -7
  4. package/dist/{annotations-BszTTjf9.js.map → annotations-BQ8l-qHs.js.map} +1 -1
  5. package/dist/{annotations-lyt0I3HU.d.cts → annotations-CHafaGd4.d.cts} +3 -8
  6. package/dist/{annotations-DpETO8dE.cjs → annotations-CpCWA29b.cjs} +6 -7
  7. package/dist/{annotations-DpETO8dE.cjs.map → annotations-CpCWA29b.cjs.map} +1 -1
  8. package/dist/annotations.cjs +3 -5
  9. package/dist/annotations.cjs.map +1 -1
  10. package/dist/annotations.d.cts +2 -1
  11. package/dist/annotations.d.ts +2 -1
  12. package/dist/annotations.js +3 -4
  13. package/dist/{arc-a1tRTEw7.js → arc-B3V5IR0w.js} +2 -3
  14. package/dist/{arc-a1tRTEw7.js.map → arc-B3V5IR0w.js.map} +1 -1
  15. package/dist/{arc-BXpLrt9b.cjs → arc-CYhI62kO.cjs} +2 -3
  16. package/dist/{arc-BXpLrt9b.cjs.map → arc-CYhI62kO.cjs.map} +1 -1
  17. package/dist/{area-CF__HOwL.d.ts → area-DEFQm_SQ.d.ts} +3 -6
  18. package/dist/{area-sHCE3pg5.cjs → area-DYdQ_sMV.cjs} +5 -6
  19. package/dist/{area-sHCE3pg5.cjs.map → area-DYdQ_sMV.cjs.map} +1 -1
  20. package/dist/{area-DQsLERhx.js → area-WdtfqvhX.js} +5 -6
  21. package/dist/{area-DQsLERhx.js.map → area-WdtfqvhX.js.map} +1 -1
  22. package/dist/{area-DIxaAbYZ.d.cts → area-h_FvieFb.d.cts} +3 -6
  23. package/dist/area.cjs +1 -1
  24. package/dist/area.d.cts +2 -1
  25. package/dist/area.d.ts +2 -1
  26. package/dist/area.js +1 -2
  27. package/dist/axis-MMaVoSWB.js +235 -0
  28. package/dist/axis-MMaVoSWB.js.map +1 -0
  29. package/dist/axis-YfAerNBA.cjs +300 -0
  30. package/dist/axis-YfAerNBA.cjs.map +1 -0
  31. package/dist/{band-DTcNDAFO.d.ts → band-CNKvdnTC.d.cts} +1 -4
  32. package/dist/{band-DTcNDAFO.d.cts → band-CNKvdnTC.d.ts} +1 -4
  33. package/dist/{bar-jZEoao74.js → bar-BOcRcArc.js} +80 -62
  34. package/dist/bar-BOcRcArc.js.map +1 -0
  35. package/dist/{bar-C-7zR2qp.cjs → bar-CVkOJ7WA.cjs} +82 -64
  36. package/dist/bar-CVkOJ7WA.cjs.map +1 -0
  37. package/dist/{bar-DM16NUvV.js → bar-CgpC2EpX.js} +3 -4
  38. package/dist/{bar-DM16NUvV.js.map → bar-CgpC2EpX.js.map} +1 -1
  39. package/dist/{bar-BBM8RhoL.d.ts → bar-D9B_arKf.d.ts} +4 -7
  40. package/dist/{bar-CRKLDg98.d.cts → bar-DZCQ-kyf.d.cts} +4 -7
  41. package/dist/{bar-DGuUN3nc.cjs → bar-wVykm1us.cjs} +3 -4
  42. package/dist/{bar-DGuUN3nc.cjs.map → bar-wVykm1us.cjs.map} +1 -1
  43. package/dist/bar.cjs +1 -1
  44. package/dist/bar.d.cts +2 -1
  45. package/dist/bar.d.ts +2 -1
  46. package/dist/bar.js +1 -2
  47. package/dist/calendar-BSvO8nRb.d.cts +106 -0
  48. package/dist/calendar-BXgIX5H1.js +502 -0
  49. package/dist/calendar-BXgIX5H1.js.map +1 -0
  50. package/dist/calendar-Bq3vFzPl.d.ts +106 -0
  51. package/dist/calendar-DAFXjV99.cjs +507 -0
  52. package/dist/calendar-DAFXjV99.cjs.map +1 -0
  53. package/dist/calendar.cjs +3 -0
  54. package/dist/calendar.d.cts +3 -0
  55. package/dist/calendar.d.ts +3 -0
  56. package/dist/calendar.js +1 -0
  57. package/dist/{candlestick-D_vV0_XZ.d.ts → candlestick-B3WcLzph.d.ts} +3 -6
  58. package/dist/{candlestick-__pXl_pV.d.cts → candlestick-BcomxeVG.d.cts} +3 -6
  59. package/dist/{candlestick-DuXwAFID.js → candlestick-BtT9glp9.js} +19 -18
  60. package/dist/{candlestick-DuXwAFID.js.map → candlestick-BtT9glp9.js.map} +1 -1
  61. package/dist/{candlestick-B5r1w3kc.cjs → candlestick-CSmRuZ4v.cjs} +19 -18
  62. package/dist/{candlestick-B5r1w3kc.cjs.map → candlestick-CSmRuZ4v.cjs.map} +1 -1
  63. package/dist/candlestick.cjs +4 -5
  64. package/dist/candlestick.d.cts +1 -1
  65. package/dist/candlestick.d.ts +1 -1
  66. package/dist/candlestick.js +4 -6
  67. package/dist/{cartesian-Cr0AF0nG.js → cartesian-BrPqb5Qn.js} +138 -264
  68. package/dist/cartesian-BrPqb5Qn.js.map +1 -0
  69. package/dist/{cartesian-BoDfgBCV.cjs → cartesian-DRSXHxWe.cjs} +162 -324
  70. package/dist/cartesian-DRSXHxWe.cjs.map +1 -0
  71. package/dist/{chart-BF2CK9I_.js → chart-B6TTY4Kr.js} +120 -77
  72. package/dist/chart-B6TTY4Kr.js.map +1 -0
  73. package/dist/{chart-DyN7bcx8.d.ts → chart-CYrrUCi3.d.ts} +222 -102
  74. package/dist/{chart-D7ooEFnk.d.cts → chart-CbPzP5Dp.d.cts} +248 -102
  75. package/dist/{chart-CowF_lWY.cjs → chart-D_lyOy-M.cjs} +132 -83
  76. package/dist/chart-D_lyOy-M.cjs.map +1 -0
  77. package/dist/{circle-BQMuAfls.cjs → circle-Bwxy5j7B.cjs} +2 -3
  78. package/dist/{circle-BQMuAfls.cjs.map → circle-Bwxy5j7B.cjs.map} +1 -1
  79. package/dist/{circle-Z7YfCoCM.js → circle-YRDaOBpk.js} +2 -3
  80. package/dist/{circle-Z7YfCoCM.js.map → circle-YRDaOBpk.js.map} +1 -1
  81. package/dist/{clean-o1vDEhFV.js → clean-CkoQobGv.js} +3 -4
  82. package/dist/{clean-o1vDEhFV.js.map → clean-CkoQobGv.js.map} +1 -1
  83. package/dist/{clean-Byl6kzf0.cjs → clean-Die2iCNc.cjs} +8 -3
  84. package/dist/{clean-Byl6kzf0.cjs.map → clean-Die2iCNc.cjs.map} +1 -1
  85. package/dist/{core-D1vO1LrC.d.cts → core-9BnLEW4K.d.cts} +31 -72
  86. package/dist/{core-DcbemzGf.d.ts → core-C3qEppSm.d.ts} +10 -46
  87. package/dist/{core-CegR_j55.js → core-CQ0FaJ4G.js} +138 -99
  88. package/dist/core-CQ0FaJ4G.js.map +1 -0
  89. package/dist/{core-RzS9IQO5.cjs → core-D2PSked3.cjs} +139 -100
  90. package/dist/core-D2PSked3.cjs.map +1 -0
  91. package/dist/core.cjs +47 -33
  92. package/dist/core.d.cts +26 -21
  93. package/dist/core.d.ts +26 -21
  94. package/dist/core.js +31 -25
  95. package/dist/{dates-CG-FvioW.js → dates-DLe2Ww64.js} +4 -5
  96. package/dist/{dates-CG-FvioW.js.map → dates-DLe2Ww64.js.map} +1 -1
  97. package/dist/{dates-Btm7Zm6W.cjs → dates-DerXTb1J.cjs} +4 -5
  98. package/dist/{dates-Btm7Zm6W.cjs.map → dates-DerXTb1J.cjs.map} +1 -1
  99. package/dist/{decimate-tLhDk1ys.cjs → decimate-BS3x8g-f.cjs} +2 -3
  100. package/dist/{decimate-tLhDk1ys.cjs.map → decimate-BS3x8g-f.cjs.map} +1 -1
  101. package/dist/{decimate-BGg9XgF0.d.ts → decimate-BxxYBJJk.d.cts} +2 -5
  102. package/dist/{decimate-C87cl_Sp.js → decimate-CapfgiDY.js} +2 -3
  103. package/dist/{decimate-C87cl_Sp.js.map → decimate-CapfgiDY.js.map} +1 -1
  104. package/dist/{decimate-CNSpgGa5.d.cts → decimate-Du87fMLG.d.ts} +2 -5
  105. package/dist/decimate.cjs +3 -4
  106. package/dist/decimate.d.cts +1 -1
  107. package/dist/decimate.d.ts +1 -1
  108. package/dist/decimate.js +3 -4
  109. package/dist/{dom-CLF868Qs.cjs → dom-C33zvtPo.cjs} +5 -11
  110. package/dist/dom-C33zvtPo.cjs.map +1 -0
  111. package/dist/{dom-vP3IcMak.js → dom-CTse6Rvd.js} +5 -11
  112. package/dist/dom-CTse6Rvd.js.map +1 -0
  113. package/dist/{export-chart-BhhYgksr.cjs → export-chart-CPtXmZvi.cjs} +18 -14
  114. package/dist/export-chart-CPtXmZvi.cjs.map +1 -0
  115. package/dist/{export-chart-9w8t3rjZ.js → export-chart-DoeiAyR2.js} +18 -14
  116. package/dist/export-chart-DoeiAyR2.js.map +1 -0
  117. package/dist/export.cjs +3 -5
  118. package/dist/export.cjs.map +1 -1
  119. package/dist/export.d.cts +8 -1
  120. package/dist/export.d.ts +8 -1
  121. package/dist/export.js +3 -4
  122. package/dist/{extent-BAMZo0Nq.js → extent-DOV8rs-6.js} +2 -3
  123. package/dist/{extent-BAMZo0Nq.js.map → extent-DOV8rs-6.js.map} +1 -1
  124. package/dist/{extent-DsFWvAHJ.cjs → extent-DuYDcvM9.cjs} +2 -3
  125. package/dist/{extent-DsFWvAHJ.cjs.map → extent-DuYDcvM9.cjs.map} +1 -1
  126. package/dist/{fade-D3NxH5Qg.js → fade-CDrQjnDz.js} +59 -83
  127. package/dist/fade-CDrQjnDz.js.map +1 -0
  128. package/dist/{fade-Cs74puQS.cjs → fade-CRqcKMWY.cjs} +59 -83
  129. package/dist/fade-CRqcKMWY.cjs.map +1 -0
  130. package/dist/{features-wASyHGic.js → features-B55rwpQC.js} +5 -4
  131. package/dist/features-B55rwpQC.js.map +1 -0
  132. package/dist/{features-BclHgg2W.cjs → features-DEDP5CEQ.cjs} +10 -3
  133. package/dist/features-DEDP5CEQ.cjs.map +1 -0
  134. package/dist/fit-BPyPRnsK.js +16 -0
  135. package/dist/fit-BPyPRnsK.js.map +1 -0
  136. package/dist/fit-D4MIIQQz.cjs +21 -0
  137. package/dist/fit-D4MIIQQz.cjs.map +1 -0
  138. package/dist/{format-B0yKXBTH.cjs → format-CAE5ruy6.cjs} +2 -3
  139. package/dist/{format-B0yKXBTH.cjs.map → format-CAE5ruy6.cjs.map} +1 -1
  140. package/dist/{format-lStwuc1L.js → format-it1kepFG.js} +2 -3
  141. package/dist/{format-lStwuc1L.js.map → format-it1kepFG.js.map} +1 -1
  142. package/dist/funnel-BdcfUkb5.d.ts +50 -0
  143. package/dist/funnel-CFEEulw_.cjs +244 -0
  144. package/dist/funnel-CFEEulw_.cjs.map +1 -0
  145. package/dist/funnel-CYCv8cq2.js +239 -0
  146. package/dist/funnel-CYCv8cq2.js.map +1 -0
  147. package/dist/funnel-CarOh8w_.d.cts +50 -0
  148. package/dist/funnel.cjs +3 -0
  149. package/dist/funnel.d.cts +3 -0
  150. package/dist/funnel.d.ts +3 -0
  151. package/dist/funnel.js +1 -0
  152. package/dist/{gauge-D-FYhuds.cjs → gauge-6HfDcLMJ.cjs} +35 -36
  153. package/dist/gauge-6HfDcLMJ.cjs.map +1 -0
  154. package/dist/{gauge-Dh423FHh.js → gauge-DiTk5aWO.js} +35 -36
  155. package/dist/gauge-DiTk5aWO.js.map +1 -0
  156. package/dist/{gauge-zpia05t2.d.ts → gauge-Ds9k1UV2.d.cts} +5 -8
  157. package/dist/{gauge-DP_EB2z3.d.cts → gauge-Zy25jfps.d.ts} +5 -8
  158. package/dist/gauge.cjs +1 -1
  159. package/dist/gauge.d.cts +2 -1
  160. package/dist/gauge.d.ts +2 -1
  161. package/dist/gauge.js +1 -2
  162. package/dist/{heatmap-DSZ2bVIa.js → heatmap-C1v8bwpq.js} +43 -43
  163. package/dist/heatmap-C1v8bwpq.js.map +1 -0
  164. package/dist/{heatmap-BectCEeE.d.ts → heatmap-CJ-0dfhJ.d.cts} +4 -7
  165. package/dist/{heatmap-BK18EBgJ.cjs → heatmap-Dcc_bsoQ.cjs} +47 -47
  166. package/dist/heatmap-Dcc_bsoQ.cjs.map +1 -0
  167. package/dist/{heatmap-CCso6m61.d.cts → heatmap-Jp5sHRTo.d.ts} +4 -7
  168. package/dist/heatmap.cjs +1 -1
  169. package/dist/heatmap.d.cts +2 -1
  170. package/dist/heatmap.d.ts +2 -1
  171. package/dist/heatmap.js +1 -2
  172. package/dist/{hydrate-DDNIHYv_.js → hydrate-BB3MlR36.js} +3 -4
  173. package/dist/{hydrate-DDNIHYv_.js.map → hydrate-BB3MlR36.js.map} +1 -1
  174. package/dist/{hydrate-CzfxLfTv.d.ts → hydrate-BtAZf_5K.d.cts} +2 -5
  175. package/dist/{hydrate-CTTmQy0x.d.cts → hydrate-OjM1pIUG.d.ts} +2 -5
  176. package/dist/{hydrate-CxwTXDqO.cjs → hydrate-m0I5m6ue.cjs} +3 -4
  177. package/dist/hydrate-m0I5m6ue.cjs.map +1 -0
  178. package/dist/hydrate.cjs +3 -4
  179. package/dist/hydrate.cjs.map +1 -1
  180. package/dist/hydrate.d.cts +1 -1
  181. package/dist/hydrate.d.ts +1 -1
  182. package/dist/hydrate.js +3 -4
  183. package/dist/index.cjs +72 -56
  184. package/dist/index.cjs.map +1 -1
  185. package/dist/index.d.cts +28 -28
  186. package/dist/index.d.ts +28 -28
  187. package/dist/index.js +52 -44
  188. package/dist/index.js.map +1 -1
  189. package/dist/interaction-DXYSjgnP.cjs +32 -0
  190. package/dist/interaction-DXYSjgnP.cjs.map +1 -0
  191. package/dist/interaction-En1KlwFO.js +21 -0
  192. package/dist/interaction-En1KlwFO.js.map +1 -0
  193. package/dist/{layout-CtMBhNd9.cjs → layout-Cfg9x1k2.cjs} +45 -3
  194. package/dist/layout-Cfg9x1k2.cjs.map +1 -0
  195. package/dist/{layout-B3hiqVEw.js → layout-DqAte3H8.js} +34 -4
  196. package/dist/layout-DqAte3H8.js.map +1 -0
  197. package/dist/{line-CN4uZ9ZX.d.ts → line-Bpr5uVLQ.d.ts} +4 -7
  198. package/dist/{line-B3Ed6u7j.js → line-CxR4tg1Q.js} +49 -38
  199. package/dist/line-CxR4tg1Q.js.map +1 -0
  200. package/dist/{line-fQbtP_jL.cjs → line-YiCuhVMI.cjs} +49 -38
  201. package/dist/line-YiCuhVMI.cjs.map +1 -0
  202. package/dist/{line-W7VD_qs1.d.cts → line-vyWO030v.d.cts} +4 -7
  203. package/dist/line.cjs +4 -5
  204. package/dist/line.cjs.map +1 -1
  205. package/dist/line.d.cts +1 -1
  206. package/dist/line.d.ts +1 -1
  207. package/dist/line.js +4 -6
  208. package/dist/{log-CaofN3-n.d.ts → log-CI41TmcU.d.cts} +1 -6
  209. package/dist/{log-CaofN3-n.d.cts → log-CI41TmcU.d.ts} +1 -6
  210. package/dist/{log-axis-83rSpvL5.cjs → log-axis-DdRNyAq8.cjs} +6 -8
  211. package/dist/{log-axis-83rSpvL5.cjs.map → log-axis-DdRNyAq8.cjs.map} +1 -1
  212. package/dist/{log-axis-B_uvvOFc.js → log-axis-DhthtHFk.js} +6 -8
  213. package/dist/{log-axis-B_uvvOFc.js.map → log-axis-DhthtHFk.js.map} +1 -1
  214. package/dist/log.cjs +3 -5
  215. package/dist/log.cjs.map +1 -1
  216. package/dist/log.d.cts +1 -1
  217. package/dist/log.d.ts +1 -1
  218. package/dist/log.js +3 -4
  219. package/dist/map-49FcfdmJ.d.cts +156 -0
  220. package/dist/map-BMC61J-P.d.ts +156 -0
  221. package/dist/map-BqrZ80vT.cjs +818 -0
  222. package/dist/map-BqrZ80vT.cjs.map +1 -0
  223. package/dist/map-C15NC7kW.js +807 -0
  224. package/dist/map-C15NC7kW.js.map +1 -0
  225. package/dist/map.cjs +4 -0
  226. package/dist/map.d.cts +3 -0
  227. package/dist/map.d.ts +3 -0
  228. package/dist/map.js +1 -0
  229. package/dist/maps/world.cjs +875 -0
  230. package/dist/maps/world.cjs.map +1 -0
  231. package/dist/maps/world.d.cts +2 -0
  232. package/dist/maps/world.d.ts +2 -0
  233. package/dist/maps/world.js +874 -0
  234. package/dist/maps/world.js.map +1 -0
  235. package/dist/{morph-CqYDu1bY.cjs → morph-3I1Nf_tR.cjs} +4 -5
  236. package/dist/morph-3I1Nf_tR.cjs.map +1 -0
  237. package/dist/{morph-BMxz3X2b.d.ts → morph-Dh7gJkV4.d.cts} +1 -4
  238. package/dist/{morph-BMxz3X2b.d.cts → morph-Dh7gJkV4.d.ts} +1 -4
  239. package/dist/{morph-Bgg-24l8.js → morph-GfBab-b3.js} +4 -5
  240. package/dist/{morph-Bgg-24l8.js.map → morph-GfBab-b3.js.map} +1 -1
  241. package/dist/morph.cjs +3 -4
  242. package/dist/morph.cjs.map +1 -1
  243. package/dist/morph.d.cts +1 -1
  244. package/dist/morph.d.ts +1 -1
  245. package/dist/morph.js +3 -4
  246. package/dist/{named-BWWb5LQJ.cjs → named-BBASc8dW.cjs} +2 -3
  247. package/dist/{named-BWWb5LQJ.cjs.map → named-BBASc8dW.cjs.map} +1 -1
  248. package/dist/{named-DE15TOgh.js → named-BOiBah6I.js} +2 -3
  249. package/dist/{named-DE15TOgh.js.map → named-BOiBah6I.js.map} +1 -1
  250. package/dist/others-DBIGE6jr.js +57 -0
  251. package/dist/others-DBIGE6jr.js.map +1 -0
  252. package/dist/others-DBO4Kjwl.d.ts +29 -0
  253. package/dist/others-WfjCsjqT.cjs +68 -0
  254. package/dist/others-WfjCsjqT.cjs.map +1 -0
  255. package/dist/others-ls5eKtZ4.d.cts +31 -0
  256. package/dist/{parliament-Dw0sOERi.js → parliament-BKN6ikBJ.js} +36 -36
  257. package/dist/parliament-BKN6ikBJ.js.map +1 -0
  258. package/dist/{parliament-1Zv2Xh0D.d.ts → parliament-C7V8UJj1.d.cts} +5 -8
  259. package/dist/{parliament-DdrLVZwt.d.cts → parliament-Cz9n_DoK.d.ts} +5 -8
  260. package/dist/{parliament-CpWnoEvG.cjs → parliament-DhxAaIZ3.cjs} +36 -36
  261. package/dist/parliament-DhxAaIZ3.cjs.map +1 -0
  262. package/dist/parliament.cjs +1 -1
  263. package/dist/parliament.d.cts +2 -1
  264. package/dist/parliament.d.ts +2 -1
  265. package/dist/parliament.js +1 -2
  266. package/dist/{path-CwB28da0.d.ts → path-YeUiOfG8.d.cts} +1 -4
  267. package/dist/{path-CwB28da0.d.cts → path-YeUiOfG8.d.ts} +1 -4
  268. package/dist/{patterns-DtgcnA8o.js → patterns-BMUINoka.js} +4 -5
  269. package/dist/{patterns-DtgcnA8o.js.map → patterns-BMUINoka.js.map} +1 -1
  270. package/dist/{patterns-LfcQAWCy.cjs → patterns-Dw7OMD_2.cjs} +4 -5
  271. package/dist/{patterns-LfcQAWCy.cjs.map → patterns-Dw7OMD_2.cjs.map} +1 -1
  272. package/dist/patterns.cjs +3 -5
  273. package/dist/patterns.cjs.map +1 -1
  274. package/dist/patterns.d.cts +5 -1
  275. package/dist/patterns.d.ts +5 -1
  276. package/dist/patterns.js +3 -4
  277. package/dist/percentage-bar-BChkTRoz.cjs +164 -0
  278. package/dist/percentage-bar-BChkTRoz.cjs.map +1 -0
  279. package/dist/percentage-bar-CaInxrL8.js +159 -0
  280. package/dist/percentage-bar-CaInxrL8.js.map +1 -0
  281. package/dist/percentage-bar-R1--2grK.d.cts +58 -0
  282. package/dist/percentage-bar-cSeiLdwU.d.ts +58 -0
  283. package/dist/percentage-bar.cjs +3 -0
  284. package/dist/percentage-bar.d.cts +3 -0
  285. package/dist/percentage-bar.d.ts +3 -0
  286. package/dist/percentage-bar.js +1 -0
  287. package/dist/{pie-BF9yI5mE.d.cts → pie-BQQkvy1N.d.ts} +11 -11
  288. package/dist/{pie-DzUXDTcn.js → pie-Bd8wyrtY.js} +52 -55
  289. package/dist/pie-Bd8wyrtY.js.map +1 -0
  290. package/dist/{pie-BxTZt6Go.cjs → pie-BseZlCgP.cjs} +52 -55
  291. package/dist/pie-BseZlCgP.cjs.map +1 -0
  292. package/dist/{pie-5z1fDdKO.d.ts → pie-vD5-g8je.d.cts} +11 -11
  293. package/dist/pie.cjs +1 -1
  294. package/dist/pie.d.cts +2 -1
  295. package/dist/pie.d.ts +2 -1
  296. package/dist/pie.js +1 -2
  297. package/dist/{point-shapes-CGl4dugc.cjs → point-shapes-BRawRM78.cjs} +24 -24
  298. package/dist/point-shapes-BRawRM78.cjs.map +1 -0
  299. package/dist/{point-shapes-DI84NNpI.js → point-shapes-DI6GhcI7.js} +19 -25
  300. package/dist/point-shapes-DI6GhcI7.js.map +1 -0
  301. package/dist/point-shapes.cjs +7 -6
  302. package/dist/point-shapes.cjs.map +1 -1
  303. package/dist/point-shapes.d.cts +6 -2
  304. package/dist/point-shapes.d.ts +6 -2
  305. package/dist/point-shapes.js +8 -7
  306. package/dist/point-shapes.js.map +1 -1
  307. package/dist/{radar-1-EryihA.d.ts → radar-7I6hsY_h.d.cts} +4 -7
  308. package/dist/{radar-CYPab_I4.js → radar-D6XqkFWQ.js} +25 -27
  309. package/dist/radar-D6XqkFWQ.js.map +1 -0
  310. package/dist/{radar-CoGUNNSb.cjs → radar-DjISDnSf.cjs} +26 -28
  311. package/dist/radar-DjISDnSf.cjs.map +1 -0
  312. package/dist/{radar-DBW4O0Vt.d.cts → radar-vLxilcr4.d.ts} +4 -7
  313. package/dist/radar.cjs +1 -1
  314. package/dist/radar.d.cts +2 -1
  315. package/dist/radar.d.ts +2 -1
  316. package/dist/radar.js +1 -2
  317. package/dist/rect-CZTNvMlf.js +11 -0
  318. package/dist/rect-CZTNvMlf.js.map +1 -0
  319. package/dist/rect-DPr9QRxl.cjs +16 -0
  320. package/dist/rect-DPr9QRxl.cjs.map +1 -0
  321. package/dist/{sankey-Bacx4fVe.cjs → sankey-0CSp_Er9.cjs} +100 -95
  322. package/dist/sankey-0CSp_Er9.cjs.map +1 -0
  323. package/dist/{sankey-OV_WoPrl.d.ts → sankey-7As41Fo4.d.ts} +4 -7
  324. package/dist/{sankey-B4PNKusJ.js → sankey-Dp4CuLVe.js} +100 -95
  325. package/dist/sankey-Dp4CuLVe.js.map +1 -0
  326. package/dist/{sankey-DuGI3Qc5.d.cts → sankey-DqiuxUx7.d.cts} +4 -7
  327. package/dist/sankey.cjs +1 -1
  328. package/dist/sankey.d.cts +2 -1
  329. package/dist/sankey.d.ts +2 -1
  330. package/dist/sankey.js +1 -2
  331. package/dist/{scatter-DbxLyZX0.d.cts → scatter-BXkXGgM_.d.ts} +14 -9
  332. package/dist/{scatter-DgMN9zRy.cjs → scatter-Bwkblr4L.cjs} +47 -42
  333. package/dist/scatter-Bwkblr4L.cjs.map +1 -0
  334. package/dist/{scatter-kgtgR318.js → scatter-DCMAtt5L.js} +45 -40
  335. package/dist/scatter-DCMAtt5L.js.map +1 -0
  336. package/dist/{scatter-BqzgJqdX.d.ts → scatter-DL0zAV09.d.cts} +14 -9
  337. package/dist/scatter.cjs +1 -1
  338. package/dist/scatter.d.cts +2 -1
  339. package/dist/scatter.d.ts +2 -1
  340. package/dist/scatter.js +1 -2
  341. package/dist/{sparkline-BfyO_oNM.d.ts → sparkline-BElUSd0r.d.ts} +5 -8
  342. package/dist/{sparkline-BS9-hltA.cjs → sparkline-BMSuEPHP.cjs} +22 -23
  343. package/dist/sparkline-BMSuEPHP.cjs.map +1 -0
  344. package/dist/{sparkline-BQzt27Fr.js → sparkline-NDmq90kP.js} +22 -23
  345. package/dist/sparkline-NDmq90kP.js.map +1 -0
  346. package/dist/{sparkline-CWlJDKyh.d.cts → sparkline-RYly7bR0.d.cts} +5 -8
  347. package/dist/sparkline.cjs +1 -1
  348. package/dist/sparkline.d.cts +2 -1
  349. package/dist/sparkline.d.ts +2 -1
  350. package/dist/sparkline.js +1 -2
  351. package/dist/{stack-DVhJWaki.cjs → stack-BO4624CY.cjs} +3 -4
  352. package/dist/{stack-DVhJWaki.cjs.map → stack-BO4624CY.cjs.map} +1 -1
  353. package/dist/{stack-CpR6RGKd.d.ts → stack-BTWYIwLO.d.cts} +2 -4
  354. package/dist/{stack-CpR6RGKd.d.cts → stack-DR0eQTsB.d.ts} +1 -4
  355. package/dist/{stack-DRbwTeF3.js → stack-jVKvg2x_.js} +3 -4
  356. package/dist/{stack-DRbwTeF3.js.map → stack-jVKvg2x_.js.map} +1 -1
  357. package/dist/style.css +1 -1
  358. package/dist/{sweep-CbfR7--d.js → sweep-BpRPlhs6.js} +5 -6
  359. package/dist/{sweep-CbfR7--d.js.map → sweep-BpRPlhs6.js.map} +1 -1
  360. package/dist/{sweep-DaTEDDuC.cjs → sweep-Dnp6LDBz.cjs} +5 -6
  361. package/dist/sweep-Dnp6LDBz.cjs.map +1 -0
  362. package/dist/{time-CNVnt-B2.d.cts → time-B4oxWHQI.d.cts} +2 -7
  363. package/dist/{time-CHjiY9Q4.d.ts → time-DRIDgv2a.d.ts} +2 -7
  364. package/dist/{time-axis-VSX34_Tb.cjs → time-axis-B3VekUfX.cjs} +11 -11
  365. package/dist/{time-axis-VSX34_Tb.cjs.map → time-axis-B3VekUfX.cjs.map} +1 -1
  366. package/dist/{time-axis-Bc9eHX1r.js → time-axis-CLjqOakA.js} +10 -10
  367. package/dist/{time-axis-Bc9eHX1r.js.map → time-axis-CLjqOakA.js.map} +1 -1
  368. package/dist/time.cjs +4 -6
  369. package/dist/time.cjs.map +1 -1
  370. package/dist/time.d.cts +1 -1
  371. package/dist/time.d.ts +1 -1
  372. package/dist/time.js +4 -5
  373. package/dist/treemap-25vHO_UK.d.cts +65 -0
  374. package/dist/treemap-BCXUbixd.d.ts +65 -0
  375. package/dist/treemap-C4glsx-g.js +293 -0
  376. package/dist/treemap-C4glsx-g.js.map +1 -0
  377. package/dist/treemap-CZk8kKFD.cjs +298 -0
  378. package/dist/treemap-CZk8kKFD.cjs.map +1 -0
  379. package/dist/treemap.cjs +3 -0
  380. package/dist/treemap.d.cts +3 -0
  381. package/dist/treemap.d.ts +3 -0
  382. package/dist/treemap.js +1 -0
  383. package/dist/{tween-BCYd0RTY.js → tween-BdQqUmmv.js} +2 -3
  384. package/dist/{tween-BCYd0RTY.js.map → tween-BdQqUmmv.js.map} +1 -1
  385. package/dist/{tween-CIGBlryn.cjs → tween-c3aOmfKE.cjs} +2 -3
  386. package/dist/{tween-CIGBlryn.cjs.map → tween-c3aOmfKE.cjs.map} +1 -1
  387. package/dist/{value-labels-IZIQPhfk.js → value-labels-C7GrhOXJ.js} +30 -10
  388. package/dist/value-labels-C7GrhOXJ.js.map +1 -0
  389. package/dist/{value-labels-B0WJoJ7x.cjs → value-labels-DzaKIWKp.cjs} +30 -10
  390. package/dist/value-labels-DzaKIWKp.cjs.map +1 -0
  391. package/dist/value-labels.cjs +3 -5
  392. package/dist/value-labels.cjs.map +1 -1
  393. package/dist/value-labels.d.cts +5 -1
  394. package/dist/value-labels.d.ts +5 -1
  395. package/dist/value-labels.js +3 -4
  396. package/dist/{vnode-CkQ27Cxe.cjs → vnode-ClAiw28x.cjs} +2 -3
  397. package/dist/{vnode-CkQ27Cxe.cjs.map → vnode-ClAiw28x.cjs.map} +1 -1
  398. package/dist/{vnode-BUflsBsa.d.ts → vnode-Du2cC8Fm.d.cts} +1 -4
  399. package/dist/{vnode-BUflsBsa.d.cts → vnode-Du2cC8Fm.d.ts} +1 -4
  400. package/dist/{vnode-tCWItoUH.js → vnode-_EMUqysL.js} +2 -3
  401. package/dist/{vnode-tCWItoUH.js.map → vnode-_EMUqysL.js.map} +1 -1
  402. package/package.json +94 -214
  403. package/dist/bar-C-7zR2qp.cjs.map +0 -1
  404. package/dist/bar-jZEoao74.js.map +0 -1
  405. package/dist/cartesian-BoDfgBCV.cjs.map +0 -1
  406. package/dist/cartesian-Cr0AF0nG.js.map +0 -1
  407. package/dist/chart-BF2CK9I_.js.map +0 -1
  408. package/dist/chart-CowF_lWY.cjs.map +0 -1
  409. package/dist/core-CegR_j55.js.map +0 -1
  410. package/dist/core-RzS9IQO5.cjs.map +0 -1
  411. package/dist/dom-CLF868Qs.cjs.map +0 -1
  412. package/dist/dom-vP3IcMak.js.map +0 -1
  413. package/dist/export-chart-9w8t3rjZ.js.map +0 -1
  414. package/dist/export-chart-BhhYgksr.cjs.map +0 -1
  415. package/dist/fade-Cs74puQS.cjs.map +0 -1
  416. package/dist/fade-D3NxH5Qg.js.map +0 -1
  417. package/dist/features-BclHgg2W.cjs.map +0 -1
  418. package/dist/features-wASyHGic.js.map +0 -1
  419. package/dist/gauge-D-FYhuds.cjs.map +0 -1
  420. package/dist/gauge-Dh423FHh.js.map +0 -1
  421. package/dist/heatmap-BK18EBgJ.cjs.map +0 -1
  422. package/dist/heatmap-DSZ2bVIa.js.map +0 -1
  423. package/dist/hydrate-CxwTXDqO.cjs.map +0 -1
  424. package/dist/layout-B3hiqVEw.js.map +0 -1
  425. package/dist/layout-CtMBhNd9.cjs.map +0 -1
  426. package/dist/line-B3Ed6u7j.js.map +0 -1
  427. package/dist/line-fQbtP_jL.cjs.map +0 -1
  428. package/dist/morph-CqYDu1bY.cjs.map +0 -1
  429. package/dist/parliament-CpWnoEvG.cjs.map +0 -1
  430. package/dist/parliament-Dw0sOERi.js.map +0 -1
  431. package/dist/pie-BxTZt6Go.cjs.map +0 -1
  432. package/dist/pie-DzUXDTcn.js.map +0 -1
  433. package/dist/point-shapes-CGl4dugc.cjs.map +0 -1
  434. package/dist/point-shapes-DI84NNpI.js.map +0 -1
  435. package/dist/radar-CYPab_I4.js.map +0 -1
  436. package/dist/radar-CoGUNNSb.cjs.map +0 -1
  437. package/dist/sankey-B4PNKusJ.js.map +0 -1
  438. package/dist/sankey-Bacx4fVe.cjs.map +0 -1
  439. package/dist/scatter-DgMN9zRy.cjs.map +0 -1
  440. package/dist/scatter-kgtgR318.js.map +0 -1
  441. package/dist/sparkline-BQzt27Fr.js.map +0 -1
  442. package/dist/sparkline-BS9-hltA.cjs.map +0 -1
  443. package/dist/sweep-DaTEDDuC.cjs.map +0 -1
  444. package/dist/value-labels-B0WJoJ7x.cjs.map +0 -1
  445. package/dist/value-labels-IZIQPhfk.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treemap-CZk8kKFD.cjs","names":["keyOf","innerRect","insets","formatNumber","getNumberFormat","rectPath","h","groupAttrs","round","fit","estimateTextWidth","list","isRecord","named","finite","cleanData","legendItems"],"sources":["../src/charts/treemap.ts"],"sourcesContent":["import type { DataTable } from '../a11y.ts'\nimport type { ChartType, RenderContext, RenderResult, TableContext } from '../chart.ts'\nimport { formatNumber, getNumberFormat, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { estimateTextWidth, type InsetsInput, innerRect, insets, round } from '../layout.ts'\nimport { rectPath } from '../shapes/rect.ts'\nimport { type ClassValue, h } from '../vnode.ts'\nimport { cleanData, finite, isRecord, list, named } from './clean.ts'\nimport { fit } from './fit.ts'\nimport { groupAttrs, keyOf, legendItems } from './named.ts'\n\n/** A tile of a treemap, or a group of them. */\nexport interface TreemapNode {\n name: string\n /** Size of the tile; a negative value is zero. A group is as large as its `children`. */\n value?: number\n /** Tiles (or groups) inside this one; they share its color. */\n children?: readonly TreemapNode[]\n /** Stable identity for keyed updates and legend toggles. Defaults to `name`. */\n id?: string\n /**\n * Custom color; overrides the palette slot via `--tc-series-color`.\n * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.\n */\n color?: string\n /** Extra classes on the group (top level) or the tile. */\n class?: ClassValue\n /** Start hidden (top level; toggle it back from the legend). */\n hidden?: boolean\n}\n\nexport interface TreemapOptions {\n /** Tiles, or groups of tiles; each top-level entry takes a palette color and a legend entry. */\n data: readonly TreemapNode[]\n /** Space between tiles in pixels. Defaults to `2`. */\n gap?: number\n /** Corner radius of the tiles. Defaults to `3`. */\n radius?: number\n /** Names (and values, where they fit) written in the tiles. Defaults to `true`. */\n labels?: boolean\n /** Format of the values (tiles, tooltip, table). */\n format?: NumberFormat\n /** Extra space around the chart, in pixels. */\n padding?: InsetsInput\n}\n\n/** Levels of nesting read from the data, and the most nodes: enough for any chart, few enough to draw. */\nconst MAX_DEPTH = 8\nconst MAX_NODES = 5000\n\n/** Space between a tile's edge and its text. */\nconst INSET = 6\n\n/** A node with its size worked out. */\nexport interface Sized {\n node: TreemapNode\n value: number\n children?: Sized[]\n}\n\ninterface Tile {\n node: TreemapNode\n key: string\n /** Position of the top-level ancestor in `data` (the color slot). */\n top: number\n /** Names of the ancestors, outermost first. */\n trail: readonly string[]\n value: number\n x: number\n y: number\n width: number\n height: number\n}\n\nfunction sized(nodes: readonly TreemapNode[]): Sized[] {\n return nodes.map((node) => {\n if (node.children?.length) {\n const children = sized(node.children)\n return { node, children, value: children.reduce((sum, child) => sum + child.value, 0) }\n }\n return { node, value: Math.max(0, node.value ?? 0) }\n })\n}\n\n/** The chart model of a treemap: its options, with every node's size worked out. */\nexport type TreemapModel = TreemapOptions & { sized: Sized[] }\n\n/** The top-level entries with their sizes and color slots, without the hidden ones. */\nfunction visible(model: TreemapModel, hidden: ReadonlySet<string>) {\n return model.sized\n .map((entry, index) => ({ entry, index }))\n .filter(({ entry }) => !hidden.has(keyOf(entry.node)))\n}\n\n/**\n * Squarified layout (Bruls, Huizing, van Wijk): `items`, largest first, fill\n * the rectangle in rows along its shorter side, each row closed as soon as\n * another item would make its tiles less square.\n */\nfunction squarify(\n items: readonly Sized[],\n x: number,\n y: number,\n w: number,\n hgt: number,\n place: (item: Sized, x: number, y: number, w: number, hgt: number) => void,\n): void {\n const sorted = items.filter((item) => item.value > 0).sort((a, b) => b.value - a.value)\n let left = sorted.reduce((sum, item) => sum + item.value, 0)\n let i = 0\n while (i < sorted.length && w > 0 && hgt > 0) {\n const short = Math.min(w, hgt)\n // Pixels of area per unit of value in what is left of the rectangle.\n const k = (w * hgt) / left\n const largest = (sorted[i] as Sized).value\n let sum = 0\n let best = Number.POSITIVE_INFINITY\n let j = i\n for (; j < sorted.length; j++) {\n const next = sum + (sorted[j] as Sized).value\n // Thickness of the row squared: its worst tile is the largest or the smallest.\n const t2 = ((next * k) / short) ** 2\n const worst = Math.max(t2 / ((sorted[j] as Sized).value * k), (largest * k) / t2)\n if (worst > best) break\n best = worst\n sum = next\n }\n const thickness = (sum * k) / short\n let offset = 0\n for (; i < j; i++) {\n const item = sorted[i] as Sized\n const length = (item.value * k) / thickness\n if (w >= hgt) place(item, x, y + offset, thickness, length)\n else place(item, x + offset, y, length, thickness)\n offset += length\n }\n if (w >= hgt) {\n x += thickness\n w -= thickness\n } else {\n y += thickness\n hgt -= thickness\n }\n left -= sum\n }\n}\n\n/** Half gaps left around a tile on its left, top, right and bottom side. */\ntype Edges = readonly [number, number, number, number]\n\n/**\n * The tiles of `items` in a rectangle, groups laid out inside their own.\n * The gap is cut from the tiles after they are placed, so it does not change\n * their arrangement: half of it on every side (a whole one between any two\n * neighbors), none at the edge of the chart. `edges` are the half gaps of\n * the rectangle itself.\n */\nfunction layout(\n items: readonly Sized[],\n x: number,\n y: number,\n w: number,\n hgt: number,\n gap: number,\n out: Tile[],\n edges: Edges,\n top?: { index: number; key: string; trail: readonly string[] },\n slots?: readonly number[],\n): void {\n squarify(items, x, y, w, hgt, (item, tx, ty, tw, th) => {\n const index = top?.index ?? (slots?.[items.indexOf(item)] as number)\n const key = top ? `${top.key}/${keyOf(item.node)}` : keyOf(item.node)\n const trail = top?.trail ?? []\n // A side on the border of the rectangle takes its half gap (none at the chart's edge), the others one.\n const near = 0.01\n const sides: Edges = [\n tx - x < near ? edges[0] : 1,\n ty - y < near ? edges[1] : 1,\n x + w - tx - tw < near ? edges[2] : 1,\n y + hgt - ty - th < near ? edges[3] : 1,\n ]\n if (item.children) {\n layout(item.children, tx, ty, tw, th, gap, out, sides, {\n index,\n key,\n trail: [...trail, item.node.name],\n })\n } else {\n const half = gap / 2\n out.push({\n node: item.node,\n key,\n top: index,\n trail,\n value: item.value,\n x: tx + sides[0] * half,\n y: ty + sides[1] * half,\n width: Math.max(0, tw - (sides[0] + sides[2]) * half),\n height: Math.max(0, th - (sides[1] + sides[3]) * half),\n })\n }\n })\n}\n\nfunction renderTreemap(options: TreemapModel, ctx: RenderContext): RenderResult {\n const { width, height, fontSize, locale } = ctx\n const gap = Math.max(0, options.gap ?? 2)\n const radius = Math.max(0, options.radius ?? 3)\n const area = innerRect(width, height, insets(options.padding, 0))\n const entries = visible(options, ctx.hidden)\n const total = entries.reduce((sum, { entry }) => sum + entry.value, 0)\n\n const tiles: Tile[] = []\n layout(\n entries.map(({ entry }) => entry),\n area.x,\n area.y,\n area.width,\n area.height,\n gap,\n tiles,\n [0, 0, 0, 0],\n undefined,\n entries.map(({ index }) => index),\n )\n\n const value = formatNumber(options.format, locale)\n const share = getNumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 })\n const hitFor = (tile: Tile, index: number): Hit => {\n const x = tile.x + tile.width / 2\n const item: HitItem = {\n name: tile.node.name,\n seriesIndex: tile.top,\n value: tile.value,\n text: `${value(tile.value)} (${share.format(total > 0 ? tile.value / total : 0)})`,\n x,\n y: tile.y + tile.height / 2,\n }\n const color = tile.node.color ?? options.data[tile.top]?.color\n if (color) item.color = color\n return {\n index,\n label: [...tile.trail, tile.node.name].join(' › '),\n title: tile.trail.join(' › '),\n x,\n area,\n items: [item],\n seriesIndex: tile.top,\n // A ring just inside the hovered tile.\n highlight: {\n kind: 'halo',\n d: rectPath(tile.x + 1, tile.y + 1, tile.width - 2, tile.height - 2, radius - 1),\n },\n }\n }\n\n const interaction: Interaction = {\n count: tiles.length,\n hitIndex: (index) => {\n const tile = tiles[index]\n return tile ? hitFor(tile, index) : null\n },\n hitTest(px, py) {\n const index = tiles.findIndex(\n (tile) =>\n px >= tile.x - gap / 2 &&\n px <= tile.x + tile.width + gap / 2 &&\n py >= tile.y - gap / 2 &&\n py <= tile.y + tile.height + gap / 2,\n )\n return index < 0 ? null : hitFor(tiles[index] as Tile, index)\n },\n }\n\n const groups = entries.map(({ entry, index }) =>\n h(\n 'g',\n groupAttrs(entry.node, index),\n tiles\n .filter((tile) => tile.top === index)\n .map((tile) =>\n h('rect', {\n key: tile.key,\n class: ['tc-tile', tile.trail.length > 0 && tile.node.class],\n x: round(tile.x),\n y: round(tile.y),\n width: round(tile.width),\n height: round(tile.height),\n rx: round(Math.min(radius, tile.width / 2, tile.height / 2)),\n // A tile inside a group may have a color of its own.\n style: tile.trail.length > 0 ? { '--tc-series-color': tile.node.color } : undefined,\n }),\n ),\n ),\n )\n\n // Names where a few letters fit, values below where there is a second line.\n const line = fontSize * 1.3\n const labels =\n options.labels !== false &&\n tiles.flatMap((tile) => {\n const room = tile.width - INSET * 2\n const name = tile.height >= line + INSET ? fit(tile.node.name, room, fontSize) : ''\n if (!name) return []\n const text = value(tile.value)\n const x = round(tile.x + INSET)\n const y = tile.y + INSET + fontSize * 0.85\n return [\n h('text', { key: tile.key, class: 'tc-treemap-label', x, y: round(y) }, name),\n tile.height >= line * 2 + INSET * 1.5 &&\n estimateTextWidth(text, fontSize) <= room &&\n h(\n 'text',\n {\n key: `${tile.key}/value`,\n class: 'tc-treemap-label tc-treemap-value',\n x,\n y: round(y + line),\n },\n text,\n ),\n ]\n })\n\n const content = [\n h('g', { class: 'tc-treemap-tiles' }, groups),\n labels && h('g', { class: 'tc-treemap-labels', 'aria-hidden': 'true' }, labels),\n ]\n return { content, interaction }\n}\n\nfunction treemapTable(options: TreemapModel, ctx: TableContext, limit: number): DataTable {\n const entries = visible(options, ctx.hidden)\n const total = entries.reduce((sum, { entry }) => sum + entry.value, 0)\n const value = formatNumber(options.format, ctx.locale)\n const share = getNumberFormat(ctx.locale, { style: 'percent', maximumFractionDigits: 1 })\n const rows: string[][] = []\n const walk = (items: readonly Sized[], trail: readonly string[]) => {\n for (const item of items) {\n const path = [...trail, item.node.name]\n if (item.children) walk(item.children, path)\n else {\n rows.push([\n path.join(' › '),\n value(item.value),\n share.format(total > 0 ? item.value / total : 0),\n ])\n }\n }\n }\n walk(\n entries.map(({ entry }) => entry),\n [],\n )\n const table: DataTable = { columns: ['', 'Value', 'Share'], rows }\n if (rows.length > limit) {\n table.rows = rows.slice(0, limit)\n table.total = rows.length\n }\n return table\n}\n\n/** Nodes with text for names and finite values, at most `MAX_DEPTH` deep and `MAX_NODES` in all. */\nfunction cleanNodes(data: unknown, depth = 0, budget = { left: MAX_NODES }): TreemapNode[] {\n const nodes: TreemapNode[] = []\n for (const r of list(data)) {\n if (!isRecord(r) || budget.left <= 0) continue\n budget.left--\n const children =\n depth < MAX_DEPTH && Array.isArray(r.children)\n ? cleanNodes(r.children, depth + 1, budget)\n : undefined\n nodes.push({ ...named(r), value: finite(r.value) ?? 0, children } as unknown as TreemapNode)\n }\n return nodes\n}\n\n/**\n * Treemap: parts of a whole as tiles, each as large as its value, laid out\n * as close to squares as they go with the largest in the top left corner.\n * Entries with `children` are groups: their tiles stay together and share\n * the group's color.\n *\n * ```ts\n * new Chart('#el', {\n * type: treemap,\n * data: [\n * { name: 'Search', value: 42 },\n * { name: 'Social', children: [{ name: 'Video', value: 18 }, { name: 'Posts', value: 9 }] },\n * ],\n * })\n * ```\n */\nexport const treemap: ChartType<TreemapOptions, TreemapModel> = {\n name: 'treemap',\n clean: cleanData((data) => cleanNodes(data)),\n prepare: (options) => ({ ...options, sized: sized(options.data) }),\n render: renderTreemap,\n legend: (options) => legendItems(options.data),\n table: treemapTable,\n}\n"],"mappings":";;;;;;;;;AA+CA,MAAM,YAAY;AAClB,MAAM,YAAY;;AAGlB,MAAM,QAAQ;AAuBd,SAAS,MAAM,OAAwC;CACrD,OAAO,MAAM,KAAK,SAAS;EACzB,IAAI,KAAK,UAAU,QAAQ;GACzB,MAAM,WAAW,MAAM,KAAK,QAAQ;GACpC,OAAO;IAAE;IAAM;IAAU,OAAO,SAAS,QAAQ,KAAK,UAAU,MAAM,MAAM,OAAO,CAAC;GAAE;EACxF;EACA,OAAO;GAAE;GAAM,OAAO,KAAK,IAAI,GAAG,KAAK,SAAS,CAAC;EAAE;CACrD,CAAC;AACH;;AAMA,SAAS,QAAQ,OAAqB,QAA6B;CACjE,OAAO,MAAM,MACV,KAAK,OAAO,WAAW;EAAE;EAAO;CAAM,EAAE,CAAC,CACzC,QAAQ,EAAE,YAAY,CAAC,OAAO,IAAIA,cAAAA,MAAM,MAAM,IAAI,CAAC,CAAC;AACzD;;;;;;AAOA,SAAS,SACP,OACA,GACA,GACA,GACA,KACA,OACM;CACN,MAAM,SAAS,MAAM,QAAQ,SAAS,KAAK,QAAQ,CAAC,CA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EAAE,SAAS;GAAC;GAAI;GAAS;EAAO;EAAG;CAAK;CACjE,IAAI,KAAK,SAAS,OAAO;EACvB,MAAM,OAAO,KAAK,MAAM,GAAG,KAAK;EAChC,MAAM,QAAQ,KAAK;CACrB;CACA,OAAO;AACT;;AAGA,SAAS,WAAW,MAAe,QAAQ,GAAG,SAAS,EAAE,MAAM,UAAU,GAAkB;CACzF,MAAM,QAAuB,CAAC;CAC9B,KAAK,MAAM,KAAKO,cAAAA,KAAK,IAAI,GAAG;EAC1B,IAAI,CAACC,cAAAA,SAAS,CAAC,KAAK,OAAO,QAAQ,GAAG;EACtC,OAAO;EACP,MAAM,WACJ,QAAQ,aAAa,MAAM,QAAQ,EAAE,QAAQ,IACzC,WAAW,EAAE,UAAU,QAAQ,GAAG,MAAM,IACxC,KAAA;EACN,MAAM,KAAK;GAAE,GAAGC,cAAAA,MAAM,CAAC;GAAG,OAAOC,cAAAA,OAAO,EAAE,KAAK,KAAK;GAAG;EAAS,CAA2B;CAC7F;CACA,OAAO;AACT;;;;;;;;;;;;;;;;;AAkBA,MAAa,UAAmD;CAC9D,MAAM;CACN,OAAOC,cAAAA,WAAW,SAAS,WAAW,IAAI,CAAC;CAC3C,UAAU,aAAa;EAAE,GAAG;EAAS,OAAO,MAAM,QAAQ,IAAI;CAAE;CAChE,QAAQ;CACR,SAAS,YAAYC,cAAAA,YAAY,QAAQ,IAAI;CAC7C,OAAO;AACT"}
@@ -0,0 +1,3 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_treemap = require("./treemap-CZk8kKFD.cjs");
3
+ exports.treemap = require_treemap.treemap;
@@ -0,0 +1,3 @@
1
+ /** Standalone entry: `import { treemap } from '@tabler/charts/treemap'`. */
2
+ import { n as TreemapOptions, r as treemap, t as TreemapNode } from "./treemap-25vHO_UK.cjs";
3
+ export { type TreemapNode, type TreemapOptions, treemap };
@@ -0,0 +1,3 @@
1
+ /** Standalone entry: `import { treemap } from '@tabler/charts/treemap'`. */
2
+ import { n as TreemapOptions, r as treemap, t as TreemapNode } from "./treemap-BCXUbixd.js";
3
+ export { type TreemapNode, type TreemapOptions, treemap };
@@ -0,0 +1 @@
1
+ export { t as treemap } from "./treemap-C4glsx-g.js";
@@ -1,4 +1,4 @@
1
- //#region src/render/tween.ts
1
+ // src/render/tween.ts
2
2
  /**
3
3
  * Paths redrawn frame by frame, shared by `morph` and `sweep`: numbers go
4
4
  * from where they are to where they end with an ease-out curve, and each
@@ -34,7 +34,6 @@ function tween(el, origin, end, duration, draw, to) {
34
34
  running.set(el, state);
35
35
  state.frame = requestAnimationFrame(step);
36
36
  }
37
- //#endregion
38
37
  export { tween as n, stop as t };
39
38
 
40
- //# sourceMappingURL=tween-BCYd0RTY.js.map
39
+ //# sourceMappingURL=tween-BdQqUmmv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tween-BCYd0RTY.js","names":[],"sources":["../src/render/tween.ts"],"sourcesContent":["/**\n * Paths redrawn frame by frame, shared by `morph` and `sweep`: numbers go\n * from where they are to where they end with an ease-out curve, and each\n * frame draws the `d` of the numbers in between.\n */\n\n/** The running tween of each path: its frame request and the numbers drawn now. */\nconst running = /* @__PURE__ */ new WeakMap<Element, { frame: number; now: number[] }>()\n\n/** Stop the tween of `el`, if any; returns the numbers it had reached. */\nexport function stop(el: Element): number[] | undefined {\n const current = running.get(el)\n if (current) cancelAnimationFrame(current.frame)\n running.delete(el)\n return current?.now\n}\n\n/**\n * Take the numbers from `origin` to `end` over `duration` ms, setting the\n * `d` of `el` to `draw(numbers)` on each frame and to `to` on the last.\n */\nexport function tween(\n el: Element,\n origin: readonly number[],\n end: readonly number[],\n duration: number,\n draw: (now: number[]) => string,\n to: string,\n): void {\n const state = { frame: 0, now: origin.slice() }\n const begin = performance.now()\n const step = (time: number) => {\n const t = Math.min(1, Math.max(0, (time - begin) / duration))\n // Ease out, close to the default --tc-easing (a custom easing is approximated).\n const k = 1 - (1 - t) ** 3\n state.now = end.map((value, i) => (origin[i] as number) + (value - (origin[i] as number)) * k)\n el.setAttribute('d', t < 1 ? draw(state.now) : to)\n if (t < 1) state.frame = requestAnimationFrame(step)\n else running.delete(el)\n }\n running.set(el, state)\n state.frame = requestAnimationFrame(step)\n}\n"],"mappings":";;;;;;;AAOA,MAAM,0BAA0B,IAAI,QAAmD;;AAGvF,SAAgB,KAAK,IAAmC;CACtD,MAAM,UAAU,QAAQ,IAAI,EAAE;CAC9B,IAAI,SAAS,qBAAqB,QAAQ,KAAK;CAC/C,QAAQ,OAAO,EAAE;CACjB,OAAO,SAAS;AAClB;;;;;AAMA,SAAgB,MACd,IACA,QACA,KACA,UACA,MACA,IACM;CACN,MAAM,QAAQ;EAAE,OAAO;EAAG,KAAK,OAAO,MAAM;CAAE;CAC9C,MAAM,QAAQ,YAAY,IAAI;CAC9B,MAAM,QAAQ,SAAiB;EAC7B,MAAM,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,SAAS,QAAQ,CAAC;EAE5D,MAAM,IAAI,KAAK,IAAI,MAAM;EACzB,MAAM,MAAM,IAAI,KAAK,OAAO,MAAO,OAAO,MAAiB,QAAS,OAAO,MAAiB,CAAC;EAC7F,GAAG,aAAa,KAAK,IAAI,IAAI,KAAK,MAAM,GAAG,IAAI,EAAE;EACjD,IAAI,IAAI,GAAG,MAAM,QAAQ,sBAAsB,IAAI;OAC9C,QAAQ,OAAO,EAAE;CACxB;CACA,QAAQ,IAAI,IAAI,KAAK;CACrB,MAAM,QAAQ,sBAAsB,IAAI;AAC1C"}
1
+ {"version":3,"file":"tween-BdQqUmmv.js","names":[],"sources":["../src/render/tween.ts"],"sourcesContent":["/**\n * Paths redrawn frame by frame, shared by `morph` and `sweep`: numbers go\n * from where they are to where they end with an ease-out curve, and each\n * frame draws the `d` of the numbers in between.\n */\n\n/** The running tween of each path: its frame request and the numbers drawn now. */\nconst running = /* @__PURE__ */ new WeakMap<Element, { frame: number; now: number[] }>()\n\n/** Stop the tween of `el`, if any; returns the numbers it had reached. */\nexport function stop(el: Element): number[] | undefined {\n const current = running.get(el)\n if (current) cancelAnimationFrame(current.frame)\n running.delete(el)\n return current?.now\n}\n\n/**\n * Take the numbers from `origin` to `end` over `duration` ms, setting the\n * `d` of `el` to `draw(numbers)` on each frame and to `to` on the last.\n */\nexport function tween(\n el: Element,\n origin: readonly number[],\n end: readonly number[],\n duration: number,\n draw: (now: number[]) => string,\n to: string,\n): void {\n const state = { frame: 0, now: origin.slice() }\n const begin = performance.now()\n const step = (time: number) => {\n const t = Math.min(1, Math.max(0, (time - begin) / duration))\n // Ease out, close to the default --tc-easing (a custom easing is approximated).\n const k = 1 - (1 - t) ** 3\n state.now = end.map((value, i) => (origin[i] as number) + (value - (origin[i] as number)) * k)\n el.setAttribute('d', t < 1 ? draw(state.now) : to)\n if (t < 1) state.frame = requestAnimationFrame(step)\n else running.delete(el)\n }\n running.set(el, state)\n state.frame = requestAnimationFrame(step)\n}\n"],"mappings":";;;;;;;AAOA,MAAM,0BAA0B,IAAI,QAAmD;;AAGvF,SAAgB,KAAK,IAAmC;CACtD,MAAM,UAAU,QAAQ,IAAI,EAAE;CAC9B,IAAI,SAAS,qBAAqB,QAAQ,KAAK;CAC/C,QAAQ,OAAO,EAAE;CACjB,OAAO,SAAS;AAClB;;;;;AAMA,SAAgB,MACd,IACA,QACA,KACA,UACA,MACA,IACM;CACN,MAAM,QAAQ;EAAE,OAAO;EAAG,KAAK,OAAO,MAAM;CAAE;CAC9C,MAAM,QAAQ,YAAY,IAAI;CAC9B,MAAM,QAAQ,SAAiB;EAC7B,MAAM,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,SAAS,QAAQ,CAAC;EAE5D,MAAM,IAAI,KAAK,IAAI,MAAM;EACzB,MAAM,MAAM,IAAI,KAAK,OAAO,MAAO,OAAO,MAAiB,QAAS,OAAO,MAAiB,CAAC;EAC7F,GAAG,aAAa,KAAK,IAAI,IAAI,KAAK,MAAM,GAAG,IAAI,EAAE;EACjD,IAAI,IAAI,GAAG,MAAM,QAAQ,sBAAsB,IAAI;OAC9C,QAAQ,OAAO,EAAE;CACxB;CACA,QAAQ,IAAI,IAAI,KAAK;CACrB,MAAM,QAAQ,sBAAsB,IAAI;AAC1C"}
@@ -1,4 +1,4 @@
1
- //#region src/render/tween.ts
1
+ // src/render/tween.ts
2
2
  /**
3
3
  * Paths redrawn frame by frame, shared by `morph` and `sweep`: numbers go
4
4
  * from where they are to where they end with an ease-out curve, and each
@@ -34,7 +34,6 @@ function tween(el, origin, end, duration, draw, to) {
34
34
  running.set(el, state);
35
35
  state.frame = requestAnimationFrame(step);
36
36
  }
37
- //#endregion
38
37
  Object.defineProperty(exports, "stop", {
39
38
  enumerable: true,
40
39
  get: function() {
@@ -48,4 +47,4 @@ Object.defineProperty(exports, "tween", {
48
47
  }
49
48
  });
50
49
 
51
- //# sourceMappingURL=tween-CIGBlryn.cjs.map
50
+ //# sourceMappingURL=tween-c3aOmfKE.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tween-CIGBlryn.cjs","names":[],"sources":["../src/render/tween.ts"],"sourcesContent":["/**\n * Paths redrawn frame by frame, shared by `morph` and `sweep`: numbers go\n * from where they are to where they end with an ease-out curve, and each\n * frame draws the `d` of the numbers in between.\n */\n\n/** The running tween of each path: its frame request and the numbers drawn now. */\nconst running = /* @__PURE__ */ new WeakMap<Element, { frame: number; now: number[] }>()\n\n/** Stop the tween of `el`, if any; returns the numbers it had reached. */\nexport function stop(el: Element): number[] | undefined {\n const current = running.get(el)\n if (current) cancelAnimationFrame(current.frame)\n running.delete(el)\n return current?.now\n}\n\n/**\n * Take the numbers from `origin` to `end` over `duration` ms, setting the\n * `d` of `el` to `draw(numbers)` on each frame and to `to` on the last.\n */\nexport function tween(\n el: Element,\n origin: readonly number[],\n end: readonly number[],\n duration: number,\n draw: (now: number[]) => string,\n to: string,\n): void {\n const state = { frame: 0, now: origin.slice() }\n const begin = performance.now()\n const step = (time: number) => {\n const t = Math.min(1, Math.max(0, (time - begin) / duration))\n // Ease out, close to the default --tc-easing (a custom easing is approximated).\n const k = 1 - (1 - t) ** 3\n state.now = end.map((value, i) => (origin[i] as number) + (value - (origin[i] as number)) * k)\n el.setAttribute('d', t < 1 ? draw(state.now) : to)\n if (t < 1) state.frame = requestAnimationFrame(step)\n else running.delete(el)\n }\n running.set(el, state)\n state.frame = requestAnimationFrame(step)\n}\n"],"mappings":";;;;;;;AAOA,MAAM,0BAA0B,IAAI,QAAmD;;AAGvF,SAAgB,KAAK,IAAmC;CACtD,MAAM,UAAU,QAAQ,IAAI,EAAE;CAC9B,IAAI,SAAS,qBAAqB,QAAQ,KAAK;CAC/C,QAAQ,OAAO,EAAE;CACjB,OAAO,SAAS;AAClB;;;;;AAMA,SAAgB,MACd,IACA,QACA,KACA,UACA,MACA,IACM;CACN,MAAM,QAAQ;EAAE,OAAO;EAAG,KAAK,OAAO,MAAM;CAAE;CAC9C,MAAM,QAAQ,YAAY,IAAI;CAC9B,MAAM,QAAQ,SAAiB;EAC7B,MAAM,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,SAAS,QAAQ,CAAC;EAE5D,MAAM,IAAI,KAAK,IAAI,MAAM;EACzB,MAAM,MAAM,IAAI,KAAK,OAAO,MAAO,OAAO,MAAiB,QAAS,OAAO,MAAiB,CAAC;EAC7F,GAAG,aAAa,KAAK,IAAI,IAAI,KAAK,MAAM,GAAG,IAAI,EAAE;EACjD,IAAI,IAAI,GAAG,MAAM,QAAQ,sBAAsB,IAAI;OAC9C,QAAQ,OAAO,EAAE;CACxB;CACA,QAAQ,IAAI,IAAI,KAAK;CACrB,MAAM,QAAQ,sBAAsB,IAAI;AAC1C"}
1
+ {"version":3,"file":"tween-c3aOmfKE.cjs","names":[],"sources":["../src/render/tween.ts"],"sourcesContent":["/**\n * Paths redrawn frame by frame, shared by `morph` and `sweep`: numbers go\n * from where they are to where they end with an ease-out curve, and each\n * frame draws the `d` of the numbers in between.\n */\n\n/** The running tween of each path: its frame request and the numbers drawn now. */\nconst running = /* @__PURE__ */ new WeakMap<Element, { frame: number; now: number[] }>()\n\n/** Stop the tween of `el`, if any; returns the numbers it had reached. */\nexport function stop(el: Element): number[] | undefined {\n const current = running.get(el)\n if (current) cancelAnimationFrame(current.frame)\n running.delete(el)\n return current?.now\n}\n\n/**\n * Take the numbers from `origin` to `end` over `duration` ms, setting the\n * `d` of `el` to `draw(numbers)` on each frame and to `to` on the last.\n */\nexport function tween(\n el: Element,\n origin: readonly number[],\n end: readonly number[],\n duration: number,\n draw: (now: number[]) => string,\n to: string,\n): void {\n const state = { frame: 0, now: origin.slice() }\n const begin = performance.now()\n const step = (time: number) => {\n const t = Math.min(1, Math.max(0, (time - begin) / duration))\n // Ease out, close to the default --tc-easing (a custom easing is approximated).\n const k = 1 - (1 - t) ** 3\n state.now = end.map((value, i) => (origin[i] as number) + (value - (origin[i] as number)) * k)\n el.setAttribute('d', t < 1 ? draw(state.now) : to)\n if (t < 1) state.frame = requestAnimationFrame(step)\n else running.delete(el)\n }\n running.set(el, state)\n state.frame = requestAnimationFrame(step)\n}\n"],"mappings":";;;;;;;AAOA,MAAM,0BAA0B,IAAI,QAAmD;;AAGvF,SAAgB,KAAK,IAAmC;CACtD,MAAM,UAAU,QAAQ,IAAI,EAAE;CAC9B,IAAI,SAAS,qBAAqB,QAAQ,KAAK;CAC/C,QAAQ,OAAO,EAAE;CACjB,OAAO,SAAS;AAClB;;;;;AAMA,SAAgB,MACd,IACA,QACA,KACA,UACA,MACA,IACM;CACN,MAAM,QAAQ;EAAE,OAAO;EAAG,KAAK,OAAO,MAAM;CAAE;CAC9C,MAAM,QAAQ,YAAY,IAAI;CAC9B,MAAM,QAAQ,SAAiB;EAC7B,MAAM,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,SAAS,QAAQ,CAAC;EAE5D,MAAM,IAAI,KAAK,IAAI,MAAM;EACzB,MAAM,MAAM,IAAI,KAAK,OAAO,MAAO,OAAO,MAAiB,QAAS,OAAO,MAAiB,CAAC;EAC7F,GAAG,aAAa,KAAK,IAAI,IAAI,KAAK,MAAM,GAAG,IAAI,EAAE;EACjD,IAAI,IAAI,GAAG,MAAM,QAAQ,sBAAsB,IAAI;OAC9C,QAAQ,OAAO,EAAE;CACxB;CACA,QAAQ,IAAI,IAAI,KAAK;CACrB,MAAM,QAAQ,sBAAsB,IAAI;AAC1C"}
@@ -1,11 +1,18 @@
1
- import { a as round, n as estimateTextWidth } from "./layout-B3hiqVEw.js";
2
- import { t as h } from "./vnode-tCWItoUH.js";
3
- import { o as getNumberFormat, r as formatNumber } from "./format-lStwuc1L.js";
4
- //#region src/charts/value-labels.ts
1
+ import { o as getNumberFormat, r as formatNumber } from "./format-it1kepFG.js";
2
+ import { n as estimateTextWidth, s as round } from "./layout-DqAte3H8.js";
3
+ import { t as h } from "./vnode-_EMUqysL.js";
4
+ // src/charts/value-labels.ts
5
5
  /** Space between a mark and its label, and around labels. */
6
6
  const GAP = 4;
7
7
  const overlaps = (a, b) => a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height;
8
8
  const contains = (outer, inner) => inner.x >= outer.x - 1 && inner.y >= outer.y - 1 && inner.x + inner.width <= outer.x + outer.width + 1 && inner.y + inner.height <= outer.y + outer.height + 1;
9
+ /** The `valueLabels` of each series: `true`, `false`, or anything else for the chart's. */
10
+ const own = (config) => {
11
+ const series = config.data?.series;
12
+ return Array.isArray(series) ? series.map((s) => s?.valueLabels) : [];
13
+ };
14
+ /** Whether a chart has labels: on the chart, or on one of its series. */
15
+ const wanted = (config) => !!config.valueLabels || own(config).includes(true);
9
16
  /** The labels layer of a chart, or `null` when nothing gets one. */
10
17
  function valueLabels(config, interaction, ctx) {
11
18
  const option = config.valueLabels;
@@ -20,7 +27,13 @@ function valueLabels(config, interaction, ctx) {
20
27
  maximumFractionDigits: 1
21
28
  }).format(v) : spec?.format ? formatNumber(spec.format(config), locale) : void 0;
22
29
  const height = fontSize;
30
+ const series = own(config);
31
+ const isLabelled = (index) => {
32
+ const on = series[index];
33
+ return typeof on === "boolean" ? on : !!option;
34
+ };
23
35
  const items = [];
36
+ const marks = [];
24
37
  const last = /* @__PURE__ */ new Map();
25
38
  let total = 0;
26
39
  for (let i = 0; i < interaction.count; i++) {
@@ -28,6 +41,8 @@ function valueLabels(config, interaction, ctx) {
28
41
  for (const item of hit?.items ?? []) {
29
42
  if (item.value === null || item.y === null || !hit) continue;
30
43
  total += Math.abs(item.value);
44
+ if (item.box) marks.push(item.box);
45
+ if (!isLabelled(item.seriesIndex)) continue;
31
46
  if (!pie && !item.box && options.points !== "all") last.set(item.seriesIndex, items.length);
32
47
  items.push([
33
48
  `${i}-${item.seriesIndex}`,
@@ -36,7 +51,6 @@ function valueLabels(config, interaction, ctx) {
36
51
  ]);
37
52
  }
38
53
  }
39
- const marks = items.flatMap(([, item]) => item.box ? [item.box] : []);
40
54
  const placed = [];
41
55
  items.forEach(([key, item, hit], n) => {
42
56
  const { area } = hit;
@@ -49,6 +63,7 @@ function valueLabels(config, interaction, ctx) {
49
63
  if (!item.box && !pie) x = Math.max(area.x + width / 2 + 2, Math.min(x, area.x + area.width - width / 2 - 2));
50
64
  return {
51
65
  key,
66
+ series: item.seriesIndex,
52
67
  text,
53
68
  x,
54
69
  y,
@@ -72,7 +87,8 @@ function valueLabels(config, interaction, ctx) {
72
87
  const reach = (horizontal ? width / 2 : height / 2) + GAP;
73
88
  const sign = down ? 1 : -1;
74
89
  const along = y + sign * reach;
75
- candidates.push(horizontal ? at(item.x - sign * reach, y, false) : at(item.x, along, false), ...horizontal ? [] : [at(box.x + width / 2 - 3, along, false), at(box.x + box.width - width / 2 + 3, along, false)], horizontal ? at(item.x + sign * reach, y, true) : at(item.x, y - sign * reach, true));
90
+ const side = ctx.rtl ? -sign : sign;
91
+ candidates.push(horizontal ? at(item.x - side * reach, y, false) : at(item.x, along, false), ...horizontal ? [] : [at(box.x + width / 2 - 3, along, false), at(box.x + box.width - width / 2 + 3, along, false)], horizontal ? at(item.x + side * reach, y, true) : at(item.x, y - sign * reach, true));
76
92
  } else candidates.push(at(box.x + box.width / 2, box.y + box.height / 2, true));
77
93
  } else {
78
94
  const side = width / 2 + GAP + 4;
@@ -98,7 +114,12 @@ function valueLabels(config, interaction, ctx) {
98
114
  "aria-hidden": "true"
99
115
  }, placed.map((p) => h("text", {
100
116
  key: p.key,
101
- class: ["tc-value-label", p.inside && "tc-value-label-inside"],
117
+ class: [
118
+ "tc-value-label",
119
+ "tc-series",
120
+ `tc-series-${p.series + 1}`,
121
+ p.inside && "tc-value-label-inside"
122
+ ],
102
123
  style: `transform:translate(${round(p.x)}px,${round(p.y)}px)`,
103
124
  "text-anchor": "middle",
104
125
  dy: "0.35em"
@@ -116,8 +137,7 @@ function sliceFits(item, area, share, label) {
116
137
  return label.width <= share * 2 * Math.PI * radius && label.height <= depth;
117
138
  }
118
139
  /** The step that adds the labels over the content of charts with `valueLabels`. */
119
- const labelsStep = (config, content, interaction, ctx) => config.valueLabels && interaction ? [content, valueLabels(config, interaction, ctx)] : content;
120
- //#endregion
140
+ const labelsStep = (config, content, interaction, ctx) => interaction && wanted(config) ? [content, valueLabels(config, interaction, ctx)] : content;
121
141
  export { valueLabels as n, labelsStep as t };
122
142
 
123
- //# sourceMappingURL=value-labels-IZIQPhfk.js.map
143
+ //# sourceMappingURL=value-labels-C7GrhOXJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-labels-C7GrhOXJ.js","names":[],"sources":["../src/charts/value-labels.ts"],"sourcesContent":["/**\n * Value labels: the value written on each mark, for charts read at a\n * glance. They are worked out from the chart's interaction, so every type\n * gets them the same way: bars at their end (inside when there is no room\n * outside), stacked segments and heatmap cells in their middle, lines and\n * points above their point (the last one by default), slices in their\n * middle with their share. A label that does not fit its mark or the plot,\n * or that would cover another one, is left out: labels never overlap.\n */\nimport type { ChartConfig, RenderContext } from '../chart.ts'\nimport type { PostStep } from '../features.ts'\nimport { formatNumber, getNumberFormat, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { estimateTextWidth, type Rect, round } from '../layout.ts'\nimport { h, type VNode } from '../vnode.ts'\n\nexport interface ValueLabelOptions {\n /** Format of the values. Defaults to the value axis format (slices: their share in percent). */\n format?: NumberFormat\n /** Which points of lines, areas and scatters get a label. Defaults to `'last'`. */\n points?: 'last' | 'all'\n}\n\n/** Space between a mark and its label, and around labels. */\nconst GAP = 4\n\ninterface Placed {\n key: string\n series: number\n text: string\n x: number\n y: number\n inside: boolean\n box: Rect\n}\n\nconst overlaps = (a: Rect, b: Rect): boolean =>\n a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height\n\nconst contains = (outer: Rect, inner: Rect): boolean =>\n inner.x >= outer.x - 1 &&\n inner.y >= outer.y - 1 &&\n inner.x + inner.width <= outer.x + outer.width + 1 &&\n inner.y + inner.height <= outer.y + outer.height + 1\n\n/** The `valueLabels` of each series: `true`, `false`, or anything else for the chart's. */\nconst own = (config: ChartConfig<object>): unknown[] => {\n const series = (config as { data?: { series?: unknown } }).data?.series\n return Array.isArray(series) ? series.map((s) => s?.valueLabels) : []\n}\n\n/** Whether a chart has labels: on the chart, or on one of its series. */\nconst wanted = (config: ChartConfig<object>): boolean =>\n !!config.valueLabels || own(config).includes(true)\n\n/** The labels layer of a chart, or `null` when nothing gets one. */\nexport function valueLabels(\n config: ChartConfig<object>,\n interaction: Interaction,\n ctx: RenderContext,\n): VNode | null {\n const option = config.valueLabels\n const options: ValueLabelOptions = typeof option === 'object' ? option : {}\n const { fontSize, locale } = ctx\n // What the chart type says about its marks (slices, cells) and its number format.\n const spec = config.type.valueLabels\n const pie = spec?.marks === 'slice'\n const cell = spec?.marks === 'cell'\n const stacked = !!(config as { stacked?: unknown }).stacked\n const format = options.format\n ? formatNumber(options.format, locale)\n : pie\n ? (v: number) =>\n getNumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 }).format(v)\n : spec?.format\n ? formatNumber(spec.format(config), locale)\n : undefined\n // Numbers have no descenders: one em is their height, with room to spare.\n const height = fontSize\n\n // Candidates in order of priority: every hit's items, and for points only the\n // last one of each series unless all are asked for.\n // A series' own `valueLabels` wins over the chart's.\n const series = own(config)\n const isLabelled = (index: number): boolean => {\n const on = series[index]\n return typeof on === 'boolean' ? on : !!option\n }\n const items: [string, HitItem, Hit][] = []\n // Marks a label must not cover: every bar and cell but its own, labelled or not.\n const marks: Rect[] = []\n const last = new Map<number, number>()\n let total = 0\n for (let i = 0; i < interaction.count; i++) {\n const hit = interaction.hitIndex(i)\n for (const item of hit?.items ?? []) {\n if (item.value === null || item.y === null || !hit) continue\n total += Math.abs(item.value)\n if (item.box) marks.push(item.box)\n if (!isLabelled(item.seriesIndex)) continue\n if (!pie && !item.box && options.points !== 'all') last.set(item.seriesIndex, items.length)\n items.push([`${i}-${item.seriesIndex}`, item, hit])\n }\n }\n\n const placed: Placed[] = []\n items.forEach(([key, item, hit], n) => {\n const { area } = hit\n if (!pie && !item.box && options.points !== 'all' && last.get(item.seriesIndex) !== n) return\n const value = item.value as number\n const share = value / (total || 1)\n const text = format ? format(pie ? share : value) : item.text\n const width = estimateTextWidth(text, fontSize)\n const at = (x: number, y: number, inside: boolean): Placed => {\n // A point's label at the plot's edge (the last point) moves in.\n if (!item.box && !pie) {\n x = Math.max(area.x + width / 2 + 2, Math.min(x, area.x + area.width - width / 2 - 2))\n }\n return {\n key,\n series: item.seriesIndex,\n text,\n x,\n y,\n inside,\n box: { x: x - width / 2 - 2, y: y - height / 2, width: width + 4, height },\n }\n }\n const y = item.y as number\n const candidates: Placed[] = []\n const { box } = item\n if (pie) {\n candidates.push(at(item.x, y, true))\n } else if (box) {\n const horizontal = hit.axis === 'y'\n const down = value < 0\n if (!stacked && !cell) {\n // Beyond the bar's end, then just inside it.\n const reach = (horizontal ? width / 2 : height / 2) + GAP\n const sign = down ? 1 : -1\n const along = y + sign * reach\n // Sideways, bars grow to the right, or to the left in a right-to-left chart.\n const side = ctx.rtl ? -sign : sign\n candidates.push(\n horizontal ? at(item.x - side * reach, y, false) : at(item.x, along, false),\n // A label wider than its bar may lean off a taller neighbour.\n ...(horizontal\n ? []\n : [\n at(box.x + width / 2 - 3, along, false),\n at(box.x + box.width - width / 2 + 3, along, false),\n ]),\n horizontal ? at(item.x + side * reach, y, true) : at(item.x, y - sign * reach, true),\n )\n } else {\n candidates.push(at(box.x + box.width / 2, box.y + box.height / 2, true))\n }\n } else {\n // Above the point, below it, or beside it (the end of a line, at the plot's edge).\n const side = width / 2 + GAP + 4\n candidates.push(\n at(item.x, y - height / 2 - GAP - 2, false),\n at(item.x, y + height / 2 + GAP + 2, false),\n at(item.x - side, y, false),\n at(item.x + side, y, false),\n )\n }\n // Labels may rise into the margin above the plot, not over the axes.\n const room = { ...area, y: 0, height: area.y + area.height }\n // Glyphs leave a little room at their sides (`slim`): a label may brush a neighbour.\n const fits = (p: Placed, slim = { ...p.box, x: p.box.x + 5, width: p.box.width - 10 }) =>\n contains(pie ? area : room, p.box) &&\n (!p.inside || !box || contains(box, p.box)) &&\n (!pie || sliceFits(item, area, share, p.box)) &&\n !placed.some((other) => overlaps(other.box, p.box)) &&\n !marks.some((mark) => mark !== box && overlaps(mark, slim))\n const spot = candidates.find((p) => fits(p))\n if (spot) placed.push(spot)\n })\n\n if (!placed.length) return null\n return h(\n 'g',\n { key: 'value-labels', class: 'tc-value-labels', 'aria-hidden': 'true' },\n placed.map((p) =>\n h(\n 'text',\n {\n key: p.key,\n class: [\n 'tc-value-label',\n 'tc-series',\n `tc-series-${p.series + 1}`,\n p.inside && 'tc-value-label-inside',\n ],\n style: `transform:translate(${round(p.x)}px,${round(p.y)}px)`,\n 'text-anchor': 'middle',\n dy: '0.35em',\n },\n p.text,\n ),\n ),\n )\n}\n\n/**\n * Whether a label fits its slice: it sits at the slice's centroid, where the\n * slice is about its share of the circle wide and twice the distance to the\n * outer edge deep.\n */\nfunction sliceFits(item: HitItem, area: Rect, share: number, label: Rect): boolean {\n const outer = area.width / 2\n const radius = Math.hypot(item.x - area.x - outer, (item.y as number) - area.y - outer)\n const depth = 2 * (outer - radius)\n return label.width <= share * 2 * Math.PI * radius && label.height <= depth\n}\n\n/** The step that adds the labels over the content of charts with `valueLabels`. */\nexport const labelsStep: PostStep = (config, content, interaction, ctx) =>\n interaction && wanted(config) ? [content, valueLabels(config, interaction, ctx)] : content\n"],"mappings":";;;;;AAwBA,MAAM,MAAM;AAYZ,MAAM,YAAY,GAAS,MACzB,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;AAEtF,MAAM,YAAY,OAAa,UAC7B,MAAM,KAAK,MAAM,IAAI,KACrB,MAAM,KAAK,MAAM,IAAI,KACrB,MAAM,IAAI,MAAM,SAAS,MAAM,IAAI,MAAM,QAAQ,KACjD,MAAM,IAAI,MAAM,UAAU,MAAM,IAAI,MAAM,SAAS;;AAGrD,MAAM,OAAO,WAA2C;CACtD,MAAM,SAAU,OAA2C,MAAM;CACjE,OAAO,MAAM,QAAQ,MAAM,IAAI,OAAO,KAAK,MAAM,GAAG,WAAW,IAAI,CAAC;AACtE;;AAGA,MAAM,UAAU,WACd,CAAC,CAAC,OAAO,eAAe,IAAI,MAAM,CAAC,CAAC,SAAS,IAAI;;AAGnD,SAAgB,YACd,QACA,aACA,KACc;CACd,MAAM,SAAS,OAAO;CACtB,MAAM,UAA6B,OAAO,WAAW,WAAW,SAAS,CAAC;CAC1E,MAAM,EAAE,UAAU,WAAW;CAE7B,MAAM,OAAO,OAAO,KAAK;CACzB,MAAM,MAAM,MAAM,UAAU;CAC5B,MAAM,OAAO,MAAM,UAAU;CAC7B,MAAM,UAAU,CAAC,CAAE,OAAiC;CACpD,MAAM,SAAS,QAAQ,SACnB,aAAa,QAAQ,QAAQ,MAAM,IACnC,O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IAAI;CACN,GACA,EAAE,IACJ,CACF,CACF;AACF;;;;;;AAOA,SAAS,UAAU,MAAe,MAAY,OAAe,OAAsB;CACjF,MAAM,QAAQ,KAAK,QAAQ;CAC3B,MAAM,SAAS,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,OAAQ,KAAK,IAAe,KAAK,IAAI,KAAK;CACtF,MAAM,QAAQ,KAAK,QAAQ;CAC3B,OAAO,MAAM,SAAS,QAAQ,IAAI,KAAK,KAAK,UAAU,MAAM,UAAU;AACxE;;AAGA,MAAa,cAAwB,QAAQ,SAAS,aAAa,QACjE,eAAe,OAAO,MAAM,IAAI,CAAC,SAAS,YAAY,QAAQ,aAAa,GAAG,CAAC,IAAI"}
@@ -1,11 +1,18 @@
1
- const require_layout = require("./layout-CtMBhNd9.cjs");
2
- const require_vnode = require("./vnode-CkQ27Cxe.cjs");
3
- const require_format = require("./format-B0yKXBTH.cjs");
4
- //#region src/charts/value-labels.ts
1
+ const require_format = require("./format-CAE5ruy6.cjs");
2
+ const require_layout = require("./layout-Cfg9x1k2.cjs");
3
+ const require_vnode = require("./vnode-ClAiw28x.cjs");
4
+ // src/charts/value-labels.ts
5
5
  /** Space between a mark and its label, and around labels. */
6
6
  const GAP = 4;
7
7
  const overlaps = (a, b) => a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height;
8
8
  const contains = (outer, inner) => inner.x >= outer.x - 1 && inner.y >= outer.y - 1 && inner.x + inner.width <= outer.x + outer.width + 1 && inner.y + inner.height <= outer.y + outer.height + 1;
9
+ /** The `valueLabels` of each series: `true`, `false`, or anything else for the chart's. */
10
+ const own = (config) => {
11
+ const series = config.data?.series;
12
+ return Array.isArray(series) ? series.map((s) => s?.valueLabels) : [];
13
+ };
14
+ /** Whether a chart has labels: on the chart, or on one of its series. */
15
+ const wanted = (config) => !!config.valueLabels || own(config).includes(true);
9
16
  /** The labels layer of a chart, or `null` when nothing gets one. */
10
17
  function valueLabels(config, interaction, ctx) {
11
18
  const option = config.valueLabels;
@@ -20,7 +27,13 @@ function valueLabels(config, interaction, ctx) {
20
27
  maximumFractionDigits: 1
21
28
  }).format(v) : spec?.format ? require_format.formatNumber(spec.format(config), locale) : void 0;
22
29
  const height = fontSize;
30
+ const series = own(config);
31
+ const isLabelled = (index) => {
32
+ const on = series[index];
33
+ return typeof on === "boolean" ? on : !!option;
34
+ };
23
35
  const items = [];
36
+ const marks = [];
24
37
  const last = /* @__PURE__ */ new Map();
25
38
  let total = 0;
26
39
  for (let i = 0; i < interaction.count; i++) {
@@ -28,6 +41,8 @@ function valueLabels(config, interaction, ctx) {
28
41
  for (const item of hit?.items ?? []) {
29
42
  if (item.value === null || item.y === null || !hit) continue;
30
43
  total += Math.abs(item.value);
44
+ if (item.box) marks.push(item.box);
45
+ if (!isLabelled(item.seriesIndex)) continue;
31
46
  if (!pie && !item.box && options.points !== "all") last.set(item.seriesIndex, items.length);
32
47
  items.push([
33
48
  `${i}-${item.seriesIndex}`,
@@ -36,7 +51,6 @@ function valueLabels(config, interaction, ctx) {
36
51
  ]);
37
52
  }
38
53
  }
39
- const marks = items.flatMap(([, item]) => item.box ? [item.box] : []);
40
54
  const placed = [];
41
55
  items.forEach(([key, item, hit], n) => {
42
56
  const { area } = hit;
@@ -49,6 +63,7 @@ function valueLabels(config, interaction, ctx) {
49
63
  if (!item.box && !pie) x = Math.max(area.x + width / 2 + 2, Math.min(x, area.x + area.width - width / 2 - 2));
50
64
  return {
51
65
  key,
66
+ series: item.seriesIndex,
52
67
  text,
53
68
  x,
54
69
  y,
@@ -72,7 +87,8 @@ function valueLabels(config, interaction, ctx) {
72
87
  const reach = (horizontal ? width / 2 : height / 2) + GAP;
73
88
  const sign = down ? 1 : -1;
74
89
  const along = y + sign * reach;
75
- candidates.push(horizontal ? at(item.x - sign * reach, y, false) : at(item.x, along, false), ...horizontal ? [] : [at(box.x + width / 2 - 3, along, false), at(box.x + box.width - width / 2 + 3, along, false)], horizontal ? at(item.x + sign * reach, y, true) : at(item.x, y - sign * reach, true));
90
+ const side = ctx.rtl ? -sign : sign;
91
+ candidates.push(horizontal ? at(item.x - side * reach, y, false) : at(item.x, along, false), ...horizontal ? [] : [at(box.x + width / 2 - 3, along, false), at(box.x + box.width - width / 2 + 3, along, false)], horizontal ? at(item.x + side * reach, y, true) : at(item.x, y - sign * reach, true));
76
92
  } else candidates.push(at(box.x + box.width / 2, box.y + box.height / 2, true));
77
93
  } else {
78
94
  const side = width / 2 + GAP + 4;
@@ -98,7 +114,12 @@ function valueLabels(config, interaction, ctx) {
98
114
  "aria-hidden": "true"
99
115
  }, placed.map((p) => require_vnode.h("text", {
100
116
  key: p.key,
101
- class: ["tc-value-label", p.inside && "tc-value-label-inside"],
117
+ class: [
118
+ "tc-value-label",
119
+ "tc-series",
120
+ `tc-series-${p.series + 1}`,
121
+ p.inside && "tc-value-label-inside"
122
+ ],
102
123
  style: `transform:translate(${require_layout.round(p.x)}px,${require_layout.round(p.y)}px)`,
103
124
  "text-anchor": "middle",
104
125
  dy: "0.35em"
@@ -116,8 +137,7 @@ function sliceFits(item, area, share, label) {
116
137
  return label.width <= share * 2 * Math.PI * radius && label.height <= depth;
117
138
  }
118
139
  /** The step that adds the labels over the content of charts with `valueLabels`. */
119
- const labelsStep = (config, content, interaction, ctx) => config.valueLabels && interaction ? [content, valueLabels(config, interaction, ctx)] : content;
120
- //#endregion
140
+ const labelsStep = (config, content, interaction, ctx) => interaction && wanted(config) ? [content, valueLabels(config, interaction, ctx)] : content;
121
141
  Object.defineProperty(exports, "labelsStep", {
122
142
  enumerable: true,
123
143
  get: function() {
@@ -131,4 +151,4 @@ Object.defineProperty(exports, "valueLabels", {
131
151
  }
132
152
  });
133
153
 
134
- //# sourceMappingURL=value-labels-B0WJoJ7x.cjs.map
154
+ //# sourceMappingURL=value-labels-DzaKIWKp.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-labels-DzaKIWKp.cjs","names":["formatNumber","getNumberFormat","estimateTextWidth","h","round"],"sources":["../src/charts/value-labels.ts"],"sourcesContent":["/**\n * Value labels: the value written on each mark, for charts read at a\n * glance. They are worked out from the chart's interaction, so every type\n * gets them the same way: bars at their end (inside when there is no room\n * outside), stacked segments and heatmap cells in their middle, lines and\n * points above their point (the last one by default), slices in their\n * middle with their share. A label that does not fit its mark or the plot,\n * or that would cover another one, is left out: labels never overlap.\n */\nimport type { ChartConfig, RenderContext } from '../chart.ts'\nimport type { PostStep } from '../features.ts'\nimport { formatNumber, getNumberFormat, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { estimateTextWidth, type Rect, round } from '../layout.ts'\nimport { h, type VNode } from '../vnode.ts'\n\nexport interface ValueLabelOptions {\n /** Format of the values. Defaults to the value axis format (slices: their share in percent). */\n format?: NumberFormat\n /** Which points of lines, areas and scatters get a label. Defaults to `'last'`. */\n points?: 'last' | 'all'\n}\n\n/** Space between a mark and its label, and around labels. */\nconst GAP = 4\n\ninterface Placed {\n key: string\n series: number\n text: string\n x: number\n y: number\n inside: boolean\n box: Rect\n}\n\nconst overlaps = (a: Rect, b: Rect): boolean =>\n a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height\n\nconst contains = (outer: Rect, inner: Rect): boolean =>\n inner.x >= outer.x - 1 &&\n inner.y >= outer.y - 1 &&\n inner.x + inner.width <= outer.x + outer.width + 1 &&\n inner.y + inner.height <= outer.y + outer.height + 1\n\n/** The `valueLabels` of each series: `true`, `false`, or anything else for the chart's. */\nconst own = (config: ChartConfig<object>): unknown[] => {\n const series = (config as { data?: { series?: unknown } }).data?.series\n return Array.isArray(series) ? series.map((s) => s?.valueLabels) : []\n}\n\n/** Whether a chart has labels: on the chart, or on one of its series. */\nconst wanted = (config: ChartConfig<object>): boolean =>\n !!config.valueLabels || own(config).includes(true)\n\n/** The labels layer of a chart, or `null` when nothing gets one. */\nexport function valueLabels(\n config: ChartConfig<object>,\n interaction: Interaction,\n ctx: RenderContext,\n): VNode | null {\n const option = config.valueLabels\n const options: ValueLabelOptions = typeof option === 'object' ? option : {}\n const { fontSize, locale } = ctx\n // What the chart type says about its marks (slices, cells) and its number format.\n const spec = config.type.valueLabels\n const pie = spec?.marks === 'slice'\n const cell = spec?.marks === 'cell'\n const stacked = !!(config as { stacked?: unknown }).stacked\n const format = options.format\n ? formatNumber(options.format, locale)\n : pie\n ? (v: number) =>\n getNumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 }).format(v)\n : spec?.format\n ? formatNumber(spec.format(config), locale)\n : undefined\n // Numbers have no descenders: one em is their height, with room to spare.\n const height = fontSize\n\n // Candidates in order of priority: every hit's items, and for points only the\n // last one of each series unless all are asked for.\n // A series' own `valueLabels` wins over the chart's.\n const series = own(config)\n const isLabelled = (index: number): boolean => {\n const on = series[index]\n return typeof on === 'boolean' ? on : !!option\n }\n const items: [string, HitItem, Hit][] = []\n // Marks a label must not cover: every bar and cell but its own, labelled or not.\n const marks: Rect[] = []\n const last = new Map<number, number>()\n let total = 0\n for (let i = 0; i < interaction.count; i++) {\n const hit = interaction.hitIndex(i)\n for (const item of hit?.items ?? []) {\n if (item.value === null || item.y === null || !hit) continue\n total += Math.abs(item.value)\n if (item.box) marks.push(item.box)\n if (!isLabelled(item.seriesIndex)) continue\n if (!pie && !item.box && options.points !== 'all') last.set(item.seriesIndex, items.length)\n items.push([`${i}-${item.seriesIndex}`, item, hit])\n }\n }\n\n const placed: Placed[] = []\n items.forEach(([key, item, hit], n) => {\n const { area } = hit\n if (!pie && !item.box && options.points !== 'all' && last.get(item.seriesIndex) !== n) return\n const value = item.value as number\n const share = value / (total || 1)\n const text = format ? format(pie ? share : value) : item.text\n const width = estimateTextWidth(text, fontSize)\n const at = (x: number, y: number, inside: boolean): Placed => {\n // A point's label at the plot's edge (the last point) moves in.\n if (!item.box && !pie) {\n x = Math.max(area.x + width / 2 + 2, Math.min(x, area.x + area.width - width / 2 - 2))\n }\n return {\n key,\n series: item.seriesIndex,\n text,\n x,\n y,\n inside,\n box: { x: x - width / 2 - 2, y: y - height / 2, width: width + 4, height },\n }\n }\n const y = item.y as number\n const candidates: Placed[] = []\n const { box } = item\n if (pie) {\n candidates.push(at(item.x, y, true))\n } else if (box) {\n const horizontal = hit.axis === 'y'\n const down = value < 0\n if (!stacked && !cell) {\n // Beyond the bar's end, then just inside it.\n const reach = (horizontal ? width / 2 : height / 2) + GAP\n const sign = down ? 1 : -1\n const along = y + sign * reach\n // Sideways, bars grow to the right, or to the left in a right-to-left chart.\n const side = ctx.rtl ? -sign : sign\n candidates.push(\n horizontal ? at(item.x - side * reach, y, false) : at(item.x, along, false),\n // A label wider than its bar may lean off a taller neighbour.\n ...(horizontal\n ? []\n : [\n at(box.x + width / 2 - 3, along, false),\n at(box.x + box.width - width / 2 + 3, along, false),\n ]),\n horizontal ? at(item.x + side * reach, y, true) : at(item.x, y - sign * reach, true),\n )\n } else {\n candidates.push(at(box.x + box.width / 2, box.y + box.height / 2, true))\n }\n } else {\n // Above the point, below it, or beside it (the end of a line, at the plot's edge).\n const side = width / 2 + GAP + 4\n candidates.push(\n at(item.x, y - height / 2 - GAP - 2, false),\n at(item.x, y + height / 2 + GAP + 2, false),\n at(item.x - side, y, false),\n at(item.x + side, y, false),\n )\n }\n // Labels may rise into the margin above the plot, not over the axes.\n const room = { ...area, y: 0, height: area.y + area.height }\n // Glyphs leave a little room at their sides (`slim`): a label may brush a neighbour.\n const fits = (p: Placed, slim = { ...p.box, x: p.box.x + 5, width: p.box.width - 10 }) =>\n contains(pie ? area : room, p.box) &&\n (!p.inside || !box || contains(box, p.box)) &&\n (!pie || sliceFits(item, area, share, p.box)) &&\n !placed.some((other) => overlaps(other.box, p.box)) &&\n !marks.some((mark) => mark !== box && overlaps(mark, slim))\n const spot = candidates.find((p) => fits(p))\n if (spot) placed.push(spot)\n })\n\n if (!placed.length) return null\n return h(\n 'g',\n { key: 'value-labels', class: 'tc-value-labels', 'aria-hidden': 'true' },\n placed.map((p) =>\n h(\n 'text',\n {\n key: p.key,\n class: [\n 'tc-value-label',\n 'tc-series',\n `tc-series-${p.series + 1}`,\n p.inside && 'tc-value-label-inside',\n ],\n style: `transform:translate(${round(p.x)}px,${round(p.y)}px)`,\n 'text-anchor': 'middle',\n dy: '0.35em',\n },\n p.text,\n ),\n ),\n )\n}\n\n/**\n * Whether a label fits its slice: it sits at the slice's centroid, where the\n * slice is about its share of the circle wide and twice the distance to the\n * outer edge deep.\n */\nfunction sliceFits(item: HitItem, area: Rect, share: number, label: Rect): boolean {\n const outer = area.width / 2\n const radius = Math.hypot(item.x - area.x - outer, (item.y as number) - area.y - outer)\n const depth = 2 * (outer - radius)\n return label.width <= share * 2 * Math.PI * radius && label.height <= depth\n}\n\n/** The step that adds the labels over the content of charts with `valueLabels`. */\nexport const labelsStep: PostStep = (config, content, interaction, ctx) =>\n interaction && wanted(config) ? [content, valueLabels(config, interaction, ctx)] : content\n"],"mappings":";;;;;AAwBA,MAAM,MAAM;AAYZ,MAAM,YAAY,GAAS,MACzB,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;AAEtF,MAAM,YAAY,OAAa,UAC7B,MAAM,KAAK,MAAM,IAAI,KACrB,MAAM,KAAK,MAAM,IAAI,KACrB,MAAM,IAAI,MAAM,SAAS,MAAM,IAAI,MAAM,QAAQ,KACjD,MAAM,IAAI,MAAM,UAAU,MAAM,IAAI,MAAM,SAAS;;AAGrD,MAAM,OAAO,WAA2C;CACtD,MAAM,SAAU,OAA2C,MAAM;CACjE,OAAO,MAAM,QAAQ,MAAM,IAAI,OAAO,KAAK,MAAM,GAAG,WAAW,IAAI,CAAC;AACtE;;AAGA,MAAM,UAAU,WACd,CAAC,CAAC,OAAO,eAAe,IAAI,MAAM,CAAC,CAAC,SAAS,IAAI;;AAGnD,SAAgB,YACd,QACA,aACA,K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KAAK,IAAI;CAC5B,CAAC;CAED,IAAI,CAAC,OAAO,QAAQ,OAAO;CAC3B,OAAOC,cAAAA,EACL,KACA;EAAE,KAAK;EAAgB,OAAO;EAAmB,eAAe;CAAO,GACvE,OAAO,KAAK,MACVA,cAAAA,EACE,QACA;EACE,KAAK,EAAE;EACP,OAAO;GACL;GACA;GACA,aAAa,EAAE,SAAS;GACxB,EAAE,UAAU;EACd;EACA,OAAO,uBAAuBC,eAAAA,MAAM,EAAE,CAAC,EAAE,KAAKA,eAAAA,MAAM,EAAE,CAAC,EAAE;EACzD,eAAe;EACf,IAAI;CACN,GACA,EAAE,IACJ,CACF,CACF;AACF;;;;;;AAOA,SAAS,UAAU,MAAe,MAAY,OAAe,OAAsB;CACjF,MAAM,QAAQ,KAAK,QAAQ;CAC3B,MAAM,SAAS,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,OAAQ,KAAK,IAAe,KAAK,IAAI,KAAK;CACtF,MAAM,QAAQ,KAAK,QAAQ;CAC3B,OAAO,MAAM,SAAS,QAAQ,IAAI,KAAK,KAAK,UAAU,MAAM,UAAU;AACxE;;AAGA,MAAa,cAAwB,QAAQ,SAAS,aAAa,QACjE,eAAe,OAAO,MAAM,IAAI,CAAC,SAAS,YAAY,QAAQ,aAAa,GAAG,CAAC,IAAI"}
@@ -1,13 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_features = require("./features-BclHgg2W.cjs");
3
- const require_value_labels = require("./value-labels-B0WJoJ7x.cjs");
4
- //#region src/value-labels.ts
2
+ const require_value_labels = require("./value-labels-DzaKIWKp.cjs");
3
+ // src/value-labels.ts
5
4
  /**
6
5
  * Standalone entry: `import '@tabler/charts/value-labels'` enables
7
6
  * `valueLabels` (values written on the marks) on the core.
8
7
  */
9
- require_features.addPost(require_value_labels.labelsStep);
10
- //#endregion
8
+ require("./features-DEDP5CEQ.cjs").addPost(require_value_labels.labelsStep);
11
9
  exports.labelsStep = require_value_labels.labelsStep;
12
10
  exports.valueLabels = require_value_labels.valueLabels;
13
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"value-labels.cjs","names":["addPost","labelsStep"],"sources":["../src/value-labels.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/value-labels'` enables\n * `valueLabels` (values written on the marks) on the core.\n */\nimport { labelsStep, valueLabels } from './charts/value-labels.ts'\nimport { addPost } from './features.ts'\n\naddPost(labelsStep)\n\nexport type { ValueLabelOptions } from './charts/value-labels.ts'\nexport { labelsStep, valueLabels }\n"],"mappings":";;;;;;;;AAOAA,iBAAAA,QAAQC,qBAAAA,UAAU"}
1
+ {"version":3,"file":"value-labels.cjs","names":["addPost","labelsStep"],"sources":["../src/value-labels.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/value-labels'` enables\n * `valueLabels` (values written on the marks) on the core.\n */\nimport { labelsStep, valueLabels } from './charts/value-labels.ts'\nimport { addPost } from './features.ts'\n\naddPost(labelsStep)\n\nexport type { ValueLabelOptions } from './charts/value-labels.ts'\nexport { labelsStep, valueLabels }\n"],"mappings":";;;;;;;A,iCAOAA,CAAAA,CAAAA,QAAQC,qBAAAA,UAAU"}
@@ -1,2 +1,6 @@
1
- import { A as labelsStep, j as valueLabels, k as ValueLabelOptions } from "./chart-D7ooEFnk.cjs";
1
+ /**
2
+ * Standalone entry: `import '@tabler/charts/value-labels'` enables
3
+ * `valueLabels` (values written on the marks) on the core.
4
+ */
5
+ import { F as ValueLabelOptions, I as labelsStep, L as valueLabels } from "./chart-CbPzP5Dp.cjs";
2
6
  export { type ValueLabelOptions, labelsStep, valueLabels };
@@ -1,2 +1,6 @@
1
- import { A as labelsStep, j as valueLabels, k as ValueLabelOptions } from "./chart-DyN7bcx8.js";
1
+ /**
2
+ * Standalone entry: `import '@tabler/charts/value-labels'` enables
3
+ * `valueLabels` (values written on the marks) on the core.
4
+ */
5
+ import { F as ValueLabelOptions, I as labelsStep, L as valueLabels } from "./chart-CYrrUCi3.js";
2
6
  export { type ValueLabelOptions, labelsStep, valueLabels };
@@ -1,12 +1,11 @@
1
- import { t as addPost } from "./features-wASyHGic.js";
2
- import { n as valueLabels, t as labelsStep } from "./value-labels-IZIQPhfk.js";
3
- //#region src/value-labels.ts
1
+ import { n as valueLabels, t as labelsStep } from "./value-labels-C7GrhOXJ.js";
2
+ import { t as addPost } from "./features-B55rwpQC.js";
3
+ // src/value-labels.ts
4
4
  /**
5
5
  * Standalone entry: `import '@tabler/charts/value-labels'` enables
6
6
  * `valueLabels` (values written on the marks) on the core.
7
7
  */
8
8
  addPost(labelsStep);
9
- //#endregion
10
9
  export { labelsStep, valueLabels };
11
10
 
12
11
  //# sourceMappingURL=value-labels.js.map
@@ -1,4 +1,4 @@
1
- //#region src/vnode.ts
1
+ // src/vnode.ts
2
2
  /**
3
3
  * Create a virtual node.
4
4
  *
@@ -87,7 +87,6 @@ function flattenChildren(input, out) {
87
87
  else out.push(text);
88
88
  }
89
89
  }
90
- //#endregion
91
90
  Object.defineProperty(exports, "h", {
92
91
  enumerable: true,
93
92
  get: function() {
@@ -107,4 +106,4 @@ Object.defineProperty(exports, "normalizeStyle", {
107
106
  }
108
107
  });
109
108
 
110
- //# sourceMappingURL=vnode-CkQ27Cxe.cjs.map
109
+ //# sourceMappingURL=vnode-ClAiw28x.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"vnode-CkQ27Cxe.cjs","names":[],"sources":["../src/vnode.ts"],"sourcesContent":["/**\n * Minimal virtual node tree shared by the string (SSR) and DOM renderers.\n *\n * VNodes are plain, serializable data: no event handlers, no component\n * functions. Interaction is handled by event delegation on the root element,\n * so the same tree can be rendered on the server, in a worker or in tests.\n */\n\n/** Value accepted for a single attribute. `false`, `null`, `undefined` and non-finite numbers omit it. */\nexport type AttrValue = string | number | boolean | null | undefined\n\n/** Normalized attributes stored on a {@link VNode}. */\nexport type Attrs = Record<string, string | number>\n\n/** Identity used by the DOM renderer to match nodes between renders. */\nexport type Key = string | number\n\n/** Class list: strings, falsy values (skipped) and nested arrays. */\nexport type ClassValue = string | false | null | undefined | ClassValue[]\n\n/** Inline styles: a raw string or a map of properties (custom properties included). */\nexport type StyleValue = string | Record<string, string | number | null | undefined>\n\n/** Props accepted by {@link h}. */\nexport interface Props {\n [name: string]: AttrValue | ClassValue | StyleValue\n key?: Key | null | undefined\n class?: ClassValue\n style?: StyleValue | null | undefined\n}\n\n/** A normalized child: an element node or a text node. */\nexport type Child = VNode | string\n\n/** Anything that can be passed as a child to {@link h}; falsy values are skipped. */\nexport type ChildInput = Child | number | boolean | null | undefined | ChildInput[]\n\nexport interface VNode {\n /** Element name, e.g. `svg`, `g`, `path`. */\n tag: string\n /** Normalized attributes, without `key`. */\n attrs: Attrs\n /** Flattened children with adjacent text merged. */\n children: Child[]\n /** Optional identity used by the keyed DOM patcher. */\n key: Key | undefined\n /**\n * The arc a path draws (radii, angles, pad angle, corner radius), kept out\n * of the markup: the DOM patcher sweeps from the arc of the last render to\n * this one (see `sweep`).\n */\n arc?: readonly number[]\n}\n\n/**\n * Create a virtual node.\n *\n * ```ts\n * h('g', { class: ['tc-series', `tc-series-${i}`], key: series.id },\n * h('path', { class: 'tc-line', d }),\n * )\n * ```\n */\nexport function h(tag: string, props?: Props | null, ...children: ChildInput[]): VNode {\n const attrs: Attrs = {}\n let key: Key | undefined\n\n if (props) {\n for (const name in props) {\n const value = props[name]\n if (name === 'key') {\n if (value != null) key = value as Key\n } else if (name === 'class') {\n const cls = normalizeClass(value as ClassValue)\n if (cls) attrs.class = cls\n } else if (name === 'style') {\n const style = normalizeStyle(value as StyleValue | null | undefined)\n if (style) attrs.style = style\n } else if (value === true) {\n attrs[name] = ''\n } else if (typeof value === 'string') {\n attrs[name] = value\n } else if (typeof value === 'number' && Number.isFinite(value)) {\n attrs[name] = value\n }\n }\n }\n\n const out: Child[] = []\n flattenChildren(children, out)\n\n return { tag, attrs, children: out, key }\n}\n\n/** Join a class value into a space separated string. */\nexport function normalizeClass(value: ClassValue): string {\n if (!value) return ''\n if (typeof value === 'string') return value\n let result = ''\n for (const item of value) {\n const cls = normalizeClass(item)\n if (cls) result = result ? `${result} ${cls}` : cls\n }\n return result\n}\n\n/**\n * Values that could leave their declaration (`;`, braces, quotes, escapes,\n * comments) or load something (`url()` and friends). Colors and dashes often\n * come from user data, and `red;position:fixed` would restyle the chart's\n * elements, `url(…)` would make the browser request it. A reference to an\n * element of the page, `url(#id)` (pattern fills), loads nothing and passes.\n */\nconst UNSAFE =\n /[;{}<>\"'\\\\]|\\/\\*|\\b(?:url(?!\\(#[\\w-]+\\))|src|attr|image|image-set|cross-fade|element|expression)\\s*\\(/i\n\n/**\n * Serialize a style value into a CSS declaration list. In a map, values that\n * could inject CSS (see {@link UNSAFE}) are left out, so use one for values\n * from data; a raw string is taken as it is.\n */\nexport function normalizeStyle(value: StyleValue | null | undefined): string {\n if (!value) return ''\n if (typeof value === 'string') return value\n let result = ''\n for (const prop in value) {\n const v = value[prop]\n if (v == null || v === '' || UNSAFE.test(String(v))) continue\n result += `${result ? ';' : ''}${prop}:${v}`\n }\n return result\n}\n\nfunction flattenChildren(input: ChildInput[], out: Child[]): void {\n for (const child of input) {\n if (child == null || typeof child === 'boolean') continue\n if (Array.isArray(child)) {\n flattenChildren(child, out)\n continue\n }\n if (typeof child === 'object') {\n out.push(child)\n continue\n }\n const text = String(child)\n if (text === '') continue\n const last = out.length - 1\n if (last >= 0 && typeof out[last] === 'string') {\n out[last] += text\n } else {\n out.push(text)\n }\n }\n}\n"],"mappings":";;;;;;;;;;AA+DA,SAAgB,EAAE,KAAa,OAAsB,GAAG,UAA+B;CACrF,MAAM,QAAe,CAAC;CACtB,IAAI;CAEJ,IAAI,OACF,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,QAAQ,MAAM;EACpB,IAAI,SAAS,OACP;OAAA,SAAS,MAAM,MAAM;EAAA,OACpB,IAAI,SAAS,SAAS;GAC3B,MAAM,MAAM,eAAe,KAAmB;GAC9C,IAAI,KAAK,MA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AAO,KAAK;EACzB,IAAI,SAAS,IAAI;EACjB,MAAM,OAAO,IAAI,SAAS;EAC1B,IAAI,QAAQ,KAAK,OAAO,IAAI,UAAU,UACpC,IAAI,SAAS;OAEb,IAAI,KAAK,IAAI;CAEjB;AACF"}
1
+ {"version":3,"file":"vnode-ClAiw28x.cjs","names":[],"sources":["../src/vnode.ts"],"sourcesContent":["/**\n * Minimal virtual node tree shared by the string (SSR) and DOM renderers.\n *\n * VNodes are plain, serializable data: no event handlers, no component\n * functions. Interaction is handled by event delegation on the root element,\n * so the same tree can be rendered on the server, in a worker or in tests.\n */\n\n/** Value accepted for a single attribute. `false`, `null`, `undefined` and non-finite numbers omit it. */\nexport type AttrValue = string | number | boolean | null | undefined\n\n/** Normalized attributes stored on a {@link VNode}. */\nexport type Attrs = Record<string, string | number>\n\n/** Identity used by the DOM renderer to match nodes between renders. */\nexport type Key = string | number\n\n/** Class list: strings, falsy values (skipped) and nested arrays. */\nexport type ClassValue = string | false | null | undefined | ClassValue[]\n\n/** Inline styles: a raw string or a map of properties (custom properties included). */\nexport type StyleValue = string | Record<string, string | number | null | undefined>\n\n/** Props accepted by {@link h}. */\nexport interface Props {\n [name: string]: AttrValue | ClassValue | StyleValue\n key?: Key | null | undefined\n class?: ClassValue\n style?: StyleValue | null | undefined\n}\n\n/** A normalized child: an element node or a text node. */\nexport type Child = VNode | string\n\n/** Anything that can be passed as a child to {@link h}; falsy values are skipped. */\nexport type ChildInput = Child | number | boolean | null | undefined | ChildInput[]\n\nexport interface VNode {\n /** Element name, e.g. `svg`, `g`, `path`. */\n tag: string\n /** Normalized attributes, without `key`. */\n attrs: Attrs\n /** Flattened children with adjacent text merged. */\n children: Child[]\n /** Optional identity used by the keyed DOM patcher. */\n key: Key | undefined\n /**\n * The arc a path draws (radii, angles, pad angle, corner radius), kept out\n * of the markup: the DOM patcher sweeps from the arc of the last render to\n * this one (see `sweep`).\n */\n arc?: readonly number[]\n}\n\n/**\n * Create a virtual node.\n *\n * ```ts\n * h('g', { class: ['tc-series', `tc-series-${i}`], key: series.id },\n * h('path', { class: 'tc-line', d }),\n * )\n * ```\n */\nexport function h(tag: string, props?: Props | null, ...children: ChildInput[]): VNode {\n const attrs: Attrs = {}\n let key: Key | undefined\n\n if (props) {\n for (const name in props) {\n const value = props[name]\n if (name === 'key') {\n if (value != null) key = value as Key\n } else if (name === 'class') {\n const cls = normalizeClass(value as ClassValue)\n if (cls) attrs.class = cls\n } else if (name === 'style') {\n const style = normalizeStyle(value as StyleValue | null | undefined)\n if (style) attrs.style = style\n } else if (value === true) {\n attrs[name] = ''\n } else if (typeof value === 'string') {\n attrs[name] = value\n } else if (typeof value === 'number' && Number.isFinite(value)) {\n attrs[name] = value\n }\n }\n }\n\n const out: Child[] = []\n flattenChildren(children, out)\n\n return { tag, attrs, children: out, key }\n}\n\n/** Join a class value into a space separated string. */\nexport function normalizeClass(value: ClassValue): string {\n if (!value) return ''\n if (typeof value === 'string') return value\n let result = ''\n for (const item of value) {\n const cls = normalizeClass(item)\n if (cls) result = result ? `${result} ${cls}` : cls\n }\n return result\n}\n\n/**\n * Values that could leave their declaration (`;`, braces, quotes, escapes,\n * comments) or load something (`url()` and friends). Colors and dashes often\n * come from user data, and `red;position:fixed` would restyle the chart's\n * elements, `url(…)` would make the browser request it. A reference to an\n * element of the page, `url(#id)` (pattern fills), loads nothing and passes.\n */\nconst UNSAFE =\n /[;{}<>\"'\\\\]|\\/\\*|\\b(?:url(?!\\(#[\\w-]+\\))|src|attr|image|image-set|cross-fade|element|expression)\\s*\\(/i\n\n/**\n * Serialize a style value into a CSS declaration list. In a map, values that\n * could inject CSS (see {@link UNSAFE}) are left out, so use one for values\n * from data; a raw string is taken as it is.\n */\nexport function normalizeStyle(value: StyleValue | null | undefined): string {\n if (!value) return ''\n if (typeof value === 'string') return value\n let result = ''\n for (const prop in value) {\n const v = value[prop]\n if (v == null || v === '' || UNSAFE.test(String(v))) continue\n result += `${result ? ';' : ''}${prop}:${v}`\n }\n return result\n}\n\nfunction flattenChildren(input: ChildInput[], out: Child[]): void {\n for (const child of input) {\n if (child == null || typeof child === 'boolean') continue\n if (Array.isArray(child)) {\n flattenChildren(child, out)\n continue\n }\n if (typeof child === 'object') {\n out.push(child)\n continue\n }\n const text = String(child)\n if (text === '') continue\n const last = out.length - 1\n if (last >= 0 && typeof out[last] === 'string') {\n out[last] += text\n } else {\n out.push(text)\n }\n }\n}\n"],"mappings":";;;;;;;;;;AA+DA,SAAgB,EAAE,KAAa,OAAsB,GAAG,UAA+B;CACrF,MAAM,QAAe,CAAC;CACtB,IAAI;CAEJ,IAAI,OACF,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,QAAQ,MAAM;EACpB,IAAI,SAAS,OACP;OAAA,SAAS,MAAM,MAAM;EAAA,OACpB,IAAI,SAAS,SAAS;GAC3B,MAAM,MAAM,eAAe,KAAmB;GAC9C,IAAI,KAAK,MAAM,QAAQ;EACzB,OAAO,IAAI,SAAS,SAAS;GAC3B,MAAM,QAAQ,eAAe,KAAsC;GACnE,IAAI,OAAO,MAAM,QAAQ;EAC3B,OAAO,IAAI,UAAU,MACnB,MAAM,QAAQ;OACT,IAAI,OAAO,UAAU,UAC1B,MAAM,QAAQ;OACT,IAAI,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,GAC3D,MAAM,QAAQ;CAElB;CAGF,MAAM,MAAe,CAAC;CACtB,gBAAgB,UAAU,GAAG;CAE7B,OAAO;EAAE;EAAK;EAAO,UAAU;EAAK;CAAI;AAC1C;;AAGA,SAAgB,eAAe,OAA2B;CACxD,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,SAAS;CACb,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,MAAM,eAAe,IAAI;EAC/B,IAAI,KAAK,SAAS,SAAS,GAAG,OAAO,GAAG,QAAQ;CAClD;CACA,OAAO;AACT;;;;;;;;AASA,MAAM,SACJ;;;;;;AAOF,SAAgB,eAAe,OAA8C;CAC3E,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,SAAS;CACb,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,IAAI,MAAM;EAChB,IAAI,KAAK,QAAQ,MAAM,MAAM,OAAO,KAAK,OAAO,CAAC,CAAC,GAAG;EACrD,UAAU,GAAG,SAAS,MAAM,KAAK,KAAK,GAAG;CAC3C;CACA,OAAO;AACT;AAEA,SAAS,gBAAgB,OAAqB,KAAoB;CAChE,KAAK,MAAM,SAAS,OAAO;EACzB,IAAI,SAAS,QAAQ,OAAO,UAAU,WAAW;EACjD,IAAI,MAAM,QAAQ,KAAK,GAAG;GACxB,gBAAgB,OAAO,GAAG;GAC1B;EACF;EACA,IAAI,OAAO,UAAU,UAAU;GAC7B,IAAI,KAAK,KAAK;GACd;EACF;EACA,MAAM,OAAO,OAAO,KAAK;EACzB,IAAI,SAAS,IAAI;EACjB,MAAM,OAAO,IAAI,SAAS;EAC1B,IAAI,QAAQ,KAAK,OAAO,IAAI,UAAU,UACpC,IAAI,SAAS;OAEb,IAAI,KAAK,IAAI;CAEjB;AACF"}
@@ -1,4 +1,3 @@
1
- //#region src/vnode.d.ts
2
1
  /**
3
2
  * Minimal virtual node tree shared by the string (SSR) and DOM renderers.
4
3
  *
@@ -61,6 +60,4 @@ declare function normalizeClass(value: ClassValue): string;
61
60
  * from data; a raw string is taken as it is.
62
61
  */
63
62
  declare function normalizeStyle(value: StyleValue | null | undefined): string;
64
- //#endregion
65
- export { ClassValue as a, StyleValue as c, normalizeClass as d, normalizeStyle as f, ChildInput as i, VNode as l, Attrs as n, Key as o, Child as r, Props as s, AttrValue as t, h as u };
66
- //# sourceMappingURL=vnode-BUflsBsa.d.ts.map
63
+ export { ClassValue as a, StyleValue as c, normalizeClass as d, normalizeStyle as f, ChildInput as i, VNode as l, Attrs as n, Key as o, Child as r, Props as s, AttrValue as t, h as u };
@@ -1,4 +1,3 @@
1
- //#region src/vnode.d.ts
2
1
  /**
3
2
  * Minimal virtual node tree shared by the string (SSR) and DOM renderers.
4
3
  *
@@ -61,6 +60,4 @@ declare function normalizeClass(value: ClassValue): string;
61
60
  * from data; a raw string is taken as it is.
62
61
  */
63
62
  declare function normalizeStyle(value: StyleValue | null | undefined): string;
64
- //#endregion
65
- export { ClassValue as a, StyleValue as c, normalizeClass as d, normalizeStyle as f, ChildInput as i, VNode as l, Attrs as n, Key as o, Child as r, Props as s, AttrValue as t, h as u };
66
- //# sourceMappingURL=vnode-BUflsBsa.d.cts.map
63
+ export { ClassValue as a, StyleValue as c, normalizeClass as d, normalizeStyle as f, ChildInput as i, VNode as l, Attrs as n, Key as o, Child as r, Props as s, AttrValue as t, h as u };
@@ -1,4 +1,4 @@
1
- //#region src/vnode.ts
1
+ // src/vnode.ts
2
2
  /**
3
3
  * Create a virtual node.
4
4
  *
@@ -87,7 +87,6 @@ function flattenChildren(input, out) {
87
87
  else out.push(text);
88
88
  }
89
89
  }
90
- //#endregion
91
90
  export { normalizeClass as n, normalizeStyle as r, h as t };
92
91
 
93
- //# sourceMappingURL=vnode-tCWItoUH.js.map
92
+ //# sourceMappingURL=vnode-_EMUqysL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vnode-tCWItoUH.js","names":[],"sources":["../src/vnode.ts"],"sourcesContent":["/**\n * Minimal virtual node tree shared by the string (SSR) and DOM renderers.\n *\n * VNodes are plain, serializable data: no event handlers, no component\n * functions. Interaction is handled by event delegation on the root element,\n * so the same tree can be rendered on the server, in a worker or in tests.\n */\n\n/** Value accepted for a single attribute. `false`, `null`, `undefined` and non-finite numbers omit it. */\nexport type AttrValue = string | number | boolean | null | undefined\n\n/** Normalized attributes stored on a {@link VNode}. */\nexport type Attrs = Record<string, string | number>\n\n/** Identity used by the DOM renderer to match nodes between renders. */\nexport type Key = string | number\n\n/** Class list: strings, falsy values (skipped) and nested arrays. */\nexport type ClassValue = string | false | null | undefined | ClassValue[]\n\n/** Inline styles: a raw string or a map of properties (custom properties included). */\nexport type StyleValue = string | Record<string, string | number | null | undefined>\n\n/** Props accepted by {@link h}. */\nexport interface Props {\n [name: string]: AttrValue | ClassValue | StyleValue\n key?: Key | null | undefined\n class?: ClassValue\n style?: StyleValue | null | undefined\n}\n\n/** A normalized child: an element node or a text node. */\nexport type Child = VNode | string\n\n/** Anything that can be passed as a child to {@link h}; falsy values are skipped. */\nexport type ChildInput = Child | number | boolean | null | undefined | ChildInput[]\n\nexport interface VNode {\n /** Element name, e.g. `svg`, `g`, `path`. */\n tag: string\n /** Normalized attributes, without `key`. */\n attrs: Attrs\n /** Flattened children with adjacent text merged. */\n children: Child[]\n /** Optional identity used by the keyed DOM patcher. */\n key: Key | undefined\n /**\n * The arc a path draws (radii, angles, pad angle, corner radius), kept out\n * of the markup: the DOM patcher sweeps from the arc of the last render to\n * this one (see `sweep`).\n */\n arc?: readonly number[]\n}\n\n/**\n * Create a virtual node.\n *\n * ```ts\n * h('g', { class: ['tc-series', `tc-series-${i}`], key: series.id },\n * h('path', { class: 'tc-line', d }),\n * )\n * ```\n */\nexport function h(tag: string, props?: Props | null, ...children: ChildInput[]): VNode {\n const attrs: Attrs = {}\n let key: Key | undefined\n\n if (props) {\n for (const name in props) {\n const value = props[name]\n if (name === 'key') {\n if (value != null) key = value as Key\n } else if (name === 'class') {\n const cls = normalizeClass(value as ClassValue)\n if (cls) attrs.class = cls\n } else if (name === 'style') {\n const style = normalizeStyle(value as StyleValue | null | undefined)\n if (style) attrs.style = style\n } else if (value === true) {\n attrs[name] = ''\n } else if (typeof value === 'string') {\n attrs[name] = value\n } else if (typeof value === 'number' && Number.isFinite(value)) {\n attrs[name] = value\n }\n }\n }\n\n const out: Child[] = []\n flattenChildren(children, out)\n\n return { tag, attrs, children: out, key }\n}\n\n/** Join a class value into a space separated string. */\nexport function normalizeClass(value: ClassValue): string {\n if (!value) return ''\n if (typeof value === 'string') return value\n let result = ''\n for (const item of value) {\n const cls = normalizeClass(item)\n if (cls) result = result ? `${result} ${cls}` : cls\n }\n return result\n}\n\n/**\n * Values that could leave their declaration (`;`, braces, quotes, escapes,\n * comments) or load something (`url()` and friends). Colors and dashes often\n * come from user data, and `red;position:fixed` would restyle the chart's\n * elements, `url(…)` would make the browser request it. A reference to an\n * element of the page, `url(#id)` (pattern fills), loads nothing and passes.\n */\nconst UNSAFE =\n /[;{}<>\"'\\\\]|\\/\\*|\\b(?:url(?!\\(#[\\w-]+\\))|src|attr|image|image-set|cross-fade|element|expression)\\s*\\(/i\n\n/**\n * Serialize a style value into a CSS declaration list. In a map, values that\n * could inject CSS (see {@link UNSAFE}) are left out, so use one for values\n * from data; a raw string is taken as it is.\n */\nexport function normalizeStyle(value: StyleValue | null | undefined): string {\n if (!value) return ''\n if (typeof value === 'string') return value\n let result = ''\n for (const prop in value) {\n const v = value[prop]\n if (v == null || v === '' || UNSAFE.test(String(v))) continue\n result += `${result ? ';' : ''}${prop}:${v}`\n }\n return result\n}\n\nfunction flattenChildren(input: ChildInput[], out: Child[]): void {\n for (const child of input) {\n if (child == null || typeof child === 'boolean') continue\n if (Array.isArray(child)) {\n flattenChildren(child, out)\n continue\n }\n if (typeof child === 'object') {\n out.push(child)\n continue\n }\n const text = String(child)\n if (text === '') continue\n const last = out.length - 1\n if (last >= 0 && typeof out[last] === 'string') {\n out[last] += text\n } else {\n out.push(text)\n }\n }\n}\n"],"mappings":";;;;;;;;;;AA+DA,SAAgB,EAAE,KAAa,OAAsB,GAAG,UAA+B;CACrF,MAAM,QAAe,CAAC;CACtB,IAAI;CAEJ,IAAI,OACF,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,QAAQ,MAAM;EACpB,IAAI,SAAS,OACP;OAAA,SAAS,MAAM,MAAM;EAAA,OACpB,IAAI,SAAS,SAAS;GAC3B,MAAM,MAAM,eAAe,KAAmB;GAC9C,IAAI,KAAK,MAAM,QAAQ;EACzB,OAAO,IAAI,SAAS,SAAS;GAC3B,MAAM,QAAQ,eAAe,KAAsC;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AI,QAAQ,KAAK,OAAO,IAAI,UAAU,UACpC,IAAI,SAAS;OAEb,IAAI,KAAK,IAAI;CAEjB;AACF"}
1
+ {"version":3,"file":"vnode-_EMUqysL.js","names":[],"sources":["../src/vnode.ts"],"sourcesContent":["/**\n * Minimal virtual node tree shared by the string (SSR) and DOM renderers.\n *\n * VNodes are plain, serializable data: no event handlers, no component\n * functions. Interaction is handled by event delegation on the root element,\n * so the same tree can be rendered on the server, in a worker or in tests.\n */\n\n/** Value accepted for a single attribute. `false`, `null`, `undefined` and non-finite numbers omit it. */\nexport type AttrValue = string | number | boolean | null | undefined\n\n/** Normalized attributes stored on a {@link VNode}. */\nexport type Attrs = Record<string, string | number>\n\n/** Identity used by the DOM renderer to match nodes between renders. */\nexport type Key = string | number\n\n/** Class list: strings, falsy values (skipped) and nested arrays. */\nexport type ClassValue = string | false | null | undefined | ClassValue[]\n\n/** Inline styles: a raw string or a map of properties (custom properties included). */\nexport type StyleValue = string | Record<string, string | number | null | undefined>\n\n/** Props accepted by {@link h}. */\nexport interface Props {\n [name: string]: AttrValue | ClassValue | StyleValue\n key?: Key | null | undefined\n class?: ClassValue\n style?: StyleValue | null | undefined\n}\n\n/** A normalized child: an element node or a text node. */\nexport type Child = VNode | string\n\n/** Anything that can be passed as a child to {@link h}; falsy values are skipped. */\nexport type ChildInput = Child | number | boolean | null | undefined | ChildInput[]\n\nexport interface VNode {\n /** Element name, e.g. `svg`, `g`, `path`. */\n tag: string\n /** Normalized attributes, without `key`. */\n attrs: Attrs\n /** Flattened children with adjacent text merged. */\n children: Child[]\n /** Optional identity used by the keyed DOM patcher. */\n key: Key | undefined\n /**\n * The arc a path draws (radii, angles, pad angle, corner radius), kept out\n * of the markup: the DOM patcher sweeps from the arc of the last render to\n * this one (see `sweep`).\n */\n arc?: readonly number[]\n}\n\n/**\n * Create a virtual node.\n *\n * ```ts\n * h('g', { class: ['tc-series', `tc-series-${i}`], key: series.id },\n * h('path', { class: 'tc-line', d }),\n * )\n * ```\n */\nexport function h(tag: string, props?: Props | null, ...children: ChildInput[]): VNode {\n const attrs: Attrs = {}\n let key: Key | undefined\n\n if (props) {\n for (const name in props) {\n const value = props[name]\n if (name === 'key') {\n if (value != null) key = value as Key\n } else if (name === 'class') {\n const cls = normalizeClass(value as ClassValue)\n if (cls) attrs.class = cls\n } else if (name === 'style') {\n const style = normalizeStyle(value as StyleValue | null | undefined)\n if (style) attrs.style = style\n } else if (value === true) {\n attrs[name] = ''\n } else if (typeof value === 'string') {\n attrs[name] = value\n } else if (typeof value === 'number' && Number.isFinite(value)) {\n attrs[name] = value\n }\n }\n }\n\n const out: Child[] = []\n flattenChildren(children, out)\n\n return { tag, attrs, children: out, key }\n}\n\n/** Join a class value into a space separated string. */\nexport function normalizeClass(value: ClassValue): string {\n if (!value) return ''\n if (typeof value === 'string') return value\n let result = ''\n for (const item of value) {\n const cls = normalizeClass(item)\n if (cls) result = result ? `${result} ${cls}` : cls\n }\n return result\n}\n\n/**\n * Values that could leave their declaration (`;`, braces, quotes, escapes,\n * comments) or load something (`url()` and friends). Colors and dashes often\n * come from user data, and `red;position:fixed` would restyle the chart's\n * elements, `url(…)` would make the browser request it. A reference to an\n * element of the page, `url(#id)` (pattern fills), loads nothing and passes.\n */\nconst UNSAFE =\n /[;{}<>\"'\\\\]|\\/\\*|\\b(?:url(?!\\(#[\\w-]+\\))|src|attr|image|image-set|cross-fade|element|expression)\\s*\\(/i\n\n/**\n * Serialize a style value into a CSS declaration list. In a map, values that\n * could inject CSS (see {@link UNSAFE}) are left out, so use one for values\n * from data; a raw string is taken as it is.\n */\nexport function normalizeStyle(value: StyleValue | null | undefined): string {\n if (!value) return ''\n if (typeof value === 'string') return value\n let result = ''\n for (const prop in value) {\n const v = value[prop]\n if (v == null || v === '' || UNSAFE.test(String(v))) continue\n result += `${result ? ';' : ''}${prop}:${v}`\n }\n return result\n}\n\nfunction flattenChildren(input: ChildInput[], out: Child[]): void {\n for (const child of input) {\n if (child == null || typeof child === 'boolean') continue\n if (Array.isArray(child)) {\n flattenChildren(child, out)\n continue\n }\n if (typeof child === 'object') {\n out.push(child)\n continue\n }\n const text = String(child)\n if (text === '') continue\n const last = out.length - 1\n if (last >= 0 && typeof out[last] === 'string') {\n out[last] += text\n } else {\n out.push(text)\n }\n }\n}\n"],"mappings":";;;;;;;;;;AA+DA,SAAgB,EAAE,KAAa,OAAsB,GAAG,UAA+B;CACrF,MAAM,QAAe,CAAC;CACtB,IAAI;CAEJ,IAAI,OACF,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,QAAQ,MAAM;EACpB,IAAI,SAAS,OACP;OAAA,SAAS,MAAM,MAAM;EAAA,OACpB,IAAI,SAAS,SAAS;GAC3B,MAAM,MAAM,eAAe,KAAmB;GAC9C,IAAI,KAAK,MAAM,QAAQ;EACzB,OAAO,IAAI,SAAS,SAAS;GAC3B,MAAM,QAAQ,eAAe,KAAsC;GACnE,IAAI,OAAO,MAAM,QAAQ;EAC3B,OAAO,IAAI,UAAU,MACnB,MAAM,QAAQ;OACT,IAAI,OAAO,UAAU,UAC1B,MAAM,QAAQ;OACT,IAAI,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,GAC3D,MAAM,QAAQ;CAElB;CAGF,MAAM,MAAe,CAAC;CACtB,gBAAgB,UAAU,GAAG;CAE7B,OAAO;EAAE;EAAK;EAAO,UAAU;EAAK;CAAI;AAC1C;;AAGA,SAAgB,eAAe,OAA2B;CACxD,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,SAAS;CACb,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,MAAM,eAAe,IAAI;EAC/B,IAAI,KAAK,SAAS,SAAS,GAAG,OAAO,GAAG,QAAQ;CAClD;CACA,OAAO;AACT;;;;;;;;AASA,MAAM,SACJ;;;;;;AAOF,SAAgB,eAAe,OAA8C;CAC3E,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,OAAO,UAAU,UAAU,OAA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