@tabler/charts 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +258 -2
  3. package/dist/annotations-Bp7HwtF5.d.ts +86 -0
  4. package/dist/annotations-BszTTjf9.js +202 -0
  5. package/dist/annotations-BszTTjf9.js.map +1 -0
  6. package/dist/annotations-DpETO8dE.cjs +213 -0
  7. package/dist/annotations-DpETO8dE.cjs.map +1 -0
  8. package/dist/annotations-lyt0I3HU.d.cts +86 -0
  9. package/dist/annotations.cjs +14 -0
  10. package/dist/annotations.cjs.map +1 -0
  11. package/dist/annotations.d.cts +2 -0
  12. package/dist/annotations.d.ts +2 -0
  13. package/dist/annotations.js +12 -0
  14. package/dist/annotations.js.map +1 -0
  15. package/dist/arc-BXpLrt9b.cjs +301 -0
  16. package/dist/arc-BXpLrt9b.cjs.map +1 -0
  17. package/dist/arc-a1tRTEw7.js +278 -0
  18. package/dist/arc-a1tRTEw7.js.map +1 -0
  19. package/dist/area-CF__HOwL.d.ts +20 -0
  20. package/dist/area-DIxaAbYZ.d.cts +20 -0
  21. package/dist/area-DQsLERhx.js +26 -0
  22. package/dist/area-DQsLERhx.js.map +1 -0
  23. package/dist/area-sHCE3pg5.cjs +31 -0
  24. package/dist/area-sHCE3pg5.cjs.map +1 -0
  25. package/dist/area.cjs +3 -0
  26. package/dist/area.d.cts +2 -0
  27. package/dist/area.d.ts +2 -0
  28. package/dist/area.js +2 -0
  29. package/dist/band-DTcNDAFO.d.cts +50 -0
  30. package/dist/band-DTcNDAFO.d.ts +50 -0
  31. package/dist/bar-BBM8RhoL.d.ts +43 -0
  32. package/dist/bar-C-7zR2qp.cjs +243 -0
  33. package/dist/bar-C-7zR2qp.cjs.map +1 -0
  34. package/dist/bar-CRKLDg98.d.cts +43 -0
  35. package/dist/bar-DGuUN3nc.cjs +67 -0
  36. package/dist/bar-DGuUN3nc.cjs.map +1 -0
  37. package/dist/bar-DM16NUvV.js +56 -0
  38. package/dist/bar-DM16NUvV.js.map +1 -0
  39. package/dist/bar-jZEoao74.js +238 -0
  40. package/dist/bar-jZEoao74.js.map +1 -0
  41. package/dist/bar.cjs +3 -0
  42. package/dist/bar.d.cts +2 -0
  43. package/dist/bar.d.ts +2 -0
  44. package/dist/bar.js +2 -0
  45. package/dist/candlestick-B5r1w3kc.cjs +150 -0
  46. package/dist/candlestick-B5r1w3kc.cjs.map +1 -0
  47. package/dist/candlestick-D_vV0_XZ.d.ts +44 -0
  48. package/dist/candlestick-DuXwAFID.js +145 -0
  49. package/dist/candlestick-DuXwAFID.js.map +1 -0
  50. package/dist/candlestick-__pXl_pV.d.cts +44 -0
  51. package/dist/candlestick.cjs +11 -0
  52. package/dist/candlestick.cjs.map +1 -0
  53. package/dist/candlestick.d.cts +2 -0
  54. package/dist/candlestick.d.ts +2 -0
  55. package/dist/candlestick.js +10 -0
  56. package/dist/candlestick.js.map +1 -0
  57. package/dist/cartesian-BoDfgBCV.cjs +900 -0
  58. package/dist/cartesian-BoDfgBCV.cjs.map +1 -0
  59. package/dist/cartesian-Cr0AF0nG.js +709 -0
  60. package/dist/cartesian-Cr0AF0nG.js.map +1 -0
  61. package/dist/chart-BF2CK9I_.js +790 -0
  62. package/dist/chart-BF2CK9I_.js.map +1 -0
  63. package/dist/chart-CowF_lWY.cjs +903 -0
  64. package/dist/chart-CowF_lWY.cjs.map +1 -0
  65. package/dist/chart-D7ooEFnk.d.cts +933 -0
  66. package/dist/chart-DyN7bcx8.d.ts +933 -0
  67. package/dist/circle-BQMuAfls.cjs +12 -0
  68. package/dist/circle-BQMuAfls.cjs.map +1 -0
  69. package/dist/circle-Z7YfCoCM.js +7 -0
  70. package/dist/circle-Z7YfCoCM.js.map +1 -0
  71. package/dist/clean-Byl6kzf0.cjs +115 -0
  72. package/dist/clean-Byl6kzf0.cjs.map +1 -0
  73. package/dist/clean-o1vDEhFV.js +56 -0
  74. package/dist/clean-o1vDEhFV.js.map +1 -0
  75. package/dist/core-CegR_j55.js +884 -0
  76. package/dist/core-CegR_j55.js.map +1 -0
  77. package/dist/core-D1vO1LrC.d.cts +220 -0
  78. package/dist/core-DcbemzGf.d.ts +220 -0
  79. package/dist/core-RzS9IQO5.cjs +985 -0
  80. package/dist/core-RzS9IQO5.cjs.map +1 -0
  81. package/dist/core.cjs +115 -0
  82. package/dist/core.d.cts +21 -0
  83. package/dist/core.d.ts +21 -0
  84. package/dist/core.js +25 -0
  85. package/dist/dates-Btm7Zm6W.cjs +32 -0
  86. package/dist/dates-Btm7Zm6W.cjs.map +1 -0
  87. package/dist/dates-CG-FvioW.js +27 -0
  88. package/dist/dates-CG-FvioW.js.map +1 -0
  89. package/dist/decimate-BGg9XgF0.d.ts +17 -0
  90. package/dist/decimate-C87cl_Sp.js +84 -0
  91. package/dist/decimate-C87cl_Sp.js.map +1 -0
  92. package/dist/decimate-CNSpgGa5.d.cts +17 -0
  93. package/dist/decimate-tLhDk1ys.cjs +95 -0
  94. package/dist/decimate-tLhDk1ys.cjs.map +1 -0
  95. package/dist/decimate.cjs +14 -0
  96. package/dist/decimate.cjs.map +1 -0
  97. package/dist/decimate.d.cts +2 -0
  98. package/dist/decimate.d.ts +2 -0
  99. package/dist/decimate.js +12 -0
  100. package/dist/decimate.js.map +1 -0
  101. package/dist/dom-CLF868Qs.cjs +222 -0
  102. package/dist/dom-CLF868Qs.cjs.map +1 -0
  103. package/dist/dom-vP3IcMak.js +175 -0
  104. package/dist/dom-vP3IcMak.js.map +1 -0
  105. package/dist/export-chart-9w8t3rjZ.js +232 -0
  106. package/dist/export-chart-9w8t3rjZ.js.map +1 -0
  107. package/dist/export-chart-BhhYgksr.cjs +249 -0
  108. package/dist/export-chart-BhhYgksr.cjs.map +1 -0
  109. package/dist/export.cjs +18 -0
  110. package/dist/export.cjs.map +1 -0
  111. package/dist/export.d.cts +2 -0
  112. package/dist/export.d.ts +2 -0
  113. package/dist/export.js +15 -0
  114. package/dist/export.js.map +1 -0
  115. package/dist/extent-BAMZo0Nq.js +19 -0
  116. package/dist/extent-BAMZo0Nq.js.map +1 -0
  117. package/dist/extent-DsFWvAHJ.cjs +24 -0
  118. package/dist/extent-DsFWvAHJ.cjs.map +1 -0
  119. package/dist/fade-Cs74puQS.cjs +217 -0
  120. package/dist/fade-Cs74puQS.cjs.map +1 -0
  121. package/dist/fade-D3NxH5Qg.js +200 -0
  122. package/dist/fade-D3NxH5Qg.js.map +1 -0
  123. package/dist/features-BclHgg2W.cjs +48 -0
  124. package/dist/features-BclHgg2W.cjs.map +1 -0
  125. package/dist/features-wASyHGic.js +25 -0
  126. package/dist/features-wASyHGic.js.map +1 -0
  127. package/dist/format-B0yKXBTH.cjs +183 -0
  128. package/dist/format-B0yKXBTH.cjs.map +1 -0
  129. package/dist/format-lStwuc1L.js +142 -0
  130. package/dist/format-lStwuc1L.js.map +1 -0
  131. package/dist/gauge-D-FYhuds.cjs +236 -0
  132. package/dist/gauge-D-FYhuds.cjs.map +1 -0
  133. package/dist/gauge-DP_EB2z3.d.cts +65 -0
  134. package/dist/gauge-Dh423FHh.js +231 -0
  135. package/dist/gauge-Dh423FHh.js.map +1 -0
  136. package/dist/gauge-zpia05t2.d.ts +65 -0
  137. package/dist/gauge.cjs +3 -0
  138. package/dist/gauge.d.cts +2 -0
  139. package/dist/gauge.d.ts +2 -0
  140. package/dist/gauge.js +2 -0
  141. package/dist/heatmap-BK18EBgJ.cjs +247 -0
  142. package/dist/heatmap-BK18EBgJ.cjs.map +1 -0
  143. package/dist/heatmap-BectCEeE.d.ts +81 -0
  144. package/dist/heatmap-CCso6m61.d.cts +81 -0
  145. package/dist/heatmap-DSZ2bVIa.js +242 -0
  146. package/dist/heatmap-DSZ2bVIa.js.map +1 -0
  147. package/dist/heatmap.cjs +3 -0
  148. package/dist/heatmap.d.cts +2 -0
  149. package/dist/heatmap.d.ts +2 -0
  150. package/dist/heatmap.js +2 -0
  151. package/dist/hydrate-CTTmQy0x.d.cts +10 -0
  152. package/dist/hydrate-CxwTXDqO.cjs +60 -0
  153. package/dist/hydrate-CxwTXDqO.cjs.map +1 -0
  154. package/dist/hydrate-CzfxLfTv.d.ts +10 -0
  155. package/dist/hydrate-DDNIHYv_.js +55 -0
  156. package/dist/hydrate-DDNIHYv_.js.map +1 -0
  157. package/dist/hydrate.cjs +13 -0
  158. package/dist/hydrate.cjs.map +1 -0
  159. package/dist/hydrate.d.cts +2 -0
  160. package/dist/hydrate.d.ts +2 -0
  161. package/dist/hydrate.js +12 -0
  162. package/dist/hydrate.js.map +1 -0
  163. package/dist/index.cjs +214 -0
  164. package/dist/index.cjs.map +1 -0
  165. package/dist/index.d.cts +46 -0
  166. package/dist/index.d.ts +46 -0
  167. package/dist/index.js +115 -0
  168. package/dist/index.js.map +1 -0
  169. package/dist/layout-B3hiqVEw.js +69 -0
  170. package/dist/layout-B3hiqVEw.js.map +1 -0
  171. package/dist/layout-CtMBhNd9.cjs +98 -0
  172. package/dist/layout-CtMBhNd9.cjs.map +1 -0
  173. package/dist/line-B3Ed6u7j.js +120 -0
  174. package/dist/line-B3Ed6u7j.js.map +1 -0
  175. package/dist/line-CN4uZ9ZX.d.ts +47 -0
  176. package/dist/line-W7VD_qs1.d.cts +47 -0
  177. package/dist/line-fQbtP_jL.cjs +131 -0
  178. package/dist/line-fQbtP_jL.cjs.map +1 -0
  179. package/dist/line.cjs +14 -0
  180. package/dist/line.cjs.map +1 -0
  181. package/dist/line.d.cts +2 -0
  182. package/dist/line.d.ts +2 -0
  183. package/dist/line.js +13 -0
  184. package/dist/line.js.map +1 -0
  185. package/dist/log-CaofN3-n.d.cts +48 -0
  186. package/dist/log-CaofN3-n.d.ts +48 -0
  187. package/dist/log-axis-83rSpvL5.cjs +130 -0
  188. package/dist/log-axis-83rSpvL5.cjs.map +1 -0
  189. package/dist/log-axis-B_uvvOFc.js +113 -0
  190. package/dist/log-axis-B_uvvOFc.js.map +1 -0
  191. package/dist/log.cjs +17 -0
  192. package/dist/log.cjs.map +1 -0
  193. package/dist/log.d.cts +2 -0
  194. package/dist/log.d.ts +2 -0
  195. package/dist/log.js +16 -0
  196. package/dist/log.js.map +1 -0
  197. package/dist/morph-BMxz3X2b.d.cts +10 -0
  198. package/dist/morph-BMxz3X2b.d.ts +10 -0
  199. package/dist/morph-Bgg-24l8.js +36 -0
  200. package/dist/morph-Bgg-24l8.js.map +1 -0
  201. package/dist/morph-CqYDu1bY.cjs +41 -0
  202. package/dist/morph-CqYDu1bY.cjs.map +1 -0
  203. package/dist/morph.cjs +14 -0
  204. package/dist/morph.cjs.map +1 -0
  205. package/dist/morph.d.cts +2 -0
  206. package/dist/morph.d.ts +2 -0
  207. package/dist/morph.js +13 -0
  208. package/dist/morph.js.map +1 -0
  209. package/dist/named-BWWb5LQJ.cjs +50 -0
  210. package/dist/named-BWWb5LQJ.cjs.map +1 -0
  211. package/dist/named-DE15TOgh.js +33 -0
  212. package/dist/named-DE15TOgh.js.map +1 -0
  213. package/dist/parliament-1Zv2Xh0D.d.ts +69 -0
  214. package/dist/parliament-CpWnoEvG.cjs +308 -0
  215. package/dist/parliament-CpWnoEvG.cjs.map +1 -0
  216. package/dist/parliament-DdrLVZwt.d.cts +69 -0
  217. package/dist/parliament-Dw0sOERi.js +303 -0
  218. package/dist/parliament-Dw0sOERi.js.map +1 -0
  219. package/dist/parliament.cjs +3 -0
  220. package/dist/parliament.d.cts +2 -0
  221. package/dist/parliament.d.ts +2 -0
  222. package/dist/parliament.js +2 -0
  223. package/dist/path-CwB28da0.d.cts +29 -0
  224. package/dist/path-CwB28da0.d.ts +29 -0
  225. package/dist/patterns-DtgcnA8o.js +85 -0
  226. package/dist/patterns-DtgcnA8o.js.map +1 -0
  227. package/dist/patterns-LfcQAWCy.cjs +102 -0
  228. package/dist/patterns-LfcQAWCy.cjs.map +1 -0
  229. package/dist/patterns.cjs +15 -0
  230. package/dist/patterns.cjs.map +1 -0
  231. package/dist/patterns.d.cts +2 -0
  232. package/dist/patterns.d.ts +2 -0
  233. package/dist/patterns.js +12 -0
  234. package/dist/patterns.js.map +1 -0
  235. package/dist/pie-5z1fDdKO.d.ts +58 -0
  236. package/dist/pie-BF9yI5mE.d.cts +58 -0
  237. package/dist/pie-BxTZt6Go.cjs +212 -0
  238. package/dist/pie-BxTZt6Go.cjs.map +1 -0
  239. package/dist/pie-DzUXDTcn.js +201 -0
  240. package/dist/pie-DzUXDTcn.js.map +1 -0
  241. package/dist/pie.cjs +4 -0
  242. package/dist/pie.d.cts +2 -0
  243. package/dist/pie.d.ts +2 -0
  244. package/dist/pie.js +2 -0
  245. package/dist/point-shapes-CGl4dugc.cjs +166 -0
  246. package/dist/point-shapes-CGl4dugc.cjs.map +1 -0
  247. package/dist/point-shapes-DI84NNpI.js +155 -0
  248. package/dist/point-shapes-DI84NNpI.js.map +1 -0
  249. package/dist/point-shapes.cjs +15 -0
  250. package/dist/point-shapes.cjs.map +1 -0
  251. package/dist/point-shapes.d.cts +2 -0
  252. package/dist/point-shapes.d.ts +2 -0
  253. package/dist/point-shapes.js +13 -0
  254. package/dist/point-shapes.js.map +1 -0
  255. package/dist/radar-1-EryihA.d.ts +60 -0
  256. package/dist/radar-CYPab_I4.js +285 -0
  257. package/dist/radar-CYPab_I4.js.map +1 -0
  258. package/dist/radar-CoGUNNSb.cjs +290 -0
  259. package/dist/radar-CoGUNNSb.cjs.map +1 -0
  260. package/dist/radar-DBW4O0Vt.d.cts +60 -0
  261. package/dist/radar.cjs +3 -0
  262. package/dist/radar.d.cts +2 -0
  263. package/dist/radar.d.ts +2 -0
  264. package/dist/radar.js +2 -0
  265. package/dist/sankey-B4PNKusJ.js +420 -0
  266. package/dist/sankey-B4PNKusJ.js.map +1 -0
  267. package/dist/sankey-Bacx4fVe.cjs +425 -0
  268. package/dist/sankey-Bacx4fVe.cjs.map +1 -0
  269. package/dist/sankey-DuGI3Qc5.d.cts +67 -0
  270. package/dist/sankey-OV_WoPrl.d.ts +67 -0
  271. package/dist/sankey.cjs +3 -0
  272. package/dist/sankey.d.cts +2 -0
  273. package/dist/sankey.d.ts +2 -0
  274. package/dist/sankey.js +2 -0
  275. package/dist/scatter-BqzgJqdX.d.ts +61 -0
  276. package/dist/scatter-DbxLyZX0.d.cts +61 -0
  277. package/dist/scatter-DgMN9zRy.cjs +250 -0
  278. package/dist/scatter-DgMN9zRy.cjs.map +1 -0
  279. package/dist/scatter-kgtgR318.js +245 -0
  280. package/dist/scatter-kgtgR318.js.map +1 -0
  281. package/dist/scatter.cjs +3 -0
  282. package/dist/scatter.d.cts +2 -0
  283. package/dist/scatter.d.ts +2 -0
  284. package/dist/scatter.js +2 -0
  285. package/dist/sparkline-BQzt27Fr.js +171 -0
  286. package/dist/sparkline-BQzt27Fr.js.map +1 -0
  287. package/dist/sparkline-BS9-hltA.cjs +176 -0
  288. package/dist/sparkline-BS9-hltA.cjs.map +1 -0
  289. package/dist/sparkline-BfyO_oNM.d.ts +43 -0
  290. package/dist/sparkline-CWlJDKyh.d.cts +43 -0
  291. package/dist/sparkline.cjs +3 -0
  292. package/dist/sparkline.d.cts +2 -0
  293. package/dist/sparkline.d.ts +2 -0
  294. package/dist/sparkline.js +2 -0
  295. package/dist/stack-CpR6RGKd.d.cts +6 -0
  296. package/dist/stack-CpR6RGKd.d.ts +6 -0
  297. package/dist/stack-DRbwTeF3.js +66 -0
  298. package/dist/stack-DRbwTeF3.js.map +1 -0
  299. package/dist/stack-DVhJWaki.cjs +77 -0
  300. package/dist/stack-DVhJWaki.cjs.map +1 -0
  301. package/dist/style.css +2 -0
  302. package/dist/sweep-CbfR7--d.js +60 -0
  303. package/dist/sweep-CbfR7--d.js.map +1 -0
  304. package/dist/sweep-DaTEDDuC.cjs +71 -0
  305. package/dist/sweep-DaTEDDuC.cjs.map +1 -0
  306. package/dist/time-CHjiY9Q4.d.ts +112 -0
  307. package/dist/time-CNVnt-B2.d.cts +112 -0
  308. package/dist/time-axis-Bc9eHX1r.js +365 -0
  309. package/dist/time-axis-Bc9eHX1r.js.map +1 -0
  310. package/dist/time-axis-VSX34_Tb.cjs +382 -0
  311. package/dist/time-axis-VSX34_Tb.cjs.map +1 -0
  312. package/dist/time.cjs +22 -0
  313. package/dist/time.cjs.map +1 -0
  314. package/dist/time.d.cts +2 -0
  315. package/dist/time.d.ts +2 -0
  316. package/dist/time.js +20 -0
  317. package/dist/time.js.map +1 -0
  318. package/dist/tween-BCYd0RTY.js +40 -0
  319. package/dist/tween-BCYd0RTY.js.map +1 -0
  320. package/dist/tween-CIGBlryn.cjs +51 -0
  321. package/dist/tween-CIGBlryn.cjs.map +1 -0
  322. package/dist/value-labels-B0WJoJ7x.cjs +134 -0
  323. package/dist/value-labels-B0WJoJ7x.cjs.map +1 -0
  324. package/dist/value-labels-IZIQPhfk.js +123 -0
  325. package/dist/value-labels-IZIQPhfk.js.map +1 -0
  326. package/dist/value-labels.cjs +14 -0
  327. package/dist/value-labels.cjs.map +1 -0
  328. package/dist/value-labels.d.cts +2 -0
  329. package/dist/value-labels.d.ts +2 -0
  330. package/dist/value-labels.js +12 -0
  331. package/dist/value-labels.js.map +1 -0
  332. package/dist/vnode-BUflsBsa.d.cts +66 -0
  333. package/dist/vnode-BUflsBsa.d.ts +66 -0
  334. package/dist/vnode-CkQ27Cxe.cjs +110 -0
  335. package/dist/vnode-CkQ27Cxe.cjs.map +1 -0
  336. package/dist/vnode-tCWItoUH.js +93 -0
  337. package/dist/vnode-tCWItoUH.js.map +1 -0
  338. package/package.json +320 -3
@@ -0,0 +1,55 @@
1
+ import { i as patchAttrs, n as childNamespace, o as rendered, r as createNode } from "./dom-vP3IcMak.js";
2
+ //#region src/render/hydrate.ts
3
+ /** Whether existing DOM `node` can stand for `vnode` in namespace `ns`. */
4
+ function matches(node, vnode, ns) {
5
+ return node.nodeType === 1 && node.localName === vnode.tag && node.namespaceURI === ns;
6
+ }
7
+ /**
8
+ * Claim server-rendered DOM for a tree: the element takes the vnode's
9
+ * attributes (extra ones are removed), and its children are matched by
10
+ * position: text with text, elements with the same tag (hydrated in turn).
11
+ * Anything that does not match is created in place, leftovers are removed.
12
+ * Afterwards the nodes are tracked like freshly rendered ones.
13
+ */
14
+ function hydrateElement(el, vnode) {
15
+ const current = {};
16
+ for (const name of el.getAttributeNames()) current[name] = el.getAttribute(name);
17
+ if (current.style) current.style = "";
18
+ patchAttrs(el, current, vnode.attrs);
19
+ const texts = vnode.children.some((child) => typeof child === "string");
20
+ for (const node of Array.from(el.childNodes)) if (node.nodeType === 8 || !texts && node.nodeType === 3) el.removeChild(node);
21
+ const ns = childNamespace(el);
22
+ let node = el.firstChild;
23
+ for (const child of vnode.children) {
24
+ const next = node ? node.nextSibling : null;
25
+ if (typeof child === "string" ? node?.nodeType === 3 : node && matches(node, child, child.tag === "svg" ? "http://www.w3.org/2000/svg" : ns)) {
26
+ if (typeof child === "string") {
27
+ if (node.data !== child) node.data = child;
28
+ rendered.set(node, child);
29
+ } else hydrateElement(node, child);
30
+ node = next;
31
+ } else {
32
+ const created = createNode(child, ns, el.ownerDocument);
33
+ if (created) el.insertBefore(created, node);
34
+ }
35
+ }
36
+ while (node) {
37
+ const extra = node;
38
+ node = node.nextSibling;
39
+ el.removeChild(extra);
40
+ }
41
+ rendered.set(el, vnode);
42
+ }
43
+ /**
44
+ * Hydrate `el` for the root `vnode` when it is foreign markup (not rendered
45
+ * here) with the root's tag in namespace `ns`. Returns whether it did.
46
+ */
47
+ function hydrate(el, vnode, ns) {
48
+ if (rendered.has(el) || !matches(el, vnode, ns)) return false;
49
+ hydrateElement(el, vnode);
50
+ return true;
51
+ }
52
+ //#endregion
53
+ export { hydrate as t };
54
+
55
+ //# sourceMappingURL=hydrate-DDNIHYv_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydrate-DDNIHYv_.js","names":[],"sources":["../src/render/hydrate.ts"],"sourcesContent":["import type { Attrs, VNode } from '../vnode.ts'\nimport { childNamespace, createNode, patchAttrs, rendered, SVG_NS } from './dom.ts'\n\n/** Whether existing DOM `node` can stand for `vnode` in namespace `ns`. */\nfunction matches(node: Node, vnode: VNode, ns: string): node is Element {\n return (\n node.nodeType === 1 &&\n (node as Element).localName === vnode.tag &&\n (node as Element).namespaceURI === ns\n )\n}\n\n/**\n * Claim server-rendered DOM for a tree: the element takes the vnode's\n * attributes (extra ones are removed), and its children are matched by\n * position: text with text, elements with the same tag (hydrated in turn).\n * Anything that does not match is created in place, leftovers are removed.\n * Afterwards the nodes are tracked like freshly rendered ones.\n */\nexport function hydrateElement(el: Element, vnode: VNode): void {\n // The server attributes are the previous state to patch from.\n const current: Attrs = {}\n for (const name of el.getAttributeNames()) current[name] = el.getAttribute(name) as string\n // A strict CSP ignores style attributes in markup: set them again, through the CSSOM.\n if (current.style) current.style = ''\n patchAttrs(el, current, vnode.attrs)\n\n // Comments never stand for anything, and neither does text where the tree has none\n // (whitespace between elements). Text only ever sits in leaf elements here.\n const texts = vnode.children.some((child) => typeof child === 'string')\n for (const node of Array.from(el.childNodes)) {\n if (node.nodeType === 8 || (!texts && node.nodeType === 3)) el.removeChild(node)\n }\n\n const ns = childNamespace(el)\n let node: Node | null = el.firstChild\n for (const child of vnode.children) {\n const next: Node | null = node ? node.nextSibling : null\n if (\n typeof child === 'string'\n ? node?.nodeType === 3\n : node && matches(node, child, child.tag === 'svg' ? SVG_NS : ns)\n ) {\n if (typeof child === 'string') {\n if ((node as Text).data !== child) (node as Text).data = child\n rendered.set(node as Node, child)\n } else {\n hydrateElement(node as Element, child)\n }\n node = next\n } else {\n const created = createNode(child, ns, el.ownerDocument)\n if (created) el.insertBefore(created, node)\n }\n }\n while (node) {\n const extra: Node = node\n node = node.nextSibling\n el.removeChild(extra)\n }\n rendered.set(el, vnode)\n}\n\n/**\n * Hydrate `el` for the root `vnode` when it is foreign markup (not rendered\n * here) with the root's tag in namespace `ns`. Returns whether it did.\n */\nexport function hydrate(el: Element, vnode: VNode, ns: string): boolean {\n if (rendered.has(el) || !matches(el, vnode, ns)) return false\n hydrateElement(el, vnode)\n return true\n}\n"],"mappings":";;;AAIA,SAAS,QAAQ,MAAY,OAAc,IAA6B;CACtE,OACE,KAAK,aAAa,KACjB,KAAiB,cAAc,MAAM,OACrC,KAAiB,iBAAiB;AAEvC;;;;;;;;AASA,SAAgB,eAAe,IAAa,OAAoB;CAE9D,MAAM,UAAiB,CAAC;CACxB,KAAK,MAAM,QAAQ,GAAG,kBAAkB,GAAG,QAAQ,QAAQ,GAAG,aAAa,IAAI;CAE/E,IAAI,QAAQ,OAAO,QAAQ,QAAQ;CACnC,WAAW,IAAI,SAAS,MAAM,KAAK;CAInC,MAAM,QAAQ,MAAM,SAAS,MAAM,UAAU,OAAO,UAAU,QAAQ;CACtE,KAAK,MAAM,QAAQ,MAAM,KAAK,GAAG,UAAU,GACzC,IAAI,KAAK,aAAa,KAAM,CAAC,SAAS,KAAK,aAAa,GAAI,GAAG,YAAY,IAAI;CAGjF,MAAM,KAAK,eAAe,EAAE;CAC5B,IAAI,OAAoB,GAAG;CAC3B,KAAK,MAAM,SAAS,MAAM,UAAU;EAClC,MAAM,OAAoB,OAAO,KAAK,cAAc;EACpD,IACE,OAAO,UAAU,WACb,MAAM,aAAa,IACnB,QAAQ,QAAQ,MAAM,OAAO,MAAM,QAAQ,QAAA,+BAAiB,EAAE,GAClE;GACA,IAAI,OAAO,UAAU,UAAU;IAC7B,IAAK,KAAc,SAAS,OAAO,KAAe,OAAO;IACzD,SAAS,IAAI,MAAc,KAAK;GAClC,OACE,eAAe,MAAiB,KAAK;GAEvC,OAAO;EACT,OAAO;GACL,MAAM,UAAU,WAAW,OAAO,IAAI,GAAG,aAAa;GACtD,IAAI,SAAS,GAAG,aAAa,SAAS,IAAI;EAC5C;CACF;CACA,OAAO,MAAM;EACX,MAAM,QAAc;EACpB,OAAO,KAAK;EACZ,GAAG,YAAY,KAAK;CACtB;CACA,SAAS,IAAI,IAAI,KAAK;AACxB;;;;;AAMA,SAAgB,QAAQ,IAAa,OAAc,IAAqB;CACtE,IAAI,SAAS,IAAI,EAAE,KAAK,CAAC,QAAQ,IAAI,OAAO,EAAE,GAAG,OAAO;CACxD,eAAe,IAAI,KAAK;CACxB,OAAO;AACT"}
@@ -0,0 +1,13 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_features = require("./features-BclHgg2W.cjs");
3
+ const require_hydrate = require("./hydrate-CxwTXDqO.cjs");
4
+ //#region src/hydrate.ts
5
+ /**
6
+ * Standalone entry: `import '@tabler/charts/hydrate'` lets a chart take over
7
+ * server-rendered markup node by node instead of replacing it.
8
+ */
9
+ require_features.register({ hydrate: require_hydrate.hydrate });
10
+ //#endregion
11
+ exports.hydrate = require_hydrate.hydrate;
12
+
13
+ //# sourceMappingURL=hydrate.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydrate.cjs","names":["register"],"sources":["../src/hydrate.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/hydrate'` lets a chart take over\n * server-rendered markup node by node instead of replacing it.\n */\nimport { register } from './features.ts'\nimport { hydrate } from './render/hydrate.ts'\n\nregister({ hydrate })\n\nexport { hydrate }\n"],"mappings":";;;;;;;;AAOAA,iBAAAA,SAAS,EAAE,SAAA,gBAAA,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { t as hydrate } from "./hydrate-CTTmQy0x.cjs";
2
+ export { hydrate };
@@ -0,0 +1,2 @@
1
+ import { t as hydrate } from "./hydrate-CzfxLfTv.js";
2
+ export { hydrate };
@@ -0,0 +1,12 @@
1
+ import { i as register } from "./features-wASyHGic.js";
2
+ import { t as hydrate } from "./hydrate-DDNIHYv_.js";
3
+ //#region src/hydrate.ts
4
+ /**
5
+ * Standalone entry: `import '@tabler/charts/hydrate'` lets a chart take over
6
+ * server-rendered markup node by node instead of replacing it.
7
+ */
8
+ register({ hydrate });
9
+ //#endregion
10
+ export { hydrate };
11
+
12
+ //# sourceMappingURL=hydrate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydrate.js","names":[],"sources":["../src/hydrate.ts"],"sourcesContent":["/**\n * Standalone entry: `import '@tabler/charts/hydrate'` lets a chart take over\n * server-rendered markup node by node instead of replacing it.\n */\nimport { register } from './features.ts'\nimport { hydrate } from './render/hydrate.ts'\n\nregister({ hydrate })\n\nexport { hydrate }\n"],"mappings":";;;;;;;AAOA,SAAS,EAAE,QAAQ,CAAC"}
package/dist/index.cjs ADDED
@@ -0,0 +1,214 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_layout = require("./layout-CtMBhNd9.cjs");
3
+ const require_vnode = require("./vnode-CkQ27Cxe.cjs");
4
+ const require_format = require("./format-B0yKXBTH.cjs");
5
+ const require_cartesian = require("./cartesian-BoDfgBCV.cjs");
6
+ const require_features = require("./features-BclHgg2W.cjs");
7
+ const require_extent = require("./extent-DsFWvAHJ.cjs");
8
+ const require_annotations = require("./annotations-DpETO8dE.cjs");
9
+ const require_dates = require("./dates-Btm7Zm6W.cjs");
10
+ const require_log_axis = require("./log-axis-83rSpvL5.cjs");
11
+ const require_chart = require("./chart-CowF_lWY.cjs");
12
+ const require_dom = require("./dom-CLF868Qs.cjs");
13
+ const require_patterns = require("./patterns-LfcQAWCy.cjs");
14
+ const require_point_shapes = require("./point-shapes-CGl4dugc.cjs");
15
+ const require_time_axis = require("./time-axis-VSX34_Tb.cjs");
16
+ const require_value_labels = require("./value-labels-B0WJoJ7x.cjs");
17
+ const require_hydrate = require("./hydrate-CxwTXDqO.cjs");
18
+ const require_morph = require("./morph-CqYDu1bY.cjs");
19
+ const require_decimate = require("./decimate-tLhDk1ys.cjs");
20
+ const require_fade = require("./fade-Cs74puQS.cjs");
21
+ const require_core = require("./core-RzS9IQO5.cjs");
22
+ const require_line = require("./line-fQbtP_jL.cjs");
23
+ const require_area = require("./area-sHCE3pg5.cjs");
24
+ const require_bar = require("./bar-DGuUN3nc.cjs");
25
+ const require_bar$1 = require("./bar-C-7zR2qp.cjs");
26
+ const require_candlestick = require("./candlestick-B5r1w3kc.cjs");
27
+ const require_arc = require("./arc-BXpLrt9b.cjs");
28
+ const require_gauge = require("./gauge-D-FYhuds.cjs");
29
+ const require_heatmap = require("./heatmap-BK18EBgJ.cjs");
30
+ const require_parliament = require("./parliament-CpWnoEvG.cjs");
31
+ const require_pie = require("./pie-BxTZt6Go.cjs");
32
+ const require_radar = require("./radar-CoGUNNSb.cjs");
33
+ const require_sankey = require("./sankey-Bacx4fVe.cjs");
34
+ const require_scatter = require("./scatter-DgMN9zRy.cjs");
35
+ const require_sparkline = require("./sparkline-BS9-hltA.cjs");
36
+ const require_export_chart = require("./export-chart-BhhYgksr.cjs");
37
+ //#region src/chart-default.ts
38
+ /**
39
+ * A chart with every built-in plugin installed: hover highlight, legend,
40
+ * tooltip, data table and keyboard navigation. Each can be switched off in
41
+ * the config (`tooltip: false`, …). For the smallest bundle, use the bare
42
+ * `Chart` from `@tabler/charts/core` and pick plugins explicitly.
43
+ *
44
+ * ```ts
45
+ * const chart = new Chart('#sales', { type: line, data })
46
+ * ```
47
+ */
48
+ var Chart = class extends require_chart.Chart {
49
+ constructor(target, config) {
50
+ super(target, config, require_core.defaultPlugins());
51
+ }
52
+ };
53
+ //#endregion
54
+ //#region src/chart-types.ts
55
+ /**
56
+ * Every built-in chart type by its name, for charts declared in markup
57
+ * (`<tabler-chart type="line">`, `data-tc-chart="line"`). Importing it
58
+ * brings every type along: code that knows its types imports them directly.
59
+ */
60
+ const types = {
61
+ line: require_line.line,
62
+ area: require_area.area,
63
+ bar: require_bar$1.bar,
64
+ pie: require_pie.pie,
65
+ donut: require_pie.donut,
66
+ scatter: require_scatter.scatter,
67
+ sparkline: require_sparkline.sparkline,
68
+ gauge: require_gauge.gauge,
69
+ heatmap: require_heatmap.heatmap,
70
+ candlestick: require_candlestick.candlestick,
71
+ radar: require_radar.radar,
72
+ sankey: require_sankey.sankey,
73
+ parliament: require_parliament.parliament
74
+ };
75
+ //#endregion
76
+ //#region src/index.ts
77
+ /**
78
+ * `@tabler/charts`: everything from `@tabler/charts/core`, with a `Chart`
79
+ * that installs the built-in plugins (tooltip, legend, keyboard, …) and
80
+ * every optional feature registered (time and log axes, decimation,
81
+ * annotations, pattern fills, value labels, point shapes). The one exception
82
+ * is the `download` menu's saver: `import '@tabler/charts/export'` adds it,
83
+ * so charts that never offer a download do not carry the export code.
84
+ */
85
+ require_features.register({
86
+ time: {
87
+ scale: require_time_axis.time,
88
+ points: require_time_axis.timePointScale,
89
+ axis: require_time_axis.timeAxis
90
+ },
91
+ dates: require_dates.dateLabels,
92
+ log: {
93
+ scale: require_log_axis.log,
94
+ domain: require_log_axis.logDomain,
95
+ ticks: require_log_axis.logTicks
96
+ },
97
+ decimate: require_decimate.lttbIndices,
98
+ line: {
99
+ linePath: require_fade.linePath,
100
+ areaPath: require_fade.areaPath
101
+ },
102
+ annotations: {
103
+ layers: require_annotations.annotationLayers,
104
+ values: require_annotations.annotationValues
105
+ },
106
+ patterns: require_patterns.patternFills,
107
+ "point-shapes": require_point_shapes.markerPath,
108
+ hydrate: require_hydrate.hydrate,
109
+ morph: require_morph.morph
110
+ });
111
+ require_features.addPost(require_point_shapes.shapesStep);
112
+ require_features.addPost(require_value_labels.labelsStep);
113
+ //#endregion
114
+ exports.Chart = Chart;
115
+ exports.LINE_HEIGHT = require_layout.LINE_HEIGHT;
116
+ exports.VERSION = require_core.VERSION;
117
+ exports.arcCentroid = require_arc.arcCentroid;
118
+ exports.arcPathStable = require_arc.arcPathStable;
119
+ exports.area = require_area.area;
120
+ exports.areaPath = require_fade.areaPath;
121
+ exports.axis = require_cartesian.axis;
122
+ exports.axisSize = require_cartesian.axisSize;
123
+ exports.band = require_cartesian.band;
124
+ exports.bandTicks = require_cartesian.bandTicks;
125
+ exports.bar = require_bar$1.bar;
126
+ exports.barPath = require_bar.barPath;
127
+ exports.buildChart = require_chart.buildChart;
128
+ exports.cancel = require_chart.cancel;
129
+ exports.candlestick = require_candlestick.candlestick;
130
+ exports.categoryInteraction = require_cartesian.categoryInteraction;
131
+ exports.chartEvents = require_chart.chartEvents;
132
+ exports.chartLabel = require_chart.chartLabel;
133
+ exports.chartToString = require_chart.chartToString;
134
+ exports.dataTable = require_core.dataTable;
135
+ exports.defaultHidden = require_chart.defaultHidden;
136
+ exports.defaultPlugins = require_core.defaultPlugins;
137
+ exports.describeHit = require_core.describeHit;
138
+ exports.domainOf = require_cartesian.domainOf;
139
+ exports.donut = require_pie.donut;
140
+ exports.download = require_core.download;
141
+ exports.downloadChart = require_export_chart.downloadChart;
142
+ exports.escapeAttr = require_chart.escapeAttr;
143
+ exports.escapeText = require_chart.escapeText;
144
+ exports.estimateTextWidth = require_layout.estimateTextWidth;
145
+ exports.exportImage = require_export_chart.exportImage;
146
+ exports.exportSVG = require_export_chart.exportSVG;
147
+ exports.extent = require_extent.extent;
148
+ exports.feature = require_features.feature;
149
+ exports.features = require_features.features;
150
+ exports.flush = require_chart.flush;
151
+ exports.formatDate = require_format.formatDate;
152
+ exports.formatDetail = require_format.formatDetail;
153
+ exports.formatNumber = require_format.formatNumber;
154
+ exports.formatTicks = require_format.formatTicks;
155
+ exports.gauge = require_gauge.gauge;
156
+ exports.getDateFormat = require_format.getDateFormat;
157
+ exports.getNumberFormat = require_format.getNumberFormat;
158
+ exports.grid = require_cartesian.grid;
159
+ exports.h = require_vnode.h;
160
+ exports.hbarPath = require_bar.hbarPath;
161
+ exports.heatmap = require_heatmap.heatmap;
162
+ exports.highlight = require_core.highlight;
163
+ exports.hitAnchor = require_core.hitAnchor;
164
+ exports.hoverOverlay = require_core.hoverOverlay;
165
+ exports.hoverUnderlay = require_core.hoverUnderlay;
166
+ exports.innerRect = require_layout.innerRect;
167
+ exports.insets = require_layout.insets;
168
+ exports.keyboard = require_core.keyboard;
169
+ exports.legend = require_core.legend;
170
+ exports.legendContent = require_chart.legendContent;
171
+ exports.line = require_line.line;
172
+ exports.linePath = require_fade.linePath;
173
+ exports.linear = require_cartesian.linear;
174
+ exports.linearTicks = require_cartesian.linearTicks;
175
+ exports.log = require_log_axis.log;
176
+ exports.lttb = require_decimate.lttb;
177
+ exports.lttbIndices = require_decimate.lttbIndices;
178
+ exports.niceDomain = require_cartesian.niceDomain;
179
+ exports.normalizeClass = require_vnode.normalizeClass;
180
+ exports.normalizeStyle = require_vnode.normalizeStyle;
181
+ exports.padAngleForGap = require_arc.padAngleForGap;
182
+ exports.parliament = require_parliament.parliament;
183
+ exports.pie = require_pie.pie;
184
+ exports.placeTooltip = require_core.placeTooltip;
185
+ exports.point = require_cartesian.point;
186
+ exports.pointer = require_core.pointer;
187
+ exports.radar = require_radar.radar;
188
+ exports.register = require_features.register;
189
+ exports.render = require_dom.render;
190
+ exports.renderContext = require_chart.renderContext;
191
+ exports.renderToString = require_chart.renderToString;
192
+ exports.resolveLegend = require_chart.resolveLegend;
193
+ exports.resolveSize = require_chart.resolveSize;
194
+ exports.sankey = require_sankey.sankey;
195
+ exports.scatter = require_scatter.scatter;
196
+ exports.schedule = require_chart.schedule;
197
+ exports.seriesKey = require_cartesian.seriesKey;
198
+ exports.seriesLegend = require_cartesian.seriesLegend;
199
+ exports.seriesTable = require_cartesian.seriesTable;
200
+ exports.sparkline = require_sparkline.sparkline;
201
+ exports.stepPrecision = require_format.stepPrecision;
202
+ exports.sync = require_core.sync;
203
+ exports.tableContent = require_core.tableContent;
204
+ exports.thinTicks = require_cartesian.thinTicks;
205
+ exports.tickIncrement = require_cartesian.tickIncrement;
206
+ exports.tickStep = require_cartesian.tickStep;
207
+ exports.ticks = require_cartesian.ticks;
208
+ exports.time = require_time_axis.time;
209
+ exports.timePointScale = require_time_axis.timePointScale;
210
+ exports.tooltip = require_core.tooltip;
211
+ exports.tooltipContent = require_core.tooltipContent;
212
+ exports.types = types;
213
+
214
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["CoreChart","defaultPlugins","register","time","timePointScale","timeAxis","dateLabels","log","logDomain","logTicks","lttbIndices","annotationLayers","annotationValues","patternFills","markerPath","addPost","shapesStep","labelsStep"],"sources":["../src/chart-default.ts","../src/chart-types.ts","../src/index.ts"],"sourcesContent":["import { type ChartConfig, Chart as CoreChart } from './chart.ts'\nimport { defaultPlugins } from './plugins/index.ts'\n\n/**\n * A chart with every built-in plugin installed: hover highlight, legend,\n * tooltip, data table and keyboard navigation. Each can be switched off in\n * the config (`tooltip: false`, …). For the smallest bundle, use the bare\n * `Chart` from `@tabler/charts/core` and pick plugins explicitly.\n *\n * ```ts\n * const chart = new Chart('#sales', { type: line, data })\n * ```\n */\nexport class Chart<O extends object = object> extends CoreChart<O> {\n constructor(target: Element | string, config: ChartConfig<O>) {\n super(target, config, defaultPlugins())\n }\n}\n","import type { ChartType } from './chart.ts'\nimport { area } from './charts/area.ts'\nimport { bar } from './charts/bar.ts'\nimport { candlestick } from './charts/candlestick.ts'\nimport { gauge } from './charts/gauge.ts'\nimport { heatmap } from './charts/heatmap.ts'\nimport { line } from './charts/line.ts'\nimport { parliament } from './charts/parliament.ts'\nimport { donut, pie } from './charts/pie.ts'\nimport { radar } from './charts/radar.ts'\nimport { sankey } from './charts/sankey.ts'\nimport { scatter } from './charts/scatter.ts'\nimport { sparkline } from './charts/sparkline.ts'\n\n/**\n * Every built-in chart type by its name, for charts declared in markup\n * (`<tabler-chart type=\"line\">`, `data-tc-chart=\"line\"`). Importing it\n * brings every type along: code that knows its types imports them directly.\n */\nexport const types: Readonly<Record<string, ChartType<never>>> = {\n line,\n area,\n bar,\n pie,\n donut,\n scatter,\n sparkline,\n gauge,\n heatmap,\n candlestick,\n radar,\n sankey,\n parliament,\n} as Record<string, ChartType<never>>\n","/**\n * `@tabler/charts`: everything from `@tabler/charts/core`, with a `Chart`\n * that installs the built-in plugins (tooltip, legend, keyboard, …) and\n * every optional feature registered (time and log axes, decimation,\n * annotations, pattern fills, value labels, point shapes). The one exception\n * is the `download` menu's saver: `import '@tabler/charts/export'` adds it,\n * so charts that never offer a download do not carry the export code.\n */\n\nimport { annotationLayers, annotationValues } from './charts/annotations.ts'\nimport { dateLabels } from './charts/dates.ts'\nimport { logDomain, logTicks } from './charts/log-axis.ts'\nimport { patternFills } from './charts/patterns.ts'\nimport { markerPath, shapesStep } from './charts/point-shapes.ts'\nimport { timeAxis } from './charts/time-axis.ts'\nimport { labelsStep } from './charts/value-labels.ts'\nimport { addPost, register } from './features.ts'\nimport { hydrate } from './render/hydrate.ts'\nimport { morph } from './render/morph.ts'\nimport { log } from './scales/log.ts'\nimport { time, timePointScale } from './scales/time.ts'\nimport { lttb, lttbIndices } from './shapes/decimate.ts'\nimport { areaPath, linePath } from './shapes/path.ts'\n\n// Registered here, in the entry itself, so no bundler can shake it away.\nregister({\n time: { scale: time, points: timePointScale, axis: timeAxis },\n dates: dateLabels,\n log: { scale: log, domain: logDomain, ticks: logTicks },\n decimate: lttbIndices,\n line: { linePath, areaPath },\n annotations: { layers: annotationLayers, values: annotationValues },\n patterns: patternFills,\n 'point-shapes': markerPath,\n hydrate,\n morph,\n})\n\n// Steps that finish the content: shapes first, then the labels over them.\naddPost(shapesStep)\naddPost(labelsStep)\n\nexport { Chart } from './chart-default.ts'\nexport { types } from './chart-types.ts'\nexport * from './core.ts'\nexport type { DownloadOptions, ExportOptions, ExportTarget, ImageOptions } from './export-chart.ts'\nexport { downloadChart, exportImage, exportSVG } from './export-chart.ts'\nexport type { LogScaleOptions } from './scales/log.ts'\nexport type { TimeScale, TimeScaleOptions, TimeValue } from './scales/time.ts'\nexport { log, lttb, lttbIndices, time, timePointScale }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAa,QAAb,cAAsDA,cAAAA,MAAa;CACjE,YAAY,QAA0B,QAAwB;EAC5D,MAAM,QAAQ,QAAQC,aAAAA,eAAe,CAAC;CACxC;AACF;;;;;;;;ACEA,MAAa,QAAoD;CAC/D,MAAA,aAAA;CACA,MAAA,aAAA;CACA,KAAA,cAAA;CACA,KAAA,YAAA;CACA,OAAA,YAAA;CACA,SAAA,gBAAA;CACA,WAAA,kBAAA;CACA,OAAA,cAAA;CACA,SAAA,gBAAA;CACA,aAAA,oBAAA;CACA,OAAA,cAAA;CACA,QAAA,eAAA;CACA,YAAA,mBAAA;AACF;;;;;;;;;;;ACRAC,iBAAAA,SAAS;CACP,MAAM;EAAE,OAAOC,kBAAAA;EAAM,QAAQC,kBAAAA;EAAgB,MAAMC,kBAAAA;CAAS;CAC5D,OAAOC,cAAAA;CACP,KAAK;EAAE,OAAOC,iBAAAA;EAAK,QAAQC,iBAAAA;EAAW,OAAOC,iBAAAA;CAAS;CACtD,UAAUC,iBAAAA;CACV,MAAM;EAAE,UAAA,aAAA;EAAU,UAAA,aAAA;CAAS;CAC3B,aAAa;EAAE,QAAQC,oBAAAA;EAAkB,QAAQC,oBAAAA;CAAiB;CAClE,UAAUC,iBAAAA;CACV,gBAAgBC,qBAAAA;CAChB,SAAA,gBAAA;CACA,OAAA,cAAA;AACF,CAAC;AAGDC,iBAAAA,QAAQC,qBAAAA,UAAU;AAClBD,iBAAAA,QAAQE,qBAAAA,UAAU"}
@@ -0,0 +1,46 @@
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-lyt0I3HU.cjs";
2
+ import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-DTcNDAFO.cjs";
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-BUflsBsa.cjs";
4
+ import { $ as CartesianOptions, B as downloadChart, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, H as exportSVG, I as DownloadOptions, J as LegendItem, L as ExportOptions, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, R as ExportTarget, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, V as exportImage, 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$1, 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, z as ImageOptions } from "./chart-D7ooEFnk.cjs";
5
+ import { a as timePointScale, c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, i as time, l as NumberFormatOptions, m as getDateFormat, n as TimeScaleOptions, o as DateFormat, p as formatTicks, r as TimeValue, s as Locale, t as TimeScale, u as formatDate } from "./time-CNVnt-B2.cjs";
6
+ import { a as linear, i as LinearScaleOptions, n as log, r as LinearScale, t as LogScaleOptions } from "./log-CaofN3-n.cjs";
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-D1vO1LrC.cjs";
8
+ import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-CwB28da0.cjs";
9
+ import { n as line, t as LineOptions } from "./line-W7VD_qs1.cjs";
10
+ import { n as area, t as AreaOptions } from "./area-DIxaAbYZ.cjs";
11
+ import { n as bar, t as BarOptions } from "./bar-CRKLDg98.cjs";
12
+ import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-__pXl_pV.cjs";
13
+ import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-DP_EB2z3.cjs";
14
+ import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-CCso6m61.cjs";
15
+ import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-DdrLVZwt.cjs";
16
+ import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-BF9yI5mE.cjs";
17
+ import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-DBW4O0Vt.cjs";
18
+ import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-DuGI3Qc5.cjs";
19
+ import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-DbxLyZX0.cjs";
20
+ import { n as sparkline, t as SparklineOptions } from "./sparkline-CWlJDKyh.cjs";
21
+ import { n as lttbIndices, t as lttb } from "./decimate-CNSpgGa5.cjs";
22
+ //#region src/chart-default.d.ts
23
+ /**
24
+ * A chart with every built-in plugin installed: hover highlight, legend,
25
+ * tooltip, data table and keyboard navigation. Each can be switched off in
26
+ * the config (`tooltip: false`, …). For the smallest bundle, use the bare
27
+ * `Chart` from `@tabler/charts/core` and pick plugins explicitly.
28
+ *
29
+ * ```ts
30
+ * const chart = new Chart('#sales', { type: line, data })
31
+ * ```
32
+ */
33
+ export declare class Chart<O extends object = object> extends Chart$1<O> {
34
+ constructor(target: Element | string, config: ChartConfig<O>);
35
+ }
36
+ //#endregion
37
+ //#region src/chart-types.d.ts
38
+ /**
39
+ * Every built-in chart type by its name, for charts declared in markup
40
+ * (`<tabler-chart type="line">`, `data-tc-chart="line"`). Importing it
41
+ * brings every type along: code that knows its types imports them directly.
42
+ */
43
+ export declare const types: Readonly<Record<string, ChartType<never>>>;
44
+ //#endregion
45
+ 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, 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 DownloadOptions, type ExportOptions, type ExportTarget, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type ImageOptions, 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 LogScaleOptions, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, 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 TimeScale, type TimeScaleOptions, type TimeValue, type TooltipOptions, type TooltipPlacement, 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, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, 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, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, 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, time, timePointScale, tooltip, tooltipContent };
46
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,46 @@
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-Bp7HwtF5.js";
2
+ import { a as point, i as band, n as BandScale, r as BandScaleOptions, t as BandKey } from "./band-DTcNDAFO.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-BUflsBsa.js";
4
+ import { $ as CartesianOptions, B as downloadChart, C as DownloadOption, Ct as HitTester, D as ChartPlugin, E as BeforeRenderState, F as register, H as exportSVG, I as DownloadOptions, J as LegendItem, L as ExportOptions, M as Features, N as feature, O as PluginInstance, P as features, Q as CartesianData, R as ExportTarget, S as DownloadMenuOptions, St as HitItem, T as AfterRenderState, V as exportImage, 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$1, 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, z as ImageOptions } from "./chart-DyN7bcx8.js";
5
+ import { a as timePointScale, c as NumberFormat, d as formatDetail, f as formatNumber, g as stepPrecision, h as getNumberFormat, i as time, l as NumberFormatOptions, m as getDateFormat, n as TimeScaleOptions, o as DateFormat, p as formatTicks, r as TimeValue, s as Locale, t as TimeScale, u as formatDate } from "./time-CHjiY9Q4.js";
6
+ import { a as linear, i as LinearScaleOptions, n as log, r as LinearScale, t as LogScaleOptions } from "./log-CaofN3-n.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-DcbemzGf.js";
8
+ import { a as linePath, i as areaPath, n as PathOptions, r as Point, t as Curve } from "./path-CwB28da0.js";
9
+ import { n as line, t as LineOptions } from "./line-CN4uZ9ZX.js";
10
+ import { n as area, t as AreaOptions } from "./area-CF__HOwL.js";
11
+ import { n as bar, t as BarOptions } from "./bar-BBM8RhoL.js";
12
+ import { n as CandlestickOptions, r as candlestick, t as Candle } from "./candlestick-D_vV0_XZ.js";
13
+ import { n as GaugeRing, r as gauge, t as GaugeOptions } from "./gauge-zpia05t2.js";
14
+ import { n as HeatmapRange, r as heatmap, t as HeatmapOptions } from "./heatmap-BectCEeE.js";
15
+ import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-1Zv2Xh0D.js";
16
+ import { i as pie, n as PieSlice, r as donut, t as PieOptions } from "./pie-5z1fDdKO.js";
17
+ import { n as RadialAxisOptions, r as radar, t as RadarOptions } from "./radar-1-EryihA.js";
18
+ import { a as sankey, i as SankeyOptions, n as SankeyLink, r as SankeyNode, t as SankeyData } from "./sankey-OV_WoPrl.js";
19
+ import { i as scatter, n as ScatterPoint, r as ScatterSeries, t as ScatterOptions } from "./scatter-BqzgJqdX.js";
20
+ import { n as sparkline, t as SparklineOptions } from "./sparkline-BfyO_oNM.js";
21
+ import { n as lttbIndices, t as lttb } from "./decimate-BGg9XgF0.js";
22
+ //#region src/chart-default.d.ts
23
+ /**
24
+ * A chart with every built-in plugin installed: hover highlight, legend,
25
+ * tooltip, data table and keyboard navigation. Each can be switched off in
26
+ * the config (`tooltip: false`, …). For the smallest bundle, use the bare
27
+ * `Chart` from `@tabler/charts/core` and pick plugins explicitly.
28
+ *
29
+ * ```ts
30
+ * const chart = new Chart('#sales', { type: line, data })
31
+ * ```
32
+ */
33
+ export declare class Chart<O extends object = object> extends Chart$1<O> {
34
+ constructor(target: Element | string, config: ChartConfig<O>);
35
+ }
36
+ //#endregion
37
+ //#region src/chart-types.d.ts
38
+ /**
39
+ * Every built-in chart type by its name, for charts declared in markup
40
+ * (`<tabler-chart type="line">`, `data-tc-chart="line"`). Importing it
41
+ * brings every type along: code that knows its types imports them directly.
42
+ */
43
+ export declare const types: Readonly<Record<string, ChartType<never>>>;
44
+ //#endregion
45
+ 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, 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 DownloadOptions, type ExportOptions, type ExportTarget, type Features, type GaugeOptions, type GaugeRing, type GridOptions, type HeatmapOptions, type HeatmapRange, type Hit, type HitItem, type HitTester, type ImageOptions, 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 LogScaleOptions, type NumberFormat, type NumberFormatOptions, type ParliamentOptions, type ParliamentParty, type PathOptions, 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 TimeScale, type TimeScaleOptions, type TimeValue, type TooltipOptions, type TooltipPlacement, 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, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, 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, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, 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, time, timePointScale, tooltip, tooltipContent };
46
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,115 @@
1
+ import { i as insets, n as estimateTextWidth, r as innerRect, t as LINE_HEIGHT } from "./layout-B3hiqVEw.js";
2
+ import { n as normalizeClass, r as normalizeStyle, t as h } from "./vnode-tCWItoUH.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-lStwuc1L.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-Cr0AF0nG.js";
5
+ import { i as register, n as feature, r as features, t as addPost } from "./features-wASyHGic.js";
6
+ import { t as extent } from "./extent-BAMZo0Nq.js";
7
+ import { n as annotationValues, t as annotationLayers } from "./annotations-BszTTjf9.js";
8
+ import { t as dateLabels } from "./dates-CG-FvioW.js";
9
+ import { n as logTicks, r as log, t as logDomain } from "./log-axis-B_uvvOFc.js";
10
+ 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$1, u as flush, v as legendContent } from "./chart-BF2CK9I_.js";
11
+ import { a as render } from "./dom-vP3IcMak.js";
12
+ import { n as patternFills } from "./patterns-DtgcnA8o.js";
13
+ import { n as shapesStep, t as markerPath } from "./point-shapes-DI84NNpI.js";
14
+ import { n as time, r as timePointScale, t as timeAxis } from "./time-axis-Bc9eHX1r.js";
15
+ import { t as labelsStep } from "./value-labels-IZIQPhfk.js";
16
+ import { t as hydrate } from "./hydrate-DDNIHYv_.js";
17
+ import { t as morph } from "./morph-Bgg-24l8.js";
18
+ import { n as lttbIndices, t as lttb } from "./decimate-C87cl_Sp.js";
19
+ import { n as areaPath, r as linePath } from "./fade-D3NxH5Qg.js";
20
+ 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-CegR_j55.js";
21
+ import { t as line } from "./line-B3Ed6u7j.js";
22
+ import { t as area } from "./area-DQsLERhx.js";
23
+ import { n as hbarPath, t as barPath } from "./bar-DM16NUvV.js";
24
+ import { t as bar } from "./bar-jZEoao74.js";
25
+ import { t as candlestick } from "./candlestick-DuXwAFID.js";
26
+ import { i as padAngleForGap, n as arcCentroid, r as arcPathStable } from "./arc-a1tRTEw7.js";
27
+ import { t as gauge } from "./gauge-Dh423FHh.js";
28
+ import { t as heatmap } from "./heatmap-DSZ2bVIa.js";
29
+ import { t as parliament } from "./parliament-Dw0sOERi.js";
30
+ import { n as pie, t as donut } from "./pie-DzUXDTcn.js";
31
+ import { t as radar } from "./radar-CYPab_I4.js";
32
+ import { t as sankey } from "./sankey-B4PNKusJ.js";
33
+ import { t as scatter } from "./scatter-kgtgR318.js";
34
+ import { t as sparkline } from "./sparkline-BQzt27Fr.js";
35
+ import { n as exportImage, r as exportSVG, t as downloadChart } from "./export-chart-9w8t3rjZ.js";
36
+ //#region src/chart-default.ts
37
+ /**
38
+ * A chart with every built-in plugin installed: hover highlight, legend,
39
+ * tooltip, data table and keyboard navigation. Each can be switched off in
40
+ * the config (`tooltip: false`, …). For the smallest bundle, use the bare
41
+ * `Chart` from `@tabler/charts/core` and pick plugins explicitly.
42
+ *
43
+ * ```ts
44
+ * const chart = new Chart('#sales', { type: line, data })
45
+ * ```
46
+ */
47
+ var Chart = class extends Chart$1 {
48
+ constructor(target, config) {
49
+ super(target, config, defaultPlugins());
50
+ }
51
+ };
52
+ //#endregion
53
+ //#region src/chart-types.ts
54
+ /**
55
+ * Every built-in chart type by its name, for charts declared in markup
56
+ * (`<tabler-chart type="line">`, `data-tc-chart="line"`). Importing it
57
+ * brings every type along: code that knows its types imports them directly.
58
+ */
59
+ const types = {
60
+ line,
61
+ area,
62
+ bar,
63
+ pie,
64
+ donut,
65
+ scatter,
66
+ sparkline,
67
+ gauge,
68
+ heatmap,
69
+ candlestick,
70
+ radar,
71
+ sankey,
72
+ parliament
73
+ };
74
+ //#endregion
75
+ //#region src/index.ts
76
+ /**
77
+ * `@tabler/charts`: everything from `@tabler/charts/core`, with a `Chart`
78
+ * that installs the built-in plugins (tooltip, legend, keyboard, …) and
79
+ * every optional feature registered (time and log axes, decimation,
80
+ * annotations, pattern fills, value labels, point shapes). The one exception
81
+ * is the `download` menu's saver: `import '@tabler/charts/export'` adds it,
82
+ * so charts that never offer a download do not carry the export code.
83
+ */
84
+ register({
85
+ time: {
86
+ scale: time,
87
+ points: timePointScale,
88
+ axis: timeAxis
89
+ },
90
+ dates: dateLabels,
91
+ log: {
92
+ scale: log,
93
+ domain: logDomain,
94
+ ticks: logTicks
95
+ },
96
+ decimate: lttbIndices,
97
+ line: {
98
+ linePath,
99
+ areaPath
100
+ },
101
+ annotations: {
102
+ layers: annotationLayers,
103
+ values: annotationValues
104
+ },
105
+ patterns: patternFills,
106
+ "point-shapes": markerPath,
107
+ hydrate,
108
+ morph
109
+ });
110
+ addPost(shapesStep);
111
+ addPost(labelsStep);
112
+ //#endregion
113
+ 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, downloadChart, escapeAttr, escapeText, estimateTextWidth, exportImage, exportSVG, 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, log, lttb, lttbIndices, niceDomain, normalizeClass, normalizeStyle, padAngleForGap, parliament, 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, time, timePointScale, tooltip, tooltipContent, types };
114
+
115
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["CoreChart"],"sources":["../src/chart-default.ts","../src/chart-types.ts","../src/index.ts"],"sourcesContent":["import { type ChartConfig, Chart as CoreChart } from './chart.ts'\nimport { defaultPlugins } from './plugins/index.ts'\n\n/**\n * A chart with every built-in plugin installed: hover highlight, legend,\n * tooltip, data table and keyboard navigation. Each can be switched off in\n * the config (`tooltip: false`, …). For the smallest bundle, use the bare\n * `Chart` from `@tabler/charts/core` and pick plugins explicitly.\n *\n * ```ts\n * const chart = new Chart('#sales', { type: line, data })\n * ```\n */\nexport class Chart<O extends object = object> extends CoreChart<O> {\n constructor(target: Element | string, config: ChartConfig<O>) {\n super(target, config, defaultPlugins())\n }\n}\n","import type { ChartType } from './chart.ts'\nimport { area } from './charts/area.ts'\nimport { bar } from './charts/bar.ts'\nimport { candlestick } from './charts/candlestick.ts'\nimport { gauge } from './charts/gauge.ts'\nimport { heatmap } from './charts/heatmap.ts'\nimport { line } from './charts/line.ts'\nimport { parliament } from './charts/parliament.ts'\nimport { donut, pie } from './charts/pie.ts'\nimport { radar } from './charts/radar.ts'\nimport { sankey } from './charts/sankey.ts'\nimport { scatter } from './charts/scatter.ts'\nimport { sparkline } from './charts/sparkline.ts'\n\n/**\n * Every built-in chart type by its name, for charts declared in markup\n * (`<tabler-chart type=\"line\">`, `data-tc-chart=\"line\"`). Importing it\n * brings every type along: code that knows its types imports them directly.\n */\nexport const types: Readonly<Record<string, ChartType<never>>> = {\n line,\n area,\n bar,\n pie,\n donut,\n scatter,\n sparkline,\n gauge,\n heatmap,\n candlestick,\n radar,\n sankey,\n parliament,\n} as Record<string, ChartType<never>>\n","/**\n * `@tabler/charts`: everything from `@tabler/charts/core`, with a `Chart`\n * that installs the built-in plugins (tooltip, legend, keyboard, …) and\n * every optional feature registered (time and log axes, decimation,\n * annotations, pattern fills, value labels, point shapes). The one exception\n * is the `download` menu's saver: `import '@tabler/charts/export'` adds it,\n * so charts that never offer a download do not carry the export code.\n */\n\nimport { annotationLayers, annotationValues } from './charts/annotations.ts'\nimport { dateLabels } from './charts/dates.ts'\nimport { logDomain, logTicks } from './charts/log-axis.ts'\nimport { patternFills } from './charts/patterns.ts'\nimport { markerPath, shapesStep } from './charts/point-shapes.ts'\nimport { timeAxis } from './charts/time-axis.ts'\nimport { labelsStep } from './charts/value-labels.ts'\nimport { addPost, register } from './features.ts'\nimport { hydrate } from './render/hydrate.ts'\nimport { morph } from './render/morph.ts'\nimport { log } from './scales/log.ts'\nimport { time, timePointScale } from './scales/time.ts'\nimport { lttb, lttbIndices } from './shapes/decimate.ts'\nimport { areaPath, linePath } from './shapes/path.ts'\n\n// Registered here, in the entry itself, so no bundler can shake it away.\nregister({\n time: { scale: time, points: timePointScale, axis: timeAxis },\n dates: dateLabels,\n log: { scale: log, domain: logDomain, ticks: logTicks },\n decimate: lttbIndices,\n line: { linePath, areaPath },\n annotations: { layers: annotationLayers, values: annotationValues },\n patterns: patternFills,\n 'point-shapes': markerPath,\n hydrate,\n morph,\n})\n\n// Steps that finish the content: shapes first, then the labels over them.\naddPost(shapesStep)\naddPost(labelsStep)\n\nexport { Chart } from './chart-default.ts'\nexport { types } from './chart-types.ts'\nexport * from './core.ts'\nexport type { DownloadOptions, ExportOptions, ExportTarget, ImageOptions } from './export-chart.ts'\nexport { downloadChart, exportImage, exportSVG } from './export-chart.ts'\nexport type { LogScaleOptions } from './scales/log.ts'\nexport type { TimeScale, TimeScaleOptions, TimeValue } from './scales/time.ts'\nexport { log, lttb, lttbIndices, time, timePointScale }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAa,QAAb,cAAsDA,QAAa;CACjE,YAAY,QAA0B,QAAwB;EAC5D,MAAM,QAAQ,QAAQ,eAAe,CAAC;CACxC;AACF;;;;;;;;ACEA,MAAa,QAAoD;CAC/D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;ACRA,SAAS;CACP,MAAM;EAAE,OAAO;EAAM,QAAQ;EAAgB,MAAM;CAAS;CAC5D,OAAO;CACP,KAAK;EAAE,OAAO;EAAK,QAAQ;EAAW,OAAO;CAAS;CACtD,UAAU;CACV,MAAM;EAAE;EAAU;CAAS;CAC3B,aAAa;EAAE,QAAQ;EAAkB,QAAQ;CAAiB;CAClE,UAAU;CACV,gBAAgB;CAChB;CACA;AACF,CAAC;AAGD,QAAQ,UAAU;AAClB,QAAQ,UAAU"}