@pibbl/core 0.0.1 → 0.0.3-alpha.85.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 (374) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.txt +81 -0
  3. package/dist/features/machines/animation.d.ts +64 -0
  4. package/dist/features/machines/animation.js +55 -0
  5. package/dist/features/machines/animation.js.map +7 -0
  6. package/dist/features/machines/animation.mjs +1 -0
  7. package/dist/features/machines/assign.d.ts +16 -0
  8. package/dist/features/machines/assign.js +15 -0
  9. package/dist/features/machines/assign.js.map +7 -0
  10. package/dist/features/machines/callback.d.ts +9 -0
  11. package/dist/features/machines/callback.js +7 -0
  12. package/dist/features/machines/callback.js.map +7 -0
  13. package/dist/features/machines/hook.d.ts +30 -0
  14. package/dist/features/machines/hook.js +37 -0
  15. package/dist/features/machines/hook.js.map +7 -0
  16. package/dist/features/machines/index.d.ts +6 -0
  17. package/dist/features/machines/index.js +12 -0
  18. package/dist/features/machines/index.js.map +7 -0
  19. package/dist/features/machines/index.mjs +1 -0
  20. package/dist/features/machines/runtime.d.ts +18 -0
  21. package/dist/features/machines/runtime.js +363 -0
  22. package/dist/features/machines/runtime.js.map +7 -0
  23. package/dist/features/machines/types.d.ts +164 -0
  24. package/dist/features/physics/2d-geometry.d.ts +3 -3
  25. package/dist/features/physics/2d-geometry.js.map +1 -1
  26. package/dist/features/physics/2d.d.ts +115 -62
  27. package/dist/features/physics/2d.js +59 -28
  28. package/dist/features/physics/2d.js.map +2 -2
  29. package/dist/features/physics/lib/2d/query-types.d.ts +6 -0
  30. package/dist/features/physics/lib/2d/runtime/controller.d.ts +7 -6
  31. package/dist/features/physics/lib/2d/runtime/controller.js.map +2 -2
  32. package/dist/features/physics/lib/2d/types.d.ts +8 -30
  33. package/dist/features/physics/lib/2d/world/queries.d.ts +7 -6
  34. package/dist/features/physics/lib/2d/world/queries.js.map +2 -2
  35. package/dist/features/sprites/formats/aseprite.d.ts +5 -0
  36. package/dist/features/sprites/formats/texture-packer.d.ts +5 -0
  37. package/dist/features/sprites/index.d.ts +6 -0
  38. package/dist/features/sprites/loader.d.ts +25 -0
  39. package/dist/features/sprites/model.d.ts +75 -0
  40. package/dist/features/sprites/sprite.d.ts +22 -0
  41. package/dist/features/textures/index.d.ts +12 -2
  42. package/dist/features/textures/index.js +33 -1
  43. package/dist/features/textures/index.js.map +2 -2
  44. package/dist/features/textures/lib/chemical-field.d.ts +56 -0
  45. package/dist/features/textures/lib/chemical-field.js +154 -0
  46. package/dist/features/textures/lib/chemical-field.js.map +7 -0
  47. package/dist/features/textures/lib/chemical-recipes.d.ts +119 -0
  48. package/dist/features/textures/lib/chemical-recipes.js +275 -0
  49. package/dist/features/textures/lib/chemical-recipes.js.map +7 -0
  50. package/dist/features/textures/lib/definitions.d.ts +3 -18
  51. package/dist/features/textures/lib/definitions.js +15 -20
  52. package/dist/features/textures/lib/definitions.js.map +2 -2
  53. package/dist/features/textures/lib/geometric-patterns.d.ts +149 -0
  54. package/dist/features/textures/lib/geometric-patterns.js +305 -0
  55. package/dist/features/textures/lib/geometric-patterns.js.map +7 -0
  56. package/dist/features/textures/lib/gray-scott.d.ts +55 -0
  57. package/dist/features/textures/lib/gray-scott.js +39 -0
  58. package/dist/features/textures/lib/gray-scott.js.map +7 -0
  59. package/dist/features/textures/lib/patterns.d.ts +123 -0
  60. package/dist/features/textures/lib/patterns.js +344 -0
  61. package/dist/features/textures/lib/patterns.js.map +7 -0
  62. package/dist/features/textures/lib/reaction-diffusion.d.ts +3 -2
  63. package/dist/features/textures/lib/reaction-diffusion.js +9 -20
  64. package/dist/features/textures/lib/reaction-diffusion.js.map +2 -2
  65. package/dist/features/textures/lib/simulation.d.ts +10 -4
  66. package/dist/features/textures/lib/simulation.js +23 -13
  67. package/dist/features/textures/lib/simulation.js.map +2 -2
  68. package/dist/features/viz/index.d.ts +79 -5
  69. package/dist/features/viz/index.js +145 -4
  70. package/dist/features/viz/index.js.map +2 -2
  71. package/dist/features/viz/inspection/bar.d.ts +79 -0
  72. package/dist/features/viz/inspection/bar.js +49 -0
  73. package/dist/features/viz/inspection/bar.js.map +7 -0
  74. package/dist/features/viz/inspection/candle.d.ts +156 -0
  75. package/dist/features/viz/inspection/candle.js +120 -0
  76. package/dist/features/viz/inspection/candle.js.map +7 -0
  77. package/dist/features/viz/inspection/capture-types.d.ts +65 -0
  78. package/dist/features/viz/inspection/capture.d.ts +16 -0
  79. package/dist/features/viz/inspection/capture.js +49 -0
  80. package/dist/features/viz/inspection/capture.js.map +7 -0
  81. package/dist/features/viz/inspection/handler.d.ts +36 -0
  82. package/dist/features/viz/inspection/handler.js +91 -0
  83. package/dist/features/viz/inspection/handler.js.map +7 -0
  84. package/dist/features/viz/inspection/ohlc-bar.d.ts +132 -0
  85. package/dist/features/viz/inspection/ohlc-bar.js +118 -0
  86. package/dist/features/viz/inspection/ohlc-bar.js.map +7 -0
  87. package/dist/features/viz/inspection/owned-ref.d.ts +16 -0
  88. package/dist/features/viz/inspection/owned-ref.js +99 -0
  89. package/dist/features/viz/inspection/owned-ref.js.map +7 -0
  90. package/dist/features/viz/inspection/painted-point.d.ts +22 -0
  91. package/dist/features/viz/inspection/painted-point.js +29 -0
  92. package/dist/features/viz/inspection/painted-point.js.map +7 -0
  93. package/dist/features/viz/inspection/queries.d.ts +100 -0
  94. package/dist/features/viz/inspection/queries.js +192 -0
  95. package/dist/features/viz/inspection/queries.js.map +7 -0
  96. package/dist/features/viz/inspection/query-types.d.ts +177 -0
  97. package/dist/features/viz/inspection/volume.d.ts +104 -0
  98. package/dist/features/viz/inspection/volume.js +95 -0
  99. package/dist/features/viz/inspection/volume.js.map +7 -0
  100. package/dist/features/viz/inspection.d.ts +19 -0
  101. package/dist/features/viz/inspection.js +54 -0
  102. package/dist/features/viz/inspection.js.map +7 -0
  103. package/dist/features/viz/inspection.mjs +1 -0
  104. package/dist/features/viz/lib/area-series.d.ts +62 -0
  105. package/dist/features/viz/lib/area-series.js +120 -0
  106. package/dist/features/viz/lib/area-series.js.map +7 -0
  107. package/dist/features/viz/lib/axis-labels.d.ts +2 -0
  108. package/dist/features/viz/lib/axis-labels.js +41 -0
  109. package/dist/features/viz/lib/axis-labels.js.map +7 -0
  110. package/dist/features/viz/lib/axis-title.d.ts +23 -0
  111. package/dist/features/viz/lib/axis-title.js +23 -0
  112. package/dist/features/viz/lib/axis-title.js.map +7 -0
  113. package/dist/features/viz/lib/axis.d.ts +1 -1
  114. package/dist/features/viz/lib/axis.js +50 -50
  115. package/dist/features/viz/lib/axis.js.map +2 -2
  116. package/dist/features/viz/lib/bar-scale.d.ts +7 -0
  117. package/dist/features/viz/lib/bar-scale.js +34 -0
  118. package/dist/features/viz/lib/bar-scale.js.map +7 -0
  119. package/dist/features/viz/lib/bar-series.d.ts +3 -1
  120. package/dist/features/viz/lib/bar-series.js +21 -5
  121. package/dist/features/viz/lib/bar-series.js.map +2 -2
  122. package/dist/features/viz/lib/baseline-series.d.ts +55 -0
  123. package/dist/features/viz/lib/baseline-series.js +136 -0
  124. package/dist/features/viz/lib/baseline-series.js.map +7 -0
  125. package/dist/features/viz/lib/candlestick-series.d.ts +62 -0
  126. package/dist/features/viz/lib/candlestick-series.js +150 -0
  127. package/dist/features/viz/lib/candlestick-series.js.map +7 -0
  128. package/dist/features/viz/lib/censored-point-series.d.ts +71 -0
  129. package/dist/features/viz/lib/censored-point-series.js +129 -0
  130. package/dist/features/viz/lib/censored-point-series.js.map +7 -0
  131. package/dist/features/viz/lib/chart-lines.d.ts +41 -0
  132. package/dist/features/viz/lib/chart-lines.js +32 -0
  133. package/dist/features/viz/lib/chart-lines.js.map +7 -0
  134. package/dist/features/viz/lib/color-context.d.ts +4 -0
  135. package/dist/features/viz/lib/color-context.js +41 -0
  136. package/dist/features/viz/lib/color-context.js.map +7 -0
  137. package/dist/features/viz/lib/color-math.d.ts +4 -0
  138. package/dist/features/viz/lib/color-math.js +31 -0
  139. package/dist/features/viz/lib/color-math.js.map +7 -0
  140. package/dist/features/viz/lib/color-types.d.ts +53 -0
  141. package/dist/features/viz/lib/curve-definition.d.ts +49 -0
  142. package/dist/features/viz/lib/curve-definition.js +148 -0
  143. package/dist/features/viz/lib/curve-definition.js.map +7 -0
  144. package/dist/features/viz/lib/diverging-color-scale.d.ts +11 -0
  145. package/dist/features/viz/lib/diverging-color-scale.js +51 -0
  146. package/dist/features/viz/lib/diverging-color-scale.js.map +7 -0
  147. package/dist/features/viz/lib/domain-navigation.d.ts +40 -0
  148. package/dist/features/viz/lib/domain-navigation.js +77 -0
  149. package/dist/features/viz/lib/domain-navigation.js.map +7 -0
  150. package/dist/features/viz/lib/editable-chart-elements.d.ts +178 -0
  151. package/dist/features/viz/lib/editable-chart-elements.js +733 -0
  152. package/dist/features/viz/lib/editable-chart-elements.js.map +7 -0
  153. package/dist/features/viz/lib/financial-aggregation.d.ts +127 -0
  154. package/dist/features/viz/lib/financial-aggregation.js +116 -0
  155. package/dist/features/viz/lib/financial-aggregation.js.map +7 -0
  156. package/dist/features/viz/lib/financial-autoscale.d.ts +64 -0
  157. package/dist/features/viz/lib/financial-autoscale.js +61 -0
  158. package/dist/features/viz/lib/financial-autoscale.js.map +7 -0
  159. package/dist/features/viz/lib/financial-comparison.d.ts +62 -0
  160. package/dist/features/viz/lib/financial-comparison.js +98 -0
  161. package/dist/features/viz/lib/financial-comparison.js.map +7 -0
  162. package/dist/features/viz/lib/financial-geometry.d.ts +77 -0
  163. package/dist/features/viz/lib/financial-geometry.js +67 -0
  164. package/dist/features/viz/lib/financial-geometry.js.map +7 -0
  165. package/dist/features/viz/lib/financial-indicators.d.ts +114 -0
  166. package/dist/features/viz/lib/financial-indicators.js +135 -0
  167. package/dist/features/viz/lib/financial-indicators.js.map +7 -0
  168. package/dist/features/viz/lib/financial-oscillators.d.ts +171 -0
  169. package/dist/features/viz/lib/financial-oscillators.js +265 -0
  170. package/dist/features/viz/lib/financial-oscillators.js.map +7 -0
  171. package/dist/features/viz/lib/hover-data.d.ts +1 -1
  172. package/dist/features/viz/lib/hover-data.js +6 -3
  173. package/dist/features/viz/lib/hover-data.js.map +2 -2
  174. package/dist/features/viz/lib/hover-types.d.ts +5 -5
  175. package/dist/features/viz/lib/interval-band-series.d.ts +49 -0
  176. package/dist/features/viz/lib/interval-band-series.js +136 -0
  177. package/dist/features/viz/lib/interval-band-series.js.map +7 -0
  178. package/dist/features/viz/lib/interval-diamond-series.d.ts +43 -0
  179. package/dist/features/viz/lib/interval-diamond-series.js +124 -0
  180. package/dist/features/viz/lib/interval-diamond-series.js.map +7 -0
  181. package/dist/features/viz/lib/interval-series.d.ts +79 -0
  182. package/dist/features/viz/lib/interval-series.js +158 -0
  183. package/dist/features/viz/lib/interval-series.js.map +7 -0
  184. package/dist/features/viz/lib/line-series.d.ts +1 -1
  185. package/dist/features/viz/lib/line-series.js +47 -28
  186. package/dist/features/viz/lib/line-series.js.map +2 -2
  187. package/dist/features/viz/lib/linear-scale-component.d.ts +7 -0
  188. package/dist/features/viz/lib/linear-scale-component.js +18 -0
  189. package/dist/features/viz/lib/linear-scale-component.js.map +7 -0
  190. package/dist/features/viz/lib/linear-scale.js +1 -1
  191. package/dist/features/viz/lib/linear-scale.js.map +2 -2
  192. package/dist/features/viz/lib/log-scale-component.d.ts +7 -0
  193. package/dist/features/viz/lib/log-scale-component.js +19 -0
  194. package/dist/features/viz/lib/log-scale-component.js.map +7 -0
  195. package/dist/features/viz/lib/log-scale.d.ts +2 -0
  196. package/dist/features/viz/lib/log-scale.js +53 -0
  197. package/dist/features/viz/lib/log-scale.js.map +7 -0
  198. package/dist/features/viz/lib/monotone-curve.d.ts +11 -0
  199. package/dist/features/viz/lib/monotone-curve.js +63 -0
  200. package/dist/features/viz/lib/monotone-curve.js.map +7 -0
  201. package/dist/features/viz/lib/nearest.d.ts +9 -9
  202. package/dist/features/viz/lib/nearest.js.map +1 -1
  203. package/dist/features/viz/lib/numeric-range-interpolation.d.ts +15 -0
  204. package/dist/features/viz/lib/numeric-range-interpolation.js +36 -0
  205. package/dist/features/viz/lib/numeric-range-interpolation.js.map +7 -0
  206. package/dist/features/viz/lib/numeric-ticks.d.ts +38 -0
  207. package/dist/features/viz/lib/numeric-ticks.js +54 -0
  208. package/dist/features/viz/lib/numeric-ticks.js.map +7 -0
  209. package/dist/features/viz/lib/ohlc-bar-series.d.ts +55 -0
  210. package/dist/features/viz/lib/ohlc-bar-series.js +168 -0
  211. package/dist/features/viz/lib/ohlc-bar-series.js.map +7 -0
  212. package/dist/features/viz/lib/paired-series.d.ts +44 -0
  213. package/dist/features/viz/lib/paired-series.js +93 -0
  214. package/dist/features/viz/lib/paired-series.js.map +7 -0
  215. package/dist/features/viz/lib/plot-series.js +11 -6
  216. package/dist/features/viz/lib/plot-series.js.map +2 -2
  217. package/dist/features/viz/lib/plot-types.d.ts +4 -3
  218. package/dist/features/viz/lib/point-scale-component.d.ts +7 -0
  219. package/dist/features/viz/lib/point-scale-component.js +19 -0
  220. package/dist/features/viz/lib/point-scale-component.js.map +7 -0
  221. package/dist/features/viz/lib/point-scale.d.ts +2 -0
  222. package/dist/features/viz/lib/point-scale.js +45 -0
  223. package/dist/features/viz/lib/point-scale.js.map +7 -0
  224. package/dist/features/viz/lib/point-series.d.ts +1 -1
  225. package/dist/features/viz/lib/point-series.js +36 -9
  226. package/dist/features/viz/lib/point-series.js.map +2 -2
  227. package/dist/features/viz/lib/point-types.d.ts +5 -2
  228. package/dist/features/viz/lib/reference-band.d.ts +16 -0
  229. package/dist/features/viz/lib/reference-band.js +27 -0
  230. package/dist/features/viz/lib/reference-band.js.map +7 -0
  231. package/dist/features/viz/lib/scale-adjust.js +9 -4
  232. package/dist/features/viz/lib/scale-adjust.js.map +2 -2
  233. package/dist/features/viz/lib/scale-context.d.ts +5 -4
  234. package/dist/features/viz/lib/scale-context.js +15 -11
  235. package/dist/features/viz/lib/scale-context.js.map +2 -2
  236. package/dist/features/viz/lib/scale-provider.d.ts +2 -0
  237. package/dist/features/viz/lib/scale-provider.js +13 -0
  238. package/dist/features/viz/lib/scale-provider.js.map +7 -0
  239. package/dist/features/viz/lib/scale-ticks.d.ts +5 -0
  240. package/dist/features/viz/lib/scale-ticks.js +64 -0
  241. package/dist/features/viz/lib/scale-ticks.js.map +7 -0
  242. package/dist/features/viz/lib/scale-view.d.ts +4 -0
  243. package/dist/features/viz/lib/scale-view.js +21 -0
  244. package/dist/features/viz/lib/scale-view.js.map +7 -0
  245. package/dist/features/viz/lib/sequential-color-scale.d.ts +11 -0
  246. package/dist/features/viz/lib/sequential-color-scale.js +49 -0
  247. package/dist/features/viz/lib/sequential-color-scale.js.map +7 -0
  248. package/dist/features/viz/lib/series-position.d.ts +12 -0
  249. package/dist/features/viz/lib/series-position.js +44 -0
  250. package/dist/features/viz/lib/series-position.js.map +7 -0
  251. package/dist/features/viz/lib/step-curves.d.ts +19 -0
  252. package/dist/features/viz/lib/step-curves.js +53 -0
  253. package/dist/features/viz/lib/step-curves.js.map +7 -0
  254. package/dist/features/viz/lib/symlog-scale-component.d.ts +7 -0
  255. package/dist/features/viz/lib/symlog-scale-component.js +19 -0
  256. package/dist/features/viz/lib/symlog-scale-component.js.map +7 -0
  257. package/dist/features/viz/lib/symlog-scale.d.ts +2 -0
  258. package/dist/features/viz/lib/symlog-scale.js +38 -0
  259. package/dist/features/viz/lib/symlog-scale.js.map +7 -0
  260. package/dist/features/viz/lib/threshold-color-scale.d.ts +43 -0
  261. package/dist/features/viz/lib/threshold-color-scale.js +59 -0
  262. package/dist/features/viz/lib/threshold-color-scale.js.map +7 -0
  263. package/dist/features/viz/lib/trading-time-mapping.d.ts +32 -0
  264. package/dist/features/viz/lib/trading-time-mapping.js +89 -0
  265. package/dist/features/viz/lib/trading-time-mapping.js.map +7 -0
  266. package/dist/features/viz/lib/trading-time-scale.d.ts +83 -0
  267. package/dist/features/viz/lib/trading-time-scale.js +96 -0
  268. package/dist/features/viz/lib/trading-time-scale.js.map +7 -0
  269. package/dist/features/viz/lib/trajectory-series.d.ts +71 -0
  270. package/dist/features/viz/lib/trajectory-series.js +111 -0
  271. package/dist/features/viz/lib/trajectory-series.js.map +7 -0
  272. package/dist/features/viz/lib/types.d.ts +114 -21
  273. package/dist/features/viz/lib/use-bar-scale.d.ts +8 -0
  274. package/dist/features/viz/lib/use-bar-scale.js +9 -0
  275. package/dist/features/viz/lib/use-bar-scale.js.map +7 -0
  276. package/dist/features/viz/lib/use-continuous-scale.d.ts +8 -0
  277. package/dist/features/viz/lib/use-continuous-scale.js +14 -0
  278. package/dist/features/viz/lib/use-continuous-scale.js.map +7 -0
  279. package/dist/features/viz/lib/use-linear-scale.d.ts +8 -0
  280. package/dist/features/viz/lib/use-linear-scale.js +9 -0
  281. package/dist/features/viz/lib/use-linear-scale.js.map +7 -0
  282. package/dist/features/viz/lib/use-log-scale.d.ts +8 -0
  283. package/dist/features/viz/lib/use-log-scale.js +9 -0
  284. package/dist/features/viz/lib/use-log-scale.js.map +7 -0
  285. package/dist/features/viz/lib/use-point-scale.d.ts +8 -0
  286. package/dist/features/viz/lib/use-point-scale.js +9 -0
  287. package/dist/features/viz/lib/use-point-scale.js.map +7 -0
  288. package/dist/features/viz/lib/use-symlog-scale.d.ts +8 -0
  289. package/dist/features/viz/lib/use-symlog-scale.js +9 -0
  290. package/dist/features/viz/lib/use-symlog-scale.js.map +7 -0
  291. package/dist/features/viz/lib/use-utc-scale.d.ts +8 -0
  292. package/dist/features/viz/lib/use-utc-scale.js +9 -0
  293. package/dist/features/viz/lib/use-utc-scale.js.map +7 -0
  294. package/dist/features/viz/lib/utc-labels.d.ts +12 -0
  295. package/dist/features/viz/lib/utc-labels.js +27 -0
  296. package/dist/features/viz/lib/utc-labels.js.map +7 -0
  297. package/dist/features/viz/lib/utc-scale-component.d.ts +7 -0
  298. package/dist/features/viz/lib/utc-scale-component.js +18 -0
  299. package/dist/features/viz/lib/utc-scale-component.js.map +7 -0
  300. package/dist/features/viz/lib/utc-scale.d.ts +21 -0
  301. package/dist/features/viz/lib/utc-scale.js +123 -0
  302. package/dist/features/viz/lib/utc-scale.js.map +7 -0
  303. package/dist/features/viz/lib/volume-series.d.ts +59 -0
  304. package/dist/features/viz/lib/volume-series.js +117 -0
  305. package/dist/features/viz/lib/volume-series.js.map +7 -0
  306. package/dist/features/viz/lib/weighted-point-series.d.ts +71 -0
  307. package/dist/features/viz/lib/weighted-point-series.js +169 -0
  308. package/dist/features/viz/lib/weighted-point-series.js.map +7 -0
  309. package/dist/filters/emboss-gpu.d.ts +4 -0
  310. package/dist/filters/emboss-gpu.js +39 -0
  311. package/dist/filters/emboss-gpu.js.map +7 -0
  312. package/dist/filters/emboss.d.ts +32 -0
  313. package/dist/filters/emboss.js +106 -0
  314. package/dist/filters/emboss.js.map +7 -0
  315. package/dist/filters/reflection-gpu.d.ts +3 -1
  316. package/dist/filters/reflection-gpu.js +5 -2
  317. package/dist/filters/reflection-gpu.js.map +2 -2
  318. package/dist/filters/render-emboss-boundary.d.ts +13 -0
  319. package/dist/filters/render-emboss-boundary.js +131 -0
  320. package/dist/filters/render-emboss-boundary.js.map +7 -0
  321. package/dist/filters.d.ts +2 -0
  322. package/dist/filters.js +2 -0
  323. package/dist/filters.js.map +2 -2
  324. package/dist/index.d.ts +3 -1
  325. package/dist/index.js +3 -0
  326. package/dist/index.js.map +2 -2
  327. package/dist/internal.d.ts +2 -0
  328. package/dist/internal.js +4 -0
  329. package/dist/internal.js.map +2 -2
  330. package/dist/lib/animation/definition.d.ts +5 -3
  331. package/dist/lib/animation/definition.js +29 -4
  332. package/dist/lib/animation/definition.js.map +2 -2
  333. package/dist/lib/animation/playback.d.ts +8 -0
  334. package/dist/lib/animation/playback.js +33 -11
  335. package/dist/lib/animation/playback.js.map +2 -2
  336. package/dist/lib/animation/spring.d.ts +3 -1
  337. package/dist/lib/animation/spring.js.map +2 -2
  338. package/dist/lib/animation/types.d.ts +29 -73
  339. package/dist/lib/events/event-facade.d.ts +13 -0
  340. package/dist/lib/events/event-facade.js +23 -0
  341. package/dist/lib/events/event-facade.js.map +2 -2
  342. package/dist/lib/events/propagation.js +19 -14
  343. package/dist/lib/events/propagation.js.map +2 -2
  344. package/dist/lib/execute-render.js +13 -0
  345. package/dist/lib/execute-render.js.map +2 -2
  346. package/dist/lib/hooks/use-animated-value.d.ts +11 -21
  347. package/dist/lib/hooks/use-animated-value.js +23 -70
  348. package/dist/lib/hooks/use-animated-value.js.map +3 -3
  349. package/dist/lib/hooks/use-playback.js +1 -0
  350. package/dist/lib/hooks/use-playback.js.map +2 -2
  351. package/dist/lib/recording/recording.d.ts +43 -0
  352. package/dist/lib/recording/recording.js +555 -0
  353. package/dist/lib/recording/recording.js.map +7 -0
  354. package/dist/lib/recording/types.d.ts +118 -0
  355. package/dist/lib/recording/wasm-bytes.d.ts +1 -0
  356. package/dist/lib/recording/wasm-bytes.js +5 -0
  357. package/dist/lib/recording/wasm-bytes.js.map +7 -0
  358. package/dist/lib/recording/worker-source.d.ts +1 -0
  359. package/dist/lib/recording/worker-source.js +5 -0
  360. package/dist/lib/recording/worker-source.js.map +7 -0
  361. package/dist/lib/render-transaction.d.ts +5 -2
  362. package/dist/lib/render-transaction.js +23 -1
  363. package/dist/lib/render-transaction.js.map +2 -2
  364. package/dist/lib/series-inspection-frame.d.ts +18 -0
  365. package/dist/lib/series-inspection-frame.js +70 -0
  366. package/dist/lib/series-inspection-frame.js.map +7 -0
  367. package/dist/lib/types.d.ts +6 -0
  368. package/package.json +27 -5
  369. package/dist/features/viz/lib/scale.d.ts +0 -11
  370. package/dist/features/viz/lib/scale.js +0 -80
  371. package/dist/features/viz/lib/scale.js.map +0 -7
  372. package/dist/features/viz/lib/use-scale.d.ts +0 -20
  373. package/dist/features/viz/lib/use-scale.js +0 -10
  374. package/dist/features/viz/lib/use-scale.js.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/features/textures/lib/reaction-diffusion.ts"],
4
- "sourcesContent": ["import { defineRenderLayer, type PibblRenderLayerInput } from \"@pibbl/core\";\nimport { TextureRaster, type TextureRenderer } from \"./presentation.js\";\nimport { InkSimulation } from \"./simulation.js\";\nimport {\n paletteLut,\n texturePalettes,\n validateResolution,\n validateSeed,\n type TexturePalette,\n type TextureResolution,\n} from \"./palette.js\";\n\n/**\n * Radius and strength of a reaction-diffusion brush stroke.\n *\n * @see {@link ReactionDiffusionProps}\n */\nexport interface TextureBrush {\n /** Radius in the coordinate system of this geometry or effect. See {@link TextureBrush}. */\n readonly radius: number;\n /** Magnitude of the displacement or brush effect. See {@link TextureBrush}. */\n readonly strength: number;\n}\n/**\n * Authored inputs for ReactionDiffusion, including the declared data and presentation options.\n *\n * @see {@link TextureRenderer}\n * @see {@link TextureResolution}\n * @see {@link TexturePalette}\n * @see {@link TextureBrush}\n * @see {@link ReactionDiffusion}\n */\nexport interface ReactionDiffusionProps {\n /**\n * Renders the current data or resources using the supplied context. See {@link TextureRenderer}\n * .\n */\n readonly render?: TextureRenderer;\n /** Dimensions of the simulation or raster grid. See {@link TextureResolution}. */\n readonly resolution?: TextureResolution;\n /**\n * Seed used for deterministic sampling or simulation initialization. See\n * {@link ReactionDiffusionProps}.\n */\n readonly seed?: number;\n /**\n * Named pattern configuration used to initialize the simulation. See\n * {@link ReactionDiffusionProps}.\n */\n readonly preset?: \"spots\" | \"stripes\";\n /** Ordered colors used to present texture intensity. See {@link TexturePalette}. */\n readonly palette?: TexturePalette;\n /**\n * Whether simulation or playback advancement is suspended. See {@link ReactionDiffusionProps}.\n */\n readonly paused?: boolean;\n /**\n * Changing this revision requests a fresh simulation initialization. See\n * {@link ReactionDiffusionProps}.\n */\n readonly resetRevision?: number;\n /**\n * Brush configuration for interactive reaction-diffusion input, or false to disable it. See\n * {@link TextureBrush}.\n */\n readonly brush?: TextureBrush | false;\n}\ninterface Options {\n resolution: TextureResolution;\n seed: number;\n preset: \"spots\" | \"stripes\";\n palette: TexturePalette;\n paused: boolean;\n resetRevision: number;\n brush: TextureBrush | false;\n}\nfunction options(props: ReactionDiffusionProps): Options {\n const preset = props.preset ?? \"spots\";\n if (preset !== \"spots\" && preset !== \"stripes\")\n throw new TypeError(\"Unknown reaction-diffusion preset.\");\n const brush = props.brush ?? { radius: 6, strength: 0.8 };\n if (\n brush &&\n (!Number.isFinite(brush.radius) ||\n brush.radius <= 0 ||\n brush.radius > 128 ||\n !Number.isFinite(brush.strength) ||\n brush.strength < 0 ||\n brush.strength > 1)\n )\n throw new RangeError(\n \"Brush radius must be in (0,128] and strength in [0,1].\",\n );\n if (!Number.isSafeInteger(props.resetRevision ?? 0))\n throw new RangeError(\"resetRevision must be a safe integer.\");\n return {\n resolution: validateResolution(props.resolution),\n seed: validateSeed(props.seed),\n preset,\n palette: [...(props.palette ?? texturePalettes.lagoon)],\n paused: props.paused ?? false,\n resetRevision: props.resetRevision ?? 0,\n brush: brush && { ...brush },\n };\n}\ninterface Stroke {\n x: number;\n y: number;\n radius: number;\n strength: number;\n}\ninterface Resources {\n render?: TextureRenderer;\n config: Options;\n simulation: InkSimulation;\n raster: TextureRaster;\n output: OffscreenCanvasRenderingContext2D;\n lut: Uint8ClampedArray;\n elapsed: number;\n fresh: boolean;\n dirty: boolean;\n disposed: boolean;\n target: object;\n strokes: Stroke[];\n pointer?: { id: number; x: number; y: number; release: () => void };\n invalidate: () => void;\n}\nfunction reset(r: Resources, config: Options) {\n const { width, height } = config.resolution;\n const simulation = new InkSimulation(\n width,\n height,\n config.seed,\n config.preset,\n );\n let raster: TextureRaster;\n try {\n raster = new TextureRaster(width, height);\n } catch (error) {\n simulation.dispose();\n throw error;\n }\n r.simulation.dispose();\n r.simulation = simulation;\n r.raster.dispose();\n r.raster = raster;\n r.strokes.length = 0;\n r.pointer?.release();\n r.pointer = undefined;\n r.elapsed = 0;\n r.fresh = true;\n r.dirty = true;\n}\nfunction input(\n r: Resources,\n event: Readonly<PibblRenderLayerInput<object>>,\n width: number,\n height: number,\n) {\n if (r.disposed) return;\n const original = event.originalEvent as PointerEvent;\n if (event.type === \"pointerup\" || event.type === \"pointercancel\") {\n if (r.pointer?.id === original.pointerId) {\n r.pointer.release();\n r.pointer = undefined;\n }\n return;\n }\n const brush = r.config.brush;\n if (!brush || width <= 0 || height <= 0) return;\n const x = (event.point.x / width) * r.simulation.width;\n const y = (event.point.y / height) * r.simulation.height;\n if (event.type === \"pointerdown\") {\n if (r.pointer || original.button !== 0 || original.isPrimary === false)\n return;\n event.setPointerCapture(original.pointerId);\n r.pointer = {\n id: original.pointerId,\n x,\n y,\n release: () => event.releasePointerCapture(original.pointerId),\n };\n } else if (\n event.type !== \"pointermove\" ||\n r.pointer?.id !== original.pointerId\n )\n return;\n const previous = r.pointer!;\n const distance = Math.hypot(x - previous.x, y - previous.y);\n // Bound work for off-surface capture. Stamps outside the field are ignored, never clamped to its edge.\n const count = Math.min(\n 4096,\n Math.max(1, Math.ceil(distance / Math.max(0.5, brush.radius * 0.3))),\n );\n for (let i = 1; i <= count; i++) {\n const px = previous.x + ((x - previous.x) * i) / count,\n py = previous.y + ((y - previous.y) * i) / count;\n if (\n px >= 0 &&\n py >= 0 &&\n px < r.simulation.width &&\n py < r.simulation.height &&\n r.strokes.length < 8192\n )\n r.strokes.push({ x: px, y: py, ...brush });\n }\n previous.x = x;\n previous.y = y;\n r.invalidate();\n}\n\n/**\n * An independently sized, persistent Gray\u2013Scott surface, advanced by Pibbl's scheduler.\n *\n * @param props - Authored component inputs, supplied through JSX or createElement. See the linked\n * props and style types.\n * @throws When called directly; Pibbl mounts this component through JSX or createElement.\n *\n * @see {@link ReactionDiffusionProps}\n */\nexport const ReactionDiffusion = /* @__PURE__ */ defineRenderLayer<\n ReactionDiffusionProps,\n Resources\n>({\n create(context, props) {\n const config = options(props),\n lut = paletteLut(config.palette);\n const output = context.canvas.getContext(\"2d\");\n if (!output) throw new Error(\"ReactionDiffusion requires Canvas 2D.\");\n const { width, height } = config.resolution;\n const raster = new TextureRaster(width, height);\n try {\n return {\n config,\n lut,\n raster,\n output,\n render: props.render,\n simulation: new InkSimulation(\n width,\n height,\n config.seed,\n config.preset,\n ),\n elapsed: 0,\n fresh: true,\n dirty: true,\n disposed: false,\n target: {},\n strokes: [],\n invalidate: context.invalidate,\n };\n } catch (error) {\n raster.dispose();\n throw error;\n }\n },\n update(r, props) {\n const next = options(props),\n old = r.config;\n if (next.palette.join() !== old.palette.join()) {\n r.lut = paletteLut(next.palette);\n r.dirty = true;\n }\n if (\n next.seed !== old.seed ||\n next.preset !== old.preset ||\n next.resetRevision !== old.resetRevision ||\n next.resolution.width !== old.resolution.width ||\n next.resolution.height !== old.resolution.height\n )\n reset(r, next);\n if (next.paused !== old.paused) {\n r.elapsed = 0;\n r.fresh = true;\n }\n if (!next.brush) {\n r.pointer?.release();\n r.pointer = undefined;\n }\n r.config = next;\n r.render = props.render;\n },\n render(r, frame, context) {\n // The frame invalidator does not gate the committed input snapshot between brush samples.\n r.invalidate = frame.invalidate;\n for (const stroke of r.strokes)\n r.simulation.paint(stroke.x, stroke.y, stroke.radius, stroke.strength);\n if (r.strokes.length) r.dirty = true;\n r.strokes.length = 0;\n if (!r.config.paused && !r.fresh) {\n r.elapsed += Math.max(0, Math.min(50, frame.delta));\n const steps = Math.min(24, Math.floor(r.elapsed * 0.48 + 1e-9));\n r.elapsed -= steps / 0.48;\n if (steps) {\n r.simulation.advance(steps);\n r.dirty = true;\n }\n }\n r.fresh = false;\n if (r.dirty) {\n r.raster.update(r.simulation.b, r.lut, 650 / 255);\n r.dirty = false;\n }\n r.raster.draw(\n r.output,\n context.size.width,\n context.size.height,\n context.size.backingWidth,\n context.size.backingHeight,\n r.render,\n );\n if (!r.config.paused) frame.invalidate();\n },\n interaction: {\n settle(r, _props, size) {\n return {\n targets: [\n {\n target: r.target,\n cursor: r.config.brush ? \"crosshair\" : \"default\",\n },\n ],\n hitTest: () => ({ kind: \"target\", target: r.target }),\n onInput: (event) => input(r, event, size.width, size.height),\n };\n },\n },\n dispose(r) {\n if (r.disposed) return;\n r.disposed = true;\n r.pointer?.release();\n r.pointer = undefined;\n r.strokes.length = 0;\n r.invalidate = () => {};\n r.simulation.dispose();\n r.raster.dispose();\n r.render = undefined;\n },\n});\n"],
5
- "mappings": "AAAA,SAAS,yBAAqD;AAC9D,SAAS,qBAA2C;AACpD,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAkEP,SAAS,QAAQ,OAAwC;AACvD,QAAM,SAAS,MAAM,UAAU;AAC/B,MAAI,WAAW,WAAW,WAAW;AACnC,UAAM,IAAI,UAAU,oCAAoC;AAC1D,QAAM,QAAQ,MAAM,SAAS,EAAE,QAAQ,GAAG,UAAU,IAAI;AACxD,MACE,UACC,CAAC,OAAO,SAAS,MAAM,MAAM,KAC5B,MAAM,UAAU,KAChB,MAAM,SAAS,OACf,CAAC,OAAO,SAAS,MAAM,QAAQ,KAC/B,MAAM,WAAW,KACjB,MAAM,WAAW;AAEnB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AACF,MAAI,CAAC,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAChD,UAAM,IAAI,WAAW,uCAAuC;AAC9D,SAAO;AAAA,IACL,YAAY,mBAAmB,MAAM,UAAU;AAAA,IAC/C,MAAM,aAAa,MAAM,IAAI;AAAA,IAC7B;AAAA,IACA,SAAS,CAAC,GAAI,MAAM,WAAW,gBAAgB,MAAO;AAAA,IACtD,QAAQ,MAAM,UAAU;AAAA,IACxB,eAAe,MAAM,iBAAiB;AAAA,IACtC,OAAO,SAAS,EAAE,GAAG,MAAM;AAAA,EAC7B;AACF;AAuBA,SAAS,MAAM,GAAc,QAAiB;AAC5C,QAAM,EAAE,OAAO,OAAO,IAAI,OAAO;AACjC,QAAM,aAAa,IAAI;AAAA,IACrB;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACA,MAAI;AACJ,MAAI;AACF,aAAS,IAAI,cAAc,OAAO,MAAM;AAAA,EAC1C,SAAS,OAAO;AACd,eAA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K;AAAA,MACb,QAAQ,KAAK;AAAA,MACb,QAAQ,KAAK;AAAA,MACb,EAAE;AAAA,IACJ;AACA,QAAI,CAAC,EAAE,OAAO,OAAQ,OAAM,WAAW;AAAA,EACzC;AAAA,EACA,aAAa;AAAA,IACX,OAAO,GAAG,QAAQ,MAAM;AACtB,aAAO;AAAA,QACL,SAAS;AAAA,UACP;AAAA,YACE,QAAQ,EAAE;AAAA,YACV,QAAQ,EAAE,OAAO,QAAQ,cAAc;AAAA,UACzC;AAAA,QACF;AAAA,QACA,SAAS,OAAO,EAAE,MAAM,UAAU,QAAQ,EAAE,OAAO;AAAA,QACnD,SAAS,CAAC,UAAU,MAAM,GAAG,OAAO,KAAK,OAAO,KAAK,MAAM;AAAA,MAC7D;AAAA,IACF;AAAA,EACF;AAAA,EACA,QAAQ,GAAG;AACT,QAAI,EAAE,SAAU;AAChB,MAAE,WAAW;AACb,MAAE,SAAS,QAAQ;AACnB,MAAE,UAAU;AACZ,MAAE,QAAQ,SAAS;AACnB,MAAE,aAAa,MAAM;AAAA,IAAC;AACtB,MAAE,WAAW,QAAQ;AACrB,MAAE,OAAO,QAAQ;AACjB,MAAE,SAAS;AAAA,EACb;AACF,CAAC;",
4
+ "sourcesContent": ["import {\n grayScottConfig,\n type ReactionDiffusionOptions,\n type ReactionDiffusionPreset,\n} from \"./gray-scott.js\";\nimport { defineRenderLayer, type PibblRenderLayerInput } from \"@pibbl/core\";\nimport { TextureRaster, type TextureRenderer } from \"./presentation.js\";\nimport { InkSimulation } from \"./simulation.js\";\nimport {\n paletteLut,\n texturePalettes,\n validateResolution,\n type TexturePalette,\n type TextureResolution,\n} from \"./palette.js\";\n\n/**\n * Radius and strength of a reaction-diffusion brush stroke.\n *\n * @see {@link ReactionDiffusionProps}\n */\nexport interface TextureBrush {\n /** Radius in the coordinate system of this geometry or effect. See {@link TextureBrush}. */\n readonly radius: number;\n /** Magnitude of the displacement or brush effect. See {@link TextureBrush}. */\n readonly strength: number;\n}\n/**\n * Authored inputs for ReactionDiffusion, including the declared data and presentation options.\n *\n * @see {@link TextureRenderer}\n * @see {@link TextureResolution}\n * @see {@link TexturePalette}\n * @see {@link TextureBrush}\n * @see {@link ReactionDiffusion}\n */\nexport interface ReactionDiffusionProps extends ReactionDiffusionOptions {\n /**\n * Renders the current data or resources using the supplied context. See {@link TextureRenderer}\n * .\n */\n readonly render?: TextureRenderer;\n /** Dimensions of the simulation or raster grid. See {@link TextureResolution}. */\n readonly resolution?: TextureResolution;\n /**\n * Seed used for deterministic sampling or simulation initialization. See\n * {@link ReactionDiffusionProps}.\n */\n readonly seed?: number;\n /**\n * Named pattern configuration used to initialize the simulation. See\n * {@link ReactionDiffusionProps}.\n */\n readonly preset?: ReactionDiffusionPreset;\n /** Ordered colors used to present texture intensity. See {@link TexturePalette}. */\n readonly palette?: TexturePalette;\n /**\n * Whether simulation or playback advancement is suspended. See {@link ReactionDiffusionProps}.\n */\n readonly paused?: boolean;\n /**\n * Changing this revision requests a fresh simulation initialization. See\n * {@link ReactionDiffusionProps}.\n */\n readonly resetRevision?: number;\n /**\n * Brush configuration for interactive reaction-diffusion input, or false to disable it. See\n * {@link TextureBrush}.\n */\n readonly brush?: TextureBrush | false;\n}\ninterface Options {\n resolution: TextureResolution;\n seed: number;\n preset: ReactionDiffusionPreset;\n feed: number;\n kill: number;\n warmupSteps: number;\n palette: TexturePalette;\n paused: boolean;\n resetRevision: number;\n brush: TextureBrush | false;\n}\nfunction options(props: ReactionDiffusionProps): Options {\n const chemistry = grayScottConfig(props);\n const brush = props.brush ?? { radius: 6, strength: 0.8 };\n if (\n brush &&\n (!Number.isFinite(brush.radius) ||\n brush.radius <= 0 ||\n brush.radius > 128 ||\n !Number.isFinite(brush.strength) ||\n brush.strength < 0 ||\n brush.strength > 1)\n )\n throw new RangeError(\n \"Brush radius must be in (0,128] and strength in [0,1].\",\n );\n if (!Number.isSafeInteger(props.resetRevision ?? 0))\n throw new RangeError(\"resetRevision must be a safe integer.\");\n return {\n resolution: validateResolution(props.resolution),\n ...chemistry,\n palette: [...(props.palette ?? texturePalettes.lagoon)],\n paused: props.paused ?? false,\n resetRevision: props.resetRevision ?? 0,\n brush: brush && { ...brush },\n };\n}\ninterface Stroke {\n x: number;\n y: number;\n radius: number;\n strength: number;\n}\ninterface Resources {\n render?: TextureRenderer;\n config: Options;\n simulation: InkSimulation;\n raster: TextureRaster;\n output: OffscreenCanvasRenderingContext2D;\n lut: Uint8ClampedArray;\n elapsed: number;\n fresh: boolean;\n dirty: boolean;\n disposed: boolean;\n target: object;\n strokes: Stroke[];\n pointer?: { id: number; x: number; y: number; release: () => void };\n invalidate: () => void;\n}\nfunction reset(r: Resources, config: Options) {\n const { width, height } = config.resolution;\n const simulation = new InkSimulation({ width, height, ...config });\n let raster: TextureRaster;\n try {\n raster = new TextureRaster(width, height);\n } catch (error) {\n simulation.dispose();\n throw error;\n }\n r.simulation.dispose();\n r.simulation = simulation;\n r.raster.dispose();\n r.raster = raster;\n r.strokes.length = 0;\n r.pointer?.release();\n r.pointer = undefined;\n r.elapsed = 0;\n r.fresh = true;\n r.dirty = true;\n}\nfunction input(\n r: Resources,\n event: Readonly<PibblRenderLayerInput<object>>,\n width: number,\n height: number,\n) {\n if (r.disposed) return;\n const original = event.originalEvent as PointerEvent;\n if (event.type === \"pointerup\" || event.type === \"pointercancel\") {\n if (r.pointer?.id === original.pointerId) {\n r.pointer.release();\n r.pointer = undefined;\n }\n return;\n }\n const brush = r.config.brush;\n if (!brush || width <= 0 || height <= 0) return;\n const x = (event.point.x / width) * r.simulation.width;\n const y = (event.point.y / height) * r.simulation.height;\n if (event.type === \"pointerdown\") {\n if (r.pointer || original.button !== 0 || original.isPrimary === false)\n return;\n event.setPointerCapture(original.pointerId);\n r.pointer = {\n id: original.pointerId,\n x,\n y,\n release: () => event.releasePointerCapture(original.pointerId),\n };\n } else if (\n event.type !== \"pointermove\" ||\n r.pointer?.id !== original.pointerId\n )\n return;\n const previous = r.pointer!;\n const distance = Math.hypot(x - previous.x, y - previous.y);\n // Bound work for off-surface capture. Stamps outside the field are ignored, never clamped to its edge.\n const count = Math.min(\n 4096,\n Math.max(1, Math.ceil(distance / Math.max(0.5, brush.radius * 0.3))),\n );\n for (let i = 1; i <= count; i++) {\n const px = previous.x + ((x - previous.x) * i) / count,\n py = previous.y + ((y - previous.y) * i) / count;\n if (\n px >= 0 &&\n py >= 0 &&\n px < r.simulation.width &&\n py < r.simulation.height &&\n r.strokes.length < 8192\n )\n r.strokes.push({ x: px, y: py, ...brush });\n }\n previous.x = x;\n previous.y = y;\n r.invalidate();\n}\n\n/**\n * An independently sized, persistent Gray\u2013Scott surface, advanced by Pibbl's scheduler.\n *\n * @param props - Authored component inputs, supplied through JSX or createElement. See the linked\n * props and style types.\n * @throws When called directly; Pibbl mounts this component through JSX or createElement.\n *\n * @see {@link ReactionDiffusionProps}\n */\nexport const ReactionDiffusion = /* @__PURE__ */ defineRenderLayer<\n ReactionDiffusionProps,\n Resources\n>({\n create(context, props) {\n const config = options(props),\n lut = paletteLut(config.palette);\n const output = context.canvas.getContext(\"2d\");\n if (!output) throw new Error(\"ReactionDiffusion requires Canvas 2D.\");\n const { width, height } = config.resolution;\n const raster = new TextureRaster(width, height);\n try {\n return {\n config,\n lut,\n raster,\n output,\n render: props.render,\n simulation: new InkSimulation({ width, height, ...config }),\n elapsed: 0,\n fresh: true,\n dirty: true,\n disposed: false,\n target: {},\n strokes: [],\n invalidate: context.invalidate,\n };\n } catch (error) {\n raster.dispose();\n throw error;\n }\n },\n update(r, props) {\n const next = options(props),\n old = r.config;\n if (next.palette.join() !== old.palette.join()) {\n r.lut = paletteLut(next.palette);\n r.dirty = true;\n }\n if (\n next.seed !== old.seed ||\n next.preset !== old.preset ||\n next.feed !== old.feed ||\n next.kill !== old.kill ||\n next.warmupSteps !== old.warmupSteps ||\n next.resetRevision !== old.resetRevision ||\n next.resolution.width !== old.resolution.width ||\n next.resolution.height !== old.resolution.height\n )\n reset(r, next);\n if (next.paused !== old.paused) {\n r.elapsed = 0;\n r.fresh = true;\n }\n if (!next.brush) {\n r.pointer?.release();\n r.pointer = undefined;\n }\n r.config = next;\n r.render = props.render;\n },\n render(r, frame, context) {\n // The frame invalidator does not gate the committed input snapshot between brush samples.\n r.invalidate = frame.invalidate;\n for (const stroke of r.strokes)\n r.simulation.paint(stroke.x, stroke.y, stroke.radius, stroke.strength);\n if (r.strokes.length) r.dirty = true;\n r.strokes.length = 0;\n if (!r.config.paused && !r.fresh) {\n r.elapsed += Math.max(0, Math.min(50, frame.delta));\n const steps = Math.min(24, Math.floor(r.elapsed * 0.48 + 1e-9));\n r.elapsed -= steps / 0.48;\n if (steps) {\n r.simulation.advance(steps);\n r.dirty = true;\n }\n }\n r.fresh = false;\n if (r.dirty) {\n r.raster.update(r.simulation.b, r.lut, 650 / 255);\n r.dirty = false;\n }\n r.raster.draw(\n r.output,\n context.size.width,\n context.size.height,\n context.size.backingWidth,\n context.size.backingHeight,\n r.render,\n );\n if (!r.config.paused) frame.invalidate();\n },\n interaction: {\n settle(r, _props, size) {\n return {\n targets: [\n {\n target: r.target,\n cursor: r.config.brush ? \"crosshair\" : \"default\",\n },\n ],\n hitTest: () => ({ kind: \"target\", target: r.target }),\n onInput: (event) => input(r, event, size.width, size.height),\n };\n },\n },\n dispose(r) {\n if (r.disposed) return;\n r.disposed = true;\n r.pointer?.release();\n r.pointer = undefined;\n r.strokes.length = 0;\n r.invalidate = () => {};\n r.simulation.dispose();\n r.raster.dispose();\n r.render = undefined;\n },\n});\n"],
5
+ "mappings": "AAAA;AAAA,EACE;AAAA,OAGK;AACP,SAAS,yBAAqD;AAC9D,SAAS,qBAA2C;AACpD,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAqEP,SAAS,QAAQ,OAAwC;AACvD,QAAM,YAAY,gBAAgB,KAAK;AACvC,QAAM,QAAQ,MAAM,SAAS,EAAE,QAAQ,GAAG,UAAU,IAAI;AACxD,MACE,UACC,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,KAAK,OAAO,KAAK,MAAM;AAAA,MAC7D;AAAA,IACF;AAAA,EACF;AAAA,EACA,QAAQ,GAAG;AACT,QAAI,EAAE,SAAU;AAChB,MAAE,WAAW;AACb,MAAE,SAAS,QAAQ;AACnB,MAAE,UAAU;AACZ,MAAE,QAAQ,SAAS;AACnB,MAAE,aAAa,MAAM;AAAA,IAAC;AACtB,MAAE,WAAW,QAAQ;AACrB,MAAE,OAAO,QAAQ;AACjB,MAAE,SAAS;AAAA,EACb;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,14 +1,20 @@
1
+ import { grayScottConfig, type ReactionDiffusionOptions } from "./gray-scott.js";
1
2
  /** Private WASM Gray–Scott state. Pibbl owns the clock and resource lifetime. */
2
3
  export declare class InkSimulation {
3
- readonly width: number;
4
- readonly height: number;
5
- readonly preset: "spots" | "stripes";
6
4
  a: Float32Array;
7
5
  b: Float32Array;
8
6
  private owner?;
9
7
  private parity;
10
8
  steps: number;
11
- constructor(width: number, height: number, seed: number, preset: "spots" | "stripes");
9
+ readonly width: number;
10
+ readonly height: number;
11
+ readonly preset: ReturnType<typeof grayScottConfig>["preset"];
12
+ private readonly feed;
13
+ private readonly kill;
14
+ constructor(options: ReactionDiffusionOptions & {
15
+ width: number;
16
+ height: number;
17
+ });
12
18
  paint(x: number, y: number, radius: number, strength: number): void;
13
19
  stir(x: number, y: number, dx: number, dy: number, radius: number): void;
14
20
  advance(count: number): void;
@@ -1,11 +1,28 @@
1
+ import {
2
+ grayScottConfig
3
+ } from "./gray-scott.js";
1
4
  import { FieldMemory, lazyKernel } from "./wasm/memory.js";
2
5
  import { bytes } from "./wasm/ink-bytes.js";
3
6
  const module = /* @__PURE__ */ lazyKernel(bytes);
4
7
  class InkSimulation {
5
- constructor(width, height, seed, preset) {
8
+ a;
9
+ b;
10
+ owner;
11
+ parity = 0;
12
+ steps = 0;
13
+ width;
14
+ height;
15
+ preset;
16
+ feed;
17
+ kill;
18
+ constructor(options) {
19
+ const { width, height } = options;
20
+ const config = grayScottConfig(options);
6
21
  this.width = width;
7
22
  this.height = height;
8
- this.preset = preset;
23
+ this.preset = config.preset;
24
+ this.feed = config.feed;
25
+ this.kill = config.kill;
9
26
  const owner = this.owner = new FieldMemory(module(), width, height, 4);
10
27
  [this.a, this.b] = owner.fields;
11
28
  owner.kernel.initialize(
@@ -13,17 +30,10 @@ class InkSimulation {
13
30
  this.b.byteOffset,
14
31
  width,
15
32
  height,
16
- seed
33
+ config.seed
17
34
  );
35
+ if (config.warmupSteps) this.advance(config.warmupSteps);
18
36
  }
19
- width;
20
- height;
21
- preset;
22
- a;
23
- b;
24
- owner;
25
- parity = 0;
26
- steps = 0;
27
37
  paint(x, y, radius, strength) {
28
38
  const owner = this.owner;
29
39
  owner.stamps[0] = x;
@@ -65,8 +75,8 @@ class InkSimulation {
65
75
  this.width,
66
76
  this.height,
67
77
  count,
68
- this.preset === "spots" ? 0.0367 : 0.029,
69
- this.preset === "spots" ? 0.0649 : 0.057
78
+ this.feed,
79
+ this.kill
70
80
  );
71
81
  if (count % 2) this.parity = next;
72
82
  this.a = owner.fields[this.parity];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/features/textures/lib/simulation.ts"],
4
- "sourcesContent": ["import { FieldMemory, lazyKernel } from \"./wasm/memory.js\";\nimport { bytes } from \"./wasm/ink-bytes.js\";\nconst module = /* @__PURE__ */ lazyKernel(bytes);\n/** Private WASM Gray\u2013Scott state. Pibbl owns the clock and resource lifetime. */\nexport class InkSimulation {\n a: Float32Array;\n b: Float32Array;\n private owner?: FieldMemory;\n private parity = 0;\n steps = 0;\n constructor(\n readonly width: number,\n readonly height: number,\n seed: number,\n readonly preset: \"spots\" | \"stripes\",\n ) {\n const owner = (this.owner = new FieldMemory(module(), width, height, 4));\n [this.a, this.b] = owner.fields;\n owner.kernel.initialize(\n this.a.byteOffset,\n this.b.byteOffset,\n width,\n height,\n seed,\n );\n }\n paint(x: number, y: number, radius: number, strength: number) {\n const owner = this.owner!;\n owner.stamps[0] = x;\n owner.stamps[1] = y;\n owner.stamps[2] = radius;\n owner.stamps[3] = strength;\n owner.kernel.paintBatch(\n this.a.byteOffset,\n this.b.byteOffset,\n this.width,\n this.height,\n owner.stamps.byteOffset,\n 1,\n );\n }\n stir(x: number, y: number, dx: number, dy: number, radius: number) {\n const owner = this.owner!,\n next = 2 - this.parity;\n owner.kernel.stir(\n this.a.byteOffset,\n this.b.byteOffset,\n owner.fields[next].byteOffset,\n owner.fields[next + 1].byteOffset,\n this.width,\n this.height,\n x,\n y,\n dx,\n dy,\n radius,\n );\n }\n advance(count: number) {\n const owner = this.owner!,\n next = 2 - this.parity;\n owner.kernel.advance(\n this.a.byteOffset,\n this.b.byteOffset,\n owner.fields[next].byteOffset,\n owner.fields[next + 1].byteOffset,\n this.width,\n this.height,\n count,\n this.preset === \"spots\" ? 0.0367 : 0.029,\n this.preset === \"spots\" ? 0.0649 : 0.057,\n );\n if (count % 2) this.parity = next;\n this.a = owner.fields[this.parity];\n this.b = owner.fields[this.parity + 1];\n this.steps += count;\n }\n dispose() {\n this.owner?.dispose();\n this.owner = undefined;\n this.a = this.b = new Float32Array(0);\n }\n}\n"],
5
- "mappings": "AAAA,SAAS,aAAa,kBAAkB;AACxC,SAAS,aAAa;AACtB,MAAM,SAAyB,2BAAW,KAAK;AAExC,MAAM,cAAc;AAAA,EAMzB,YACW,OACA,QACT,MACS,QACT;AAJS;AACA;AAEA;AAET,UAAM,QAAS,KAAK,QAAQ,IAAI,YAAY,OAAO,GAAG,OAAO,QAAQ,CAAC;AACtE,KAAC,KAAK,GAAG,KAAK,CAAC,IAAI,MAAM;AACzB,UAAM,OAAO;AAAA,MACX,KAAK,EAAE;AAAA,MACP,KAAK,EAAE;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAdW;AAAA,EACA;AAAA,EAEA;AAAA,EATX;AAAA,EACA;AAAA,EACQ;AAAA,EACA,SA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U;AACR,SAAK,OAAO,QAAQ;AACpB,SAAK,QAAQ;AACb,SAAK,IAAI,KAAK,IAAI,IAAI,aAAa,CAAC;AAAA,EACtC;AACF;",
4
+ "sourcesContent": ["import {\n grayScottConfig,\n type ReactionDiffusionOptions,\n} from \"./gray-scott.js\";\nimport { FieldMemory, lazyKernel } from \"./wasm/memory.js\";\nimport { bytes } from \"./wasm/ink-bytes.js\";\nconst module = /* @__PURE__ */ lazyKernel(bytes);\n/** Private WASM Gray\u2013Scott state. Pibbl owns the clock and resource lifetime. */\nexport class InkSimulation {\n a: Float32Array;\n b: Float32Array;\n private owner?: FieldMemory;\n private parity = 0;\n steps = 0;\n readonly width: number;\n readonly height: number;\n readonly preset: ReturnType<typeof grayScottConfig>[\"preset\"];\n private readonly feed: number;\n private readonly kill: number;\n constructor(\n options: ReactionDiffusionOptions & { width: number; height: number },\n ) {\n const { width, height } = options;\n const config = grayScottConfig(options);\n this.width = width;\n this.height = height;\n this.preset = config.preset;\n this.feed = config.feed;\n this.kill = config.kill;\n const owner = (this.owner = new FieldMemory(module(), width, height, 4));\n [this.a, this.b] = owner.fields;\n owner.kernel.initialize(\n this.a.byteOffset,\n this.b.byteOffset,\n width,\n height,\n config.seed,\n );\n if (config.warmupSteps) this.advance(config.warmupSteps);\n }\n paint(x: number, y: number, radius: number, strength: number) {\n const owner = this.owner!;\n owner.stamps[0] = x;\n owner.stamps[1] = y;\n owner.stamps[2] = radius;\n owner.stamps[3] = strength;\n owner.kernel.paintBatch(\n this.a.byteOffset,\n this.b.byteOffset,\n this.width,\n this.height,\n owner.stamps.byteOffset,\n 1,\n );\n }\n stir(x: number, y: number, dx: number, dy: number, radius: number) {\n const owner = this.owner!,\n next = 2 - this.parity;\n owner.kernel.stir(\n this.a.byteOffset,\n this.b.byteOffset,\n owner.fields[next].byteOffset,\n owner.fields[next + 1].byteOffset,\n this.width,\n this.height,\n x,\n y,\n dx,\n dy,\n radius,\n );\n }\n advance(count: number) {\n const owner = this.owner!,\n next = 2 - this.parity;\n owner.kernel.advance(\n this.a.byteOffset,\n this.b.byteOffset,\n owner.fields[next].byteOffset,\n owner.fields[next + 1].byteOffset,\n this.width,\n this.height,\n count,\n this.feed,\n this.kill,\n );\n if (count % 2) this.parity = next;\n this.a = owner.fields[this.parity];\n this.b = owner.fields[this.parity + 1];\n this.steps += count;\n }\n dispose() {\n this.owner?.dispose();\n this.owner = undefined;\n this.a = this.b = new Float32Array(0);\n }\n}\n"],
5
+ "mappings": "AAAA;AAAA,EACE;AAAA,OAEK;AACP,SAAS,aAAa,kBAAkB;AACxC,SAAS,aAAa;AACtB,MAAM,SAAyB,2BAAW,KAAK;AAExC,MAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EACQ;AAAA,EACA,SAAS;AAAA,EACjB,QAAQ;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACQ;AAAA,EACA;AAAA,EACjB,YACE,SACA;AACA,UAAM,EAAE,OAAO,OAAO,IAAI;AAC1B,UAAM,SAAS,gBAAgB,OAAO;AACtC,SAAK,QAAQ;AACb,SAAK,SAAS;AACd,SAAK,SAAS,OAAO;AACrB,SAAK,OAAO,OAAO;AACnB,SAAK,OAAO,OAAO;AACnB,UAAM,QAAS,KAAK,QAAQ,IAAI,YAAY,OAAO,GAAG,OAAO,QAAQ,CAAC;AACtE,KAAC,KAAK,GAAG,KAAK,CAAC,IAAI,MAAM;AACzB,UAAM,OAAO;AAAA,MACX,KAAK,EAAE;AAAA,MACP,KAAK,EAAE;AAAA,MACP;AAAA,MACA;AAAA,MACA,OAAO;AAAA,IACT;AACA,QAAI,OAAO,YAAa,MAAK,QAAQ,OAAO,WAAW;AAAA,EACzD;AAAA,EACA,MAAM,GAAW,GAAW,QAAgB,UAAkB;AAC5D,UAAM,QAAQ,KAAK;AACnB,UAAM,OAAO,CAAC,IAAI;AAClB,UAAM,OAAO,CAAC,IAAI;AAClB,UAAM,OAAO,CAAC,IAAI;AAClB,UAAM,OAAO,CAAC,IAAI;AAClB,UAAM,OAAO;AAAA,MACX,KAAK,EAAE;AAAA,MACP,KAAK,EAAE;AAAA,MACP,KAAK;AAAA,MACL,KAAK;AAAA,MACL,MAAM,OAAO;AAAA,MACb;AAAA,IACF;AAAA,EACF;AAAA,EACA,KAAK,GAAW,GAAW,IAAY,IAAY,QAAgB;AACjE,UAAM,QAAQ,KAAK,OACjB,OAAO,IAAI,KAAK;AAClB,UAAM,OAAO;AAAA,MACX,KAAK,EAAE;AAAA,MACP,KAAK,EAAE;AAAA,MACP,MAAM,OAAO,IAAI,EAAE;AAAA,MACnB,MAAM,OAAO,OAAO,CAAC,EAAE;AAAA,MACvB,KAAK;AAAA,MACL,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA,QAAQ,OAAe;AACrB,UAAM,QAAQ,KAAK,OACjB,OAAO,IAAI,KAAK;AAClB,UAAM,OAAO;AAAA,MACX,KAAK,EAAE;AAAA,MACP,KAAK,EAAE;AAAA,MACP,MAAM,OAAO,IAAI,EAAE;AAAA,MACnB,MAAM,OAAO,OAAO,CAAC,EAAE;AAAA,MACvB,KAAK;AAAA,MACL,KAAK;AAAA,MACL;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP;AACA,QAAI,QAAQ,EAAG,MAAK,SAAS;AAC7B,SAAK,IAAI,MAAM,OAAO,KAAK,MAAM;AACjC,SAAK,IAAI,MAAM,OAAO,KAAK,SAAS,CAAC;AACrC,SAAK,SAAS;AAAA,EAChB;AAAA,EACA,UAAU;AACR,SAAK,OAAO,QAAQ;AACpB,SAAK,QAAQ;AACb,SAAK,IAAI,KAAK,IAAI,IAAI,aAAa,CAAC;AAAA,EACtC;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,23 @@
1
- export { Scale } from "./lib/scale.js";
2
- export { useScale } from "./lib/use-scale.js";
3
- export type { ScaleId, LinearDomain, BandCategory, BandDomain, BandScaleProps, BandScaleRange, ResolvedBandScale, ScaleRange, ScaleLayoutStyle, LinearScaleProps, ScaleProps, ResolvedLinearScale, ResolvedScale, } from "./lib/types.js";
1
+ export { LinearScale } from "./lib/linear-scale-component.js";
2
+ export { BarScale } from "./lib/bar-scale.js";
3
+ export { UTCScale } from "./lib/utc-scale-component.js";
4
+ export { useLinearScale } from "./lib/use-linear-scale.js";
5
+ export { useBarScale } from "./lib/use-bar-scale.js";
6
+ export { useUTCScale } from "./lib/use-utc-scale.js";
7
+ export type { ScaleId, LinearDomain, BandCategory, BandDomain, BarScaleProps, BandScaleRange, ResolvedBandScale, ScaleRange, ScaleLayoutStyle, LinearScaleProps, ResolvedLinearScale, ResolvedScale, } from "./lib/types.js";
4
8
  export { Axis } from "./lib/axis.js";
5
9
  export { LineSeries } from "./lib/line-series.js";
10
+ export { AreaSeries } from "./lib/area-series.js";
11
+ export type { AreaSeriesProps, AreaSeriesStyle } from "./lib/area-series.js";
12
+ export { IntervalBandSeries } from "./lib/interval-band-series.js";
13
+ export type { IntervalBandSeriesProps } from "./lib/interval-band-series.js";
14
+ export { HorizontalIntervalSeries, VerticalIntervalSeries, } from "./lib/interval-series.js";
15
+ export type { IntervalSeriesStyle, IntervalSeriesProps, HorizontalIntervalSeriesProps, VerticalIntervalSeriesProps, } from "./lib/interval-series.js";
16
+ export type { SeriesCurve } from "./lib/curve-definition.js";
17
+ export { stepBefore, stepAfter, stepMidpoint } from "./lib/step-curves.js";
18
+ export { monotoneX } from "./lib/monotone-curve.js";
6
19
  export { ScaleAdjust } from "./lib/scale-adjust.js";
7
- export type { AxisStyle, AxisProps, LineCoordinate, LineAccessor, LineCurve, LineSeriesStyle, LineSeriesProps, ScaleAdjustProps, } from "./lib/types.js";
20
+ export type { AxisStyle, AxisProps, LineCoordinate, LineAccessor, SeriesAccessor, SeriesCoordinate, LineCurve, LineSeriesStyle, LineSeriesProps, ScaleAdjustProps, } from "./lib/types.js";
8
21
  export { PointSeries } from "./lib/point-series.js";
9
22
  export type { PointAccessor, PointMarkStyle, PointSeriesStyle, PointStyleResolver, PointSeriesProps, } from "./lib/point-types.js";
10
23
  export { PlotSeries } from "./lib/plot-series.js";
@@ -25,4 +38,65 @@ export type { BarThresholdFill, BarCategoryAccessor, BarSeriesStyle, BarStyleRes
25
38
  export { pieSlices } from "./lib/pie-slices.js";
26
39
  export type { PieOptions, PieSliceGeometry } from "./lib/pie-slices.js";
27
40
  export { PieLayout, PieSlice, PieLabel } from "./lib/pie-layout.js";
28
- export type { PieLayoutProps, PieLayoutStyle, PieLayoutSlice, PieLabelPlacement, PieLabelLayout, PieSliceProps, PieSliceStyle, PieLabelProps, PieLabelStyle } from "./lib/pie-types.js";
41
+ export type { PieLayoutProps, PieLayoutStyle, PieLayoutSlice, PieLabelPlacement, PieLabelLayout, PieSliceProps, PieSliceStyle, PieLabelProps, PieLabelStyle, } from "./lib/pie-types.js";
42
+ export { extent, niceUTCDomain } from "./lib/utc-scale.js";
43
+ export type { NumericDomain, UtcDomain, UTCScaleProps, ResolvedUtcScale, ResolvedContinuousScale, } from "./lib/types.js";
44
+ export { linearTicks, niceLinearDomain, formatNumber, } from "./lib/numeric-ticks.js";
45
+ export type { LinearTickOptions, NumberFormatOptions, } from "./lib/numeric-ticks.js";
46
+ export { interpolateNumericRange } from "./lib/numeric-range-interpolation.js";
47
+ export { visibleOhlcPriceExtent, padLinearDomain, } from "./lib/financial-autoscale.js";
48
+ export type { VisibleOhlcPriceExtentOptions, PadLinearDomainOptions, } from "./lib/financial-autoscale.js";
49
+ export { percentageReturns, indexTo100 } from "./lib/financial-comparison.js";
50
+ export type { ComparisonBaseOptions, PercentageReturnPoint, IndexedValuePoint, } from "./lib/financial-comparison.js";
51
+ export { aggregateOhlcv, sessionVwap } from "./lib/financial-aggregation.js";
52
+ export type { OhlcvBucket, OhlcvSource, AggregatedOhlcvPoint, AggregateOhlcvOptions, SessionIdentifier, SessionAccessor, SessionVwapOptions, SessionVwapPoint, } from "./lib/financial-aggregation.js";
53
+ export { RangeNavigator, EditableReferenceLine, EditableReferenceBand, EditableTrendLine, } from "./lib/editable-chart-elements.js";
54
+ export type { ChartAnchor, RangeNavigatorProps, RangeNavigatorStyle, EditableReferenceLineProps, EditableReferenceLineStyle, EditableReferenceBandProps, EditableReferenceBandStyle, EditableTrendLineProps, EditableTrendLineStyle, } from "./lib/editable-chart-elements.js";
55
+ export { simpleMovingAverage, exponentialMovingAverage, bollingerBands, } from "./lib/financial-indicators.js";
56
+ export type { MovingAverageOptions, BollingerBandsOptions, MovingAveragePoint, BollingerBandPoint, } from "./lib/financial-indicators.js";
57
+ export { relativeStrengthIndex, movingAverageConvergenceDivergence, stochasticOscillator, } from "./lib/financial-oscillators.js";
58
+ export type { OscillatorOptions, RelativeStrengthIndexOptions, MovingAverageConvergenceDivergenceOptions, StochasticOscillatorOptions, RelativeStrengthIndexPoint, MovingAverageConvergenceDivergencePoint, StochasticOscillatorPoint, } from "./lib/financial-oscillators.js";
59
+ export { utcTickLabels } from "./lib/utc-labels.js";
60
+ export type { UTCTickLabelOptions } from "./lib/utc-labels.js";
61
+ export { LogScale } from "./lib/log-scale-component.js";
62
+ export { useLogScale } from "./lib/use-log-scale.js";
63
+ export type { LogScaleProps, ResolvedLogScale } from "./lib/types.js";
64
+ export { SymlogScale } from "./lib/symlog-scale-component.js";
65
+ export { useSymlogScale } from "./lib/use-symlog-scale.js";
66
+ export type { SymlogScaleProps, ResolvedSymlogScale } from "./lib/types.js";
67
+ export { PointScale } from "./lib/point-scale-component.js";
68
+ export { usePointScale } from "./lib/use-point-scale.js";
69
+ export type { PointScaleProps, ResolvedPointScale } from "./lib/types.js";
70
+ export { GridLines, ReferenceLine } from "./lib/chart-lines.js";
71
+ export type { ChartLineProps, GridLinesProps, ReferenceLineProps, } from "./lib/chart-lines.js";
72
+ export { ReferenceBand } from "./lib/reference-band.js";
73
+ export type { ReferenceBandProps } from "./lib/reference-band.js";
74
+ export { AxisTitle } from "./lib/axis-title.js";
75
+ export type { AxisTitleProps } from "./lib/axis-title.js";
76
+ export { panDomain, zoomDomain } from "./lib/domain-navigation.js";
77
+ export type { DomainNavigationConstraints, PanDomainOptions, ZoomDomainOptions, } from "./lib/domain-navigation.js";
78
+ export { SequentialColorScale, useSequentialColorScale, } from "./lib/sequential-color-scale.js";
79
+ export { DivergingColorScale, useDivergingColorScale, } from "./lib/diverging-color-scale.js";
80
+ export type { ColorScaleStop, SequentialColorScaleProps, DivergingColorScaleProps, ResolvedSequentialColorScale, ResolvedDivergingColorScale, } from "./lib/color-types.js";
81
+ export { ThresholdColorScale, useThresholdColorScale, } from "./lib/threshold-color-scale.js";
82
+ export type { ThresholdColorBand, ThresholdColorScaleProps, ResolvedThresholdColorScale, } from "./lib/threshold-color-scale.js";
83
+ export { VolumeSeries } from "./lib/volume-series.js";
84
+ export type { VolumeSeriesProps, VolumeSeriesStyle, } from "./lib/volume-series.js";
85
+ export { TradingTimeScale, useTradingTimeScale, } from "./lib/trading-time-scale.js";
86
+ export type { TradingTimeScaleProps, ResolvedTradingTimeScale, } from "./lib/trading-time-scale.js";
87
+ export { CandlestickSeries } from "./lib/candlestick-series.js";
88
+ export type { CandlestickSeriesProps, CandlestickSeriesStyle, CandleBodyStyle, CandleWickStyle, } from "./lib/candlestick-series.js";
89
+ export { OhlcBarSeries } from "./lib/ohlc-bar-series.js";
90
+ export type { OhlcBarSeriesProps, OhlcBarSeriesStyle, } from "./lib/ohlc-bar-series.js";
91
+ export { BaselineSeries } from "./lib/baseline-series.js";
92
+ export type { BaselineSeriesProps, BaselineSeriesStyle, BaselineSideStyle, } from "./lib/baseline-series.js";
93
+ export { IntervalDiamondSeries } from "./lib/interval-diamond-series.js";
94
+ export type { IntervalDiamondSeriesProps, IntervalDiamondSeriesStyle, } from "./lib/interval-diamond-series.js";
95
+ export { CensoredPointSeries } from "./lib/censored-point-series.js";
96
+ export type { CensoringStatus, CensoringAccessor, CensoredPointSeriesProps, CensoredPointSeriesStyle, } from "./lib/censored-point-series.js";
97
+ export { WeightedPointSeries } from "./lib/weighted-point-series.js";
98
+ export type { WeightedPointSeriesProps, WeightedPointSeriesStyle, WeightAccessor, } from "./lib/weighted-point-series.js";
99
+ export { TrajectorySeries } from "./lib/trajectory-series.js";
100
+ export type { TrajectorySeriesProps, TrajectorySeriesStyle, TrajectoryGroupAccessor, } from "./lib/trajectory-series.js";
101
+ export { PairedSeries } from "./lib/paired-series.js";
102
+ export type { PairedSeriesProps, PairedSeriesStyle, } from "./lib/paired-series.js";
@@ -1,7 +1,19 @@
1
- import { Scale } from "./lib/scale.js";
2
- import { useScale } from "./lib/use-scale.js";
1
+ import { LinearScale } from "./lib/linear-scale-component.js";
2
+ import { BarScale } from "./lib/bar-scale.js";
3
+ import { UTCScale } from "./lib/utc-scale-component.js";
4
+ import { useLinearScale } from "./lib/use-linear-scale.js";
5
+ import { useBarScale } from "./lib/use-bar-scale.js";
6
+ import { useUTCScale } from "./lib/use-utc-scale.js";
3
7
  import { Axis } from "./lib/axis.js";
4
8
  import { LineSeries } from "./lib/line-series.js";
9
+ import { AreaSeries } from "./lib/area-series.js";
10
+ import { IntervalBandSeries } from "./lib/interval-band-series.js";
11
+ import {
12
+ HorizontalIntervalSeries,
13
+ VerticalIntervalSeries
14
+ } from "./lib/interval-series.js";
15
+ import { stepBefore, stepAfter, stepMidpoint } from "./lib/step-curves.js";
16
+ import { monotoneX } from "./lib/monotone-curve.js";
5
17
  import { ScaleAdjust } from "./lib/scale-adjust.js";
6
18
  import { PointSeries } from "./lib/point-series.js";
7
19
  import { PlotSeries } from "./lib/plot-series.js";
@@ -18,28 +30,157 @@ import { AnchoredLayout } from "./lib/anchored-layout.js";
18
30
  import { BarSeries } from "./lib/bar-series.js";
19
31
  import { pieSlices } from "./lib/pie-slices.js";
20
32
  import { PieLayout, PieSlice, PieLabel } from "./lib/pie-layout.js";
33
+ import { extent, niceUTCDomain } from "./lib/utc-scale.js";
34
+ import {
35
+ linearTicks,
36
+ niceLinearDomain,
37
+ formatNumber
38
+ } from "./lib/numeric-ticks.js";
39
+ import { interpolateNumericRange } from "./lib/numeric-range-interpolation.js";
40
+ import {
41
+ visibleOhlcPriceExtent,
42
+ padLinearDomain
43
+ } from "./lib/financial-autoscale.js";
44
+ import { percentageReturns, indexTo100 } from "./lib/financial-comparison.js";
45
+ import { aggregateOhlcv, sessionVwap } from "./lib/financial-aggregation.js";
46
+ import {
47
+ RangeNavigator,
48
+ EditableReferenceLine,
49
+ EditableReferenceBand,
50
+ EditableTrendLine
51
+ } from "./lib/editable-chart-elements.js";
52
+ import {
53
+ simpleMovingAverage,
54
+ exponentialMovingAverage,
55
+ bollingerBands
56
+ } from "./lib/financial-indicators.js";
57
+ import {
58
+ relativeStrengthIndex,
59
+ movingAverageConvergenceDivergence,
60
+ stochasticOscillator
61
+ } from "./lib/financial-oscillators.js";
62
+ import { utcTickLabels } from "./lib/utc-labels.js";
63
+ import { LogScale } from "./lib/log-scale-component.js";
64
+ import { useLogScale } from "./lib/use-log-scale.js";
65
+ import { SymlogScale } from "./lib/symlog-scale-component.js";
66
+ import { useSymlogScale } from "./lib/use-symlog-scale.js";
67
+ import { PointScale } from "./lib/point-scale-component.js";
68
+ import { usePointScale } from "./lib/use-point-scale.js";
69
+ import { GridLines, ReferenceLine } from "./lib/chart-lines.js";
70
+ import { ReferenceBand } from "./lib/reference-band.js";
71
+ import { AxisTitle } from "./lib/axis-title.js";
72
+ import { panDomain, zoomDomain } from "./lib/domain-navigation.js";
73
+ import {
74
+ SequentialColorScale,
75
+ useSequentialColorScale
76
+ } from "./lib/sequential-color-scale.js";
77
+ import {
78
+ DivergingColorScale,
79
+ useDivergingColorScale
80
+ } from "./lib/diverging-color-scale.js";
81
+ import {
82
+ ThresholdColorScale,
83
+ useThresholdColorScale
84
+ } from "./lib/threshold-color-scale.js";
85
+ import { VolumeSeries } from "./lib/volume-series.js";
86
+ import {
87
+ TradingTimeScale,
88
+ useTradingTimeScale
89
+ } from "./lib/trading-time-scale.js";
90
+ import { CandlestickSeries } from "./lib/candlestick-series.js";
91
+ import { OhlcBarSeries } from "./lib/ohlc-bar-series.js";
92
+ import { BaselineSeries } from "./lib/baseline-series.js";
93
+ import { IntervalDiamondSeries } from "./lib/interval-diamond-series.js";
94
+ import { CensoredPointSeries } from "./lib/censored-point-series.js";
95
+ import { WeightedPointSeries } from "./lib/weighted-point-series.js";
96
+ import { TrajectorySeries } from "./lib/trajectory-series.js";
97
+ import { PairedSeries } from "./lib/paired-series.js";
21
98
  export {
22
99
  AnchoredLayout,
100
+ AreaSeries,
23
101
  Axis,
102
+ AxisTitle,
103
+ BarScale,
24
104
  BarSeries,
105
+ BaselineSeries,
106
+ CandlestickSeries,
107
+ CensoredPointSeries,
108
+ DivergingColorScale,
109
+ EditableReferenceBand,
110
+ EditableReferenceLine,
111
+ EditableTrendLine,
112
+ GridLines,
113
+ HorizontalIntervalSeries,
25
114
  HoverCard,
26
115
  HoverData,
116
+ IntervalBandSeries,
117
+ IntervalDiamondSeries,
27
118
  LineSeries,
119
+ LinearScale,
120
+ LogScale,
121
+ OhlcBarSeries,
122
+ PairedSeries,
28
123
  PieLabel,
29
124
  PieLayout,
30
125
  PieSlice,
31
126
  PlotSeries,
127
+ PointScale,
32
128
  PointSeries,
33
- Scale,
129
+ RangeNavigator,
130
+ ReferenceBand,
131
+ ReferenceLine,
34
132
  ScaleAdjust,
133
+ SequentialColorScale,
134
+ SymlogScale,
135
+ ThresholdColorScale,
136
+ TradingTimeScale,
137
+ TrajectorySeries,
138
+ UTCScale,
139
+ VerticalIntervalSeries,
140
+ VolumeSeries,
141
+ WeightedPointSeries,
142
+ aggregateOhlcv,
143
+ bollingerBands,
35
144
  closestPoint,
36
145
  closestX,
37
146
  defineSeries,
147
+ exponentialMovingAverage,
148
+ extent,
149
+ formatNumber,
150
+ indexTo100,
151
+ interpolateNumericRange,
38
152
  interpolateX,
39
153
  linearInterpolation,
154
+ linearTicks,
155
+ monotoneX,
156
+ movingAverageConvergenceDivergence,
40
157
  nearestDomainValue,
41
158
  nearestPoint,
159
+ niceLinearDomain,
160
+ niceUTCDomain,
161
+ padLinearDomain,
162
+ panDomain,
163
+ percentageReturns,
42
164
  pieSlices,
43
- useScale
165
+ relativeStrengthIndex,
166
+ sessionVwap,
167
+ simpleMovingAverage,
168
+ stepAfter,
169
+ stepBefore,
170
+ stepMidpoint,
171
+ stochasticOscillator,
172
+ useBarScale,
173
+ useDivergingColorScale,
174
+ useLinearScale,
175
+ useLogScale,
176
+ usePointScale,
177
+ useSequentialColorScale,
178
+ useSymlogScale,
179
+ useThresholdColorScale,
180
+ useTradingTimeScale,
181
+ useUTCScale,
182
+ utcTickLabels,
183
+ visibleOhlcPriceExtent,
184
+ zoomDomain
44
185
  };
45
186
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/viz/index.ts"],
4
- "sourcesContent": ["export { Scale } from \"./lib/scale.js\";\nexport { useScale } from \"./lib/use-scale.js\";\nexport type {\n ScaleId,\n LinearDomain,\n BandCategory,\n BandDomain,\n BandScaleProps,\n BandScaleRange,\n ResolvedBandScale,\n ScaleRange,\n ScaleLayoutStyle,\n LinearScaleProps,\n ScaleProps,\n ResolvedLinearScale,\n ResolvedScale,\n} from \"./lib/types.js\";\nexport { Axis } from \"./lib/axis.js\";\nexport { LineSeries } from \"./lib/line-series.js\";\nexport { ScaleAdjust } from \"./lib/scale-adjust.js\";\nexport type {\n AxisStyle,\n AxisProps,\n LineCoordinate,\n LineAccessor,\n LineCurve,\n LineSeriesStyle,\n LineSeriesProps,\n ScaleAdjustProps,\n} from \"./lib/types.js\";\nexport { PointSeries } from \"./lib/point-series.js\";\nexport type {\n PointAccessor,\n PointMarkStyle,\n PointSeriesStyle,\n PointStyleResolver,\n PointSeriesProps,\n} from \"./lib/point-types.js\";\nexport { PlotSeries } from \"./lib/plot-series.js\";\nexport type { PlotSeriesProps, PlotKeyAccessor } from \"./lib/plot-types.js\";\nexport { nearestDomainValue, nearestPoint } from \"./lib/nearest.js\";\nexport type { NearestPointOptions, NearestPoint } from \"./lib/nearest.js\";\n\nexport { HoverData } from \"./lib/hover-data.js\";\nexport { defineSeries, closestPoint } from \"./lib/hover-queries.js\";\nexport type {\n HoverQueryContext,\n HoverQuery,\n HoverDataProps,\n HoverSeries,\n HoverPoint,\n HoverHit,\n HoverSeriesMap,\n ClosestPointHit,\n ClosestPointOptions,\n} from \"./lib/hover-types.js\";\n\nexport { HoverCard } from \"./lib/hover-card.js\";\nexport type {\n HoverCardProps,\n HoverCardStyle,\n HoverBounds,\n HoverPlacement,\n} from \"./lib/hover-card.js\";\n\nexport {\n closestX,\n interpolateX,\n linearInterpolation,\n} from \"./lib/hover-queries.js\";\nexport type {\n ClosestXOptions,\n ClosestXHit,\n HoverInterpolation,\n InterpolateXOptions,\n HoverSample,\n} from \"./lib/hover-types.js\";\n\nexport { AnchoredLayout } from \"./lib/anchored-layout.js\";\nexport type {\n AnchoredItem,\n AnchoredPlacement,\n AnchoredLayoutProps,\n} from \"./lib/anchored-layout.js\";\n\nexport { BarSeries } from \"./lib/bar-series.js\";\nexport type {\n BarThresholdFill,\n BarCategoryAccessor,\n BarSeriesStyle,\n BarStyleResolver,\n BarSeriesProps,\n} from \"./lib/bar-series.js\";\n\nexport { pieSlices } from \"./lib/pie-slices.js\";\nexport type { PieOptions, PieSliceGeometry } from \"./lib/pie-slices.js\";\n\nexport { PieLayout, PieSlice, PieLabel } from \"./lib/pie-layout.js\";\nexport type { PieLayoutProps, PieLayoutStyle, PieLayoutSlice, PieLabelPlacement, PieLabelLayout, PieSliceProps, PieSliceStyle, PieLabelProps, PieLabelStyle } from \"./lib/pie-types.js\";\n"],
5
- "mappings": "AAAA,SAAS,aAAa;AACtB,SAAS,gBAAgB;AAgBzB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAW5B,SAAS,mBAAmB;AAQ5B,SAAS,kBAAkB;AAE3B,SAAS,oBAAoB,oBAAoB;AAGjD,SAAS,iBAAiB;AAC1B,SAAS,cAAc,oBAAoB;AAa3C,SAAS,iBAAiB;AAQ1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP,SAAS,sBAAsB;AAO/B,SAAS,iBAAiB;AAS1B,SAAS,iBAAiB;AAG1B,SAAS,WAAW,UAAU,gBAAgB;",
4
+ "sourcesContent": ["export { LinearScale } from \"./lib/linear-scale-component.js\";\nexport { BarScale } from \"./lib/bar-scale.js\";\nexport { UTCScale } from \"./lib/utc-scale-component.js\";\nexport { useLinearScale } from \"./lib/use-linear-scale.js\";\nexport { useBarScale } from \"./lib/use-bar-scale.js\";\nexport { useUTCScale } from \"./lib/use-utc-scale.js\";\nexport type {\n ScaleId,\n LinearDomain,\n BandCategory,\n BandDomain,\n BarScaleProps,\n BandScaleRange,\n ResolvedBandScale,\n ScaleRange,\n ScaleLayoutStyle,\n LinearScaleProps,\n ResolvedLinearScale,\n ResolvedScale,\n} from \"./lib/types.js\";\nexport { Axis } from \"./lib/axis.js\";\nexport { LineSeries } from \"./lib/line-series.js\";\nexport { AreaSeries } from \"./lib/area-series.js\";\nexport type { AreaSeriesProps, AreaSeriesStyle } from \"./lib/area-series.js\";\nexport { IntervalBandSeries } from \"./lib/interval-band-series.js\";\nexport type { IntervalBandSeriesProps } from \"./lib/interval-band-series.js\";\nexport {\n HorizontalIntervalSeries,\n VerticalIntervalSeries,\n} from \"./lib/interval-series.js\";\nexport type {\n IntervalSeriesStyle,\n IntervalSeriesProps,\n HorizontalIntervalSeriesProps,\n VerticalIntervalSeriesProps,\n} from \"./lib/interval-series.js\";\nexport type { SeriesCurve } from \"./lib/curve-definition.js\";\nexport { stepBefore, stepAfter, stepMidpoint } from \"./lib/step-curves.js\";\nexport { monotoneX } from \"./lib/monotone-curve.js\";\nexport { ScaleAdjust } from \"./lib/scale-adjust.js\";\nexport type {\n AxisStyle,\n AxisProps,\n LineCoordinate,\n LineAccessor,\n SeriesAccessor,\n SeriesCoordinate,\n LineCurve,\n LineSeriesStyle,\n LineSeriesProps,\n ScaleAdjustProps,\n} from \"./lib/types.js\";\nexport { PointSeries } from \"./lib/point-series.js\";\nexport type {\n PointAccessor,\n PointMarkStyle,\n PointSeriesStyle,\n PointStyleResolver,\n PointSeriesProps,\n} from \"./lib/point-types.js\";\nexport { PlotSeries } from \"./lib/plot-series.js\";\nexport type { PlotSeriesProps, PlotKeyAccessor } from \"./lib/plot-types.js\";\nexport { nearestDomainValue, nearestPoint } from \"./lib/nearest.js\";\nexport type { NearestPointOptions, NearestPoint } from \"./lib/nearest.js\";\n\nexport { HoverData } from \"./lib/hover-data.js\";\nexport { defineSeries, closestPoint } from \"./lib/hover-queries.js\";\nexport type {\n HoverQueryContext,\n HoverQuery,\n HoverDataProps,\n HoverSeries,\n HoverPoint,\n HoverHit,\n HoverSeriesMap,\n ClosestPointHit,\n ClosestPointOptions,\n} from \"./lib/hover-types.js\";\n\nexport { HoverCard } from \"./lib/hover-card.js\";\nexport type {\n HoverCardProps,\n HoverCardStyle,\n HoverBounds,\n HoverPlacement,\n} from \"./lib/hover-card.js\";\n\nexport {\n closestX,\n interpolateX,\n linearInterpolation,\n} from \"./lib/hover-queries.js\";\nexport type {\n ClosestXOptions,\n ClosestXHit,\n HoverInterpolation,\n InterpolateXOptions,\n HoverSample,\n} from \"./lib/hover-types.js\";\n\nexport { AnchoredLayout } from \"./lib/anchored-layout.js\";\nexport type {\n AnchoredItem,\n AnchoredPlacement,\n AnchoredLayoutProps,\n} from \"./lib/anchored-layout.js\";\n\nexport { BarSeries } from \"./lib/bar-series.js\";\nexport type {\n BarThresholdFill,\n BarCategoryAccessor,\n BarSeriesStyle,\n BarStyleResolver,\n BarSeriesProps,\n} from \"./lib/bar-series.js\";\n\nexport { pieSlices } from \"./lib/pie-slices.js\";\nexport type { PieOptions, PieSliceGeometry } from \"./lib/pie-slices.js\";\n\nexport { PieLayout, PieSlice, PieLabel } from \"./lib/pie-layout.js\";\nexport type {\n PieLayoutProps,\n PieLayoutStyle,\n PieLayoutSlice,\n PieLabelPlacement,\n PieLabelLayout,\n PieSliceProps,\n PieSliceStyle,\n PieLabelProps,\n PieLabelStyle,\n} from \"./lib/pie-types.js\";\n\nexport { extent, niceUTCDomain } from \"./lib/utc-scale.js\";\nexport type {\n NumericDomain,\n UtcDomain,\n UTCScaleProps,\n ResolvedUtcScale,\n ResolvedContinuousScale,\n} from \"./lib/types.js\";\n\nexport {\n linearTicks,\n niceLinearDomain,\n formatNumber,\n} from \"./lib/numeric-ticks.js\";\nexport type {\n LinearTickOptions,\n NumberFormatOptions,\n} from \"./lib/numeric-ticks.js\";\nexport { interpolateNumericRange } from \"./lib/numeric-range-interpolation.js\";\nexport {\n visibleOhlcPriceExtent,\n padLinearDomain,\n} from \"./lib/financial-autoscale.js\";\nexport type {\n VisibleOhlcPriceExtentOptions,\n PadLinearDomainOptions,\n} from \"./lib/financial-autoscale.js\";\nexport { percentageReturns, indexTo100 } from \"./lib/financial-comparison.js\";\nexport type {\n ComparisonBaseOptions,\n PercentageReturnPoint,\n IndexedValuePoint,\n} from \"./lib/financial-comparison.js\";\nexport { aggregateOhlcv, sessionVwap } from \"./lib/financial-aggregation.js\";\nexport type {\n OhlcvBucket,\n OhlcvSource,\n AggregatedOhlcvPoint,\n AggregateOhlcvOptions,\n SessionIdentifier,\n SessionAccessor,\n SessionVwapOptions,\n SessionVwapPoint,\n} from \"./lib/financial-aggregation.js\";\nexport {\n RangeNavigator,\n EditableReferenceLine,\n EditableReferenceBand,\n EditableTrendLine,\n} from \"./lib/editable-chart-elements.js\";\nexport type {\n ChartAnchor,\n RangeNavigatorProps,\n RangeNavigatorStyle,\n EditableReferenceLineProps,\n EditableReferenceLineStyle,\n EditableReferenceBandProps,\n EditableReferenceBandStyle,\n EditableTrendLineProps,\n EditableTrendLineStyle,\n} from \"./lib/editable-chart-elements.js\";\nexport {\n simpleMovingAverage,\n exponentialMovingAverage,\n bollingerBands,\n} from \"./lib/financial-indicators.js\";\nexport type {\n MovingAverageOptions,\n BollingerBandsOptions,\n MovingAveragePoint,\n BollingerBandPoint,\n} from \"./lib/financial-indicators.js\";\nexport {\n relativeStrengthIndex,\n movingAverageConvergenceDivergence,\n stochasticOscillator,\n} from \"./lib/financial-oscillators.js\";\nexport type {\n OscillatorOptions,\n RelativeStrengthIndexOptions,\n MovingAverageConvergenceDivergenceOptions,\n StochasticOscillatorOptions,\n RelativeStrengthIndexPoint,\n MovingAverageConvergenceDivergencePoint,\n StochasticOscillatorPoint,\n} from \"./lib/financial-oscillators.js\";\n\nexport { utcTickLabels } from \"./lib/utc-labels.js\";\nexport type { UTCTickLabelOptions } from \"./lib/utc-labels.js\";\n\nexport { LogScale } from \"./lib/log-scale-component.js\";\nexport { useLogScale } from \"./lib/use-log-scale.js\";\nexport type { LogScaleProps, ResolvedLogScale } from \"./lib/types.js\";\n\nexport { SymlogScale } from \"./lib/symlog-scale-component.js\";\nexport { useSymlogScale } from \"./lib/use-symlog-scale.js\";\nexport type { SymlogScaleProps, ResolvedSymlogScale } from \"./lib/types.js\";\n\nexport { PointScale } from \"./lib/point-scale-component.js\";\nexport { usePointScale } from \"./lib/use-point-scale.js\";\nexport type { PointScaleProps, ResolvedPointScale } from \"./lib/types.js\";\nexport { GridLines, ReferenceLine } from \"./lib/chart-lines.js\";\nexport type {\n ChartLineProps,\n GridLinesProps,\n ReferenceLineProps,\n} from \"./lib/chart-lines.js\";\nexport { ReferenceBand } from \"./lib/reference-band.js\";\nexport type { ReferenceBandProps } from \"./lib/reference-band.js\";\nexport { AxisTitle } from \"./lib/axis-title.js\";\nexport type { AxisTitleProps } from \"./lib/axis-title.js\";\n\nexport { panDomain, zoomDomain } from \"./lib/domain-navigation.js\";\nexport type {\n DomainNavigationConstraints,\n PanDomainOptions,\n ZoomDomainOptions,\n} from \"./lib/domain-navigation.js\";\n\nexport {\n SequentialColorScale,\n useSequentialColorScale,\n} from \"./lib/sequential-color-scale.js\";\nexport {\n DivergingColorScale,\n useDivergingColorScale,\n} from \"./lib/diverging-color-scale.js\";\nexport type {\n ColorScaleStop,\n SequentialColorScaleProps,\n DivergingColorScaleProps,\n ResolvedSequentialColorScale,\n ResolvedDivergingColorScale,\n} from \"./lib/color-types.js\";\n\nexport {\n ThresholdColorScale,\n useThresholdColorScale,\n} from \"./lib/threshold-color-scale.js\";\nexport type {\n ThresholdColorBand,\n ThresholdColorScaleProps,\n ResolvedThresholdColorScale,\n} from \"./lib/threshold-color-scale.js\";\n\nexport { VolumeSeries } from \"./lib/volume-series.js\";\nexport type {\n VolumeSeriesProps,\n VolumeSeriesStyle,\n} from \"./lib/volume-series.js\";\n\nexport {\n TradingTimeScale,\n useTradingTimeScale,\n} from \"./lib/trading-time-scale.js\";\nexport type {\n TradingTimeScaleProps,\n ResolvedTradingTimeScale,\n} from \"./lib/trading-time-scale.js\";\nexport { CandlestickSeries } from \"./lib/candlestick-series.js\";\nexport type {\n CandlestickSeriesProps,\n CandlestickSeriesStyle,\n CandleBodyStyle,\n CandleWickStyle,\n} from \"./lib/candlestick-series.js\";\nexport { OhlcBarSeries } from \"./lib/ohlc-bar-series.js\";\nexport type {\n OhlcBarSeriesProps,\n OhlcBarSeriesStyle,\n} from \"./lib/ohlc-bar-series.js\";\n\nexport { BaselineSeries } from \"./lib/baseline-series.js\";\nexport type {\n BaselineSeriesProps,\n BaselineSeriesStyle,\n BaselineSideStyle,\n} from \"./lib/baseline-series.js\";\nexport { IntervalDiamondSeries } from \"./lib/interval-diamond-series.js\";\nexport type {\n IntervalDiamondSeriesProps,\n IntervalDiamondSeriesStyle,\n} from \"./lib/interval-diamond-series.js\";\nexport { CensoredPointSeries } from \"./lib/censored-point-series.js\";\nexport type {\n CensoringStatus,\n CensoringAccessor,\n CensoredPointSeriesProps,\n CensoredPointSeriesStyle,\n} from \"./lib/censored-point-series.js\";\nexport { WeightedPointSeries } from \"./lib/weighted-point-series.js\";\nexport type {\n WeightedPointSeriesProps,\n WeightedPointSeriesStyle,\n WeightAccessor,\n} from \"./lib/weighted-point-series.js\";\nexport { TrajectorySeries } from \"./lib/trajectory-series.js\";\nexport type {\n TrajectorySeriesProps,\n TrajectorySeriesStyle,\n TrajectoryGroupAccessor,\n} from \"./lib/trajectory-series.js\";\nexport { PairedSeries } from \"./lib/paired-series.js\";\nexport type {\n PairedSeriesProps,\n PairedSeriesStyle,\n} from \"./lib/paired-series.js\";\n"],
5
+ "mappings": "AAAA,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAe5B,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAE3B,SAAS,0BAA0B;AAEnC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAQP,SAAS,YAAY,WAAW,oBAAoB;AACpD,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAa5B,SAAS,mBAAmB;AAQ5B,SAAS,kBAAkB;AAE3B,SAAS,oBAAoB,oBAAoB;AAGjD,SAAS,iBAAiB;AAC1B,SAAS,cAAc,oBAAoB;AAa3C,SAAS,iBAAiB;AAQ1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP,SAAS,sBAAsB;AAO/B,SAAS,iBAAiB;AAS1B,SAAS,iBAAiB;AAG1B,SAAS,WAAW,UAAU,gBAAgB;AAa9C,SAAS,QAAQ,qBAAqB;AAStC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,SAAS,+BAA+B;AACxC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAKP,SAAS,mBAAmB,kBAAkB;AAM9C,SAAS,gBAAgB,mBAAmB;AAW5C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAYP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAWP,SAAS,qBAAqB;AAG9B,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAG5B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAG/B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAE9B,SAAS,WAAW,qBAAqB;AAMzC,SAAS,qBAAqB;AAE9B,SAAS,iBAAiB;AAG1B,SAAS,WAAW,kBAAkB;AAOtC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AASP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAOP,SAAS,oBAAoB;AAM7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAKP,SAAS,yBAAyB;AAOlC,SAAS,qBAAqB;AAM9B,SAAS,sBAAsB;AAM/B,SAAS,6BAA6B;AAKtC,SAAS,2BAA2B;AAOpC,SAAS,2BAA2B;AAMpC,SAAS,wBAAwB;AAMjC,SAAS,oBAAoB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,79 @@
1
+ import type { LayoutBox } from "@pibbl/core";
2
+ import type { BarSeriesProps } from "../lib/bar-series.js";
3
+ import type { BandCategory } from "../lib/types.js";
4
+ import type { RenderedSeriesPoint } from "./query-types.js";
5
+ /** Original range/value/grouped bar with its captured endpoints and local paint bounds.
6
+ * @see {@link BarRenderedSeries}
7
+ */
8
+ export interface PaintedBarHit<D> {
9
+ /** Caller-owned original record. */
10
+ readonly datum: D;
11
+ /** Original zero-based source position. */
12
+ readonly sourceIndex: number;
13
+ /** Original discrete category, without numeric coercion. */
14
+ readonly category: BandCategory;
15
+ /** Original subgroup when grouping is enabled. */
16
+ readonly group: BandCategory | undefined;
17
+ /** Data-space starting endpoint, including an ordinary bar's baseline. */
18
+ readonly valueStart: number;
19
+ /** Data-space ending endpoint. */
20
+ readonly valueEnd: number;
21
+ /** Logical rectangle bounds before world transforms. */
22
+ readonly boundsLocal: Readonly<LayoutBox>;
23
+ }
24
+ /** @internal Captured rectangle paint flags used only for geometric lookup. */
25
+ export interface CapturedBarMark<D> extends PaintedBarHit<D> {
26
+ /** Whether this rectangle paints its interior. */
27
+ readonly fill: boolean;
28
+ /** Painted stroke width in local logical units. */
29
+ readonly strokeWidthLocal: number;
30
+ }
31
+ /** A borrowed committed categorical bar generation; contains no numeric category mapping.
32
+ * @see {@link PaintedBarHit}
33
+ */
34
+ export interface BarRenderedSeries<D> {
35
+ /** Original records and geometry in source paint order. */
36
+ readonly marks: readonly CapturedBarMark<D>[];
37
+ /** Throws after replacement or disposal. */
38
+ assertLive(): void;
39
+ /** Converts root logical units into this generation's local geometry.
40
+ * @param point - Root-logical Canvas point.
41
+ * @returns Local point or undefined for a singular transform.
42
+ */
43
+ localAtRoot(point: Readonly<RenderedSeriesPoint>): Readonly<RenderedSeriesPoint> | undefined;
44
+ /** Tests a local point against every committed clip/layer bound.
45
+ * @param point - Local-logical Canvas point.
46
+ * @returns Whether the point is inside every clip and layer bound.
47
+ */
48
+ anchorInsideClips(point: Readonly<RenderedSeriesPoint>): boolean;
49
+ }
50
+ /** Mount-owned optional categorical-bar capture.
51
+ * @see {@link BarRenderedSeries}
52
+ */
53
+ export interface BarInspectionRef<D> {
54
+ /** Returns the last successful generation.
55
+ * @returns Borrowed bar geometry or undefined before paint/after disposal.
56
+ */
57
+ rendered(): BarRenderedSeries<D> | undefined;
58
+ /** @internal Records candidate values and paint geometry without executing a search.
59
+ * @param input - Source-ordered captured rectangle marks.
60
+ */
61
+ capture(input: readonly CapturedBarMark<D>[]): void;
62
+ }
63
+ /**
64
+ * Owns opt-in capture for ordinary, range or grouped categorical bars.
65
+ * @param _inputs - Bar inputs used for datum inference; no data is read or subscribed here.
66
+ * @returns A stable ref to pass to one BarSeries inspection prop; captured endpoints share one fixed contract.
67
+ * @see {@link BarInspectionRef}
68
+ */
69
+ export declare function useBarInspection<D>(_inputs: Pick<BarSeriesProps<D>, "data" | "category">): BarInspectionRef<D>;
70
+ /**
71
+ * Finds the last-painted bar covering a root-logical point in this explicit series.
72
+ * @param rendered - Borrowed committed categorical bar values and rectangle geometry.
73
+ * @param options - Root-logical query point; respects every clip, fill/stroke and source order.
74
+ * @returns Original record, category/group, endpoints and local bounds, or undefined for gaps and singular transforms.
75
+ * @see {@link PaintedBarHit}
76
+ */
77
+ export declare function paintedBarAt<D>(rendered: BarRenderedSeries<D>, options: {
78
+ rootPoint: Readonly<RenderedSeriesPoint>;
79
+ }): PaintedBarHit<D> | undefined;