@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,69 @@
1
+ /**
2
+ * Reducers and per-series maps: the arithmetic behind the `group`, `bin`,
3
+ * `rolling` and `normalize` transforms. Arrays of numbers in, numbers out.
4
+ */
5
+ /**
6
+ * How a set of values becomes one number. Every reducer but `"count"` (which
7
+ * counts rows) drops non-finite values first. An empty set reduces to `NaN`
8
+ * (0 for `"count"` and `"sum"`).
9
+ *
10
+ * @category Math & helpers
11
+ */
12
+ export type ReducerName = "count" | "sum" | "mean" | "median" | "min" | "max" | "first" | "last" | "deviation" | "variance";
13
+ /**
14
+ * A named reducer, or your own function of the values.
15
+ *
16
+ * @category Math & helpers
17
+ */
18
+ export type Reducer = ReducerName | ((values: number[]) => number);
19
+ /**
20
+ * Reduces `values` to one number; see {@link ReducerName}.
21
+ *
22
+ * @category Math & helpers
23
+ */
24
+ export declare function reduceValues(values: readonly number[], reducer: Reducer): number;
25
+ /** @category Math */
26
+ export interface RollingOptions {
27
+ /** Window size, in values. @default 3 */
28
+ k?: number;
29
+ /**
30
+ * Where each value sits in its window: `"middle"` (centred), `"start"`
31
+ * (looking ahead) or `"end"` (trailing).
32
+ * @default "middle"
33
+ */
34
+ anchor?: "start" | "middle" | "end";
35
+ /** @default "mean" */
36
+ reduce?: Reducer;
37
+ /**
38
+ * Only reduce full windows of finite values (elsewhere `NaN`). Off, windows
39
+ * cut short or holding non-finite values reduce what they have.
40
+ * @default false
41
+ */
42
+ strict?: boolean;
43
+ }
44
+ /**
45
+ * A moving-window reduction of `values`, a rolling mean by default.
46
+ *
47
+ * @returns One value per input value.
48
+ * @category Math & helpers
49
+ */
50
+ export declare function rollingValues(values: readonly number[], options?: RollingOptions): number[];
51
+ /**
52
+ * What {@link normalizeValues} divides by: `"first"` (growth from the first
53
+ * value), `"last"`, `"sum"`, `"mean"`, `"median"`, `"min"` or `"max"`;
54
+ * `"extent"` rescales min..max to 0..1; `"deviation"` gives z-scores; a
55
+ * number divides by itself.
56
+ *
57
+ * @category Math & helpers
58
+ */
59
+ export type NormalizeBasis = "first" | "last" | "sum" | "mean" | "median" | "min" | "max" | "extent" | "deviation" | number;
60
+ /**
61
+ * Normalizes a series against a basis. Non-finite values, and every value
62
+ * under a zero or non-finite basis, become `NaN`.
63
+ *
64
+ * @param basis - Defaults to `"first"`.
65
+ * @returns One value per input value.
66
+ * @category Math & helpers
67
+ */
68
+ export declare function normalizeValues(values: readonly number[], basis?: NormalizeBasis): number[];
69
+ //# sourceMappingURL=aggregate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../src/math/aggregate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACpB,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,OAAO,GACP,MAAM,GACN,WAAW,GACX,UAAU,CAAC;AAEd;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,YAAY,CAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,OAAO,GACd,MAAM,CAyBR;AAED,qBAAqB;AACrB,MAAM,WAAW,cAAc;IAC9B,yCAAyC;IACzC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpC,sBAAsB;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,GAAE,cAAmB,GAC1B,MAAM,EAAE,CAoBV;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACvB,OAAO,GACP,MAAM,GACN,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,QAAQ,GACR,WAAW,GACX,MAAM,CAAC;AAEV;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,KAAK,GAAE,cAAwB,GAC7B,MAAM,EAAE,CAgBV"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * A bar's box in data space: slot `index` occupies `[index, index + 1]`, the
3
+ * bar `barWidth` of it, centred.
4
+ *
5
+ * @category Math & helpers
6
+ */
7
+ export interface BarSlotBox {
8
+ /** The bar's x extent (not the whole slot): `barWidth` wide, centred on the slot. */
9
+ x0: number;
10
+ x1: number;
11
+ /** The bar's y extent, sorted from `baseline` and `value`, so a negative value hangs below the baseline. */
12
+ y0: number;
13
+ y1: number;
14
+ }
15
+ /**
16
+ * Bar width as a fraction of the slot.
17
+ *
18
+ * @category Math & helpers
19
+ */
20
+ export declare const DEFAULT_BAR_WIDTH = 0.6;
21
+ /**
22
+ * One bar's box in data space at full height: `barWidth` of slot `[index,
23
+ * index + 1]`, centred at `index + 0.5`, spanning `baseline` to `value` in
24
+ * either order.
25
+ *
26
+ * @param baseline - The value the bar stands on (usually 0).
27
+ * @param barWidth - Fraction of the slot. Defaults to {@link DEFAULT_BAR_WIDTH}.
28
+ * @returns The box, or `null` when `value` is not finite.
29
+ * @category Math & helpers
30
+ */
31
+ export declare function barSlot(index: number, value: number, baseline: number, barWidth?: number): BarSlotBox | null;
32
+ //# sourceMappingURL=bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar.d.ts","sourceRoot":"","sources":["../../src/math/bar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,UAAU;IAC1B,qFAAqF;IACrF,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,4GAA4G;IAC5G,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACX;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CACtB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,QAAQ,SAAoB,GAC1B,UAAU,GAAG,IAAI,CAUnB"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Where a bar's value label goes, in scene units: centred inside the bar
3
+ * and whether it fits there, and which bar of a stack carries the stack's
4
+ * total past its outer end.
5
+ *
6
+ * @category Math & helpers
7
+ */
8
+ import type { Bounds } from "@sophistry/core/geometry";
9
+ /** A label's size in scene units: its advance width and ink height. */
10
+ export interface BarLabelSize {
11
+ width: number;
12
+ height: number;
13
+ }
14
+ /** How far past first fitting (as a fraction of the label's length) the bar grows before its label is fully opaque. */
15
+ export declare const INSIDE_LABEL_FADE = 0.5;
16
+ /**
17
+ * How visible a label centred inside a bar is, 0..1: 0 while the bar is too
18
+ * small for the label plus `pad`, rising to 1 as it grows past that, and 1
19
+ * at full length whenever the label fits. A label never shows ahead of its
20
+ * growing segment.
21
+ *
22
+ * @param box - The bar now (mid-reveal or mid-transition).
23
+ * @param rest - The bar at full length on this frame.
24
+ * @param pad - Room kept between the label and each edge.
25
+ * @param vertical - Whether the bar runs up the y axis.
26
+ * @category Math & helpers
27
+ */
28
+ export declare function insideLabelFit(box: Bounds, rest: Bounds, size: BarLabelSize, pad: number, vertical: boolean): number;
29
+ /**
30
+ * One bar's share in its stack's total: the total of its side of zero, and
31
+ * whether it is that side's outermost segment (the one the total is
32
+ * written past).
33
+ *
34
+ * @category Math & helpers
35
+ */
36
+ export interface StackTotal {
37
+ /** The sum of the segments on this bar's side of zero, in data units. */
38
+ total: number;
39
+ /** Whether this bar ends its side of the stack. */
40
+ outer: boolean;
41
+ }
42
+ /**
43
+ * Each stacked bar's {@link StackTotal}: segments grouped by category and
44
+ * sign, each side's total carried by the segment reaching furthest its way.
45
+ * Zero and non-finite segments belong to no side (`undefined`).
46
+ *
47
+ * @param own - Each bar's own signed value.
48
+ * @param ends - Where each bar ends on the value axis (the stack's `y2`).
49
+ * @category Math & helpers
50
+ */
51
+ export declare function stackTotals(categories: readonly unknown[], own: readonly number[], ends: readonly number[]): (StackTotal | undefined)[];
52
+ /** What a bar's labels read from its dataset. */
53
+ export interface BarLabelSide {
54
+ /** Each bar's own value (a stacked segment's, not where it ends). */
55
+ own: readonly number[];
56
+ /** Where each bar ends. */
57
+ values: readonly number[];
58
+ /** Where each bar starts, when not at the baseline. */
59
+ bases: readonly number[] | undefined;
60
+ stacked: boolean;
61
+ /** Whether the stack is of shares (`offset="normalize"`). */
62
+ normalized: boolean;
63
+ /** Each stacked bar's side of its stack's total. */
64
+ totals: readonly (StackTotal | undefined)[] | undefined;
65
+ }
66
+ /** The numbers a bar's labels write: its own (a share, when normalized) and its stack's total when it ends its side. @internal */
67
+ export declare function barLabelValues(side: BarLabelSide, index: number): {
68
+ share: number;
69
+ total: number | undefined;
70
+ };
71
+ /** Two ends' label values blended at `u`; a total carried at only one end shows while that end is nearer. @internal */
72
+ export declare function mixBarLabelValues(from: {
73
+ share: number;
74
+ total: number | undefined;
75
+ }, to: {
76
+ share: number;
77
+ total: number | undefined;
78
+ }, u: number): {
79
+ share: number;
80
+ total: number | undefined;
81
+ };
82
+ /** Decimal places a value is written with, so a counting label keeps one width (`"1.5e-7"` has 8). @internal */
83
+ export declare function decimalsOf(value: number): number;
84
+ //# sourceMappingURL=barLabels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"barLabels.d.ts","sourceRoot":"","sources":["../../src/math/barLabels.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAIvD,uEAAuE;AACvE,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,uHAAuH;AACvH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,OAAO,GACf,MAAM,CAUR;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IAC1B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,UAAU,EAAE,SAAS,OAAO,EAAE,EAC9B,GAAG,EAAE,SAAS,MAAM,EAAE,EACtB,IAAI,EAAE,SAAS,MAAM,EAAE,GACrB,CAAC,UAAU,GAAG,SAAS,CAAC,EAAE,CAuB5B;AAED,iDAAiD;AACjD,MAAM,WAAW,YAAY;IAC5B,qEAAqE;IACrE,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IACvB,2BAA2B;IAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,uDAAuD;IACvD,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,oDAAoD;IACpD,MAAM,EAAE,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,CAAC;CACxD;AAED,kIAAkI;AAClI,wBAAgB,cAAc,CAC7B,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,MAAM,GACX;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAU9C;AAED,uHAAuH;AACvH,wBAAgB,iBAAiB,CAChC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAClD,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAChD,CAAC,EAAE,MAAM,GACP;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAQ9C;AAED,gHAAgH;AAChH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Wind barb glyphs: a shaft with ticks near one end coding magnitude
3
+ * (pennant 50, full tick 10, half tick 5), built in a local frame (shaft
4
+ * along +x from the origin) for a caller to place, rotate and scale.
5
+ */
6
+ import type { Point } from "@sophistry/core/geometry";
7
+ /**
8
+ * One barb glyph: how many of each tick it decomposed to, and its geometry.
9
+ *
10
+ * @category Math & helpers
11
+ */
12
+ export interface BarbGlyph {
13
+ pennants: number;
14
+ fullBarbs: number;
15
+ halfBarbs: number;
16
+ /** Polylines and polygons in the local frame: the shaft first, then each tick. */
17
+ segments: Point[][];
18
+ }
19
+ /** @category Math */
20
+ export interface BarbGlyphOptions {
21
+ /** Shaft length, local units. @default 1 */
22
+ shaftLength?: number;
23
+ /** Spacing between successive ticks along the shaft. Defaults to `shaftLength / 6`. */
24
+ barbSpacing?: number;
25
+ /** Tick length, local units. Defaults to `shaftLength / 2`. */
26
+ barbLength?: number;
27
+ }
28
+ /**
29
+ * Local-frame geometry for a wind barb: a shaft from the origin to
30
+ * `(shaftLength, 0)` plus ticks stepping in from the far end, each at 45° on
31
+ * the `-y` side. Negative or `NaN` magnitudes draw a bare shaft (calm).
32
+ *
33
+ * @param magnitude - Wind speed in the tick values' units (conventionally knots).
34
+ * @category Math & helpers
35
+ */
36
+ export declare function barbGlyph(magnitude: number, options?: BarbGlyphOptions): BarbGlyph;
37
+ //# sourceMappingURL=barbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"barbs.d.ts","sourceRoot":"","sources":["../../src/math/barbs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;CACpB;AAED,qBAAqB;AACrB,MAAM,WAAW,gBAAgB;IAChC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACxB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,gBAAqB,GAC5B,SAAS,CA8CX"}
@@ -0,0 +1,37 @@
1
+ /** Box-and-whisker statistics: quartiles, median, whiskers clipped to Tukey's fences, and outliers beyond them. */
2
+ /** @category Math */
3
+ export interface BoxplotStats {
4
+ min: number;
5
+ q1: number;
6
+ median: number;
7
+ q3: number;
8
+ max: number;
9
+ /** Lower whisker end — the smallest finite value still inside the fence. */
10
+ low: number;
11
+ /** Upper whisker end — the largest finite value still inside the fence. */
12
+ high: number;
13
+ /** Finite values outside `[q1 - whiskerScale * iqr, q3 + whiskerScale * iqr]`. */
14
+ outliers: number[];
15
+ }
16
+ /** @category Math */
17
+ export interface BoxplotOptions {
18
+ /** How many IQRs past q1/q3 the whiskers may reach before a point is an outlier. @default 1.5 */
19
+ whiskerScale?: number;
20
+ }
21
+ /**
22
+ * `BoxplotOptions.whiskerScale`'s default.
23
+ *
24
+ * @category Math & helpers
25
+ */
26
+ export declare const DEFAULT_WHISKER_SCALE = 1.5;
27
+ /**
28
+ * Five-number summary of `values` by Tukey's rule: whiskers reach the most
29
+ * extreme value within `whiskerScale * iqr` of the box; anything further is
30
+ * an outlier.
31
+ *
32
+ * @param values - Raw samples; non-finite entries are dropped.
33
+ * @returns The summary, or `null` when no finite value remains.
34
+ * @category Math & helpers
35
+ */
36
+ export declare function boxplotStats(values: readonly number[], options?: BoxplotOptions): BoxplotStats | null;
37
+ //# sourceMappingURL=boxplot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boxplot.d.ts","sourceRoot":"","sources":["../../src/math/boxplot.ts"],"names":[],"mappings":"AAAA,mHAAmH;AAKnH,qBAAqB;AACrB,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,qBAAqB;AACrB,MAAM,WAAW,cAAc;IAC9B,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,GAAE,cAAmB,GAC1B,YAAY,GAAG,IAAI,CA2BrB"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Breadcrumbs for a drill-down: the trail of names from a hierarchy's root
3
+ * to the focused node, laid out left to right, with text widths from a
4
+ * `measure` callback. A trail may be a `{ from, to, t }` transition: shared
5
+ * crumbs stay put, others fade with their end's weight, so it scrubs.
6
+ */
7
+ /**
8
+ * A focus path (names below the root: `[]` is the root, `["src", "lib"]`
9
+ * is "lib" inside "src"), or a scrubbable `{ from, to, t }` transition
10
+ * between two, either end possibly itself a transition. What
11
+ * {@link useDrillDown} produces and both a hierarchy chart's `focus` and
12
+ * {@link Breadcrumbs} take.
13
+ *
14
+ * @category Charts
15
+ */
16
+ export type HierarchyPathSpec = readonly string[] | {
17
+ from: HierarchyPathSpec;
18
+ to: HierarchyPathSpec;
19
+ t: number;
20
+ };
21
+ /** Whether a path spec is a transition rather than a plain path. */
22
+ export declare function isPathTransition(spec: HierarchyPathSpec): spec is Exclude<HierarchyPathSpec, readonly string[]>;
23
+ /**
24
+ * One path of a (possibly nested) transition with its share of the blend.
25
+ *
26
+ * @category Math & helpers
27
+ */
28
+ export interface WeightedPath {
29
+ path: readonly string[];
30
+ /** 0..1; the weights of one spec sum to 1. */
31
+ weight: number;
32
+ }
33
+ /** Whether two paths name the same node. */
34
+ export declare function samePath(a: readonly string[], b: readonly string[]): boolean;
35
+ /**
36
+ * A path spec as the paths it blends, each with its weight (equal paths
37
+ * merged, zero weights dropped, in first-seen order).
38
+ *
39
+ * @category Math & helpers
40
+ */
41
+ export declare function flattenPathSpec(spec: HierarchyPathSpec): WeightedPath[];
42
+ /**
43
+ * Where a path spec is heading: `to`'s path (recursively), or the plain path.
44
+ *
45
+ * @category Math & helpers
46
+ */
47
+ export declare function pathTarget(spec: HierarchyPathSpec): readonly string[];
48
+ /**
49
+ * One crumb of a laid-out trail. Offsets are from the trail's anchor, in
50
+ * the unit `measure` returned.
51
+ *
52
+ * @category Math & helpers
53
+ */
54
+ export interface BreadcrumbItem {
55
+ /** Stable identity: the crumb's path, JSON-encoded (`"…"` for the ellipsis). */
56
+ key: string;
57
+ /** The crumb's own path below the root (`[]` for the root crumb); for the ellipsis, the deepest crumb it hides. */
58
+ path: string[];
59
+ /** The text shown (the root's name for the root crumb). */
60
+ name: string;
61
+ /** 0 for the root crumb, +1 per level (the ellipsis is 1). */
62
+ depth: number;
63
+ /** Left edge of the crumb's text. */
64
+ x: number;
65
+ /** Width of the crumb's text. */
66
+ width: number;
67
+ /** Centre of the separator drawn before this crumb (unused at depth 0). */
68
+ separatorX: number;
69
+ /** Presence, 0..1: the summed weight of the paths that show it. */
70
+ weight: number;
71
+ /** How much this crumb is the focused (last) one, 0..1, as a fraction of its own weight. */
72
+ current: number;
73
+ /** Whether this is the ellipsis standing for the crumbs collapsed out of the middle. */
74
+ ellipsis?: boolean;
75
+ /** For the ellipsis: the names it stands for, root side first (of its heaviest path). */
76
+ hidden?: string[];
77
+ }
78
+ /**
79
+ * The trail's "back" control, laid out before the root crumb.
80
+ *
81
+ * @category Math & helpers
82
+ */
83
+ export interface BreadcrumbBack {
84
+ /** Left edge of the control. */
85
+ x: number;
86
+ /** Its width, as given. */
87
+ width: number;
88
+ /** Presence, 0..1: the weight of the paths below the root (none at the root). */
89
+ weight: number;
90
+ /** Where it goes: the parent of the path the spec is heading for; null when heading for the root. */
91
+ path: string[] | null;
92
+ }
93
+ /** @category Math */
94
+ export interface BreadcrumbLayoutOptions {
95
+ /** The root crumb's text. */
96
+ root: string;
97
+ /** Width of a crumb's text. */
98
+ measure: (text: string) => number;
99
+ /** Width of the separator's text. */
100
+ separatorWidth: number;
101
+ /** Space each side of a separator. */
102
+ gap: number;
103
+ /** Where the anchor is on the trail. @default "left" */
104
+ align?: "left" | "center" | "right";
105
+ /**
106
+ * The widest a trail may be, back control included. Wider paths keep the
107
+ * root and as many last crumbs as fit, collapsing the rest into one
108
+ * ellipsis; root, ellipsis and last crumb always show. Omitted, never collapses.
109
+ */
110
+ maxWidth?: number;
111
+ /** The ellipsis's text. @default "…" */
112
+ ellipsis?: string;
113
+ /** Reserve room for a back control this wide before the root crumb (plus `2 × gap`). Omitted, none. */
114
+ backWidth?: number;
115
+ }
116
+ /**
117
+ * Lays out a path spec's crumbs: one per distinct prefix of every blended
118
+ * path, each placed after those before it on its own path. With
119
+ * `maxWidth`, paths too wide collapse their middle into an ellipsis whose
120
+ * `path` is the deepest crumb it hides.
121
+ *
122
+ * @category Math & helpers
123
+ */
124
+ export declare function breadcrumbLayout(spec: HierarchyPathSpec, options: BreadcrumbLayoutOptions): {
125
+ items: BreadcrumbItem[];
126
+ width: number;
127
+ back?: BreadcrumbBack;
128
+ };
129
+ //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/math/breadcrumbs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAC1B,SAAS,MAAM,EAAE,GACjB;IACA,IAAI,EAAE,iBAAiB,CAAC;IACxB,EAAE,EAAE,iBAAiB,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;CACT,CAAC;AAEL,oEAAoE;AACpE,wBAAgB,gBAAgB,CAC/B,IAAI,EAAE,iBAAiB,GACrB,IAAI,IAAI,OAAO,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC,CAEvD;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;CACf;AAED,4CAA4C;AAC5C,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE5E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,YAAY,EAAE,CAgBvE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,SAAS,MAAM,EAAE,CAErE;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC9B,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAC;IACZ,mHAAmH;IACnH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,gCAAgC;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,qGAAqG;IACrG,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CACtB;AAED,qBAAqB;AACrB,MAAM,WAAW,uBAAuB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,qCAAqC;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uGAAuG;IACvG,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAYD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC/B,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,uBAAuB,GAC9B;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,cAAc,CAAA;CAAE,CAkJnE"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Bubble sizing: values to marker radii with area, not radius, proportional
3
+ * to value (a viewer reads area).
4
+ */
5
+ /**
6
+ * One radius per input value, parallel to `values`.
7
+ *
8
+ * @category Math & helpers
9
+ */
10
+ export type BubbleRadii = number[];
11
+ /** @category Math */
12
+ export interface BubbleRadiusOptions {
13
+ /** Radius for a value of 0. @default 0 */
14
+ minRadius?: number;
15
+ /** Radius for `maxValue`. @default 1 */
16
+ maxRadius?: number;
17
+ /** The value that maps to `maxRadius`. Defaults to the greatest finite value in `values`. */
18
+ maxValue?: number;
19
+ }
20
+ /**
21
+ * Values to marker radii with area proportional to value:
22
+ * `minRadius + (maxRadius - minRadius) * sqrt(value / maxValue)`. When every
23
+ * value is 0, every radius is `minRadius`.
24
+ *
25
+ * @param values - One per marker; non-finite or negative entries clamp to 0.
26
+ * @returns One radius per value, in `minRadius`/`maxRadius`'s units.
27
+ * @category Math & helpers
28
+ */
29
+ export declare function bubbleRadiusScale(values: readonly number[], options?: BubbleRadiusOptions): BubbleRadii;
30
+ /**
31
+ * Reference values for a size key over `[0, maxValue]`: at most `count`
32
+ * round numbers above zero, the largest kept.
33
+ *
34
+ * @param count - Defaults to 3.
35
+ * @returns Ascending values in `(0, maxValue]`; empty when `maxValue` is not positive.
36
+ * @category Math & helpers
37
+ */
38
+ export declare function bubbleLegendValues(maxValue: number, count?: number): number[];
39
+ //# sourceMappingURL=bubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bubble.d.ts","sourceRoot":"","sources":["../../src/math/bubble.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC;AAEnC,qBAAqB;AACrB,MAAM,WAAW,mBAAmB;IACnC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAKD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,GAAE,mBAAwB,GAC/B,WAAW,CAYb;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,EAAE,CAcxE"}
@@ -0,0 +1,111 @@
1
+ /** Bullet-chart geometry: one row's scale, qualitative bands, measure bar and target marker, as data values and as fractions of the row. */
2
+ import type { Range } from "@sophistry/core/geometry";
3
+ /**
4
+ * Options for {@link bulletDomain}.
5
+ *
6
+ * @category Math & helpers
7
+ */
8
+ export interface BulletDomainOptions {
9
+ /**
10
+ * The scale's start, in data units. Defaults to 0, or below the smallest value when one is
11
+ * negative.
12
+ */
13
+ min?: number;
14
+ /**
15
+ * The scale's end, in data units. Defaults to the largest value (0 when every value is
16
+ * negative).
17
+ */
18
+ max?: number;
19
+ /** Round default ends out to tick values; an explicit `min`/`max` is kept. @default true */
20
+ nice?: boolean;
21
+ /** Roughly how many ticks the scale should offer. @default 5 */
22
+ targetTicks?: number;
23
+ }
24
+ /**
25
+ * The scale one bullet (or several sharing a scale) spans: from 0, or the
26
+ * smallest value when negative, to the largest, rounded out to ticks.
27
+ * Non-finite values are ignored; with nothing to fit it reads `0..1`.
28
+ *
29
+ * @param values - Everything the scale must show: values, targets, thresholds.
30
+ * @returns `[min, max, step]`, with `step` the tick spacing.
31
+ * @category Math & helpers
32
+ */
33
+ export declare function bulletDomain(values: readonly number[], options?: BulletDomainOptions): Range;
34
+ /**
35
+ * A stretch of a bullet's scale, in data units and as fractions of its
36
+ * length (0 at the scale's start, 1 at its end).
37
+ *
38
+ * @category Math & helpers
39
+ */
40
+ export interface BulletSpan {
41
+ /** Start, in data units. */
42
+ from: number;
43
+ /** End, in data units. */
44
+ to: number;
45
+ /** `from` as a fraction of the scale, 0..1. */
46
+ startFraction: number;
47
+ /** `to` as a fraction of the scale, 0..1. */
48
+ endFraction: number;
49
+ }
50
+ /**
51
+ * One qualitative band of a bullet: a {@link BulletSpan} and its place in the
52
+ * input `ranges`.
53
+ *
54
+ * @category Math & helpers
55
+ */
56
+ export interface BulletBand extends BulletSpan {
57
+ /** Position in the input `ranges` array: 0 is the worst band. */
58
+ index: number;
59
+ }
60
+ /**
61
+ * Options for {@link bulletRow}.
62
+ *
63
+ * @category Math & helpers
64
+ */
65
+ export interface BulletRowOptions extends BulletDomainOptions {
66
+ /** The comparative measure the value is judged against, in data units. */
67
+ target?: number;
68
+ /**
69
+ * Qualitative thresholds in ascending order, each where a band ends:
70
+ * `[150, 225, 300]` is poor to 150, satisfactory to 225, good beyond. The
71
+ * last band runs on to the scale's end.
72
+ */
73
+ ranges?: readonly number[];
74
+ /** Use this scale as is, ignoring `min`, `max`, `nice` and `targetTicks`, so several bullets share one ({@link bulletDomain}). */
75
+ domain?: Range;
76
+ }
77
+ /**
78
+ * One bullet's resolved geometry.
79
+ *
80
+ * @category Math & helpers
81
+ */
82
+ export interface BulletRowGeometry {
83
+ /** The scale, `[min, max, step]`. */
84
+ domain: Range;
85
+ /** Tick values along the scale, ascending. */
86
+ ticks: number[];
87
+ /** One band per input threshold, in input order (worst first). */
88
+ bands: BulletBand[];
89
+ /** Where the measure bar starts: 0, or the scale end nearest it when the scale has no zero. */
90
+ baseline: number;
91
+ /** Whether the scale contains zero, so the bar can grow from it (otherwise it fades in). */
92
+ zero: boolean;
93
+ /** The measure bar from `baseline` to the value (clamped to the scale), or null for a non-finite value. */
94
+ measure: BulletSpan | null;
95
+ /** The target (clamped to the scale) and its fraction, or null when there is none. */
96
+ target: {
97
+ value: number;
98
+ fraction: number;
99
+ } | null;
100
+ }
101
+ /**
102
+ * Resolves one bullet: scale (covering value, target and thresholds), ticks,
103
+ * bands, measure bar and target marker, clamped to the scale. Non-finite
104
+ * inputs drop their part; a bad threshold leaves an empty band so `index`
105
+ * stays aligned.
106
+ *
107
+ * @param value - The featured measure, in data units.
108
+ * @category Math & helpers
109
+ */
110
+ export declare function bulletRow(value: number, options?: BulletRowOptions): BulletRowGeometry;
111
+ //# sourceMappingURL=bullet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bullet.d.ts","sourceRoot":"","sources":["../../src/math/bullet.ts"],"names":[],"mappings":"AAAA,4IAA4I;AAE5I,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAMtD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4FAA4F;IAC5F,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,GAAE,mBAAwB,GAC/B,KAAK,CAsBP;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IAC1B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC7C,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC5D,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,kIAAkI;IAClI,MAAM,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC,qCAAqC;IACrC,MAAM,EAAE,KAAK,CAAC;IACd,8CAA8C;IAC9C,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,kEAAkE;IAClE,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,CAAC;IACjB,4FAA4F;IAC5F,IAAI,EAAE,OAAO,CAAC;IACd,2GAA2G;IAC3G,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,sFAAsF;IACtF,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CACxB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,gBAAqB,GAC5B,iBAAiB,CA2DnB"}