@sophistry/charts 0.0.0-stage → 0.0.1

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 (427) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -2
  3. package/dist/3d/bar-chart3d.d.ts +56 -0
  4. package/dist/3d/bar-chart3d.d.ts.map +1 -0
  5. package/dist/3d/definitions.d.ts +38 -0
  6. package/dist/3d/definitions.d.ts.map +1 -0
  7. package/dist/3d/definitions.js +14 -0
  8. package/dist/3d/forward.d.ts +65 -0
  9. package/dist/3d/forward.d.ts.map +1 -0
  10. package/dist/3d/index.d.ts +31 -0
  11. package/dist/3d/index.d.ts.map +1 -0
  12. package/dist/3d/index.js +1 -0
  13. package/dist/3d/quiver3d.d.ts +53 -0
  14. package/dist/3d/quiver3d.d.ts.map +1 -0
  15. package/dist/3d/scatter3d.d.ts +45 -0
  16. package/dist/3d/scatter3d.d.ts.map +1 -0
  17. package/dist/3d/stem3d.d.ts +46 -0
  18. package/dist/3d/stem3d.d.ts.map +1 -0
  19. package/dist/3d/surface-grid3d.d.ts +34 -0
  20. package/dist/3d/surface-grid3d.d.ts.map +1 -0
  21. package/dist/3d/tri-surface3d.d.ts +46 -0
  22. package/dist/3d/tri-surface3d.d.ts.map +1 -0
  23. package/dist/3d/voxels3d.d.ts +26 -0
  24. package/dist/3d/voxels3d.d.ts.map +1 -0
  25. package/dist/3d/wireframe3d.d.ts +31 -0
  26. package/dist/3d/wireframe3d.d.ts.map +1 -0
  27. package/dist/band.d.ts +21 -0
  28. package/dist/band.d.ts.map +1 -0
  29. package/dist/bars/bar-chart.d.ts +144 -0
  30. package/dist/bars/bar-chart.d.ts.map +1 -0
  31. package/dist/bars/bar-labels.d.ts +117 -0
  32. package/dist/bars/bar-labels.d.ts.map +1 -0
  33. package/dist/bars/bars.d.ts +224 -0
  34. package/dist/bars/bars.d.ts.map +1 -0
  35. package/dist/bars/bullet.d.ts +158 -0
  36. package/dist/bars/bullet.d.ts.map +1 -0
  37. package/dist/bars/candlestick.d.ts +98 -0
  38. package/dist/bars/candlestick.d.ts.map +1 -0
  39. package/dist/bars/funnel.d.ts +91 -0
  40. package/dist/bars/funnel.d.ts.map +1 -0
  41. package/dist/bars/histogram.d.ts +109 -0
  42. package/dist/bars/histogram.d.ts.map +1 -0
  43. package/dist/bars/index.d.ts +23 -0
  44. package/dist/bars/index.d.ts.map +1 -0
  45. package/dist/bars/race.d.ts +29 -0
  46. package/dist/bars/race.d.ts.map +1 -0
  47. package/dist/bars/rules.d.ts +122 -0
  48. package/dist/bars/rules.d.ts.map +1 -0
  49. package/dist/bars/shared.d.ts +42 -0
  50. package/dist/bars/shared.d.ts.map +1 -0
  51. package/dist/bars/transforms.d.ts +250 -0
  52. package/dist/bars/transforms.d.ts.map +1 -0
  53. package/dist/bars/waterfall.d.ts +107 -0
  54. package/dist/bars/waterfall.d.ts.map +1 -0
  55. package/dist/batch.d.ts +143 -0
  56. package/dist/batch.d.ts.map +1 -0
  57. package/dist/channels-_Xf-p6Lx.js +56 -0
  58. package/dist/chart.d.ts +88 -0
  59. package/dist/chart.d.ts.map +1 -0
  60. package/dist/color-norm.d.ts +91 -0
  61. package/dist/color-norm.d.ts.map +1 -0
  62. package/dist/context.d.ts +112 -0
  63. package/dist/context.d.ts.map +1 -0
  64. package/dist/curves/density.d.ts +126 -0
  65. package/dist/curves/density.d.ts.map +1 -0
  66. package/dist/curves/ecdf.d.ts +73 -0
  67. package/dist/curves/ecdf.d.ts.map +1 -0
  68. package/dist/curves/fill-between.d.ts +101 -0
  69. package/dist/curves/fill-between.d.ts.map +1 -0
  70. package/dist/curves/index.d.ts +16 -0
  71. package/dist/curves/index.d.ts.map +1 -0
  72. package/dist/curves/line-plot.d.ts +105 -0
  73. package/dist/curves/line-plot.d.ts.map +1 -0
  74. package/dist/curves/regression.d.ts +125 -0
  75. package/dist/curves/regression.d.ts.map +1 -0
  76. package/dist/curves/shared.d.ts +53 -0
  77. package/dist/curves/shared.d.ts.map +1 -0
  78. package/dist/curves/stack-plot.d.ts +141 -0
  79. package/dist/curves/stack-plot.d.ts.map +1 -0
  80. package/dist/curves/stairs.d.ts +171 -0
  81. package/dist/curves/stairs.d.ts.map +1 -0
  82. package/dist/data/channels.d.ts +171 -0
  83. package/dist/data/channels.d.ts.map +1 -0
  84. package/dist/end-space.d.ts +82 -0
  85. package/dist/end-space.d.ts.map +1 -0
  86. package/dist/entries/definitions.d.ts +21 -0
  87. package/dist/entries/definitions.d.ts.map +1 -0
  88. package/dist/entries/definitions.js +6 -0
  89. package/dist/frame/band-axis.d.ts +43 -0
  90. package/dist/frame/band-axis.d.ts.map +1 -0
  91. package/dist/frame/coords.d.ts +112 -0
  92. package/dist/frame/coords.d.ts.map +1 -0
  93. package/dist/frame/fit.d.ts +171 -0
  94. package/dist/frame/fit.d.ts.map +1 -0
  95. package/dist/frame/format.d.ts +41 -0
  96. package/dist/frame/format.d.ts.map +1 -0
  97. package/dist/frame/guide-metrics.d.ts +37 -0
  98. package/dist/frame/guide-metrics.d.ts.map +1 -0
  99. package/dist/frame/guides.d.ts +68 -0
  100. package/dist/frame/guides.d.ts.map +1 -0
  101. package/dist/frame/keys.d.ts +97 -0
  102. package/dist/frame/keys.d.ts.map +1 -0
  103. package/dist/frame/layout.d.ts +146 -0
  104. package/dist/frame/layout.d.ts.map +1 -0
  105. package/dist/frame/registry.d.ts +32 -0
  106. package/dist/frame/registry.d.ts.map +1 -0
  107. package/dist/frame/reports.d.ts +54 -0
  108. package/dist/frame/reports.d.ts.map +1 -0
  109. package/dist/frame/secondary-axes.d.ts +74 -0
  110. package/dist/frame/secondary-axes.d.ts.map +1 -0
  111. package/dist/frame/secondary.d.ts +57 -0
  112. package/dist/frame/secondary.d.ts.map +1 -0
  113. package/dist/frame/tooltip-overlay.d.ts +65 -0
  114. package/dist/frame/tooltip-overlay.d.ts.map +1 -0
  115. package/dist/frame/types.d.ts +659 -0
  116. package/dist/frame/types.d.ts.map +1 -0
  117. package/dist/grids/barbs.d.ts +52 -0
  118. package/dist/grids/barbs.d.ts.map +1 -0
  119. package/dist/grids/cell-rects.d.ts +38 -0
  120. package/dist/grids/cell-rects.d.ts.map +1 -0
  121. package/dist/grids/cells.d.ts +131 -0
  122. package/dist/grids/cells.d.ts.map +1 -0
  123. package/dist/grids/contour-f.d.ts +81 -0
  124. package/dist/grids/contour-f.d.ts.map +1 -0
  125. package/dist/grids/contour-shared.d.ts +54 -0
  126. package/dist/grids/contour-shared.d.ts.map +1 -0
  127. package/dist/grids/contour.d.ts +85 -0
  128. package/dist/grids/contour.d.ts.map +1 -0
  129. package/dist/grids/dendrogram.d.ts +105 -0
  130. package/dist/grids/dendrogram.d.ts.map +1 -0
  131. package/dist/grids/heatmap.d.ts +164 -0
  132. package/dist/grids/heatmap.d.ts.map +1 -0
  133. package/dist/grids/hex-bin.d.ts +94 -0
  134. package/dist/grids/hex-bin.d.ts.map +1 -0
  135. package/dist/grids/hist2d.d.ts +108 -0
  136. package/dist/grids/hist2d.d.ts.map +1 -0
  137. package/dist/grids/imshow.d.ts +85 -0
  138. package/dist/grids/imshow.d.ts.map +1 -0
  139. package/dist/grids/index.d.ts +27 -0
  140. package/dist/grids/index.d.ts.map +1 -0
  141. package/dist/grids/pcolormesh.d.ts +91 -0
  142. package/dist/grids/pcolormesh.d.ts.map +1 -0
  143. package/dist/grids/ramp-cells.d.ts +67 -0
  144. package/dist/grids/ramp-cells.d.ts.map +1 -0
  145. package/dist/grids/tri-contour.d.ts +121 -0
  146. package/dist/grids/tri-contour.d.ts.map +1 -0
  147. package/dist/grids/tri-shared.d.ts +62 -0
  148. package/dist/grids/tri-shared.d.ts.map +1 -0
  149. package/dist/grids/tripcolor.d.ts +74 -0
  150. package/dist/grids/tripcolor.d.ts.map +1 -0
  151. package/dist/guides/colorbar.d.ts +111 -0
  152. package/dist/guides/colorbar.d.ts.map +1 -0
  153. package/dist/guides/index.d.ts +12 -0
  154. package/dist/guides/index.d.ts.map +1 -0
  155. package/dist/guides/legend.d.ts +119 -0
  156. package/dist/guides/legend.d.ts.map +1 -0
  157. package/dist/guides/nodes.d.ts +14 -0
  158. package/dist/guides/nodes.d.ts.map +1 -0
  159. package/dist/guides/size-legend.d.ts +234 -0
  160. package/dist/guides/size-legend.d.ts.map +1 -0
  161. package/dist/hierarchy/breadcrumbs.d.ts +134 -0
  162. package/dist/hierarchy/breadcrumbs.d.ts.map +1 -0
  163. package/dist/hierarchy/circle-pack.d.ts +73 -0
  164. package/dist/hierarchy/circle-pack.d.ts.map +1 -0
  165. package/dist/hierarchy/drill.d.ts +246 -0
  166. package/dist/hierarchy/drill.d.ts.map +1 -0
  167. package/dist/hierarchy/frame.d.ts +68 -0
  168. package/dist/hierarchy/frame.d.ts.map +1 -0
  169. package/dist/hierarchy/icicle.d.ts +77 -0
  170. package/dist/hierarchy/icicle.d.ts.map +1 -0
  171. package/dist/hierarchy/index.d.ts +21 -0
  172. package/dist/hierarchy/index.d.ts.map +1 -0
  173. package/dist/hierarchy/labels.d.ts +25 -0
  174. package/dist/hierarchy/labels.d.ts.map +1 -0
  175. package/dist/hierarchy/mosaic.d.ts +131 -0
  176. package/dist/hierarchy/mosaic.d.ts.map +1 -0
  177. package/dist/hierarchy/own-tooltip.d.ts +13 -0
  178. package/dist/hierarchy/own-tooltip.d.ts.map +1 -0
  179. package/dist/hierarchy/props.d.ts +14 -0
  180. package/dist/hierarchy/props.d.ts.map +1 -0
  181. package/dist/hierarchy/sankey.d.ts +133 -0
  182. package/dist/hierarchy/sankey.d.ts.map +1 -0
  183. package/dist/hierarchy/shared.d.ts +248 -0
  184. package/dist/hierarchy/shared.d.ts.map +1 -0
  185. package/dist/hierarchy/sunburst.d.ts +75 -0
  186. package/dist/hierarchy/sunburst.d.ts.map +1 -0
  187. package/dist/hierarchy/tree.d.ts +125 -0
  188. package/dist/hierarchy/tree.d.ts.map +1 -0
  189. package/dist/hierarchy/treemap.d.ts +77 -0
  190. package/dist/hierarchy/treemap.d.ts.map +1 -0
  191. package/dist/index.d.ts +30 -0
  192. package/dist/index.d.ts.map +1 -0
  193. package/dist/index.js +5 -0
  194. package/dist/item-tooltip.d.ts +34 -0
  195. package/dist/item-tooltip.d.ts.map +1 -0
  196. package/dist/join.d.ts +224 -0
  197. package/dist/join.d.ts.map +1 -0
  198. package/dist/math/3d/bar3d.d.ts +28 -0
  199. package/dist/math/3d/bar3d.d.ts.map +1 -0
  200. package/dist/math/3d/quiver3d.d.ts +27 -0
  201. package/dist/math/3d/quiver3d.d.ts.map +1 -0
  202. package/dist/math/3d/scatter3d.d.ts +16 -0
  203. package/dist/math/3d/scatter3d.d.ts.map +1 -0
  204. package/dist/math/3d/stem3d.d.ts +23 -0
  205. package/dist/math/3d/stem3d.d.ts.map +1 -0
  206. package/dist/math/3d/surfaceGrid3d.d.ts +34 -0
  207. package/dist/math/3d/surfaceGrid3d.d.ts.map +1 -0
  208. package/dist/math/3d/trisurface.d.ts +12 -0
  209. package/dist/math/3d/trisurface.d.ts.map +1 -0
  210. package/dist/math/3d/voxels.d.ts +18 -0
  211. package/dist/math/3d/voxels.d.ts.map +1 -0
  212. package/dist/math/aggregate.d.ts +69 -0
  213. package/dist/math/aggregate.d.ts.map +1 -0
  214. package/dist/math/bar.d.ts +32 -0
  215. package/dist/math/bar.d.ts.map +1 -0
  216. package/dist/math/barLabels.d.ts +84 -0
  217. package/dist/math/barLabels.d.ts.map +1 -0
  218. package/dist/math/barbs.d.ts +37 -0
  219. package/dist/math/barbs.d.ts.map +1 -0
  220. package/dist/math/boxplot.d.ts +37 -0
  221. package/dist/math/boxplot.d.ts.map +1 -0
  222. package/dist/math/breadcrumbs.d.ts +129 -0
  223. package/dist/math/breadcrumbs.d.ts.map +1 -0
  224. package/dist/math/bubble.d.ts +39 -0
  225. package/dist/math/bubble.d.ts.map +1 -0
  226. package/dist/math/bullet.d.ts +111 -0
  227. package/dist/math/bullet.d.ts.map +1 -0
  228. package/dist/math/chord.d.ts +104 -0
  229. package/dist/math/chord.d.ts.map +1 -0
  230. package/dist/math/cluster.d.ts +89 -0
  231. package/dist/math/cluster.d.ts.map +1 -0
  232. package/dist/math/contour.d.ts +49 -0
  233. package/dist/math/contour.d.ts.map +1 -0
  234. package/dist/math/contourf.d.ts +51 -0
  235. package/dist/math/contourf.d.ts.map +1 -0
  236. package/dist/math/dodge.d.ts +37 -0
  237. package/dist/math/dodge.d.ts.map +1 -0
  238. package/dist/math/ecdf.d.ts +42 -0
  239. package/dist/math/ecdf.d.ts.map +1 -0
  240. package/dist/math/errorbar.d.ts +28 -0
  241. package/dist/math/errorbar.d.ts.map +1 -0
  242. package/dist/math/eventplot.d.ts +27 -0
  243. package/dist/math/eventplot.d.ts.map +1 -0
  244. package/dist/math/facet.d.ts +91 -0
  245. package/dist/math/facet.d.ts.map +1 -0
  246. package/dist/math/fillBetween.d.ts +29 -0
  247. package/dist/math/fillBetween.d.ts.map +1 -0
  248. package/dist/math/gauge.d.ts +72 -0
  249. package/dist/math/gauge.d.ts.map +1 -0
  250. package/dist/math/hexbin.d.ts +21 -0
  251. package/dist/math/hexbin.d.ts.map +1 -0
  252. package/dist/math/hierarchy.d.ts +180 -0
  253. package/dist/math/hierarchy.d.ts.map +1 -0
  254. package/dist/math/hierarchyJoin.d.ts +60 -0
  255. package/dist/math/hierarchyJoin.d.ts.map +1 -0
  256. package/dist/math/histogram.d.ts +37 -0
  257. package/dist/math/histogram.d.ts.map +1 -0
  258. package/dist/math/histogram2d.d.ts +45 -0
  259. package/dist/math/histogram2d.d.ts.map +1 -0
  260. package/dist/math/imshow.d.ts +27 -0
  261. package/dist/math/imshow.d.ts.map +1 -0
  262. package/dist/math/index.d.ts +140 -0
  263. package/dist/math/index.d.ts.map +1 -0
  264. package/dist/math/index.js +3 -0
  265. package/dist/math/jitter.d.ts +17 -0
  266. package/dist/math/jitter.d.ts.map +1 -0
  267. package/dist/math/join.d.ts +136 -0
  268. package/dist/math/join.d.ts.map +1 -0
  269. package/dist/math/keyframes.d.ts +128 -0
  270. package/dist/math/keyframes.d.ts.map +1 -0
  271. package/dist/math/legend.d.ts +121 -0
  272. package/dist/math/legend.d.ts.map +1 -0
  273. package/dist/math/line.d.ts +54 -0
  274. package/dist/math/line.d.ts.map +1 -0
  275. package/dist/math/morph.d.ts +82 -0
  276. package/dist/math/morph.d.ts.map +1 -0
  277. package/dist/math/mosaic.d.ts +120 -0
  278. package/dist/math/mosaic.d.ts.map +1 -0
  279. package/dist/math/ordinal.d.ts +80 -0
  280. package/dist/math/ordinal.d.ts.map +1 -0
  281. package/dist/math/parallel.d.ts +39 -0
  282. package/dist/math/parallel.d.ts.map +1 -0
  283. package/dist/math/pcolormesh.d.ts +23 -0
  284. package/dist/math/pcolormesh.d.ts.map +1 -0
  285. package/dist/math/pie.d.ts +106 -0
  286. package/dist/math/pie.d.ts.map +1 -0
  287. package/dist/math/polarArea.d.ts +35 -0
  288. package/dist/math/polarArea.d.ts.map +1 -0
  289. package/dist/math/radar.d.ts +111 -0
  290. package/dist/math/radar.d.ts.map +1 -0
  291. package/dist/math/range.d.ts +99 -0
  292. package/dist/math/range.d.ts.map +1 -0
  293. package/dist/math/regression.d.ts +110 -0
  294. package/dist/math/regression.d.ts.map +1 -0
  295. package/dist/math/reveal.d.ts +64 -0
  296. package/dist/math/reveal.d.ts.map +1 -0
  297. package/dist/math/sankey.d.ts +155 -0
  298. package/dist/math/sankey.d.ts.map +1 -0
  299. package/dist/math/scatter.d.ts +15 -0
  300. package/dist/math/scatter.d.ts.map +1 -0
  301. package/dist/math/shared/binning.d.ts +24 -0
  302. package/dist/math/shared/binning.d.ts.map +1 -0
  303. package/dist/math/shared/gridCells.d.ts +42 -0
  304. package/dist/math/shared/gridCells.d.ts.map +1 -0
  305. package/dist/math/shared/gridExtent.d.ts +6 -0
  306. package/dist/math/shared/gridExtent.d.ts.map +1 -0
  307. package/dist/math/shared/pairs.d.ts +3 -0
  308. package/dist/math/shared/pairs.d.ts.map +1 -0
  309. package/dist/math/shared/polar.d.ts +24 -0
  310. package/dist/math/shared/polar.d.ts.map +1 -0
  311. package/dist/math/stack.d.ts +70 -0
  312. package/dist/math/stack.d.ts.map +1 -0
  313. package/dist/math/stackplot.d.ts +36 -0
  314. package/dist/math/stackplot.d.ts.map +1 -0
  315. package/dist/math/stairs.d.ts +18 -0
  316. package/dist/math/stairs.d.ts.map +1 -0
  317. package/dist/math/stem.d.ts +22 -0
  318. package/dist/math/stem.d.ts.map +1 -0
  319. package/dist/math/symbol.d.ts +26 -0
  320. package/dist/math/symbol.d.ts.map +1 -0
  321. package/dist/math/tree.d.ts +118 -0
  322. package/dist/math/tree.d.ts.map +1 -0
  323. package/dist/math/tricontour.d.ts +77 -0
  324. package/dist/math/tricontour.d.ts.map +1 -0
  325. package/dist/math/violin.d.ts +100 -0
  326. package/dist/math/violin.d.ts.map +1 -0
  327. package/dist/math/waffle.d.ts +49 -0
  328. package/dist/math/waffle.d.ts.map +1 -0
  329. package/dist/math/waterfall.d.ts +29 -0
  330. package/dist/math/waterfall.d.ts.map +1 -0
  331. package/dist/math-CSHNpGej.js +3648 -0
  332. package/dist/mix.d.ts +25 -0
  333. package/dist/mix.d.ts.map +1 -0
  334. package/dist/multiview/brush.d.ts +166 -0
  335. package/dist/multiview/brush.d.ts.map +1 -0
  336. package/dist/multiview/chart-group.d.ts +266 -0
  337. package/dist/multiview/chart-group.d.ts.map +1 -0
  338. package/dist/multiview/chart-link.d.ts +189 -0
  339. package/dist/multiview/chart-link.d.ts.map +1 -0
  340. package/dist/multiview/chart-zoom.d.ts +145 -0
  341. package/dist/multiview/chart-zoom.d.ts.map +1 -0
  342. package/dist/multiview/facet.d.ts +239 -0
  343. package/dist/multiview/facet.d.ts.map +1 -0
  344. package/dist/multiview/group-guides.d.ts +100 -0
  345. package/dist/multiview/group-guides.d.ts.map +1 -0
  346. package/dist/multiview/index.d.ts +18 -0
  347. package/dist/multiview/index.d.ts.map +1 -0
  348. package/dist/multiview/joint-plot.d.ts +115 -0
  349. package/dist/multiview/joint-plot.d.ts.map +1 -0
  350. package/dist/multiview/pair-plot.d.ts +154 -0
  351. package/dist/multiview/pair-plot.d.ts.map +1 -0
  352. package/dist/multiview/panels.d.ts +23 -0
  353. package/dist/multiview/panels.d.ts.map +1 -0
  354. package/dist/multiview/parallel-coordinates.d.ts +110 -0
  355. package/dist/multiview/parallel-coordinates.d.ts.map +1 -0
  356. package/dist/points/event-plot.d.ts +68 -0
  357. package/dist/points/event-plot.d.ts.map +1 -0
  358. package/dist/points/index.d.ts +20 -0
  359. package/dist/points/index.d.ts.map +1 -0
  360. package/dist/points/labels.d.ts +71 -0
  361. package/dist/points/labels.d.ts.map +1 -0
  362. package/dist/points/links.d.ts +124 -0
  363. package/dist/points/links.d.ts.map +1 -0
  364. package/dist/points/rects.d.ts +81 -0
  365. package/dist/points/rects.d.ts.map +1 -0
  366. package/dist/points/rug.d.ts +73 -0
  367. package/dist/points/rug.d.ts.map +1 -0
  368. package/dist/points/scatter.d.ts +170 -0
  369. package/dist/points/scatter.d.ts.map +1 -0
  370. package/dist/points/segment-marks.d.ts +40 -0
  371. package/dist/points/segment-marks.d.ts.map +1 -0
  372. package/dist/points/shared.d.ts +35 -0
  373. package/dist/points/shared.d.ts.map +1 -0
  374. package/dist/points/stem.d.ts +76 -0
  375. package/dist/points/stem.d.ts.map +1 -0
  376. package/dist/points/strip.d.ts +146 -0
  377. package/dist/points/strip.d.ts.map +1 -0
  378. package/dist/points/symbol-marker.d.ts +34 -0
  379. package/dist/points/symbol-marker.d.ts.map +1 -0
  380. package/dist/points/ticks.d.ts +103 -0
  381. package/dist/points/ticks.d.ts.map +1 -0
  382. package/dist/props.d.ts +127 -0
  383. package/dist/props.d.ts.map +1 -0
  384. package/dist/radial/chord.d.ts +149 -0
  385. package/dist/radial/chord.d.ts.map +1 -0
  386. package/dist/radial/gauge.d.ts +127 -0
  387. package/dist/radial/gauge.d.ts.map +1 -0
  388. package/dist/radial/index.d.ts +16 -0
  389. package/dist/radial/index.d.ts.map +1 -0
  390. package/dist/radial/pie-chart.d.ts +144 -0
  391. package/dist/radial/pie-chart.d.ts.map +1 -0
  392. package/dist/radial/polar-area-chart.d.ts +136 -0
  393. package/dist/radial/polar-area-chart.d.ts.map +1 -0
  394. package/dist/radial/radar-chart.d.ts +177 -0
  395. package/dist/radial/radar-chart.d.ts.map +1 -0
  396. package/dist/radial/radial-bar-chart.d.ts +117 -0
  397. package/dist/radial/radial-bar-chart.d.ts.map +1 -0
  398. package/dist/radial/shared.d.ts +79 -0
  399. package/dist/radial/shared.d.ts.map +1 -0
  400. package/dist/radial/waffle.d.ts +131 -0
  401. package/dist/radial/waffle.d.ts.map +1 -0
  402. package/dist/raster.d.ts +44 -0
  403. package/dist/raster.d.ts.map +1 -0
  404. package/dist/series.d.ts +72 -0
  405. package/dist/series.d.ts.map +1 -0
  406. package/dist/src-CwGo1bes.js +19221 -0
  407. package/dist/stagger.d.ts +55 -0
  408. package/dist/stagger.d.ts.map +1 -0
  409. package/dist/statistics/box-plot.d.ts +152 -0
  410. package/dist/statistics/box-plot.d.ts.map +1 -0
  411. package/dist/statistics/error-bar.d.ts +149 -0
  412. package/dist/statistics/error-bar.d.ts.map +1 -0
  413. package/dist/statistics/groups.d.ts +141 -0
  414. package/dist/statistics/groups.d.ts.map +1 -0
  415. package/dist/statistics/index.d.ts +8 -0
  416. package/dist/statistics/index.d.ts.map +1 -0
  417. package/dist/statistics/violin-plot.d.ts +144 -0
  418. package/dist/statistics/violin-plot.d.ts.map +1 -0
  419. package/dist/text-width.d.ts +10 -0
  420. package/dist/text-width.d.ts.map +1 -0
  421. package/dist/tooltip.d.ts +277 -0
  422. package/dist/tooltip.d.ts.map +1 -0
  423. package/dist/util.d.ts +34 -0
  424. package/dist/util.d.ts.map +1 -0
  425. package/dist/voxels-9lJ2TZS4.js +235 -0
  426. package/dist/wireframe3d-D157GZAq.js +345 -0
  427. package/package.json +86 -3
@@ -0,0 +1,234 @@
1
+ /**
2
+ * `sizeLegend`: a key to a size encoding, a hollow reference circle per
3
+ * value; `sizeKeyStack`: a frame's stack of them, one per size scale; and
4
+ * the measurements a frame lays them out with.
5
+ *
6
+ * A value's nodes are kept for as long as either end of a transition shows
7
+ * the value, and hidden with `visible: false` when they are not shown.
8
+ * Each end is measured once per change of its scale, values, title or font,
9
+ * not as `progress` or a transition's stages move.
10
+ */
11
+ import type { Point } from "@sophistry/core/geometry";
12
+ import type { SizeScale } from "../frame/types";
13
+ /**
14
+ * A size key's keyed transition: the far end's scale and values, and how far each stage has
15
+ * got. `chart` passes one while a keyed transition runs.
16
+ *
17
+ * @see https://sophistry.dev/guides/chart-animation/#data-transitions
18
+ * @category Charts
19
+ */
20
+ export interface SizeLegendTransition {
21
+ /** The scale at the end. */
22
+ to: SizeScale;
23
+ /** The values the end shows. Defaults to `values`, else the end's own round values. */
24
+ values?: readonly number[];
25
+ /** Progress of the exit stage, 0..1. */
26
+ exit: number;
27
+ /** Progress of the update stage, 0..1. */
28
+ update: number;
29
+ /** Progress of the enter stage, 0..1. */
30
+ enter: number;
31
+ }
32
+ /**
33
+ * Props for {@link sizeLegend}.
34
+ *
35
+ * @category Charts
36
+ */
37
+ export interface SizeLegendProps {
38
+ /** The size scale the key explains. */
39
+ scale: SizeScale;
40
+ /**
41
+ * The values to draw circles for, in order. Defaults to up to three round values of the scale.
42
+ */
43
+ values?: readonly number[];
44
+ /** How a value is written. Defaults to the axes' formatting. */
45
+ format?: (value: number) => string;
46
+ /** The key's top-left corner, in scene units. */
47
+ at: Point;
48
+ /**
49
+ * `"column"`: one circle per row. `"row"`: side by side, wrapping at `maxWidth`.
50
+ * @default "column"
51
+ */
52
+ direction?: "column" | "row";
53
+ /** With `direction: "row"`: wrap before an entry that would run past this width. */
54
+ maxWidth?: number;
55
+ /** A title line above the circles. */
56
+ title?: string;
57
+ /**
58
+ * Font size of the labels.
59
+ * @default 0.28
60
+ */
61
+ fontSize?: number;
62
+ /**
63
+ * Reveal, 0..1: the circles fade in one after another.
64
+ * @default 1
65
+ */
66
+ progress?: number;
67
+ /** A keyed data transition in progress; see {@link SizeLegendTransition}. */
68
+ transition?: SizeLegendTransition;
69
+ /** Paint order; higher draws later. */
70
+ zIndex?: number;
71
+ /** Set to `false` to hide the key. */
72
+ visible?: boolean;
73
+ }
74
+ /** Measurement options shared by {@link sizeLegend} and the frames that place one. */
75
+ export interface SizeLegendMetrics {
76
+ direction?: "column" | "row";
77
+ maxWidth?: number;
78
+ title?: string;
79
+ fontSize?: number;
80
+ format?: (value: number) => string;
81
+ fontFamily: string;
82
+ }
83
+ /**
84
+ * A key to a size encoding: a hollow reference circle per value, with the value beside it,
85
+ * drawn through the same square-root scale as the marks. `chart` draws one automatically for
86
+ * layers sized by value (`scatter`'s `size`); use this directly for charts without a frame.
87
+ *
88
+ * @example
89
+ * ```ts
90
+ * import { sizeLegend } from "@sophistry/charts";
91
+ *
92
+ * sizeLegend.create({
93
+ * at: { x: 3, y: 2 },
94
+ * scale: { maxValue: 100, range: [0, 0.5] },
95
+ * values: [25, 100],
96
+ * title: "Population",
97
+ * });
98
+ * ```
99
+ *
100
+ * @see https://sophistry.dev/guides/charts/#series-and-legends
101
+ * @category Charts
102
+ */
103
+ export declare const sizeLegend: import("@sophistry/core").Definition<SizeLegendProps, import("@sophistry/core/internal").CompositeNode<SizeLegendProps>, keyof SizeLegendProps>;
104
+ /**
105
+ * One key of a frame's stack of size keys: the scale its sized layers draw on at each end of a
106
+ * keyed transition, and the first such layer's channel name.
107
+ *
108
+ * @internal
109
+ */
110
+ export interface SizeKey {
111
+ maxValue: number;
112
+ to?: number;
113
+ range: readonly [number, number];
114
+ label?: string;
115
+ }
116
+ /**
117
+ * A key's laid-out size, and how far it is there at all (0 at an end without one).
118
+ *
119
+ * @internal
120
+ */
121
+ export interface SizeKeyExtent {
122
+ width: number;
123
+ height: number;
124
+ presence: number;
125
+ }
126
+ /**
127
+ * A stack of size keys at each end of a keyed transition: the stack's size and each key's
128
+ * place in it.
129
+ *
130
+ * @internal
131
+ */
132
+ export interface SizeKeysEnds {
133
+ from: SizeKeyExtent;
134
+ to: SizeKeyExtent | undefined;
135
+ /** Each key's top-left corner from the stack's: `x` to the right, `y` down. */
136
+ offsets: {
137
+ from: readonly Point[];
138
+ to: readonly Point[] | undefined;
139
+ };
140
+ }
141
+ /**
142
+ * Each key of a stack measured at each end, before the stack is flowed ({@link flowSizeKeys}).
143
+ *
144
+ * @internal
145
+ */
146
+ export interface SizeKeyMeasures {
147
+ from: readonly SizeKeyExtent[];
148
+ to: readonly SizeKeyExtent[] | undefined;
149
+ }
150
+ /**
151
+ * How a stack of keys flows into columns: a key that would run past `maxHeight` starts a new
152
+ * column `gap` to the right.
153
+ *
154
+ * @internal
155
+ */
156
+ interface SizeKeyColumns {
157
+ maxHeight: number;
158
+ gap: number;
159
+ }
160
+ /**
161
+ * Measures each key of a stack at each end (presence 0 where an end sizes nothing). Undefined
162
+ * without keys. Separate from {@link flowSizeKeys} so a re-flow doesn't re-measure text.
163
+ *
164
+ * @internal
165
+ */
166
+ export declare function measureSizeKeyExtents(keys: readonly SizeKey[], options: Omit<SizeLegendMetrics, "title"> & {
167
+ title?: string;
168
+ values?: readonly number[];
169
+ }): SizeKeyMeasures | undefined;
170
+ /**
171
+ * Flows a stack's measured keys at each end: one under another `gap` apart, starting a new
172
+ * column when one would run past `columns.maxHeight`. A key absent at an end takes no room.
173
+ *
174
+ * @internal
175
+ */
176
+ export declare function flowSizeKeys(measures: SizeKeyMeasures | undefined, gap: number, columns?: SizeKeyColumns): SizeKeysEnds | undefined;
177
+ /**
178
+ * Measures a stack of size keys and flows it ({@link measureSizeKeyExtents},
179
+ * {@link flowSizeKeys}). Undefined without keys.
180
+ *
181
+ * @internal
182
+ */
183
+ export declare function measureSizeKeys(keys: readonly SizeKey[], options: Omit<SizeLegendMetrics, "title"> & {
184
+ title?: string;
185
+ values?: readonly number[];
186
+ }, gap: number, columns?: SizeKeyColumns): SizeKeysEnds | undefined;
187
+ /** Two stacks' measured keys with the same sizes, end by end. */
188
+ export declare function sameSizeKeyMeasures(a: SizeKeyMeasures | undefined, b: SizeKeyMeasures | undefined): boolean;
189
+ /** Two measured stacks of size keys with the same sizes and places. */
190
+ export declare function sameSizeKeysEnds(a: SizeKeysEnds | undefined, b: SizeKeysEnds | undefined): boolean;
191
+ /**
192
+ * Each key's place in the stack now: its own end's, or while a key rescales, both ends'
193
+ * blended by the update progress `u`.
194
+ *
195
+ * @internal
196
+ */
197
+ export declare function sizeKeyOffsets(ends: SizeKeysEnds | undefined, u: number): readonly Point[];
198
+ /** Two lists of key places, compared by value. */
199
+ export declare function sameOffsets(a: readonly Point[] | undefined, b: readonly Point[] | undefined): boolean;
200
+ /** The stages a stack of keys transitions on: exit, update and enter progress, as `SizeLegendTransition` takes them. */
201
+ export type SizeKeyStages = Pick<SizeLegendTransition, "exit" | "update" | "enter">;
202
+ /**
203
+ * Props for {@link sizeKeyStack}.
204
+ *
205
+ * @internal
206
+ */
207
+ export interface SizeKeyStackProps {
208
+ keys: readonly SizeKey[];
209
+ /** Each key's top-left corner from `at`: `x` to the right, `y` down. */
210
+ offsets: readonly Point[];
211
+ /** The stack's top-left corner. */
212
+ at: Point;
213
+ /** A title for the first key (see `sizeKeyTitle`). */
214
+ title?: string;
215
+ values?: readonly number[];
216
+ format?: (value: number) => string;
217
+ direction: "column" | "row";
218
+ maxWidth?: number;
219
+ fontSize?: number;
220
+ progress?: number;
221
+ /** The keyed transition's stages, while one runs. */
222
+ stages?: SizeKeyStages;
223
+ zIndex?: number;
224
+ visible?: boolean;
225
+ }
226
+ /**
227
+ * A frame's size keys, one {@link sizeLegend} per key at its place in the stack, each blending to
228
+ * its far end's scale while `stages` is given. Keys are kept by position in the stack.
229
+ *
230
+ * @internal
231
+ */
232
+ export declare const sizeKeyStack: import("@sophistry/core").Definition<SizeKeyStackProps, import("@sophistry/core/internal").CompositeNode<SizeKeyStackProps>, keyof SizeKeyStackProps>;
233
+ export {};
234
+ //# sourceMappingURL=size-legend.d.ts.map
@@ -0,0 +1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AwH;AACxH,MAAM,MAAM,aAAa,GAAG,IAAI,CAC/B,oBAAoB,EACpB,MAAM,GAAG,QAAQ,GAAG,OAAO,CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;IACzB,wEAAwE;IACxE,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IAC1B,mCAAmC;IACnC,EAAE,EAAE,KAAK,CAAC;IACV,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,SAAS,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,uJAmBvB,CAAC"}
@@ -0,0 +1,134 @@
1
+ /**
2
+ * `breadcrumbs`: a trail of names for a drill-down, and the trail a zoomable
3
+ * hierarchy chart draws for its own `breadcrumbs` prop.
4
+ *
5
+ * A trail is a handful of words, each its own tap target and tab stop, so
6
+ * every crumb, separator and the back control stay `label` nodes (keyed by
7
+ * the crumb's path, so a crumb cross-fading through a zoom keeps its node).
8
+ */
9
+ import type { SceneNode } from "@sophistry/core";
10
+ import type { Point } from "@sophistry/core/geometry";
11
+ import type { HierarchyPathSpec } from "../math/breadcrumbs";
12
+ import type { HierarchyNodeInfo } from "../math/hierarchy";
13
+ import type { HierarchyBreadcrumbOptions, HierarchyDrill } from "./drill";
14
+ import type { ResolvedFocus } from "./shared";
15
+ /** @category Charts */
16
+ export interface BreadcrumbsProps {
17
+ /**
18
+ * The trail: names below the root (`[]` is the root alone), or a `{ from, to, t }` transition
19
+ * such as {@link createDrillDown}'s `focus`, so the crumbs follow a zoom.
20
+ */
21
+ path: HierarchyPathSpec;
22
+ /**
23
+ * The root crumb's text.
24
+ * @default "All"
25
+ */
26
+ root?: string;
27
+ /**
28
+ * Anchor x.
29
+ * @default 0
30
+ */
31
+ x?: number;
32
+ /**
33
+ * Anchor y (the text's vertical middle).
34
+ * @default 0
35
+ */
36
+ y?: number;
37
+ /**
38
+ * Where the anchor is on the trail.
39
+ * @default "left"
40
+ */
41
+ align?: "left" | "center" | "right";
42
+ /**
43
+ * Font size.
44
+ * @default 0.24
45
+ */
46
+ fontSize?: number;
47
+ /**
48
+ * Drawn between crumbs.
49
+ * @default "›"
50
+ */
51
+ separator?: string;
52
+ /**
53
+ * The widest the trail may be: a deeper path collapses its middle into one `…` crumb (tap it to
54
+ * climb), keeping the root and as many last crumbs as fit. Omitted, the trail never collapses.
55
+ */
56
+ maxWidth?: number;
57
+ /**
58
+ * The collapsed crumbs' text.
59
+ * @default "…"
60
+ */
61
+ ellipsis?: string;
62
+ /**
63
+ * A back control before the root crumb: `true` for `"←"`, or its text. With `onSelect`, tapping
64
+ * it asks for the parent of the node in focus; it fades out at the root. Defaults to none.
65
+ */
66
+ back?: boolean | string;
67
+ /** The last crumb's colour (the node in focus). Defaults to the theme foreground. */
68
+ color?: string;
69
+ /** The other crumbs' colour, marking them as tappable. Defaults to the theme accent. */
70
+ linkColor?: string;
71
+ /**
72
+ * Called with a crumb's path when an earlier crumb is tapped (or Enter is pressed on it).
73
+ * Without it the crumbs are not interactive.
74
+ */
75
+ onSelect?: (path: string[]) => void;
76
+ /**
77
+ * Reveal, 0..1: the trail fades in.
78
+ * @default 1
79
+ */
80
+ progress?: number;
81
+ /** Paint order; higher draws later. */
82
+ zIndex?: number;
83
+ /**
84
+ * Set to `false` to hide the trail.
85
+ * @default true
86
+ */
87
+ visible?: boolean;
88
+ }
89
+ /**
90
+ * A breadcrumb trail for a drill-down: the root's name, then each name on the path to the node
91
+ * in focus. Tap (or Enter on) an earlier crumb to go back up; Escape asks for the parent. Give
92
+ * it the same `path` as a hierarchy chart's `focus` and it scrubs with the zoom. The hierarchy
93
+ * charts draw one themselves with their `breadcrumbs` prop.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * import { createScene } from "@sophistry/core";
98
+ * import { breadcrumbs, createDrillDown } from "@sophistry/charts";
99
+ *
100
+ * const scene = createScene({ host: document.querySelector("#figure")!, units: 10 });
101
+ * const zoom = createDrillDown({ clock: scene.clock });
102
+ * breadcrumbs.create({ path: zoom.focus, root: "repo", x: -4, y: 2.4, onSelect: (path) => void zoom.zoomTo(path) });
103
+ * ```
104
+ *
105
+ * @see https://sophistry.dev/reference/chart-catalogue/#hierarchies
106
+ * @category Charts
107
+ */
108
+ export declare const breadcrumbs: import("@sophistry/core").Definition<BreadcrumbsProps, import("@sophistry/core/internal").CompositeNode<BreadcrumbsProps>, keyof BreadcrumbsProps>;
109
+ /** Where a chart's trail goes and how wide it may grow. @internal */
110
+ export interface ChartBreadcrumbsFrame<T> {
111
+ options: boolean | HierarchyBreadcrumbOptions | undefined;
112
+ nodes: readonly HierarchyNodeInfo<T>[];
113
+ resolved: ResolvedFocus;
114
+ drill: HierarchyDrill<T>;
115
+ /** The chart's top-left corner, in scene units. */
116
+ corner: Point;
117
+ /** The chart's width: how wide the trail may grow by default. */
118
+ width: number;
119
+ /** The chart's label font size. */
120
+ labelFontSize: number;
121
+ progress?: number;
122
+ zIndex?: number;
123
+ visible?: boolean;
124
+ }
125
+ /**
126
+ * The trail a zoomable hierarchy chart draws for its `breadcrumbs` prop: its
127
+ * focus as names, just above the chart's top-left unless placed, collapsing
128
+ * past the chart's width. Call once, in `setup`; the result hands back the
129
+ * trail's node (made the first time it is asked for), or null for none.
130
+ *
131
+ * @internal
132
+ */
133
+ export declare function createChartBreadcrumbs<T>(): (frame: ChartBreadcrumbsFrame<T>) => SceneNode | null;
134
+ //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/hierarchy/breadcrumbs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAIX,SAAS,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAkB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAY9C,uBAAuB;AACvB,MAAM,WAAW,gBAAgB;IAChC;;;OAGG;IACH,IAAI,EAAE,iBAAiB,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AA6MD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,oJAyEtB,CAAC;AAKH,qEAAqE;AACrE,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACvC,OAAO,EAAE,OAAO,GAAG,0BAA0B,GAAG,SAAS,CAAC;IAC1D,KAAK,EAAE,SAAS,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,mDAAmD;IACnD,MAAM,EAAE,KAAK,CAAC;IACd,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,KAAK,CAC5C,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAC3B,SAAS,GAAG,IAAI,CA6CpB"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * `circlePack`: every leaf a disc, packed inside its parent's circle.
3
+ *
4
+ * Every circle is one `circle` instance of one instances node, keyed by the
5
+ * node's path of names, with its own fill, fill opacity and stroke (groups
6
+ * are tinted and outlined, leaves filled); per-node picking, tooltips and
7
+ * drilling go through `event.item`. Circles grow from their centres
8
+ * (radius). While zoomed, the node and the leaf names sit in
9
+ * a `group` clipped to the root's disc. Names are `label` nodes, one per
10
+ * leaf whose name fits.
11
+ */
12
+ import type { Point } from "@sophistry/core/geometry";
13
+ import type { RequiredUnless } from "../data/channels";
14
+ import type { HierarchyDrillProps } from "./drill";
15
+ import type { HierarchyChartBaseProps, HierarchyFocusSpec, HierarchyTransitionProps } from "./shared";
16
+ /** @category Charts */
17
+ export interface CirclePackBaseProps<T> extends HierarchyChartBaseProps<T>, HierarchyTransitionProps<T>, HierarchyDrillProps<T> {
18
+ /** Centre of the chart. Defaults to the origin. */
19
+ center?: Point;
20
+ /**
21
+ * Radius of the root circle.
22
+ * @default 1
23
+ */
24
+ radius?: number;
25
+ /**
26
+ * Gap between sibling circles and their parent's rim.
27
+ * @default 0.03
28
+ */
29
+ padding?: number;
30
+ /**
31
+ * Draw the root's circle.
32
+ * @default true
33
+ */
34
+ root?: boolean;
35
+ /**
36
+ * Zoom into a node: its circle grows to fill the root's while the rest fades away along a
37
+ * smooth zoom path. A path of names below the root (`["a"]`), a predicate, or `{ from, to, t }`
38
+ * for a scrubbable transition. Given, the chart is controlled: taps only call `onFocusChange`.
39
+ * Defaults to the root.
40
+ */
41
+ focus?: HierarchyFocusSpec<T>;
42
+ }
43
+ /**
44
+ * Props of {@link circlePack}: `value` is required unless the tree's nodes are numbers.
45
+ *
46
+ * @category Charts
47
+ */
48
+ export type CirclePackProps<T> = CirclePackBaseProps<T> & RequiredUnless<T, number, "value">;
49
+ /**
50
+ * Circle packing: every leaf a disc with area proportional to its value, packed inside its
51
+ * parent's circle. Draws in scene units; circles grow from their centres, parents first.
52
+ * Supports drill-down `focus` and keyed transitions. The circles are one instances node
53
+ * (`event.item` picks a circle). See {@link packLayout} for the layout alone.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * import { circlePack } from "@sophistry/charts";
58
+ *
59
+ * const files = {
60
+ * name: "repo",
61
+ * children: [
62
+ * { name: "src", children: [{ name: "index.ts", size: 12 }, { name: "chart.ts", size: 30 }] },
63
+ * { name: "README.md", size: 4 },
64
+ * ],
65
+ * };
66
+ * circlePack.create({ data: files, value: "size", label: "name", radius: 2, drill: true });
67
+ * ```
68
+ *
69
+ * @see https://sophistry.dev/reference/chart-catalogue/#hierarchies
70
+ * @category Charts
71
+ */
72
+ export declare const circlePack: import("@sophistry/core").Definition<CirclePackBaseProps<any>, import("@sophistry/core/internal").CompositeNode<CirclePackBaseProps<any>>, keyof CirclePackBaseProps<any>>;
73
+ //# sourceMappingURL=circle-pack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle-pack.d.ts","sourceRoot":"","sources":["../../src/hierarchy/circle-pack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAKtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAMnD,OAAO,KAAK,EACX,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,MAAM,UAAU,CAAC;AAmBlB,uBAAuB;AACvB,MAAM,WAAW,mBAAmB,CAAC,CAAC,CACrC,SAAQ,uBAAuB,CAAC,CAAC,CAAC,EACjC,wBAAwB,CAAC,CAAC,CAAC,EAC3B,mBAAmB,CAAC,CAAC,CAAC;IACvB,mDAAmD;IACnD,MAAM,CAAC,EAAE,KAAK,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,GACtD,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AA+KpC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,UAAU,4KAmCrB,CAAC"}