@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,77 @@
1
+ /**
2
+ * `treemap`: nested rectangles, each leaf's area proportional to its value.
3
+ *
4
+ * Every tile is one `rect` instance of one instances node, keyed by the
5
+ * node's path of names (so a keyed transition or a data change keeps each
6
+ * tile's item); per-tile picking, tooltips and drilling go through
7
+ * `event.item`. Names are `label` nodes, one per tile whose name fits.
8
+ */
9
+ import type { Point } from "@sophistry/core/geometry";
10
+ import type { RequiredUnless } from "../data/channels";
11
+ import type { TreemapTile } from "../math/hierarchy";
12
+ import type { HierarchyDrillProps } from "./drill";
13
+ import type { HierarchyChartBaseProps, HierarchyFocusSpec, HierarchyTransitionProps } from "./shared";
14
+ /** @category Charts */
15
+ export interface TreemapBaseProps<T> extends HierarchyChartBaseProps<T>, HierarchyTransitionProps<T>, HierarchyDrillProps<T> {
16
+ /** Width of the whole treemap. */
17
+ width: number;
18
+ /** Height of the whole treemap. */
19
+ height: number;
20
+ /** Centre of the treemap. Defaults to the origin. */
21
+ center?: Point;
22
+ /**
23
+ * Tiling method. With a keyed transition (`to`), `"resquarify"` lays `to` out in `data`'s rows
24
+ * so every tile keeps its neighbours (no tiles cross mid-transition), at the cost of `blend =
25
+ * 1` not matching a fresh squarify of `to`.
26
+ * @default "squarify"
27
+ */
28
+ tile?: TreemapTile;
29
+ /**
30
+ * Gap between tiles, and between a group's edge and its tiles.
31
+ * @default 0.03
32
+ */
33
+ padding?: number;
34
+ /**
35
+ * Header strip at the top of every group, where its name is written when it fits. Defaults to
36
+ * `padding` (no header).
37
+ */
38
+ paddingTop?: number;
39
+ /**
40
+ * Zoom into a node: its tile fills the box while everything outside fades away. A path of names
41
+ * below the root (`["src"]`), a predicate, or `{ from, to, t }` for a scrubbable transition.
42
+ * Given, the chart is controlled: taps only call `onFocusChange`. Defaults to the root.
43
+ */
44
+ focus?: HierarchyFocusSpec<T>;
45
+ }
46
+ /**
47
+ * Props of {@link treemap}: `value` is required unless the tree's nodes are numbers.
48
+ *
49
+ * @category Charts
50
+ */
51
+ export type TreemapProps<T> = TreemapBaseProps<T> & RequiredUnless<T, number, "value">;
52
+ /**
53
+ * A treemap: nested rectangles, each leaf's area proportional to its value, squarified by
54
+ * default. Lays itself out in a `width × height` box; needs no `chart`. Leaves take their
55
+ * top-level branch's colour; names are written where they fit. Supports drill-down `focus` and
56
+ * keyed transitions. The tiles are one instances node (`event.item` picks a tile). See
57
+ * {@link treemapLayout} for the layout alone.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * import { treemap } from "@sophistry/charts";
62
+ *
63
+ * const files = {
64
+ * name: "repo",
65
+ * children: [
66
+ * { name: "src", children: [{ name: "index.ts", size: 12 }, { name: "chart.ts", size: 30 }] },
67
+ * { name: "README.md", size: 4 },
68
+ * ],
69
+ * };
70
+ * treemap.create({ data: files, value: "size", label: "name", width: 8, height: 4, drill: true, tooltip: true });
71
+ * ```
72
+ *
73
+ * @see https://sophistry.dev/reference/chart-catalogue/#hierarchies
74
+ * @category Charts
75
+ */
76
+ export declare const treemap: import("@sophistry/core").Definition<TreemapBaseProps<any>, import("@sophistry/core/internal").CompositeNode<TreemapBaseProps<any>>, keyof TreemapBaseProps<any>>;
77
+ //# sourceMappingURL=treemap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treemap.d.ts","sourceRoot":"","sources":["../../src/hierarchy/treemap.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAItD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAiB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAMnD,OAAO,KAAK,EACX,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,MAAM,UAAU,CAAC;AAgBlB,uBAAuB;AACvB,MAAM,WAAW,gBAAgB,CAAC,CAAC,CAClC,SAAQ,uBAAuB,CAAC,CAAC,CAAC,EACjC,wBAAwB,CAAC,CAAC,CAAC,EAC3B,mBAAmB,CAAC,CAAC,CAAC;IACvB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,MAAM,CAAC,EAAE,KAAK,CAAC;IACf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAChD,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AA8LpC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,mKAmClB,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * `@sophistry/charts`: charts built on instanced primitives, scales and
3
+ * keyed joins. A `chart` fits its axes to the layers inside it; per-datum
4
+ * marks draw as one instances node, marks with distinct outlines as one path
5
+ * batch, rasters as images.
6
+ *
7
+ * @module @sophistry/charts
8
+ * @packageDocumentation
9
+ */
10
+ export * from "./bars/index";
11
+ export type { BatchedMark, BatchedMarkOptions, BatchItem, MarkTransition, } from "./batch";
12
+ export { createBatchedMark } from "./batch";
13
+ export { chart, chartHandle } from "./chart";
14
+ export type { ChartLayer } from "./context";
15
+ export { chartContext, chartLayer, chartLayersContext } from "./context";
16
+ export * from "./curves/index";
17
+ export * from "./data/channels";
18
+ export type * from "./frame/types";
19
+ export * from "./grids/index";
20
+ export * from "./guides/index";
21
+ export * from "./hierarchy/index";
22
+ export * from "./math/index";
23
+ export * from "./multiview/index";
24
+ export * from "./points/index";
25
+ export type { AnyDatum, BarReveal, CurveReveal, DensityReveal, KeyedTransitionProps, LayersReveal, RadialReveal, RevealProps, SeriesTransitionProps, StackReveal, StaggerOrder, TransitionProps, } from "./props";
26
+ export * from "./radial/index";
27
+ export * from "./statistics/index";
28
+ export type { ActiveTooltip, TooltipAnchor, TooltipConfig, TooltipContent, TooltipField, TooltipFormat, TooltipOptions, TooltipPoint, TooltipRow, TooltipSpec, TooltipState, } from "./tooltip";
29
+ export { createTooltipState, tooltipContext, tooltipLabel } from "./tooltip";
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,cAAc,CAAC;AAC7B,YAAY,EACX,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,cAAc,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7C,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACzE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,mBAAmB,eAAe,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,YAAY,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,eAAe,GACf,MAAM,SAAS,CAAC;AACjB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,YAAY,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,YAAY,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, D as s, Dt as c, E as l, Et as u, F as d, Ft as f, G as p, Gt as m, H as h, Ht as g, I as _, It as v, J as y, Jt as b, K as x, Kt as S, L as C, Lt as w, M as T, Mt as E, N as D, Nt as O, O as k, Ot as A, P as j, Pt as M, Q as N, R as P, Rt as F, S as I, St as L, T as R, Tt as z, U as B, Ut as V, V as H, Vt as U, W, Wt as G, X as K, Xt as q, Y as J, Yt as Y, Z as X, Zt as Z, _ as Q, _t as $, a as ee, at as te, b as ne, bt as re, c as ie, ct as ae, d as oe, dt as se, et as ce, f as le, ft as ue, g as de, gt as fe, h as pe, ht as me, i as he, it as ge, j as _e, jt as ve, k as ye, kt as be, l as xe, lt as Se, m as Ce, mt as we, n as Te, nt as Ee, o as De, ot as Oe, p as ke, pt as Ae, q as je, qt as Me, r as Ne, rt as Pe, s as Fe, st as Ie, tt as Le, u as Re, ut as ze, v as Be, vt as Ve, w as He, wt as Ue, x as We, xt as Ge, y as Ke, yt as qe, z as Je, zt as Ye } from "./src-CwGo1bes.js";
2
+ import { $ as Xe, $t as Ze, A as Qe, An as $e, At as et, B as tt, Bn as nt, Bt as rt, C as it, Cn as at, Ct as ot, D as st, Dn as ct, Dt as lt, E as ut, En as dt, Et as ft, F as pt, Fn as mt, Ft as ht, G as gt, Gn as _t, Gt as vt, H as yt, Hn as bt, Ht as xt, I as St, In as Ct, It as wt, J as Tt, Jt as Et, K as Dt, Kn as Ot, Kt as kt, L as At, Ln as jt, Lt as Mt, M as Nt, Mn as Pt, Mt as Ft, N as It, Nn as Lt, Nt as Rt, O as zt, On as Bt, Ot as Vt, P as Ht, Pn as Ut, Pt as Wt, Q as Gt, Qt as Kt, R as qt, Rn as Jt, Rt as Yt, S as Xt, Sn as Zt, St as Qt, T as $t, Tn as en, Tt as tn, U as nn, Un as rn, Ut as an, V as on, Vn as sn, Vt as cn, W as ln, Wn as un, Wt as dn, X as fn, Xt as pn, Y as mn, Yt as hn, Z as gn, Zt as _n, _ as vn, _n as yn, _t as bn, a as xn, an as Sn, at as Cn, b as wn, bn as Tn, bt as En, c as Dn, cn as On, ct as kn, d as An, dn as jn, dt as Mn, en as Nn, et as Pn, f as Fn, fn as In, ft as Ln, g as Rn, gn as zn, gt as Bn, h as Vn, hn as Hn, ht as Un, i as Wn, in as Gn, it as Kn, j as qn, jn as Jn, jt as Yn, k as Xn, kn as Zn, kt as Qn, l as $n, ln as er, lt as tr, m as nr, mn as rr, mt as ir, n as ar, nn as or, nt as sr, o as cr, on as lr, ot as ur, p as dr, pn as fr, pt as pr, q as mr, qt as hr, r as gr, rn as _r, rt as vr, s as yr, sn as br, st as xr, t as Sr, tn as Cr, tt as wr, u as Tr, un as Er, ut as Dr, v as Or, vn as kr, vt as Ar, w as jr, wn as Mr, wt as Nr, x as Pr, xn as Fr, xt as Ir, y as Lr, yn as Rr, yt as zr, z as Br, zn as Vr, zt as Hr } from "./math-CSHNpGej.js";
3
+ import { a as Ur, c as Wr, i as Gr, l as Kr, n as qr, o as Jr, r as Yr, s as Xr, t as Zr } from "./channels-_Xf-p6Lx.js";
4
+ import { a as Qr, i as $r, n as ei, o as ti, r as ni, s as ri, t as ii } from "./voxels-9lJ2TZS4.js";
5
+ export { zr as DECIMATION_MIN_PER_COLUMN, zn as DEFAULT_BAR_WIDTH, or as DEFAULT_BIN_COUNT, lt as DEFAULT_ECDF_PAD_FALLBACK, Vt as DEFAULT_ECDF_PAD_FRACTION, et as DEFAULT_SAMPLES, Yn as DEFAULT_VIOLIN_SCALE, It as DEFAULT_WHISKER_SCALE, Or as GAUGE_END_ANGLE, Lr as GAUGE_START_ANGLE, Er as INSIDE_LABEL_FADE, ct as SYMBOLS, Jn as alignedRange, gr as assertRadarShape, Pt as autoRange, ri as bar3dSlots, o as barChart, Ue as barChartHandle, jn as barLabelValues, yn as barSlot, bn as barbGlyph, Oe as barbs, z as bars, u as barsHandle, Ce as beeswarm, Sn as beeswarmOffsets, c as bin, Gn as binIndex, Ft as blendViolinProfiles, T as boxBrushDrags, he as boxPlot, Ht as boxplotStats, mr as breadcrumbLayout, p as breadcrumbs, D as brushDrags, j as brushWheel, ye as brushedCategories, en as bubbleLegendValues, dt as bubbleRadiusScale, Ge as bullet, kt as bulletDomain, hr as bulletRow, L as bulletTooltip, re as candlestick, te as cells, Zr as channelValues, v as chart, Y as chartContext, F as chartGroupContext, w as chartHandle, q as chartLayer, Z as chartLayersContext, t as chartLink, Ye as chartPanel, k as chartZoom, d as chartZoomActions, _ as chartZoomDrag, oe as chord, Qe as chordLayout, qn as chordRibbon, B as circlePack, kr as clipPolylineToX, Rr as clipRingToX, ur as clusterRows, qr as colorResolver, b as colorbar, ge as contour, ir as contourBands, Pe as contourF, Un as contourLines, f as createBatchedMark, i as createChartGroup, W as createDrillDown, V as createTooltipState, Bn as dataExtent, En as dataRuns, Yr as dateSinkContext, sn as datumKeys, In as decimalsOf, Ir as decimateRun, Ee as dendrogram, Ae as density, xr as distanceMatrix, A as dodge, lr as dodgeSpan, se as ecdf, Qn as ecdfSteps, Ne as errorBar, Xn as errorBarPoints, We as eventPlot, zt as eventPlotRows, s as facet, jr as facetGrid, $t as facetSlots, ze as fillBetween, Nr as fillBetweenCurve, tn as fillBetweenRings, Lt as fitRange, Tt as flattenPathSpec, qe as funnel, Re as gauge, wn as gaugeAngle, Pr as gaugeBandIndex, Xt as gaugeBands, it as gaugeFraction, Rt as gaussianKde, vr as gridNcols, be as group, Le as heatmap, ce as hexBin, Cn as hexbin, on as hierarchyJoin, yt as hierarchyKeys, Dr as hierarchyTreeLayout, N as hist2d, Ve as histogram, Kn as histogram2d, _r as histogramBins, h as icicle, Gr as identity, X as imshow, wr as imshowCells, Ur as indexOf, fr as insideLabelFit, Qt as isNonDecreasingX, mn as isPathTransition, n as jitter, Cr as jitterOffsets, Ut as joinStages, He as jointPlot, mt as keyWindow, Ct as keyedJoin, an as keyframeAt, ne as labels, qt as largestRemainder, U as layoutTooltip, kn as leafOrder, Me as legend, Zn as legendLayout, Se as linePlot, tr as linkageTree, Be as links, pn as loess, _n as loessBand, Kt as meanInterval, rr as mixBarLabelValues, Mt as morphArea, Yt as morphAreaRuns, Hr as morphPolyline, rt as morphRuns, cn as morphSteps, H as mosaic, tt as mosaicLayout, ve as normalize, br as normalizeValues, Jr as numberValues, bt as observable10, rn as okabeIto, un as ordinalColorScale, ut as outerEdge, nn as packLayout, a as pairPlot, st as panelProgress, Rn as parallelAxisX, I as parallelCoordinates, vn as parallelLines, ln as partitionLayout, e as pcolormesh, sr as pcolormeshCells, xe as pieChart, $n as pieGrow, Tr as pieSlices, An as pieSweep, ie as polarAreaChart, Dn as polarAreaSlices, ti as quiverVectors, dn as raceTimeline, Wn as radarAxisFrames, Fe as radarChart, xn as radarFramePolygon, cr as radarLabelOffset, yr as radarVertices, De as radialBarChart, Mn as radialTreeLink, Ln as radialTreePoint, _e as rangeBrush, $ as rankRace, l as rects, On as reduceValues, Ze as regression, ae as regressionPlot, jt as rescaleKind, Jt as rescaleWindow, Xr as resolveChannel, Wr as resolveColor, Nt as resolvePolarSweep, Kr as resolveQuantity, Tn as revealClipAlongX, Fr as revealCutoff, Zt as revealPolylinesAlongX, at as revealRingsAlongX, Fn as ringLayout, dr as ringOrder, E as rolling, er as rollingValues, Q as rug, me as ruleX, fe as ruleY, fn as samePath, ot as sameRuns, r as sankey, St as sankeyLayout, At as sankeyRibbon, R as scatter, ar as scatterPoints, Qr as scatterPoints3, x as secondaryX, je as secondaryY, S as sizeLegend, $e as sizeLegendLayout, O as stack, Et as stackColumns, hn as stackOrder, Ie as stackPlot, Hn as stackTotals, Ar as stackedBands, Vr as stageProgress, nt as staggeredStageProgress, ue as stairs, ft as stairsPolyline, de as stem, Sr as stemPoints, $r as stemPoints3, pe as strip, Nn as studentT, M as summarize, Je as sunburst, ei as surfaceGridFaces, ni as surfaceGridWireframe, nr as sweepShare, Vn as sweepWedge, Bt as symbolPolygon, _t as tableau10, le as tickX, ke as tickY, G as tooltipContext, m as tooltipLabel, g as tooltipOverlay, vt as trailPolyline, P as tree, pr as treeLink, C as treemap, gt as treemapLayout, Dt as treemapRows, J as triContour, K as triContourF, gn as triangulate, Gt as tricontourBands, Xe as tricontourLines, y as tripcolor, Pn as tripcolorFaces, pt as trisurfaceFaces, Ot as uniqueKeys, Ke as vectors, Te as violinPlot, Wt as violinProfile, ht as violinProfileRing, wt as violinRing, ii as voxelFaces, ee as waffle, Br as waffleCells, we as waterfall, xt as waterfallSteps, Mr as xExtent };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Tooltips for a batched layer: one node, one tooltip per item.
3
+ *
4
+ * `tooltipHandlers` serves a node that is one datum. A batched layer (see
5
+ * `instances()` or a path batch) is one node for every datum, and the pointer driver
6
+ * tells it which item it is on through `event.item` — leaving one item and
7
+ * entering the next as the pointer crosses between them. These handlers turn
8
+ * that into the same show/hide calls, with each item's own text and anchor.
9
+ */
10
+ import type { ScenePointerEvent } from "@sophistry/core";
11
+ import type { Point } from "@sophistry/core/geometry";
12
+ import type { TooltipContent, TooltipState } from "./tooltip";
13
+ /**
14
+ * Hover and tap handlers showing item `event.item`'s tooltip.
15
+ *
16
+ * @param tooltip - The chart's tooltip, or undefined for none.
17
+ * @param textOf - An item's tooltip, or undefined for none.
18
+ * @param atOf - Where an item's tooltip points, in scene units.
19
+ * Spread the result into the batched node's `shared` props (instances) or
20
+ * props (path batch); handlers receive `event.item`.
21
+ *
22
+ * @param label - The layer's accessible name: a batched layer is one tab stop,
23
+ * whose items the arrow keys walk (see `InteractionHandlers.itemLabel`).
24
+ *
25
+ * @internal
26
+ */
27
+ export declare function itemTooltipHandlers(tooltip: TooltipState | null | undefined, textOf: (item: number) => TooltipContent | undefined, atOf: (item: number) => Point | undefined, label: () => string | undefined): {
28
+ readonly label?: string;
29
+ readonly onEnter?: (event: ScenePointerEvent) => void;
30
+ readonly onLeave?: (event: ScenePointerEvent) => void;
31
+ readonly onTap?: (event: ScenePointerEvent) => void;
32
+ readonly itemLabel?: (item: number) => string | undefined;
33
+ };
34
+ //# sourceMappingURL=item-tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-tooltip.d.ts","sourceRoot":"","sources":["../src/item-tooltip.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACxC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,cAAc,GAAG,SAAS,EACpD,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,GAAG,SAAS,EACzC,KAAK,EAAE,MAAM,MAAM,GAAG,SAAS,GAC7B;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC1D,CAgDA"}
package/dist/join.d.ts ADDED
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Keyed data transitions (`to` + `blend`) shared by chart marks: the join
3
+ * between the two datasets' keys and each stage's progress. A key in both
4
+ * ends updates (interpolates in data space), one only in `to` enters at its
5
+ * new place, one only in `data` exits at its old place. Stages come from the
6
+ * enclosing chart, or from the join alone outside one.
7
+ *
8
+ * Each is a factory called once in
9
+ * a composite's `setup` that returns a function to call in every `update`.
10
+ * The factory keeps last-input caches (keys compared by value), so a frame
11
+ * of a blend recomputes the stage progress and nothing else. Internal.
12
+ */
13
+ import type { BandKey, Point } from "@sophistry/core/geometry";
14
+ import type { Channel, DateSink } from "./data/channels";
15
+ import type { AxisExtent, ColorExtent, LayerTransition } from "./frame/types";
16
+ import type { JoinStages, JoinStaging, KeyedJoin } from "./math/join";
17
+ import type { Category, GroupKey } from "./series";
18
+ /** One update's view of a keyed join. See {@link createJoin}. */
19
+ export interface JoinState {
20
+ /** True while a transition is requested (`to` given). */
21
+ active: boolean;
22
+ /** Every key to keep an item for: the union while active, else `data`'s keys. */
23
+ keys: readonly BandKey[];
24
+ /** The join, while active. */
25
+ join: KeyedJoin | undefined;
26
+ /** Where each key sits in `data`'s keys. */
27
+ fromSlots: Map<BandKey, number>;
28
+ /** Where each key sits in `to`'s keys, while active. */
29
+ toSlots: Map<BandKey, number> | undefined;
30
+ /** The blend, clamped (0 when inactive). */
31
+ t: number;
32
+ /** The stages in use, while active. */
33
+ stages: JoinStages | undefined;
34
+ /** Progress of the update stage, 0..1 (0 when inactive). */
35
+ update: number;
36
+ /** Progress of the enter stage, 0..1 (0 when inactive). */
37
+ enter: number;
38
+ /** One entering key's progress through the enter stage: its own sub-window under `enterStagger`, else `enter`. */
39
+ enterOf(key: BandKey): number;
40
+ /** Progress of the exit stage, 0..1 (0 when inactive). */
41
+ exit: number;
42
+ /** Whether anything enters or exits, including the mark's own `more` (false when inactive). */
43
+ flags: {
44
+ enters: boolean;
45
+ exits: boolean;
46
+ };
47
+ }
48
+ /** What {@link createJoin}'s function takes on each update. */
49
+ export interface JoinSpec {
50
+ fromKeys: readonly BandKey[];
51
+ /** `to`'s keys, or undefined without a transition. */
52
+ toKeys: readonly BandKey[] | undefined;
53
+ blend: number | undefined;
54
+ staging: JoinStaging | undefined;
55
+ /** The enclosing chart's stages (`frame.join`), which win over the join's own. */
56
+ chartStages?: JoinStages | undefined;
57
+ /** Enters and exits beyond the keys (a radar's axes), so the stages make room. */
58
+ more?: {
59
+ enters?: boolean;
60
+ exits?: boolean;
61
+ } | undefined;
62
+ /** Fraction of the enter stage spent staggering entering keys, 0..0.95. */
63
+ enterStagger?: number | undefined;
64
+ /** Each entering key's stagger rank; defaults to `to`'s order. */
65
+ enterRanks?: (entering: readonly BandKey[], join: KeyedJoin) => readonly number[];
66
+ }
67
+ /**
68
+ * Makes a keyed join for one mark. Call once, in `setup`; call the result
69
+ * in every `update` with that update's keys and blend.
70
+ *
71
+ * @returns `(spec) => JoinState`, caching the join while the keys are equal
72
+ * by value.
73
+ */
74
+ export declare function createJoin(): (spec: JoinSpec) => JoinState;
75
+ /** Which end of a transition a key's datum is read from. */
76
+ export type JoinEnd = "from" | "to";
77
+ /** What one key is on one frame of a keyed transition. See {@link joinFrame}. */
78
+ export interface JoinFrame<S> {
79
+ /** Its state: `data`'s, `to`'s, or the two blended by the update stage. */
80
+ state: S;
81
+ /** 0..1 presence: `1 − exit` while leaving, `enter` while arriving, else 1. */
82
+ presence: number;
83
+ /** The end its datum is read from: the nearer one while it updates. */
84
+ end: JoinEnd;
85
+ /** That datum's index in its end's data. */
86
+ index: number;
87
+ /**
88
+ * While an axis changes kind, for a key in both ends mid-update: each end's
89
+ * own state and the update progress, so the mark can blend them in scene
90
+ * units; `state` is then only the data-unit blend.
91
+ */
92
+ pair?: {
93
+ a: S;
94
+ b: S;
95
+ u: number;
96
+ };
97
+ }
98
+ /**
99
+ * One key's frame: in both ends it blends from `a` to `b` on the update
100
+ * stage; only in `data` it stays at `a` as presence falls; only in `to` it
101
+ * stands at `b` as presence rises. Marks spend `presence` like their reveal
102
+ * spends `progress`, so exit is the reveal reversed.
103
+ *
104
+ * @param blend - Blends two states at update progress `u`.
105
+ * @param key - The key, so an entering one reads its staggered enter.
106
+ * @param pair - Keep both ends' states mid-swap: pass `space.swapping`.
107
+ * @returns The frame, or undefined when neither end has the key.
108
+ */
109
+ export declare function joinFrame<S>(join: JoinState, a: {
110
+ state: S;
111
+ index: number;
112
+ } | undefined, b: {
113
+ state: S;
114
+ index: number;
115
+ } | undefined, blend: (a: S, b: S, u: number) => S, key?: BandKey, pair?: boolean): JoinFrame<S> | undefined;
116
+ /** One update's keyed data: the join, plus where each key's datum is at each end. */
117
+ export interface KeyedData extends JoinState {
118
+ /** Each `to` datum's category, with a `series` and a transition. */
119
+ toOf: Category[] | undefined;
120
+ /** A key's datum index in `data`, or -1 (entering). */
121
+ fromIndex(key: BandKey): number;
122
+ /** A key's datum index in `to`, or -1 (leaving, or no transition). */
123
+ toIndex(key: BandKey): number;
124
+ }
125
+ /** What {@link createKeyedData}'s function takes on each update. */
126
+ export interface KeyedDataSpec<T> {
127
+ data: readonly T[];
128
+ to: readonly T[] | undefined;
129
+ key: Channel<T, BandKey> | undefined;
130
+ series: Channel<T, BandKey> | undefined;
131
+ /** `data`'s categories (the `series` channel read across it), if any. */
132
+ of: readonly Category[] | undefined;
133
+ /** The indices a dataset draws, in draw order; defaults to all. */
134
+ drawn?: (data: readonly T[]) => readonly number[];
135
+ blend: number | undefined;
136
+ staging: JoinStaging | undefined;
137
+ chartStages?: JoinStages | undefined;
138
+ more?: {
139
+ enters?: boolean;
140
+ exits?: boolean;
141
+ } | undefined;
142
+ enterStagger?: number | undefined;
143
+ /** As {@link JoinSpec.enterRanks}, also given each entering key's index in `to`. */
144
+ enterRanks?: (entering: readonly BandKey[], join: KeyedJoin, toIndex: (key: BandKey) => number) => readonly number[];
145
+ /** The chart's date sink, for channels reading dates. */
146
+ dates?: DateSink | null;
147
+ }
148
+ /**
149
+ * The keyed join of a per-datum mark (dots, stems, error bars, ticks): each
150
+ * end's keys (the `key` channel, else place within series, else index),
151
+ * restricted to what the mark draws. Call once, in `setup`; call the result
152
+ * in each `update`, draw its `keys` and read each key's frame with
153
+ * {@link joinFrame} (or all of them with {@link joinFrames}).
154
+ */
155
+ export declare function createKeyedData<T>(): (spec: KeyedDataSpec<T>) => KeyedData;
156
+ /**
157
+ * Every key's {@link joinFrame} for a per-datum mark, in key order.
158
+ * `stateOf(end, index)` reads one end's datum, or undefined where it draws
159
+ * nothing.
160
+ *
161
+ * @param pair - Mid-swap, keep both ends' states (`space.swapping`).
162
+ */
163
+ export declare function joinFrames<S>(keyed: KeyedData, stateOf: (end: JoinEnd, index: number) => S | undefined, blend: (a: S, b: S, u: number) => S, pair?: boolean): Map<BandKey, JoinFrame<S>>;
164
+ /** Each key's place in a per-datum mark's reveal order: `data`'s keys, then those only in `to`. */
165
+ export declare function keyRanks(keys: readonly BandKey[]): Map<BandKey, number>;
166
+ /**
167
+ * A layer's `transition` report: the far end's extents, the blend and what
168
+ * the join contains. Undefined without a transition.
169
+ *
170
+ * @param far - The `to` data's extents (omit axes the layer doesn't report),
171
+ * and `enters` / `exits` when the layer decides them rather than the join.
172
+ */
173
+ export declare function layerTransition(join: JoinState, staging: JoinStaging | undefined, far: {
174
+ x?: AxisExtent;
175
+ y?: AxisExtent;
176
+ enters?: boolean;
177
+ exits?: boolean;
178
+ }): LayerTransition | undefined;
179
+ /**
180
+ * A layer's `color` report across a keyed transition: both ends' categories,
181
+ * `data`'s first (so colours hold still), with each end's as `ends` (so the
182
+ * legend fades entries). Otherwise the report as given.
183
+ */
184
+ export declare function transitionColor(own: ColorExtent | undefined, toCategories: readonly Category[] | undefined): ColorExtent | undefined;
185
+ /** The keyed join of a grouped mark (one shape per `series` category, or one {@link WHOLE} shape). */
186
+ export interface GroupJoin extends JoinState {
187
+ /** Every group to draw: both ends' while a transition runs (`data`'s first), else `data`'s. */
188
+ groups: readonly GroupKey[];
189
+ /** The categories `to` draws (its groups, less {@link WHOLE}), while a transition runs. */
190
+ toCategories: readonly BandKey[] | undefined;
191
+ /** Whether a group is only in `to`: it enters, on the enter stage. */
192
+ entering(key: GroupKey): boolean;
193
+ /** A group's fade: `1 − exit` for one only `data` has (it leaves), else 1. */
194
+ fade(key: GroupKey): number;
195
+ }
196
+ /** What {@link createGroupJoin}'s function takes on each update. */
197
+ export interface GroupJoinSpec {
198
+ fromGroups: readonly GroupKey[];
199
+ toGroups: readonly GroupKey[] | undefined;
200
+ blend: number | undefined;
201
+ staging: JoinStaging | undefined;
202
+ chartStages?: JoinStages | undefined;
203
+ enterStagger?: number | undefined;
204
+ enterRanks?: (entering: readonly BandKey[], join: KeyedJoin) => readonly number[];
205
+ }
206
+ /**
207
+ * The keyed join of a grouped mark: groups matched by category. A group in
208
+ * both ends morphs on the update stage, one only in `to` enters, one only
209
+ * in `data` exits. Without `to`, `groups` is `data`'s and every stage reads
210
+ * 0. Call once, in `setup`.
211
+ */
212
+ export declare function createGroupJoin(): (spec: GroupJoinSpec) => GroupJoin;
213
+ /**
214
+ * An entering shape swept in along x (along y when `vertical`): its lines
215
+ * and rings cut at the front `enter` of the way across their extent.
216
+ */
217
+ export declare function sweepIn(shape: {
218
+ lines: readonly (readonly Point[])[];
219
+ rings: readonly (readonly Point[])[];
220
+ }, enter: number, vertical?: boolean): {
221
+ lines: Point[][];
222
+ rings: Point[][];
223
+ };
224
+ //# sourceMappingURL=join.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../src/join.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEzD,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
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 3D bar geometry: one box per index, anchored at `(x, y, z)` (not centred)
3
+ * and extended by `(width, height, depth)`. Each extent is a number for
4
+ * every bar or one per bar; arrays pair by index up to the shortest.
5
+ */
6
+ /** @category Math */
7
+ export interface BarSlotBox3D {
8
+ /** Index into the input arrays, keeping a `colors` array aligned past dropped entries. */
9
+ index: number;
10
+ x0: number;
11
+ x1: number;
12
+ y0: number;
13
+ y1: number;
14
+ z0: number;
15
+ z1: number;
16
+ }
17
+ /**
18
+ * One box per index: anchored at `(xs[i], ys[i], zs[i])` and extended by
19
+ * that index's `(width, height, depth)`. Negative extents still give a
20
+ * well-formed box; non-finite components drop the entry.
21
+ *
22
+ * @param widths - Extent along x: one number for every bar, or one per bar.
23
+ * @param heights - Extent along y: one number for every bar, or one per bar.
24
+ * @param depths - Extent along z: one number for every bar, or one per bar.
25
+ * @category Math & helpers
26
+ */
27
+ export declare function bar3dSlots(xs: readonly number[], ys: readonly number[], zs: readonly number[], widths: number | readonly number[], heights: number | readonly number[], depths: number | readonly number[]): BarSlotBox3D[];
28
+ //# sourceMappingURL=bar3d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar3d.d.ts","sourceRoot":"","sources":["../../../src/math/3d/bar3d.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,qBAAqB;AACrB,MAAM,WAAW,YAAY;IAC5B,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACX;AAcD;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACzB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EAClC,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EACnC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAChC,YAAY,EAAE,CAoChB"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 3D vector field geometry: one arrow per index, tail at `(x, y, z)`,
3
+ * direction and length `(u, v, w) * scale` (not normalised; pre-normalise
4
+ * the components for equal lengths).
5
+ */
6
+ import type { Point3 } from "@sophistry/core/internal";
7
+ /** @category Math */
8
+ export interface QuiverVector3 {
9
+ /** Index into the input arrays, keeping a `colors` array aligned past dropped entries. */
10
+ index: number;
11
+ origin: Point3;
12
+ vector: Point3;
13
+ }
14
+ /** @category Math */
15
+ export interface QuiverOptions {
16
+ /** Multiplies `(u, v, w)` before it becomes the drawn vector. @default 1 */
17
+ scale?: number;
18
+ }
19
+ /**
20
+ * One vector per finite `(x, y, z, u, v, w)`, keeping its index; the six
21
+ * arrays pair by index.
22
+ *
23
+ * @param us - Vector x component, in data units (before `scale`).
24
+ * @category Math & helpers
25
+ */
26
+ export declare function quiverVectors(xs: readonly number[], ys: readonly number[], zs: readonly number[], us: readonly number[], vs: readonly number[], ws: readonly number[], options?: QuiverOptions): QuiverVector3[];
27
+ //# sourceMappingURL=quiver3d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quiver3d.d.ts","sourceRoot":"","sources":["../../../src/math/3d/quiver3d.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGvD,qBAAqB;AACrB,MAAM,WAAW,aAAa;IAC7B,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf;AAED,qBAAqB;AACrB,MAAM,WAAW,aAAa;IAC7B,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAID;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,OAAO,GAAE,aAAkB,GACzB,aAAa,EAAE,CA0BjB"}
@@ -0,0 +1,16 @@
1
+ /** 3D scatter geometry: one marker per finite `(x, y, z)` triple. */
2
+ /** @category Math */
3
+ export interface ScatterPoint3 {
4
+ /** Index into the input arrays, keeping `sizes`/`colors` aligned past dropped triples. */
5
+ index: number;
6
+ x: number;
7
+ y: number;
8
+ z: number;
9
+ }
10
+ /**
11
+ * The finite `(x, y, z)` triples, paired by index, each keeping its index.
12
+ *
13
+ * @category Math & helpers
14
+ */
15
+ export declare function scatterPoints3(xs: readonly number[], ys: readonly number[], zs: readonly number[]): ScatterPoint3[];
16
+ //# sourceMappingURL=scatter3d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scatter3d.d.ts","sourceRoot":"","sources":["../../../src/math/3d/scatter3d.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAIrE,qBAAqB;AACrB,MAAM,WAAW,aAAa;IAC7B,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC7B,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,GACnB,aAAa,EAAE,CAajB"}
@@ -0,0 +1,23 @@
1
+ /** 3D stem geometry: a drop line along world y (up) from `baseline`, and a marker, per finite `(x, y, z)`. */
2
+ import type { Point3 } from "@sophistry/core/internal";
3
+ /** @category Math */
4
+ export interface StemPoint3 {
5
+ /** Index into the input arrays, keeping a `colors` array aligned past dropped triples. */
6
+ index: number;
7
+ /** `(x, baseline, z) → (x, y, z)`, in data coordinates. */
8
+ drop: [Point3, Point3];
9
+ marker: Point3;
10
+ }
11
+ /** @category Math */
12
+ export interface Stem3DOptions {
13
+ /** The y (height) value each drop line starts from. @default 0 */
14
+ baseline?: number;
15
+ }
16
+ /**
17
+ * One drop line and marker per finite `(x, y, z)`, paired by index.
18
+ *
19
+ * @param ys - Heights; the drop runs along this axis.
20
+ * @category Math & helpers
21
+ */
22
+ export declare function stemPoints3(xs: readonly number[], ys: readonly number[], zs: readonly number[], options?: Stem3DOptions): StemPoint3[];
23
+ //# sourceMappingURL=stem3d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stem3d.d.ts","sourceRoot":"","sources":["../../../src/math/3d/stem3d.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAE9G,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGvD,qBAAqB;AACrB,MAAM,WAAW,UAAU;IAC1B,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,qBAAqB;AACrB,MAAM,WAAW,aAAa;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAID;;;;;GAKG;AACH,wBAAgB,WAAW,CAC1B,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,OAAO,GAAE,aAAkB,GACzB,UAAU,EAAE,CAsBd"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Structured-grid surfaces: `X`, `Y`, `Z` are three `nrows x ncols` arrays of
3
+ * world coordinates for one grid of points, computed by the caller. Quads
4
+ * are wound so `MeshFaces` sees them facing outward. Mismatched grid
5
+ * shapes throw.
6
+ */
7
+ import type { Point3 } from "@sophistry/core/internal";
8
+ /** @category Math */
9
+ export interface SurfaceGridFace {
10
+ points: Point3[];
11
+ }
12
+ /**
13
+ * A rectangular grid of numbers (rows of columns).
14
+ *
15
+ * @category Math & helpers
16
+ */
17
+ export type SurfaceGrid = readonly (readonly number[])[];
18
+ /**
19
+ * One outward-wound quad per grid cell, `(nrows - 1) * (ncols - 1)` total.
20
+ *
21
+ * @param X - World x of each grid point, `X[row][col]`.
22
+ * @throws If the three grids differ in row count or any row's length.
23
+ * @category Math & helpers
24
+ */
25
+ export declare function surfaceGridFaces(X: SurfaceGrid, Y: SurfaceGrid, Z: SurfaceGrid): SurfaceGridFace[];
26
+ /**
27
+ * One polyline per grid row plus one per column: the wireframe.
28
+ *
29
+ * @param X - World x of each grid point, `X[row][col]`.
30
+ * @throws If the three grids differ in row count or any row's length.
31
+ * @category Math & helpers
32
+ */
33
+ export declare function surfaceGridWireframe(X: SurfaceGrid, Y: SurfaceGrid, Z: SurfaceGrid): Point3[][];
34
+ //# sourceMappingURL=surfaceGrid3d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaceGrid3d.d.ts","sourceRoot":"","sources":["../../../src/math/3d/surfaceGrid3d.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,qBAAqB;AACrB,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;AAuCzD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,WAAW,GACZ,eAAe,EAAE,CAcnB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,WAAW,GACZ,MAAM,EAAE,EAAE,CAgBZ"}
@@ -0,0 +1,12 @@
1
+ /** Triangulated surface faces: the xy-plane Delaunay triangulation, lifted to each point's `z`. */
2
+ import type { Point3 } from "@sophistry/core/internal";
3
+ /**
4
+ * The xy-plane Delaunay triangles, each as 3 world points with `zs` as height.
5
+ *
6
+ * @param zs - Heights per point; triangles with a non-finite height are skipped.
7
+ * @category Math & helpers
8
+ */
9
+ export declare function trisurfaceFaces(xs: readonly number[], ys: readonly number[], zs: readonly number[]): {
10
+ points: Point3[];
11
+ }[];
12
+ //# sourceMappingURL=trisurface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trisurface.d.ts","sourceRoot":"","sources":["../../../src/math/3d/trisurface.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGvD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC9B,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,GACnB;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,CAkBxB"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Boolean voxel grid geometry: each `true` `filled[i][j][k]` occupies the unit
3
+ * cube `[i, i+1] x [j, j+1] x [k, k+1]`; ragged or missing entries are empty.
4
+ * Only exposed faces are emitted (faces between two filled voxels are
5
+ * culled), wound counter-clockwise from outside.
6
+ */
7
+ import type { Point3 } from "@sophistry/core/internal";
8
+ /** @category Math */
9
+ export interface VoxelFace {
10
+ points: Point3[];
11
+ }
12
+ /**
13
+ * One quad per exposed face of every filled voxel.
14
+ *
15
+ * @category Math & helpers
16
+ */
17
+ export declare function voxelFaces(filled: readonly (readonly (readonly boolean[])[])[]): VoxelFace[];
18
+ //# sourceMappingURL=voxels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voxels.d.ts","sourceRoot":"","sources":["../../../src/math/3d/voxels.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,qBAAqB;AACrB,MAAM,WAAW,SAAS;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAYD;;;;GAIG;AACH,wBAAgB,UAAU,CACzB,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAClD,SAAS,EAAE,CA2Cb"}