@pibbl/core 0.0.1 → 0.0.3-alpha.109.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 (683) 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-testing.d.ts +1 -1
  27. package/dist/features/physics/2d-testing.js +2 -2
  28. package/dist/features/physics/2d-testing.js.map +2 -2
  29. package/dist/features/physics/2d.d.ts +115 -62
  30. package/dist/features/physics/2d.js +59 -28
  31. package/dist/features/physics/2d.js.map +2 -2
  32. package/dist/features/physics/lib/2d/canvas/components.js +25 -21
  33. package/dist/features/physics/lib/2d/canvas/components.js.map +2 -2
  34. package/dist/features/physics/lib/2d/canvas/presentation.js +1 -2
  35. package/dist/features/physics/lib/2d/canvas/presentation.js.map +2 -2
  36. package/dist/features/physics/lib/2d/collision/casts.js +4 -2
  37. package/dist/features/physics/lib/2d/collision/casts.js.map +2 -2
  38. package/dist/features/physics/lib/2d/query-types.d.ts +6 -0
  39. package/dist/features/physics/lib/2d/runtime/controller.d.ts +7 -6
  40. package/dist/features/physics/lib/2d/runtime/controller.js +1 -1
  41. package/dist/features/physics/lib/2d/runtime/controller.js.map +2 -2
  42. package/dist/features/physics/lib/2d/runtime/obstacles.js +9 -11
  43. package/dist/features/physics/lib/2d/runtime/obstacles.js.map +2 -2
  44. package/dist/features/physics/lib/2d/shapes.js +8 -9
  45. package/dist/features/physics/lib/2d/shapes.js.map +2 -2
  46. package/dist/features/physics/lib/2d/types.d.ts +8 -30
  47. package/dist/features/physics/lib/2d/world/queries.d.ts +7 -6
  48. package/dist/features/physics/lib/2d/world/queries.js.map +2 -2
  49. package/dist/features/physics/lib/2d/world/rapier.js +22 -26
  50. package/dist/features/physics/lib/2d/world/rapier.js.map +2 -2
  51. package/dist/features/sprites/formats/aseprite.d.ts +5 -0
  52. package/dist/features/sprites/formats/texture-packer.d.ts +5 -0
  53. package/dist/features/sprites/index.d.ts +6 -0
  54. package/dist/features/sprites/loader.d.ts +25 -0
  55. package/dist/features/sprites/loader.js +6 -3
  56. package/dist/features/sprites/loader.js.map +2 -2
  57. package/dist/features/sprites/model.d.ts +75 -0
  58. package/dist/features/sprites/sprite.d.ts +22 -0
  59. package/dist/features/textures/index.d.ts +12 -2
  60. package/dist/features/textures/index.js +33 -1
  61. package/dist/features/textures/index.js.map +2 -2
  62. package/dist/features/textures/lib/chemical-field.d.ts +56 -0
  63. package/dist/features/textures/lib/chemical-field.js +154 -0
  64. package/dist/features/textures/lib/chemical-field.js.map +7 -0
  65. package/dist/features/textures/lib/chemical-recipes.d.ts +119 -0
  66. package/dist/features/textures/lib/chemical-recipes.js +275 -0
  67. package/dist/features/textures/lib/chemical-recipes.js.map +7 -0
  68. package/dist/features/textures/lib/definitions.d.ts +3 -18
  69. package/dist/features/textures/lib/definitions.js +17 -24
  70. package/dist/features/textures/lib/definitions.js.map +2 -2
  71. package/dist/features/textures/lib/geometric-patterns.d.ts +149 -0
  72. package/dist/features/textures/lib/geometric-patterns.js +305 -0
  73. package/dist/features/textures/lib/geometric-patterns.js.map +7 -0
  74. package/dist/features/textures/lib/gray-scott.d.ts +55 -0
  75. package/dist/features/textures/lib/gray-scott.js +37 -0
  76. package/dist/features/textures/lib/gray-scott.js.map +7 -0
  77. package/dist/features/textures/lib/palette.js +1 -3
  78. package/dist/features/textures/lib/palette.js.map +2 -2
  79. package/dist/features/textures/lib/patterns.d.ts +123 -0
  80. package/dist/features/textures/lib/patterns.js +344 -0
  81. package/dist/features/textures/lib/patterns.js.map +7 -0
  82. package/dist/features/textures/lib/rain-drops.js +2 -1
  83. package/dist/features/textures/lib/rain-drops.js.map +2 -2
  84. package/dist/features/textures/lib/reaction-diffusion.d.ts +3 -2
  85. package/dist/features/textures/lib/reaction-diffusion.js +9 -20
  86. package/dist/features/textures/lib/reaction-diffusion.js.map +2 -2
  87. package/dist/features/textures/lib/simulation.d.ts +10 -4
  88. package/dist/features/textures/lib/simulation.js +23 -13
  89. package/dist/features/textures/lib/simulation.js.map +2 -2
  90. package/dist/features/textures/lib/wasm/electric.js +8 -1
  91. package/dist/features/textures/lib/wasm/electric.js.map +2 -2
  92. package/dist/features/textures/lib/water-surface.js +1 -3
  93. package/dist/features/textures/lib/water-surface.js.map +2 -2
  94. package/dist/features/viz/index.d.ts +92 -5
  95. package/dist/features/viz/index.js +202 -4
  96. package/dist/features/viz/index.js.map +2 -2
  97. package/dist/features/viz/inspection/bar.d.ts +79 -0
  98. package/dist/features/viz/inspection/bar.js +49 -0
  99. package/dist/features/viz/inspection/bar.js.map +7 -0
  100. package/dist/features/viz/inspection/candle.d.ts +156 -0
  101. package/dist/features/viz/inspection/candle.js +120 -0
  102. package/dist/features/viz/inspection/candle.js.map +7 -0
  103. package/dist/features/viz/inspection/capture-types.d.ts +65 -0
  104. package/dist/features/viz/inspection/capture.d.ts +16 -0
  105. package/dist/features/viz/inspection/capture.js +49 -0
  106. package/dist/features/viz/inspection/capture.js.map +7 -0
  107. package/dist/features/viz/inspection/handler.d.ts +36 -0
  108. package/dist/features/viz/inspection/handler.js +91 -0
  109. package/dist/features/viz/inspection/handler.js.map +7 -0
  110. package/dist/features/viz/inspection/ohlc-bar.d.ts +132 -0
  111. package/dist/features/viz/inspection/ohlc-bar.js +118 -0
  112. package/dist/features/viz/inspection/ohlc-bar.js.map +7 -0
  113. package/dist/features/viz/inspection/owned-ref.d.ts +16 -0
  114. package/dist/features/viz/inspection/owned-ref.js +99 -0
  115. package/dist/features/viz/inspection/owned-ref.js.map +7 -0
  116. package/dist/features/viz/inspection/painted-point.d.ts +22 -0
  117. package/dist/features/viz/inspection/painted-point.js +29 -0
  118. package/dist/features/viz/inspection/painted-point.js.map +7 -0
  119. package/dist/features/viz/inspection/queries.d.ts +100 -0
  120. package/dist/features/viz/inspection/queries.js +192 -0
  121. package/dist/features/viz/inspection/queries.js.map +7 -0
  122. package/dist/features/viz/inspection/query-types.d.ts +177 -0
  123. package/dist/features/viz/inspection/volume.d.ts +104 -0
  124. package/dist/features/viz/inspection/volume.js +95 -0
  125. package/dist/features/viz/inspection/volume.js.map +7 -0
  126. package/dist/features/viz/inspection.d.ts +19 -0
  127. package/dist/features/viz/inspection.js +54 -0
  128. package/dist/features/viz/inspection.js.map +7 -0
  129. package/dist/features/viz/inspection.mjs +1 -0
  130. package/dist/features/viz/lib/area-series.d.ts +62 -0
  131. package/dist/features/viz/lib/area-series.js +120 -0
  132. package/dist/features/viz/lib/area-series.js.map +7 -0
  133. package/dist/features/viz/lib/axis-labels.d.ts +2 -0
  134. package/dist/features/viz/lib/axis-labels.js +41 -0
  135. package/dist/features/viz/lib/axis-labels.js.map +7 -0
  136. package/dist/features/viz/lib/axis-title.d.ts +23 -0
  137. package/dist/features/viz/lib/axis-title.js +24 -0
  138. package/dist/features/viz/lib/axis-title.js.map +7 -0
  139. package/dist/features/viz/lib/axis.d.ts +1 -1
  140. package/dist/features/viz/lib/axis.js +50 -50
  141. package/dist/features/viz/lib/axis.js.map +2 -2
  142. package/dist/features/viz/lib/bar-scale.d.ts +7 -0
  143. package/dist/features/viz/lib/bar-scale.js +34 -0
  144. package/dist/features/viz/lib/bar-scale.js.map +7 -0
  145. package/dist/features/viz/lib/bar-series.d.ts +3 -1
  146. package/dist/features/viz/lib/bar-series.js +21 -5
  147. package/dist/features/viz/lib/bar-series.js.map +2 -2
  148. package/dist/features/viz/lib/baseline-series.d.ts +55 -0
  149. package/dist/features/viz/lib/baseline-series.js +136 -0
  150. package/dist/features/viz/lib/baseline-series.js.map +7 -0
  151. package/dist/features/viz/lib/candlestick-series.d.ts +62 -0
  152. package/dist/features/viz/lib/candlestick-series.js +150 -0
  153. package/dist/features/viz/lib/candlestick-series.js.map +7 -0
  154. package/dist/features/viz/lib/censored-point-series.d.ts +71 -0
  155. package/dist/features/viz/lib/censored-point-series.js +129 -0
  156. package/dist/features/viz/lib/censored-point-series.js.map +7 -0
  157. package/dist/features/viz/lib/chart-lines.d.ts +41 -0
  158. package/dist/features/viz/lib/chart-lines.js +32 -0
  159. package/dist/features/viz/lib/chart-lines.js.map +7 -0
  160. package/dist/features/viz/lib/color-context.d.ts +4 -0
  161. package/dist/features/viz/lib/color-context.js +41 -0
  162. package/dist/features/viz/lib/color-context.js.map +7 -0
  163. package/dist/features/viz/lib/color-math.d.ts +4 -0
  164. package/dist/features/viz/lib/color-math.js +31 -0
  165. package/dist/features/viz/lib/color-math.js.map +7 -0
  166. package/dist/features/viz/lib/color-types.d.ts +53 -0
  167. package/dist/features/viz/lib/curve-definition.d.ts +49 -0
  168. package/dist/features/viz/lib/curve-definition.js +142 -0
  169. package/dist/features/viz/lib/curve-definition.js.map +7 -0
  170. package/dist/features/viz/lib/diverging-color-scale.d.ts +11 -0
  171. package/dist/features/viz/lib/diverging-color-scale.js +51 -0
  172. package/dist/features/viz/lib/diverging-color-scale.js.map +7 -0
  173. package/dist/features/viz/lib/domain-navigation.d.ts +40 -0
  174. package/dist/features/viz/lib/domain-navigation.js +77 -0
  175. package/dist/features/viz/lib/domain-navigation.js.map +7 -0
  176. package/dist/features/viz/lib/editable-chart-elements.d.ts +178 -0
  177. package/dist/features/viz/lib/editable-chart-elements.js +733 -0
  178. package/dist/features/viz/lib/editable-chart-elements.js.map +7 -0
  179. package/dist/features/viz/lib/financial-aggregation.d.ts +127 -0
  180. package/dist/features/viz/lib/financial-aggregation.js +116 -0
  181. package/dist/features/viz/lib/financial-aggregation.js.map +7 -0
  182. package/dist/features/viz/lib/financial-autoscale.d.ts +64 -0
  183. package/dist/features/viz/lib/financial-autoscale.js +61 -0
  184. package/dist/features/viz/lib/financial-autoscale.js.map +7 -0
  185. package/dist/features/viz/lib/financial-comparison.d.ts +62 -0
  186. package/dist/features/viz/lib/financial-comparison.js +98 -0
  187. package/dist/features/viz/lib/financial-comparison.js.map +7 -0
  188. package/dist/features/viz/lib/financial-geometry.d.ts +77 -0
  189. package/dist/features/viz/lib/financial-geometry.js +67 -0
  190. package/dist/features/viz/lib/financial-geometry.js.map +7 -0
  191. package/dist/features/viz/lib/financial-indicators.d.ts +114 -0
  192. package/dist/features/viz/lib/financial-indicators.js +135 -0
  193. package/dist/features/viz/lib/financial-indicators.js.map +7 -0
  194. package/dist/features/viz/lib/financial-oscillators.d.ts +171 -0
  195. package/dist/features/viz/lib/financial-oscillators.js +265 -0
  196. package/dist/features/viz/lib/financial-oscillators.js.map +7 -0
  197. package/dist/features/viz/lib/graph/bipartite.d.ts +14 -0
  198. package/dist/features/viz/lib/graph/bipartite.js +250 -0
  199. package/dist/features/viz/lib/graph/bipartite.js.map +7 -0
  200. package/dist/features/viz/lib/graph/chord.d.ts +44 -0
  201. package/dist/features/viz/lib/graph/chord.js +348 -0
  202. package/dist/features/viz/lib/graph/chord.js.map +7 -0
  203. package/dist/features/viz/lib/graph/dependency.d.ts +26 -0
  204. package/dist/features/viz/lib/graph/dependency.js +140 -0
  205. package/dist/features/viz/lib/graph/dependency.js.map +7 -0
  206. package/dist/features/viz/lib/graph/force.d.ts +28 -0
  207. package/dist/features/viz/lib/graph/force.js +580 -0
  208. package/dist/features/viz/lib/graph/force.js.map +7 -0
  209. package/dist/features/viz/lib/graph/hierarchy.d.ts +21 -0
  210. package/dist/features/viz/lib/graph/hierarchy.js +112 -0
  211. package/dist/features/viz/lib/graph/hierarchy.js.map +7 -0
  212. package/dist/features/viz/lib/graph/icicle.d.ts +16 -0
  213. package/dist/features/viz/lib/graph/icicle.js +153 -0
  214. package/dist/features/viz/lib/graph/icicle.js.map +7 -0
  215. package/dist/features/viz/lib/graph/matrix.d.ts +30 -0
  216. package/dist/features/viz/lib/graph/matrix.js +243 -0
  217. package/dist/features/viz/lib/graph/matrix.js.map +7 -0
  218. package/dist/features/viz/lib/graph/neighborhood.d.ts +11 -0
  219. package/dist/features/viz/lib/graph/neighborhood.js +281 -0
  220. package/dist/features/viz/lib/graph/neighborhood.js.map +7 -0
  221. package/dist/features/viz/lib/graph/routes.d.ts +35 -0
  222. package/dist/features/viz/lib/graph/routes.js +101 -0
  223. package/dist/features/viz/lib/graph/routes.js.map +7 -0
  224. package/dist/features/viz/lib/graph/sankey.d.ts +44 -0
  225. package/dist/features/viz/lib/graph/sankey.js +341 -0
  226. package/dist/features/viz/lib/graph/sankey.js.map +7 -0
  227. package/dist/features/viz/lib/graph/shared.d.ts +59 -0
  228. package/dist/features/viz/lib/graph/shared.js +301 -0
  229. package/dist/features/viz/lib/graph/shared.js.map +7 -0
  230. package/dist/features/viz/lib/graph/tree.d.ts +11 -0
  231. package/dist/features/viz/lib/graph/tree.js +232 -0
  232. package/dist/features/viz/lib/graph/tree.js.map +7 -0
  233. package/dist/features/viz/lib/graph/treemap.d.ts +20 -0
  234. package/dist/features/viz/lib/graph/treemap.js +227 -0
  235. package/dist/features/viz/lib/graph/treemap.js.map +7 -0
  236. package/dist/features/viz/lib/graph/types.d.ts +1097 -0
  237. package/dist/features/viz/lib/hover-card.js +8 -9
  238. package/dist/features/viz/lib/hover-card.js.map +2 -2
  239. package/dist/features/viz/lib/hover-data.d.ts +1 -1
  240. package/dist/features/viz/lib/hover-data.js +6 -3
  241. package/dist/features/viz/lib/hover-data.js.map +2 -2
  242. package/dist/features/viz/lib/hover-types.d.ts +5 -5
  243. package/dist/features/viz/lib/interval-band-series.d.ts +49 -0
  244. package/dist/features/viz/lib/interval-band-series.js +136 -0
  245. package/dist/features/viz/lib/interval-band-series.js.map +7 -0
  246. package/dist/features/viz/lib/interval-diamond-series.d.ts +43 -0
  247. package/dist/features/viz/lib/interval-diamond-series.js +122 -0
  248. package/dist/features/viz/lib/interval-diamond-series.js.map +7 -0
  249. package/dist/features/viz/lib/interval-series.d.ts +79 -0
  250. package/dist/features/viz/lib/interval-series.js +158 -0
  251. package/dist/features/viz/lib/interval-series.js.map +7 -0
  252. package/dist/features/viz/lib/layout-pie.js +9 -13
  253. package/dist/features/viz/lib/layout-pie.js.map +2 -2
  254. package/dist/features/viz/lib/line-series.d.ts +1 -1
  255. package/dist/features/viz/lib/line-series.js +47 -28
  256. package/dist/features/viz/lib/line-series.js.map +2 -2
  257. package/dist/features/viz/lib/linear-scale-component.d.ts +7 -0
  258. package/dist/features/viz/lib/linear-scale-component.js +18 -0
  259. package/dist/features/viz/lib/linear-scale-component.js.map +7 -0
  260. package/dist/features/viz/lib/linear-scale.js +1 -1
  261. package/dist/features/viz/lib/linear-scale.js.map +2 -2
  262. package/dist/features/viz/lib/log-scale-component.d.ts +7 -0
  263. package/dist/features/viz/lib/log-scale-component.js +19 -0
  264. package/dist/features/viz/lib/log-scale-component.js.map +7 -0
  265. package/dist/features/viz/lib/log-scale.d.ts +2 -0
  266. package/dist/features/viz/lib/log-scale.js +53 -0
  267. package/dist/features/viz/lib/log-scale.js.map +7 -0
  268. package/dist/features/viz/lib/monotone-curve.d.ts +11 -0
  269. package/dist/features/viz/lib/monotone-curve.js +63 -0
  270. package/dist/features/viz/lib/monotone-curve.js.map +7 -0
  271. package/dist/features/viz/lib/nearest.d.ts +9 -9
  272. package/dist/features/viz/lib/nearest.js.map +1 -1
  273. package/dist/features/viz/lib/numeric-range-interpolation.d.ts +15 -0
  274. package/dist/features/viz/lib/numeric-range-interpolation.js +36 -0
  275. package/dist/features/viz/lib/numeric-range-interpolation.js.map +7 -0
  276. package/dist/features/viz/lib/numeric-ticks.d.ts +38 -0
  277. package/dist/features/viz/lib/numeric-ticks.js +54 -0
  278. package/dist/features/viz/lib/numeric-ticks.js.map +7 -0
  279. package/dist/features/viz/lib/ohlc-bar-series.d.ts +55 -0
  280. package/dist/features/viz/lib/ohlc-bar-series.js +168 -0
  281. package/dist/features/viz/lib/ohlc-bar-series.js.map +7 -0
  282. package/dist/features/viz/lib/paired-series.d.ts +44 -0
  283. package/dist/features/viz/lib/paired-series.js +93 -0
  284. package/dist/features/viz/lib/paired-series.js.map +7 -0
  285. package/dist/features/viz/lib/pie-layout.js +2 -1
  286. package/dist/features/viz/lib/pie-layout.js.map +2 -2
  287. package/dist/features/viz/lib/plot-series.js +11 -6
  288. package/dist/features/viz/lib/plot-series.js.map +2 -2
  289. package/dist/features/viz/lib/plot-types.d.ts +4 -3
  290. package/dist/features/viz/lib/point-scale-component.d.ts +7 -0
  291. package/dist/features/viz/lib/point-scale-component.js +19 -0
  292. package/dist/features/viz/lib/point-scale-component.js.map +7 -0
  293. package/dist/features/viz/lib/point-scale.d.ts +2 -0
  294. package/dist/features/viz/lib/point-scale.js +45 -0
  295. package/dist/features/viz/lib/point-scale.js.map +7 -0
  296. package/dist/features/viz/lib/point-series.d.ts +1 -1
  297. package/dist/features/viz/lib/point-series.js +36 -9
  298. package/dist/features/viz/lib/point-series.js.map +2 -2
  299. package/dist/features/viz/lib/point-types.d.ts +5 -2
  300. package/dist/features/viz/lib/reference-band.d.ts +16 -0
  301. package/dist/features/viz/lib/reference-band.js +30 -0
  302. package/dist/features/viz/lib/reference-band.js.map +7 -0
  303. package/dist/features/viz/lib/scale-adjust.js +9 -4
  304. package/dist/features/viz/lib/scale-adjust.js.map +2 -2
  305. package/dist/features/viz/lib/scale-context.d.ts +5 -4
  306. package/dist/features/viz/lib/scale-context.js +15 -11
  307. package/dist/features/viz/lib/scale-context.js.map +2 -2
  308. package/dist/features/viz/lib/scale-provider.d.ts +2 -0
  309. package/dist/features/viz/lib/scale-provider.js +13 -0
  310. package/dist/features/viz/lib/scale-provider.js.map +7 -0
  311. package/dist/features/viz/lib/scale-ticks.d.ts +5 -0
  312. package/dist/features/viz/lib/scale-ticks.js +64 -0
  313. package/dist/features/viz/lib/scale-ticks.js.map +7 -0
  314. package/dist/features/viz/lib/scale-view.d.ts +4 -0
  315. package/dist/features/viz/lib/scale-view.js +21 -0
  316. package/dist/features/viz/lib/scale-view.js.map +7 -0
  317. package/dist/features/viz/lib/sequential-color-scale.d.ts +11 -0
  318. package/dist/features/viz/lib/sequential-color-scale.js +49 -0
  319. package/dist/features/viz/lib/sequential-color-scale.js.map +7 -0
  320. package/dist/features/viz/lib/series-position.d.ts +12 -0
  321. package/dist/features/viz/lib/series-position.js +44 -0
  322. package/dist/features/viz/lib/series-position.js.map +7 -0
  323. package/dist/features/viz/lib/step-curves.d.ts +19 -0
  324. package/dist/features/viz/lib/step-curves.js +53 -0
  325. package/dist/features/viz/lib/step-curves.js.map +7 -0
  326. package/dist/features/viz/lib/symlog-scale-component.d.ts +7 -0
  327. package/dist/features/viz/lib/symlog-scale-component.js +19 -0
  328. package/dist/features/viz/lib/symlog-scale-component.js.map +7 -0
  329. package/dist/features/viz/lib/symlog-scale.d.ts +2 -0
  330. package/dist/features/viz/lib/symlog-scale.js +38 -0
  331. package/dist/features/viz/lib/symlog-scale.js.map +7 -0
  332. package/dist/features/viz/lib/threshold-color-scale.d.ts +43 -0
  333. package/dist/features/viz/lib/threshold-color-scale.js +59 -0
  334. package/dist/features/viz/lib/threshold-color-scale.js.map +7 -0
  335. package/dist/features/viz/lib/trading-time-mapping.d.ts +32 -0
  336. package/dist/features/viz/lib/trading-time-mapping.js +89 -0
  337. package/dist/features/viz/lib/trading-time-mapping.js.map +7 -0
  338. package/dist/features/viz/lib/trading-time-scale.d.ts +83 -0
  339. package/dist/features/viz/lib/trading-time-scale.js +96 -0
  340. package/dist/features/viz/lib/trading-time-scale.js.map +7 -0
  341. package/dist/features/viz/lib/trajectory-series.d.ts +71 -0
  342. package/dist/features/viz/lib/trajectory-series.js +111 -0
  343. package/dist/features/viz/lib/trajectory-series.js.map +7 -0
  344. package/dist/features/viz/lib/types.d.ts +114 -21
  345. package/dist/features/viz/lib/use-bar-scale.d.ts +8 -0
  346. package/dist/features/viz/lib/use-bar-scale.js +9 -0
  347. package/dist/features/viz/lib/use-bar-scale.js.map +7 -0
  348. package/dist/features/viz/lib/use-continuous-scale.d.ts +8 -0
  349. package/dist/features/viz/lib/use-continuous-scale.js +14 -0
  350. package/dist/features/viz/lib/use-continuous-scale.js.map +7 -0
  351. package/dist/features/viz/lib/use-linear-scale.d.ts +8 -0
  352. package/dist/features/viz/lib/use-linear-scale.js +9 -0
  353. package/dist/features/viz/lib/use-linear-scale.js.map +7 -0
  354. package/dist/features/viz/lib/use-log-scale.d.ts +8 -0
  355. package/dist/features/viz/lib/use-log-scale.js +9 -0
  356. package/dist/features/viz/lib/use-log-scale.js.map +7 -0
  357. package/dist/features/viz/lib/use-point-scale.d.ts +8 -0
  358. package/dist/features/viz/lib/use-point-scale.js +9 -0
  359. package/dist/features/viz/lib/use-point-scale.js.map +7 -0
  360. package/dist/features/viz/lib/use-symlog-scale.d.ts +8 -0
  361. package/dist/features/viz/lib/use-symlog-scale.js +9 -0
  362. package/dist/features/viz/lib/use-symlog-scale.js.map +7 -0
  363. package/dist/features/viz/lib/use-utc-scale.d.ts +8 -0
  364. package/dist/features/viz/lib/use-utc-scale.js +9 -0
  365. package/dist/features/viz/lib/use-utc-scale.js.map +7 -0
  366. package/dist/features/viz/lib/utc-labels.d.ts +12 -0
  367. package/dist/features/viz/lib/utc-labels.js +27 -0
  368. package/dist/features/viz/lib/utc-labels.js.map +7 -0
  369. package/dist/features/viz/lib/utc-scale-component.d.ts +7 -0
  370. package/dist/features/viz/lib/utc-scale-component.js +18 -0
  371. package/dist/features/viz/lib/utc-scale-component.js.map +7 -0
  372. package/dist/features/viz/lib/utc-scale.d.ts +21 -0
  373. package/dist/features/viz/lib/utc-scale.js +124 -0
  374. package/dist/features/viz/lib/utc-scale.js.map +7 -0
  375. package/dist/features/viz/lib/volume-series.d.ts +59 -0
  376. package/dist/features/viz/lib/volume-series.js +117 -0
  377. package/dist/features/viz/lib/volume-series.js.map +7 -0
  378. package/dist/features/viz/lib/weighted-point-series.d.ts +71 -0
  379. package/dist/features/viz/lib/weighted-point-series.js +169 -0
  380. package/dist/features/viz/lib/weighted-point-series.js.map +7 -0
  381. package/dist/filters/backdrop-contrast-gpu.d.ts +5 -0
  382. package/dist/filters/backdrop-contrast-gpu.js +33 -0
  383. package/dist/filters/backdrop-contrast-gpu.js.map +7 -0
  384. package/dist/filters/backdrop-contrast.d.ts +21 -0
  385. package/dist/filters/backdrop-contrast.js +61 -0
  386. package/dist/filters/backdrop-contrast.js.map +7 -0
  387. package/dist/filters/displacement.js +1 -1
  388. package/dist/filters/displacement.js.map +2 -2
  389. package/dist/filters/emboss-gpu.d.ts +4 -0
  390. package/dist/filters/emboss-gpu.js +39 -0
  391. package/dist/filters/emboss-gpu.js.map +7 -0
  392. package/dist/filters/emboss.d.ts +32 -0
  393. package/dist/filters/emboss.js +104 -0
  394. package/dist/filters/emboss.js.map +7 -0
  395. package/dist/filters/filter-executor.d.ts +11 -4
  396. package/dist/filters/filter-executor.js +104 -49
  397. package/dist/filters/filter-executor.js.map +2 -2
  398. package/dist/filters/reflected-light.js +1 -1
  399. package/dist/filters/reflected-light.js.map +2 -2
  400. package/dist/filters/reflection-gpu.d.ts +3 -1
  401. package/dist/filters/reflection-gpu.js +5 -2
  402. package/dist/filters/reflection-gpu.js.map +2 -2
  403. package/dist/filters/render-backdrop-contrast-boundary.d.ts +31 -0
  404. package/dist/filters/render-backdrop-contrast-boundary.js +116 -0
  405. package/dist/filters/render-backdrop-contrast-boundary.js.map +7 -0
  406. package/dist/filters/render-emboss-boundary.d.ts +13 -0
  407. package/dist/filters/render-emboss-boundary.js +131 -0
  408. package/dist/filters/render-emboss-boundary.js.map +7 -0
  409. package/dist/filters.d.ts +9 -5
  410. package/dist/filters.js +4 -0
  411. package/dist/filters.js.map +2 -2
  412. package/dist/index.d.ts +10 -6
  413. package/dist/index.js +18 -2
  414. package/dist/index.js.map +2 -2
  415. package/dist/internal.d.ts +4 -0
  416. package/dist/internal.js +6 -0
  417. package/dist/internal.js.map +2 -2
  418. package/dist/layout-kernel.d.ts +12 -0
  419. package/dist/layout-kernel.js +11 -0
  420. package/dist/layout-kernel.js.map +7 -0
  421. package/dist/layout-kernel.mjs +1 -0
  422. package/dist/lib/animation/definition.d.ts +5 -3
  423. package/dist/lib/animation/definition.js +29 -4
  424. package/dist/lib/animation/definition.js.map +2 -2
  425. package/dist/lib/animation/playback.d.ts +8 -0
  426. package/dist/lib/animation/playback.js +33 -11
  427. package/dist/lib/animation/playback.js.map +2 -2
  428. package/dist/lib/animation/spring.d.ts +3 -1
  429. package/dist/lib/animation/spring.js.map +2 -2
  430. package/dist/lib/animation/types.d.ts +29 -73
  431. package/dist/lib/backend/types.d.ts +13 -1
  432. package/dist/lib/backend/types.js.map +2 -2
  433. package/dist/lib/components/arc-geometry.js +2 -1
  434. package/dist/lib/components/arc-geometry.js.map +2 -2
  435. package/dist/lib/components/g.js +2 -0
  436. package/dist/lib/components/g.js.map +2 -2
  437. package/dist/lib/components/html-box.js +2 -1
  438. package/dist/lib/components/html-box.js.map +2 -2
  439. package/dist/lib/components/img.js +3 -3
  440. package/dist/lib/components/img.js.map +2 -2
  441. package/dist/lib/components/layer.js +98 -16
  442. package/dist/lib/components/layer.js.map +3 -3
  443. package/dist/lib/components/text.d.ts +16 -0
  444. package/dist/lib/components/text.js +131 -24
  445. package/dist/lib/components/text.js.map +2 -2
  446. package/dist/lib/define-primitive.d.ts +4 -2
  447. package/dist/lib/define-primitive.js +3 -1
  448. package/dist/lib/define-primitive.js.map +2 -2
  449. package/dist/lib/element/metadata.d.ts +9 -0
  450. package/dist/lib/element/metadata.js +19 -0
  451. package/dist/lib/element/metadata.js.map +2 -2
  452. package/dist/lib/element/resolve-primitive-inputs.d.ts +2 -0
  453. package/dist/lib/element/resolve-primitive-inputs.js +17 -4
  454. package/dist/lib/element/resolve-primitive-inputs.js.map +2 -2
  455. package/dist/lib/events/event-facade.d.ts +18 -0
  456. package/dist/lib/events/event-facade.js +28 -2
  457. package/dist/lib/events/event-facade.js.map +2 -2
  458. package/dist/lib/events/hit-test.js +2 -1
  459. package/dist/lib/events/hit-test.js.map +2 -2
  460. package/dist/lib/events/propagation.d.ts +2 -1
  461. package/dist/lib/events/propagation.js +22 -16
  462. package/dist/lib/events/propagation.js.map +2 -2
  463. package/dist/lib/events/registrations.d.ts +10 -0
  464. package/dist/lib/events/registrations.js +160 -5
  465. package/dist/lib/events/registrations.js.map +2 -2
  466. package/dist/lib/execute-render.js +25 -1
  467. package/dist/lib/execute-render.js.map +2 -2
  468. package/dist/lib/filter/filter-region.js +3 -10
  469. package/dist/lib/filter/filter-region.js.map +2 -2
  470. package/dist/lib/focus/focus-manager.d.ts +8 -1
  471. package/dist/lib/focus/focus-manager.js +87 -43
  472. package/dist/lib/focus/focus-manager.js.map +2 -2
  473. package/dist/lib/focus/geometry.d.ts +2 -0
  474. package/dist/lib/focus/geometry.js +6 -0
  475. package/dist/lib/focus/geometry.js.map +2 -2
  476. package/dist/lib/geometry/path-bend-guide.js +1 -1
  477. package/dist/lib/geometry/path-bend-guide.js.map +2 -2
  478. package/dist/lib/geometry/path-geometry.js +12 -11
  479. package/dist/lib/geometry/path-geometry.js.map +2 -2
  480. package/dist/lib/geometry/path-transforms.js +17 -21
  481. package/dist/lib/geometry/path-transforms.js.map +2 -2
  482. package/dist/lib/geometry/path-warp-bezier.js +3 -1
  483. package/dist/lib/geometry/path-warp-bezier.js.map +2 -2
  484. package/dist/lib/geometry/path-warp.js +1 -1
  485. package/dist/lib/geometry/path-warp.js.map +2 -2
  486. package/dist/lib/global-state.js +2 -0
  487. package/dist/lib/global-state.js.map +2 -2
  488. package/dist/lib/hooks/use-animated-value.d.ts +11 -21
  489. package/dist/lib/hooks/use-animated-value.js +23 -70
  490. package/dist/lib/hooks/use-animated-value.js.map +3 -3
  491. package/dist/lib/hooks/use-playback.js +1 -0
  492. package/dist/lib/hooks/use-playback.js.map +2 -2
  493. package/dist/lib/html/html-events.d.ts +32 -0
  494. package/dist/lib/html/html-events.js +179 -0
  495. package/dist/lib/html/html-events.js.map +7 -0
  496. package/dist/lib/html/html-service.d.ts +8 -2
  497. package/dist/lib/html/html-service.js +198 -65
  498. package/dist/lib/html/html-service.js.map +2 -2
  499. package/dist/lib/html/overlay-config.js +7 -6
  500. package/dist/lib/html/overlay-config.js.map +2 -2
  501. package/dist/lib/html/types.d.ts +29 -2
  502. package/dist/lib/layout/absolute.d.ts +11 -5
  503. package/dist/lib/layout/absolute.js +329 -55
  504. package/dist/lib/layout/absolute.js.map +3 -3
  505. package/dist/lib/layout/allocation-checkpoint-owner.d.ts +11 -0
  506. package/dist/lib/layout/allocation-checkpoint-owner.js +86 -0
  507. package/dist/lib/layout/allocation-checkpoint-owner.js.map +7 -0
  508. package/dist/lib/layout/allocation-checkpoint.d.ts +53 -0
  509. package/dist/lib/layout/allocation-checkpoint.js +463 -0
  510. package/dist/lib/layout/allocation-checkpoint.js.map +7 -0
  511. package/dist/lib/layout/allocation-dependencies.d.ts +30 -0
  512. package/dist/lib/layout/allocation-dependencies.js +90 -0
  513. package/dist/lib/layout/allocation-dependencies.js.map +7 -0
  514. package/dist/lib/layout/allocation-revision.d.ts +13 -0
  515. package/dist/lib/layout/allocation-revision.js +67 -0
  516. package/dist/lib/layout/allocation-revision.js.map +7 -0
  517. package/dist/lib/layout/box-insets.d.ts +17 -0
  518. package/dist/lib/layout/box-insets.js +138 -0
  519. package/dist/lib/layout/box-insets.js.map +7 -0
  520. package/dist/lib/layout/box-sizing.d.ts +16 -0
  521. package/dist/lib/layout/box-sizing.js +77 -0
  522. package/dist/lib/layout/box-sizing.js.map +7 -0
  523. package/dist/lib/layout/box.js +42 -12
  524. package/dist/lib/layout/box.js.map +2 -2
  525. package/dist/lib/layout/canvas-measurement.d.ts +13 -0
  526. package/dist/lib/layout/canvas-measurement.js +57 -0
  527. package/dist/lib/layout/canvas-measurement.js.map +7 -0
  528. package/dist/lib/layout/context.d.ts +35 -6
  529. package/dist/lib/layout/context.js +72 -3
  530. package/dist/lib/layout/context.js.map +2 -2
  531. package/dist/lib/layout/define-layout-component.d.ts +23 -0
  532. package/dist/lib/layout/define-layout-component.js +84 -0
  533. package/dist/lib/layout/define-layout-component.js.map +7 -0
  534. package/dist/lib/layout/flex-allocation-cache.d.ts +42 -0
  535. package/dist/lib/layout/flex-baseline-mode.d.ts +2 -0
  536. package/dist/lib/layout/flex-baseline-mode.js +7 -0
  537. package/dist/lib/layout/flex-baseline-mode.js.map +7 -0
  538. package/dist/lib/layout/flex.d.ts +50 -15
  539. package/dist/lib/layout/flex.js +2124 -195
  540. package/dist/lib/layout/flex.js.map +3 -3
  541. package/dist/lib/layout/flow.js +225 -49
  542. package/dist/lib/layout/flow.js.map +2 -2
  543. package/dist/lib/layout/geometry-publication.d.ts +53 -0
  544. package/dist/lib/layout/geometry-publication.js +244 -0
  545. package/dist/lib/layout/geometry-publication.js.map +7 -0
  546. package/dist/lib/layout/grid-kernel.d.ts +63 -0
  547. package/dist/lib/layout/grid-kernel.js +168 -0
  548. package/dist/lib/layout/grid-kernel.js.map +7 -0
  549. package/dist/lib/layout/grid.d.ts +63 -4
  550. package/dist/lib/layout/grid.js +767 -171
  551. package/dist/lib/layout/grid.js.map +3 -3
  552. package/dist/lib/layout/measure.d.ts +55 -3
  553. package/dist/lib/layout/measure.js +448 -15
  554. package/dist/lib/layout/measure.js.map +2 -2
  555. package/dist/lib/layout/overlay.js +81 -23
  556. package/dist/lib/layout/overlay.js.map +2 -2
  557. package/dist/lib/layout/participation.d.ts +27 -0
  558. package/dist/lib/layout/participation.js +188 -0
  559. package/dist/lib/layout/participation.js.map +7 -0
  560. package/dist/lib/layout/place-child.js +1 -1
  561. package/dist/lib/layout/place-child.js.map +2 -2
  562. package/dist/lib/layout/positioning-diagnostics.d.ts +1 -1
  563. package/dist/lib/layout/positioning-diagnostics.js +13 -2
  564. package/dist/lib/layout/positioning-diagnostics.js.map +2 -2
  565. package/dist/lib/layout/prepared-root.d.ts +121 -0
  566. package/dist/lib/layout/prepared-root.js +360 -0
  567. package/dist/lib/layout/prepared-root.js.map +7 -0
  568. package/dist/lib/layout/standalone-kernel.d.ts +60 -0
  569. package/dist/lib/layout/standalone-kernel.js +722 -0
  570. package/dist/lib/layout/standalone-kernel.js.map +7 -0
  571. package/dist/lib/layout/topology.d.ts +21 -0
  572. package/dist/lib/layout/topology.js +113 -0
  573. package/dist/lib/layout/topology.js.map +7 -0
  574. package/dist/lib/layout/types.d.ts +5 -0
  575. package/dist/lib/layout/wasm/artifact.d.ts +1 -0
  576. package/dist/lib/layout/wasm/artifact.js +5 -0
  577. package/dist/lib/layout/wasm/artifact.js.map +7 -0
  578. package/dist/lib/layout/wasm/bytes.d.ts +1 -0
  579. package/dist/lib/layout/wasm/bytes.js +5 -0
  580. package/dist/lib/layout/wasm/bytes.js.map +7 -0
  581. package/dist/lib/layout/wasm/embedded.d.ts +2 -0
  582. package/dist/lib/layout/wasm/embedded.js +12 -0
  583. package/dist/lib/layout/wasm/embedded.js.map +7 -0
  584. package/dist/lib/layout/wasm/layout.wasm +0 -0
  585. package/dist/lib/layout/wasm/module.d.ts +8 -0
  586. package/dist/lib/layout/wasm/module.js +70 -0
  587. package/dist/lib/layout/wasm/module.js.map +7 -0
  588. package/dist/lib/layout/wasm/region.d.ts +267 -0
  589. package/dist/lib/layout/wasm/region.js +1018 -0
  590. package/dist/lib/layout/wasm/region.js.map +7 -0
  591. package/dist/lib/manipulation/controller.js +4 -7
  592. package/dist/lib/manipulation/controller.js.map +2 -2
  593. package/dist/lib/manipulation/frame.js +1 -1
  594. package/dist/lib/manipulation/frame.js.map +2 -2
  595. package/dist/lib/manipulation/handles.js +32 -33
  596. package/dist/lib/manipulation/handles.js.map +2 -2
  597. package/dist/lib/manipulation/solve.js +12 -10
  598. package/dist/lib/manipulation/solve.js.map +2 -2
  599. package/dist/lib/mount-pibbl.js +1 -0
  600. package/dist/lib/mount-pibbl.js.map +2 -2
  601. package/dist/lib/mount-prepared-pibbl.d.ts +5 -0
  602. package/dist/lib/mount-prepared-pibbl.js +29 -0
  603. package/dist/lib/mount-prepared-pibbl.js.map +7 -0
  604. package/dist/lib/mount-request.d.ts +8 -0
  605. package/dist/lib/mount-request.js +41 -0
  606. package/dist/lib/mount-request.js.map +7 -0
  607. package/dist/lib/pibbl.d.ts +21 -13
  608. package/dist/lib/pibbl.js +18 -16
  609. package/dist/lib/pibbl.js.map +2 -2
  610. package/dist/lib/recording/recording.d.ts +43 -0
  611. package/dist/lib/recording/recording.js +555 -0
  612. package/dist/lib/recording/recording.js.map +7 -0
  613. package/dist/lib/recording/types.d.ts +118 -0
  614. package/dist/lib/recording/wasm-bytes.d.ts +1 -0
  615. package/dist/lib/recording/wasm-bytes.js +5 -0
  616. package/dist/lib/recording/wasm-bytes.js.map +7 -0
  617. package/dist/lib/recording/worker-source.d.ts +1 -0
  618. package/dist/lib/recording/worker-source.js +5 -0
  619. package/dist/lib/recording/worker-source.js.map +7 -0
  620. package/dist/lib/render-layer/controller.d.ts +9 -3
  621. package/dist/lib/render-layer/controller.js +259 -110
  622. package/dist/lib/render-layer/controller.js.map +2 -2
  623. package/dist/lib/render-transaction.d.ts +12 -2
  624. package/dist/lib/render-transaction.js +69 -1
  625. package/dist/lib/render-transaction.js.map +2 -2
  626. package/dist/lib/render.js +32 -8
  627. package/dist/lib/render.js.map +2 -2
  628. package/dist/lib/scheduler/realm-scheduler.d.ts +2 -0
  629. package/dist/lib/scheduler/realm-scheduler.js +55 -26
  630. package/dist/lib/scheduler/realm-scheduler.js.map +2 -2
  631. package/dist/lib/scheduler/renderer-participant.js +1 -0
  632. package/dist/lib/scheduler/renderer-participant.js.map +2 -2
  633. package/dist/lib/series-inspection-frame.d.ts +18 -0
  634. package/dist/lib/series-inspection-frame.js +70 -0
  635. package/dist/lib/series-inspection-frame.js.map +7 -0
  636. package/dist/lib/signals/edge.d.ts +7 -4
  637. package/dist/lib/signals/edge.js +25 -3
  638. package/dist/lib/signals/edge.js.map +2 -2
  639. package/dist/lib/signals/graph.d.ts +16 -2
  640. package/dist/lib/signals/graph.js +54 -12
  641. package/dist/lib/signals/graph.js.map +2 -2
  642. package/dist/lib/signals/input-provision.d.ts +15 -0
  643. package/dist/lib/signals/input-provision.js +53 -3
  644. package/dist/lib/signals/input-provision.js.map +2 -2
  645. package/dist/lib/signals/render-consumer.d.ts +3 -0
  646. package/dist/lib/signals/render-consumer.js +22 -14
  647. package/dist/lib/signals/render-consumer.js.map +2 -2
  648. package/dist/lib/style/positioning.d.ts +50 -2
  649. package/dist/lib/style/positioning.js +28 -4
  650. package/dist/lib/style/positioning.js.map +2 -2
  651. package/dist/lib/style/resolve-built-in.d.ts +4 -3
  652. package/dist/lib/style/resolve-built-in.js +17 -3
  653. package/dist/lib/style/resolve-built-in.js.map +2 -2
  654. package/dist/lib/style/resolve-dispatch.d.ts +3 -0
  655. package/dist/lib/style/resolve-dispatch.js +77 -4
  656. package/dist/lib/style/resolve-dispatch.js.map +2 -2
  657. package/dist/lib/style/resolve-length.d.ts +2 -0
  658. package/dist/lib/style/resolve-length.js +13 -9
  659. package/dist/lib/style/resolve-length.js.map +2 -2
  660. package/dist/lib/style/sizing-length.d.ts +51 -0
  661. package/dist/lib/style/sizing-length.js +77 -0
  662. package/dist/lib/style/sizing-length.js.map +7 -0
  663. package/dist/lib/style/types.d.ts +63 -25
  664. package/dist/lib/surface/root-surface.js +10 -6
  665. package/dist/lib/surface/root-surface.js.map +2 -2
  666. package/dist/lib/textures/texture.js +10 -8
  667. package/dist/lib/textures/texture.js.map +2 -2
  668. package/dist/lib/transitions/capture.js +4 -1
  669. package/dist/lib/transitions/capture.js.map +2 -2
  670. package/dist/lib/transitions/embers-physics.js +17 -10
  671. package/dist/lib/transitions/embers-physics.js.map +2 -2
  672. package/dist/lib/types.d.ts +110 -1
  673. package/dist/sync.d.ts +16 -0
  674. package/dist/sync.js +13 -0
  675. package/dist/sync.js.map +7 -0
  676. package/dist/sync.mjs +1 -0
  677. package/package.json +43 -6
  678. package/dist/features/viz/lib/scale.d.ts +0 -11
  679. package/dist/features/viz/lib/scale.js +0 -80
  680. package/dist/features/viz/lib/scale.js.map +0 -7
  681. package/dist/features/viz/lib/use-scale.d.ts +0 -20
  682. package/dist/features/viz/lib/use-scale.js +0 -10
  683. package/dist/features/viz/lib/use-scale.js.map +0 -7
@@ -0,0 +1,83 @@
1
+ import { type SignalValue, type PibblNode, type Signal } from "@pibbl/core";
2
+ import type { ScaleId, ScaleRange, ScaleLayoutStyle } from "./types.js";
3
+ import type { SignalStyle } from "@pibbl/core/internal";
4
+ /** Controlled gapless observation slots; UTCScale retains elapsed-time semantics.
5
+ * @see {@link TradingTimeScale}
6
+ */
7
+ export interface TradingTimeScaleProps {
8
+ /** Ancestor scale identity. */ readonly id: ScaleId;
9
+ /** Strictly increasing, unique UTC-millisecond observations; copied by the mapping. */ readonly timestamps: SignalValue<readonly number[]>;
10
+ /** Visible logical slot endpoints, possibly fractional/reversed; default covers supplied slots. */ readonly logicalRange?: SignalValue<readonly [number, number]>;
11
+ /** Output in local logical units or the receiving allocation's width/height. */ readonly range: SignalValue<ScaleRange>;
12
+ /** Reverses physical output without reordering supplied observations. */ readonly reverse?: SignalValue<boolean>;
13
+ /** Receiving scale frame allocation and layout participation. */ readonly style?: SignalValue<SignalStyle<ScaleLayoutStyle>>;
14
+ /** Descendant visualization composition. */ readonly children?: PibblNode;
15
+ }
16
+ /** Dedicated exact-time/slot mapping; no interpolated UTC timestamps are fabricated.
17
+ * @see {@link TradingTimeScale}
18
+ */
19
+ export interface ResolvedTradingTimeScale {
20
+ /** Describes this resolved mapping. */ readonly type: "trading-time";
21
+ /** Owned supplied timestamps in ascending order, also used as the data domain. */ readonly timestamps: readonly number[];
22
+ /** Owned supplied timestamp domain, not logical slot endpoints. */ readonly domain: readonly number[];
23
+ /** Controlled viewport endpoints in logical slot units. */ readonly logicalRange: readonly [
24
+ number,
25
+ number
26
+ ];
27
+ /** Output local-logical endpoints. */ readonly range: readonly [
28
+ number,
29
+ number
30
+ ];
31
+ /** Receiving allocation in local logical units. */ readonly frame: Readonly<{
32
+ /** Local allocation x. */ x: number;
33
+ /** Local allocation y. */ y: number;
34
+ /** Local width. */ width: number;
35
+ /** Local height. */ height: number;
36
+ }>;
37
+ /** Maps an exact supplied UTC timestamp; unknown timestamps throw.
38
+ * @param time - Supplied UTC milliseconds.
39
+ * @returns Series-local coordinate.
40
+ */ map(time: number): number;
41
+ /** Maps a possibly fractional logical slot, including viewport whitespace.
42
+ * @param slot - Logical observation slot.
43
+ * @returns Series-local coordinate.
44
+ */ mapSlot(slot: number): number;
45
+ /** Exact timestamp lookup.
46
+ * @param time - UTC milliseconds.
47
+ * @returns Supplied slot index, or undefined.
48
+ */ slotAtTime(time: number): number | undefined;
49
+ /** Exact integer slot lookup.
50
+ * @param slot - Integer logical observation slot.
51
+ * @returns Supplied timestamp, or undefined.
52
+ */ timeAtSlot(slot: number): number | undefined;
53
+ /** Inverts local geometry to fractional slots.
54
+ * @param position - Series-local logical coordinate.
55
+ * @returns Fractional logical slot.
56
+ */ slotAtPosition(position: number): number;
57
+ /** Selects a supplied timestamp; ties choose earlier, outside positions clamp.
58
+ * @param position - Series-local logical coordinate.
59
+ * @returns Supplied UTC milliseconds, or undefined for empty input.
60
+ */ nearestTimeAtPosition(position: number): number | undefined;
61
+ /** Chooses at most count visible supplied observations as date ticks.
62
+ * @param count - Integer maximum from zero through 100, default five.
63
+ * @returns Original UTC timestamps in physical axis order.
64
+ */ ticks(count?: number): readonly number[];
65
+ /** Formats supplied or finite valid UTC timestamps without inferring sessions.
66
+ * @param time - UTC milliseconds in Date range.
67
+ * @returns ISO UTC timestamp.
68
+ */ formatTick(time: number): string;
69
+ }
70
+ /**
71
+ * Reads a stable dedicated ancestor trading-time signal.
72
+ * @param id - Ancestor TradingTimeScale identity.
73
+ * @returns Readonly mapping with explicit timestamp and logical-slot operations.
74
+ * @see {@link TradingTimeScale}
75
+ */
76
+ export declare function useTradingTimeScale(id: ScaleId): Signal<ResolvedTradingTimeScale>;
77
+ /**
78
+ * Provides gapless positions for ordered supplied observations, leaving application-owned viewport control explicit.
79
+ * @param props - Timestamps, optional logical viewport, output range and children.
80
+ * @returns Descendant composition in the named mapping scope.
81
+ * @see {@link TradingTimeScaleProps}
82
+ */
83
+ export declare function TradingTimeScale(props: TradingTimeScaleProps): PibblNode;
@@ -0,0 +1,96 @@
1
+ import {
2
+ resolveSignalValue,
3
+ useLayoutBox
4
+ } from "@pibbl/core";
5
+ import { createTradingTimeMapping } from "./trading-time-mapping.js";
6
+ import { resolveLinearScale } from "./linear-scale.js";
7
+ import { useScaleProvider } from "./scale-provider.js";
8
+ import { scaleView } from "./scale-view.js";
9
+ const views = /* @__PURE__ */ new WeakMap();
10
+ function useTradingTimeScale(id) {
11
+ return scaleView(
12
+ views,
13
+ id,
14
+ "useTradingTimeScale",
15
+ (kind) => kind === "trading-time"
16
+ );
17
+ }
18
+ function TradingTimeScale(props) {
19
+ const { width, height } = useLayoutBox();
20
+ useScaleProvider(
21
+ props.id,
22
+ "trading-time",
23
+ () => {
24
+ const timestamps = Object.freeze([
25
+ ...resolveSignalValue(props.timestamps)
26
+ ]);
27
+ const logicalRange = Object.freeze([
28
+ ...props.logicalRange ? resolveSignalValue(props.logicalRange) : [-0.5, Math.max(0.5, timestamps.length - 0.5)]
29
+ ]);
30
+ const linear = resolveLinearScale(
31
+ logicalRange,
32
+ resolveSignalValue(props.range),
33
+ resolveSignalValue(props.reverse ?? false),
34
+ width,
35
+ height
36
+ );
37
+ const mapping = createTradingTimeMapping({
38
+ timestamps,
39
+ logicalRange,
40
+ range: linear.range
41
+ });
42
+ return Object.freeze({
43
+ type: "trading-time",
44
+ timestamps,
45
+ domain: timestamps,
46
+ logicalRange,
47
+ range: linear.range,
48
+ frame: linear.frame,
49
+ map: mapping.mapTime,
50
+ mapSlot: linear.map,
51
+ slotAtTime: mapping.slotAtTime,
52
+ timeAtSlot: mapping.timeAtSlot,
53
+ slotAtPosition: mapping.slotAtPosition,
54
+ nearestTimeAtPosition: mapping.nearestTimeAtPosition,
55
+ ticks(count = 5) {
56
+ if (!Number.isInteger(count) || count < 0 || count > 100)
57
+ throw new RangeError(
58
+ "TradingTime ticks count must be an integer 0\u2013100."
59
+ );
60
+ const lo = Math.max(0, Math.ceil(Math.min(...logicalRange))), hi = Math.min(
61
+ timestamps.length - 1,
62
+ Math.floor(Math.max(...logicalRange))
63
+ ), n = Math.max(0, hi - lo + 1), m = Math.min(n, count);
64
+ const result = Array.from(
65
+ { length: m },
66
+ (_, i) => timestamps[lo + (m === 1 ? 0 : Math.round(i * (n - 1) / (m - 1)))]
67
+ );
68
+ return Object.freeze(
69
+ logicalRange[0] > logicalRange[1] ? result.reverse() : result
70
+ );
71
+ },
72
+ formatTick(time) {
73
+ if (!Number.isFinite(time) || Math.abs(time) > 864e13)
74
+ throw new RangeError(
75
+ "TradingTime format requires UTC milliseconds within Date range."
76
+ );
77
+ return new Date(time).toISOString();
78
+ }
79
+ });
80
+ },
81
+ [
82
+ props.timestamps,
83
+ props.logicalRange,
84
+ props.range,
85
+ props.reverse,
86
+ width,
87
+ height
88
+ ]
89
+ );
90
+ return props.children;
91
+ }
92
+ export {
93
+ TradingTimeScale,
94
+ useTradingTimeScale
95
+ };
96
+ //# sourceMappingURL=trading-time-scale.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/features/viz/lib/trading-time-scale.ts"],
4
+ "sourcesContent": ["import {\n resolveSignalValue,\n useLayoutBox,\n type SignalValue,\n type PibblNode,\n type Signal,\n} from \"@pibbl/core\";\nimport type {\n ScaleId,\n ScaleRange,\n ScaleLayoutStyle,\n ResolvedScale,\n} from \"./types.js\";\nimport type { SignalStyle } from \"@pibbl/core/internal\";\nimport { createTradingTimeMapping } from \"./trading-time-mapping.js\";\nimport { resolveLinearScale } from \"./linear-scale.js\";\nimport { useScaleProvider } from \"./scale-provider.js\";\nimport { scaleView } from \"./scale-view.js\";\n\n/** Controlled gapless observation slots; UTCScale retains elapsed-time semantics.\n * @see {@link TradingTimeScale}\n */\nexport interface TradingTimeScaleProps {\n /** Ancestor scale identity. */ readonly id: ScaleId;\n /** Strictly increasing, unique UTC-millisecond observations; copied by the mapping. */ readonly timestamps: SignalValue<\n readonly number[]\n >;\n /** Visible logical slot endpoints, possibly fractional/reversed; default covers supplied slots. */ readonly logicalRange?: SignalValue<\n readonly [number, number]\n >;\n /** Output in local logical units or the receiving allocation's width/height. */ readonly range: SignalValue<ScaleRange>;\n /** Reverses physical output without reordering supplied observations. */ readonly reverse?: SignalValue<boolean>;\n /** Receiving scale frame allocation and layout participation. */ readonly style?: SignalValue<\n SignalStyle<ScaleLayoutStyle>\n >;\n /** Descendant visualization composition. */ readonly children?: PibblNode;\n}\n/** Dedicated exact-time/slot mapping; no interpolated UTC timestamps are fabricated.\n * @see {@link TradingTimeScale}\n */\nexport interface ResolvedTradingTimeScale {\n /** Describes this resolved mapping. */ readonly type: \"trading-time\";\n /** Owned supplied timestamps in ascending order, also used as the data domain. */ readonly timestamps: readonly number[];\n /** Owned supplied timestamp domain, not logical slot endpoints. */ readonly domain: readonly number[];\n /** Controlled viewport endpoints in logical slot units. */ readonly logicalRange: readonly [\n number,\n number,\n ];\n /** Output local-logical endpoints. */ readonly range: readonly [\n number,\n number,\n ];\n /** Receiving allocation in local logical units. */ readonly frame: Readonly<{\n /** Local allocation x. */ x: number;\n /** Local allocation y. */ y: number;\n /** Local width. */ width: number;\n /** Local height. */ height: number;\n }>;\n /** Maps an exact supplied UTC timestamp; unknown timestamps throw.\n * @param time - Supplied UTC milliseconds.\n * @returns Series-local coordinate.\n */ map(time: number): number;\n /** Maps a possibly fractional logical slot, including viewport whitespace.\n * @param slot - Logical observation slot.\n * @returns Series-local coordinate.\n */ mapSlot(slot: number): number;\n /** Exact timestamp lookup.\n * @param time - UTC milliseconds.\n * @returns Supplied slot index, or undefined.\n */ slotAtTime(time: number): number | undefined;\n /** Exact integer slot lookup.\n * @param slot - Integer logical observation slot.\n * @returns Supplied timestamp, or undefined.\n */ timeAtSlot(slot: number): number | undefined;\n /** Inverts local geometry to fractional slots.\n * @param position - Series-local logical coordinate.\n * @returns Fractional logical slot.\n */ slotAtPosition(position: number): number;\n /** Selects a supplied timestamp; ties choose earlier, outside positions clamp.\n * @param position - Series-local logical coordinate.\n * @returns Supplied UTC milliseconds, or undefined for empty input.\n */ nearestTimeAtPosition(position: number): number | undefined;\n /** Chooses at most count visible supplied observations as date ticks.\n * @param count - Integer maximum from zero through 100, default five.\n * @returns Original UTC timestamps in physical axis order.\n */ ticks(count?: number): readonly number[];\n /** Formats supplied or finite valid UTC timestamps without inferring sessions.\n * @param time - UTC milliseconds in Date range.\n * @returns ISO UTC timestamp.\n */ formatTick(time: number): string;\n}\nconst views = new WeakMap<\n Signal<ResolvedScale>,\n Signal<ResolvedTradingTimeScale>\n>();\n/**\n * Reads a stable dedicated ancestor trading-time signal.\n * @param id - Ancestor TradingTimeScale identity.\n * @returns Readonly mapping with explicit timestamp and logical-slot operations.\n * @see {@link TradingTimeScale}\n */\nexport function useTradingTimeScale(\n id: ScaleId,\n): Signal<ResolvedTradingTimeScale> {\n return scaleView(\n views,\n id,\n \"useTradingTimeScale\",\n (kind) => kind === \"trading-time\",\n );\n}\n/**\n * Provides gapless positions for ordered supplied observations, leaving application-owned viewport control explicit.\n * @param props - Timestamps, optional logical viewport, output range and children.\n * @returns Descendant composition in the named mapping scope.\n * @see {@link TradingTimeScaleProps}\n */\nexport function TradingTimeScale(props: TradingTimeScaleProps): PibblNode {\n const { width, height } = useLayoutBox();\n useScaleProvider(\n props.id,\n \"trading-time\",\n () => {\n const timestamps = Object.freeze([\n ...resolveSignalValue(props.timestamps),\n ]);\n const logicalRange = Object.freeze([\n ...(props.logicalRange\n ? resolveSignalValue(props.logicalRange)\n : [-0.5, Math.max(0.5, timestamps.length - 0.5)]),\n ]) as readonly [number, number];\n const linear = resolveLinearScale(\n logicalRange,\n resolveSignalValue(props.range),\n resolveSignalValue(props.reverse ?? false),\n width,\n height,\n );\n const mapping = createTradingTimeMapping({\n timestamps,\n logicalRange,\n range: linear.range,\n });\n return Object.freeze({\n type: \"trading-time\" as const,\n timestamps,\n domain: timestamps,\n logicalRange,\n range: linear.range,\n frame: linear.frame,\n map: mapping.mapTime,\n mapSlot: linear.map,\n slotAtTime: mapping.slotAtTime,\n timeAtSlot: mapping.timeAtSlot,\n slotAtPosition: mapping.slotAtPosition,\n nearestTimeAtPosition: mapping.nearestTimeAtPosition,\n ticks(count = 5) {\n if (!Number.isInteger(count) || count < 0 || count > 100)\n throw new RangeError(\n \"TradingTime ticks count must be an integer 0\u2013100.\",\n );\n const lo = Math.max(0, Math.ceil(Math.min(...logicalRange))),\n hi = Math.min(\n timestamps.length - 1,\n Math.floor(Math.max(...logicalRange)),\n ),\n n = Math.max(0, hi - lo + 1),\n m = Math.min(n, count);\n const result = Array.from(\n { length: m },\n (_, i) =>\n timestamps[\n lo + (m === 1 ? 0 : Math.round((i * (n - 1)) / (m - 1)))\n ]!,\n );\n return Object.freeze(\n logicalRange[0] > logicalRange[1] ? result.reverse() : result,\n );\n },\n formatTick(time: number) {\n if (!Number.isFinite(time) || Math.abs(time) > 8_640_000_000_000_000)\n throw new RangeError(\n \"TradingTime format requires UTC milliseconds within Date range.\",\n );\n return new Date(time).toISOString();\n },\n });\n },\n [\n props.timestamps,\n props.logicalRange,\n props.range,\n props.reverse,\n width,\n height,\n ],\n );\n return props.children;\n}\n"],
5
+ "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AAQP,SAAS,gCAAgC;AACzC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AA0E1B,MAAM,QAAQ,oBAAI,QAGhB;AAOK,SAAS,oBACd,IACkC;AAClC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,CAAC,SAAS,SAAS;AAAA,EACrB;AACF;AAOO,SAAS,iBAAiB,OAAyC;AACxE,QAAM,EAAE,OAAO,OAAO,IAAI,aAAa;AACvC;AAAA,IACE,MAAM;AAAA,IACN;AAAA,IACA,MAAM;AACJ,YAAM,aAAa,OAAO,OAAO;AAAA,QAC/B,GAAG,mBAAmB,MAAM,UAAU;AAAA,MACxC,CAAC;AACD,YAAM,eAAe,OAAO,OAAO;AAAA,QACjC,GAAI,MAAM,eACN,mBAAmB,MAAM,YAAY,IACrC,CAAC,MAAM,KAAK,IAAI,KAAK,WAAW,SAAS,GAAG,CAAC;AAAA,MACnD,CAAC;AACD,YAAM,SAAS;AAAA,QACb;AAAA,QACA,mBAAmB,MAAM,KAAK;AAAA,QAC9B,mBAAmB,MAAM,WAAW,KAAK;AAAA,QACzC;AAAA,QACA;AAAA,MACF;AACA,YAAM,UAAU,yBAAyB;AAAA,QACvC;AAAA,QACA;AAAA,QACA,OAAO,OAAO;AAAA,MAChB,CAAC;AACD,aAAO,OAAO,OAAO;AAAA,QACnB,MAAM;AAAA,QACN;AAAA,QACA,QAAQ;AAAA,QACR;AAAA,QACA,OAAO,OAAO;AAAA,QACd,OAAO,OAAO;AAAA,QACd,KAAK,QAAQ;AAAA,QACb,SAAS,OAAO;AAAA,QAChB,YAAY,QAAQ;AAAA,QACpB,YAAY,QAAQ;AAAA,QACpB,gBAAgB,QAAQ;AAAA,QACxB,uBAAuB,QAAQ;AAAA,QAC/B,MAAM,QAAQ,GAAG;AACf,cAAI,CAAC,OAAO,UAAU,KAAK,KAAK,QAAQ,KAAK,QAAQ;AACnD,kBAAM,IAAI;AAAA,cACR;AAAA,YACF;AACF,gBAAM,KAAK,KAAK,IAAI,GAAG,KAAK,KAAK,KAAK,IAAI,GAAG,YAAY,CAAC,CAAC,GACzD,KAAK,KAAK;AAAA,YACR,WAAW,SAAS;AAAA,YACpB,KAAK,MAAM,KAAK,IAAI,GAAG,YAAY,CAAC;AAAA,UACtC,GACA,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,CAAC,GAC3B,IAAI,KAAK,IAAI,GAAG,KAAK;AACvB,gBAAM,SAAS,MAAM;AAAA,YACnB,EAAE,QAAQ,EAAE;AAAA,YACZ,CAAC,GAAG,MACF,WACE,MAAM,MAAM,IAAI,IAAI,KAAK,MAAO,KAAK,IAAI,MAAO,IAAI,EAAE,EACxD;AAAA,UACJ;AACA,iBAAO,OAAO;AAAA,YACZ,aAAa,CAAC,IAAI,aAAa,CAAC,IAAI,OAAO,QAAQ,IAAI;AAAA,UACzD;AAAA,QACF;AAAA,QACA,WAAW,MAAc;AACvB,cAAI,CAAC,OAAO,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,IAAI;AAC7C,kBAAM,IAAI;AAAA,cACR;AAAA,YACF;AACF,iBAAO,IAAI,KAAK,IAAI,EAAE,YAAY;AAAA,QACpC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO,MAAM;AACf;",
6
+ "names": []
7
+ }
@@ -0,0 +1,71 @@
1
+ import type { PibblEventHandlers, PibblEventParticipationOptions, SignalValue, StrokeStyle } from "@pibbl/core";
2
+ import type { SignalStyle } from "@pibbl/core/internal";
3
+ import type { LineAccessor, ScaleId, SeriesAccessor } from "./types.js";
4
+ /** Shared path appearance for {@link TrajectorySeries}. */
5
+ export interface TrajectorySeriesStyle {
6
+ /** Path paint. Defaults to `#2563eb`. */
7
+ readonly stroke?: StrokeStyle;
8
+ /** Visible path width in local units. Defaults to 2. */
9
+ readonly strokeWidth?: number;
10
+ /** Pointer targeting width. Defaults to `strokeWidth`. */
11
+ readonly lineInteractionWidth?: number;
12
+ /** Path opacity in [0, 1]. Defaults to 1. */
13
+ readonly opacity?: number;
14
+ /** Cursor while the batched path owns pointer presentation. */
15
+ readonly cursor?: string;
16
+ }
17
+ /**
18
+ * A participant or specimen identity property or callback.
19
+ *
20
+ * Nullish identities deliberately omit a row. Numeric identities must be finite.
21
+ * @param datum - Source observation.
22
+ * @param index - Zero-based source index.
23
+ * @param data - Complete source data array.
24
+ * @returns A finite numeric or string identity, or a nullish omitted identity.
25
+ * @see {@link TrajectorySeriesProps}
26
+ */
27
+ export type TrajectoryGroupAccessor<D> = {
28
+ [K in keyof D]-?: D[K] extends string | number | null | undefined ? K : never;
29
+ }[keyof D] | ((datum: D, index: number, data: readonly D[]) => string | number | null | undefined);
30
+ /**
31
+ * Authoring inputs for {@link TrajectorySeries}.
32
+ *
33
+ * Rows are connected in source encounter order within each group. The component
34
+ * neither sorts time values nor invents visits, summaries, or missing values.
35
+ */
36
+ export interface TrajectorySeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptions {
37
+ /** Source observations or a signal containing them. */
38
+ readonly data: SignalValue<readonly D[]>;
39
+ /** Stable participant or specimen identity. Nullish identities omit that row. */
40
+ readonly group: TrajectoryGroupAccessor<D>;
41
+ /** Encounter-time or scheduled-visit coordinate. */
42
+ readonly x: SeriesAccessor<D>;
43
+ /** Numeric observed outcome coordinate. */
44
+ readonly y: LineAccessor<D>;
45
+ /** Scale mapping encounter-time or visit coordinates. */
46
+ readonly xScale: ScaleId;
47
+ /** Numeric scale mapping outcomes. */
48
+ readonly yScale: ScaleId;
49
+ /**
50
+ * Ends that group's current run without reading coordinate accessors.
51
+ * @param datum - Candidate source datum.
52
+ * @param index - Zero-based source index.
53
+ * @param data - Complete source data array.
54
+ * @returns Whether this datum contributes a coordinate to its group.
55
+ */
56
+ readonly defined?: (datum: D, index: number, data: readonly D[]) => boolean;
57
+ /** Shared path style, including whole-object and shallow field signals. */
58
+ readonly style?: SignalValue<SignalStyle<TrajectorySeriesStyle>>;
59
+ }
60
+ /**
61
+ * Draws one shared-style path connecting each participant or specimen trajectory.
62
+ *
63
+ * A missing, excluded, or non-finite coordinate ends only that group's current
64
+ * run. Interleaved groups retain their source encounter order; trajectories are
65
+ * never sorted by either actual or scheduled time.
66
+ *
67
+ * @param props - Observations, identities, coordinates, scales, and shared path paint.
68
+ * @returns One batched ordinary Pibbl path containing source-ordered trajectory segments.
69
+ * @see {@link TrajectorySeriesProps}
70
+ */
71
+ export declare function TrajectorySeries<D>({ data: input, group: groupInput, x: xInput, y: yInput, xScale: xId, yScale: yId, defined, style: styleInput, ...events }: TrajectorySeriesProps<D>): import("../../../jsx-runtime.js").JSX.Element;
@@ -0,0 +1,111 @@
1
+ import { jsx } from "@pibbl/core/jsx-runtime";
2
+ import { Path, resolveSignalValue } from "@pibbl/core";
3
+ import { withHooksForbidden } from "@pibbl/core/internal";
4
+ import { opacity, width } from "./paint.js";
5
+ import { pointAccessor, pointData } from "./point-data.js";
6
+ import {
7
+ mapSeriesPosition,
8
+ seriesAccessor,
9
+ useNumericPosition,
10
+ useSeriesPosition
11
+ } from "./series-position.js";
12
+ function style(input) {
13
+ if (input === null || typeof input !== "object" || Array.isArray(input))
14
+ throw new TypeError("TrajectorySeries: style must be an object.");
15
+ const value = input;
16
+ for (const field of Object.keys(value))
17
+ if (![
18
+ "stroke",
19
+ "strokeWidth",
20
+ "lineInteractionWidth",
21
+ "opacity",
22
+ "cursor"
23
+ ].includes(field))
24
+ throw new TypeError(
25
+ `TrajectorySeries: unsupported style field ${field}.`
26
+ );
27
+ const stroke = resolveSignalValue(value.stroke) ?? "#2563eb";
28
+ const strokeWidth = width(
29
+ resolveSignalValue(value.strokeWidth) ?? 2,
30
+ "TrajectorySeries strokeWidth"
31
+ );
32
+ const lineInteractionWidth = width(
33
+ resolveSignalValue(value.lineInteractionWidth) ?? strokeWidth,
34
+ "TrajectorySeries lineInteractionWidth"
35
+ );
36
+ const cursor = resolveSignalValue(value.cursor);
37
+ if (cursor !== void 0 && typeof cursor !== "string")
38
+ throw new TypeError("TrajectorySeries: cursor must be a string.");
39
+ return {
40
+ stroke,
41
+ strokeWidth,
42
+ lineInteractionWidth,
43
+ opacity: opacity(
44
+ resolveSignalValue(value.opacity) ?? 1,
45
+ "TrajectorySeries opacity"
46
+ ),
47
+ cursor
48
+ };
49
+ }
50
+ function TrajectorySeries({
51
+ data: input,
52
+ group: groupInput,
53
+ x: xInput,
54
+ y: yInput,
55
+ xScale: xId,
56
+ yScale: yId,
57
+ defined,
58
+ style: styleInput,
59
+ ...events
60
+ }) {
61
+ const xs = useSeriesPosition(xId);
62
+ const ys = useNumericPosition(yId);
63
+ const data = pointData(resolveSignalValue(input), "TrajectorySeries");
64
+ const x = seriesAccessor(xInput);
65
+ const y = pointAccessor(yInput);
66
+ const group = typeof groupInput === "function" ? groupInput : (datum) => datum[groupInput];
67
+ const resolved = style(resolveSignalValue(styleInput) ?? {});
68
+ const last = /* @__PURE__ */ new Map();
69
+ const path = new Path2D();
70
+ for (let i = 0; i < data.length; i++) {
71
+ const datum = data[i];
72
+ const row = withHooksForbidden(
73
+ "TrajectorySeries: accessors cannot call hooks.",
74
+ () => {
75
+ const identity = group(datum, i, data);
76
+ if (defined && !defined(datum, i, data)) return { group: identity };
77
+ return {
78
+ group: identity,
79
+ x: x(datum, i, data),
80
+ y: y(datum, i, data)
81
+ };
82
+ }
83
+ );
84
+ if (!row || row.group == null) continue;
85
+ if (typeof row.group !== "string" && typeof row.group !== "number" || typeof row.group === "number" && !Number.isFinite(row.group))
86
+ throw new TypeError(
87
+ "TrajectorySeries: group must be a string or number."
88
+ );
89
+ if (!("x" in row) || !("y" in row)) {
90
+ last.delete(row.group);
91
+ continue;
92
+ }
93
+ const px = mapSeriesPosition(xs, row.x);
94
+ const py = mapSeriesPosition(ys, row.y);
95
+ if (px === void 0 || py === void 0) {
96
+ last.delete(row.group);
97
+ continue;
98
+ }
99
+ const prior = last.get(row.group);
100
+ if (prior) {
101
+ path.moveTo(prior[0], prior[1]);
102
+ path.lineTo(px, py);
103
+ }
104
+ last.set(row.group, [px, py]);
105
+ }
106
+ return /* @__PURE__ */ jsx(Path, { ...events, style: { d: path, ...resolved } });
107
+ }
108
+ export {
109
+ TrajectorySeries
110
+ };
111
+ //# sourceMappingURL=trajectory-series.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/features/viz/lib/trajectory-series.tsx"],
4
+ "sourcesContent": ["import { Path, resolveSignalValue } from \"@pibbl/core\";\nimport type {\n PibblEventHandlers,\n PibblEventParticipationOptions,\n SignalValue,\n StrokeStyle,\n} from \"@pibbl/core\";\nimport { withHooksForbidden } from \"@pibbl/core/internal\";\nimport type { SignalStyle } from \"@pibbl/core/internal\";\nimport type { LineAccessor, ScaleId, SeriesAccessor } from \"./types.js\";\nimport { opacity, width } from \"./paint.js\";\nimport { pointAccessor, pointData } from \"./point-data.js\";\nimport {\n mapSeriesPosition,\n seriesAccessor,\n useNumericPosition,\n useSeriesPosition,\n} from \"./series-position.js\";\n\n/** Shared path appearance for {@link TrajectorySeries}. */\nexport interface TrajectorySeriesStyle {\n /** Path paint. Defaults to `#2563eb`. */\n readonly stroke?: StrokeStyle;\n /** Visible path width in local units. Defaults to 2. */\n readonly strokeWidth?: number;\n /** Pointer targeting width. Defaults to `strokeWidth`. */\n readonly lineInteractionWidth?: number;\n /** Path opacity in [0, 1]. Defaults to 1. */\n readonly opacity?: number;\n /** Cursor while the batched path owns pointer presentation. */\n readonly cursor?: string;\n}\n\n/**\n * A participant or specimen identity property or callback.\n *\n * Nullish identities deliberately omit a row. Numeric identities must be finite.\n * @param datum - Source observation.\n * @param index - Zero-based source index.\n * @param data - Complete source data array.\n * @returns A finite numeric or string identity, or a nullish omitted identity.\n * @see {@link TrajectorySeriesProps}\n */\nexport type TrajectoryGroupAccessor<D> =\n | {\n [K in keyof D]-?: D[K] extends string | number | null | undefined\n ? K\n : never;\n }[keyof D]\n | ((\n datum: D,\n index: number,\n data: readonly D[],\n ) => string | number | null | undefined);\n\n/**\n * Authoring inputs for {@link TrajectorySeries}.\n *\n * Rows are connected in source encounter order within each group. The component\n * neither sorts time values nor invents visits, summaries, or missing values.\n */\nexport interface TrajectorySeriesProps<D>\n extends PibblEventHandlers, PibblEventParticipationOptions {\n /** Source observations or a signal containing them. */\n readonly data: SignalValue<readonly D[]>;\n /** Stable participant or specimen identity. Nullish identities omit that row. */\n readonly group: TrajectoryGroupAccessor<D>;\n /** Encounter-time or scheduled-visit coordinate. */\n readonly x: SeriesAccessor<D>;\n /** Numeric observed outcome coordinate. */\n readonly y: LineAccessor<D>;\n /** Scale mapping encounter-time or visit coordinates. */\n readonly xScale: ScaleId;\n /** Numeric scale mapping outcomes. */\n readonly yScale: ScaleId;\n /**\n * Ends that group's current run without reading coordinate accessors.\n * @param datum - Candidate source datum.\n * @param index - Zero-based source index.\n * @param data - Complete source data array.\n * @returns Whether this datum contributes a coordinate to its group.\n */\n readonly defined?: (datum: D, index: number, data: readonly D[]) => boolean;\n /** Shared path style, including whole-object and shallow field signals. */\n readonly style?: SignalValue<SignalStyle<TrajectorySeriesStyle>>;\n}\n\ninterface ResolvedTrajectoryStyle {\n readonly stroke: StrokeStyle;\n readonly strokeWidth: number;\n readonly lineInteractionWidth: number;\n readonly opacity: number;\n readonly cursor?: string;\n}\n\nfunction style(input: unknown): ResolvedTrajectoryStyle {\n if (input === null || typeof input !== \"object\" || Array.isArray(input))\n throw new TypeError(\"TrajectorySeries: style must be an object.\");\n const value = input as Record<string, unknown>;\n for (const field of Object.keys(value))\n if (\n ![\n \"stroke\",\n \"strokeWidth\",\n \"lineInteractionWidth\",\n \"opacity\",\n \"cursor\",\n ].includes(field)\n )\n throw new TypeError(\n `TrajectorySeries: unsupported style field ${field}.`,\n );\n const stroke = resolveSignalValue(value.stroke) ?? \"#2563eb\";\n const strokeWidth = width(\n (resolveSignalValue(value.strokeWidth) ?? 2) as number,\n \"TrajectorySeries strokeWidth\",\n );\n const lineInteractionWidth = width(\n (resolveSignalValue(value.lineInteractionWidth) ?? strokeWidth) as number,\n \"TrajectorySeries lineInteractionWidth\",\n );\n const cursor = resolveSignalValue(value.cursor);\n if (cursor !== undefined && typeof cursor !== \"string\")\n throw new TypeError(\"TrajectorySeries: cursor must be a string.\");\n return {\n stroke: stroke as StrokeStyle,\n strokeWidth,\n lineInteractionWidth,\n opacity: opacity(\n (resolveSignalValue(value.opacity) ?? 1) as number,\n \"TrajectorySeries opacity\",\n ),\n cursor,\n };\n}\n\n/**\n * Draws one shared-style path connecting each participant or specimen trajectory.\n *\n * A missing, excluded, or non-finite coordinate ends only that group's current\n * run. Interleaved groups retain their source encounter order; trajectories are\n * never sorted by either actual or scheduled time.\n *\n * @param props - Observations, identities, coordinates, scales, and shared path paint.\n * @returns One batched ordinary Pibbl path containing source-ordered trajectory segments.\n * @see {@link TrajectorySeriesProps}\n */\nexport function TrajectorySeries<D>({\n data: input,\n group: groupInput,\n x: xInput,\n y: yInput,\n xScale: xId,\n yScale: yId,\n defined,\n style: styleInput,\n ...events\n}: TrajectorySeriesProps<D>) {\n const xs = useSeriesPosition(xId);\n const ys = useNumericPosition(yId);\n const data = pointData(resolveSignalValue(input), \"TrajectorySeries\");\n const x = seriesAccessor(xInput);\n const y = pointAccessor(yInput);\n const group =\n typeof groupInput === \"function\"\n ? groupInput\n : (datum: D) => datum[groupInput] as string | number | null | undefined;\n const resolved = style(resolveSignalValue(styleInput) ?? {});\n const last = new Map<string | number, readonly [number, number]>();\n const path = new Path2D();\n for (let i = 0; i < data.length; i++) {\n const datum = data[i];\n const row = withHooksForbidden(\n \"TrajectorySeries: accessors cannot call hooks.\",\n () => {\n const identity = group(datum, i, data);\n if (defined && !defined(datum, i, data)) return { group: identity };\n return {\n group: identity,\n x: x(datum, i, data),\n y: y(datum, i, data),\n };\n },\n );\n if (!row || row.group == null) continue;\n if (\n (typeof row.group !== \"string\" && typeof row.group !== \"number\") ||\n (typeof row.group === \"number\" && !Number.isFinite(row.group))\n )\n throw new TypeError(\n \"TrajectorySeries: group must be a string or number.\",\n );\n if (!(\"x\" in row) || !(\"y\" in row)) {\n last.delete(row.group);\n continue;\n }\n const px = mapSeriesPosition(xs, row.x);\n const py = mapSeriesPosition(ys, row.y);\n if (px === undefined || py === undefined) {\n last.delete(row.group);\n continue;\n }\n const prior = last.get(row.group);\n if (prior) {\n path.moveTo(prior[0], prior[1]);\n path.lineTo(px, py);\n }\n last.set(row.group, [px, py]);\n }\n return <Path {...events} style={{ d: path, ...resolved }} />;\n}\n"],
5
+ "mappings": "AAiNS;AAjNT,SAAS,MAAM,0BAA0B;AAOzC,SAAS,0BAA0B;AAGnC,SAAS,SAAS,aAAa;AAC/B,SAAS,eAAe,iBAAiB;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA8EP,SAAS,MAAM,OAAyC;AACtD,MAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK;AACpE,UAAM,IAAI,UAAU,4CAA4C;AAClE,QAAM,QAAQ;AACd,aAAW,SAAS,OAAO,KAAK,KAAK;AACnC,QACE,CAAC;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,SAAS,KAAK;AAEhB,YAAM,IAAI;AAAA,QACR,6CAA6C,KAAK;AAAA,MACpD;AACJ,QAAM,SAAS,mBAAmB,MAAM,MAAM,KAAK;AACnD,QAAM,cAAc;AAAA,IACjB,mBAAmB,MAAM,WAAW,KAAK;AAAA,IAC1C;AAAA,EACF;AACA,QAAM,uBAAuB;AAAA,IAC1B,mBAAmB,MAAM,oBAAoB,KAAK;AAAA,IACnD;AAAA,EACF;AACA,QAAM,SAAS,mBAAmB,MAAM,MAAM;AAC9C,MAAI,WAAW,UAAa,OAAO,WAAW;AAC5C,UAAM,IAAI,UAAU,4CAA4C;AAClE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,MACN,mBAAmB,MAAM,OAAO,KAAK;AAAA,MACtC;AAAA,IACF;AAAA,IACA;AAAA,EACF;AACF;AAaO,SAAS,iBAAoB;AAAA,EAClC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,GAAG;AAAA,EACH,GAAG;AAAA,EACH,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAA6B;AAC3B,QAAM,KAAK,kBAAkB,GAAG;AAChC,QAAM,KAAK,mBAAmB,GAAG;AACjC,QAAM,OAAO,UAAU,mBAAmB,KAAK,GAAG,kBAAkB;AACpE,QAAM,IAAI,eAAe,MAAM;AAC/B,QAAM,IAAI,cAAc,MAAM;AAC9B,QAAM,QACJ,OAAO,eAAe,aAClB,aACA,CAAC,UAAa,MAAM,UAAU;AACpC,QAAM,WAAW,MAAM,mBAAmB,UAAU,KAAK,CAAC,CAAC;AAC3D,QAAM,OAAO,oBAAI,IAAgD;AACjE,QAAM,OAAO,IAAI,OAAO;AACxB,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,QAAQ,KAAK,CAAC;AACpB,UAAM,MAAM;AAAA,MACV;AAAA,MACA,MAAM;AACJ,cAAM,WAAW,MAAM,OAAO,GAAG,IAAI;AACrC,YAAI,WAAW,CAAC,QAAQ,OAAO,GAAG,IAAI,EAAG,QAAO,EAAE,OAAO,SAAS;AAClE,eAAO;AAAA,UACL,OAAO;AAAA,UACP,GAAG,EAAE,OAAO,GAAG,IAAI;AAAA,UACnB,GAAG,EAAE,OAAO,GAAG,IAAI;AAAA,QACrB;AAAA,MACF;AAAA,IACF;AACA,QAAI,CAAC,OAAO,IAAI,SAAS,KAAM;AAC/B,QACG,OAAO,IAAI,UAAU,YAAY,OAAO,IAAI,UAAU,YACtD,OAAO,IAAI,UAAU,YAAY,CAAC,OAAO,SAAS,IAAI,KAAK;AAE5D,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AACF,QAAI,EAAE,OAAO,QAAQ,EAAE,OAAO,MAAM;AAClC,WAAK,OAAO,IAAI,KAAK;AACrB;AAAA,IACF;AACA,UAAM,KAAK,kBAAkB,IAAI,IAAI,CAAC;AACtC,UAAM,KAAK,kBAAkB,IAAI,IAAI,CAAC;AACtC,QAAI,OAAO,UAAa,OAAO,QAAW;AACxC,WAAK,OAAO,IAAI,KAAK;AACrB;AAAA,IACF;AACA,UAAM,QAAQ,KAAK,IAAI,IAAI,KAAK;AAChC,QAAI,OAAO;AACT,WAAK,OAAO,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;AAC9B,WAAK,OAAO,IAAI,EAAE;AAAA,IACpB;AACA,SAAK,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;AAAA,EAC9B;AACA,SAAO,oBAAC,QAAM,GAAG,QAAQ,OAAO,EAAE,GAAG,MAAM,GAAG,SAAS,GAAG;AAC5D;",
6
+ "names": []
7
+ }
@@ -1,12 +1,13 @@
1
1
  import type { BarCategoryAccessor } from "./bar-series.js";
2
- import type { Scale } from "./scale.js";
2
+ import type { LinearScale } from "./linear-scale-component.js";
3
3
  import type { nearestDomainValue } from "./nearest.js";
4
- import type { useScale } from "./use-scale.js";
4
+ import type { useLinearScale } from "./use-linear-scale.js";
5
5
  import type { Axis } from "./axis.js";
6
6
  import type { PointAccessor } from "./point-types.js";
7
7
  import type { ScaleAdjust } from "./scale-adjust.js";
8
8
  import type { BoxStyle, PibblNode, LayoutItemStyle, LayoutBox, SignalValue } from "@pibbl/core";
9
9
  import type { SignalStyle } from "@pibbl/core/internal";
10
+ import type { SeriesCurve } from "./curve-definition.js";
10
11
  /**
11
12
  * A string or symbol identifying a scale within visualization context.
12
13
  *
@@ -34,7 +35,7 @@ export type ScaleRange = "width" | "height" | readonly [number, number];
34
35
  *
35
36
  * @see {@link ScaleRange}
36
37
  * @see {@link ScaleId}
37
- * @see {@link BandScaleProps}
38
+ * @see {@link BarScaleProps}
38
39
  */
39
40
  export type BandScaleRange = ScaleRange | {
40
41
  /** Identifier of a parent band scale whose bandwidth supplies this range. See {@link ScaleId}. */
@@ -58,13 +59,11 @@ export type ScaleLayoutStyle = Pick<BoxStyle, "width" | "height"> & LayoutItemSt
58
59
  * @see {@link SignalStyle}
59
60
  * @see {@link ScaleLayoutStyle}
60
61
  * @see {@link PibblNode}
61
- * @see {@link BandScaleProps}
62
+ * @see {@link BarScaleProps}
62
63
  */
63
64
  export interface LinearScaleProps {
64
65
  /** Stable identifier of this resource or connection. See {@link ScaleId}. */
65
66
  readonly id: ScaleId;
66
- /** The literal "linear" identifying this variant. See {@link LinearScaleProps}. */
67
- readonly type: "linear";
68
67
  /**
69
68
  * Data values or endpoints accepted by the scale. See {@link SignalValue}, {@link LinearDomain}
70
69
  * .
@@ -97,7 +96,7 @@ export type BandCategory = string | number;
97
96
  * The ordered categories allocated by a band scale.
98
97
  *
99
98
  * @see {@link BandCategory}
100
- * @see {@link BandScaleProps}
99
+ * @see {@link BarScaleProps}
101
100
  * @see {@link ResolvedBandScale}
102
101
  */
103
102
  export type BandDomain = readonly BandCategory[];
@@ -108,11 +107,9 @@ export type BandDomain = readonly BandCategory[];
108
107
  * @see {@link SignalValue}
109
108
  * @see {@link BandDomain}
110
109
  * @see {@link BandScaleRange}
111
- * @see {@link ScaleProps}
110
+ * @see {@link LinearScaleProps}
112
111
  */
113
- export interface BandScaleProps extends Omit<LinearScaleProps, "type" | "domain" | "range"> {
114
- /** The literal "band" identifying this variant. See {@link BandScaleProps}. */
115
- readonly type: "band";
112
+ export interface BarScaleProps extends Omit<LinearScaleProps, "domain" | "range"> {
116
113
  /**
117
114
  * Data values or endpoints accepted by the scale. See {@link SignalValue}, {@link BandDomain}.
118
115
  */
@@ -131,10 +128,15 @@ export interface BandScaleProps extends Omit<LinearScaleProps, "type" | "domain"
131
128
  * Authored inputs for Scale, including the declared data and presentation options.
132
129
  *
133
130
  * @see {@link LinearScaleProps}
134
- * @see {@link BandScaleProps}
135
- * @see {@link Scale}
131
+ * @see {@link BarScaleProps}
132
+ * @see {@link LinearScale}
136
133
  */
137
- export type ScaleProps = LinearScaleProps | BandScaleProps;
134
+ /** UTC timestamps use numeric epoch milliseconds. See {@link LinearDomain}. */
135
+ export type UtcDomain = LinearDomain;
136
+ /** Numeric endpoints shared by continuous scales. See {@link LinearDomain}. */
137
+ export type NumericDomain = LinearDomain;
138
+ /** Calendar-aware UTC scale inputs. See {@link LinearScaleProps}. */
139
+ export type UTCScaleProps = LinearScaleProps;
138
140
  /**
139
141
  * A resolved categorical mapping with its frame, bandwidth, and step.
140
142
  *
@@ -207,9 +209,73 @@ export interface ResolvedLinearScale {
207
209
  *
208
210
  * @see {@link ResolvedLinearScale}
209
211
  * @see {@link ResolvedBandScale}
210
- * @see {@link useScale}
212
+ * @see {@link useLinearScale}
211
213
  */
212
- export type ResolvedScale = ResolvedLinearScale | ResolvedBandScale;
214
+ /** UTC continuous mapping with stateless ISO formatting. See {@link ResolvedLinearScale}. */
215
+ export interface ResolvedUtcScale extends Omit<ResolvedLinearScale, "type"> {
216
+ /** UTC calendar scale discriminant. See {@link UTCScaleProps}. */
217
+ readonly type: "utc";
218
+ /**
219
+ * Formats a timestamp as full UTC ISO text without changing tick geometry.
220
+ * @param value - Finite epoch milliseconds inside the Date range.
221
+ * @returns ISO text with millisecond precision. See {@link ResolvedUtcScale}.
222
+ */
223
+ formatTick(value: number): string;
224
+ }
225
+ /** Any supported numeric mapping. See {@link ResolvedUtcScale}. */
226
+ export type ResolvedContinuousScale = ResolvedLinearScale | ResolvedUtcScale | ResolvedLogScale | ResolvedSymlogScale;
227
+ /** Positive logarithmic provider inputs. See {@link LinearScaleProps}. */
228
+ export interface LogScaleProps extends LinearScaleProps {
229
+ /** Base for power ticks; finite and greater than one, default 10. Mapping is base-independent. */
230
+ readonly base?: SignalValue<number>;
231
+ }
232
+ /** Positive logarithmic mapping with numeric inverse. See {@link ResolvedLinearScale}. */
233
+ export interface ResolvedLogScale extends Omit<ResolvedLinearScale, "type"> {
234
+ /** Logarithmic mapping discriminant. See {@link LogScaleProps}. */
235
+ readonly type: "log";
236
+ /** Resolved base used for power ticks. See {@link LogScaleProps}. */
237
+ readonly base: number;
238
+ }
239
+ /** A numeric or categorical mapping snapshot. See {@link ResolvedContinuousScale}. */
240
+ export type ResolvedScale = ResolvedContinuousScale | ResolvedBandScale | ResolvedPointScale | import("./trading-time-scale.js").ResolvedTradingTimeScale;
241
+ /** Signed logarithmic scale inputs. See {@link LinearScaleProps}. */
242
+ export interface SymlogScaleProps extends LinearScaleProps {
243
+ /** Positive linear-to-log transition constant in domain units, default 1. */
244
+ readonly constant?: SignalValue<number>;
245
+ }
246
+ /** Signed logarithmic mapping through zero. See {@link ResolvedLinearScale}. */
247
+ export interface ResolvedSymlogScale extends Omit<ResolvedLinearScale, "type"> {
248
+ /** Signed logarithmic discriminant. See {@link SymlogScaleProps}. */
249
+ readonly type: "symlog";
250
+ /** Positive transition constant. See {@link SymlogScaleProps}. */
251
+ readonly constant: number;
252
+ }
253
+ /** Equally spaced categorical positions. See {@link LinearScaleProps}. */
254
+ export interface PointScaleProps extends Omit<LinearScaleProps, "domain"> {
255
+ /** Ordered unique string or finite numeric categories; accepts signals. See {@link BandDomain}. */
256
+ readonly domain: SignalValue<BandDomain>;
257
+ /** Nonnegative outer padding in step units, default 0. */
258
+ readonly padding?: SignalValue<number>;
259
+ }
260
+ /** Zero-width categorical point positions. See {@link ResolvedBandScale}. */
261
+ export interface ResolvedPointScale extends Omit<ResolvedBandScale, "type" | "bandwidth"> {
262
+ /** Categorical point discriminant. See {@link PointScaleProps}. */
263
+ readonly type: "point";
264
+ /** Resolved outer padding. See {@link PointScaleProps}. */
265
+ readonly padding: number;
266
+ /**
267
+ * Finds the nearest category, clamping outside coordinates; ties choose first domain order.
268
+ * @param pixel - Finite range coordinate.
269
+ * @returns Category or undefined for an empty domain. See {@link BandCategory}.
270
+ */
271
+ invert(pixel: number): BandCategory | undefined;
272
+ /**
273
+ * Selects evenly spaced categories including endpoints when count permits.
274
+ * @param count - Integer maximum count 0–100, default 5.
275
+ * @returns Frozen categories in domain order. See {@link BandDomain}.
276
+ */
277
+ ticks(count?: number): BandDomain;
278
+ }
213
279
  import type { PibblEventHandlers, PibblEventParticipationOptions, FillStyle, StrokeStyle } from "@pibbl/core";
214
280
  /**
215
281
  * Supported geometry and presentation properties for Axis.
@@ -247,6 +313,18 @@ interface AxisBaseProps {
247
313
  * @returns Text to draw for the tick label.
248
314
  */
249
315
  readonly tickFormat?: (value: number | string, index: number) => string;
316
+ /** Label collision policy; allow preserves all labels (default), skip measures and omits overlaps without removing ticks. */
317
+ readonly labelOverlap?: SignalValue<"allow" | "skip">;
318
+ /** Minimum distance between visible labels in logical pixels; defaults to 8. */
319
+ readonly labelGap?: SignalValue<number>;
320
+ /** Long-label policy, default allow. Wrap/truncate require labelMaxWidth; coordinates remain unchanged. */
321
+ readonly labelOverflow?: SignalValue<"allow" | "wrap" | "truncate">;
322
+ /** Maximum measured line width in logical pixels, positive and finite. Required for wrap/truncate. */
323
+ readonly labelMaxWidth?: SignalValue<number>;
324
+ /** Maximum wrapped lines, integer 1–20; default 2. Excess text receives an ellipsis. */
325
+ readonly labelMaxLines?: SignalValue<number>;
326
+ /** Positive line advance in logical pixels; default is measured font height plus 4. */
327
+ readonly labelLineHeight?: SignalValue<number>;
250
328
  /**
251
329
  * Declared presentation and layout properties. See {@link SignalValue}, {@link SignalStyle},
252
330
  * {@link AxisStyle}.
@@ -292,12 +370,25 @@ export type LineCoordinate = number | null | undefined;
292
370
  export type LineAccessor<D> = {
293
371
  [K in keyof D]-?: D[K] extends LineCoordinate ? K : never;
294
372
  }[keyof D] | ((datum: D, index: number, data: readonly D[]) => LineCoordinate);
373
+ /** A numeric or categorical position, or a missing value. @see {@link SeriesAccessor} */
374
+ export type SeriesCoordinate = number | string | null | undefined;
375
+ /**
376
+ * Extracts one position for a line, point, or custom mark.
377
+ * @param datum - Original record.
378
+ * @param index - Original record index.
379
+ * @param data - Complete source records.
380
+ * @returns A numeric or categorical position. See {@link SeriesCoordinate}.
381
+ * @see {@link LineSeriesProps}
382
+ */
383
+ export type SeriesAccessor<D> = {
384
+ [K in keyof D]-?: D[K] extends SeriesCoordinate ? K : never;
385
+ }[keyof D] | ((datum: D, index: number, data: readonly D[]) => SeriesCoordinate);
295
386
  /**
296
387
  * The supported interpolation mode for a line series.
297
388
  *
298
389
  * @see {@link LineSeriesProps}
299
390
  */
300
- export type LineCurve = "linear";
391
+ export type LineCurve = "linear" | SeriesCurve;
301
392
  /**
302
393
  * Supported geometry and presentation properties for LineSeries.
303
394
  *
@@ -336,10 +427,12 @@ export interface LineSeriesProps<D> extends PibblEventHandlers, PibblEventPartic
336
427
  * Application data supplied to the component or reported by the event. See {@link SignalValue}.
337
428
  */
338
429
  readonly data: SignalValue<readonly D[]>;
430
+ /** Optional committed numeric observation capture; no query execution during paint. */
431
+ readonly inspection?: import("../inspection/capture-types.js").NumericInspectionRef<D>;
339
432
  /** Property key or callback extracting the horizontal domain coordinate. See {@link LineAccessor}. */
340
- readonly x: LineAccessor<D>;
433
+ readonly x: SeriesAccessor<D>;
341
434
  /** Property key or callback extracting the vertical domain coordinate. See {@link LineAccessor}. */
342
- readonly y: LineAccessor<D>;
435
+ readonly y: SeriesAccessor<D>;
343
436
  /** The scale used to map horizontal data coordinates. See {@link ScaleId}. */
344
437
  readonly xScale: ScaleId;
345
438
  /** The scale used to map vertical data coordinates. See {@link ScaleId}. */
@@ -372,7 +465,7 @@ type ScaleAdjustX = {
372
465
  * Horizontal coordinate or displacement in the containing coordinate system. See
373
466
  * {@link SignalValue}.
374
467
  */
375
- readonly x: SignalValue<number>;
468
+ readonly x: SignalValue<BandCategory>;
376
469
  /** The scale used to map horizontal data coordinates. See {@link ScaleId}. */
377
470
  readonly xScale: ScaleId;
378
471
  } | {
@@ -392,7 +485,7 @@ type ScaleAdjustY = {
392
485
  * Vertical coordinate or displacement in the containing coordinate system. See
393
486
  * {@link SignalValue}.
394
487
  */
395
- readonly y: SignalValue<number>;
488
+ readonly y: SignalValue<BandCategory>;
396
489
  /** The scale used to map vertical data coordinates. See {@link ScaleId}. */
397
490
  readonly yScale: ScaleId;
398
491
  } | {