@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
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  import {
92
92
  createSvgPath
93
93
  } from "./lib/geometry/svg-path.js";
94
- import { pibbl } from "./lib/pibbl.js";
94
+ import { pibbl, prepareLayoutEngine } from "./lib/pibbl.js";
95
95
  import {
96
96
  batch,
97
97
  computed,
@@ -129,7 +129,11 @@ import {
129
129
  Flex
130
130
  } from "./lib/layout/flex.js";
131
131
  import {
132
- Grid
132
+ Grid,
133
+ minmax,
134
+ repeatTracks,
135
+ autoFillTracks,
136
+ autoFitTracks
133
137
  } from "./lib/layout/grid.js";
134
138
  import { measureElement } from "./lib/layout/measure.js";
135
139
  import {
@@ -140,6 +144,7 @@ import { definePrimitive } from "./lib/define-primitive.js";
140
144
  import { defineRenderLayer } from "./lib/render-layer/define-render-layer.js";
141
145
  import { createElement } from "./lib/element/create-element.js";
142
146
  import { Fragment } from "./lib/element/fragment.js";
147
+ import { fitContent } from "./lib/style/sizing-length.js";
143
148
  import {
144
149
  LayoutDiagnostic,
145
150
  layoutDiagnostic
@@ -178,6 +183,8 @@ import { hologram } from "./lib/transitions/hologram.js";
178
183
  import { bifrost } from "./lib/transitions/bifrost.js";
179
184
  import { slide, zoom, wipe, blurReveal, dissolve } from "./lib/transitions/common.js";
180
185
  import { defineTransition } from "./lib/transitions/define-transition.js";
186
+ import { recordFrames, exportGif } from "./lib/recording/recording.js";
187
+ import { defineLayoutComponent } from "./lib/layout/define-layout-component.js";
181
188
  export {
182
189
  Absolute,
183
190
  Arc,
@@ -216,6 +223,8 @@ export {
216
223
  Wedge,
217
224
  affineTransform,
218
225
  arcBendTransform,
226
+ autoFillTracks,
227
+ autoFitTracks,
219
228
  batch,
220
229
  bifrost,
221
230
  blurReveal,
@@ -233,6 +242,7 @@ export {
233
242
  createSvgPath,
234
243
  createWedgePath,
235
244
  defineAnimation,
245
+ defineLayoutComponent,
236
246
  definePrimitive,
237
247
  defineRenderLayer,
238
248
  defineTexture,
@@ -243,7 +253,9 @@ export {
243
253
  easing,
244
254
  embers,
245
255
  envelopeTransform,
256
+ exportGif,
246
257
  fade,
258
+ fitContent,
247
259
  flattenPath,
248
260
  flattenPathWang,
249
261
  hologram,
@@ -253,12 +265,16 @@ export {
253
265
  marker,
254
266
  measureElement,
255
267
  meshTransform,
268
+ minmax,
256
269
  normalizeEdges,
257
270
  parallel,
258
271
  pathBendTransform,
259
272
  pibbl,
273
+ prepareLayoutEngine,
260
274
  quadTransform,
275
+ recordFrames,
261
276
  repeat,
277
+ repeatTracks,
262
278
  resolveBox,
263
279
  resolveLength,
264
280
  resolveSignalValue,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export {\n meshTransform,\n arcBendTransform,\n pathBendTransform,\n type MeshTransformOptions,\n type ArcBendTransformOptions,\n type PathBendTransformOptions,\n transformPath,\n composeTransforms,\n affineTransform,\n quadTransform,\n envelopeTransform,\n type PathTransform,\n type PathPoint,\n type PathRect,\n type TransformPathOptions,\n type QuadTransformOptions,\n type PathQuadCorners,\n type PathQuadMode,\n type BendTransformOptions,\n type EnvelopeTransformOptions,\n type EnvelopeGuide,\n type PathGuide,\n type PathGuideOptions,\n type PathGuideStation,\n} from './lib/geometry/path-transforms.js';\nexport { type PathBendArc, type PathBendAlign, type PathBendBaseline, type PathBendFit, type PathBendOverflow } from './lib/geometry/path-bending.js';\nexport { flattenPathWang } from './lib/geometry/path-wang.js';\nexport { simplifyPathRadial } from './lib/geometry/path-radial.js';\nexport { PathGeometry, type PathSegment } from './lib/geometry/path-geometry.js';\nexport { toPath2D, toSvgPathData } from './lib/geometry/path-conversion.js';\nexport {\n flattenPath,\n simplifyPath,\n subdividePath,\n type FlattenPathOptions,\n type SimplifyPathOptions,\n type SubdividePathOptions,\n} from './lib/geometry/path-utilities.js';\n// components\nexport { Arc, type ArcProps, type ArcStyle } from './lib/components/arc.js';\nexport {\n Circle,\n type CircleProps,\n type CircleStyle,\n} from './lib/components/circle.js';\nexport { Clip, type ClipProps, type ClipStyle } from './lib/components/clip.js';\nexport {\n Ellipse,\n type EllipseProps,\n type EllipseStyle,\n} from './lib/components/ellipse.js';\nexport {\n Group,\n type GroupProps,\n type GStyle,\n} from './lib/components/g.js';\nexport {\n HorizontalLine,\n type HorizontalLineProps,\n type HorizontalLineStyle,\n} from './lib/components/horizontal-line.js';\n\nexport {\n Image,\n type ImageProps,\n} from './lib/components/img.js';\nexport {\n Layer,\n type LayerProps,\n type LayerStyle,\n} from './lib/components/layer.js';\nexport {\n Line,\n type LineProps,\n type LineStyle,\n} from './lib/components/line.js';\nexport { Path, type PathProps } from './lib/components/path.js';\nexport {\n Polygon,\n type PolygonProps,\n type PolygonStyle,\n} from './lib/components/polygon.js';\nexport {\n RegularPolygon,\n type RegularPolygonProps,\n type RegularPolygonStyle,\n} from './lib/components/regular-polygon.js';\nexport {\n Rectangle,\n type RectangleProps,\n} from './lib/components/rect.js';\nexport {\n Star,\n type StarProps,\n type StarStyle,\n} from './lib/components/star.js';\nexport {\n SvgPath,\n type SvgPathProps,\n} from './lib/components/svg-path.js';\nexport { Text, type TextProps } from './lib/components/text.js';\nexport {\n VerticalLine,\n type VerticalLineProps,\n type VerticalLineStyle,\n} from './lib/components/vertical-line.js';\nexport {\n Wedge,\n type WedgeProps,\n type WedgeStyle,\n} from './lib/components/wedge.js';\nexport {\n createArcPath,\n createWedgePath,\n type ArcPathOptions,\n type WedgePathOptions,\n} from './lib/geometry/circular-sweep.js';\nexport {\n createCirclePath,\n type CirclePathOptions,\n} from './lib/geometry/circle.js';\nexport {\n createEllipsePath,\n type EllipsePathOptions,\n} from './lib/geometry/ellipse.js';\nexport {\n createLinePath,\n type LinePathOptions,\n} from './lib/geometry/line.js';\nexport {\n createPolygonPath,\n type PolygonPathOptions,\n} from './lib/geometry/polygon.js';\nexport {\n createRectanglePath,\n type RectanglePathOptions,\n} from './lib/geometry/rectangle.js';\nexport {\n createRegularPolygonPath,\n type RegularPolygonNumericSize,\n type RegularPolygonPathOptions,\n type RegularPolygonPathPosition,\n} from './lib/geometry/regular-polygon.js';\nexport {\n createStarPath,\n type StarPathOptions,\n} from './lib/geometry/star.js';\nexport {\n createSvgPath,\n type SvgPathOptions,\n} from './lib/geometry/svg-path.js';\nexport type { RoundedCornerPathOptions } from './lib/geometry/rounded-corners.js';\nexport { pibbl } from './lib/pibbl.js';\nexport {\n batch,\n computed,\n isSignal,\n signal,\n untracked,\n} from './lib/signals/graph.js';\nexport { resolveSignalValue } from './lib/signals/resolve-signal-value.js';\nexport type {\n Signal,\n SignalEquals,\n SignalOptions,\n SignalValue,\n WritableSignal,\n} from './lib/signals/types.js';\nexport { easing } from './lib/animation/easing.js';\nexport {\n defineAnimation,\n keyframes,\n spring,\n stepper,\n tween,\n} from './lib/animation/definition.js';\nexport {\n marker,\n parallel,\n repeat,\n sequence,\n drive,\n wait,\n} from './lib/animation/program.js';\nexport type {\n PibblAnimationDefinition,\n PibblAnimationOptions,\n PibblAnimationProgram,\n PibblAnimationRepeatDirection,\n PibblAnimationRepeatOptions,\n PibblAnimationSampleInput,\n PibblSpringAnimatedValueOptions,\n PibblPlayback,\n PibblPlaybackEvent,\n PibblPlaybackOptions,\n PibblPlaybackStatus,\n PibblEasing,\n PibblInterpolator,\n PibblKeyframesOptions,\n PibblSpringOptions,\n PibblStepperOptions,\n PibblTweenOptions,\n PibblTweenAnimatedValueOptions,\n} from './lib/animation/types.js';\nexport type {\n PibblConfig,\n PibblFit,\n PibblFixedViewportConfig,\n PibblPixelRatio,\n PibblResponsiveViewportConfig,\n} from './lib/surface/types.js';\nexport {\n Absolute,\n type AbsoluteProps,\n type AbsoluteStyle,\n} from './lib/layout/absolute.js';\nexport {\n Overlay,\n type OverlayProps,\n type OverlayStyle,\n} from './lib/layout/overlay.js';\nexport {\n Flow,\n type FlowProps,\n type FlowStyle,\n} from './lib/layout/flow.js';\nexport {\n Flex,\n type FlexProps,\n type FlexStyle,\n} from './lib/layout/flex.js';\nexport {\n Grid,\n type GridProps,\n type GridStyle,\n type GridTrack,\n} from './lib/layout/grid.js';\nexport { measureElement } from './lib/layout/measure.js';\n\nexport {\n FocusManagement,\n KeyboardNavigation,\n type FocusManagementProps,\n type KeyboardNavigationProps,\n} from './lib/focus/policy-components.js';\nexport type { PibblKeyboardNavigationOptions } from './lib/focus/types.js';\n\nexport { definePrimitive } from './lib/define-primitive.js';\nexport { defineRenderLayer } from './lib/render-layer/define-render-layer.js';\nexport type {\n PibblRenderLayerComponentProps,\n PibblRenderLayerDefinition,\n PibblRenderLayerFrame,\n PibblRenderLayerContext,\n PibblRenderLayerHit,\n PibblRenderLayerInput,\n PibblRenderLayerInteraction,\n PibblRenderLayerInteractionSnapshot,\n PibblRenderLayerProps,\n PibblRenderLayerSize,\n PibblRenderLayerStyle,\n PibblRenderLayerTarget,\n} from './lib/render-layer/types.js';\nexport { createElement } from './lib/element/create-element.js';\nexport { Fragment } from './lib/element/fragment.js';\nexport type {\n BoxStyle,\n CursorStyle,\n EdgeValues,\n FlexItemStyle,\n GridItemStyle,\n ImgStyle,\n LayoutItemStyle,\n Length,\n PaintStyle,\n PathStyle,\n RectStyle,\n ResolvedBoxStyle,\n SvgPathStyle,\n TextFit,\n TextStyle,\n Percentage,\n RoundedCornerStyle,\n} from './lib/style/types.js';\nexport {\n LayoutDiagnostic,\n layoutDiagnostic,\n type LayoutDiagnosticContext,\n type LayoutDiagnosticInput,\n} from './lib/style/diagnostics.js';\nexport { normalizeEdges } from './lib/style/normalize.js';\nexport { resolveLength } from './lib/style/resolve-length.js';\nexport { resolveBox } from './lib/layout/box.js';\nexport type {\n PibblFilter,\n} from './lib/style/filter-types.js';\nexport type {\n Constraints,\n Edges,\n LayoutBox,\n Size,\n} from './lib/layout/types.js';\n// hooks\nexport { useCursor } from './lib/hooks/use-cursor.js';\nexport { useCanvasContext } from './lib/hooks/use-canvas-context.js';\nexport { useComputed } from './lib/hooks/use-computed.js';\nexport { useConst } from './lib/hooks/use-const.js';\nexport { useEventListener } from './lib/hooks/use-event-listener.js';\nexport { useEventTarget } from './lib/hooks/use-event-target.js';\nexport { useLinePath } from './lib/hooks/use-line-path.js';\nexport { useLayoutBox } from './lib/hooks/use-layout-box.js';\nexport { useRectPath } from './lib/hooks/use-rect-path.js';\nexport { useRef, type PibblRef } from './lib/hooks/use-ref.js';\nexport { usePlayback } from './lib/hooks/use-playback.js';\nexport {\n useReaction,\n type PibblReactionOptions,\n} from './lib/hooks/use-reaction.js';\nexport { useAnimatedValue } from './lib/hooks/use-animated-value.js';\nexport { useSignal } from './lib/hooks/use-signal.js';\nexport { useSvgPath } from './lib/hooks/use-svg-path.js';\nexport type {\n Canvas,\n CanvasMeasurementService,\n PibblController,\n PibblComponent,\n PibblContainerChild,\n PibblElement,\n PibblElementType,\n PibblEmptyNode,\n PibblKey,\n PibblNode,\n PibblNodeInput,\n PibblPhysics2DPropExtension,\n PibblPrimitiveComponent,\n PibblTextChild,\n PibblTextInput,\n PibblRenderResult,\n PibblSizeQuery,\n PibblStyleRule,\n PibblResponsiveStyle,\n PrimitiveInputOf,\n PrimitiveCapabilities,\n PrimitiveInput,\n PrimitiveProgramProps,\n PrimitiveRender,\n FillStyle,\n MeasureInput,\n MeasureResult,\n PixelGridAlignment,\n NormalizedStyle,\n RenderingContext2D,\n ResolvedStyle,\n SpecifiedStyle,\n StyleResolutionContext,\n StrokeStyle,\n SystemStyle,\n} from './lib/types.js';\nexport type {\n PibblClipboardEvent,\n PibblCompositionEvent,\n PibblDragEvent,\n PibblEvent,\n PibblEventCapturePropName,\n PibblEventHandler,\n PibblEventHandlers,\n PibblEventMap,\n PibblEventParticipationOptions,\n PibblEventPhase,\n PibblEventPropName,\n PibblEventTarget,\n PibblEventTargetOptions,\n PibblEventTargetSnapshot,\n PibblEventType,\n PibblFocusEvent,\n PibblInputEvent,\n PibblKeyboardEvent,\n PibblLogicalMouseEvent,\n PibblPointerEvent,\n PibblPointerEvents,\n PibblTouchEvent,\n PibblWheelEvent,\n} from './lib/events/types.js';\n\nexport { useManipulation } from './lib/manipulation/controller.js';\nexport { ManipulationFrame } from './lib/manipulation/frame.js';\nexport { DragHandle, ResizeHandle, ResizeHandles, RotationHandle } from './lib/manipulation/handles.js';\nexport type { PibblManipulationController, PibblManipulationOptions, PibblManipulationSnapshot, PibblManipulationEvent, PibblManipulationCommitEvent, PibblManipulationCancelEvent, PibblManipulationCancelReason, PibblManipulationGeometry, PibblManipulationOperation, PibblManipulationActive, PibblManipulationFrameProps, PibblManipulationMoveInput, PibblManipulationResizeInput, PibblManipulationRotateInput } from './lib/manipulation/controller-types.js';\nexport type { PibblManipulationBox, PibblManipulationPoint, PibblManipulationWhen, PibblResizePosition } from './lib/manipulation/types.js';\nexport type { PibblDragHandleProps, PibblDragHandleStyle } from './lib/manipulation/handles.js';\n\nexport type { PibblResizeHandleProps, PibblResizeHandlesProps, PibblRotationHandleProps, PibblResizeHandleStyle, PibblRotationHandleStyle, PibblManipulationReadoutStyle, PibblManipulationReadoutStateStyle, PibblRotationConnectorStyle, PibblRotationArcStyle } from './lib/manipulation/handles.js';\n\nexport { degrees } from './lib/manipulation/degrees.js';\nexport { Manipulable } from './lib/manipulation/manipulable.js';\nexport type { PibblManipulableProps } from './lib/manipulation/manipulable.js';\n\nexport { defineTexture, useTexture } from './lib/textures/texture.js';\nexport type { Texture, TexturePaint, TextureRecipe, TextureDefinition, TextureOptions, TexturePlacement, TextureContext, TextureFrame } from './lib/textures/texture.js';\n\nexport { HtmlBox } from './lib/components/html-box.js';\nexport type { HtmlBoxProps, HtmlBoxStyle, HtmlMountCallback, HtmlUpdateFunction, HtmlBoxFocusState } from './lib/html/types.js';\n\nexport { fade } from './lib/transitions/fade.js';\nexport type { PibblTransitionEffect } from './lib/transitions/fade.js';\nexport type { PibblTransitionBinding } from './lib/transitions/binding.js';\nexport { useVisibilityTransition } from './lib/hooks/use-visibility-transition.js';\nexport type { PibblVisibilityTransition, PibblVisibilityTransitionOptions, PibblVisibilityTransitionResult, PibblVisibilityTransitionStatus } from './lib/hooks/use-visibility-transition.js';\n\nexport { embers } from './lib/transitions/embers.js';\nexport type { PibblEmbersOptions } from './lib/transitions/embers.js';\n\nexport { hologram } from './lib/transitions/hologram.js';\nexport type { PibblHologramOptions } from './lib/transitions/hologram.js';\nexport { bifrost } from './lib/transitions/bifrost.js';\nexport type { PibblBifrostOptions } from './lib/transitions/bifrost.js';\n\nexport { slide, zoom, wipe, blurReveal, dissolve } from './lib/transitions/common.js';\nexport type { PibblSlideOptions, PibblZoomOptions, PibblWipeOptions, PibblBlurRevealOptions, PibblDissolveOptions } from './lib/transitions/common.js';\n\nexport { defineTransition } from './lib/transitions/define-transition.js';\nexport type { PibblTransitionDefinition, PibblTransitionRenderFrame } from './lib/transitions/define-transition.js';\n\nexport type { PibblEmbersPhysicsOptions, PibblEmberCollision } from './lib/transitions/embers-physics.js';\n"],
5
- "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAA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AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAIK;AACP,SAAS,sBAAsB;AAE/B;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAGP,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAelC,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AAoBzB;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,sBAAsB;AAC/B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAW3B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,cAA6B;AACtC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,OAEK;AACP,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAgE3B,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,YAAY,cAAc,eAAe,sBAAsB;AAOxE,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAG5B,SAAS,eAAe,kBAAkB;AAG1C,SAAS,eAAe;AAGxB,SAAS,YAAY;AAGrB,SAAS,+BAA+B;AAGxC,SAAS,cAAc;AAGvB,SAAS,gBAAgB;AAEzB,SAAS,eAAe;AAGxB,SAAS,OAAO,MAAM,MAAM,YAAY,gBAAgB;AAGxD,SAAS,wBAAwB;",
4
+ "sourcesContent": ["export {\n meshTransform,\n arcBendTransform,\n pathBendTransform,\n type MeshTransformOptions,\n type ArcBendTransformOptions,\n type PathBendTransformOptions,\n transformPath,\n composeTransforms,\n affineTransform,\n quadTransform,\n envelopeTransform,\n type PathTransform,\n type PathPoint,\n type PathRect,\n type TransformPathOptions,\n type QuadTransformOptions,\n type PathQuadCorners,\n type PathQuadMode,\n type BendTransformOptions,\n type EnvelopeTransformOptions,\n type EnvelopeGuide,\n type PathGuide,\n type PathGuideOptions,\n type PathGuideStation,\n} from './lib/geometry/path-transforms.js';\nexport { type PathBendArc, type PathBendAlign, type PathBendBaseline, type PathBendFit, type PathBendOverflow } from './lib/geometry/path-bending.js';\nexport { flattenPathWang } from './lib/geometry/path-wang.js';\nexport { simplifyPathRadial } from './lib/geometry/path-radial.js';\nexport { PathGeometry, type PathSegment } from './lib/geometry/path-geometry.js';\nexport { toPath2D, toSvgPathData } from './lib/geometry/path-conversion.js';\nexport {\n flattenPath,\n simplifyPath,\n subdividePath,\n type FlattenPathOptions,\n type SimplifyPathOptions,\n type SubdividePathOptions,\n} from './lib/geometry/path-utilities.js';\n// components\nexport { Arc, type ArcProps, type ArcStyle } from './lib/components/arc.js';\nexport {\n Circle,\n type CircleProps,\n type CircleStyle,\n} from './lib/components/circle.js';\nexport { Clip, type ClipProps, type ClipStyle } from './lib/components/clip.js';\nexport {\n Ellipse,\n type EllipseProps,\n type EllipseStyle,\n} from './lib/components/ellipse.js';\nexport {\n Group,\n type GroupProps,\n type GStyle,\n} from './lib/components/g.js';\nexport {\n HorizontalLine,\n type HorizontalLineProps,\n type HorizontalLineStyle,\n} from './lib/components/horizontal-line.js';\n\nexport {\n Image,\n type ImageProps,\n} from './lib/components/img.js';\nexport {\n Layer,\n type LayerProps,\n type LayerStyle,\n} from './lib/components/layer.js';\nexport {\n Line,\n type LineProps,\n type LineStyle,\n} from './lib/components/line.js';\nexport { Path, type PathProps } from './lib/components/path.js';\nexport {\n Polygon,\n type PolygonProps,\n type PolygonStyle,\n} from './lib/components/polygon.js';\nexport {\n RegularPolygon,\n type RegularPolygonProps,\n type RegularPolygonStyle,\n} from './lib/components/regular-polygon.js';\nexport {\n Rectangle,\n type RectangleProps,\n} from './lib/components/rect.js';\nexport {\n Star,\n type StarProps,\n type StarStyle,\n} from './lib/components/star.js';\nexport {\n SvgPath,\n type SvgPathProps,\n} from './lib/components/svg-path.js';\nexport { Text, type TextProps } from './lib/components/text.js';\nexport {\n VerticalLine,\n type VerticalLineProps,\n type VerticalLineStyle,\n} from './lib/components/vertical-line.js';\nexport {\n Wedge,\n type WedgeProps,\n type WedgeStyle,\n} from './lib/components/wedge.js';\nexport {\n createArcPath,\n createWedgePath,\n type ArcPathOptions,\n type WedgePathOptions,\n} from './lib/geometry/circular-sweep.js';\nexport {\n createCirclePath,\n type CirclePathOptions,\n} from './lib/geometry/circle.js';\nexport {\n createEllipsePath,\n type EllipsePathOptions,\n} from './lib/geometry/ellipse.js';\nexport {\n createLinePath,\n type LinePathOptions,\n} from './lib/geometry/line.js';\nexport {\n createPolygonPath,\n type PolygonPathOptions,\n} from './lib/geometry/polygon.js';\nexport {\n createRectanglePath,\n type RectanglePathOptions,\n} from './lib/geometry/rectangle.js';\nexport {\n createRegularPolygonPath,\n type RegularPolygonNumericSize,\n type RegularPolygonPathOptions,\n type RegularPolygonPathPosition,\n} from './lib/geometry/regular-polygon.js';\nexport {\n createStarPath,\n type StarPathOptions,\n} from './lib/geometry/star.js';\nexport {\n createSvgPath,\n type SvgPathOptions,\n} from './lib/geometry/svg-path.js';\nexport type { RoundedCornerPathOptions } from './lib/geometry/rounded-corners.js';\nexport { pibbl, prepareLayoutEngine } from './lib/pibbl.js';\nexport {\n batch,\n computed,\n isSignal,\n signal,\n untracked,\n} from './lib/signals/graph.js';\nexport { resolveSignalValue } from './lib/signals/resolve-signal-value.js';\nexport type {\n Signal,\n SignalEquals,\n SignalOptions,\n SignalValue,\n WritableSignal,\n} from './lib/signals/types.js';\nexport { easing } from './lib/animation/easing.js';\nexport {\n defineAnimation,\n keyframes,\n spring,\n stepper,\n tween,\n} from './lib/animation/definition.js';\nexport {\n marker,\n parallel,\n repeat,\n sequence,\n drive,\n wait,\n} from './lib/animation/program.js';\nexport type {\n PibblAnimationDefinition,\n PibblAnimationOptions,\n PibblAnimationProgram,\n PibblAnimationRepeatDirection,\n PibblAnimationRepeatOptions,\n PibblAnimationSampleInput,\n PibblAnimatedValueOptions,\n PibblAnimationTarget,\n PibblPlayback,\n PibblPlaybackEvent,\n PibblPlaybackOptions,\n PibblPlaybackStatus,\n PibblEasing,\n PibblInterpolator,\n PibblKeyframesOptions,\n PibblSpringOptions,\n PibblStepperOptions,\n PibblTweenOptions,\n} from './lib/animation/types.js';\nexport type {\n PibblConfig,\n PibblFit,\n PibblFixedViewportConfig,\n PibblPixelRatio,\n PibblResponsiveViewportConfig,\n} from './lib/surface/types.js';\nexport {\n Absolute,\n type AbsoluteProps,\n type AbsoluteStyle,\n} from './lib/layout/absolute.js';\nexport {\n Overlay,\n type OverlayProps,\n type OverlayStyle,\n} from './lib/layout/overlay.js';\nexport {\n Flow,\n type FlowProps,\n type FlowStyle,\n} from './lib/layout/flow.js';\nexport {\n Flex,\n type FlexProps,\n type FlexStyle,\n} from './lib/layout/flex.js';\nexport {\n Grid,\n minmax,\n repeatTracks,\n autoFillTracks,\n autoFitTracks,\n type GridTrackBreadth,\n type GridMinMaxTrack,\n type GridRepeatTrack,\n type GridProps,\n type GridStyle,\n type GridTrack,\n} from './lib/layout/grid.js';\nexport { measureElement } from './lib/layout/measure.js';\n\nexport {\n FocusManagement,\n KeyboardNavigation,\n type FocusManagementProps,\n type KeyboardNavigationProps,\n} from './lib/focus/policy-components.js';\nexport type { PibblKeyboardNavigationOptions } from './lib/focus/types.js';\n\nexport { definePrimitive } from './lib/define-primitive.js';\nexport { defineRenderLayer } from './lib/render-layer/define-render-layer.js';\nexport type {\n PibblRenderLayerComponentProps,\n PibblRenderLayerDefinition,\n PibblRenderLayerFrame,\n PibblRenderLayerContext,\n PibblRenderLayerHit,\n PibblRenderLayerInput,\n PibblRenderLayerInteraction,\n PibblRenderLayerInteractionSnapshot,\n PibblRenderLayerProps,\n PibblRenderLayerSize,\n PibblRenderLayerStyle,\n PibblRenderLayerTarget,\n} from './lib/render-layer/types.js';\nexport { createElement } from './lib/element/create-element.js';\nexport { Fragment } from './lib/element/fragment.js';\nexport type {\n BoxStyle,\n CursorStyle,\n EdgeValues,\n FlexItemStyle,\n FlexMargin,\n GridItemStyle,\n ImgStyle,\n LayoutItemStyle,\n Length,\n PaintStyle,\n PathStyle,\n RectStyle,\n ResolvedBoxStyle,\n SvgPathStyle,\n TextFit,\n TextStyle,\n Percentage,\n RoundedCornerStyle,\n} from './lib/style/types.js';\nexport { fitContent, type FitContent, type SizingKeyword, type SizingLength } from './lib/style/sizing-length.js';\nexport {\n LayoutDiagnostic,\n layoutDiagnostic,\n type LayoutDiagnosticContext,\n type LayoutDiagnosticInput,\n} from './lib/style/diagnostics.js';\nexport { normalizeEdges } from './lib/style/normalize.js';\nexport { resolveLength } from './lib/style/resolve-length.js';\nexport { resolveBox } from './lib/layout/box.js';\nexport type {\n PibblFilter,\n} from './lib/style/filter-types.js';\nexport type {\n Constraints,\n Edges,\n LayoutBox,\n Size,\n} from './lib/layout/types.js';\n// hooks\nexport { useCursor } from './lib/hooks/use-cursor.js';\nexport { useCanvasContext } from './lib/hooks/use-canvas-context.js';\nexport { useComputed } from './lib/hooks/use-computed.js';\nexport { useConst } from './lib/hooks/use-const.js';\nexport { useEventListener } from './lib/hooks/use-event-listener.js';\nexport { useEventTarget } from './lib/hooks/use-event-target.js';\nexport { useLinePath } from './lib/hooks/use-line-path.js';\nexport { useLayoutBox } from './lib/hooks/use-layout-box.js';\nexport { useRectPath } from './lib/hooks/use-rect-path.js';\nexport { useRef, type PibblRef } from './lib/hooks/use-ref.js';\nexport { usePlayback } from './lib/hooks/use-playback.js';\nexport {\n useReaction,\n type PibblReactionOptions,\n} from './lib/hooks/use-reaction.js';\nexport { useAnimatedValue } from './lib/hooks/use-animated-value.js';\nexport { useSignal } from './lib/hooks/use-signal.js';\nexport { useSvgPath } from './lib/hooks/use-svg-path.js';\nexport type {\n Canvas,\n CanvasMeasurementService,\n PibblController,\n PibblComponent,\n PibblContainerChild,\n PibblElement,\n PibblElementType,\n PibblEmptyNode,\n PibblKey,\n PibblNode,\n PibblNodeInput,\n PibblPhysics2DPropExtension,\n PibblPrimitiveComponent,\n PibblTextChild,\n PibblTextInput,\n PibblRenderResult,\n PibblSizeQuery,\n PibblStyleRule,\n PibblResponsiveStyle,\n PrimitiveInputOf,\n PrimitiveCapabilities,\n PrimitiveInput,\n PrimitiveProgramProps,\n PrimitiveRender,\n FillStyle,\n MeasureInput,\n IntrinsicAxisConstraints,\n IntrinsicConstraints,\n IntrinsicMeasureInput,\n IntrinsicSizesResult,\n BaselineMeasureInput,\n BaselinesResult,\n MeasureResult,\n PixelGridAlignment,\n NormalizedStyle,\n RenderingContext2D,\n ResolvedStyle,\n SpecifiedStyle,\n StyleResolutionContext,\n StrokeStyle,\n SystemStyle,\n} from './lib/types.js';\nexport type {\n PibblClipboardEvent,\n PibblCompositionEvent,\n PibblDragEvent,\n PibblEvent,\n PibblEventCapturePropName,\n PibblEventHandler,\n PibblEventHandlers,\n PibblEventMap,\n PibblEventParticipationOptions,\n PibblEventPhase,\n PibblEventPropName,\n PibblEventTarget,\n PibblEventTargetOptions,\n PibblEventTargetSnapshot,\n PibblEventType,\n PibblFocusEvent,\n PibblInputEvent,\n PibblKeyboardEvent,\n PibblLogicalMouseEvent,\n PibblPointerEvent,\n PibblPointerEvents,\n PibblTouchEvent,\n PibblWheelEvent,\n} from './lib/events/types.js';\n\nexport { useManipulation } from './lib/manipulation/controller.js';\nexport { ManipulationFrame } from './lib/manipulation/frame.js';\nexport { DragHandle, ResizeHandle, ResizeHandles, RotationHandle } from './lib/manipulation/handles.js';\nexport type { PibblManipulationController, PibblManipulationOptions, PibblManipulationSnapshot, PibblManipulationEvent, PibblManipulationCommitEvent, PibblManipulationCancelEvent, PibblManipulationCancelReason, PibblManipulationGeometry, PibblManipulationOperation, PibblManipulationActive, PibblManipulationFrameProps, PibblManipulationMoveInput, PibblManipulationResizeInput, PibblManipulationRotateInput } from './lib/manipulation/controller-types.js';\nexport type { PibblManipulationBox, PibblManipulationPoint, PibblManipulationWhen, PibblResizePosition } from './lib/manipulation/types.js';\nexport type { PibblDragHandleProps, PibblDragHandleStyle } from './lib/manipulation/handles.js';\n\nexport type { PibblResizeHandleProps, PibblResizeHandlesProps, PibblRotationHandleProps, PibblResizeHandleStyle, PibblRotationHandleStyle, PibblManipulationReadoutStyle, PibblManipulationReadoutStateStyle, PibblRotationConnectorStyle, PibblRotationArcStyle } from './lib/manipulation/handles.js';\n\nexport { degrees } from './lib/manipulation/degrees.js';\nexport { Manipulable } from './lib/manipulation/manipulable.js';\nexport type { PibblManipulableProps } from './lib/manipulation/manipulable.js';\n\nexport { defineTexture, useTexture } from './lib/textures/texture.js';\nexport type { Texture, TexturePaint, TextureRecipe, TextureDefinition, TextureOptions, TexturePlacement, TextureContext, TextureFrame } from './lib/textures/texture.js';\n\nexport { HtmlBox } from './lib/components/html-box.js';\nexport type { HtmlBoxEventHandlers, HtmlBoxProps, HtmlBoxStyle, HtmlMountCallback, HtmlUpdateFunction, HtmlBoxFocusState } from './lib/html/types.js';\n\nexport { fade } from './lib/transitions/fade.js';\nexport type { PibblTransitionEffect } from './lib/transitions/fade.js';\nexport type { PibblTransitionBinding } from './lib/transitions/binding.js';\nexport { useVisibilityTransition } from './lib/hooks/use-visibility-transition.js';\nexport type { PibblVisibilityTransition, PibblVisibilityTransitionOptions, PibblVisibilityTransitionResult, PibblVisibilityTransitionStatus } from './lib/hooks/use-visibility-transition.js';\n\nexport { embers } from './lib/transitions/embers.js';\nexport type { PibblEmbersOptions } from './lib/transitions/embers.js';\n\nexport { hologram } from './lib/transitions/hologram.js';\nexport type { PibblHologramOptions } from './lib/transitions/hologram.js';\nexport { bifrost } from './lib/transitions/bifrost.js';\nexport type { PibblBifrostOptions } from './lib/transitions/bifrost.js';\n\nexport { slide, zoom, wipe, blurReveal, dissolve } from './lib/transitions/common.js';\nexport type { PibblSlideOptions, PibblZoomOptions, PibblWipeOptions, PibblBlurRevealOptions, PibblDissolveOptions } from './lib/transitions/common.js';\n\nexport { defineTransition } from './lib/transitions/define-transition.js';\nexport type { PibblTransitionDefinition, PibblTransitionRenderFrame } from './lib/transitions/define-transition.js';\n\nexport type { PibblEmbersPhysicsOptions, PibblEmberCollision } from './lib/transitions/embers-physics.js';\n\nexport { recordFrames, exportGif } from './lib/recording/recording.js';\nexport type {\n PibblFrameRecordingOptions,\n PibblFrameRecordingSession,\n PibblRecordedFrameInfo,\n PibblRecordedFrame,\n PibblFrameRecording,\n PibblGifExportOptions,\n PibblRenderCompletion,\n} from './lib/recording/types.js';\n\nexport { defineLayoutComponent } from './lib/layout/define-layout-component.js';\n"],
5
+ "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAcK;AAEP,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,oBAAsC;AAC/C,SAAS,UAAU,qBAAqB;AACxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP,SAAS,WAAyC;AAClD;AAAA,EACE;AAAA,OAGK;AACP,SAAS,YAA4C;AACrD;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AAEP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP,SAAS,YAA4B;AACrC;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,YAA4B;AACrC;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;A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AAS,yBAAyB;AAClC,SAAS,YAAY,cAAc,eAAe,sBAAsB;AAOxE,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAG5B,SAAS,eAAe,kBAAkB;AAG1C,SAAS,eAAe;AAGxB,SAAS,YAAY;AAGrB,SAAS,+BAA+B;AAGxC,SAAS,cAAc;AAGvB,SAAS,gBAAgB;AAEzB,SAAS,eAAe;AAGxB,SAAS,OAAO,MAAM,MAAM,YAAY,gBAAgB;AAGxD,SAAS,wBAAwB;AAKjC,SAAS,cAAc,iBAAiB;AAWxC,SAAS,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -26,6 +26,8 @@ export type { PibblInternalAdvanceLane, PibblInternalSimulationOwner, } from "./
26
26
  import type { PibblBackendEventTargetOptions, PibblBackendToken, PibblNestedResolverInput } from "./lib/backend/types.js";
27
27
  import { type PibblEventTargetRegistration } from "./lib/events/registrations.js";
28
28
  import type { PibblEventHandlers, PibblPointerEvents } from "./lib/events/types.js";
29
+ export { captureSeriesInspectionFrame } from "./lib/series-inspection-frame.js";
30
+ export { borrowDispatchResource } from "./lib/events/event-facade.js";
29
31
  import { type PibblElementSource } from "./lib/element/metadata.js";
30
32
  import type { Canvas } from "./lib/types.js";
31
33
  /**
@@ -158,3 +160,5 @@ export { ManualSchedulerDriver as PibblInternalManualSchedulerDriver, installSch
158
160
  export { getCurrentWorldTransform as pibblInternalCurrentWorldTransform } from "./lib/render-target.js";
159
161
  export { borrowTextureRaster, resolveTexturePaint, validateTexturePaint } from './lib/textures/texture-protocol.js';
160
162
  export type { BorrowedTextureRaster } from './lib/textures/texture-protocol.js';
163
+ export { createStandaloneLayoutKernel } from "./lib/layout/standalone-kernel.js";
164
+ export type { StandaloneLayoutKernel, StandaloneLayoutKernelNode, StandaloneLayoutKernelInput, StandaloneLayoutKernelBox } from "./lib/layout/standalone-kernel.js";
package/dist/internal.js CHANGED
@@ -33,6 +33,8 @@ import {
33
33
  } from "./lib/events/registrations.js";
34
34
  import { PibblPaintEntryKind } from "./lib/events/paint-entry.js";
35
35
  import { getCurrentPibblInstance, GLOBAL_STATE } from "./lib/global-state.js";
36
+ import { captureSeriesInspectionFrame } from "./lib/series-inspection-frame.js";
37
+ import { borrowDispatchResource } from "./lib/events/event-facade.js";
36
38
  import {
37
39
  requireHookContext,
38
40
  useInternalHookSlot as useInternalHookSlot2
@@ -261,10 +263,14 @@ import {
261
263
  } from "./lib/scheduler/testing.js";
262
264
  import { getCurrentWorldTransform as getCurrentWorldTransform2 } from "./lib/render-target.js";
263
265
  import { borrowTextureRaster, resolveTexturePaint, validateTexturePaint } from "./lib/textures/texture-protocol.js";
266
+ import { createStandaloneLayoutKernel } from "./lib/layout/standalone-kernel.js";
264
267
  export {
265
268
  ManualSchedulerDriver as PibblInternalManualSchedulerDriver,
269
+ borrowDispatchResource,
266
270
  borrowTextureRaster,
271
+ captureSeriesInspectionFrame,
267
272
  createBackendToken,
273
+ createStandaloneLayoutKernel,
268
274
  defineBackendPrimitive,
269
275
  derivePrimitive,
270
276
  getBackendEnvironment,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/internal.ts"],
4
- "sourcesContent": ["import type { PibblInternalFrame, pibblInternalOnRenderFinish, pibblInternalRequestRender } from './lib/scheduler/renderer-participant.js';\nimport type { PibblConfig, PibblPixelRatio } from './lib/surface/types.js';\n/**\n * @packageDocumentation\n * Reserved for official Pibbl packages that are released in lockstep with\n * `@pibbl/core`. This version-coupled module is not a stable third-party plugin\n * API and intentionally does not re-export the public root module.\n */\n\nexport { createBackendToken } from \"./lib/backend/types.js\";\nexport type {\n PibblBackendDriver,\n PibblBackendEventTargetOptions,\n PibblBackendFrame,\n PibblBackendFrameInput,\n PibblBackendMount,\n PibblBackendMountOptions,\n PibblBackendPrimitiveDefinition,\n PibblBackendPrimitiveInput,\n PibblBackendPrimitiveProgram,\n PibblBackendToken,\n PibblNestedResolverInput,\n} from \"./lib/backend/types.js\";\nexport type { SignalProgramProps, SignalStyle } from \"./lib/types.js\";\nexport {\n pibblInternalRunPurePrimitiveResolver,\n defineBackendPrimitive,\n derivePrimitive,\n} from \"./lib/define-primitive.js\";\nexport { mountBackendPibbl } from \"./lib/mount-pibbl.js\";\nexport {\n useInternalHookSlot,\n withHooksForbidden,\n} from \"./lib/hooks/hook-slot.js\";\nexport { useValueMemoSlot as useInternalValueMemoSlot } from \"./lib/hooks/use-value-memo-slot.js\";\nexport {\n haveSameLayerNodeTree,\n materializeRetainedLayerChildren,\n snapshotLayerNodeTree,\n} from \"./lib/components/layer-node-equality.js\";\nexport type { LayerNodeSnapshot } from \"./lib/components/layer-node-equality.js\";\nexport type { PibblEventTargetRegistration } from \"./lib/events/registrations.js\";\nexport type { PibblElementSource } from \"./lib/element/metadata.js\";\nexport { pibblInternalCreatePropAttachment } from \"./lib/element-enhancers.js\";\nexport type {\n PibblInternalMountedPropAttachment,\n PibblInternalPrimitiveAttachmentInput,\n} from \"./lib/element-enhancers.js\";\nexport type { PibblHitTestOutput } from \"./lib/events/paint-entry.js\";\nexport { hasPibblEventHandler } from \"./lib/events/event-definitions.js\";\nexport {\n pibblInternalCurrentSimulationOwner,\n pibblInternalOnSimulationRenderTransactionFinish,\n pibblInternalQueueSimulationBegin,\n pibblInternalQueueSimulationCommitAcknowledgement,\n pibblInternalQueueSimulationComplete,\n pibblInternalRegisterSimulationAdvance,\n pibblInternalRequestSimulationRender,\n} from \"./lib/scheduler/simulation-participant.js\";\nexport type {\n PibblInternalAdvanceLane,\n PibblInternalSimulationOwner,\n} from \"./lib/scheduler/simulation-participant.js\";\n\nimport type {\n PibblBackendEventTargetOptions,\n PibblBackendMount,\n PibblBackendToken,\n PibblNestedResolverInput,\n} from \"./lib/backend/types.js\";\nimport {\n createTarget,\n releaseTarget,\n updateTarget,\n type PibblEventTargetRegistration,\n} from \"./lib/events/registrations.js\";\nimport { PibblPaintEntryKind } from \"./lib/events/paint-entry.js\";\nimport type { PibblEventHandlers, PibblPointerEvents } from \"./lib/events/types.js\";\nimport { getCurrentPibblInstance, GLOBAL_STATE } from \"./lib/global-state.js\";\nimport {\n requireHookContext,\n useInternalHookSlot,\n} from \"./lib/hooks/hook-slot.js\";\nimport { getCurrentWorldTransform } from \"./lib/render-target.js\";\nimport {\n getElementSource,\n type PibblElementSource,\n} from \"./lib/element/metadata.js\";\nimport { getSurfaceSnapshot } from \"./lib/surface/transform.js\";\nimport type {\n Canvas,\n PibblComponentRefs,\n PibblInstance,\n} from \"./lib/types.js\";\nimport type { PibblInteractionLayer } from \"./lib/types.js\";\nimport { update } from \"./lib/update.js\";\nimport { queueBeginCommand } from \"./lib/scheduler/realm-scheduler.js\";\nimport type { PibblBeginCommandHandle } from \"./lib/scheduler/types.js\";\n\ninterface CurrentInstanceFrameRequestState {\n readonly componentRefs: PibblComponentRefs<any>;\n readonly instance: PibblInstance;\n active: boolean;\n handle: PibblBeginCommandHandle | undefined;\n updateParents: boolean;\n}\n\nconst frameRequestsByComponent = new WeakMap<\n PibblComponentRefs<any>,\n CurrentInstanceFrameRequestState\n>();\n/**\n * Reads the selected official backend's current frame environment.\n *\n * @param token - Backend identity required by the caller. See {@link PibblBackendToken}.\n * @returns The active environment for that backend.\n *\n * @see {@link PibblBackendToken}\n */\nexport function getBackendEnvironment<E>(token: PibblBackendToken): E {\n const driver = GLOBAL_STATE.backendDriver;\n const frame = GLOBAL_STATE.backendFrame;\n if (!driver || !frame || driver.token !== token) {\n throw new Error(\"The requested Pibbl backend environment is not active.\");\n }\n return frame.environment as E;\n}\n\n/**\n * Returns the timestamp shared by the current Pibbl render transaction.\n *\n * @returns The active frame timestamp in milliseconds.\n *\n * @see {@link PibblInternalFrame}\n */\nexport function getCurrentFrameTimestamp(): number {\n return getCurrentPibblInstance().renderTimestamp;\n}\n\n/**\n * Returns the active instance's owning Canvas, never a transient filter target.\n *\n * @returns The host canvas of the active backend mount. See {@link Canvas}.\n *\n * @see {@link Canvas}\n */\nexport function getCurrentBackendHostCanvas(): Canvas {\n return getCurrentPibblInstance().canvas;\n}\n\n/**\n * Returns development JSX source metadata for the current component.\n *\n * @returns Source metadata for the current element, or undefined when unavailable. See\n * {@link PibblElementSource} .\n *\n * @see {@link PibblElementSource}\n */\nexport function getCurrentElementSource(): PibblElementSource | undefined {\n const { componentRefs } = requireHookContext();\n return getElementSource(componentRefs.element);\n}\n\n/**\n * Returns the active surface's independent effective backing densities.\n *\n * @returns Backing pixels per logical unit on each axis.\n *\n * @see {@link PibblPixelRatio}\n */\nexport function getCurrentSurfaceDensity(): Readonly<{ x: number; y: number }> {\n const surface = getSurfaceSnapshot(getCurrentPibblInstance());\n return Object.freeze({\n x: surface.backingPixelsPerLogicalUnitX,\n y: surface.backingPixelsPerLogicalUnitY,\n });\n}\n\n/**\n * Returns the active root-logical viewport for an official renderer hook.\n *\n * @returns The current logical viewport width and height.\n *\n * @see {@link PibblConfig}\n */\nexport function getCurrentLogicalViewport(): Readonly<{\n width: number;\n height: number;\n}> {\n const surface = getSurfaceSnapshot(getCurrentPibblInstance());\n return Object.freeze({\n width: surface.logicalWidth,\n height: surface.logicalHeight,\n });\n}\n\n/**\n * Registers a callback on the root-wide transaction containing this render.\n *\n * @param callback - Callback receiving whether the current render transaction succeeded.\n *\n * @see {@link pibblInternalOnRenderFinish}\n */\nexport function onCurrentRenderFinish(\n callback: (success: boolean) => void,\n): void {\n requireHookContext();\n const transaction = GLOBAL_STATE.renderTransaction;\n if (!transaction) {\n throw new Error(\"No Pibbl render transaction is active.\");\n }\n transaction.onFinish(callback);\n}\n\n/**\n * Requests a coalesced frame for the current private backend instance.\n *\n * @param updateParents - Whether ancestor compositions should also receive a frame request.\n *\n * @see {@link pibblInternalRequestRender}\n */\nexport function requestCurrentInstanceFrame(updateParents: boolean): void {\n const { componentRefs, pibblInstance } = requireHookContext();\n let state = frameRequestsByComponent.get(componentRefs);\n if (!state) {\n state = {\n componentRefs,\n instance: pibblInstance,\n active: true,\n handle: undefined,\n updateParents: false,\n };\n frameRequestsByComponent.set(componentRefs, state);\n componentRefs.teardowns.add(() =>\n releaseCurrentInstanceFrameRequest(state!),\n );\n }\n state.updateParents ||= updateParents;\n if (state.handle) return;\n state.handle = queueBeginCommand(() => {\n state!.handle = undefined;\n const updateParentsForFrame = state!.updateParents;\n state!.updateParents = false;\n if (!isCurrentInstanceFrameRequestActive(state!)) return;\n if (updateParentsForFrame) {\n update(state!.instance.canvas, undefined, true);\n } else {\n update(state!.instance.canvas);\n }\n });\n}\n\n/**\n * Retains one geometry-independent target for an official backend picker.\n *\n * @param handlers - Handlers for the backend target. See {@link PibblEventHandlers}.\n * @param options - Backend geometry and focus metadata. See {@link PibblBackendEventTargetOptions}.\n * @param pointerEvents - Pointer participation policy; defaults to auto. See\n * {@link PibblPointerEvents} .\n * @returns The live registration, or undefined when registration is unnecessary. See\n * {@link PibblEventTargetRegistration} .\n *\n * @see {@link PibblEventHandlers}\n * @see {@link PibblBackendEventTargetOptions}\n * @see {@link PibblPointerEvents}\n * @see {@link PibblEventTargetRegistration}\n */\nexport function useBackendEventTarget(\n handlers: PibblEventHandlers,\n options: PibblBackendEventTargetOptions = {},\n pointerEvents: PibblPointerEvents = \"auto\",\n): PibblEventTargetRegistration | undefined {\n const { componentRefs, pibblInstance } = requireHookContext();\n const hookIndex = GLOBAL_STATE.componentHookIndex;\n const slot = useInternalHookSlot(\"backendEventTarget\", (teardowns) => {\n const target = createTarget(pibblInstance, componentRefs, hookIndex);\n teardowns.add(() => releaseTarget(target));\n return { target, emptyPath: new Path2D() };\n });\n const { target, emptyPath } = slot.value;\n if (pointerEvents === \"none\") {\n releaseTarget(target);\n return undefined;\n }\n updateTarget(\n target,\n handlers,\n { ...options, path: emptyPath },\n true,\n options.deferKeyboardNavigationGeometry ?? false,\n );\n if (target.paintEntry) {\n target.owner.paintEntries.delete(target.paintEntry);\n target.paintEntry = undefined;\n }\n return target;\n}\n\n/**\n * Tests whether an official backend target can still win coordinate picking.\n *\n * @param target - Registration whose ownership is being checked. See\n * {@link PibblEventTargetRegistration} .\n * @returns Whether the target registration is still live.\n *\n * @see {@link PibblEventTargetRegistration}\n */\nexport function isBackendEventTargetLive(\n target: PibblEventTargetRegistration,\n): boolean {\n const { owner } = target;\n return (\n target.live &&\n !owner.mainTeardowns.closed &&\n owner.eventRoot.targets.has(target)\n );\n}\n\n/**\n * Temporarily releases one backend target; its retained hook may enroll it again.\n *\n * @param target - Target registration to release. See {@link PibblEventTargetRegistration}.\n *\n * @see {@link PibblEventTargetRegistration}\n */\nexport function releaseBackendEventTarget(\n target: PibblEventTargetRegistration,\n): void {\n releaseTarget(target);\n target.keyboardNavigationBounds = undefined;\n target.keyboardNavigationPoints = undefined;\n}\n\n/**\n * Registers work that runs after this component's rendered descendants.\n *\n * @param callback - Callback to execute after the current component renders.\n *\n * @see {@link pibblInternalOnRenderFinish}\n */\nexport function setCurrentComponentAfterRender(callback: () => void): void {\n const { componentRefs } = requireHookContext();\n const previous = componentRefs.onAfterRender;\n componentRefs.onAfterRender = previous\n ? () => {\n try {\n previous();\n } finally {\n callback();\n }\n }\n : callback;\n}\n\n/**\n * Installs one stable nested backend resolver in the current Canvas paint order.\n *\n * @param input - Nested coordinate resolver and its target metadata. See\n * {@link PibblNestedResolverInput} .\n *\n * @see {@link PibblNestedResolverInput}\n */\nexport function registerNestedInteractionResolver(\n input: PibblNestedResolverInput,\n): void {\n const { componentRefs, pibblInstance } = requireHookContext();\n const childInstance = backendMountInstance(input.child);\n if (\n childInstance.parent !== pibblInstance.canvas ||\n childInstance.eventRoot !== pibblInstance.eventRoot\n ) {\n throw new Error(\n \"A nested Pibbl backend mount must belong to the current instance and same event root.\",\n );\n }\n const slot = useInternalHookSlot<{\n entry: PibblInteractionLayer;\n child: PibblBackendMount;\n }>(\"nestedInteractionResolver\", (teardowns) => {\n const entry: PibblInteractionLayer = {\n paintKind: PibblPaintEntryKind.Resolver,\n instance: childInstance,\n bounds: input.bounds,\n transform: new DOMMatrix(),\n clippingStack: [],\n resolveLocal: input.resolveLocal,\n };\n const value = { entry, child: input.child };\n teardowns.add(() => {\n pibblInstance.paintEntries.delete(entry);\n if (entry.instance.focusParentBridge === entry) {\n entry.instance.focusParentBridge = undefined;\n }\n if (entry.instance.eventParent === componentRefs) {\n entry.instance.eventParent = undefined;\n }\n });\n return value;\n });\n const { entry } = slot.value;\n if (\n (childInstance.eventParent !== undefined &&\n childInstance.eventParent !== componentRefs) ||\n (childInstance.focusParentBridge !== undefined &&\n childInstance.focusParentBridge !== entry)\n ) {\n throw new Error(\n \"A nested Pibbl backend mount already belongs to another nested resolver.\",\n );\n }\n pibblInstance.paintEntries.delete(entry);\n if (slot.value.child !== input.child) {\n if (entry.instance.focusParentBridge === entry) {\n entry.instance.focusParentBridge = undefined;\n }\n if (entry.instance.eventParent === componentRefs) {\n entry.instance.eventParent = undefined;\n }\n slot.value.child = input.child;\n }\n entry.instance = childInstance;\n entry.instance.eventParent = componentRefs;\n entry.bounds = input.bounds;\n entry.transform = getCurrentWorldTransform();\n entry.clippingStack = Array.from(GLOBAL_STATE.clippingStack);\n entry.resolveLocal = input.resolveLocal;\n entry.instance.focusParentBridge = entry;\n if (input.pointerEvents === \"auto\") {\n pibblInstance.paintEntries.add(entry);\n }\n}\n\nfunction backendMountInstance(mount: PibblBackendMount) {\n const instance = GLOBAL_STATE.pibblInstances.get(mount.canvas);\n if (!instance) {\n throw new Error(\"Nested Pibbl backend mount is not active.\");\n }\n return instance;\n}\n\nfunction cancelCurrentInstanceFrameRequest(\n state: CurrentInstanceFrameRequestState,\n): void {\n state.handle?.cancel();\n state.handle = undefined;\n state.updateParents = false;\n}\n\nfunction releaseCurrentInstanceFrameRequest(\n state: CurrentInstanceFrameRequestState,\n): void {\n if (!state.active) return;\n state.active = false;\n cancelCurrentInstanceFrameRequest(state);\n frameRequestsByComponent.delete(state.componentRefs);\n\n}\n\nfunction isCurrentInstanceFrameRequestActive(\n state: CurrentInstanceFrameRequestState,\n): boolean {\n return (\n state.active &&\n !state.componentRefs.teardowns.closed &&\n !state.instance.mainTeardowns.closed &&\n GLOBAL_STATE.pibblInstances.get(state.instance.canvas) === state.instance &&\n state.instance.refs.get(state.componentRefs.id) === state.componentRefs\n );\n}\nexport {\n pibblInternalAssertCommandAllowed,\n pibblInternalCreateSignalConsumer,\n pibblInternalCurrentFrame,\n pibblInternalCurrentRenderOwner,\n pibblInternalOnRenderFinish,\n pibblInternalPaintTarget,\n pibblInternalQueueBegin,\n pibblInternalQueueComplete,\n pibblInternalQueueCurrentCommit,\n pibblInternalQueueCurrentComplete,\n pibblInternalRegisterAdvance,\n pibblInternalRequestRender,\n pibblInternalRequestRendererWork,\n} from \"./lib/scheduler/renderer-participant.js\";\nexport type {\n PibblInternalCommandHandle,\n PibblInternalFrame,\n PibblInternalRendererWorkKind,\n PibblInternalRenderOwner,\n PibblInternalSignalBatch,\n PibblInternalSignalConsumer,\n} from \"./lib/scheduler/renderer-participant.js\";\n\nexport { pushLayoutBox } from \"./lib/layout/context.js\";\n\nexport {\n ManualSchedulerDriver as PibblInternalManualSchedulerDriver,\n installSchedulerDriverForTest as pibblInternalInstallTestSchedulerDriver,\n snapshotRealmScheduler as pibblInternalSnapshotRealmScheduler,\n} from \"./lib/scheduler/testing.js\";\n\nexport { getCurrentWorldTransform as pibblInternalCurrentWorldTransform } from \"./lib/render-target.js\";\n\nexport { borrowTextureRaster, resolveTexturePaint, validateTexturePaint } from './lib/textures/texture-protocol.js';\nexport type { BorrowedTextureRaster } from './lib/textures/texture-protocol.js';\n"],
5
- "mappings": "AASA,SAAS,0BAA0B;AAenC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAA6B,wBAAgC;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,yCAAyC;AAMlD,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AA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AC,MAAM,SAAS,cAAc,UAC9B,aAAa,eAAe,IAAI,MAAM,SAAS,MAAM,MAAM,MAAM,YACjE,MAAM,SAAS,KAAK,IAAI,MAAM,cAAc,EAAE,MAAM,MAAM;AAE9D;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUP,SAAS,qBAAqB;AAE9B;AAAA,EAC2B;AAAA,EACQ;AAAA,EACP;AAAA,OACrB;AAEP,SAAqC,4BAA5BC,iCAAsE;AAE/E,SAAS,qBAAqB,qBAAqB,4BAA4B;",
4
+ "sourcesContent": ["import type { PibblInternalFrame, pibblInternalOnRenderFinish, pibblInternalRequestRender } from './lib/scheduler/renderer-participant.js';\nimport type { PibblConfig, PibblPixelRatio } from './lib/surface/types.js';\n/**\n * @packageDocumentation\n * Reserved for official Pibbl packages that are released in lockstep with\n * `@pibbl/core`. This version-coupled module is not a stable third-party plugin\n * API and intentionally does not re-export the public root module.\n */\n\nexport { createBackendToken } from \"./lib/backend/types.js\";\nexport type {\n PibblBackendDriver,\n PibblBackendEventTargetOptions,\n PibblBackendFrame,\n PibblBackendFrameInput,\n PibblBackendMount,\n PibblBackendMountOptions,\n PibblBackendPrimitiveDefinition,\n PibblBackendPrimitiveInput,\n PibblBackendPrimitiveProgram,\n PibblBackendToken,\n PibblNestedResolverInput,\n} from \"./lib/backend/types.js\";\nexport type { SignalProgramProps, SignalStyle } from \"./lib/types.js\";\nexport {\n pibblInternalRunPurePrimitiveResolver,\n defineBackendPrimitive,\n derivePrimitive,\n} from \"./lib/define-primitive.js\";\nexport { mountBackendPibbl } from \"./lib/mount-pibbl.js\";\nexport {\n useInternalHookSlot,\n withHooksForbidden,\n} from \"./lib/hooks/hook-slot.js\";\nexport { useValueMemoSlot as useInternalValueMemoSlot } from \"./lib/hooks/use-value-memo-slot.js\";\nexport {\n haveSameLayerNodeTree,\n materializeRetainedLayerChildren,\n snapshotLayerNodeTree,\n} from \"./lib/components/layer-node-equality.js\";\nexport type { LayerNodeSnapshot } from \"./lib/components/layer-node-equality.js\";\nexport type { PibblEventTargetRegistration } from \"./lib/events/registrations.js\";\nexport type { PibblElementSource } from \"./lib/element/metadata.js\";\nexport { pibblInternalCreatePropAttachment } from \"./lib/element-enhancers.js\";\nexport type {\n PibblInternalMountedPropAttachment,\n PibblInternalPrimitiveAttachmentInput,\n} from \"./lib/element-enhancers.js\";\nexport type { PibblHitTestOutput } from \"./lib/events/paint-entry.js\";\nexport { hasPibblEventHandler } from \"./lib/events/event-definitions.js\";\nexport {\n pibblInternalCurrentSimulationOwner,\n pibblInternalOnSimulationRenderTransactionFinish,\n pibblInternalQueueSimulationBegin,\n pibblInternalQueueSimulationCommitAcknowledgement,\n pibblInternalQueueSimulationComplete,\n pibblInternalRegisterSimulationAdvance,\n pibblInternalRequestSimulationRender,\n} from \"./lib/scheduler/simulation-participant.js\";\nexport type {\n PibblInternalAdvanceLane,\n PibblInternalSimulationOwner,\n} from \"./lib/scheduler/simulation-participant.js\";\n\nimport type {\n PibblBackendEventTargetOptions,\n PibblBackendMount,\n PibblBackendToken,\n PibblNestedResolverInput,\n} from \"./lib/backend/types.js\";\nimport {\n createTarget,\n releaseTarget,\n updateTarget,\n type PibblEventTargetRegistration,\n} from \"./lib/events/registrations.js\";\nimport { PibblPaintEntryKind } from \"./lib/events/paint-entry.js\";\nimport type { PibblEventHandlers, PibblPointerEvents } from \"./lib/events/types.js\";\nimport { getCurrentPibblInstance, GLOBAL_STATE } from \"./lib/global-state.js\";\nexport { captureSeriesInspectionFrame } from \"./lib/series-inspection-frame.js\";\nexport { borrowDispatchResource } from \"./lib/events/event-facade.js\";\nimport {\n requireHookContext,\n useInternalHookSlot,\n} from \"./lib/hooks/hook-slot.js\";\nimport { getCurrentWorldTransform } from \"./lib/render-target.js\";\nimport {\n getElementSource,\n type PibblElementSource,\n} from \"./lib/element/metadata.js\";\nimport { getSurfaceSnapshot } from \"./lib/surface/transform.js\";\nimport type {\n Canvas,\n PibblComponentRefs,\n PibblInstance,\n} from \"./lib/types.js\";\nimport type { PibblInteractionLayer } from \"./lib/types.js\";\nimport { update } from \"./lib/update.js\";\nimport { queueBeginCommand } from \"./lib/scheduler/realm-scheduler.js\";\nimport type { PibblBeginCommandHandle } from \"./lib/scheduler/types.js\";\n\ninterface CurrentInstanceFrameRequestState {\n readonly componentRefs: PibblComponentRefs<any>;\n readonly instance: PibblInstance;\n active: boolean;\n handle: PibblBeginCommandHandle | undefined;\n updateParents: boolean;\n}\n\nconst frameRequestsByComponent = new WeakMap<\n PibblComponentRefs<any>,\n CurrentInstanceFrameRequestState\n>();\n/**\n * Reads the selected official backend's current frame environment.\n *\n * @param token - Backend identity required by the caller. See {@link PibblBackendToken}.\n * @returns The active environment for that backend.\n *\n * @see {@link PibblBackendToken}\n */\nexport function getBackendEnvironment<E>(token: PibblBackendToken): E {\n const driver = GLOBAL_STATE.backendDriver;\n const frame = GLOBAL_STATE.backendFrame;\n if (!driver || !frame || driver.token !== token) {\n throw new Error(\"The requested Pibbl backend environment is not active.\");\n }\n return frame.environment as E;\n}\n\n/**\n * Returns the timestamp shared by the current Pibbl render transaction.\n *\n * @returns The active frame timestamp in milliseconds.\n *\n * @see {@link PibblInternalFrame}\n */\nexport function getCurrentFrameTimestamp(): number {\n return getCurrentPibblInstance().renderTimestamp;\n}\n\n/**\n * Returns the active instance's owning Canvas, never a transient filter target.\n *\n * @returns The host canvas of the active backend mount. See {@link Canvas}.\n *\n * @see {@link Canvas}\n */\nexport function getCurrentBackendHostCanvas(): Canvas {\n return getCurrentPibblInstance().canvas;\n}\n\n/**\n * Returns development JSX source metadata for the current component.\n *\n * @returns Source metadata for the current element, or undefined when unavailable. See\n * {@link PibblElementSource} .\n *\n * @see {@link PibblElementSource}\n */\nexport function getCurrentElementSource(): PibblElementSource | undefined {\n const { componentRefs } = requireHookContext();\n return getElementSource(componentRefs.element);\n}\n\n/**\n * Returns the active surface's independent effective backing densities.\n *\n * @returns Backing pixels per logical unit on each axis.\n *\n * @see {@link PibblPixelRatio}\n */\nexport function getCurrentSurfaceDensity(): Readonly<{ x: number; y: number }> {\n const surface = getSurfaceSnapshot(getCurrentPibblInstance());\n return Object.freeze({\n x: surface.backingPixelsPerLogicalUnitX,\n y: surface.backingPixelsPerLogicalUnitY,\n });\n}\n\n/**\n * Returns the active root-logical viewport for an official renderer hook.\n *\n * @returns The current logical viewport width and height.\n *\n * @see {@link PibblConfig}\n */\nexport function getCurrentLogicalViewport(): Readonly<{\n width: number;\n height: number;\n}> {\n const surface = getSurfaceSnapshot(getCurrentPibblInstance());\n return Object.freeze({\n width: surface.logicalWidth,\n height: surface.logicalHeight,\n });\n}\n\n/**\n * Registers a callback on the root-wide transaction containing this render.\n *\n * @param callback - Callback receiving whether the current render transaction succeeded.\n *\n * @see {@link pibblInternalOnRenderFinish}\n */\nexport function onCurrentRenderFinish(\n callback: (success: boolean) => void,\n): void {\n requireHookContext();\n const transaction = GLOBAL_STATE.renderTransaction;\n if (!transaction) {\n throw new Error(\"No Pibbl render transaction is active.\");\n }\n transaction.onFinish(callback);\n}\n\n/**\n * Requests a coalesced frame for the current private backend instance.\n *\n * @param updateParents - Whether ancestor compositions should also receive a frame request.\n *\n * @see {@link pibblInternalRequestRender}\n */\nexport function requestCurrentInstanceFrame(updateParents: boolean): void {\n const { componentRefs, pibblInstance } = requireHookContext();\n let state = frameRequestsByComponent.get(componentRefs);\n if (!state) {\n state = {\n componentRefs,\n instance: pibblInstance,\n active: true,\n handle: undefined,\n updateParents: false,\n };\n frameRequestsByComponent.set(componentRefs, state);\n componentRefs.teardowns.add(() =>\n releaseCurrentInstanceFrameRequest(state!),\n );\n }\n state.updateParents ||= updateParents;\n if (state.handle) return;\n state.handle = queueBeginCommand(() => {\n state!.handle = undefined;\n const updateParentsForFrame = state!.updateParents;\n state!.updateParents = false;\n if (!isCurrentInstanceFrameRequestActive(state!)) return;\n if (updateParentsForFrame) {\n update(state!.instance.canvas, undefined, true);\n } else {\n update(state!.instance.canvas);\n }\n });\n}\n\n/**\n * Retains one geometry-independent target for an official backend picker.\n *\n * @param handlers - Handlers for the backend target. See {@link PibblEventHandlers}.\n * @param options - Backend geometry and focus metadata. See {@link PibblBackendEventTargetOptions}.\n * @param pointerEvents - Pointer participation policy; defaults to auto. See\n * {@link PibblPointerEvents} .\n * @returns The live registration, or undefined when registration is unnecessary. See\n * {@link PibblEventTargetRegistration} .\n *\n * @see {@link PibblEventHandlers}\n * @see {@link PibblBackendEventTargetOptions}\n * @see {@link PibblPointerEvents}\n * @see {@link PibblEventTargetRegistration}\n */\nexport function useBackendEventTarget(\n handlers: PibblEventHandlers,\n options: PibblBackendEventTargetOptions = {},\n pointerEvents: PibblPointerEvents = \"auto\",\n): PibblEventTargetRegistration | undefined {\n const { componentRefs, pibblInstance } = requireHookContext();\n const hookIndex = GLOBAL_STATE.componentHookIndex;\n const slot = useInternalHookSlot(\"backendEventTarget\", (teardowns) => {\n const target = createTarget(pibblInstance, componentRefs, hookIndex);\n teardowns.add(() => releaseTarget(target));\n return { target, emptyPath: new Path2D() };\n });\n const { target, emptyPath } = slot.value;\n if (pointerEvents === \"none\") {\n releaseTarget(target);\n return undefined;\n }\n updateTarget(\n target,\n handlers,\n { ...options, path: emptyPath },\n true,\n options.deferKeyboardNavigationGeometry ?? false,\n );\n if (target.paintEntry) {\n target.owner.paintEntries.delete(target.paintEntry);\n target.paintEntry = undefined;\n }\n return target;\n}\n\n/**\n * Tests whether an official backend target can still win coordinate picking.\n *\n * @param target - Registration whose ownership is being checked. See\n * {@link PibblEventTargetRegistration} .\n * @returns Whether the target registration is still live.\n *\n * @see {@link PibblEventTargetRegistration}\n */\nexport function isBackendEventTargetLive(\n target: PibblEventTargetRegistration,\n): boolean {\n const { owner } = target;\n return (\n target.live &&\n !owner.mainTeardowns.closed &&\n owner.eventRoot.targets.has(target)\n );\n}\n\n/**\n * Temporarily releases one backend target; its retained hook may enroll it again.\n *\n * @param target - Target registration to release. See {@link PibblEventTargetRegistration}.\n *\n * @see {@link PibblEventTargetRegistration}\n */\nexport function releaseBackendEventTarget(\n target: PibblEventTargetRegistration,\n): void {\n releaseTarget(target);\n target.keyboardNavigationBounds = undefined;\n target.keyboardNavigationPoints = undefined;\n}\n\n/**\n * Registers work that runs after this component's rendered descendants.\n *\n * @param callback - Callback to execute after the current component renders.\n *\n * @see {@link pibblInternalOnRenderFinish}\n */\nexport function setCurrentComponentAfterRender(callback: () => void): void {\n const { componentRefs } = requireHookContext();\n const previous = componentRefs.onAfterRender;\n componentRefs.onAfterRender = previous\n ? () => {\n try {\n previous();\n } finally {\n callback();\n }\n }\n : callback;\n}\n\n/**\n * Installs one stable nested backend resolver in the current Canvas paint order.\n *\n * @param input - Nested coordinate resolver and its target metadata. See\n * {@link PibblNestedResolverInput} .\n *\n * @see {@link PibblNestedResolverInput}\n */\nexport function registerNestedInteractionResolver(\n input: PibblNestedResolverInput,\n): void {\n const { componentRefs, pibblInstance } = requireHookContext();\n const childInstance = backendMountInstance(input.child);\n if (\n childInstance.parent !== pibblInstance.canvas ||\n childInstance.eventRoot !== pibblInstance.eventRoot\n ) {\n throw new Error(\n \"A nested Pibbl backend mount must belong to the current instance and same event root.\",\n );\n }\n const slot = useInternalHookSlot<{\n entry: PibblInteractionLayer;\n child: PibblBackendMount;\n }>(\"nestedInteractionResolver\", (teardowns) => {\n const entry: PibblInteractionLayer = {\n paintKind: PibblPaintEntryKind.Resolver,\n instance: childInstance,\n bounds: input.bounds,\n transform: new DOMMatrix(),\n clippingStack: [],\n resolveLocal: input.resolveLocal,\n };\n const value = { entry, child: input.child };\n teardowns.add(() => {\n pibblInstance.paintEntries.delete(entry);\n if (entry.instance.focusParentBridge === entry) {\n entry.instance.focusParentBridge = undefined;\n }\n if (entry.instance.eventParent === componentRefs) {\n entry.instance.eventParent = undefined;\n }\n });\n return value;\n });\n const { entry } = slot.value;\n if (\n (childInstance.eventParent !== undefined &&\n childInstance.eventParent !== componentRefs) ||\n (childInstance.focusParentBridge !== undefined &&\n childInstance.focusParentBridge !== entry)\n ) {\n throw new Error(\n \"A nested Pibbl backend mount already belongs to another nested resolver.\",\n );\n }\n pibblInstance.paintEntries.delete(entry);\n if (slot.value.child !== input.child) {\n if (entry.instance.focusParentBridge === entry) {\n entry.instance.focusParentBridge = undefined;\n }\n if (entry.instance.eventParent === componentRefs) {\n entry.instance.eventParent = undefined;\n }\n slot.value.child = input.child;\n }\n entry.instance = childInstance;\n entry.instance.eventParent = componentRefs;\n entry.bounds = input.bounds;\n entry.transform = getCurrentWorldTransform();\n entry.clippingStack = Array.from(GLOBAL_STATE.clippingStack);\n entry.resolveLocal = input.resolveLocal;\n entry.instance.focusParentBridge = entry;\n if (input.pointerEvents === \"auto\") {\n pibblInstance.paintEntries.add(entry);\n }\n}\n\nfunction backendMountInstance(mount: PibblBackendMount) {\n const instance = GLOBAL_STATE.pibblInstances.get(mount.canvas);\n if (!instance) {\n throw new Error(\"Nested Pibbl backend mount is not active.\");\n }\n return instance;\n}\n\nfunction cancelCurrentInstanceFrameRequest(\n state: CurrentInstanceFrameRequestState,\n): void {\n state.handle?.cancel();\n state.handle = undefined;\n state.updateParents = false;\n}\n\nfunction releaseCurrentInstanceFrameRequest(\n state: CurrentInstanceFrameRequestState,\n): void {\n if (!state.active) return;\n state.active = false;\n cancelCurrentInstanceFrameRequest(state);\n frameRequestsByComponent.delete(state.componentRefs);\n\n}\n\nfunction isCurrentInstanceFrameRequestActive(\n state: CurrentInstanceFrameRequestState,\n): boolean {\n return (\n state.active &&\n !state.componentRefs.teardowns.closed &&\n !state.instance.mainTeardowns.closed &&\n GLOBAL_STATE.pibblInstances.get(state.instance.canvas) === state.instance &&\n state.instance.refs.get(state.componentRefs.id) === state.componentRefs\n );\n}\nexport {\n pibblInternalAssertCommandAllowed,\n pibblInternalCreateSignalConsumer,\n pibblInternalCurrentFrame,\n pibblInternalCurrentRenderOwner,\n pibblInternalOnRenderFinish,\n pibblInternalPaintTarget,\n pibblInternalQueueBegin,\n pibblInternalQueueComplete,\n pibblInternalQueueCurrentCommit,\n pibblInternalQueueCurrentComplete,\n pibblInternalRegisterAdvance,\n pibblInternalRequestRender,\n pibblInternalRequestRendererWork,\n} from \"./lib/scheduler/renderer-participant.js\";\nexport type {\n PibblInternalCommandHandle,\n PibblInternalFrame,\n PibblInternalRendererWorkKind,\n PibblInternalRenderOwner,\n PibblInternalSignalBatch,\n PibblInternalSignalConsumer,\n} from \"./lib/scheduler/renderer-participant.js\";\n\nexport { pushLayoutBox } from \"./lib/layout/context.js\";\n\nexport {\n ManualSchedulerDriver as PibblInternalManualSchedulerDriver,\n installSchedulerDriverForTest as pibblInternalInstallTestSchedulerDriver,\n snapshotRealmScheduler as pibblInternalSnapshotRealmScheduler,\n} from \"./lib/scheduler/testing.js\";\n\nexport { getCurrentWorldTransform as pibblInternalCurrentWorldTransform } from \"./lib/render-target.js\";\n\nexport { borrowTextureRaster, resolveTexturePaint, validateTexturePaint } from './lib/textures/texture-protocol.js';\nexport type { BorrowedTextureRaster } from './lib/textures/texture-protocol.js';\n\nexport { createStandaloneLayoutKernel } from \"./lib/layout/standalone-kernel.js\";\nexport type { StandaloneLayoutKernel, StandaloneLayoutKernelNode, StandaloneLayoutKernelInput, StandaloneLayoutKernelBox } from \"./lib/layout/standalone-kernel.js\";\n"],
5
+ "mappings": "AASA,SAAS,0BAA0B;AAenC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAA6B,wBAAgC;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,yCAAyC;AAMlD,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAY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Ac,UAAU,UAC/B,CAAC,MAAM,SAAS,cAAc,UAC9B,aAAa,eAAe,IAAI,MAAM,SAAS,MAAM,MAAM,MAAM,YACjE,MAAM,SAAS,KAAK,IAAI,MAAM,cAAc,EAAE,MAAM,MAAM;AAE9D;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUP,SAAS,qBAAqB;AAE9B;AAAA,EAC2B;AAAA,EACQ;AAAA,EACP;AAAA,OACrB;AAEP,SAAqC,4BAA5BC,iCAAsE;AAE/E,SAAS,qBAAqB,qBAAqB,4BAA4B;AAG/E,SAAS,oCAAoC;",
6
6
  "names": ["useInternalHookSlot", "target", "entry", "getCurrentWorldTransform"]
7
7
  }
@@ -0,0 +1,12 @@
1
+ import type { prepareLayoutEngineSync } from "./lib/layout/wasm/embedded.js";
2
+ /**
3
+ * Prepares the embedded native layout module for an owned standalone tree.
4
+ *
5
+ * The dedicated entry uses the same verified module as Canvas layout, while
6
+ * avoiding URL fetches so a Node host has no DOM, Canvas, or asset-server
7
+ * prerequisite.
8
+ * @returns A promise that resolves after the {@link prepareLayoutEngineSync} module is ready.
9
+ */
10
+ export declare function prepareStandaloneLayoutKernel(): Promise<void>;
11
+ export { createStandaloneLayoutKernel } from "./lib/layout/standalone-kernel.js";
12
+ export type { StandaloneLayoutKernel, StandaloneLayoutKernelBox, StandaloneLayoutKernelInput, StandaloneLayoutKernelNode, } from "./lib/layout/standalone-kernel.js";
@@ -0,0 +1,11 @@
1
+ import { prepareLayoutEngineSync } from "./lib/layout/wasm/embedded.js";
2
+ function prepareStandaloneLayoutKernel() {
3
+ prepareLayoutEngineSync();
4
+ return Promise.resolve();
5
+ }
6
+ import { createStandaloneLayoutKernel } from "./lib/layout/standalone-kernel.js";
7
+ export {
8
+ createStandaloneLayoutKernel,
9
+ prepareStandaloneLayoutKernel
10
+ };
11
+ //# sourceMappingURL=layout-kernel.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/layout-kernel.ts"],
4
+ "sourcesContent": ["/**\n * Version-coupled layout-engine entry for official non-Canvas integrations.\n *\n * This module imports only the compiled layout module and the owned native-tree\n * bridge; it does not load the Pibbl renderer, scheduler, or Canvas surface.\n */\nimport { prepareLayoutEngineSync } from \"./lib/layout/wasm/embedded.js\";\n\n/**\n * Prepares the embedded native layout module for an owned standalone tree.\n *\n * The dedicated entry uses the same verified module as Canvas layout, while\n * avoiding URL fetches so a Node host has no DOM, Canvas, or asset-server\n * prerequisite.\n * @returns A promise that resolves after the {@link prepareLayoutEngineSync} module is ready.\n */\nexport function prepareStandaloneLayoutKernel(): Promise<void> {\n prepareLayoutEngineSync();\n return Promise.resolve();\n}\nexport { createStandaloneLayoutKernel } from \"./lib/layout/standalone-kernel.js\";\nexport type {\n StandaloneLayoutKernel,\n StandaloneLayoutKernelBox,\n StandaloneLayoutKernelInput,\n StandaloneLayoutKernelNode,\n} from \"./lib/layout/standalone-kernel.js\";\n"],
5
+ "mappings": "AAMA,SAAS,+BAA+B;AAUjC,SAAS,gCAA+C;AAC7D,0BAAwB;AACxB,SAAO,QAAQ,QAAQ;AACzB;AACA,SAAS,oCAAoC;",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ export * from './layout-kernel.js';
@@ -1,5 +1,5 @@
1
1
  import { type SpringDefinitionRecord } from './spring.js';
2
- import type { PibblAnimationDefinition, PibblAnimationOptions, PibblAnimationSampleInput, PibblEasing, PibblInterpolator, PibblKeyframesOptions, PibblSpringOptions, PibblStepperOptions, PibblTweenOptions } from './types.js';
2
+ import type { PibblAnimationDefinition, PibblAnimationTarget, PibblAnimationOptions, PibblAnimationSampleInput, PibblEasing, PibblInterpolator, PibblKeyframesOptions, PibblSpringOptions, PibblStepperOptions, PibblTweenOptions } from './types.js';
3
3
  declare const seekableDefinitionActivationBrand: unique symbol;
4
4
  interface BaseDefinitionRecord {
5
5
  readonly duration: number;
@@ -47,6 +47,8 @@ export type SeekableDefinitionBoundaryValue<T> = {
47
47
  } | {
48
48
  readonly kind: 'unknown';
49
49
  };
50
+ /** @internal Resolves hook-owned endpoints using the definition's implementation. */
51
+ export declare function bindAnimationTarget<T>(definition: PibblAnimationDefinition<T>, target: PibblAnimationTarget<T>): PibblAnimationDefinition<T>;
50
52
  export interface AnimationDefinitionPerformanceSnapshot {
51
53
  readonly keyframeDefinitions: number;
52
54
  readonly keyframeStorageArrayAllocations: number;
@@ -67,7 +69,7 @@ export declare function snapshotAnimationActivationValue<T>(value: T, seen?: Wea
67
69
  * @see {@link PibblTweenOptions}
68
70
  * @see {@link PibblAnimationDefinition}
69
71
  */
70
- export declare function tween<T>(options: Readonly<PibblTweenOptions<T>>): PibblAnimationDefinition<T>;
72
+ export declare function tween<T = number>(options: Readonly<PibblTweenOptions<T>>): PibblAnimationDefinition<T>;
71
73
  /**
72
74
  * Returns an opaque immutable keyframe definition.
73
75
  *
@@ -90,7 +92,7 @@ export declare function keyframes<T>(options: Readonly<PibblKeyframesOptions<T>>
90
92
  * @see {@link PibblSpringOptions}
91
93
  * @see {@link PibblAnimationDefinition}
92
94
  */
93
- export declare function spring(options: Readonly<PibblSpringOptions>): PibblAnimationDefinition<number>;
95
+ export declare function spring(options?: Readonly<PibblSpringOptions>): PibblAnimationDefinition<number>;
94
96
  /**
95
97
  * Returns an opaque immutable definition from a custom seekable sampler.
96
98
  *
@@ -6,6 +6,17 @@ import {
6
6
  sampleSpring
7
7
  } from "./spring.js";
8
8
  const definitionRecords = /* @__PURE__ */ new WeakMap();
9
+ const targetBindings = /* @__PURE__ */ new WeakMap();
10
+ function targetDefinition(definition, unbound, bind) {
11
+ targetBindings.set(definition, { unbound, bind });
12
+ return definition;
13
+ }
14
+ function bindAnimationTarget(definition, target) {
15
+ const binding = targetBindings.get(definition);
16
+ if (binding) return binding.bind(target);
17
+ getDefinitionRecord(definition);
18
+ return definition;
19
+ }
9
20
  const seekableActivationRecords = /* @__PURE__ */ new WeakMap();
10
21
  let keyframeDefinitions = 0;
11
22
  let keyframeStorageArrayAllocations = 0;
@@ -342,7 +353,7 @@ function tween(options) {
342
353
  }
343
354
  const hasFrom = hasOwn(options, "from");
344
355
  const snapshots = /* @__PURE__ */ new WeakMap();
345
- return createDefinition({
356
+ const record = {
346
357
  kind: "tween",
347
358
  duration: options.duration,
348
359
  debugName: options.debugName,
@@ -351,7 +362,15 @@ function tween(options) {
351
362
  to: snapshotAnimationValue(options.to, snapshots),
352
363
  easing: options.easing ?? easing.linear,
353
364
  interpolate: options.interpolate
354
- });
365
+ };
366
+ return targetDefinition(createDefinition(record), !hasOwn(options, "to"), ({ from, to }) => tween({
367
+ from,
368
+ to,
369
+ duration: record.duration,
370
+ easing: record.easing,
371
+ interpolate: record.interpolate,
372
+ debugName: record.debugName
373
+ }));
355
374
  }
356
375
  function keyframes(options) {
357
376
  assertDuration(options.duration, options.debugName);
@@ -377,8 +396,10 @@ function keyframes(options) {
377
396
  interpolate: options.interpolate
378
397
  });
379
398
  }
380
- function spring(options) {
381
- return createDefinition(createSpringRecord(options));
399
+ function spring(options = {}) {
400
+ const unbound = !hasOwn(options, "to");
401
+ const record = createSpringRecord({ ...options, to: unbound ? 0 : options.to });
402
+ return targetDefinition(createDefinition(record), unbound, ({ from, to, velocity }) => spring({ ...record, from, to, initialVelocity: velocity ?? record.initialVelocity }));
382
403
  }
383
404
  function defineAnimation(options) {
384
405
  assertDuration(options.duration, options.debugName);
@@ -425,6 +446,9 @@ function stepper(options) {
425
446
  });
426
447
  }
427
448
  function getDefinitionRecord(definition) {
449
+ if (targetBindings.get(definition)?.unbound) {
450
+ throw new TypeError("Animation definition needs a target: supply to for drive(), or pass it to useAnimatedValue().");
451
+ }
428
452
  const record = definitionRecords.get(definition);
429
453
  if (record === void 0) throw new TypeError("Expected a Pibbl animation definition.");
430
454
  return record;
@@ -590,6 +614,7 @@ function getStaticSeekableDefinitionBoundaryValue(definition, boundary) {
590
614
  export {
591
615
  activateSeekableDefinition,
592
616
  animationDefinitionPerformanceSnapshot,
617
+ bindAnimationTarget,
593
618
  defineAnimation,
594
619
  getDefinitionRecord,
595
620
  getSeekableDefinitionBoundaryValue,