@tabler/charts 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/dist/{annotations-Bp7HwtF5.d.ts → annotations-B02GR_KU.d.ts} +3 -8
- package/dist/{annotations-lyt0I3HU.d.cts → annotations-CHafaGd4.d.cts} +3 -8
- package/dist/{annotations-BszTTjf9.js → annotations-D0YQ0IoA.js} +6 -7
- package/dist/{annotations-BszTTjf9.js.map → annotations-D0YQ0IoA.js.map} +1 -1
- package/dist/{annotations-DpETO8dE.cjs → annotations-DdRdeBUB.cjs} +6 -7
- package/dist/{annotations-DpETO8dE.cjs.map → annotations-DdRdeBUB.cjs.map} +1 -1
- package/dist/annotations.cjs +3 -5
- package/dist/annotations.cjs.map +1 -1
- package/dist/annotations.d.cts +2 -1
- package/dist/annotations.d.ts +2 -1
- package/dist/annotations.js +3 -4
- package/dist/{arc-a1tRTEw7.js → arc-B3V5IR0w.js} +2 -3
- package/dist/{arc-a1tRTEw7.js.map → arc-B3V5IR0w.js.map} +1 -1
- package/dist/{arc-BXpLrt9b.cjs → arc-CYhI62kO.cjs} +2 -3
- package/dist/{arc-BXpLrt9b.cjs.map → arc-CYhI62kO.cjs.map} +1 -1
- package/dist/{area-DQsLERhx.js → area-0-L1bG9B.js} +5 -6
- package/dist/{area-DQsLERhx.js.map → area-0-L1bG9B.js.map} +1 -1
- package/dist/{area-sHCE3pg5.cjs → area-4eRs3c0K.cjs} +5 -6
- package/dist/{area-sHCE3pg5.cjs.map → area-4eRs3c0K.cjs.map} +1 -1
- package/dist/{area-CF__HOwL.d.ts → area-CJX9219z.d.cts} +3 -6
- package/dist/{area-DIxaAbYZ.d.cts → area-d11XePuw.d.ts} +3 -6
- package/dist/area.cjs +1 -1
- package/dist/area.d.cts +2 -1
- package/dist/area.d.ts +2 -1
- package/dist/area.js +1 -2
- package/dist/{band-DTcNDAFO.d.ts → band-CNKvdnTC.d.cts} +1 -4
- package/dist/{band-DTcNDAFO.d.cts → band-CNKvdnTC.d.ts} +1 -4
- package/dist/{bar-DM16NUvV.js → bar-B5n2oq9-.js} +3 -4
- package/dist/{bar-DM16NUvV.js.map → bar-B5n2oq9-.js.map} +1 -1
- package/dist/{bar-BBM8RhoL.d.ts → bar-BDLR4p9c.d.cts} +4 -7
- package/dist/{bar-jZEoao74.js → bar-BNZ3GhIw.js} +20 -20
- package/dist/bar-BNZ3GhIw.js.map +1 -0
- package/dist/{bar-C-7zR2qp.cjs → bar-Da6dE_nI.cjs} +20 -20
- package/dist/bar-Da6dE_nI.cjs.map +1 -0
- package/dist/{bar-DGuUN3nc.cjs → bar-LYIF8MEz.cjs} +3 -4
- package/dist/{bar-DGuUN3nc.cjs.map → bar-LYIF8MEz.cjs.map} +1 -1
- package/dist/{bar-CRKLDg98.d.cts → bar-XwzM6Pb0.d.ts} +4 -7
- package/dist/bar.cjs +1 -1
- package/dist/bar.d.cts +2 -1
- package/dist/bar.d.ts +2 -1
- package/dist/bar.js +1 -2
- package/dist/{candlestick-DuXwAFID.js → candlestick-BHQkQfxH.js} +6 -7
- package/dist/{candlestick-DuXwAFID.js.map → candlestick-BHQkQfxH.js.map} +1 -1
- package/dist/{candlestick-B5r1w3kc.cjs → candlestick-CYCQXgky.cjs} +6 -7
- package/dist/{candlestick-B5r1w3kc.cjs.map → candlestick-CYCQXgky.cjs.map} +1 -1
- package/dist/{candlestick-D_vV0_XZ.d.ts → candlestick-D0xKkdqd.d.ts} +3 -6
- package/dist/{candlestick-__pXl_pV.d.cts → candlestick-Dq7qp-F0.d.cts} +3 -6
- package/dist/candlestick.cjs +4 -5
- package/dist/candlestick.d.cts +1 -1
- package/dist/candlestick.d.ts +1 -1
- package/dist/candlestick.js +4 -6
- package/dist/{cartesian-Cr0AF0nG.js → cartesian-CI2x6N7N.js} +27 -27
- package/dist/cartesian-CI2x6N7N.js.map +1 -0
- package/dist/{cartesian-BoDfgBCV.cjs → cartesian-DV02PsBe.cjs} +27 -27
- package/dist/cartesian-DV02PsBe.cjs.map +1 -0
- package/dist/{chart-BF2CK9I_.js → chart-DWn9v6qw.js} +35 -24
- package/dist/chart-DWn9v6qw.js.map +1 -0
- package/dist/{chart-DyN7bcx8.d.ts → chart-QilhWP8Z.d.ts} +32 -49
- package/dist/{chart-CowF_lWY.cjs → chart-e2VqomCI.cjs} +35 -24
- package/dist/chart-e2VqomCI.cjs.map +1 -0
- package/dist/{chart-D7ooEFnk.d.cts → chart-kqFMEwDo.d.cts} +58 -49
- package/dist/{circle-BQMuAfls.cjs → circle-Bwxy5j7B.cjs} +2 -3
- package/dist/{circle-BQMuAfls.cjs.map → circle-Bwxy5j7B.cjs.map} +1 -1
- package/dist/{circle-Z7YfCoCM.js → circle-YRDaOBpk.js} +2 -3
- package/dist/{circle-Z7YfCoCM.js.map → circle-YRDaOBpk.js.map} +1 -1
- package/dist/{clean-o1vDEhFV.js → clean-CkoQobGv.js} +3 -4
- package/dist/{clean-o1vDEhFV.js.map → clean-CkoQobGv.js.map} +1 -1
- package/dist/{clean-Byl6kzf0.cjs → clean-Die2iCNc.cjs} +8 -3
- package/dist/{clean-Byl6kzf0.cjs.map → clean-Die2iCNc.cjs.map} +1 -1
- package/dist/{core-CegR_j55.js → core-BKRQvPAT.js} +33 -41
- package/dist/core-BKRQvPAT.js.map +1 -0
- package/dist/{core-RzS9IQO5.cjs → core-DIOC61up.cjs} +33 -41
- package/dist/core-DIOC61up.cjs.map +1 -0
- package/dist/{core-DcbemzGf.d.ts → core-DRUCk67j.d.ts} +4 -41
- package/dist/{core-D1vO1LrC.d.cts → core-PAX5ogLk.d.cts} +22 -67
- package/dist/core.cjs +28 -24
- package/dist/core.d.cts +23 -21
- package/dist/core.d.ts +23 -21
- package/dist/core.js +27 -25
- package/dist/{dates-CG-FvioW.js → dates-C2RzY3rE.js} +4 -5
- package/dist/{dates-CG-FvioW.js.map → dates-C2RzY3rE.js.map} +1 -1
- package/dist/{dates-Btm7Zm6W.cjs → dates-DurEr9WT.cjs} +4 -5
- package/dist/{dates-Btm7Zm6W.cjs.map → dates-DurEr9WT.cjs.map} +1 -1
- package/dist/{decimate-tLhDk1ys.cjs → decimate-BS3x8g-f.cjs} +2 -3
- package/dist/{decimate-tLhDk1ys.cjs.map → decimate-BS3x8g-f.cjs.map} +1 -1
- package/dist/{decimate-BGg9XgF0.d.ts → decimate-BxxYBJJk.d.cts} +2 -5
- package/dist/{decimate-C87cl_Sp.js → decimate-CapfgiDY.js} +2 -3
- package/dist/{decimate-C87cl_Sp.js.map → decimate-CapfgiDY.js.map} +1 -1
- package/dist/{decimate-CNSpgGa5.d.cts → decimate-Du87fMLG.d.ts} +2 -5
- package/dist/decimate.cjs +3 -4
- package/dist/decimate.d.cts +1 -1
- package/dist/decimate.d.ts +1 -1
- package/dist/decimate.js +3 -4
- package/dist/{dom-vP3IcMak.js → dom-CuceR8gt.js} +4 -6
- package/dist/{dom-vP3IcMak.js.map → dom-CuceR8gt.js.map} +1 -1
- package/dist/{dom-CLF868Qs.cjs → dom-D_g13XWY.cjs} +4 -6
- package/dist/{dom-CLF868Qs.cjs.map → dom-D_g13XWY.cjs.map} +1 -1
- package/dist/{export-chart-9w8t3rjZ.js → export-chart-83UYH48t.js} +3 -4
- package/dist/{export-chart-9w8t3rjZ.js.map → export-chart-83UYH48t.js.map} +1 -1
- package/dist/{export-chart-BhhYgksr.cjs → export-chart-mYgEfK-L.cjs} +3 -4
- package/dist/{export-chart-BhhYgksr.cjs.map → export-chart-mYgEfK-L.cjs.map} +1 -1
- package/dist/export.cjs +3 -5
- package/dist/export.cjs.map +1 -1
- package/dist/export.d.cts +8 -1
- package/dist/export.d.ts +8 -1
- package/dist/export.js +3 -4
- package/dist/{extent-BAMZo0Nq.js → extent-DOV8rs-6.js} +2 -3
- package/dist/{extent-BAMZo0Nq.js.map → extent-DOV8rs-6.js.map} +1 -1
- package/dist/{extent-DsFWvAHJ.cjs → extent-DuYDcvM9.cjs} +2 -3
- package/dist/{extent-DsFWvAHJ.cjs.map → extent-DuYDcvM9.cjs.map} +1 -1
- package/dist/{fade-Cs74puQS.cjs → fade-DVTkhrFU.cjs} +4 -6
- package/dist/{fade-Cs74puQS.cjs.map → fade-DVTkhrFU.cjs.map} +1 -1
- package/dist/{fade-D3NxH5Qg.js → fade-GGxcBdss.js} +4 -6
- package/dist/{fade-D3NxH5Qg.js.map → fade-GGxcBdss.js.map} +1 -1
- package/dist/{features-wASyHGic.js → features-BMxkqCyS.js} +2 -3
- package/dist/{features-wASyHGic.js.map → features-BMxkqCyS.js.map} +1 -1
- package/dist/{features-BclHgg2W.cjs → features-DCXEvoya.cjs} +2 -3
- package/dist/{features-BclHgg2W.cjs.map → features-DCXEvoya.cjs.map} +1 -1
- package/dist/{format-B0yKXBTH.cjs → format-CAE5ruy6.cjs} +2 -3
- package/dist/{format-B0yKXBTH.cjs.map → format-CAE5ruy6.cjs.map} +1 -1
- package/dist/{format-lStwuc1L.js → format-it1kepFG.js} +2 -3
- package/dist/{format-lStwuc1L.js.map → format-it1kepFG.js.map} +1 -1
- package/dist/{gauge-zpia05t2.d.ts → gauge-0VJuAHWF.d.ts} +5 -8
- package/dist/{gauge-DP_EB2z3.d.cts → gauge-BSist7My.d.cts} +5 -8
- package/dist/{gauge-D-FYhuds.cjs → gauge-DXkjXNCD.cjs} +10 -11
- package/dist/gauge-DXkjXNCD.cjs.map +1 -0
- package/dist/{gauge-Dh423FHh.js → gauge-ts0kqN1-.js} +10 -11
- package/dist/{gauge-Dh423FHh.js.map → gauge-ts0kqN1-.js.map} +1 -1
- package/dist/gauge.cjs +1 -1
- package/dist/gauge.d.cts +2 -1
- package/dist/gauge.d.ts +2 -1
- package/dist/gauge.js +1 -2
- package/dist/{heatmap-DSZ2bVIa.js → heatmap-19BGJTKF.js} +20 -22
- package/dist/heatmap-19BGJTKF.js.map +1 -0
- package/dist/{heatmap-BectCEeE.d.ts → heatmap-59lmClj9.d.ts} +4 -7
- package/dist/{heatmap-BK18EBgJ.cjs → heatmap-CXhlrLTl.cjs} +20 -22
- package/dist/heatmap-CXhlrLTl.cjs.map +1 -0
- package/dist/{heatmap-CCso6m61.d.cts → heatmap-Dp_oyEe0.d.cts} +4 -7
- package/dist/heatmap.cjs +1 -1
- package/dist/heatmap.d.cts +2 -1
- package/dist/heatmap.d.ts +2 -1
- package/dist/heatmap.js +1 -2
- package/dist/{hydrate-CzfxLfTv.d.ts → hydrate-BtAZf_5K.d.cts} +2 -5
- package/dist/{hydrate-CxwTXDqO.cjs → hydrate-CmN1k8Mo.cjs} +3 -4
- package/dist/hydrate-CmN1k8Mo.cjs.map +1 -0
- package/dist/{hydrate-DDNIHYv_.js → hydrate-OA6R2_Pn.js} +3 -4
- package/dist/{hydrate-DDNIHYv_.js.map → hydrate-OA6R2_Pn.js.map} +1 -1
- package/dist/{hydrate-CTTmQy0x.d.cts → hydrate-OjM1pIUG.d.ts} +2 -5
- package/dist/hydrate.cjs +3 -4
- package/dist/hydrate.cjs.map +1 -1
- package/dist/hydrate.d.cts +1 -1
- package/dist/hydrate.d.ts +1 -1
- package/dist/hydrate.js +3 -4
- package/dist/index.cjs +49 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -27
- package/dist/index.d.ts +24 -27
- package/dist/index.js +44 -43
- package/dist/index.js.map +1 -1
- package/dist/{layout-B3hiqVEw.js → layout-DmrrLjwN.js} +9 -4
- package/dist/layout-DmrrLjwN.js.map +1 -0
- package/dist/{layout-CtMBhNd9.cjs → layout-JY2aR-yE.cjs} +14 -3
- package/dist/layout-JY2aR-yE.cjs.map +1 -0
- package/dist/{line-B3Ed6u7j.js → line-DO66LtwH.js} +9 -10
- package/dist/{line-B3Ed6u7j.js.map → line-DO66LtwH.js.map} +1 -1
- package/dist/{line-fQbtP_jL.cjs → line-Dbt6KFRK.cjs} +9 -10
- package/dist/{line-fQbtP_jL.cjs.map → line-Dbt6KFRK.cjs.map} +1 -1
- package/dist/{line-CN4uZ9ZX.d.ts → line-DtSh7HQU.d.ts} +4 -7
- package/dist/{line-W7VD_qs1.d.cts → line-_rNdeKmS.d.cts} +5 -7
- package/dist/line.cjs +4 -5
- package/dist/line.cjs.map +1 -1
- package/dist/line.d.cts +1 -1
- package/dist/line.d.ts +1 -1
- package/dist/line.js +4 -6
- package/dist/{log-CaofN3-n.d.ts → log-CI41TmcU.d.cts} +1 -6
- package/dist/{log-CaofN3-n.d.cts → log-CI41TmcU.d.ts} +1 -6
- package/dist/{log-axis-83rSpvL5.cjs → log-axis-DdRNyAq8.cjs} +6 -8
- package/dist/{log-axis-83rSpvL5.cjs.map → log-axis-DdRNyAq8.cjs.map} +1 -1
- package/dist/{log-axis-B_uvvOFc.js → log-axis-DhthtHFk.js} +6 -8
- package/dist/{log-axis-B_uvvOFc.js.map → log-axis-DhthtHFk.js.map} +1 -1
- package/dist/log.cjs +3 -5
- package/dist/log.cjs.map +1 -1
- package/dist/log.d.cts +1 -1
- package/dist/log.d.ts +1 -1
- package/dist/log.js +3 -4
- package/dist/{morph-CqYDu1bY.cjs → morph-9_LJL0ra.cjs} +4 -5
- package/dist/morph-9_LJL0ra.cjs.map +1 -0
- package/dist/{morph-BMxz3X2b.d.ts → morph-Dh7gJkV4.d.cts} +1 -4
- package/dist/{morph-BMxz3X2b.d.cts → morph-Dh7gJkV4.d.ts} +1 -4
- package/dist/{morph-Bgg-24l8.js → morph-DnRxuwR-.js} +4 -5
- package/dist/{morph-Bgg-24l8.js.map → morph-DnRxuwR-.js.map} +1 -1
- package/dist/morph.cjs +3 -4
- package/dist/morph.cjs.map +1 -1
- package/dist/morph.d.cts +1 -1
- package/dist/morph.d.ts +1 -1
- package/dist/morph.js +3 -4
- package/dist/{named-BWWb5LQJ.cjs → named-BBASc8dW.cjs} +2 -3
- package/dist/{named-BWWb5LQJ.cjs.map → named-BBASc8dW.cjs.map} +1 -1
- package/dist/{named-DE15TOgh.js → named-BOiBah6I.js} +2 -3
- package/dist/{named-DE15TOgh.js.map → named-BOiBah6I.js.map} +1 -1
- package/dist/others-DWdK7vKp.cjs +60 -0
- package/dist/others-DWdK7vKp.cjs.map +1 -0
- package/dist/others-J7NCAMA0.js +49 -0
- package/dist/others-J7NCAMA0.js.map +1 -0
- package/dist/{parliament-1Zv2Xh0D.d.ts → parliament-CLCI7tUO.d.ts} +5 -8
- package/dist/{parliament-DdrLVZwt.d.cts → parliament-CgsVnWEe.d.cts} +5 -8
- package/dist/{parliament-Dw0sOERi.js → parliament-Cru4IcuM.js} +8 -9
- package/dist/parliament-Cru4IcuM.js.map +1 -0
- package/dist/{parliament-CpWnoEvG.cjs → parliament-x5hcFaQ3.cjs} +8 -9
- package/dist/parliament-x5hcFaQ3.cjs.map +1 -0
- package/dist/parliament.cjs +1 -1
- package/dist/parliament.d.cts +2 -1
- package/dist/parliament.d.ts +2 -1
- package/dist/parliament.js +1 -2
- package/dist/{path-CwB28da0.d.ts → path-YeUiOfG8.d.cts} +1 -4
- package/dist/{path-CwB28da0.d.cts → path-YeUiOfG8.d.ts} +1 -4
- package/dist/{patterns-DtgcnA8o.js → patterns-CufKZYhm.js} +4 -5
- package/dist/{patterns-DtgcnA8o.js.map → patterns-CufKZYhm.js.map} +1 -1
- package/dist/{patterns-LfcQAWCy.cjs → patterns-D3-wQagb.cjs} +4 -5
- package/dist/{patterns-LfcQAWCy.cjs.map → patterns-D3-wQagb.cjs.map} +1 -1
- package/dist/patterns.cjs +3 -5
- package/dist/patterns.cjs.map +1 -1
- package/dist/patterns.d.cts +5 -1
- package/dist/patterns.d.ts +5 -1
- package/dist/patterns.js +3 -4
- package/dist/percentage-bar-B6tNOqNn.js +157 -0
- package/dist/percentage-bar-B6tNOqNn.js.map +1 -0
- package/dist/percentage-bar-nhTeakD_.d.ts +62 -0
- package/dist/percentage-bar-tepMr7Hd.d.cts +62 -0
- package/dist/percentage-bar-ybNS3goo.cjs +162 -0
- package/dist/percentage-bar-ybNS3goo.cjs.map +1 -0
- package/dist/percentage-bar.cjs +3 -0
- package/dist/percentage-bar.d.cts +3 -0
- package/dist/percentage-bar.d.ts +3 -0
- package/dist/percentage-bar.js +1 -0
- package/dist/{pie-5z1fDdKO.d.ts → pie-BXg2gNpb.d.cts} +14 -8
- package/dist/{pie-BxTZt6Go.cjs → pie-BpjvSPnz.cjs} +13 -17
- package/dist/pie-BpjvSPnz.cjs.map +1 -0
- package/dist/{pie-BF9yI5mE.d.cts → pie-CFptILSm.d.ts} +14 -8
- package/dist/{pie-DzUXDTcn.js → pie-CVsc-6qD.js} +13 -17
- package/dist/pie-CVsc-6qD.js.map +1 -0
- package/dist/pie.cjs +1 -1
- package/dist/pie.d.cts +2 -1
- package/dist/pie.d.ts +2 -1
- package/dist/pie.js +1 -2
- package/dist/{point-shapes-CGl4dugc.cjs → point-shapes--_gmdTyK.cjs} +3 -4
- package/dist/{point-shapes-CGl4dugc.cjs.map → point-shapes--_gmdTyK.cjs.map} +1 -1
- package/dist/{point-shapes-DI84NNpI.js → point-shapes-DD2Ektzm.js} +3 -4
- package/dist/{point-shapes-DI84NNpI.js.map → point-shapes-DD2Ektzm.js.map} +1 -1
- package/dist/point-shapes.cjs +3 -4
- package/dist/point-shapes.d.cts +5 -1
- package/dist/point-shapes.d.ts +5 -1
- package/dist/point-shapes.js +3 -4
- package/dist/{radar-1-EryihA.d.ts → radar-BC9Skgpj.d.ts} +4 -7
- package/dist/{radar-CYPab_I4.js → radar-BR-mumDd.js} +7 -8
- package/dist/{radar-CYPab_I4.js.map → radar-BR-mumDd.js.map} +1 -1
- package/dist/{radar-DBW4O0Vt.d.cts → radar-D1-lItDy.d.cts} +4 -7
- package/dist/{radar-CoGUNNSb.cjs → radar-HPDrIdzc.cjs} +7 -8
- package/dist/{radar-CoGUNNSb.cjs.map → radar-HPDrIdzc.cjs.map} +1 -1
- package/dist/radar.cjs +1 -1
- package/dist/radar.d.cts +2 -1
- package/dist/radar.d.ts +2 -1
- package/dist/radar.js +1 -2
- package/dist/rect-D6VhynBM.cjs +16 -0
- package/dist/rect-D6VhynBM.cjs.map +1 -0
- package/dist/rect-DSVmUZrD.js +11 -0
- package/dist/rect-DSVmUZrD.js.map +1 -0
- package/dist/{sankey-B4PNKusJ.js → sankey-D6JeZfK5.js} +33 -29
- package/dist/sankey-D6JeZfK5.js.map +1 -0
- package/dist/{sankey-OV_WoPrl.d.ts → sankey-D_v7KxnJ.d.ts} +4 -7
- package/dist/{sankey-DuGI3Qc5.d.cts → sankey-Dk7jUt8x.d.cts} +4 -7
- package/dist/{sankey-Bacx4fVe.cjs → sankey-fCoo1cpz.cjs} +33 -29
- package/dist/sankey-fCoo1cpz.cjs.map +1 -0
- package/dist/sankey.cjs +1 -1
- package/dist/sankey.d.cts +2 -1
- package/dist/sankey.d.ts +2 -1
- package/dist/sankey.js +1 -2
- package/dist/{scatter-kgtgR318.js → scatter-C0TWjFpW.js} +21 -18
- package/dist/scatter-C0TWjFpW.js.map +1 -0
- package/dist/{scatter-BqzgJqdX.d.ts → scatter-CXEsioOJ.d.ts} +8 -9
- package/dist/{scatter-DgMN9zRy.cjs → scatter-DVqB_fP9.cjs} +21 -18
- package/dist/scatter-DVqB_fP9.cjs.map +1 -0
- package/dist/{scatter-DbxLyZX0.d.cts → scatter-DZeEIfyo.d.cts} +8 -9
- package/dist/scatter.cjs +1 -1
- package/dist/scatter.d.cts +2 -1
- package/dist/scatter.d.ts +2 -1
- package/dist/scatter.js +1 -2
- package/dist/{sparkline-BS9-hltA.cjs → sparkline-B39NA0Mi.cjs} +14 -13
- package/dist/sparkline-B39NA0Mi.cjs.map +1 -0
- package/dist/{sparkline-CWlJDKyh.d.cts → sparkline-DAP6jtzw.d.cts} +5 -8
- package/dist/{sparkline-BQzt27Fr.js → sparkline-XO_TqCNP.js} +14 -13
- package/dist/sparkline-XO_TqCNP.js.map +1 -0
- package/dist/{sparkline-BfyO_oNM.d.ts → sparkline-cbvRkWqS.d.ts} +5 -8
- package/dist/sparkline.cjs +1 -1
- package/dist/sparkline.d.cts +2 -1
- package/dist/sparkline.d.ts +2 -1
- package/dist/sparkline.js +1 -2
- package/dist/{stack-DRbwTeF3.js → stack-2H2Gfs1Q.js} +3 -4
- package/dist/{stack-DRbwTeF3.js.map → stack-2H2Gfs1Q.js.map} +1 -1
- package/dist/{stack-DVhJWaki.cjs → stack-BgPzoQmv.cjs} +3 -4
- package/dist/{stack-DVhJWaki.cjs.map → stack-BgPzoQmv.cjs.map} +1 -1
- package/dist/{stack-CpR6RGKd.d.ts → stack-DR0eQTsB.d.ts} +1 -4
- package/dist/{stack-CpR6RGKd.d.cts → stack-Dagxq7l2.d.cts} +2 -4
- package/dist/style.css +1 -1
- package/dist/{sweep-CbfR7--d.js → sweep-BpRPlhs6.js} +5 -6
- package/dist/{sweep-CbfR7--d.js.map → sweep-BpRPlhs6.js.map} +1 -1
- package/dist/{sweep-DaTEDDuC.cjs → sweep-Dnp6LDBz.cjs} +5 -6
- package/dist/sweep-Dnp6LDBz.cjs.map +1 -0
- package/dist/{time-CNVnt-B2.d.cts → time-B4oxWHQI.d.cts} +2 -7
- package/dist/{time-CHjiY9Q4.d.ts → time-DRIDgv2a.d.ts} +2 -7
- package/dist/{time-axis-VSX34_Tb.cjs → time-axis-BjZ1bYTK.cjs} +9 -10
- package/dist/{time-axis-VSX34_Tb.cjs.map → time-axis-BjZ1bYTK.cjs.map} +1 -1
- package/dist/{time-axis-Bc9eHX1r.js → time-axis-FLONo54E.js} +9 -10
- package/dist/{time-axis-Bc9eHX1r.js.map → time-axis-FLONo54E.js.map} +1 -1
- package/dist/time.cjs +4 -6
- package/dist/time.cjs.map +1 -1
- package/dist/time.d.cts +1 -1
- package/dist/time.d.ts +1 -1
- package/dist/time.js +4 -5
- package/dist/treemap-BAkhmVQc.d.cts +55 -0
- package/dist/treemap-BNpxFBao.d.ts +55 -0
- package/dist/treemap-BWpEUlDh.cjs +303 -0
- package/dist/treemap-BWpEUlDh.cjs.map +1 -0
- package/dist/treemap-CQdavQ9u.js +298 -0
- package/dist/treemap-CQdavQ9u.js.map +1 -0
- package/dist/treemap.cjs +3 -0
- package/dist/treemap.d.cts +3 -0
- package/dist/treemap.d.ts +3 -0
- package/dist/treemap.js +1 -0
- package/dist/{tween-BCYd0RTY.js → tween-BdQqUmmv.js} +2 -3
- package/dist/{tween-BCYd0RTY.js.map → tween-BdQqUmmv.js.map} +1 -1
- package/dist/{tween-CIGBlryn.cjs → tween-c3aOmfKE.cjs} +2 -3
- package/dist/{tween-CIGBlryn.cjs.map → tween-c3aOmfKE.cjs.map} +1 -1
- package/dist/{value-labels-IZIQPhfk.js → value-labels-BBuSi4i0.js} +7 -7
- package/dist/value-labels-BBuSi4i0.js.map +1 -0
- package/dist/{value-labels-B0WJoJ7x.cjs → value-labels-BV9keAuL.cjs} +7 -7
- package/dist/value-labels-BV9keAuL.cjs.map +1 -0
- package/dist/value-labels.cjs +3 -5
- package/dist/value-labels.cjs.map +1 -1
- package/dist/value-labels.d.cts +5 -1
- package/dist/value-labels.d.ts +5 -1
- package/dist/value-labels.js +3 -4
- package/dist/{vnode-CkQ27Cxe.cjs → vnode-ClAiw28x.cjs} +2 -3
- package/dist/{vnode-CkQ27Cxe.cjs.map → vnode-ClAiw28x.cjs.map} +1 -1
- package/dist/{vnode-BUflsBsa.d.ts → vnode-Du2cC8Fm.d.cts} +1 -4
- package/dist/{vnode-BUflsBsa.d.cts → vnode-Du2cC8Fm.d.ts} +1 -4
- package/dist/{vnode-tCWItoUH.js → vnode-_EMUqysL.js} +2 -3
- package/dist/{vnode-tCWItoUH.js.map → vnode-_EMUqysL.js.map} +1 -1
- package/package.json +21 -1
- package/dist/bar-C-7zR2qp.cjs.map +0 -1
- package/dist/bar-jZEoao74.js.map +0 -1
- package/dist/cartesian-BoDfgBCV.cjs.map +0 -1
- package/dist/cartesian-Cr0AF0nG.js.map +0 -1
- package/dist/chart-BF2CK9I_.js.map +0 -1
- package/dist/chart-CowF_lWY.cjs.map +0 -1
- package/dist/core-CegR_j55.js.map +0 -1
- package/dist/core-RzS9IQO5.cjs.map +0 -1
- package/dist/gauge-D-FYhuds.cjs.map +0 -1
- package/dist/heatmap-BK18EBgJ.cjs.map +0 -1
- package/dist/heatmap-DSZ2bVIa.js.map +0 -1
- package/dist/hydrate-CxwTXDqO.cjs.map +0 -1
- package/dist/layout-B3hiqVEw.js.map +0 -1
- package/dist/layout-CtMBhNd9.cjs.map +0 -1
- package/dist/morph-CqYDu1bY.cjs.map +0 -1
- package/dist/parliament-CpWnoEvG.cjs.map +0 -1
- package/dist/parliament-Dw0sOERi.js.map +0 -1
- package/dist/pie-BxTZt6Go.cjs.map +0 -1
- package/dist/pie-DzUXDTcn.js.map +0 -1
- package/dist/sankey-B4PNKusJ.js.map +0 -1
- package/dist/sankey-Bacx4fVe.cjs.map +0 -1
- package/dist/scatter-DgMN9zRy.cjs.map +0 -1
- package/dist/scatter-kgtgR318.js.map +0 -1
- package/dist/sparkline-BQzt27Fr.js.map +0 -1
- package/dist/sparkline-BS9-hltA.cjs.map +0 -1
- package/dist/sweep-DaTEDDuC.cjs.map +0 -1
- package/dist/value-labels-B0WJoJ7x.cjs.map +0 -1
- package/dist/value-labels-IZIQPhfk.js.map +0 -1
package/dist/core.d.ts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { a as InsetsInput, c as estimateTextWidth, i as Insets, l as innerRect, o as LINE_HEIGHT, s as Rect, t as Annotation, u as insets } from "./annotations-
|
|
2
|
-
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-
|
|
3
|
-
import { a as ClassValue, c as StyleValue, d as normalizeClass, f as normalizeStyle, i as ChildInput, l as VNode, n as Attrs, o as Key, r as Child, s as Props, t as AttrValue, u as h } from "./vnode-
|
|
4
|
-
import { $ as CartesianOptions, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, J as LegendItem, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, X as defaultHidden, Y as LegendOptions, Z as legendContent, _ as TooltipPlacement, _t as thinTicks, a as ChartType, at as domainOf, b as tooltipContent, bt as tableContent, c as Size, ct as seriesTable, d as chartLabel, dt as LinearTicksOptions, et as CategoryAxisOptions, f as chartToString, ft as Tick, g as TooltipOptions, gt as linearTicks, h as resolveSize, ht as bandTicks, i as ChartEvents, it as categoryInteraction, l as buildChart, lt as AxisOptions, m as resolveLegend, mt as axisSize, n as Chart, nt as Series, o as RenderContext, ot as seriesKey, p as renderContext, pt as axis, r as ChartConfig, rt as ValueAxisOptions, s as ResolvedLegend, st as seriesLegend, t as BaseOptions, tt as Label, u as chartEvents, ut as AxisPosition, v as hitAnchor, vt as DataTable, w as download, wt as Interaction, x as DownloadFormat, xt as Hit, y as placeTooltip, yt as describeHit } from "./chart-
|
|
5
|
-
import { c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, l as NumberFormatOptions, m as getDateFormat, o as DateFormat, p as formatTicks, s as Locale, u as formatDate } from "./time-
|
|
6
|
-
import { a as linear, i as LinearScaleOptions, r as LinearScale } from "./log-
|
|
7
|
-
import { A as arcCentroid, C as keyboard, D as GridOptions, E as hoverUnderlay, M as padAngleForGap, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, j as arcPathStable, k as ArcOptions, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-
|
|
8
|
-
import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-
|
|
9
|
-
import { n as line, t as LineOptions } from "./line-
|
|
10
|
-
import { n as area, t as AreaOptions } from "./area-
|
|
11
|
-
import { n as bar, t as BarOptions } from "./bar-
|
|
12
|
-
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-
|
|
13
|
-
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-
|
|
14
|
-
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-
|
|
15
|
-
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-
|
|
16
|
-
import {
|
|
17
|
-
import { n as
|
|
18
|
-
import {
|
|
19
|
-
import { i as
|
|
20
|
-
import { n as
|
|
21
|
-
|
|
1
|
+
import { a as InsetsInput, c as estimateTextWidth, i as Insets, l as innerRect, o as LINE_HEIGHT, s as Rect, t as Annotation, u as insets } from "./annotations-B02GR_KU.js";
|
|
2
|
+
import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-CNKvdnTC.js";
|
|
3
|
+
import { a as ClassValue, c as StyleValue, d as normalizeClass, f as normalizeStyle, i as ChildInput, l as VNode, n as Attrs, o as Key, r as Child, s as Props, t as AttrValue, u as h } from "./vnode-Du2cC8Fm.js";
|
|
4
|
+
import { $ as CartesianOptions, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, J as LegendItem, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, X as defaultHidden, Y as LegendOptions, Z as legendContent, _ as TooltipPlacement, _t as thinTicks, a as ChartType, at as domainOf, b as tooltipContent, bt as tableContent, c as Size, ct as seriesTable, d as chartLabel, dt as LinearTicksOptions, et as CategoryAxisOptions, f as chartToString, ft as Tick, g as TooltipOptions, gt as linearTicks, h as resolveSize, ht as bandTicks, i as ChartEvents, it as categoryInteraction, l as buildChart, lt as AxisOptions, m as resolveLegend, mt as axisSize, n as Chart, nt as Series, o as RenderContext, ot as seriesKey, p as renderContext, pt as axis, r as ChartConfig, rt as ValueAxisOptions, s as ResolvedLegend, st as seriesLegend, t as BaseOptions, tt as Label, u as chartEvents, ut as AxisPosition, v as hitAnchor, vt as DataTable, w as download, wt as Interaction, x as DownloadFormat, xt as Hit, y as placeTooltip, yt as describeHit } from "./chart-QilhWP8Z.js";
|
|
5
|
+
import { c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, l as NumberFormatOptions, m as getDateFormat, o as DateFormat, p as formatTicks, s as Locale, u as formatDate } from "./time-DRIDgv2a.js";
|
|
6
|
+
import { a as linear, i as LinearScaleOptions, r as LinearScale } from "./log-CI41TmcU.js";
|
|
7
|
+
import { A as arcCentroid, C as keyboard, D as GridOptions, E as hoverUnderlay, M as padAngleForGap, O as grid, S as legend, T as hoverOverlay, _ as defaultPlugins, a as flush, b as sync, c as tickIncrement, d as extent, f as RenderToStringOptions, g as render, h as renderToString, i as cancel, j as arcPathStable, k as ArcOptions, l as tickStep, m as escapeText, n as barPath, o as schedule, p as escapeAttr, r as hbarPath, s as niceDomain, t as VERSION, u as ticks, v as tooltip, w as highlight, x as pointer, y as dataTable } from "./core-DRUCk67j.js";
|
|
8
|
+
import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-YeUiOfG8.js";
|
|
9
|
+
import { n as line, t as LineOptions } from "./line-DtSh7HQU.js";
|
|
10
|
+
import { n as area, t as AreaOptions } from "./area-d11XePuw.js";
|
|
11
|
+
import { n as bar, t as BarOptions } from "./bar-XwzM6Pb0.js";
|
|
12
|
+
import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-D0xKkdqd.js";
|
|
13
|
+
import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-0VJuAHWF.js";
|
|
14
|
+
import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-59lmClj9.js";
|
|
15
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-CLCI7tUO.js";
|
|
16
|
+
import { n as PercentageBarSegment, r as percentageBar, t as PercentageBarOptions } from "./percentage-bar-nhTeakD_.js";
|
|
17
|
+
import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-CFptILSm.js";
|
|
18
|
+
import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-BC9Skgpj.js";
|
|
19
|
+
import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-D_v7KxnJ.js";
|
|
20
|
+
import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-CXEsioOJ.js";
|
|
21
|
+
import { n as sparkline, t as SparklineOptions } from "./sparkline-cbvRkWqS.js";
|
|
22
|
+
import { n as TreemapOptions, r as treemap, t as TreemapNode } from "./treemap-BNpxFBao.js";
|
|
23
|
+
export { type AfterRenderState, type Annotation, type ArcOptions, type AreaOptions, type AttrValue, type Attrs, type AxisOptions, type AxisPosition, type BandKey, type BandScale, type BandScaleOptions, type BarOptions, type BaseOptions, type BeforeRenderState, type Candle, type CandlestickOptions, type CartesianData, type CartesianOptions, type CategoryAxisOptions, Chart, type ChartConfig, type ChartEvents, type ChartPlugin, type ChartType, type Child, type ChildInput, type ClassValue, type Curve, type DataTable, type DateFormat, type DownloadFormat, type DownloadMenuOptions, type DownloadOption, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type Insets, type InsetsInput, type Interaction, type Key, LINE_HEIGHT, type Label, type LegendItem, type LegendOptions, type LineOptions, type LinearScale, type LinearScaleOptions, type LinearTicksOptions, type Locale, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, type PercentageBarOptions, type PercentageBarSegment, type PieOptions, type PieSlice, type PluginInstance, type Point, type Props, type RadarOptions, type RadialAxisOptions, type Rect, type RenderContext, type RenderToStringOptions, type ResolvedLegend, type SankeyData, type SankeyLink, type SankeyNode, type SankeyOptions, type ScatterOptions, type ScatterPoint, type ScatterSeries, type Series, type Size, type SparklineOptions, type StyleValue, type Tick, type TooltipOptions, type TooltipPlacement, type TreemapNode, type TreemapOptions, VERSION, type VNode, type ValueAxisOptions, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent, treemap };
|
package/dist/core.js
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-
|
|
2
|
-
import { n as normalizeClass, r as normalizeStyle, t as h } from "./vnode-
|
|
3
|
-
import { a as getDateFormat, i as formatTicks, n as formatDetail, o as getNumberFormat, r as formatNumber, s as stepPrecision, t as formatDate } from "./format-
|
|
4
|
-
import { A as tickIncrement, C as grid, D as linearTicks, E as bandTicks, M as ticks, O as thinTicks, S as point, T as axisSize, b as linear, f as seriesKey, j as tickStep, k as niceDomain, m as seriesTable, n as categoryInteraction, p as seriesLegend, r as domainOf, w as axis, x as band } from "./cartesian-
|
|
5
|
-
import { i as register, n as feature, r as features } from "./features-
|
|
6
|
-
import { t as extent } from "./extent-
|
|
7
|
-
import { _ as defaultHidden, a as chartToString, c as resolveSize, g as renderToString, h as escapeText, i as chartLabel, l as cancel, m as escapeAttr, n as buildChart, o as renderContext, p as schedule, r as chartEvents, s as resolveLegend, t as Chart, u as flush, v as legendContent } from "./chart-
|
|
8
|
-
import { a as render } from "./dom-
|
|
9
|
-
import { n as areaPath, r as linePath } from "./fade-
|
|
10
|
-
import { _ as download, a as placeTooltip, c as sync, d as describeHit, f as tableContent, g as hoverUnderlay, h as hoverOverlay, i as hitAnchor, l as legend, m as pointer, n as defaultPlugins, o as tooltipContent, p as highlight, r as tooltip, s as dataTable, t as VERSION, u as keyboard } from "./core-
|
|
11
|
-
import { t as line } from "./line-
|
|
12
|
-
import { t as area } from "./area-
|
|
13
|
-
import { n as hbarPath, t as barPath } from "./bar-
|
|
14
|
-
import { t as bar } from "./bar-
|
|
15
|
-
import { t as candlestick } from "./candlestick-
|
|
16
|
-
import { i as padAngleForGap, n as arcCentroid, r as arcPathStable } from "./arc-
|
|
17
|
-
import { t as gauge } from "./gauge-
|
|
18
|
-
import { t as heatmap } from "./heatmap-
|
|
19
|
-
import { t as parliament } from "./parliament-
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
|
|
1
|
+
import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-DmrrLjwN.js";
|
|
2
|
+
import { n as normalizeClass, r as normalizeStyle, t as h } from "./vnode-_EMUqysL.js";
|
|
3
|
+
import { a as getDateFormat, i as formatTicks, n as formatDetail, o as getNumberFormat, r as formatNumber, s as stepPrecision, t as formatDate } from "./format-it1kepFG.js";
|
|
4
|
+
import { A as tickIncrement, C as grid, D as linearTicks, E as bandTicks, M as ticks, O as thinTicks, S as point, T as axisSize, b as linear, f as seriesKey, j as tickStep, k as niceDomain, m as seriesTable, n as categoryInteraction, p as seriesLegend, r as domainOf, w as axis, x as band } from "./cartesian-CI2x6N7N.js";
|
|
5
|
+
import { i as register, n as feature, r as features } from "./features-BMxkqCyS.js";
|
|
6
|
+
import { t as extent } from "./extent-DOV8rs-6.js";
|
|
7
|
+
import { _ as defaultHidden, a as chartToString, c as resolveSize, g as renderToString, h as escapeText, i as chartLabel, l as cancel, m as escapeAttr, n as buildChart, o as renderContext, p as schedule, r as chartEvents, s as resolveLegend, t as Chart, u as flush, v as legendContent } from "./chart-DWn9v6qw.js";
|
|
8
|
+
import { a as render } from "./dom-CuceR8gt.js";
|
|
9
|
+
import { n as areaPath, r as linePath } from "./fade-GGxcBdss.js";
|
|
10
|
+
import { _ as download, a as placeTooltip, c as sync, d as describeHit, f as tableContent, g as hoverUnderlay, h as hoverOverlay, i as hitAnchor, l as legend, m as pointer, n as defaultPlugins, o as tooltipContent, p as highlight, r as tooltip, s as dataTable, t as VERSION, u as keyboard } from "./core-BKRQvPAT.js";
|
|
11
|
+
import { t as line } from "./line-DO66LtwH.js";
|
|
12
|
+
import { t as area } from "./area-0-L1bG9B.js";
|
|
13
|
+
import { n as hbarPath, t as barPath } from "./bar-B5n2oq9-.js";
|
|
14
|
+
import { t as bar } from "./bar-BNZ3GhIw.js";
|
|
15
|
+
import { t as candlestick } from "./candlestick-BHQkQfxH.js";
|
|
16
|
+
import { i as padAngleForGap, n as arcCentroid, r as arcPathStable } from "./arc-B3V5IR0w.js";
|
|
17
|
+
import { t as gauge } from "./gauge-ts0kqN1-.js";
|
|
18
|
+
import { t as heatmap } from "./heatmap-19BGJTKF.js";
|
|
19
|
+
import { t as parliament } from "./parliament-Cru4IcuM.js";
|
|
20
|
+
import { t as percentageBar } from "./percentage-bar-B6tNOqNn.js";
|
|
21
|
+
import { n as pie, t as donut } from "./pie-CVsc-6qD.js";
|
|
22
|
+
import { t as radar } from "./radar-BR-mumDd.js";
|
|
23
|
+
import { t as sankey } from "./sankey-D6JeZfK5.js";
|
|
24
|
+
import { t as scatter } from "./scatter-C0TWjFpW.js";
|
|
25
|
+
import { t as sparkline } from "./sparkline-XO_TqCNP.js";
|
|
26
|
+
import { t as treemap } from "./treemap-CQdavQ9u.js";
|
|
27
|
+
export { Chart, LINE_HEIGHT, VERSION, arcCentroid, arcPathStable, area, areaPath, axis, axisSize, band, bandTicks, bar, barPath, buildChart, cancel, candlestick, categoryInteraction, chartEvents, chartLabel, chartToString, dataTable, defaultHidden, defaultPlugins, describeHit, domainOf, donut, download, escapeAttr, escapeText, estimateTextWidth, extent, feature, features, flush, formatDate, formatDetail, formatNumber, formatTicks, gauge, getDateFormat, getNumberFormat, grid, h, hbarPath, heatmap, highlight, hitAnchor, hoverOverlay, hoverUnderlay, innerRect, insets, keyboard, legend, legendContent, line, linePath, linear, linearTicks, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, percentageBar, pie, placeTooltip, point, pointer, radar, register, render, renderContext, renderToString, resolveLegend, resolveSize, sankey, scatter, schedule, seriesKey, seriesLegend, seriesTable, sparkline, stepPrecision, sync, tableContent, thinTicks, tickIncrement, tickStep, ticks, tooltip, tooltipContent, treemap };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as formatDate } from "./format-
|
|
2
|
-
import { g as toMs } from "./cartesian-
|
|
3
|
-
|
|
1
|
+
import { t as formatDate } from "./format-it1kepFG.js";
|
|
2
|
+
import { g as toMs } from "./cartesian-CI2x6N7N.js";
|
|
3
|
+
// src/charts/dates.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formatter for date labels on a time axis (tooltips, tables, band axes):
|
|
6
6
|
* the date, with the time of day when the labels span less than a few days.
|
|
@@ -21,7 +21,6 @@ function dateLabels(labels, utc, locale) {
|
|
|
21
21
|
}, locale);
|
|
22
22
|
return (label) => Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label);
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { dateLabels as t };
|
|
26
25
|
|
|
27
|
-
//# sourceMappingURL=dates-
|
|
26
|
+
//# sourceMappingURL=dates-C2RzY3rE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dates-
|
|
1
|
+
{"version":3,"file":"dates-C2RzY3rE.js","names":[],"sources":["../src/charts/dates.ts"],"sourcesContent":["import type { Locale } from '../format.ts'\nimport { formatDate } from '../format.ts'\nimport { type Label, toMs } from './cartesian.ts'\n\n/**\n * Formatter for date labels on a time axis (tooltips, tables, band axes):\n * the date, with the time of day when the labels span less than a few days.\n */\nexport function dateLabels(\n labels: readonly Label[],\n utc: boolean | undefined,\n locale: Locale,\n): (label: Label) => string {\n const first = labels[0]\n const last = labels[labels.length - 1]\n const span = first !== undefined && last !== undefined ? Math.abs(toMs(last) - toMs(first)) : 0\n const withTime = span > 0 && span < 3 * 24 * 60 * 60 * 1000\n const fmt = formatDate(\n {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...(withTime ? { hour: 'numeric', minute: '2-digit' } : {}),\n ...(utc ? { timeZone: 'UTC' } : {}),\n },\n locale,\n )\n return (label) => (Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label))\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,WACd,QACA,KACA,QAC0B;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO,OAAO,SAAS;CACpC,MAAM,OAAO,UAAU,KAAA,KAAa,SAAS,KAAA,IAAY,KAAK,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI;CAE9F,MAAM,MAAM,WACV;EACE,MAAM;EACN,OAAO;EACP,KAAK;EACL,GANa,OAAO,KAAK,OAAO,SAMjB;GAAE,MAAM;GAAW,QAAQ;EAAU,IAAI,CAAC;EACzD,GAAI,MAAM,EAAE,UAAU,MAAM,IAAI,CAAC;CACnC,GACA,MACF;CACA,QAAQ,UAAW,OAAO,SAAS,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK;AACnF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_format = require("./format-
|
|
2
|
-
const require_cartesian = require("./cartesian-
|
|
3
|
-
|
|
1
|
+
const require_format = require("./format-CAE5ruy6.cjs");
|
|
2
|
+
const require_cartesian = require("./cartesian-DV02PsBe.cjs");
|
|
3
|
+
// src/charts/dates.ts
|
|
4
4
|
/**
|
|
5
5
|
* Formatter for date labels on a time axis (tooltips, tables, band axes):
|
|
6
6
|
* the date, with the time of day when the labels span less than a few days.
|
|
@@ -21,7 +21,6 @@ function dateLabels(labels, utc, locale) {
|
|
|
21
21
|
}, locale);
|
|
22
22
|
return (label) => Number.isFinite(require_cartesian.toMs(label)) ? fmt(require_cartesian.toMs(label)) : String(label);
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
Object.defineProperty(exports, "dateLabels", {
|
|
26
25
|
enumerable: true,
|
|
27
26
|
get: function() {
|
|
@@ -29,4 +28,4 @@ Object.defineProperty(exports, "dateLabels", {
|
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
|
|
32
|
-
//# sourceMappingURL=dates-
|
|
31
|
+
//# sourceMappingURL=dates-DurEr9WT.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dates-
|
|
1
|
+
{"version":3,"file":"dates-DurEr9WT.cjs","names":["toMs","formatDate"],"sources":["../src/charts/dates.ts"],"sourcesContent":["import type { Locale } from '../format.ts'\nimport { formatDate } from '../format.ts'\nimport { type Label, toMs } from './cartesian.ts'\n\n/**\n * Formatter for date labels on a time axis (tooltips, tables, band axes):\n * the date, with the time of day when the labels span less than a few days.\n */\nexport function dateLabels(\n labels: readonly Label[],\n utc: boolean | undefined,\n locale: Locale,\n): (label: Label) => string {\n const first = labels[0]\n const last = labels[labels.length - 1]\n const span = first !== undefined && last !== undefined ? Math.abs(toMs(last) - toMs(first)) : 0\n const withTime = span > 0 && span < 3 * 24 * 60 * 60 * 1000\n const fmt = formatDate(\n {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n ...(withTime ? { hour: 'numeric', minute: '2-digit' } : {}),\n ...(utc ? { timeZone: 'UTC' } : {}),\n },\n locale,\n )\n return (label) => (Number.isFinite(toMs(label)) ? fmt(toMs(label)) : String(label))\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,WACd,QACA,KACA,QAC0B;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO,OAAO,SAAS;CACpC,MAAM,OAAO,UAAU,KAAA,KAAa,SAAS,KAAA,IAAY,KAAK,IAAIA,kBAAAA,KAAK,IAAI,IAAIA,kBAAAA,KAAK,KAAK,CAAC,IAAI;CAE9F,MAAM,MAAMC,eAAAA,WACV;EACE,MAAM;EACN,OAAO;EACP,KAAK;EACL,GANa,OAAO,KAAK,OAAO,SAMjB;GAAE,MAAM;GAAW,QAAQ;EAAU,IAAI,CAAC;EACzD,GAAI,MAAM,EAAE,UAAU,MAAM,IAAI,CAAC;CACnC,GACA,MACF;CACA,QAAQ,UAAW,OAAO,SAASD,kBAAAA,KAAK,KAAK,CAAC,IAAI,IAAIA,kBAAAA,KAAK,KAAK,CAAC,IAAI,OAAO,KAAK;AACnF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/shapes/decimate.ts
|
|
2
2
|
/**
|
|
3
3
|
* Largest-Triangle-Three-Buckets downsampling (Sveinn Steinarsson, 2013):
|
|
4
4
|
* keep roughly `threshold` points that preserve the visual shape of a line,
|
|
@@ -78,7 +78,6 @@ function sampleRun(points, from, to, budget, out) {
|
|
|
78
78
|
function lttb(points, threshold) {
|
|
79
79
|
return lttbIndices(points, threshold).map((i) => points[i]);
|
|
80
80
|
}
|
|
81
|
-
//#endregion
|
|
82
81
|
Object.defineProperty(exports, "lttb", {
|
|
83
82
|
enumerable: true,
|
|
84
83
|
get: function() {
|
|
@@ -92,4 +91,4 @@ Object.defineProperty(exports, "lttbIndices", {
|
|
|
92
91
|
}
|
|
93
92
|
});
|
|
94
93
|
|
|
95
|
-
//# sourceMappingURL=decimate-
|
|
94
|
+
//# sourceMappingURL=decimate-BS3x8g-f.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimate-
|
|
1
|
+
{"version":3,"file":"decimate-BS3x8g-f.cjs","names":[],"sources":["../src/shapes/decimate.ts"],"sourcesContent":["import type { Point } from './path.ts'\n\n/**\n * Largest-Triangle-Three-Buckets downsampling (Sveinn Steinarsson, 2013):\n * keep roughly `threshold` points that preserve the visual shape of a line,\n * including its peaks and valleys.\n *\n * Returns the indices to keep, in order. Gaps (`null` points) are kept as\n * gap markers and every run between gaps is sampled on its own, so the\n * result lines up with any per-index data (e.g. stacked baselines).\n */\nexport function lttbIndices(points: readonly Point[], threshold: number): number[] {\n const n = points.length\n if (!(threshold >= 3) || n <= threshold) return points.map((_, i) => i)\n\n // Split into runs of valid points.\n const runs: [number, number][] = []\n let start = -1\n for (let i = 0; i < n; i++) {\n const valid = points[i] != null\n if (valid && start === -1) start = i\n if (!valid && start !== -1) {\n runs.push([start, i])\n start = -1\n }\n }\n if (start !== -1) runs.push([start, n])\n const valid = runs.reduce((sum, [a, b]) => sum + (b - a), 0)\n\n const out: number[] = []\n let last = 0\n for (const [a, b] of runs) {\n // One gap marker between runs; everything else in the gap is dropped.\n if (a > last) out.push(last)\n // Each run gets a share of the budget (at least its two ends).\n const budget = Math.max(2, Math.round((threshold * (b - a)) / valid))\n sampleRun(points, a, b, budget, out)\n last = b\n }\n if (last < n) out.push(last)\n return out\n}\n\n/** LTTB over `points[from, to)`, pushing kept indices to `out`. */\nfunction sampleRun(\n points: readonly Point[],\n from: number,\n to: number,\n budget: number,\n out: number[],\n): void {\n const n = to - from\n if (n <= budget) {\n for (let i = from; i < to; i++) out.push(i)\n return\n }\n const at = (i: number) => points[i] as readonly [number, number]\n const bucketSize = (n - 2) / (budget - 2)\n let a = from\n out.push(a)\n\n for (let bucket = 0; bucket < budget - 2; bucket++) {\n // Average of the next bucket is the third corner of every candidate triangle.\n const nextStart = from + 1 + Math.floor((bucket + 1) * bucketSize)\n const nextEnd = Math.min(to, from + 1 + Math.floor((bucket + 2) * bucketSize))\n let avgX = 0\n let avgY = 0\n for (let i = nextStart; i < nextEnd; i++) {\n avgX += at(i)[0]\n avgY += at(i)[1]\n }\n const count = Math.max(1, nextEnd - nextStart)\n avgX /= count\n avgY /= count\n\n // The point of this bucket forming the largest triangle with `a` and the average.\n const rangeStart = from + 1 + Math.floor(bucket * bucketSize)\n const rangeEnd = Math.min(to - 1, from + 1 + Math.floor((bucket + 1) * bucketSize))\n const [ax, ay] = at(a)\n let best = rangeStart\n let bestArea = -1\n for (let i = rangeStart; i < rangeEnd; i++) {\n const [x, y] = at(i)\n const area = Math.abs((ax - avgX) * (y - ay) - (ax - x) * (avgY - ay))\n if (area > bestArea) {\n bestArea = area\n best = i\n }\n }\n out.push(best)\n a = best\n }\n out.push(to - 1)\n}\n\n/** The points kept by {@link lttbIndices}, gaps included. */\nexport function lttb(points: readonly Point[], threshold: number): Point[] {\n return lttbIndices(points, threshold).map((i) => points[i])\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,YAAY,QAA0B,WAA6B;CACjF,MAAM,IAAI,OAAO;CACjB,IAAI,EAAE,aAAa,MAAM,KAAK,WAAW,OAAO,OAAO,KAAK,GAAG,MAAM,CAAC;CAGtE,MAAM,OAA2B,CAAC;CAClC,IAAI,QAAQ;CACZ,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KAAK;EAC1B,MAAM,QAAQ,OAAO,MAAM;EAC3B,IAAI,SAAS,UAAU,IAAI,QAAQ;EACnC,IAAI,CAAC,SAAS,UAAU,IAAI;GAC1B,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC;GACpB,QAAQ;EACV;CACF;CACA,IAAI,UAAU,IAAI,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC;CACtC,MAAM,QAAQ,KAAK,QAAQ,KAAK,CAAC,GAAG,OAAO,OAAO,IAAI,IAAI,CAAC;CAE3D,MAAM,MAAgB,CAAC;CACvB,IAAI,OAAO;CACX,KAAK,MAAM,CAAC,GAAG,MAAM,MAAM;EAEzB,IAAI,IAAI,MAAM,IAAI,KAAK,IAAI;EAG3B,UAAU,QAAQ,GAAG,GADN,KAAK,IAAI,GAAG,KAAK,MAAO,aAAa,IAAI,KAAM,KAAK,CACtC,GAAG,GAAG;EACnC,OAAO;CACT;CACA,IAAI,OAAO,GAAG,IAAI,KAAK,IAAI;CAC3B,OAAO;AAC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AAGA,SAAgB,KAAK,QAA0B,WAA4B;CACzE,OAAO,YAAY,QAAQ,SAAS,CAAC,CAAC,KAAK,MAAM,OAAO,EAAE;AAC5D"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { r as Point } from "./path-
|
|
2
|
-
//#region src/shapes/decimate.d.ts
|
|
1
|
+
import { r as Point } from "./path-YeUiOfG8.cjs";
|
|
3
2
|
/**
|
|
4
3
|
* Largest-Triangle-Three-Buckets downsampling (Sveinn Steinarsson, 2013):
|
|
5
4
|
* keep roughly `threshold` points that preserve the visual shape of a line,
|
|
@@ -12,6 +11,4 @@ import { r as Point } from "./path-CwB28da0.js";
|
|
|
12
11
|
declare function lttbIndices(points: readonly Point[], threshold: number): number[];
|
|
13
12
|
/** The points kept by {@link lttbIndices}, gaps included. */
|
|
14
13
|
declare function lttb(points: readonly Point[], threshold: number): Point[];
|
|
15
|
-
|
|
16
|
-
export { lttbIndices as n, lttb as t };
|
|
17
|
-
//# sourceMappingURL=decimate-BGg9XgF0.d.ts.map
|
|
14
|
+
export { lttbIndices as n, lttb as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/shapes/decimate.ts
|
|
2
2
|
/**
|
|
3
3
|
* Largest-Triangle-Three-Buckets downsampling (Sveinn Steinarsson, 2013):
|
|
4
4
|
* keep roughly `threshold` points that preserve the visual shape of a line,
|
|
@@ -78,7 +78,6 @@ function sampleRun(points, from, to, budget, out) {
|
|
|
78
78
|
function lttb(points, threshold) {
|
|
79
79
|
return lttbIndices(points, threshold).map((i) => points[i]);
|
|
80
80
|
}
|
|
81
|
-
//#endregion
|
|
82
81
|
export { lttbIndices as n, lttb as t };
|
|
83
82
|
|
|
84
|
-
//# sourceMappingURL=decimate-
|
|
83
|
+
//# sourceMappingURL=decimate-CapfgiDY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimate-
|
|
1
|
+
{"version":3,"file":"decimate-CapfgiDY.js","names":[],"sources":["../src/shapes/decimate.ts"],"sourcesContent":["import type { Point } from './path.ts'\n\n/**\n * Largest-Triangle-Three-Buckets downsampling (Sveinn Steinarsson, 2013):\n * keep roughly `threshold` points that preserve the visual shape of a line,\n * including its peaks and valleys.\n *\n * Returns the indices to keep, in order. Gaps (`null` points) are kept as\n * gap markers and every run between gaps is sampled on its own, so the\n * result lines up with any per-index data (e.g. stacked baselines).\n */\nexport function lttbIndices(points: readonly Point[], threshold: number): number[] {\n const n = points.length\n if (!(threshold >= 3) || n <= threshold) return points.map((_, i) => i)\n\n // Split into runs of valid points.\n const runs: [number, number][] = []\n let start = -1\n for (let i = 0; i < n; i++) {\n const valid = points[i] != null\n if (valid && start === -1) start = i\n if (!valid && start !== -1) {\n runs.push([start, i])\n start = -1\n }\n }\n if (start !== -1) runs.push([start, n])\n const valid = runs.reduce((sum, [a, b]) => sum + (b - a), 0)\n\n const out: number[] = []\n let last = 0\n for (const [a, b] of runs) {\n // One gap marker between runs; everything else in the gap is dropped.\n if (a > last) out.push(last)\n // Each run gets a share of the budget (at least its two ends).\n const budget = Math.max(2, Math.round((threshold * (b - a)) / valid))\n sampleRun(points, a, b, budget, out)\n last = b\n }\n if (last < n) out.push(last)\n return out\n}\n\n/** LTTB over `points[from, to)`, pushing kept indices to `out`. */\nfunction sampleRun(\n points: readonly Point[],\n from: number,\n to: number,\n budget: number,\n out: number[],\n): void {\n const n = to - from\n if (n <= budget) {\n for (let i = from; i < to; i++) out.push(i)\n return\n }\n const at = (i: number) => points[i] as readonly [number, number]\n const bucketSize = (n - 2) / (budget - 2)\n let a = from\n out.push(a)\n\n for (let bucket = 0; bucket < budget - 2; bucket++) {\n // Average of the next bucket is the third corner of every candidate triangle.\n const nextStart = from + 1 + Math.floor((bucket + 1) * bucketSize)\n const nextEnd = Math.min(to, from + 1 + Math.floor((bucket + 2) * bucketSize))\n let avgX = 0\n let avgY = 0\n for (let i = nextStart; i < nextEnd; i++) {\n avgX += at(i)[0]\n avgY += at(i)[1]\n }\n const count = Math.max(1, nextEnd - nextStart)\n avgX /= count\n avgY /= count\n\n // The point of this bucket forming the largest triangle with `a` and the average.\n const rangeStart = from + 1 + Math.floor(bucket * bucketSize)\n const rangeEnd = Math.min(to - 1, from + 1 + Math.floor((bucket + 1) * bucketSize))\n const [ax, ay] = at(a)\n let best = rangeStart\n let bestArea = -1\n for (let i = rangeStart; i < rangeEnd; i++) {\n const [x, y] = at(i)\n const area = Math.abs((ax - avgX) * (y - ay) - (ax - x) * (avgY - ay))\n if (area > bestArea) {\n bestArea = area\n best = i\n }\n }\n out.push(best)\n a = best\n }\n out.push(to - 1)\n}\n\n/** The points kept by {@link lttbIndices}, gaps included. */\nexport function lttb(points: readonly Point[], threshold: number): Point[] {\n return lttbIndices(points, threshold).map((i) => points[i])\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,YAAY,QAA0B,WAA6B;CACjF,MAAM,IAAI,OAAO;CACjB,IAAI,EAAE,aAAa,MAAM,KAAK,WAAW,OAAO,OAAO,KAAK,GAAG,MAAM,CAAC;CAGtE,MAAM,OAA2B,CAAC;CAClC,IAAI,QAAQ;CACZ,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KAAK;EAC1B,MAAM,QAAQ,OAAO,MAAM;EAC3B,IAAI,SAAS,UAAU,IAAI,QAAQ;EACnC,IAAI,CAAC,SAAS,UAAU,IAAI;GAC1B,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC;GACpB,QAAQ;EACV;CACF;CACA,IAAI,UAAU,IAAI,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC;CACtC,MAAM,QAAQ,KAAK,QAAQ,KAAK,CAAC,GAAG,OAAO,OAAO,IAAI,IAAI,CAAC;CAE3D,MAAM,MAAgB,CAAC;CACvB,IAAI,OAAO;CACX,KAAK,MAAM,CAAC,GAAG,MAAM,MAAM;EAEzB,IAAI,IAAI,MAAM,IAAI,KAAK,IAAI;EAG3B,UAAU,QAAQ,GAAG,GADN,KAAK,IAAI,G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;GACrE,IAAI,OAAO,UAAU;IACnB,WAAW;IACX,OAAO;GACT;EACF;EACA,IAAI,KAAK,IAAI;EACb,IAAI;CACN;CACA,IAAI,KAAK,KAAK,CAAC;AACjB;;AAGA,SAAgB,KAAK,QAA0B,WAA4B;CACzE,OAAO,YAAY,QAAQ,SAAS,CAAC,CAAC,KAAK,MAAM,OAAO,EAAE;AAC5D"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { r as Point } from "./path-
|
|
2
|
-
//#region src/shapes/decimate.d.ts
|
|
1
|
+
import { r as Point } from "./path-YeUiOfG8.js";
|
|
3
2
|
/**
|
|
4
3
|
* Largest-Triangle-Three-Buckets downsampling (Sveinn Steinarsson, 2013):
|
|
5
4
|
* keep roughly `threshold` points that preserve the visual shape of a line,
|
|
@@ -12,6 +11,4 @@ import { r as Point } from "./path-CwB28da0.cjs";
|
|
|
12
11
|
declare function lttbIndices(points: readonly Point[], threshold: number): number[];
|
|
13
12
|
/** The points kept by {@link lttbIndices}, gaps included. */
|
|
14
13
|
declare function lttb(points: readonly Point[], threshold: number): Point[];
|
|
15
|
-
|
|
16
|
-
export { lttbIndices as n, lttb as t };
|
|
17
|
-
//# sourceMappingURL=decimate-CNSpgGa5.d.cts.map
|
|
14
|
+
export { lttbIndices as n, lttb as t };
|
package/dist/decimate.cjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_features = require("./features-
|
|
3
|
-
const require_decimate = require("./decimate-
|
|
4
|
-
|
|
2
|
+
const require_features = require("./features-DCXEvoya.cjs");
|
|
3
|
+
const require_decimate = require("./decimate-BS3x8g-f.cjs");
|
|
4
|
+
// src/decimate.ts
|
|
5
5
|
/**
|
|
6
6
|
* Registers LTTB downsampling (`decimate: N` on line and area charts):
|
|
7
7
|
* `import '@tabler/charts/decimate'`. Also exports the algorithm itself.
|
|
8
8
|
*/
|
|
9
9
|
require_features.register({ decimate: require_decimate.lttbIndices });
|
|
10
|
-
//#endregion
|
|
11
10
|
exports.lttb = require_decimate.lttb;
|
|
12
11
|
exports.lttbIndices = require_decimate.lttbIndices;
|
|
13
12
|
|
package/dist/decimate.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as lttbIndices, t as lttb } from "./decimate-
|
|
1
|
+
import { n as lttbIndices, t as lttb } from "./decimate-BxxYBJJk.cjs";
|
|
2
2
|
export { lttb, lttbIndices };
|
package/dist/decimate.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as lttbIndices, t as lttb } from "./decimate-
|
|
1
|
+
import { n as lttbIndices, t as lttb } from "./decimate-Du87fMLG.js";
|
|
2
2
|
export { lttb, lttbIndices };
|
package/dist/decimate.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { i as register } from "./features-
|
|
2
|
-
import { n as lttbIndices, t as lttb } from "./decimate-
|
|
3
|
-
|
|
1
|
+
import { i as register } from "./features-BMxkqCyS.js";
|
|
2
|
+
import { n as lttbIndices, t as lttb } from "./decimate-CapfgiDY.js";
|
|
3
|
+
// src/decimate.ts
|
|
4
4
|
/**
|
|
5
5
|
* Registers LTTB downsampling (`decimate: N` on line and area charts):
|
|
6
6
|
* `import '@tabler/charts/decimate'`. Also exports the algorithm itself.
|
|
7
7
|
*/
|
|
8
8
|
register({ decimate: lttbIndices });
|
|
9
|
-
//#endregion
|
|
10
9
|
export { lttb, lttbIndices };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=decimate.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as features } from "./features-
|
|
2
|
-
|
|
1
|
+
import { r as features } from "./features-BMxkqCyS.js";
|
|
2
|
+
// src/render/attrs.ts
|
|
3
3
|
/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */
|
|
4
4
|
const NAME_RE = /^[a-zA-Z_][\w:.-]*$/;
|
|
5
5
|
/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */
|
|
@@ -12,8 +12,7 @@ function isValidTag(name) {
|
|
|
12
12
|
function isValidAttr(name) {
|
|
13
13
|
return NAME_RE.test(name) && !EVENT_RE.test(name);
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
//#region src/render/dom.ts
|
|
15
|
+
// src/render/dom.ts
|
|
17
16
|
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
18
17
|
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
19
18
|
/** VNode each rendered DOM node was last patched with. */
|
|
@@ -169,7 +168,6 @@ function patchChildren(parent, next) {
|
|
|
169
168
|
anchor = node;
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
|
-
//#endregion
|
|
173
171
|
export { render as a, isValidTag as c, patchAttrs as i, childNamespace as n, rendered as o, createNode as r, isValidAttr as s, SVG_NS as t };
|
|
174
172
|
|
|
175
|
-
//# sourceMappingURL=dom-
|
|
173
|
+
//# sourceMappingURL=dom-CuceR8gt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom-vP3IcMak.js","names":[],"sources":["../src/render/attrs.ts","../src/render/dom.ts"],"sourcesContent":["/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */\nconst NAME_RE = /^[a-zA-Z_][\\w:.-]*$/\n\n/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */\nconst EVENT_RE = /^on/i\n\n/** Whether a tag name is safe to render. */\nexport function isValidTag(name: string): boolean {\n return NAME_RE.test(name)\n}\n\n/** Whether an attribute name is safe to render. */\nexport function isValidAttr(name: string): boolean {\n return NAME_RE.test(name) && !EVENT_RE.test(name)\n}\n","import { features } from '../features.ts'\nimport type { Attrs, Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg'\nconst HTML_NS = 'http://www.w3.org/1999/xhtml'\n\n/** VNode each rendered DOM node was last patched with. */\nexport const rendered: WeakMap<Node, Child> = /* @__PURE__ */ new WeakMap<Node, Child>()\n\n/** Root element rendered into each container. */\nconst roots = /* @__PURE__ */ new WeakMap<Element, Element>()\n\n/**\n * Render a VNode tree into `container`.\n *\n * The first call mounts the tree; later calls patch the existing DOM in place,\n * reusing nodes matched by `key` (or by position for unkeyed children), so CSS\n * transitions on changed attributes keep working. Passing `null` unmounts.\n *\n * The rendered root is appended to `container`; other content of the\n * container is left untouched. On the first call, `replace` names an element\n * already in the container (e.g. server-rendered markup) for the root: when\n * it has the root's tag and `@tabler/charts/hydrate` is loaded (it is part\n * of `@tabler/charts`), its nodes are hydrated: reused and patched to the\n * tree, so nothing is re-created and entrance animations do not run again.\n * Otherwise the root takes its place.\n */\nexport function render(\n container: Element,\n vnode: VNode | null,\n replace?: Element | null,\n): Element | null {\n const prev = roots.get(container) ?? (replace?.parentNode === container ? replace : undefined)\n\n if (vnode === null || !isValidTag(vnode.tag)) {\n if (prev) {\n prev.remove()\n roots.delete(container)\n }\n return null\n }\n\n if (prev && canPatch(prev, vnode)) {\n patchElement(prev, vnode)\n roots.set(container, prev)\n return prev\n }\n\n if (prev && features.hydrate?.(prev, vnode, namespaceFor(container, vnode.tag))) {\n roots.set(container, prev)\n return prev\n }\n\n const el = createElement(vnode, namespaceFor(container, vnode.tag), container.ownerDocument)\n if (prev) prev.replaceWith(el)\n else container.appendChild(el)\n roots.set(container, el)\n return el\n}\n\nfunction namespaceFor(parent: Element, tag: string): string {\n if (tag === 'svg') return SVG_NS\n if (parent.namespaceURI === SVG_NS && parent.localName !== 'foreignObject') return SVG_NS\n return HTML_NS\n}\n\nexport function childNamespace(el: Element): string {\n return el.namespaceURI === SVG_NS && el.localName !== 'foreignObject' ? SVG_NS : HTML_NS\n}\n\nexport function createNode(child: Child, ns: string, doc: Document): Node | null {\n if (typeof child === 'string') {\n const text = doc.createTextNode(child)\n rendered.set(text, child)\n return text\n }\n if (!isValidTag(child.tag)) return null\n return createElement(child, child.tag === 'svg' ? SVG_NS : ns, doc)\n}\n\n/**\n * Styles go through the CSSOM: a strict CSP (`style-src` without\n * 'unsafe-inline') blocks style attributes set with setAttribute, not these.\n */\nfunction setAttr(el: Element, name: string, value: string): void {\n if (name === 'style') (el as HTMLElement).style.cssText = value\n else el.setAttribute(name, value)\n}\n\nfunction createElement(vnode: VNode, ns: string, doc: Document): Element {\n const el = doc.createElementNS(ns, vnode.tag)\n const { attrs } = vnode\n for (const name in attrs) {\n if (isValidAttr(name)) setAttr(el, name, String(attrs[name]))\n }\n const childNs = childNamespace(el)\n for (const child of vnode.children) {\n const node = createNode(child, childNs, doc)\n if (node) el.appendChild(node)\n }\n rendered.set(el, vnode)\n return el\n}\n\nfunction canPatch(node: Node, next: Child): boolean {\n const prev = rendered.get(node)\n if (prev === undefined) return false\n if (typeof next === 'string') return typeof prev === 'string'\n return typeof prev !== 'string' && prev.tag === next.tag && prev.key === next.key\n}\n\nfunction patchNode(node: Node, next: Child): void {\n if (typeof next === 'string') {\n if (rendered.get(node) !== next) {\n ;(node as Text).data = next\n rendered.set(node, next)\n }\n return\n }\n patchElement(node as Element, next)\n}\n\nfunction patchElement(el: Element, next: VNode): void {\n const prev = rendered.get(el) as VNode\n if (prev === next) return\n // An arc sweeps to its new angles, setting its `d` itself on the way: the\n // sweep feature then says what is left to patch.\n patchAttrs(el, prev.attrs, features.sweep?.(el, prev, next) ?? next.attrs, true)\n patchChildren(el, next.children)\n rendered.set(el, next)\n}\n\nexport function patchAttrs(el: Element, prev: Attrs, next: Attrs, update = false): void {\n for (const name in next) {\n const value = next[name] as string | number\n if (prev[name] === value || !isValidAttr(name)) continue\n // Where CSS cannot transition `d` (Safari), the morph feature animates it.\n if (update && name === 'd' && features.morph?.(el, String(prev[name] ?? ''), String(value))) {\n continue\n }\n setAttr(el, name, String(value))\n }\n for (const name in prev) {\n if (!(name in next) && isValidAttr(name)) el.removeAttribute(name)\n }\n}\n\nfunction patchChildren(parent: Element, next: Child[]): void {\n if (next.length === 0 && parent.firstChild === null) return\n\n const oldNodes = Array.from(parent.childNodes)\n const keyed = new Map<unknown, Node>()\n const unkeyed: Node[] = []\n\n for (const node of oldNodes) {\n const vnode = rendered.get(node)\n if (vnode === undefined) continue\n if (typeof vnode !== 'string' && vnode.key !== undefined) keyed.set(vnode.key, node)\n else unkeyed.push(node)\n }\n\n // Match new children against existing nodes.\n const matched = new Array<Node | undefined>(next.length)\n const used = new Set<Node>()\n let cursor = 0\n for (let i = 0; i < next.length; i++) {\n const child = next[i] as Child\n let candidate: Node | undefined\n if (typeof child !== 'string' && child.key !== undefined) {\n candidate = keyed.get(child.key)\n } else if (cursor < unkeyed.length) {\n candidate = unkeyed[cursor]\n }\n if (candidate && !used.has(candidate) && canPatch(candidate, child)) {\n matched[i] = candidate\n used.add(candidate)\n if (candidate === unkeyed[cursor]) cursor++\n }\n }\n\n // Remove unmatched nodes first, so placing the rest needs as few moves as possible.\n for (const node of oldNodes) {\n if (!used.has(node)) parent.removeChild(node)\n }\n\n // Patch or create, then place from the end using the next sibling as anchor.\n const ns = childNamespace(parent)\n const doc = parent.ownerDocument\n let anchor: Node | null = null\n for (let i = next.length - 1; i >= 0; i--) {\n const child = next[i] as Child\n let node = matched[i]\n if (node) {\n patchNode(node, child)\n } else {\n node = createNode(child, ns, doc) ?? undefined\n if (!node) continue\n }\n if (node.parentNode !== parent || node.nextSibling !== anchor) {\n parent.insertBefore(node, anchor)\n }\n anchor = node\n }\n}\n"],"mappings":";;;AACA,MAAM,UAAU;;AAGhB,MAAM,WAAW;;AAGjB,SAAgB,WAAW,MAAuB;CAChD,OAAO,QAAQ,KAAK,IAAI;AAC1B;;AAGA,SAAgB,YAAY,MAAuB;CACjD,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI;AAClD;;;ACVA,MAAa,SAAS;AACtB,MAAM,UAAU;;AAGhB,MAAa,2BAAiD,IAAI,QAAqB;;AAGvF,MAAM,wBAAwB,IAAI,QAA0B;;;;;;;;;;;;;;;;A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AK,MAAM,QAAQ,UACjB,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,OAAO,YAAY,IAAI;CAI9C,MAAM,KAAK,eAAe,MAAM;CAChC,MAAM,MAAM,OAAO;CACnB,IAAI,SAAsB;CAC1B,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,QAAQ,KAAK;EACnB,IAAI,OAAO,QAAQ;EACnB,IAAI,MACF,UAAU,MAAM,KAAK;OAChB;GACL,OAAO,WAAW,OAAO,IAAI,GAAG,KAAK,KAAA;GACrC,IAAI,CAAC,MAAM;EACb;EACA,IAAI,KAAK,eAAe,UAAU,KAAK,gBAAgB,QACrD,OAAO,aAAa,MAAM,MAAM;EAElC,SAAS;CACX;AACF"}
|
|
1
|
+
{"version":3,"file":"dom-CuceR8gt.js","names":[],"sources":["../src/render/attrs.ts","../src/render/dom.ts"],"sourcesContent":["/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */\nconst NAME_RE = /^[a-zA-Z_][\\w:.-]*$/\n\n/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */\nconst EVENT_RE = /^on/i\n\n/** Whether a tag name is safe to render. */\nexport function isValidTag(name: string): boolean {\n return NAME_RE.test(name)\n}\n\n/** Whether an attribute name is safe to render. */\nexport function isValidAttr(name: string): boolean {\n return NAME_RE.test(name) && !EVENT_RE.test(name)\n}\n","import { features } from '../features.ts'\nimport type { Attrs, Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg'\nconst HTML_NS = 'http://www.w3.org/1999/xhtml'\n\n/** VNode each rendered DOM node was last patched with. */\nexport const rendered: WeakMap<Node, Child> = /* @__PURE__ */ new WeakMap<Node, Child>()\n\n/** Root element rendered into each container. */\nconst roots = /* @__PURE__ */ new WeakMap<Element, Element>()\n\n/**\n * Render a VNode tree into `container`.\n *\n * The first call mounts the tree; later calls patch the existing DOM in place,\n * reusing nodes matched by `key` (or by position for unkeyed children), so CSS\n * transitions on changed attributes keep working. Passing `null` unmounts.\n *\n * The rendered root is appended to `container`; other content of the\n * container is left untouched. On the first call, `replace` names an element\n * already in the container (e.g. server-rendered markup) for the root: when\n * it has the root's tag and `@tabler/charts/hydrate` is loaded (it is part\n * of `@tabler/charts`), its nodes are hydrated: reused and patched to the\n * tree, so nothing is re-created and entrance animations do not run again.\n * Otherwise the root takes its place.\n */\nexport function render(\n container: Element,\n vnode: VNode | null,\n replace?: Element | null,\n): Element | null {\n const prev = roots.get(container) ?? (replace?.parentNode === container ? replace : undefined)\n\n if (vnode === null || !isValidTag(vnode.tag)) {\n if (prev) {\n prev.remove()\n roots.delete(container)\n }\n return null\n }\n\n if (prev && canPatch(prev, vnode)) {\n patchElement(prev, vnode)\n roots.set(container, prev)\n return prev\n }\n\n if (prev && features.hydrate?.(prev, vnode, namespaceFor(container, vnode.tag))) {\n roots.set(container, prev)\n return prev\n }\n\n const el = createElement(vnode, namespaceFor(container, vnode.tag), container.ownerDocument)\n if (prev) prev.replaceWith(el)\n else container.appendChild(el)\n roots.set(container, el)\n return el\n}\n\nfunction namespaceFor(parent: Element, tag: string): string {\n if (tag === 'svg') return SVG_NS\n if (parent.namespaceURI === SVG_NS && parent.localName !== 'foreignObject') return SVG_NS\n return HTML_NS\n}\n\nexport function childNamespace(el: Element): string {\n return el.namespaceURI === SVG_NS && el.localName !== 'foreignObject' ? SVG_NS : HTML_NS\n}\n\nexport function createNode(child: Child, ns: string, doc: Document): Node | null {\n if (typeof child === 'string') {\n const text = doc.createTextNode(child)\n rendered.set(text, child)\n return text\n }\n if (!isValidTag(child.tag)) return null\n return createElement(child, child.tag === 'svg' ? SVG_NS : ns, doc)\n}\n\n/**\n * Styles go through the CSSOM: a strict CSP (`style-src` without\n * 'unsafe-inline') blocks style attributes set with setAttribute, not these.\n */\nfunction setAttr(el: Element, name: string, value: string): void {\n if (name === 'style') (el as HTMLElement).style.cssText = value\n else el.setAttribute(name, value)\n}\n\nfunction createElement(vnode: VNode, ns: string, doc: Document): Element {\n const el = doc.createElementNS(ns, vnode.tag)\n const { attrs } = vnode\n for (const name in attrs) {\n if (isValidAttr(name)) setAttr(el, name, String(attrs[name]))\n }\n const childNs = childNamespace(el)\n for (const child of vnode.children) {\n const node = createNode(child, childNs, doc)\n if (node) el.appendChild(node)\n }\n rendered.set(el, vnode)\n return el\n}\n\nfunction canPatch(node: Node, next: Child): boolean {\n const prev = rendered.get(node)\n if (prev === undefined) return false\n if (typeof next === 'string') return typeof prev === 'string'\n return typeof prev !== 'string' && prev.tag === next.tag && prev.key === next.key\n}\n\nfunction patchNode(node: Node, next: Child): void {\n if (typeof next === 'string') {\n if (rendered.get(node) !== next) {\n ;(node as Text).data = next\n rendered.set(node, next)\n }\n return\n }\n patchElement(node as Element, next)\n}\n\nfunction patchElement(el: Element, next: VNode): void {\n const prev = rendered.get(el) as VNode\n if (prev === next) return\n // An arc sweeps to its new angles, setting its `d` itself on the way: the\n // sweep feature then says what is left to patch.\n patchAttrs(el, prev.attrs, features.sweep?.(el, prev, next) ?? next.attrs, true)\n patchChildren(el, next.children)\n rendered.set(el, next)\n}\n\nexport function patchAttrs(el: Element, prev: Attrs, next: Attrs, update = false): void {\n for (const name in next) {\n const value = next[name] as string | number\n if (prev[name] === value || !isValidAttr(name)) continue\n // Where CSS cannot transition `d` (Safari), the morph feature animates it.\n if (update && name === 'd' && features.morph?.(el, String(prev[name] ?? ''), String(value))) {\n continue\n }\n setAttr(el, name, String(value))\n }\n for (const name in prev) {\n if (!(name in next) && isValidAttr(name)) el.removeAttribute(name)\n }\n}\n\nfunction patchChildren(parent: Element, next: Child[]): void {\n if (next.length === 0 && parent.firstChild === null) return\n\n const oldNodes = Array.from(parent.childNodes)\n const keyed = new Map<unknown, Node>()\n const unkeyed: Node[] = []\n\n for (const node of oldNodes) {\n const vnode = rendered.get(node)\n if (vnode === undefined) continue\n if (typeof vnode !== 'string' && vnode.key !== undefined) keyed.set(vnode.key, node)\n else unkeyed.push(node)\n }\n\n // Match new children against existing nodes.\n const matched = new Array<Node | undefined>(next.length)\n const used = new Set<Node>()\n let cursor = 0\n for (let i = 0; i < next.length; i++) {\n const child = next[i] as Child\n let candidate: Node | undefined\n if (typeof child !== 'string' && child.key !== undefined) {\n candidate = keyed.get(child.key)\n } else if (cursor < unkeyed.length) {\n candidate = unkeyed[cursor]\n }\n if (candidate && !used.has(candidate) && canPatch(candidate, child)) {\n matched[i] = candidate\n used.add(candidate)\n if (candidate === unkeyed[cursor]) cursor++\n }\n }\n\n // Remove unmatched nodes first, so placing the rest needs as few moves as possible.\n for (const node of oldNodes) {\n if (!used.has(node)) parent.removeChild(node)\n }\n\n // Patch or create, then place from the end using the next sibling as anchor.\n const ns = childNamespace(parent)\n const doc = parent.ownerDocument\n let anchor: Node | null = null\n for (let i = next.length - 1; i >= 0; i--) {\n const child = next[i] as Child\n let node = matched[i]\n if (node) {\n patchNode(node, child)\n } else {\n node = createNode(child, ns, doc) ?? undefined\n if (!node) continue\n }\n if (node.parentNode !== parent || node.nextSibling !== anchor) {\n parent.insertBefore(node, anchor)\n }\n anchor = node\n }\n}\n"],"mappings":";;;AACA,MAAM,UAAU;;AAGhB,MAAM,WAAW;;AAGjB,SAAgB,WAAW,MAAuB;CAChD,OAAO,QAAQ,KAAK,IAAI;AAC1B;;AAGA,SAAgB,YAAY,MAAuB;CACjD,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI;AAClD;;ACVA,MAAa,SAAS;AACtB,MAAM,UAAU;;AAGhB,MAAa,2BAAiD,IAAI,QAAqB;;AAGvF,MAAM,wBAAwB,IAAI,QAA0B;;;;;;;;;;;;;;;;AAiB5D,SAAgB,OACd,WACA,OACA,SACgB;CAChB,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,SAAS,eAAe,YAAY,UAAU,KAAA;CAEpF,IAAI,UAAU,QAAQ,CAAC,WAAW,MAAM,GAAG,GAAG;EAC5C,IA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AI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,QAAQ,KAAK;EACnB,IAAI,OAAO,QAAQ;EACnB,IAAI,MACF,UAAU,MAAM,KAAK;OAChB;GACL,OAAO,WAAW,OAAO,IAAI,GAAG,KAAK,KAAA;GACrC,IAAI,CAAC,MAAM;EACb;EACA,IAAI,KAAK,eAAe,UAAU,KAAK,gBAAgB,QACrD,OAAO,aAAa,MAAM,MAAM;EAElC,SAAS;CACX;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_features = require("./features-
|
|
2
|
-
|
|
1
|
+
const require_features = require("./features-DCXEvoya.cjs");
|
|
2
|
+
// src/render/attrs.ts
|
|
3
3
|
/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */
|
|
4
4
|
const NAME_RE = /^[a-zA-Z_][\w:.-]*$/;
|
|
5
5
|
/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */
|
|
@@ -12,8 +12,7 @@ function isValidTag(name) {
|
|
|
12
12
|
function isValidAttr(name) {
|
|
13
13
|
return NAME_RE.test(name) && !EVENT_RE.test(name);
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
//#region src/render/dom.ts
|
|
15
|
+
// src/render/dom.ts
|
|
17
16
|
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
18
17
|
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
19
18
|
/** VNode each rendered DOM node was last patched with. */
|
|
@@ -169,7 +168,6 @@ function patchChildren(parent, next) {
|
|
|
169
168
|
anchor = node;
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
|
-
//#endregion
|
|
173
171
|
Object.defineProperty(exports, "SVG_NS", {
|
|
174
172
|
enumerable: true,
|
|
175
173
|
get: function() {
|
|
@@ -219,4 +217,4 @@ Object.defineProperty(exports, "rendered", {
|
|
|
219
217
|
}
|
|
220
218
|
});
|
|
221
219
|
|
|
222
|
-
//# sourceMappingURL=dom-
|
|
220
|
+
//# sourceMappingURL=dom-D_g13XWY.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom-CLF868Qs.cjs","names":["features"],"sources":["../src/render/attrs.ts","../src/render/dom.ts"],"sourcesContent":["/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */\nconst NAME_RE = /^[a-zA-Z_][\\w:.-]*$/\n\n/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */\nconst EVENT_RE = /^on/i\n\n/** Whether a tag name is safe to render. */\nexport function isValidTag(name: string): boolean {\n return NAME_RE.test(name)\n}\n\n/** Whether an attribute name is safe to render. */\nexport function isValidAttr(name: string): boolean {\n return NAME_RE.test(name) && !EVENT_RE.test(name)\n}\n","import { features } from '../features.ts'\nimport type { Attrs, Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg'\nconst HTML_NS = 'http://www.w3.org/1999/xhtml'\n\n/** VNode each rendered DOM node was last patched with. */\nexport const rendered: WeakMap<Node, Child> = /* @__PURE__ */ new WeakMap<Node, Child>()\n\n/** Root element rendered into each container. */\nconst roots = /* @__PURE__ */ new WeakMap<Element, Element>()\n\n/**\n * Render a VNode tree into `container`.\n *\n * The first call mounts the tree; later calls patch the existing DOM in place,\n * reusing nodes matched by `key` (or by position for unkeyed children), so CSS\n * transitions on changed attributes keep working. Passing `null` unmounts.\n *\n * The rendered root is appended to `container`; other content of the\n * container is left untouched. On the first call, `replace` names an element\n * already in the container (e.g. server-rendered markup) for the root: when\n * it has the root's tag and `@tabler/charts/hydrate` is loaded (it is part\n * of `@tabler/charts`), its nodes are hydrated: reused and patched to the\n * tree, so nothing is re-created and entrance animations do not run again.\n * Otherwise the root takes its place.\n */\nexport function render(\n container: Element,\n vnode: VNode | null,\n replace?: Element | null,\n): Element | null {\n const prev = roots.get(container) ?? (replace?.parentNode === container ? replace : undefined)\n\n if (vnode === null || !isValidTag(vnode.tag)) {\n if (prev) {\n prev.remove()\n roots.delete(container)\n }\n return null\n }\n\n if (prev && canPatch(prev, vnode)) {\n patchElement(prev, vnode)\n roots.set(container, prev)\n return prev\n }\n\n if (prev && features.hydrate?.(prev, vnode, namespaceFor(container, vnode.tag))) {\n roots.set(container, prev)\n return prev\n }\n\n const el = createElement(vnode, namespaceFor(container, vnode.tag), container.ownerDocument)\n if (prev) prev.replaceWith(el)\n else container.appendChild(el)\n roots.set(container, el)\n return el\n}\n\nfunction namespaceFor(parent: Element, tag: string): string {\n if (tag === 'svg') return SVG_NS\n if (parent.namespaceURI === SVG_NS && parent.localName !== 'foreignObject') return SVG_NS\n return HTML_NS\n}\n\nexport function childNamespace(el: Element): string {\n return el.namespaceURI === SVG_NS && el.localName !== 'foreignObject' ? SVG_NS : HTML_NS\n}\n\nexport function createNode(child: Child, ns: string, doc: Document): Node | null {\n if (typeof child === 'string') {\n const text = doc.createTextNode(child)\n rendered.set(text, child)\n return text\n }\n if (!isValidTag(child.tag)) return null\n return createElement(child, child.tag === 'svg' ? SVG_NS : ns, doc)\n}\n\n/**\n * Styles go through the CSSOM: a strict CSP (`style-src` without\n * 'unsafe-inline') blocks style attributes set with setAttribute, not these.\n */\nfunction setAttr(el: Element, name: string, value: string): void {\n if (name === 'style') (el as HTMLElement).style.cssText = value\n else el.setAttribute(name, value)\n}\n\nfunction createElement(vnode: VNode, ns: string, doc: Document): Element {\n const el = doc.createElementNS(ns, vnode.tag)\n const { attrs } = vnode\n for (const name in attrs) {\n if (isValidAttr(name)) setAttr(el, name, String(attrs[name]))\n }\n const childNs = childNamespace(el)\n for (const child of vnode.children) {\n const node = createNode(child, childNs, doc)\n if (node) el.appendChild(node)\n }\n rendered.set(el, vnode)\n return el\n}\n\nfunction canPatch(node: Node, next: Child): boolean {\n const prev = rendered.get(node)\n if (prev === undefined) return false\n if (typeof next === 'string') return typeof prev === 'string'\n return typeof prev !== 'string' && prev.tag === next.tag && prev.key === next.key\n}\n\nfunction patchNode(node: Node, next: Child): void {\n if (typeof next === 'string') {\n if (rendered.get(node) !== next) {\n ;(node as Text).data = next\n rendered.set(node, next)\n }\n return\n }\n patchElement(node as Element, next)\n}\n\nfunction patchElement(el: Element, next: VNode): void {\n const prev = rendered.get(el) as VNode\n if (prev === next) return\n // An arc sweeps to its new angles, setting its `d` itself on the way: the\n // sweep feature then says what is left to patch.\n patchAttrs(el, prev.attrs, features.sweep?.(el, prev, next) ?? next.attrs, true)\n patchChildren(el, next.children)\n rendered.set(el, next)\n}\n\nexport function patchAttrs(el: Element, prev: Attrs, next: Attrs, update = false): void {\n for (const name in next) {\n const value = next[name] as string | number\n if (prev[name] === value || !isValidAttr(name)) continue\n // Where CSS cannot transition `d` (Safari), the morph feature animates it.\n if (update && name === 'd' && features.morph?.(el, String(prev[name] ?? ''), String(value))) {\n continue\n }\n setAttr(el, name, String(value))\n }\n for (const name in prev) {\n if (!(name in next) && isValidAttr(name)) el.removeAttribute(name)\n }\n}\n\nfunction patchChildren(parent: Element, next: Child[]): void {\n if (next.length === 0 && parent.firstChild === null) return\n\n const oldNodes = Array.from(parent.childNodes)\n const keyed = new Map<unknown, Node>()\n const unkeyed: Node[] = []\n\n for (const node of oldNodes) {\n const vnode = rendered.get(node)\n if (vnode === undefined) continue\n if (typeof vnode !== 'string' && vnode.key !== undefined) keyed.set(vnode.key, node)\n else unkeyed.push(node)\n }\n\n // Match new children against existing nodes.\n const matched = new Array<Node | undefined>(next.length)\n const used = new Set<Node>()\n let cursor = 0\n for (let i = 0; i < next.length; i++) {\n const child = next[i] as Child\n let candidate: Node | undefined\n if (typeof child !== 'string' && child.key !== undefined) {\n candidate = keyed.get(child.key)\n } else if (cursor < unkeyed.length) {\n candidate = unkeyed[cursor]\n }\n if (candidate && !used.has(candidate) && canPatch(candidate, child)) {\n matched[i] = candidate\n used.add(candidate)\n if (candidate === unkeyed[cursor]) cursor++\n }\n }\n\n // Remove unmatched nodes first, so placing the rest needs as few moves as possible.\n for (const node of oldNodes) {\n if (!used.has(node)) parent.removeChild(node)\n }\n\n // Patch or create, then place from the end using the next sibling as anchor.\n const ns = childNamespace(parent)\n const doc = parent.ownerDocument\n let anchor: Node | null = null\n for (let i = next.length - 1; i >= 0; i--) {\n const child = next[i] as Child\n let node = matched[i]\n if (node) {\n patchNode(node, child)\n } else {\n node = createNode(child, ns, doc) ?? undefined\n if (!node) continue\n }\n if (node.parentNode !== parent || node.nextSibling !== anchor) {\n parent.insertBefore(node, anchor)\n }\n anchor = node\n }\n}\n"],"mappings":";;;AACA,MAAM,UAAU;;AAGhB,MAAM,WAAW;;AAGjB,SAAgB,WAAW,MAAuB;CAChD,OAAO,QAAQ,KAAK,IAAI;AAC1B;;AAGA,SAAgB,YAAY,MAAuB;CACjD,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI;AAClD;;;ACVA,MAAa,SAAS;AACtB,MAAM,UAAU;;AAGhB,MAAa,2BAAiD,IAAI,QAAqB;;AAGvF,MAAM,wBAAwB,IAAI,QAA0B;;;;;;;;;;;;;;;;AAiB5D,SAAgB,OACd,WACA,OACA,SACgB;CAChB,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,SAAS,eAAe,YAAY,UAAU,KAAA;CAEpF,IAAI,UAAU,QAAQ,CAAC,WAAW,MAAM,GAAG,GAAG;EAC5C,IAAI,MAAM;GACR,KAAK,OAAO;GACZ,MAAM,OAAO,SAAS;EACxB;EACA,OAAO;CACT;CAEA,IAAI,QAAQ,SAAS,MAAM,KAAK,GAAG;EACjC,aAAa,MAAM,KAAK;EACxB,MAAM,IAAI,WAAW,IAAI;EACzB,OAAO;CACT;CAEA,IAAI,QAAQA,iBAAAA,SAAS,UAAU,MAAM,OAAO,aAAa,WAAW,MAAM,GAAG,CAAC,GAAG;EAC/E,MAAM,IAAI,WAAW,IAAI;EACzB,OAAO;CACT;CAEA,MAAM,KAAK,cAAc,OAAO,aAAa,WAAW,MAAM,GAAG,GAAG,UAAU,aAAa;CAC3F,IAAI,MAAM,KAAK,YAA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ent":["/** Valid XML-ish tag and attribute names; anything else is skipped by renderers. */\nconst NAME_RE = /^[a-zA-Z_][\\w:.-]*$/\n\n/** Inline event handler attributes (`onclick`, `onLoad`…) are never rendered. */\nconst EVENT_RE = /^on/i\n\n/** Whether a tag name is safe to render. */\nexport function isValidTag(name: string): boolean {\n return NAME_RE.test(name)\n}\n\n/** Whether an attribute name is safe to render. */\nexport function isValidAttr(name: string): boolean {\n return NAME_RE.test(name) && !EVENT_RE.test(name)\n}\n","import { features } from '../features.ts'\nimport type { Attrs, Child, VNode } from '../vnode.ts'\nimport { isValidAttr, isValidTag } from './attrs.ts'\n\nexport const SVG_NS = 'http://www.w3.org/2000/svg'\nconst HTML_NS = 'http://www.w3.org/1999/xhtml'\n\n/** VNode each rendered DOM node was last patched with. */\nexport const rendered: WeakMap<Node, Child> = /* @__PURE__ */ new WeakMap<Node, Child>()\n\n/** Root element rendered into each container. */\nconst roots = /* @__PURE__ */ new WeakMap<Element, Element>()\n\n/**\n * Render a VNode tree into `container`.\n *\n * The first call mounts the tree; later calls patch the existing DOM in place,\n * reusing nodes matched by `key` (or by position for unkeyed children), so CSS\n * transitions on changed attributes keep working. Passing `null` unmounts.\n *\n * The rendered root is appended to `container`; other content of the\n * container is left untouched. On the first call, `replace` names an element\n * already in the container (e.g. server-rendered markup) for the root: when\n * it has the root's tag and `@tabler/charts/hydrate` is loaded (it is part\n * of `@tabler/charts`), its nodes are hydrated: reused and patched to the\n * tree, so nothing is re-created and entrance animations do not run again.\n * Otherwise the root takes its place.\n */\nexport function render(\n container: Element,\n vnode: VNode | null,\n replace?: Element | null,\n): Element | null {\n const prev = roots.get(container) ?? (replace?.parentNode === container ? replace : undefined)\n\n if (vnode === null || !isValidTag(vnode.tag)) {\n if (prev) {\n prev.remove()\n roots.delete(container)\n }\n return null\n }\n\n if (prev && canPatch(prev, vnode)) {\n patchElement(prev, vnode)\n roots.set(container, prev)\n return prev\n }\n\n if (prev && features.hydrate?.(prev, vnode, namespaceFor(container, vnode.tag))) {\n roots.set(container, prev)\n return prev\n }\n\n const el = createElement(vnode, namespaceFor(container, vnode.tag), container.ownerDocument)\n if (prev) prev.replaceWith(el)\n else container.appendChild(el)\n roots.set(container, el)\n return el\n}\n\nfunction namespaceFor(parent: Element, tag: string): string {\n if (tag === 'svg') return SVG_NS\n if (parent.namespaceURI === SVG_NS && parent.localName !== 'foreignObject') return SVG_NS\n return HTML_NS\n}\n\nexport function childNamespace(el: Element): string {\n return el.namespaceURI === SVG_NS && el.localName !== 'foreignObject' ? SVG_NS : HTML_NS\n}\n\nexport function createNode(child: Child, ns: string, doc: Document): Node | null {\n if (typeof child === 'string') {\n const text = doc.createTextNode(child)\n rendered.set(text, child)\n return text\n }\n if (!isValidTag(child.tag)) return null\n return createElement(child, child.tag === 'svg' ? SVG_NS : ns, doc)\n}\n\n/**\n * Styles go through the CSSOM: a strict CSP (`style-src` without\n * 'unsafe-inline') blocks style attributes set with setAttribute, not these.\n */\nfunction setAttr(el: Element, name: string, value: string): void {\n if (name === 'style') (el as HTMLElement).style.cssText = value\n else el.setAttribute(name, value)\n}\n\nfunction createElement(vnode: VNode, ns: string, doc: Document): Element {\n const el = doc.createElementNS(ns, vnode.tag)\n const { attrs } = vnode\n for (const name in attrs) {\n if (isValidAttr(name)) setAttr(el, name, String(attrs[name]))\n }\n const childNs = childNamespace(el)\n for (const child of vnode.children) {\n const node = createNode(child, childNs, doc)\n if (node) el.appendChild(node)\n }\n rendered.set(el, vnode)\n return el\n}\n\nfunction canPatch(node: Node, next: Child): boolean {\n const prev = rendered.get(node)\n if (prev === undefined) return false\n if (typeof next === 'string') return typeof prev === 'string'\n return typeof prev !== 'string' && prev.tag === next.tag && prev.key === next.key\n}\n\nfunction patchNode(node: Node, next: Child): void {\n if (typeof next === 'string') {\n if (rendered.get(node) !== next) {\n ;(node as Text).data = next\n rendered.set(node, next)\n }\n return\n }\n patchElement(node as Element, next)\n}\n\nfunction patchElement(el: Element, next: VNode): void {\n const prev = rendered.get(el) as VNode\n if (prev === next) return\n // An arc sweeps to its new angles, setting its `d` itself on the way: the\n // sweep feature then says what is left to patch.\n patchAttrs(el, prev.attrs, features.sweep?.(el, prev, next) ?? next.attrs, true)\n patchChildren(el, next.children)\n rendered.set(el, next)\n}\n\nexport function patchAttrs(el: Element, prev: Attrs, next: Attrs, update = false): void {\n for (const name in next) {\n const value = next[name] as string | number\n if (prev[name] === value || !isValidAttr(name)) continue\n // Where CSS cannot transition `d` (Safari), the morph feature animates it.\n if (update && name === 'd' && features.morph?.(el, String(prev[name] ?? ''), String(value))) {\n continue\n }\n setAttr(el, name, String(value))\n }\n for (const name in prev) {\n if (!(name in next) && isValidAttr(name)) el.removeAttribute(name)\n }\n}\n\nfunction patchChildren(parent: Element, next: Child[]): void {\n if (next.length === 0 && parent.firstChild === null) return\n\n const oldNodes = Array.from(parent.childNodes)\n const keyed = new Map<unknown, Node>()\n const unkeyed: Node[] = []\n\n for (const node of oldNodes) {\n const vnode = rendered.get(node)\n if (vnode === undefined) continue\n if (typeof vnode !== 'string' && vnode.key !== undefined) keyed.set(vnode.key, node)\n else unkeyed.push(node)\n }\n\n // Match new children against existing nodes.\n const matched = new Array<Node | undefined>(next.length)\n const used = new Set<Node>()\n let cursor = 0\n for (let i = 0; i < next.length; i++) {\n const child = next[i] as Child\n let candidate: Node | undefined\n if (typeof child !== 'string' && child.key !== undefined) {\n candidate = keyed.get(child.key)\n } else if (cursor < unkeyed.length) {\n candidate = unkeyed[cursor]\n }\n if (candidate && !used.has(candidate) && canPatch(candidate, child)) {\n matched[i] = candidate\n used.add(candidate)\n if (candidate === unkeyed[cursor]) cursor++\n }\n }\n\n // Remove unmatched nodes first, so placing the rest needs as few moves as possible.\n for (const node of oldNodes) {\n if (!used.has(node)) parent.removeChild(node)\n }\n\n // Patch or create, then place from the end using the next sibling as anchor.\n const ns = childNamespace(parent)\n const doc = parent.ownerDocument\n let anchor: Node | null = null\n for (let i = next.length - 1; i >= 0; i--) {\n const child = next[i] as Child\n let node = matched[i]\n if (node) {\n patchNode(node, child)\n } else {\n node = createNode(child, ns, doc) ?? undefined\n if (!node) continue\n }\n if (node.parentNode !== parent || node.nextSibling !== anchor) {\n parent.insertBefore(node, anchor)\n }\n anchor = node\n }\n}\n"],"mappings":";;;AACA,MAAM,UAAU;;AAGhB,MAAM,WAAW;;AAGjB,SAAgB,WAAW,MAAuB;CAChD,OAAO,QAAQ,KAAK,IAAI;AAC1B;;AAGA,SAAgB,YAAY,MAAuB;CACjD,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI;AAClD;;ACVA,MAAa,SAAS;AACtB,MAAM,UAAU;;AAGhB,MAAa,2BAAiD,IAAI,QAAqB;;AAGvF,MAAM,wBAAwB,IAAI,QAA0B;;;;;;;;;;;;;;;;AAiB5D,SAAgB,OACd,WACA,OACA,SACgB;CAChB,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,SAAS,eAAe,YAAY,UAAU,KAAA;CAEpF,IAAI,UAAU,QAAQ,CAAC,WAAW,MAAM,GAAG,GAAG;EAC5C,IAAI,MAAM;GACR,KAAK,OAAO;GACZ,MAAM,OAAO,SAAS;EACxB;EACA,OAAO;CACT;CAEA,IAAI,QAAQ,SAAS,MAAM,KAAK,GAAG;EACjC,aAAa,MAAM,KAAK;EACxB,MAAM,IAAI,WAAW,IAAI;EACzB,OAAO;CACT;CAEA,IAAI,QAAQA,iBAAAA,SAAS,UAAU,MAAM,OAAO,aAAa,WAAW,MAAM,GAAG,CAAC,GAAG;EAC/E,MAAM,IAAI,WAAW,IAAI;EACzB,OAAO;CACT;CAEA,MAAM,KAAK,cAAc,OAAO,aAAa,WAAW,MAAM,GAAG,GAAG,UAAU,aAAa;CAC3F,IAAI,MAAM,KAAK,YAAY,EAAE;MACxB,UAAU,YAAY,EAAE;CAC7B,MAAM,IAAI,WAAW,EAAE;CACvB,OAAO;AACT;AAEA,SAAS,aAAa,QAAiB,KAAqB;CAC1D,IAAI,QAAQ,OAAO,O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AAI;OAC9E,QAAQ,KAAK,IAAI;CACxB;CAGA,MAAM,UAAU,IAAI,MAAwB,KAAK,MAAM;CACvD,MAAM,uBAAO,IAAI,IAAU;CAC3B,IAAI,SAAS;CACb,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,QAAQ,KAAK;EACnB,IAAI;EACJ,IAAI,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAA,GAC7C,YAAY,MAAM,IAAI,MAAM,GAAG;OAC1B,IAAI,SAAS,QAAQ,QAC1B,YAAY,QAAQ;EAEtB,IAAI,aAAa,CAAC,KAAK,IAAI,SAAS,KAAK,SAAS,WAAW,KAAK,GAAG;GACnE,QAAQ,KAAK;GACb,KAAK,IAAI,SAAS;GAClB,IAAI,cAAc,QAAQ,SAAS;EACrC;CACF;CAGA,KAAK,MAAM,QAAQ,UACjB,IAAI,CAAC,KAAK,IAAI,IAAI,GAAG,OAAO,YAAY,IAAI;CAI9C,MAAM,KAAK,eAAe,MAAM;CAChC,MAAM,MAAM,OAAO;CACnB,IAAI,SAAsB;CAC1B,KAAK,IAAI,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK;EACzC,MAAM,QAAQ,KAAK;EACnB,IAAI,OAAO,QAAQ;EACnB,IAAI,MACF,UAAU,MAAM,KAAK;OAChB;GACL,OAAO,WAAW,OAAO,IAAI,GAAG,KAAK,KAAA;GACrC,IAAI,CAAC,MAAM;EACb;EACA,IAAI,KAAK,eAAe,UAAU,KAAK,gBAAgB,QACrD,OAAO,aAAa,MAAM,MAAM;EAElC,SAAS;CACX;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { o as round } from "./layout-DmrrLjwN.js";
|
|
2
|
+
// src/export-chart.ts
|
|
3
3
|
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
4
4
|
/** Properties copied from the computed style, with the values they can be left out at. */
|
|
5
5
|
const SHAPE = {
|
|
@@ -226,7 +226,6 @@ async function downloadChart(target, options = {}) {
|
|
|
226
226
|
link.click();
|
|
227
227
|
setTimeout(() => URL.revokeObjectURL(link.href), 1e3);
|
|
228
228
|
}
|
|
229
|
-
//#endregion
|
|
230
229
|
export { exportImage as n, exportSVG as r, downloadChart as t };
|
|
231
230
|
|
|
232
|
-
//# sourceMappingURL=export-chart-
|
|
231
|
+
//# sourceMappingURL=export-chart-83UYH48t.js.map
|