@pibbl/core 0.0.2 → 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 (549) hide show
  1. package/THIRD_PARTY_NOTICES.txt +81 -0
  2. package/dist/features/physics/2d-testing.d.ts +1 -1
  3. package/dist/features/physics/2d-testing.js +2 -2
  4. package/dist/features/physics/2d-testing.js.map +2 -2
  5. package/dist/features/physics/lib/2d/canvas/components.js +25 -21
  6. package/dist/features/physics/lib/2d/canvas/components.js.map +2 -2
  7. package/dist/features/physics/lib/2d/canvas/presentation.js +1 -2
  8. package/dist/features/physics/lib/2d/canvas/presentation.js.map +2 -2
  9. package/dist/features/physics/lib/2d/collision/casts.js +4 -2
  10. package/dist/features/physics/lib/2d/collision/casts.js.map +2 -2
  11. package/dist/features/physics/lib/2d/runtime/controller.js +1 -1
  12. package/dist/features/physics/lib/2d/runtime/controller.js.map +2 -2
  13. package/dist/features/physics/lib/2d/runtime/obstacles.js +9 -11
  14. package/dist/features/physics/lib/2d/runtime/obstacles.js.map +2 -2
  15. package/dist/features/physics/lib/2d/shapes.js +8 -9
  16. package/dist/features/physics/lib/2d/shapes.js.map +2 -2
  17. package/dist/features/physics/lib/2d/world/rapier.js +22 -26
  18. package/dist/features/physics/lib/2d/world/rapier.js.map +2 -2
  19. package/dist/features/sprites/loader.js +6 -3
  20. package/dist/features/sprites/loader.js.map +2 -2
  21. package/dist/features/textures/index.d.ts +12 -2
  22. package/dist/features/textures/index.js +33 -1
  23. package/dist/features/textures/index.js.map +2 -2
  24. package/dist/features/textures/lib/chemical-field.d.ts +56 -0
  25. package/dist/features/textures/lib/chemical-field.js +154 -0
  26. package/dist/features/textures/lib/chemical-field.js.map +7 -0
  27. package/dist/features/textures/lib/chemical-recipes.d.ts +119 -0
  28. package/dist/features/textures/lib/chemical-recipes.js +275 -0
  29. package/dist/features/textures/lib/chemical-recipes.js.map +7 -0
  30. package/dist/features/textures/lib/definitions.d.ts +3 -18
  31. package/dist/features/textures/lib/definitions.js +17 -24
  32. package/dist/features/textures/lib/definitions.js.map +2 -2
  33. package/dist/features/textures/lib/geometric-patterns.d.ts +149 -0
  34. package/dist/features/textures/lib/geometric-patterns.js +305 -0
  35. package/dist/features/textures/lib/geometric-patterns.js.map +7 -0
  36. package/dist/features/textures/lib/gray-scott.d.ts +55 -0
  37. package/dist/features/textures/lib/gray-scott.js +37 -0
  38. package/dist/features/textures/lib/gray-scott.js.map +7 -0
  39. package/dist/features/textures/lib/palette.js +1 -3
  40. package/dist/features/textures/lib/palette.js.map +2 -2
  41. package/dist/features/textures/lib/patterns.d.ts +123 -0
  42. package/dist/features/textures/lib/patterns.js +344 -0
  43. package/dist/features/textures/lib/patterns.js.map +7 -0
  44. package/dist/features/textures/lib/rain-drops.js +2 -1
  45. package/dist/features/textures/lib/rain-drops.js.map +2 -2
  46. package/dist/features/textures/lib/reaction-diffusion.d.ts +3 -2
  47. package/dist/features/textures/lib/reaction-diffusion.js +9 -20
  48. package/dist/features/textures/lib/reaction-diffusion.js.map +2 -2
  49. package/dist/features/textures/lib/simulation.d.ts +10 -4
  50. package/dist/features/textures/lib/simulation.js +23 -13
  51. package/dist/features/textures/lib/simulation.js.map +2 -2
  52. package/dist/features/textures/lib/wasm/electric.js +8 -1
  53. package/dist/features/textures/lib/wasm/electric.js.map +2 -2
  54. package/dist/features/textures/lib/water-surface.js +1 -3
  55. package/dist/features/textures/lib/water-surface.js.map +2 -2
  56. package/dist/features/viz/index.d.ts +68 -6
  57. package/dist/features/viz/index.js +164 -2
  58. package/dist/features/viz/index.js.map +2 -2
  59. package/dist/features/viz/inspection/bar.d.ts +79 -0
  60. package/dist/features/viz/inspection/bar.js +49 -0
  61. package/dist/features/viz/inspection/bar.js.map +7 -0
  62. package/dist/features/viz/inspection/candle.d.ts +156 -0
  63. package/dist/features/viz/inspection/candle.js +120 -0
  64. package/dist/features/viz/inspection/candle.js.map +7 -0
  65. package/dist/features/viz/inspection/capture-types.d.ts +65 -0
  66. package/dist/features/viz/inspection/capture.d.ts +16 -0
  67. package/dist/features/viz/inspection/capture.js +49 -0
  68. package/dist/features/viz/inspection/capture.js.map +7 -0
  69. package/dist/features/viz/inspection/handler.d.ts +36 -0
  70. package/dist/features/viz/inspection/handler.js +91 -0
  71. package/dist/features/viz/inspection/handler.js.map +7 -0
  72. package/dist/features/viz/inspection/ohlc-bar.d.ts +132 -0
  73. package/dist/features/viz/inspection/ohlc-bar.js +118 -0
  74. package/dist/features/viz/inspection/ohlc-bar.js.map +7 -0
  75. package/dist/features/viz/inspection/owned-ref.d.ts +16 -0
  76. package/dist/features/viz/inspection/owned-ref.js +99 -0
  77. package/dist/features/viz/inspection/owned-ref.js.map +7 -0
  78. package/dist/features/viz/inspection/painted-point.d.ts +22 -0
  79. package/dist/features/viz/inspection/painted-point.js +29 -0
  80. package/dist/features/viz/inspection/painted-point.js.map +7 -0
  81. package/dist/features/viz/inspection/queries.d.ts +100 -0
  82. package/dist/features/viz/inspection/queries.js +192 -0
  83. package/dist/features/viz/inspection/queries.js.map +7 -0
  84. package/dist/features/viz/inspection/query-types.d.ts +177 -0
  85. package/dist/features/viz/inspection/volume.d.ts +104 -0
  86. package/dist/features/viz/inspection/volume.js +95 -0
  87. package/dist/features/viz/inspection/volume.js.map +7 -0
  88. package/dist/features/viz/inspection.d.ts +19 -0
  89. package/dist/features/viz/inspection.js +54 -0
  90. package/dist/features/viz/inspection.js.map +7 -0
  91. package/dist/features/viz/inspection.mjs +1 -0
  92. package/dist/features/viz/lib/area-series.d.ts +62 -0
  93. package/dist/features/viz/lib/area-series.js +120 -0
  94. package/dist/features/viz/lib/area-series.js.map +7 -0
  95. package/dist/features/viz/lib/axis-title.js +2 -1
  96. package/dist/features/viz/lib/axis-title.js.map +2 -2
  97. package/dist/features/viz/lib/axis.js +1 -1
  98. package/dist/features/viz/lib/axis.js.map +2 -2
  99. package/dist/features/viz/lib/bar-series.d.ts +3 -1
  100. package/dist/features/viz/lib/bar-series.js +16 -1
  101. package/dist/features/viz/lib/bar-series.js.map +2 -2
  102. package/dist/features/viz/lib/baseline-series.d.ts +55 -0
  103. package/dist/features/viz/lib/baseline-series.js +136 -0
  104. package/dist/features/viz/lib/baseline-series.js.map +7 -0
  105. package/dist/features/viz/lib/candlestick-series.d.ts +62 -0
  106. package/dist/features/viz/lib/candlestick-series.js +150 -0
  107. package/dist/features/viz/lib/candlestick-series.js.map +7 -0
  108. package/dist/features/viz/lib/censored-point-series.d.ts +71 -0
  109. package/dist/features/viz/lib/censored-point-series.js +129 -0
  110. package/dist/features/viz/lib/censored-point-series.js.map +7 -0
  111. package/dist/features/viz/lib/color-context.d.ts +4 -0
  112. package/dist/features/viz/lib/color-context.js +41 -0
  113. package/dist/features/viz/lib/color-context.js.map +7 -0
  114. package/dist/features/viz/lib/color-math.d.ts +4 -0
  115. package/dist/features/viz/lib/color-math.js +31 -0
  116. package/dist/features/viz/lib/color-math.js.map +7 -0
  117. package/dist/features/viz/lib/color-types.d.ts +53 -0
  118. package/dist/features/viz/lib/curve-definition.d.ts +49 -0
  119. package/dist/features/viz/lib/curve-definition.js +142 -0
  120. package/dist/features/viz/lib/curve-definition.js.map +7 -0
  121. package/dist/features/viz/lib/diverging-color-scale.d.ts +11 -0
  122. package/dist/features/viz/lib/diverging-color-scale.js +51 -0
  123. package/dist/features/viz/lib/diverging-color-scale.js.map +7 -0
  124. package/dist/features/viz/lib/domain-navigation.d.ts +40 -0
  125. package/dist/features/viz/lib/domain-navigation.js +77 -0
  126. package/dist/features/viz/lib/domain-navigation.js.map +7 -0
  127. package/dist/features/viz/lib/editable-chart-elements.d.ts +178 -0
  128. package/dist/features/viz/lib/editable-chart-elements.js +733 -0
  129. package/dist/features/viz/lib/editable-chart-elements.js.map +7 -0
  130. package/dist/features/viz/lib/financial-aggregation.d.ts +127 -0
  131. package/dist/features/viz/lib/financial-aggregation.js +116 -0
  132. package/dist/features/viz/lib/financial-aggregation.js.map +7 -0
  133. package/dist/features/viz/lib/financial-autoscale.d.ts +64 -0
  134. package/dist/features/viz/lib/financial-autoscale.js +61 -0
  135. package/dist/features/viz/lib/financial-autoscale.js.map +7 -0
  136. package/dist/features/viz/lib/financial-comparison.d.ts +62 -0
  137. package/dist/features/viz/lib/financial-comparison.js +98 -0
  138. package/dist/features/viz/lib/financial-comparison.js.map +7 -0
  139. package/dist/features/viz/lib/financial-geometry.d.ts +77 -0
  140. package/dist/features/viz/lib/financial-geometry.js +67 -0
  141. package/dist/features/viz/lib/financial-geometry.js.map +7 -0
  142. package/dist/features/viz/lib/financial-indicators.d.ts +114 -0
  143. package/dist/features/viz/lib/financial-indicators.js +135 -0
  144. package/dist/features/viz/lib/financial-indicators.js.map +7 -0
  145. package/dist/features/viz/lib/financial-oscillators.d.ts +171 -0
  146. package/dist/features/viz/lib/financial-oscillators.js +265 -0
  147. package/dist/features/viz/lib/financial-oscillators.js.map +7 -0
  148. package/dist/features/viz/lib/graph/bipartite.d.ts +14 -0
  149. package/dist/features/viz/lib/graph/bipartite.js +250 -0
  150. package/dist/features/viz/lib/graph/bipartite.js.map +7 -0
  151. package/dist/features/viz/lib/graph/chord.d.ts +44 -0
  152. package/dist/features/viz/lib/graph/chord.js +348 -0
  153. package/dist/features/viz/lib/graph/chord.js.map +7 -0
  154. package/dist/features/viz/lib/graph/dependency.d.ts +26 -0
  155. package/dist/features/viz/lib/graph/dependency.js +140 -0
  156. package/dist/features/viz/lib/graph/dependency.js.map +7 -0
  157. package/dist/features/viz/lib/graph/force.d.ts +28 -0
  158. package/dist/features/viz/lib/graph/force.js +580 -0
  159. package/dist/features/viz/lib/graph/force.js.map +7 -0
  160. package/dist/features/viz/lib/graph/hierarchy.d.ts +21 -0
  161. package/dist/features/viz/lib/graph/hierarchy.js +112 -0
  162. package/dist/features/viz/lib/graph/hierarchy.js.map +7 -0
  163. package/dist/features/viz/lib/graph/icicle.d.ts +16 -0
  164. package/dist/features/viz/lib/graph/icicle.js +153 -0
  165. package/dist/features/viz/lib/graph/icicle.js.map +7 -0
  166. package/dist/features/viz/lib/graph/matrix.d.ts +30 -0
  167. package/dist/features/viz/lib/graph/matrix.js +243 -0
  168. package/dist/features/viz/lib/graph/matrix.js.map +7 -0
  169. package/dist/features/viz/lib/graph/neighborhood.d.ts +11 -0
  170. package/dist/features/viz/lib/graph/neighborhood.js +281 -0
  171. package/dist/features/viz/lib/graph/neighborhood.js.map +7 -0
  172. package/dist/features/viz/lib/graph/routes.d.ts +35 -0
  173. package/dist/features/viz/lib/graph/routes.js +101 -0
  174. package/dist/features/viz/lib/graph/routes.js.map +7 -0
  175. package/dist/features/viz/lib/graph/sankey.d.ts +44 -0
  176. package/dist/features/viz/lib/graph/sankey.js +341 -0
  177. package/dist/features/viz/lib/graph/sankey.js.map +7 -0
  178. package/dist/features/viz/lib/graph/shared.d.ts +59 -0
  179. package/dist/features/viz/lib/graph/shared.js +301 -0
  180. package/dist/features/viz/lib/graph/shared.js.map +7 -0
  181. package/dist/features/viz/lib/graph/tree.d.ts +11 -0
  182. package/dist/features/viz/lib/graph/tree.js +232 -0
  183. package/dist/features/viz/lib/graph/tree.js.map +7 -0
  184. package/dist/features/viz/lib/graph/treemap.d.ts +20 -0
  185. package/dist/features/viz/lib/graph/treemap.js +227 -0
  186. package/dist/features/viz/lib/graph/treemap.js.map +7 -0
  187. package/dist/features/viz/lib/graph/types.d.ts +1097 -0
  188. package/dist/features/viz/lib/hover-card.js +8 -9
  189. package/dist/features/viz/lib/hover-card.js.map +2 -2
  190. package/dist/features/viz/lib/hover-data.d.ts +1 -1
  191. package/dist/features/viz/lib/hover-data.js +5 -2
  192. package/dist/features/viz/lib/hover-data.js.map +2 -2
  193. package/dist/features/viz/lib/interval-band-series.d.ts +49 -0
  194. package/dist/features/viz/lib/interval-band-series.js +136 -0
  195. package/dist/features/viz/lib/interval-band-series.js.map +7 -0
  196. package/dist/features/viz/lib/interval-diamond-series.d.ts +43 -0
  197. package/dist/features/viz/lib/interval-diamond-series.js +122 -0
  198. package/dist/features/viz/lib/interval-diamond-series.js.map +7 -0
  199. package/dist/features/viz/lib/interval-series.d.ts +79 -0
  200. package/dist/features/viz/lib/interval-series.js +158 -0
  201. package/dist/features/viz/lib/interval-series.js.map +7 -0
  202. package/dist/features/viz/lib/layout-pie.js +9 -13
  203. package/dist/features/viz/lib/layout-pie.js.map +2 -2
  204. package/dist/features/viz/lib/line-series.d.ts +1 -1
  205. package/dist/features/viz/lib/line-series.js +47 -28
  206. package/dist/features/viz/lib/line-series.js.map +2 -2
  207. package/dist/features/viz/lib/linear-scale.js +1 -1
  208. package/dist/features/viz/lib/linear-scale.js.map +2 -2
  209. package/dist/features/viz/lib/monotone-curve.d.ts +11 -0
  210. package/dist/features/viz/lib/monotone-curve.js +63 -0
  211. package/dist/features/viz/lib/monotone-curve.js.map +7 -0
  212. package/dist/features/viz/lib/numeric-range-interpolation.d.ts +15 -0
  213. package/dist/features/viz/lib/numeric-range-interpolation.js +36 -0
  214. package/dist/features/viz/lib/numeric-range-interpolation.js.map +7 -0
  215. package/dist/features/viz/lib/ohlc-bar-series.d.ts +55 -0
  216. package/dist/features/viz/lib/ohlc-bar-series.js +168 -0
  217. package/dist/features/viz/lib/ohlc-bar-series.js.map +7 -0
  218. package/dist/features/viz/lib/paired-series.d.ts +44 -0
  219. package/dist/features/viz/lib/paired-series.js +93 -0
  220. package/dist/features/viz/lib/paired-series.js.map +7 -0
  221. package/dist/features/viz/lib/pie-layout.js +2 -1
  222. package/dist/features/viz/lib/pie-layout.js.map +2 -2
  223. package/dist/features/viz/lib/plot-series.js +11 -6
  224. package/dist/features/viz/lib/plot-series.js.map +2 -2
  225. package/dist/features/viz/lib/plot-types.d.ts +4 -3
  226. package/dist/features/viz/lib/point-series.d.ts +1 -1
  227. package/dist/features/viz/lib/point-series.js +36 -9
  228. package/dist/features/viz/lib/point-series.js.map +2 -2
  229. package/dist/features/viz/lib/point-types.d.ts +5 -2
  230. package/dist/features/viz/lib/reference-band.js +4 -1
  231. package/dist/features/viz/lib/reference-band.js.map +2 -2
  232. package/dist/features/viz/lib/scale-context.d.ts +1 -1
  233. package/dist/features/viz/lib/scale-ticks.js +21 -6
  234. package/dist/features/viz/lib/scale-ticks.js.map +2 -2
  235. package/dist/features/viz/lib/sequential-color-scale.d.ts +11 -0
  236. package/dist/features/viz/lib/sequential-color-scale.js +49 -0
  237. package/dist/features/viz/lib/sequential-color-scale.js.map +7 -0
  238. package/dist/features/viz/lib/series-position.d.ts +12 -0
  239. package/dist/features/viz/lib/series-position.js +44 -0
  240. package/dist/features/viz/lib/series-position.js.map +7 -0
  241. package/dist/features/viz/lib/step-curves.d.ts +19 -0
  242. package/dist/features/viz/lib/step-curves.js +53 -0
  243. package/dist/features/viz/lib/step-curves.js.map +7 -0
  244. package/dist/features/viz/lib/threshold-color-scale.d.ts +43 -0
  245. package/dist/features/viz/lib/threshold-color-scale.js +59 -0
  246. package/dist/features/viz/lib/threshold-color-scale.js.map +7 -0
  247. package/dist/features/viz/lib/trading-time-mapping.d.ts +32 -0
  248. package/dist/features/viz/lib/trading-time-mapping.js +89 -0
  249. package/dist/features/viz/lib/trading-time-mapping.js.map +7 -0
  250. package/dist/features/viz/lib/trading-time-scale.d.ts +83 -0
  251. package/dist/features/viz/lib/trading-time-scale.js +96 -0
  252. package/dist/features/viz/lib/trading-time-scale.js.map +7 -0
  253. package/dist/features/viz/lib/trajectory-series.d.ts +71 -0
  254. package/dist/features/viz/lib/trajectory-series.js +111 -0
  255. package/dist/features/viz/lib/trajectory-series.js.map +7 -0
  256. package/dist/features/viz/lib/types.d.ts +20 -4
  257. package/dist/features/viz/lib/use-continuous-scale.js +6 -1
  258. package/dist/features/viz/lib/use-continuous-scale.js.map +2 -2
  259. package/dist/features/viz/lib/utc-scale.js +11 -10
  260. package/dist/features/viz/lib/utc-scale.js.map +2 -2
  261. package/dist/features/viz/lib/volume-series.d.ts +59 -0
  262. package/dist/features/viz/lib/volume-series.js +117 -0
  263. package/dist/features/viz/lib/volume-series.js.map +7 -0
  264. package/dist/features/viz/lib/weighted-point-series.d.ts +71 -0
  265. package/dist/features/viz/lib/weighted-point-series.js +169 -0
  266. package/dist/features/viz/lib/weighted-point-series.js.map +7 -0
  267. package/dist/filters/backdrop-contrast-gpu.d.ts +5 -0
  268. package/dist/filters/backdrop-contrast-gpu.js +33 -0
  269. package/dist/filters/backdrop-contrast-gpu.js.map +7 -0
  270. package/dist/filters/backdrop-contrast.d.ts +21 -0
  271. package/dist/filters/backdrop-contrast.js +61 -0
  272. package/dist/filters/backdrop-contrast.js.map +7 -0
  273. package/dist/filters/displacement.js +1 -1
  274. package/dist/filters/displacement.js.map +2 -2
  275. package/dist/filters/emboss-gpu.d.ts +4 -0
  276. package/dist/filters/emboss-gpu.js +39 -0
  277. package/dist/filters/emboss-gpu.js.map +7 -0
  278. package/dist/filters/emboss.d.ts +32 -0
  279. package/dist/filters/emboss.js +104 -0
  280. package/dist/filters/emboss.js.map +7 -0
  281. package/dist/filters/filter-executor.d.ts +11 -4
  282. package/dist/filters/filter-executor.js +104 -49
  283. package/dist/filters/filter-executor.js.map +2 -2
  284. package/dist/filters/reflected-light.js +1 -1
  285. package/dist/filters/reflected-light.js.map +2 -2
  286. package/dist/filters/reflection-gpu.d.ts +3 -1
  287. package/dist/filters/reflection-gpu.js +5 -2
  288. package/dist/filters/reflection-gpu.js.map +2 -2
  289. package/dist/filters/render-backdrop-contrast-boundary.d.ts +31 -0
  290. package/dist/filters/render-backdrop-contrast-boundary.js +116 -0
  291. package/dist/filters/render-backdrop-contrast-boundary.js.map +7 -0
  292. package/dist/filters/render-emboss-boundary.d.ts +13 -0
  293. package/dist/filters/render-emboss-boundary.js +131 -0
  294. package/dist/filters/render-emboss-boundary.js.map +7 -0
  295. package/dist/filters.d.ts +9 -5
  296. package/dist/filters.js +4 -0
  297. package/dist/filters.js.map +2 -2
  298. package/dist/index.d.ts +9 -5
  299. package/dist/index.js +18 -2
  300. package/dist/index.js.map +2 -2
  301. package/dist/internal.d.ts +4 -0
  302. package/dist/internal.js +6 -0
  303. package/dist/internal.js.map +2 -2
  304. package/dist/layout-kernel.d.ts +12 -0
  305. package/dist/layout-kernel.js +11 -0
  306. package/dist/layout-kernel.js.map +7 -0
  307. package/dist/layout-kernel.mjs +1 -0
  308. package/dist/lib/backend/types.d.ts +13 -1
  309. package/dist/lib/backend/types.js.map +2 -2
  310. package/dist/lib/components/arc-geometry.js +2 -1
  311. package/dist/lib/components/arc-geometry.js.map +2 -2
  312. package/dist/lib/components/g.js +2 -0
  313. package/dist/lib/components/g.js.map +2 -2
  314. package/dist/lib/components/html-box.js +2 -1
  315. package/dist/lib/components/html-box.js.map +2 -2
  316. package/dist/lib/components/img.js +3 -3
  317. package/dist/lib/components/img.js.map +2 -2
  318. package/dist/lib/components/layer.js +98 -16
  319. package/dist/lib/components/layer.js.map +3 -3
  320. package/dist/lib/components/text.d.ts +16 -0
  321. package/dist/lib/components/text.js +131 -24
  322. package/dist/lib/components/text.js.map +2 -2
  323. package/dist/lib/define-primitive.d.ts +4 -2
  324. package/dist/lib/define-primitive.js +3 -1
  325. package/dist/lib/define-primitive.js.map +2 -2
  326. package/dist/lib/element/metadata.d.ts +9 -0
  327. package/dist/lib/element/metadata.js +19 -0
  328. package/dist/lib/element/metadata.js.map +2 -2
  329. package/dist/lib/element/resolve-primitive-inputs.d.ts +2 -0
  330. package/dist/lib/element/resolve-primitive-inputs.js +17 -4
  331. package/dist/lib/element/resolve-primitive-inputs.js.map +2 -2
  332. package/dist/lib/events/event-facade.d.ts +18 -0
  333. package/dist/lib/events/event-facade.js +28 -2
  334. package/dist/lib/events/event-facade.js.map +2 -2
  335. package/dist/lib/events/hit-test.js +2 -1
  336. package/dist/lib/events/hit-test.js.map +2 -2
  337. package/dist/lib/events/propagation.d.ts +2 -1
  338. package/dist/lib/events/propagation.js +22 -16
  339. package/dist/lib/events/propagation.js.map +2 -2
  340. package/dist/lib/events/registrations.d.ts +10 -0
  341. package/dist/lib/events/registrations.js +160 -5
  342. package/dist/lib/events/registrations.js.map +2 -2
  343. package/dist/lib/execute-render.js +25 -1
  344. package/dist/lib/execute-render.js.map +2 -2
  345. package/dist/lib/filter/filter-region.js +3 -10
  346. package/dist/lib/filter/filter-region.js.map +2 -2
  347. package/dist/lib/focus/focus-manager.d.ts +8 -1
  348. package/dist/lib/focus/focus-manager.js +87 -43
  349. package/dist/lib/focus/focus-manager.js.map +2 -2
  350. package/dist/lib/focus/geometry.d.ts +2 -0
  351. package/dist/lib/focus/geometry.js +6 -0
  352. package/dist/lib/focus/geometry.js.map +2 -2
  353. package/dist/lib/geometry/path-bend-guide.js +1 -1
  354. package/dist/lib/geometry/path-bend-guide.js.map +2 -2
  355. package/dist/lib/geometry/path-geometry.js +12 -11
  356. package/dist/lib/geometry/path-geometry.js.map +2 -2
  357. package/dist/lib/geometry/path-transforms.js +17 -21
  358. package/dist/lib/geometry/path-transforms.js.map +2 -2
  359. package/dist/lib/geometry/path-warp-bezier.js +3 -1
  360. package/dist/lib/geometry/path-warp-bezier.js.map +2 -2
  361. package/dist/lib/geometry/path-warp.js +1 -1
  362. package/dist/lib/geometry/path-warp.js.map +2 -2
  363. package/dist/lib/global-state.js +2 -0
  364. package/dist/lib/global-state.js.map +2 -2
  365. package/dist/lib/html/html-events.d.ts +32 -0
  366. package/dist/lib/html/html-events.js +179 -0
  367. package/dist/lib/html/html-events.js.map +7 -0
  368. package/dist/lib/html/html-service.d.ts +8 -2
  369. package/dist/lib/html/html-service.js +198 -65
  370. package/dist/lib/html/html-service.js.map +2 -2
  371. package/dist/lib/html/overlay-config.js +7 -6
  372. package/dist/lib/html/overlay-config.js.map +2 -2
  373. package/dist/lib/html/types.d.ts +29 -2
  374. package/dist/lib/layout/absolute.d.ts +11 -5
  375. package/dist/lib/layout/absolute.js +329 -55
  376. package/dist/lib/layout/absolute.js.map +3 -3
  377. package/dist/lib/layout/allocation-checkpoint-owner.d.ts +11 -0
  378. package/dist/lib/layout/allocation-checkpoint-owner.js +86 -0
  379. package/dist/lib/layout/allocation-checkpoint-owner.js.map +7 -0
  380. package/dist/lib/layout/allocation-checkpoint.d.ts +53 -0
  381. package/dist/lib/layout/allocation-checkpoint.js +463 -0
  382. package/dist/lib/layout/allocation-checkpoint.js.map +7 -0
  383. package/dist/lib/layout/allocation-dependencies.d.ts +30 -0
  384. package/dist/lib/layout/allocation-dependencies.js +90 -0
  385. package/dist/lib/layout/allocation-dependencies.js.map +7 -0
  386. package/dist/lib/layout/allocation-revision.d.ts +13 -0
  387. package/dist/lib/layout/allocation-revision.js +67 -0
  388. package/dist/lib/layout/allocation-revision.js.map +7 -0
  389. package/dist/lib/layout/box-insets.d.ts +17 -0
  390. package/dist/lib/layout/box-insets.js +138 -0
  391. package/dist/lib/layout/box-insets.js.map +7 -0
  392. package/dist/lib/layout/box-sizing.d.ts +16 -0
  393. package/dist/lib/layout/box-sizing.js +77 -0
  394. package/dist/lib/layout/box-sizing.js.map +7 -0
  395. package/dist/lib/layout/box.js +42 -12
  396. package/dist/lib/layout/box.js.map +2 -2
  397. package/dist/lib/layout/canvas-measurement.d.ts +13 -0
  398. package/dist/lib/layout/canvas-measurement.js +57 -0
  399. package/dist/lib/layout/canvas-measurement.js.map +7 -0
  400. package/dist/lib/layout/context.d.ts +35 -6
  401. package/dist/lib/layout/context.js +72 -3
  402. package/dist/lib/layout/context.js.map +2 -2
  403. package/dist/lib/layout/define-layout-component.d.ts +23 -0
  404. package/dist/lib/layout/define-layout-component.js +84 -0
  405. package/dist/lib/layout/define-layout-component.js.map +7 -0
  406. package/dist/lib/layout/flex-allocation-cache.d.ts +42 -0
  407. package/dist/lib/layout/flex-baseline-mode.d.ts +2 -0
  408. package/dist/lib/layout/flex-baseline-mode.js +7 -0
  409. package/dist/lib/layout/flex-baseline-mode.js.map +7 -0
  410. package/dist/lib/layout/flex.d.ts +50 -15
  411. package/dist/lib/layout/flex.js +2124 -195
  412. package/dist/lib/layout/flex.js.map +3 -3
  413. package/dist/lib/layout/flow.js +225 -49
  414. package/dist/lib/layout/flow.js.map +2 -2
  415. package/dist/lib/layout/geometry-publication.d.ts +53 -0
  416. package/dist/lib/layout/geometry-publication.js +244 -0
  417. package/dist/lib/layout/geometry-publication.js.map +7 -0
  418. package/dist/lib/layout/grid-kernel.d.ts +63 -0
  419. package/dist/lib/layout/grid-kernel.js +168 -0
  420. package/dist/lib/layout/grid-kernel.js.map +7 -0
  421. package/dist/lib/layout/grid.d.ts +63 -4
  422. package/dist/lib/layout/grid.js +767 -171
  423. package/dist/lib/layout/grid.js.map +3 -3
  424. package/dist/lib/layout/measure.d.ts +55 -3
  425. package/dist/lib/layout/measure.js +448 -15
  426. package/dist/lib/layout/measure.js.map +2 -2
  427. package/dist/lib/layout/overlay.js +81 -23
  428. package/dist/lib/layout/overlay.js.map +2 -2
  429. package/dist/lib/layout/participation.d.ts +27 -0
  430. package/dist/lib/layout/participation.js +188 -0
  431. package/dist/lib/layout/participation.js.map +7 -0
  432. package/dist/lib/layout/place-child.js +1 -1
  433. package/dist/lib/layout/place-child.js.map +2 -2
  434. package/dist/lib/layout/positioning-diagnostics.d.ts +1 -1
  435. package/dist/lib/layout/positioning-diagnostics.js +13 -2
  436. package/dist/lib/layout/positioning-diagnostics.js.map +2 -2
  437. package/dist/lib/layout/prepared-root.d.ts +121 -0
  438. package/dist/lib/layout/prepared-root.js +360 -0
  439. package/dist/lib/layout/prepared-root.js.map +7 -0
  440. package/dist/lib/layout/standalone-kernel.d.ts +60 -0
  441. package/dist/lib/layout/standalone-kernel.js +722 -0
  442. package/dist/lib/layout/standalone-kernel.js.map +7 -0
  443. package/dist/lib/layout/topology.d.ts +21 -0
  444. package/dist/lib/layout/topology.js +113 -0
  445. package/dist/lib/layout/topology.js.map +7 -0
  446. package/dist/lib/layout/types.d.ts +5 -0
  447. package/dist/lib/layout/wasm/artifact.d.ts +1 -0
  448. package/dist/lib/layout/wasm/artifact.js +5 -0
  449. package/dist/lib/layout/wasm/artifact.js.map +7 -0
  450. package/dist/lib/layout/wasm/bytes.d.ts +1 -0
  451. package/dist/lib/layout/wasm/bytes.js +5 -0
  452. package/dist/lib/layout/wasm/bytes.js.map +7 -0
  453. package/dist/lib/layout/wasm/embedded.d.ts +2 -0
  454. package/dist/lib/layout/wasm/embedded.js +12 -0
  455. package/dist/lib/layout/wasm/embedded.js.map +7 -0
  456. package/dist/lib/layout/wasm/layout.wasm +0 -0
  457. package/dist/lib/layout/wasm/module.d.ts +8 -0
  458. package/dist/lib/layout/wasm/module.js +70 -0
  459. package/dist/lib/layout/wasm/module.js.map +7 -0
  460. package/dist/lib/layout/wasm/region.d.ts +267 -0
  461. package/dist/lib/layout/wasm/region.js +1018 -0
  462. package/dist/lib/layout/wasm/region.js.map +7 -0
  463. package/dist/lib/manipulation/controller.js +4 -7
  464. package/dist/lib/manipulation/controller.js.map +2 -2
  465. package/dist/lib/manipulation/frame.js +1 -1
  466. package/dist/lib/manipulation/frame.js.map +2 -2
  467. package/dist/lib/manipulation/handles.js +32 -33
  468. package/dist/lib/manipulation/handles.js.map +2 -2
  469. package/dist/lib/manipulation/solve.js +12 -10
  470. package/dist/lib/manipulation/solve.js.map +2 -2
  471. package/dist/lib/mount-pibbl.js +1 -0
  472. package/dist/lib/mount-pibbl.js.map +2 -2
  473. package/dist/lib/mount-prepared-pibbl.d.ts +5 -0
  474. package/dist/lib/mount-prepared-pibbl.js +29 -0
  475. package/dist/lib/mount-prepared-pibbl.js.map +7 -0
  476. package/dist/lib/mount-request.d.ts +8 -0
  477. package/dist/lib/mount-request.js +41 -0
  478. package/dist/lib/mount-request.js.map +7 -0
  479. package/dist/lib/pibbl.d.ts +21 -13
  480. package/dist/lib/pibbl.js +18 -16
  481. package/dist/lib/pibbl.js.map +2 -2
  482. package/dist/lib/recording/recording.d.ts +43 -0
  483. package/dist/lib/recording/recording.js +555 -0
  484. package/dist/lib/recording/recording.js.map +7 -0
  485. package/dist/lib/recording/types.d.ts +118 -0
  486. package/dist/lib/recording/wasm-bytes.d.ts +1 -0
  487. package/dist/lib/recording/wasm-bytes.js +5 -0
  488. package/dist/lib/recording/wasm-bytes.js.map +7 -0
  489. package/dist/lib/recording/worker-source.d.ts +1 -0
  490. package/dist/lib/recording/worker-source.js +5 -0
  491. package/dist/lib/recording/worker-source.js.map +7 -0
  492. package/dist/lib/render-layer/controller.d.ts +9 -3
  493. package/dist/lib/render-layer/controller.js +259 -110
  494. package/dist/lib/render-layer/controller.js.map +2 -2
  495. package/dist/lib/render-transaction.d.ts +12 -2
  496. package/dist/lib/render-transaction.js +69 -1
  497. package/dist/lib/render-transaction.js.map +2 -2
  498. package/dist/lib/render.js +32 -8
  499. package/dist/lib/render.js.map +2 -2
  500. package/dist/lib/scheduler/realm-scheduler.d.ts +2 -0
  501. package/dist/lib/scheduler/realm-scheduler.js +55 -26
  502. package/dist/lib/scheduler/realm-scheduler.js.map +2 -2
  503. package/dist/lib/scheduler/renderer-participant.js +1 -0
  504. package/dist/lib/scheduler/renderer-participant.js.map +2 -2
  505. package/dist/lib/series-inspection-frame.d.ts +18 -0
  506. package/dist/lib/series-inspection-frame.js +70 -0
  507. package/dist/lib/series-inspection-frame.js.map +7 -0
  508. package/dist/lib/signals/edge.d.ts +7 -4
  509. package/dist/lib/signals/edge.js +25 -3
  510. package/dist/lib/signals/edge.js.map +2 -2
  511. package/dist/lib/signals/graph.d.ts +16 -2
  512. package/dist/lib/signals/graph.js +54 -12
  513. package/dist/lib/signals/graph.js.map +2 -2
  514. package/dist/lib/signals/input-provision.d.ts +15 -0
  515. package/dist/lib/signals/input-provision.js +53 -3
  516. package/dist/lib/signals/input-provision.js.map +2 -2
  517. package/dist/lib/signals/render-consumer.d.ts +3 -0
  518. package/dist/lib/signals/render-consumer.js +22 -14
  519. package/dist/lib/signals/render-consumer.js.map +2 -2
  520. package/dist/lib/style/positioning.d.ts +50 -2
  521. package/dist/lib/style/positioning.js +28 -4
  522. package/dist/lib/style/positioning.js.map +2 -2
  523. package/dist/lib/style/resolve-built-in.d.ts +4 -3
  524. package/dist/lib/style/resolve-built-in.js +17 -3
  525. package/dist/lib/style/resolve-built-in.js.map +2 -2
  526. package/dist/lib/style/resolve-dispatch.d.ts +3 -0
  527. package/dist/lib/style/resolve-dispatch.js +77 -4
  528. package/dist/lib/style/resolve-dispatch.js.map +2 -2
  529. package/dist/lib/style/resolve-length.d.ts +2 -0
  530. package/dist/lib/style/resolve-length.js +13 -9
  531. package/dist/lib/style/resolve-length.js.map +2 -2
  532. package/dist/lib/style/sizing-length.d.ts +51 -0
  533. package/dist/lib/style/sizing-length.js +77 -0
  534. package/dist/lib/style/sizing-length.js.map +7 -0
  535. package/dist/lib/style/types.d.ts +63 -25
  536. package/dist/lib/surface/root-surface.js +10 -6
  537. package/dist/lib/surface/root-surface.js.map +2 -2
  538. package/dist/lib/textures/texture.js +10 -8
  539. package/dist/lib/textures/texture.js.map +2 -2
  540. package/dist/lib/transitions/capture.js +4 -1
  541. package/dist/lib/transitions/capture.js.map +2 -2
  542. package/dist/lib/transitions/embers-physics.js +17 -10
  543. package/dist/lib/transitions/embers-physics.js.map +2 -2
  544. package/dist/lib/types.d.ts +110 -1
  545. package/dist/sync.d.ts +16 -0
  546. package/dist/sync.js +13 -0
  547. package/dist/sync.js.map +7 -0
  548. package/dist/sync.mjs +1 -0
  549. package/package.json +26 -3
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 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 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;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,SAA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AAyB;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;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAIK;AACP;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAEK;AAEP,SAAS,OAAO,2BAA2B;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EAC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GvB,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;AAAA,EACA;AAAA,OACK;AAYP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,2BAA2B;AAEpC,SAAS,yBAAyB,oBAAoB;AACtD;AAAA,EACE;AAAA,EACA,uBAAAA;AAAA,OACK;AACP,SAAS,gCAAgC;AACzC;AAAA,EACE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A;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;AAYP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,2BAA2B;AAEpC,SAAS,yBAAyB,oBAAoB;AACtD,SAAS,oCAAoC;AAC7C,SAAS,8BAA8B;AACvC;AAAA,EACE;AAAA,EACA,uBAAAA;AAAA,OACK;AACP,SAAS,gCAA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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';
@@ -5,7 +5,7 @@ import type { PibblElementSource } from '../element/metadata.js';
5
5
  import type { PibblNode, PibblNodeInput } from '../element/types.js';
6
6
  import type { PibblHitTestOutput } from '../events/paint-entry.js';
7
7
  import type { PibblEventFocusOptions, PibblEventHandlers } from '../events/types.js';
8
- import type { MeasureInput, MeasureResult, NormalizedStyle, PreservedSignalPropKey, PrimitiveProgramProps, ResolvedStyle, SpecifiedStyle, StyleResolutionContext, SystemStyle, Canvas, RenderingContext2D } from '../types.js';
8
+ import type { MeasureInput, IntrinsicMeasureInput, IntrinsicSizesResult, BaselineMeasureInput, BaselinesResult, MeasureResult, NormalizedStyle, PreservedSignalPropKey, PrimitiveProgramProps, ResolvedStyle, SpecifiedStyle, StyleResolutionContext, SystemStyle, Canvas, RenderingContext2D } from '../types.js';
9
9
  import type { RenderTargetSnapshot } from '../render-target.js';
10
10
  declare const PIBBL_BACKEND_TOKEN: unique symbol;
11
11
  /**
@@ -100,6 +100,18 @@ export interface PibblBackendPrimitiveDefinition<P = any, S extends SystemStyle
100
100
  * @returns Measured dimensions or an unsupported measurement result. See {@link MeasureResult}.
101
101
  */
102
102
  readonly measure?: (input: MeasureInput<PrimitiveProgramProps<P>, N>) => MeasureResult;
103
+ /**
104
+ * Pure intrinsic content provider. See {@link IntrinsicMeasureInput}.
105
+ * @param input - Resolved inputs and tagged availability. See {@link IntrinsicMeasureInput}.
106
+ * @returns Paired content sizes or unsupported. See {@link IntrinsicSizesResult}.
107
+ */
108
+ readonly measureIntrinsic?: (input: IntrinsicMeasureInput<PrimitiveProgramProps<P>, N>) => IntrinsicSizesResult;
109
+ /**
110
+ * Pure first/last baseline provider at the final content allocation.
111
+ * @param input - Resolved inputs and final local allocation. See {@link BaselineMeasureInput}.
112
+ * @returns Finite ordered offsets or unsupported. See {@link BaselinesResult}.
113
+ */
114
+ readonly measureBaselines?: (input: BaselineMeasureInput<PrimitiveProgramProps<P>, N>) => BaselinesResult;
103
115
  }
104
116
  /**
105
117
  * Inputs used to begin a backend frame.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/backend/types.ts"],
4
- "sourcesContent": ["import type { registerNestedInteractionResolver, useBackendEventTarget } from '../../internal.js';\nimport type { mountBackendPibbl } from '../mount-pibbl.js';\nimport type { defineBackendPrimitive } from '../define-primitive.js';\nimport type { PibblElementSource } from '../element/metadata.js';\nimport type { PibblNode, PibblNodeInput } from '../element/types.js';\nimport type { PibblHitTestOutput } from '../events/paint-entry.js';\nimport type { PibblEventFocusOptions, PibblEventHandlers } from '../events/types.js';\nimport type {\n MeasureInput,\n MeasureResult,\n NormalizedStyle,\n PreservedSignalPropKey,\n PrimitiveProgramProps,\n ResolvedStyle,\n SpecifiedStyle,\n StyleResolutionContext,\n SystemStyle,\n Canvas,\n RenderingContext2D,\n} from '../types.js';\nimport type { RenderTargetSnapshot } from '../render-target.js';\n\ndeclare const PIBBL_BACKEND_TOKEN: unique symbol;\n\n/**\n * Opaque identity for one official Pibbl rendering backend.\n *\n * @see {@link createBackendToken}\n * @see {@link PibblBackendDriver}\n * @see {@link PibblBackendPrimitiveDefinition}\n */\nexport interface PibblBackendToken {\n readonly [PIBBL_BACKEND_TOKEN]: true;\n}\n\nconst backendNames = new WeakMap<PibblBackendToken, string>();\n\n/**\n * Creates a package-private backend identity for an official Pibbl renderer.\n *\n * @param name - Diagnostic name identifying the backend.\n * @returns A unique backend identity token. See {@link PibblBackendToken}.\n *\n * @see {@link PibblBackendToken}\n */\nexport function createBackendToken(name: string): PibblBackendToken {\n if (!name.trim()) {\n throw new Error('Pibbl backend names must be nonempty.');\n }\n const token = Object.freeze({}) as PibblBackendToken;\n backendNames.set(token, name);\n return token;\n}\n\n/** @internal Used only for diagnostics and dispatch inside core. */\nexport function getBackendTokenName(token: PibblBackendToken): string {\n return backendNames.get(token) ?? 'unknown';\n}\n\n/**\n * Executable primitive rendering program recognized by the backend.\n *\n * @param props - Resolved non-style component inputs. See {@link PrimitiveProgramProps}.\n * @param style - Resolved primitive style. See {@link ResolvedStyle}.\n * @param environment - Backend environment for the active frame.\n * @returns Child nodes to traverse, or no children. See {@link PibblNodeInput}.\n *\n * @see {@link SystemStyle}\n * @see {@link PrimitiveProgramProps}\n * @see {@link ResolvedStyle}\n * @see {@link PibblNodeInput}\n * @see {@link PibblBackendPrimitiveDefinition}\n * @see {@link defineBackendPrimitive}\n */\nexport type PibblBackendPrimitiveProgram<\n P = any,\n R extends SystemStyle = SystemStyle,\n E = any,\n> = (\n props: Readonly<PrimitiveProgramProps<P>>,\n style: ResolvedStyle<R>,\n environment: E,\n) => PibblNodeInput | void;\n\n/**\n * Rendering, style, and measurement definition of a backend primitive.\n *\n * @see {@link SystemStyle}\n * @see {@link PibblBackendToken}\n * @see {@link PibblBackendPrimitiveProgram}\n * @see {@link SpecifiedStyle}\n * @see {@link NormalizedStyle}\n * @see {@link StyleResolutionContext}\n * @see {@link ResolvedStyle}\n * @see {@link MeasureInput}\n * @see {@link PrimitiveProgramProps}\n * @see {@link MeasureResult}\n * @see {@link PibblBackendPrimitiveInput}\n */\nexport interface PibblBackendPrimitiveDefinition<\n P = any,\n S extends SystemStyle = SystemStyle,\n N extends SystemStyle = S,\n R extends SystemStyle = N,\n E = any,\n> {\n /** Identity of the backend that accepts this primitive. See {@link PibblBackendToken}. */\n readonly backend: PibblBackendToken;\n /**\n * Names props whose signal identity is preserved for the primitive program. See\n * {@link PreservedSignalPropKey}.\n */\n readonly preserveSignalProps?: readonly PreservedSignalPropKey<P>[];\n /**\n * Declares how the primitive receives and resolves its children. See\n * {@link PibblBackendPrimitiveDefinition}.\n */\n readonly childInput?: 'structural' | 'text';\n /** Executable primitive program used by the backend. See {@link PibblBackendPrimitiveProgram}. */\n readonly program: PibblBackendPrimitiveProgram<P, R, E>;\n /**\n * Applies primitive defaults and shorthand normalization before layout resolution. See\n * {@link SpecifiedStyle}, {@link NormalizedStyle}.\n * @param style - Specified style values before normalization. See {@link SpecifiedStyle}.\n * @returns Normalized style with the primitive's shorthand and defaults applied. See\n * {@link NormalizedStyle} .\n */\n readonly normalizeStyle?: (style: SpecifiedStyle<S>) => NormalizedStyle<N>;\n /**\n * Resolves normalized style using the current layout context. See {@link NormalizedStyle},\n * {@link StyleResolutionContext}, {@link ResolvedStyle}.\n * @param style - Normalized style to resolve. See {@link NormalizedStyle}.\n * @param context - Layout and diagnostic context for resolution. See\n * {@link StyleResolutionContext} .\n * @returns Resolved style ready for rendering. See {@link ResolvedStyle}.\n */\n readonly resolveStyle?: (\n style: NormalizedStyle<N>,\n context: Readonly<StyleResolutionContext>,\n ) => ResolvedStyle<R>;\n /**\n * Measures declared primitive inputs without painting or retaining draw commands. See\n * {@link MeasureInput}, {@link PrimitiveProgramProps}, {@link MeasureResult}.\n * @param input - Props, normalized style, constraints, and nested measurement services. See\n * {@link MeasureInput} , {@link PrimitiveProgramProps} .\n * @returns Measured dimensions or an unsupported measurement result. See {@link MeasureResult}.\n */\n readonly measure?: (input: MeasureInput<PrimitiveProgramProps<P>, N>) => MeasureResult;\n}\n\n/**\n * Inputs used to begin a backend frame.\n *\n * @see {@link Canvas}\n * @see {@link PibblBackendDriver}\n */\nexport interface PibblBackendFrameInput {\n /** Canvas surface associated with this resource or mount. See {@link Canvas}. */\n readonly canvas: Canvas;\n /** Canvas width in logical units. See {@link PibblBackendFrameInput}. */\n readonly logicalWidth: number;\n /** Canvas height in logical units. See {@link PibblBackendFrameInput}. */\n readonly logicalHeight: number;\n /** Width of the backing raster in physical pixels. See {@link PibblBackendFrameInput}. */\n readonly backingWidth: number;\n /** Height of the backing raster in physical pixels. See {@link PibblBackendFrameInput}. */\n readonly backingHeight: number;\n /** Timestamp associated with this render frame. See {@link PibblBackendFrameInput}. */\n readonly renderTimestamp: number;\n}\n\n/**\n * The backend rendering context for one scheduled frame.\n *\n * @see {@link RenderingContext2D}\n * @see {@link PibblBackendDriver}\n */\nexport interface PibblBackendFrame<E> {\n /** Backend environment used while evaluating the frame. See {@link PibblBackendFrame}. */\n readonly environment: E;\n /** Canvas 2D context used for the current frame. See {@link RenderingContext2D}. */\n readonly context2D?: RenderingContext2D;\n /** Current drawing target owned by the backend frame. See {@link RenderTargetSnapshot}. */\n readonly renderTarget?: RenderTargetSnapshot;\n /**\n * World transform establishing the backend frame's logical coordinate basis. See\n * {@link PibblBackendFrame}.\n */\n readonly worldBaseTransform?: DOMMatrix;\n}\n\n/**\n * Resolved inputs delivered to a backend primitive program.\n *\n * @see {@link PibblElementSource}\n * @see {@link PibblBackendPrimitiveDefinition}\n * @see {@link PibblBackendDriver}\n */\nexport interface PibblBackendPrimitiveInput {\n /** Component name retained for diagnostics. See {@link PibblBackendPrimitiveInput}. */\n readonly componentName: string;\n /** Authoring source location retained for diagnostics. See {@link PibblElementSource}. */\n readonly source?: PibblElementSource;\n /**\n * Primitive definition used to resolve and render the supplied inputs. See\n * {@link PibblBackendPrimitiveDefinition}.\n */\n readonly definition: PibblBackendPrimitiveDefinition;\n /**\n * Component props supplied to evaluation or measurement. See {@link PibblBackendPrimitiveInput}.\n */\n readonly props: Readonly<Record<PropertyKey, unknown>>;\n /** Declared presentation and layout properties. See {@link PibblBackendPrimitiveInput}. */\n readonly style: Readonly<Record<PropertyKey, unknown>>;\n /**\n * Transform applied to the primitive's presented Canvas geometry. See\n * {@link PibblBackendPrimitiveInput}.\n */\n readonly presentationTransform2D?: DOMMatrix;\n}\n\n/**\n * A mounted backend's frame execution and cleanup operations.\n *\n * @see {@link Canvas}\n * @see {@link PibblNode}\n * @see {@link PibblNestedResolverInput}\n * @see {@link mountBackendPibbl}\n */\nexport interface PibblBackendMount {\n /** Canvas surface associated with this resource or mount. See {@link Canvas}. */\n readonly canvas: Canvas;\n /**\n * Updates the backend surface to the supplied dimensions. See {@link PibblBackendMount}.\n * @param logicalWidth - New logical viewport width.\n * @param logicalHeight - New logical viewport height.\n */\n resize(logicalWidth: number, logicalHeight: number): void;\n /**\n * Renders the current data or resources using the supplied context. See {@link PibblBackendMount}\n * .\n * @param root - Node tree to render. See {@link PibblNode}.\n * @param timestamp - Frame timestamp in milliseconds.\n */\n render(root: PibblNode, timestamp: number): void;\n /**\n * Requests future work from the owning scheduler. See {@link PibblBackendMount}.\n * @param updateParents - Whether ancestor compositions also need to be scheduled.\n */\n requestFrame(updateParents: boolean): void;\n /** Releases resources owned by this mounted object. See {@link PibblBackendMount}. */\n dispose(): void;\n}\n\n/**\n * Version-coupled rendering backend lifecycle used by official integrations.\n *\n * @see {@link PibblBackendToken}\n * @see {@link PibblBackendFrameInput}\n * @see {@link PibblBackendFrame}\n * @see {@link PibblBackendPrimitiveInput}\n * @see {@link PibblNodeInput}\n * @see {@link PibblBackendMountOptions}\n */\nexport interface PibblBackendDriver<E> {\n /** Identity token distinguishing this backend driver. See {@link PibblBackendToken}. */\n readonly token: PibblBackendToken;\n /** Name identifying this backend, emitter, or parameter. See {@link PibblBackendDriver}. */\n readonly name: string;\n /**\n * Begins backend work for one shared scheduler frame. See {@link PibblBackendFrame}.\n * @param input - Root surface, timestamp, and logical dimensions for this render. See\n * {@link PibblBackendFrameInput} .\n * @returns Frame state, or undefined when no frame should be rendered. See\n * {@link PibblBackendFrame} .\n */\n beginFrame(input: PibblBackendFrameInput): PibblBackendFrame<E> | undefined;\n /**\n * Enters a component's backend evaluation scope. See {@link PibblBackendDriver}.\n * @param frame - Frame whose component environment should become active. See\n * {@link PibblBackendFrame} .\n * @returns A cleanup function restoring the previous environment.\n */\n enterComponent(frame: PibblBackendFrame<E>): () => void;\n /**\n * Runs a primitive's drawing program in the current backend frame. See {@link PibblBackendDriver}\n * .\n * @param frame - Active backend frame. See {@link PibblBackendFrame}.\n * @param input - Primitive descriptor and resolved rendering inputs. See\n * {@link PibblBackendPrimitiveInput} .\n * @param runProgram - Runtime callback used to invoke the primitive program. See\n * {@link PibblNodeInput} .\n */\n runPrimitive(\n frame: PibblBackendFrame<E>,\n input: PibblBackendPrimitiveInput,\n runProgram: (invoke: () => PibblNodeInput | void) => void,\n ): void;\n /**\n * Completes the backend frame and its pending composition work. See {@link PibblBackendDriver}.\n * @param frame - Frame returned by beginFrame. See {@link PibblBackendFrame}.\n * @param success - Whether traversal completed successfully.\n */\n finishFrame(frame: PibblBackendFrame<E>, success: boolean): void;\n /** Releases resources owned by this mounted object. See {@link PibblBackendDriver}. */\n dispose(): void;\n}\n\n/**\n * Canvas, configuration, and ownership inputs used to create a backend mount.\n *\n * @see {@link Canvas}\n * @see {@link PibblBackendDriver}\n * @see {@link mountBackendPibbl}\n */\nexport interface PibblBackendMountOptions<E> {\n /** Owning parent runtime instance. See {@link Canvas}. */\n readonly parent: Canvas;\n /** Canvas width in logical units. See {@link PibblBackendMountOptions}. */\n readonly logicalWidth: number;\n /** Canvas height in logical units. See {@link PibblBackendMountOptions}. */\n readonly logicalHeight: number;\n /** Backend driver responsible for this mount. See {@link PibblBackendDriver}. */\n readonly driver: PibblBackendDriver<E>;\n}\n\n/**\n * Backend target registration options with logical interaction geometry.\n *\n * @see {@link useBackendEventTarget}\n */\nexport interface PibblBackendEventTargetOptions extends PibblEventFocusOptions {\n /**\n * Cursor shown while this target owns pointer presentation. See\n * {@link PibblBackendEventTargetOptions}.\n */\n readonly cursor?: string;\n /** Defers backend-owned focus geometry until its visual generation commits. */\n readonly deferKeyboardNavigationGeometry?: boolean;\n}\n\n/**\n * Context supplied when resolving nested content through a backend.\n *\n * @see {@link PibblBackendMount}\n * @see {@link PibblHitTestOutput}\n * @see {@link registerNestedInteractionResolver}\n */\nexport interface PibblNestedResolverInput {\n /** Nested child content to resolve. See {@link PibblBackendMount}. */\n readonly child: PibblBackendMount;\n /** Logical region constraining the content or query. See {@link PibblNestedResolverInput}. */\n readonly bounds: Path2D;\n /** Whether this content participates in pointer targeting. See {@link PibblNestedResolverInput}. */\n readonly pointerEvents: 'auto' | 'none';\n /**\n * Resolves nested content in the current local coordinate system. See\n * {@link PibblNestedResolverInput}.\n * @param localX - Horizontal position in resolver-local coordinates.\n * @param localY - Vertical position in resolver-local coordinates.\n * @param output - Mutable hit-test result to populate. See {@link PibblHitTestOutput}.\n */\n resolveLocal(localX: number, localY: number, output: PibblHitTestOutput): void;\n}\n\n/** @internal */\nexport function backendMismatchError(\n componentName: string,\n required: PibblBackendToken,\n active: PibblBackendDriver<unknown>,\n source?: PibblElementSource,\n): Error {\n const requiredName = getBackendTokenName(required);\n const prefix = `${componentName} requires the ${requiredName} backend and ` +\n `cannot render in the ${active.name} root.`;\n return new Error(withJSXSource(prefix, source));\n}\n\nfunction withJSXSource(message: string, source?: PibblElementSource): string {\n return source ?\n `${message} JSX source: ${source.fileName}:${source.lineNumber}:${source.columnNumber}.` :\n message;\n}\n\nexport type { PibblEventHandlers };\n"],
5
- "mappings": "AAmCA,MAAM,eAAe,oBAAI,QAAmC;AAUrD,SAAS,mBAAmB,MAAiC;AAClE,MAAI,CAAC,KAAK,KAAK,GAAG;AAChB,UAAM,IAAI,MAAM,uCAAuC;AAAA,EACzD;AACA,QAAM,QAAQ,OAAO,OAAO,CAAC,CAAC;AAC9B,eAAa,IAAI,OAAO,IAAI;AAC5B,SAAO;AACT;AAGO,SAAS,oBAAoB,OAAkC;AACpE,SAAO,aAAa,IAAI,KAAK,KAAK;AACpC;AAqTO,SAAS,qBACd,eACA,UACA,QACA,QACO;AACP,QAAM,eAAe,oBAAoB,QAAQ;AACjD,QAAM,SAAS,GAAG,aAAa,iBAAiB,YAAY,qCAClC,OAAO,IAAI;AACrC,SAAO,IAAI,MAAM,cAAc,QAAQ,MAAM,CAAC;AAChD;AAEA,SAAS,cAAc,SAAiB,QAAqC;AAC3E,SAAO,SACH,GAAG,OAAO,gBAAgB,OAAO,QAAQ,IAAI,OAAO,UAAU,IAAI,OAAO,YAAY,MACvF;AACJ;",
4
+ "sourcesContent": ["import type { registerNestedInteractionResolver, useBackendEventTarget } from '../../internal.js';\nimport type { mountBackendPibbl } from '../mount-pibbl.js';\nimport type { defineBackendPrimitive } from '../define-primitive.js';\nimport type { PibblElementSource } from '../element/metadata.js';\nimport type { PibblNode, PibblNodeInput } from '../element/types.js';\nimport type { PibblHitTestOutput } from '../events/paint-entry.js';\nimport type { PibblEventFocusOptions, PibblEventHandlers } from '../events/types.js';\nimport type {\n MeasureInput,\n IntrinsicMeasureInput,\n IntrinsicSizesResult,\n BaselineMeasureInput,\n BaselinesResult,\n MeasureResult,\n NormalizedStyle,\n PreservedSignalPropKey,\n PrimitiveProgramProps,\n ResolvedStyle,\n SpecifiedStyle,\n StyleResolutionContext,\n SystemStyle,\n Canvas,\n RenderingContext2D,\n} from '../types.js';\nimport type { RenderTargetSnapshot } from '../render-target.js';\n\ndeclare const PIBBL_BACKEND_TOKEN: unique symbol;\n\n/**\n * Opaque identity for one official Pibbl rendering backend.\n *\n * @see {@link createBackendToken}\n * @see {@link PibblBackendDriver}\n * @see {@link PibblBackendPrimitiveDefinition}\n */\nexport interface PibblBackendToken {\n readonly [PIBBL_BACKEND_TOKEN]: true;\n}\n\nconst backendNames = new WeakMap<PibblBackendToken, string>();\n\n/**\n * Creates a package-private backend identity for an official Pibbl renderer.\n *\n * @param name - Diagnostic name identifying the backend.\n * @returns A unique backend identity token. See {@link PibblBackendToken}.\n *\n * @see {@link PibblBackendToken}\n */\nexport function createBackendToken(name: string): PibblBackendToken {\n if (!name.trim()) {\n throw new Error('Pibbl backend names must be nonempty.');\n }\n const token = Object.freeze({}) as PibblBackendToken;\n backendNames.set(token, name);\n return token;\n}\n\n/** @internal Used only for diagnostics and dispatch inside core. */\nexport function getBackendTokenName(token: PibblBackendToken): string {\n return backendNames.get(token) ?? 'unknown';\n}\n\n/**\n * Executable primitive rendering program recognized by the backend.\n *\n * @param props - Resolved non-style component inputs. See {@link PrimitiveProgramProps}.\n * @param style - Resolved primitive style. See {@link ResolvedStyle}.\n * @param environment - Backend environment for the active frame.\n * @returns Child nodes to traverse, or no children. See {@link PibblNodeInput}.\n *\n * @see {@link SystemStyle}\n * @see {@link PrimitiveProgramProps}\n * @see {@link ResolvedStyle}\n * @see {@link PibblNodeInput}\n * @see {@link PibblBackendPrimitiveDefinition}\n * @see {@link defineBackendPrimitive}\n */\nexport type PibblBackendPrimitiveProgram<\n P = any,\n R extends SystemStyle = SystemStyle,\n E = any,\n> = (\n props: Readonly<PrimitiveProgramProps<P>>,\n style: ResolvedStyle<R>,\n environment: E,\n) => PibblNodeInput | void;\n\n/**\n * Rendering, style, and measurement definition of a backend primitive.\n *\n * @see {@link SystemStyle}\n * @see {@link PibblBackendToken}\n * @see {@link PibblBackendPrimitiveProgram}\n * @see {@link SpecifiedStyle}\n * @see {@link NormalizedStyle}\n * @see {@link StyleResolutionContext}\n * @see {@link ResolvedStyle}\n * @see {@link MeasureInput}\n * @see {@link PrimitiveProgramProps}\n * @see {@link MeasureResult}\n * @see {@link PibblBackendPrimitiveInput}\n */\nexport interface PibblBackendPrimitiveDefinition<\n P = any,\n S extends SystemStyle = SystemStyle,\n N extends SystemStyle = S,\n R extends SystemStyle = N,\n E = any,\n> {\n /** Identity of the backend that accepts this primitive. See {@link PibblBackendToken}. */\n readonly backend: PibblBackendToken;\n /**\n * Names props whose signal identity is preserved for the primitive program. See\n * {@link PreservedSignalPropKey}.\n */\n readonly preserveSignalProps?: readonly PreservedSignalPropKey<P>[];\n /**\n * Declares how the primitive receives and resolves its children. See\n * {@link PibblBackendPrimitiveDefinition}.\n */\n readonly childInput?: 'structural' | 'text';\n /** Executable primitive program used by the backend. See {@link PibblBackendPrimitiveProgram}. */\n readonly program: PibblBackendPrimitiveProgram<P, R, E>;\n /**\n * Applies primitive defaults and shorthand normalization before layout resolution. See\n * {@link SpecifiedStyle}, {@link NormalizedStyle}.\n * @param style - Specified style values before normalization. See {@link SpecifiedStyle}.\n * @returns Normalized style with the primitive's shorthand and defaults applied. See\n * {@link NormalizedStyle} .\n */\n readonly normalizeStyle?: (style: SpecifiedStyle<S>) => NormalizedStyle<N>;\n /**\n * Resolves normalized style using the current layout context. See {@link NormalizedStyle},\n * {@link StyleResolutionContext}, {@link ResolvedStyle}.\n * @param style - Normalized style to resolve. See {@link NormalizedStyle}.\n * @param context - Layout and diagnostic context for resolution. See\n * {@link StyleResolutionContext} .\n * @returns Resolved style ready for rendering. See {@link ResolvedStyle}.\n */\n readonly resolveStyle?: (\n style: NormalizedStyle<N>,\n context: Readonly<StyleResolutionContext>,\n ) => ResolvedStyle<R>;\n /**\n * Measures declared primitive inputs without painting or retaining draw commands. See\n * {@link MeasureInput}, {@link PrimitiveProgramProps}, {@link MeasureResult}.\n * @param input - Props, normalized style, constraints, and nested measurement services. See\n * {@link MeasureInput} , {@link PrimitiveProgramProps} .\n * @returns Measured dimensions or an unsupported measurement result. See {@link MeasureResult}.\n */\n readonly measure?: (input: MeasureInput<PrimitiveProgramProps<P>, N>) => MeasureResult;\n /**\n * Pure intrinsic content provider. See {@link IntrinsicMeasureInput}.\n * @param input - Resolved inputs and tagged availability. See {@link IntrinsicMeasureInput}.\n * @returns Paired content sizes or unsupported. See {@link IntrinsicSizesResult}.\n */\n readonly measureIntrinsic?: (input: IntrinsicMeasureInput<PrimitiveProgramProps<P>, N>) => IntrinsicSizesResult;\n /**\n * Pure first/last baseline provider at the final content allocation.\n * @param input - Resolved inputs and final local allocation. See {@link BaselineMeasureInput}.\n * @returns Finite ordered offsets or unsupported. See {@link BaselinesResult}.\n */\n readonly measureBaselines?: (input: BaselineMeasureInput<PrimitiveProgramProps<P>, N>) => BaselinesResult;\n}\n\n/**\n * Inputs used to begin a backend frame.\n *\n * @see {@link Canvas}\n * @see {@link PibblBackendDriver}\n */\nexport interface PibblBackendFrameInput {\n /** Canvas surface associated with this resource or mount. See {@link Canvas}. */\n readonly canvas: Canvas;\n /** Canvas width in logical units. See {@link PibblBackendFrameInput}. */\n readonly logicalWidth: number;\n /** Canvas height in logical units. See {@link PibblBackendFrameInput}. */\n readonly logicalHeight: number;\n /** Width of the backing raster in physical pixels. See {@link PibblBackendFrameInput}. */\n readonly backingWidth: number;\n /** Height of the backing raster in physical pixels. See {@link PibblBackendFrameInput}. */\n readonly backingHeight: number;\n /** Timestamp associated with this render frame. See {@link PibblBackendFrameInput}. */\n readonly renderTimestamp: number;\n}\n\n/**\n * The backend rendering context for one scheduled frame.\n *\n * @see {@link RenderingContext2D}\n * @see {@link PibblBackendDriver}\n */\nexport interface PibblBackendFrame<E> {\n /** Backend environment used while evaluating the frame. See {@link PibblBackendFrame}. */\n readonly environment: E;\n /** Canvas 2D context used for the current frame. See {@link RenderingContext2D}. */\n readonly context2D?: RenderingContext2D;\n /** Current drawing target owned by the backend frame. See {@link RenderTargetSnapshot}. */\n readonly renderTarget?: RenderTargetSnapshot;\n /**\n * World transform establishing the backend frame's logical coordinate basis. See\n * {@link PibblBackendFrame}.\n */\n readonly worldBaseTransform?: DOMMatrix;\n}\n\n/**\n * Resolved inputs delivered to a backend primitive program.\n *\n * @see {@link PibblElementSource}\n * @see {@link PibblBackendPrimitiveDefinition}\n * @see {@link PibblBackendDriver}\n */\nexport interface PibblBackendPrimitiveInput {\n /** Component name retained for diagnostics. See {@link PibblBackendPrimitiveInput}. */\n readonly componentName: string;\n /** Authoring source location retained for diagnostics. See {@link PibblElementSource}. */\n readonly source?: PibblElementSource;\n /**\n * Primitive definition used to resolve and render the supplied inputs. See\n * {@link PibblBackendPrimitiveDefinition}.\n */\n readonly definition: PibblBackendPrimitiveDefinition;\n /**\n * Component props supplied to evaluation or measurement. See {@link PibblBackendPrimitiveInput}.\n */\n readonly props: Readonly<Record<PropertyKey, unknown>>;\n /** Declared presentation and layout properties. See {@link PibblBackendPrimitiveInput}. */\n readonly style: Readonly<Record<PropertyKey, unknown>>;\n /**\n * Transform applied to the primitive's presented Canvas geometry. See\n * {@link PibblBackendPrimitiveInput}.\n */\n readonly presentationTransform2D?: DOMMatrix;\n}\n\n/**\n * A mounted backend's frame execution and cleanup operations.\n *\n * @see {@link Canvas}\n * @see {@link PibblNode}\n * @see {@link PibblNestedResolverInput}\n * @see {@link mountBackendPibbl}\n */\nexport interface PibblBackendMount {\n /** Canvas surface associated with this resource or mount. See {@link Canvas}. */\n readonly canvas: Canvas;\n /**\n * Updates the backend surface to the supplied dimensions. See {@link PibblBackendMount}.\n * @param logicalWidth - New logical viewport width.\n * @param logicalHeight - New logical viewport height.\n */\n resize(logicalWidth: number, logicalHeight: number): void;\n /**\n * Renders the current data or resources using the supplied context. See {@link PibblBackendMount}\n * .\n * @param root - Node tree to render. See {@link PibblNode}.\n * @param timestamp - Frame timestamp in milliseconds.\n */\n render(root: PibblNode, timestamp: number): void;\n /**\n * Requests future work from the owning scheduler. See {@link PibblBackendMount}.\n * @param updateParents - Whether ancestor compositions also need to be scheduled.\n */\n requestFrame(updateParents: boolean): void;\n /** Releases resources owned by this mounted object. See {@link PibblBackendMount}. */\n dispose(): void;\n}\n\n/**\n * Version-coupled rendering backend lifecycle used by official integrations.\n *\n * @see {@link PibblBackendToken}\n * @see {@link PibblBackendFrameInput}\n * @see {@link PibblBackendFrame}\n * @see {@link PibblBackendPrimitiveInput}\n * @see {@link PibblNodeInput}\n * @see {@link PibblBackendMountOptions}\n */\nexport interface PibblBackendDriver<E> {\n /** Identity token distinguishing this backend driver. See {@link PibblBackendToken}. */\n readonly token: PibblBackendToken;\n /** Name identifying this backend, emitter, or parameter. See {@link PibblBackendDriver}. */\n readonly name: string;\n /**\n * Begins backend work for one shared scheduler frame. See {@link PibblBackendFrame}.\n * @param input - Root surface, timestamp, and logical dimensions for this render. See\n * {@link PibblBackendFrameInput} .\n * @returns Frame state, or undefined when no frame should be rendered. See\n * {@link PibblBackendFrame} .\n */\n beginFrame(input: PibblBackendFrameInput): PibblBackendFrame<E> | undefined;\n /**\n * Enters a component's backend evaluation scope. See {@link PibblBackendDriver}.\n * @param frame - Frame whose component environment should become active. See\n * {@link PibblBackendFrame} .\n * @returns A cleanup function restoring the previous environment.\n */\n enterComponent(frame: PibblBackendFrame<E>): () => void;\n /**\n * Runs a primitive's drawing program in the current backend frame. See {@link PibblBackendDriver}\n * .\n * @param frame - Active backend frame. See {@link PibblBackendFrame}.\n * @param input - Primitive descriptor and resolved rendering inputs. See\n * {@link PibblBackendPrimitiveInput} .\n * @param runProgram - Runtime callback used to invoke the primitive program. See\n * {@link PibblNodeInput} .\n */\n runPrimitive(\n frame: PibblBackendFrame<E>,\n input: PibblBackendPrimitiveInput,\n runProgram: (invoke: () => PibblNodeInput | void) => void,\n ): void;\n /**\n * Completes the backend frame and its pending composition work. See {@link PibblBackendDriver}.\n * @param frame - Frame returned by beginFrame. See {@link PibblBackendFrame}.\n * @param success - Whether traversal completed successfully.\n */\n finishFrame(frame: PibblBackendFrame<E>, success: boolean): void;\n /** Releases resources owned by this mounted object. See {@link PibblBackendDriver}. */\n dispose(): void;\n}\n\n/**\n * Canvas, configuration, and ownership inputs used to create a backend mount.\n *\n * @see {@link Canvas}\n * @see {@link PibblBackendDriver}\n * @see {@link mountBackendPibbl}\n */\nexport interface PibblBackendMountOptions<E> {\n /** Owning parent runtime instance. See {@link Canvas}. */\n readonly parent: Canvas;\n /** Canvas width in logical units. See {@link PibblBackendMountOptions}. */\n readonly logicalWidth: number;\n /** Canvas height in logical units. See {@link PibblBackendMountOptions}. */\n readonly logicalHeight: number;\n /** Backend driver responsible for this mount. See {@link PibblBackendDriver}. */\n readonly driver: PibblBackendDriver<E>;\n}\n\n/**\n * Backend target registration options with logical interaction geometry.\n *\n * @see {@link useBackendEventTarget}\n */\nexport interface PibblBackendEventTargetOptions extends PibblEventFocusOptions {\n /**\n * Cursor shown while this target owns pointer presentation. See\n * {@link PibblBackendEventTargetOptions}.\n */\n readonly cursor?: string;\n /** Defers backend-owned focus geometry until its visual generation commits. */\n readonly deferKeyboardNavigationGeometry?: boolean;\n}\n\n/**\n * Context supplied when resolving nested content through a backend.\n *\n * @see {@link PibblBackendMount}\n * @see {@link PibblHitTestOutput}\n * @see {@link registerNestedInteractionResolver}\n */\nexport interface PibblNestedResolverInput {\n /** Nested child content to resolve. See {@link PibblBackendMount}. */\n readonly child: PibblBackendMount;\n /** Logical region constraining the content or query. See {@link PibblNestedResolverInput}. */\n readonly bounds: Path2D;\n /** Whether this content participates in pointer targeting. See {@link PibblNestedResolverInput}. */\n readonly pointerEvents: 'auto' | 'none';\n /**\n * Resolves nested content in the current local coordinate system. See\n * {@link PibblNestedResolverInput}.\n * @param localX - Horizontal position in resolver-local coordinates.\n * @param localY - Vertical position in resolver-local coordinates.\n * @param output - Mutable hit-test result to populate. See {@link PibblHitTestOutput}.\n */\n resolveLocal(localX: number, localY: number, output: PibblHitTestOutput): void;\n}\n\n/** @internal */\nexport function backendMismatchError(\n componentName: string,\n required: PibblBackendToken,\n active: PibblBackendDriver<unknown>,\n source?: PibblElementSource,\n): Error {\n const requiredName = getBackendTokenName(required);\n const prefix = `${componentName} requires the ${requiredName} backend and ` +\n `cannot render in the ${active.name} root.`;\n return new Error(withJSXSource(prefix, source));\n}\n\nfunction withJSXSource(message: string, source?: PibblElementSource): string {\n return source ?\n `${message} JSX source: ${source.fileName}:${source.lineNumber}:${source.columnNumber}.` :\n message;\n}\n\nexport type { PibblEventHandlers };\n"],
5
+ "mappings": "AAuCA,MAAM,eAAe,oBAAI,QAAmC;AAUrD,SAAS,mBAAmB,MAAiC;AAClE,MAAI,CAAC,KAAK,KAAK,GAAG;AAChB,UAAM,IAAI,MAAM,uCAAuC;AAAA,EACzD;AACA,QAAM,QAAQ,OAAO,OAAO,CAAC,CAAC;AAC9B,eAAa,IAAI,OAAO,IAAI;AAC5B,SAAO;AACT;AAGO,SAAS,oBAAoB,OAAkC;AACpE,SAAO,aAAa,IAAI,KAAK,KAAK;AACpC;AAiUO,SAAS,qBACd,eACA,UACA,QACA,QACO;AACP,QAAM,eAAe,oBAAoB,QAAQ;AACjD,QAAM,SAAS,GAAG,aAAa,iBAAiB,YAAY,qCAClC,OAAO,IAAI;AACrC,SAAO,IAAI,MAAM,cAAc,QAAQ,MAAM,CAAC;AAChD;AAEA,SAAS,cAAc,SAAiB,QAAqC;AAC3E,SAAO,SACH,GAAG,OAAO,gBAAgB,OAAO,QAAQ,IAAI,OAAO,UAAU,IAAI,OAAO,YAAY,MACvF;AACJ;",
6
6
  "names": []
7
7
  }
@@ -10,7 +10,8 @@ function arcBounds(cx, cy, radius, sweep) {
10
10
  };
11
11
  }
12
12
  const angles = [sweep.startAngle, sweep.endAngle];
13
- for (const cardinal of [0, Math.PI / 2, Math.PI, Math.PI * 1.5]) {
13
+ for (let cardinalIndex = 0; cardinalIndex < 4; cardinalIndex++) {
14
+ const cardinal = cardinalIndex * (Math.PI / 2);
14
15
  if (containsAngle(sweep, cardinal)) angles.push(cardinal);
15
16
  }
16
17
  const xs = angles.map((angle) => cx + radius * Math.cos(angle));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/components/arc-geometry.ts"],
4
- "sourcesContent": ["import type { LayoutBox } from \"../layout/types.js\";\nimport type { CircularSweep } from \"../geometry/circular-sweep.js\";\n\nconst fullTurn = Math.PI * 2;\n\nexport function arcBounds(\n cx: number,\n cy: number,\n radius: number,\n sweep: Readonly<CircularSweep>,\n): LayoutBox | undefined {\n if (radius <= 0 || sweep.sweep === 0) return undefined;\n if (sweep.fullCircle) {\n return {\n x: cx - radius,\n y: cy - radius,\n width: radius * 2,\n height: radius * 2,\n };\n }\n\n const angles = [sweep.startAngle, sweep.endAngle];\n for (const cardinal of [0, Math.PI / 2, Math.PI, Math.PI * 1.5]) {\n if (containsAngle(sweep, cardinal)) angles.push(cardinal);\n }\n const xs = angles.map((angle) => cx + radius * Math.cos(angle));\n const ys = angles.map((angle) => cy + radius * Math.sin(angle));\n const left = Math.min(...xs);\n const right = Math.max(...xs);\n const top = Math.min(...ys);\n const bottom = Math.max(...ys);\n return { x: left, y: top, width: right - left, height: bottom - top };\n}\n\nexport function wedgeBounds(\n cx: number,\n cy: number,\n radius: number,\n sweep: Readonly<CircularSweep>,\n): LayoutBox | undefined {\n const bounds = arcBounds(cx, cy, radius, sweep);\n if (!bounds || sweep.fullCircle) return bounds;\n const left = Math.min(bounds.x, cx);\n const right = Math.max(bounds.x + bounds.width, cx);\n const top = Math.min(bounds.y, cy);\n const bottom = Math.max(bounds.y + bounds.height, cy);\n return { x: left, y: top, width: right - left, height: bottom - top };\n}\n\nfunction containsAngle(sweep: Readonly<CircularSweep>, angle: number): boolean {\n const distance = sweep.counterclockwise\n ? positiveModulo(sweep.startAngle - angle, fullTurn)\n : positiveModulo(angle - sweep.startAngle, fullTurn);\n return distance <= Math.abs(sweep.sweep);\n}\n\nfunction positiveModulo(value: number, divisor: number): number {\n const result = value % divisor;\n if (result === 0) return 0;\n return result < 0 ? result + divisor : result;\n}\n"],
5
- "mappings": "AAGA,MAAM,WAAW,KAAK,KAAK;AAEpB,SAAS,UACd,IACA,IACA,QACA,OACuB;AACvB,MAAI,UAAU,KAAK,MAAM,UAAU,EAAG,QAAO;AAC7C,MAAI,MAAM,YAAY;AACpB,WAAO;AAAA,MACL,GAAG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AAM,aAAa,OAAO,QAAQ,IACjD,eAAe,QAAQ,MAAM,YAAY,QAAQ;AACrD,SAAO,YAAY,KAAK,IAAI,MAAM,KAAK;AACzC;AAEA,SAAS,eAAe,OAAe,SAAyB;AAC9D,QAAM,SAAS,QAAQ;AACvB,MAAI,WAAW,EAAG,QAAO;AACzB,SAAO,SAAS,IAAI,SAAS,UAAU;AACzC;",
4
+ "sourcesContent": ["import type { LayoutBox } from \"../layout/types.js\";\nimport type { CircularSweep } from \"../geometry/circular-sweep.js\";\n\nconst fullTurn = Math.PI * 2;\n\nexport function arcBounds(\n cx: number,\n cy: number,\n radius: number,\n sweep: Readonly<CircularSweep>,\n): LayoutBox | undefined {\n if (radius <= 0 || sweep.sweep === 0) return undefined;\n if (sweep.fullCircle) {\n return {\n x: cx - radius,\n y: cy - radius,\n width: radius * 2,\n height: radius * 2,\n };\n }\n\n const angles = [sweep.startAngle, sweep.endAngle];\n for (let cardinalIndex = 0; cardinalIndex < 4; cardinalIndex++) {\n const cardinal = cardinalIndex * (Math.PI / 2);\n if (containsAngle(sweep, cardinal)) angles.push(cardinal);\n }\n const xs = angles.map((angle) => cx + radius * Math.cos(angle));\n const ys = angles.map((angle) => cy + radius * Math.sin(angle));\n const left = Math.min(...xs);\n const right = Math.max(...xs);\n const top = Math.min(...ys);\n const bottom = Math.max(...ys);\n return { x: left, y: top, width: right - left, height: bottom - top };\n}\n\nexport function wedgeBounds(\n cx: number,\n cy: number,\n radius: number,\n sweep: Readonly<CircularSweep>,\n): LayoutBox | undefined {\n const bounds = arcBounds(cx, cy, radius, sweep);\n if (!bounds || sweep.fullCircle) return bounds;\n const left = Math.min(bounds.x, cx);\n const right = Math.max(bounds.x + bounds.width, cx);\n const top = Math.min(bounds.y, cy);\n const bottom = Math.max(bounds.y + bounds.height, cy);\n return { x: left, y: top, width: right - left, height: bottom - top };\n}\n\nfunction containsAngle(sweep: Readonly<CircularSweep>, angle: number): boolean {\n const distance = sweep.counterclockwise\n ? positiveModulo(sweep.startAngle - angle, fullTurn)\n : positiveModulo(angle - sweep.startAngle, fullTurn);\n return distance <= Math.abs(sweep.sweep);\n}\n\nfunction positiveModulo(value: number, divisor: number): number {\n const result = value % divisor;\n if (result === 0) return 0;\n return result < 0 ? result + divisor : result;\n}\n"],
5
+ "mappings": "AAGA,MAAM,WAAW,KAAK,KAAK;AAEpB,SAAS,UACd,IACA,IACA,QACA,OACuB;AACvB,MAAI,UAAU,KAAK,MAAM,UAAU,EAAG,QAAO;AAC7C,MAAI,MAAM,YAAY;AACpB,WAAO;AAAA,MACL,GAAG,KAAK;AAAA,MACR,GAAG,KAAK;AAAA,MACR,OAAO,SAAS;AAAA,MAChB,QAAQ,SAAS;AAAA,IACnB;AAAA,EACF;AAEA,QAAM,SAAS,CAAC,MAAM,YAAY,MAAM,QAAQ;AAChD,WAAS,gBAAgB,GAAG,gBAAgB,GAAG,iBAAiB;AAC9D,UAAM,WAAW,iBAAiB,KAAK,KAAK;AAC5C,QAAI,cAAc,OAAO,QAAQ,EAAG,QAAO,KAAK,QAAQ;AAAA,EAC1D;AACA,QAAM,KAAK,OAAO,IAAI,CAAC,UAAU,KAAK,SAAS,KAAK,IAAI,KAAK,CAAC;AAC9D,QAAM,KAAK,OAAO,IAAI,CAAC,UAAU,KAAK,SAAS,KAAK,IAAI,KAAK,CAAC;AAC9D,QAAM,OAAO,KAAK,IAAI,GAAG,EAAE;AAC3B,QAAM,QAAQ,KAAK,IAAI,GAAG,EAAE;AAC5B,QAAM,MAAM,KAAK,IAAI,GAAG,EAAE;AAC1B,QAAM,SAAS,KAAK,IAAI,GAAG,EAAE;AAC7B,SAAO,EAAE,GAAG,MAAM,GAAG,KAAK,OAAO,QAAQ,MAAM,QAAQ,SAAS,IAAI;AACtE;AAEO,SAAS,YACd,IACA,IACA,QACA,OACuB;AACvB,QAAM,SAAS,UAAU,IAAI,IAAI,QAAQ,KAAK;AAC9C,MAAI,CAAC,UAAU,MAAM,WAAY,QAAO;AACxC,QAAM,OAAO,KAAK,IAAI,OAAO,GAAG,EAAE;AAClC,QAAM,QAAQ,KAAK,IAAI,OAAO,IAAI,OAAO,OAAO,EAAE;AAClD,QAAM,MAAM,KAAK,IAAI,OAAO,GAAG,EAAE;AACjC,QAAM,SAAS,KAAK,IAAI,OAAO,IAAI,OAAO,QAAQ,EAAE;AACpD,SAAO,EAAE,GAAG,MAAM,GAAG,KAAK,OAAO,QAAQ,MAAM,QAAQ,SAAS,IAAI;AACtE;AAEA,SAAS,cAAc,OAAgC,OAAwB;AAC7E,QAAM,WAAW,MAAM,mBACnB,eAAe,MAAM,aAAa,OAAO,QAAQ,IACjD,eAAe,QAAQ,MAAM,YAAY,QAAQ;AACrD,SAAO,YAAY,KAAK,IAAI,MAAM,KAAK;AACzC;AAEA,SAAS,eAAe,OAAe,SAAyB;AAC9D,QAAM,SAAS,QAAQ;AACvB,MAAI,WAAW,EAAG,QAAO;AACzB,SAAO,SAAS,IAAI,SAAS,UAAU;AACzC;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ import { registerContentsTransform } from "../layout/participation.js";
1
2
  import { definePrimitive } from "../define-primitive.js";
2
3
  import {
3
4
  createGroupTransform,
@@ -18,6 +19,7 @@ const Group = definePrimitive(renderGroup, {
18
19
  setPrimitivePresentation(Group, (style) => ({
19
20
  transform: createGroupTransform(style)
20
21
  }));
22
+ registerContentsTransform(Group);
21
23
  export {
22
24
  Group
23
25
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/components/g.ts"],
4
- "sourcesContent": ["import type { PibblDragHandleStyle } from '../manipulation/handles.js';\nimport type { HtmlBoxStyle } from '../html/types.js';\nimport { definePrimitive } from '../define-primitive.js';\nimport { PibblNodeInput, SystemStyle } from '../types.js';\nimport type { PibblPhysics2DPropExtension } from '../types.js';\nimport {\n createGroupTransform,\n setPrimitivePresentation,\n} from '../primitive-presentation.js';\nimport { stripLayoutParticipation } from '../style/resolve-built-in.js';\nimport {\n type PibblStructuralEventProps,\n wireStructuralEvents,\n} from './structural-events.js';\nimport type {\n BoxStyle,\n LayoutItemStyle,\n ResolvedDrawingStyle,\n} from '../style/types.js';\n\n/**\n * Authored inputs for Group, including the declared data and presentation options.\n *\n * @see {@link PibblPhysics2DPropExtension}\n * @see {@link PibblNodeInput}\n * @see {@link Group}\n */\nexport interface GroupProps extends PibblStructuralEventProps, PibblPhysics2DPropExtension {\n /** Descendant content or the callback that supplies it. See {@link PibblNodeInput}. */\n children: PibblNodeInput;\n}\n\n/**\n * Transforms, layout participation, and shared style properties for Group.\n *\n * @see {@link SystemStyle}\n * @see {@link BoxStyle}\n * @see {@link LayoutItemStyle}\n * @see {@link Group}\n * @see {@link PibblDragHandleStyle}\n * @see {@link HtmlBoxStyle}\n */\nexport interface GStyle extends SystemStyle, BoxStyle, LayoutItemStyle {\n /** Horizontal scale factor. See {@link GStyle}. */\n scaleX?: number;\n /** Vertical scale factor. See {@link GStyle}. */\n scaleY?: number;\n /** Clockwise rotation in degrees. */\n rotationDegrees?: number;\n /** Point around which the rotation is applied. See {@link GStyle}. */\n rotationOrigin?: [number, number];\n /** Horizontal translation in the current logical coordinate system. See {@link GStyle}. */\n translateX?: number;\n /** Vertical translation in the current logical coordinate system. See {@link GStyle}. */\n translateY?: number;\n /** Horizontal skew angle in degrees. */\n skewX?: number;\n /** Vertical skew angle in degrees. */\n skewY?: number;\n}\n\ntype ResolvedGStyle = ResolvedDrawingStyle<GStyle>;\n\nfunction renderGroup(\n props: GroupProps,\n) {\n wireStructuralEvents(props);\n return props.children;\n}\n\n/**\n * Describes a transformation group for JSX or createElement authoring.\n *\n * @param props - Authored component inputs, supplied through JSX or createElement. See the linked\n * props and style types.\n * @throws When called directly; Pibbl mounts this component through JSX or createElement.\n *\n * @see {@link GroupProps}\n * @see {@link GStyle}\n */\nexport const Group = definePrimitive<\n GroupProps,\n GStyle,\n GStyle,\n ResolvedGStyle\n>(renderGroup, {\n childInput: 'structural',\n resolveStyle: style => stripLayoutParticipation(style) as ResolvedGStyle,\n});\n\nsetPrimitivePresentation<ResolvedGStyle>(Group, style => ({\n transform: createGroupTransform(style),\n}));\n"],
5
- "mappings": "AAEA,SAAS,uBAAuB;AAGhC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,gCAAgC;AACzC;AAAA,EAEE;AAAA,OACK;AAkDP,SAAS,YACP,OACA;AACA,uBAAqB,KAAK;AAC1B,SAAO,MAAM;AACf;AAYO,MAAM,QAAQ,gBAKnB,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc,WAAS,yBAAyB,KAAK;AACvD,CAAC;AAED,yBAAyC,OAAO,YAAU;AAAA,EACxD,WAAW,qBAAqB,KAAK;AACvC,EAAE;",
4
+ "sourcesContent": ["import { registerContentsTransform } from '../layout/participation.js';\nimport type { PibblDragHandleStyle } from '../manipulation/handles.js';\nimport type { HtmlBoxStyle } from '../html/types.js';\nimport { definePrimitive } from '../define-primitive.js';\nimport { PibblNodeInput, SystemStyle } from '../types.js';\nimport type { PibblPhysics2DPropExtension } from '../types.js';\nimport {\n createGroupTransform,\n setPrimitivePresentation,\n} from '../primitive-presentation.js';\nimport { stripLayoutParticipation } from '../style/resolve-built-in.js';\nimport {\n type PibblStructuralEventProps,\n wireStructuralEvents,\n} from './structural-events.js';\nimport type {\n BoxStyle,\n LayoutItemStyle,\n ResolvedDrawingStyle,\n} from '../style/types.js';\n\n/**\n * Authored inputs for Group, including the declared data and presentation options.\n *\n * @see {@link PibblPhysics2DPropExtension}\n * @see {@link PibblNodeInput}\n * @see {@link Group}\n */\nexport interface GroupProps extends PibblStructuralEventProps, PibblPhysics2DPropExtension {\n /** Descendant content or the callback that supplies it. See {@link PibblNodeInput}. */\n children: PibblNodeInput;\n}\n\n/**\n * Transforms, layout participation, and shared style properties for Group.\n *\n * @see {@link SystemStyle}\n * @see {@link BoxStyle}\n * @see {@link LayoutItemStyle}\n * @see {@link Group}\n * @see {@link PibblDragHandleStyle}\n * @see {@link HtmlBoxStyle}\n */\nexport interface GStyle extends SystemStyle, BoxStyle, LayoutItemStyle {\n /** Horizontal scale factor. See {@link GStyle}. */\n scaleX?: number;\n /** Vertical scale factor. See {@link GStyle}. */\n scaleY?: number;\n /** Clockwise rotation in degrees. */\n rotationDegrees?: number;\n /** Point around which the rotation is applied. See {@link GStyle}. */\n rotationOrigin?: [number, number];\n /** Horizontal translation in the current logical coordinate system. See {@link GStyle}. */\n translateX?: number;\n /** Vertical translation in the current logical coordinate system. See {@link GStyle}. */\n translateY?: number;\n /** Horizontal skew angle in degrees. */\n skewX?: number;\n /** Vertical skew angle in degrees. */\n skewY?: number;\n}\n\ntype ResolvedGStyle = ResolvedDrawingStyle<GStyle>;\n\nfunction renderGroup(\n props: GroupProps,\n) {\n wireStructuralEvents(props);\n return props.children;\n}\n\n/**\n * Describes a transformation group for JSX or createElement authoring.\n *\n * @param props - Authored component inputs, supplied through JSX or createElement. See the linked\n * props and style types.\n * @throws When called directly; Pibbl mounts this component through JSX or createElement.\n *\n * @see {@link GroupProps}\n * @see {@link GStyle}\n */\nexport const Group = definePrimitive<\n GroupProps,\n GStyle,\n GStyle,\n ResolvedGStyle\n>(renderGroup, {\n childInput: 'structural',\n resolveStyle: style => stripLayoutParticipation(style) as ResolvedGStyle,\n});\n\nsetPrimitivePresentation<ResolvedGStyle>(Group, style => ({\n transform: createGroupTransform(style),\n}));\n\nregisterContentsTransform(Group);\n"],
5
+ "mappings": "AAAA,SAAS,iCAAiC;AAG1C,SAAS,uBAAuB;AAGhC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,gCAAgC;AACzC;AAAA,EAEE;AAAA,OACK;AAkDP,SAAS,YACP,OACA;AACA,uBAAqB,KAAK;AAC1B,SAAO,MAAM;AACf;AAYO,MAAM,QAAQ,gBAKnB,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc,WAAS,yBAAyB,KAAK;AACvD,CAAC;AAED,yBAAyC,OAAO,YAAU;AAAA,EACxD,WAAW,qBAAqB,KAAK;AACvC,EAAE;AAEF,0BAA0B,KAAK;",
6
6
  "names": []
7
7
  }
@@ -13,7 +13,7 @@ function renderHtmlBox(props, style, ctx) {
13
13
  let slot = refs.refs[0];
14
14
  if (!slot || slot.disposed) {
15
15
  if (typeof props.mount !== "function") throw new TypeError("HtmlBox mount must be a function.");
16
- slot = { owner, mount: props.mount, disposed: false, region: { identity: {}, owner, content: void 0, rootBounds: void 0, active: true } };
16
+ slot = { component: refs, owner, mount: props.mount, disposed: false, region: { identity: {}, owner, content: void 0, rootBounds: void 0, active: true } };
17
17
  const stable = slot;
18
18
  stable.region = { ...stable.region, onFocusSnapshot(snapshot) {
19
19
  queueMicrotask(() => {
@@ -27,6 +27,7 @@ function renderHtmlBox(props, style, ctx) {
27
27
  if (!Number.isFinite(opacity) || opacity < 0 || opacity > 1) throw new RangeError("HtmlBox opacity must be between 0 and 1.");
28
28
  service.register({
29
29
  slot,
30
+ handlers: props,
30
31
  data: props.data,
31
32
  matrix: getCurrentWorldTransform(),
32
33
  clips: snapshotClips(GLOBAL_STATE.clippingStack),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/components/html-box.ts"],
4
- "sourcesContent": ["import type { HtmlMountCallback } from '../html/types.js';\nimport type { ResolvedDrawingStyle } from '../style/types.js';\nimport { definePrimitive } from '../define-primitive.js';\nimport { GLOBAL_STATE } from '../global-state.js';\nimport { resolveBox } from '../layout/box.js';\nimport type { LayoutBox } from '../layout/types.js';\nimport { createGroupTransform, setPrimitivePresentation } from '../primitive-presentation.js';\nimport { getCurrentWorldTransform } from '../render-target.js';\nimport { registerOpaquePrimitiveProps } from '../element/metadata.js';\nimport { requireHtmlService, snapshotClips } from '../html/html-service.js';\nimport type { HtmlBoxProps, HtmlBoxSlot, HtmlBoxStyle } from '../html/types.js';\nimport type { PibblRenderResult, PrimitiveInput, RenderingContext2D } from '../types.js';\nimport { stripLayoutParticipation } from '../style/resolve-built-in.js';\n\ntype Resolved = ResolvedDrawingStyle<HtmlBoxStyle> & {\n borderBox: Readonly<LayoutBox>; contentBox: Readonly<LayoutBox>; overflow: 'visible' | 'clip';\n};\n\nfunction renderHtmlBox(props: HtmlBoxProps<unknown>, style: Readonly<Resolved>, ctx: RenderingContext2D): void {\n const refs = GLOBAL_STATE.componentRefs!;\n const owner = GLOBAL_STATE.currentPibblInstance!;\n const service = requireHtmlService(owner);\n let slot = refs.refs[0] as HtmlBoxSlot | undefined;\n if (!slot || slot.disposed) {\n if (typeof props.mount !== 'function') throw new TypeError('HtmlBox mount must be a function.');\n slot = { owner, mount: props.mount, disposed: false, region: { identity: {}, owner, content: undefined, rootBounds: undefined, active: true } };\n const stable = slot;\n stable.region = { ...stable.region, onFocusSnapshot(snapshot) {\n queueMicrotask(() => { if (!stable.disposed) stable.callback?.(snapshot); });\n } };\n refs.refs[0] = slot;\n refs.teardowns.add(() => service.release(stable));\n }\n const opacity = style.opacity ?? 1;\n if (!Number.isFinite(opacity) || opacity < 0 || opacity > 1) throw new RangeError('HtmlBox opacity must be between 0 and 1.');\n service.register({ slot, data: props.data, matrix: getCurrentWorldTransform(),\n clips: snapshotClips(GLOBAL_STATE.clippingStack), border: style.borderBox, content: style.contentBox,\n opacity: ctx.globalAlpha * opacity, interactive: props.pointerEvents !== 'none', overflow: style.overflow ?? 'clip', onFocusChange: props.onFocusChange });\n}\n\nconst primitive = definePrimitive<HtmlBoxProps<unknown>, HtmlBoxStyle, HtmlBoxStyle, Resolved>(renderHtmlBox, {\n resolveStyle(style, context) {\n const box = resolveBox({ ...style, width: style.width === undefined || style.width === 'auto' ? context.allocation.width : style.width,\n height: style.height === undefined || style.height === 'auto' ? context.allocation.height : style.height }, context.constraints, { component: 'HtmlBox' });\n return { ...stripLayoutParticipation(style), ...box, overflow: style.overflow ?? 'clip' } as Resolved;\n },\n});\n\nregisterOpaquePrimitiveProps(primitive, ['data']);\nsetPrimitivePresentation<Resolved>(primitive, style => ({ transform: createGroupTransform(style) }));\n\ntype HtmlBoxInput<Props> = Omit<PrimitiveInput<HtmlBoxProps<Props>, HtmlBoxStyle>, 'data' | 'mount'> & Pick<HtmlBoxProps<Props>, 'data' | 'mount'>;\ntype HtmlBoxComponent = {\n <Props>(props: HtmlBoxInput<Props>): PibblRenderResult;\n};\n/**\n * A persistent native HTML box projected into Pibbl layout, transforms and clips.\n *\n * @see {@link HtmlBoxProps}\n * @see {@link HtmlBoxStyle}\n * @see {@link HtmlMountCallback}\n */\nexport const HtmlBox = primitive as HtmlBoxComponent;\n"],
5
- "mappings": "AAEA,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAE3B,SAAS,sBAAsB,gCAAgC;AAC/D,SAAS,gCAAgC;AACzC,SAAS,oCAAoC;AAC7C,SAAS,oBAAoB,qBAAqB;AAGlD,SAAS,gCAAgC;AAMzC,SAAS,cAAc,OAA8B,OAA2B,KAA+B;AAC7G,QAAM,OAAO,aAAa;AAC1B,QAAM,QAAQ,aAAa;AAC3B,QAAM,UAAU,mBAAmB,KAAK;AACxC,MAAI,OAAO,KAAK,KAAK,CAAC;AACtB,MAAI,CAAC,QAAQ,KAAK,UAAU;AAC1B,QAAI,OAAO,MAAM,UAAU,WAAY,OAAM,IAAI,UAAU,mCAAmC;AAC9F,WAAO,EAAE,OAAO,OAAO,MAAM,OAAO,UAAU,OAAO,QAAQ,EAAE,UAAU,CAAC,GAAG,OAAO,SAAS,QAAW,YAAY,QAAW,QAAQ,KAAK,EAAE;AAC9I,UAAM,SAAS;AACf,WAAO,SAAS,EAAE,GAAG,OAAO,QAAQ,gBAAgB,UAAU;AAC5D,qBAAe,MAAM;AAAE,YAAI,CAAC,OAAO,SAAU,QAAO,WAAW,QAAQ;AAAA,MAAG,CAAC;AAAA,IAC7E,EAAE;AACF,SAAK,KAAK,CAAC,IAAI;AACf,SAAK,UAAU,IAAI,MAAM,QAAQ,QAAQ,MAAM,CAAC;AAAA,EAClD;AACA,QAAM,UAAU,MAAM,WAAW;AACjC,MAAI,CAAC,OAAO,SAAS,OAAO,KAAK,UAAU,KAAK,UAAU,EAAG,OAAM,IAAI,WAAW,0CAA0C;AAC5H,UAAQ,SAAS;AAAA,IAAE;AAAA,IAAM,MAAM,MAAM;AAAA,IAAM,QAAQ,yBAAyB;AAAA,IAC1E,OAAO,cAAc,aAAa,aAAa;AAAA,IAAG,QAAQ,MAAM;AAAA,IAAW,SAAS,MAAM;AAAA,IAC1F,SAAS,IAAI,cAAc;AAAA,IAAS,aAAa,MAAM,kBAAkB;AAAA,IAAQ,UAAU,MAAM,YAAY;AAAA,IAAQ,eAAe,MAAM;AAAA,EAAc,CAAC;AAC7J;AAEA,MAAM,YAAY,gBAA6E,eAAe;AAAA,EAC5G,aAAa,OAAO,SAAS;AAC3B,UAAM,MAAM,WAAW;AAAA,MAAE,GAAG;AAAA,MAAO,OAAO,MAAM,UAAU,UAAa,MAAM,UAAU,SAAS,QAAQ,WAAW,QAAQ,MAAM;AAAA,MAC/H,QAAQ,MAAM,WAAW,UAAa,MAAM,WAAW,SAAS,QAAQ,WAAW,SAAS,MAAM;AAAA,IAAO,GAAG,QAAQ,aAAa,EAAE,WAAW,UAAU,CAAC;AAC3J,WAAO,EAAE,GAAG,yBAAyB,KAAK,GAAG,GAAG,KAAK,UAAU,MAAM,YAAY,OAAO;AAAA,EAC1F;AACF,CAAC;AAED,6BAA6B,WAAW,CAAC,MAAM,CAAC;AAChD,yBAAmC,WAAW,YAAU,EAAE,WAAW,qBAAqB,KAAK,EAAE,EAAE;AAa5F,MAAM,UAAU;",
4
+ "sourcesContent": ["import type { HtmlMountCallback } from '../html/types.js';\nimport type { ResolvedDrawingStyle } from '../style/types.js';\nimport { definePrimitive } from '../define-primitive.js';\nimport { GLOBAL_STATE } from '../global-state.js';\nimport { resolveBox } from '../layout/box.js';\nimport type { LayoutBox } from '../layout/types.js';\nimport { createGroupTransform, setPrimitivePresentation } from '../primitive-presentation.js';\nimport { getCurrentWorldTransform } from '../render-target.js';\nimport { registerOpaquePrimitiveProps } from '../element/metadata.js';\nimport { requireHtmlService, snapshotClips } from '../html/html-service.js';\nimport type { HtmlBoxProps, HtmlBoxSlot, HtmlBoxStyle } from '../html/types.js';\nimport type { PibblRenderResult, PrimitiveInput, RenderingContext2D } from '../types.js';\nimport { stripLayoutParticipation } from '../style/resolve-built-in.js';\n\ntype Resolved = ResolvedDrawingStyle<HtmlBoxStyle> & {\n borderBox: Readonly<LayoutBox>; contentBox: Readonly<LayoutBox>; overflow: 'visible' | 'clip';\n};\n\nfunction renderHtmlBox(props: HtmlBoxProps<unknown>, style: Readonly<Resolved>, ctx: RenderingContext2D): void {\n const refs = GLOBAL_STATE.componentRefs!;\n const owner = GLOBAL_STATE.currentPibblInstance!;\n const service = requireHtmlService(owner);\n let slot = refs.refs[0] as HtmlBoxSlot | undefined;\n if (!slot || slot.disposed) {\n if (typeof props.mount !== 'function') throw new TypeError('HtmlBox mount must be a function.');\n slot = { component: refs, owner, mount: props.mount, disposed: false, region: { identity: {}, owner, content: undefined, rootBounds: undefined, active: true } };\n const stable = slot;\n stable.region = { ...stable.region, onFocusSnapshot(snapshot) {\n queueMicrotask(() => { if (!stable.disposed) stable.callback?.(snapshot); });\n } };\n refs.refs[0] = slot;\n refs.teardowns.add(() => service.release(stable));\n }\n const opacity = style.opacity ?? 1;\n if (!Number.isFinite(opacity) || opacity < 0 || opacity > 1) throw new RangeError('HtmlBox opacity must be between 0 and 1.');\n service.register({ slot, handlers: props, data: props.data, matrix: getCurrentWorldTransform(),\n clips: snapshotClips(GLOBAL_STATE.clippingStack), border: style.borderBox, content: style.contentBox,\n opacity: ctx.globalAlpha * opacity, interactive: props.pointerEvents !== 'none', overflow: style.overflow ?? 'clip', onFocusChange: props.onFocusChange });\n}\n\nconst primitive = definePrimitive<HtmlBoxProps<unknown>, HtmlBoxStyle, HtmlBoxStyle, Resolved>(renderHtmlBox, {\n resolveStyle(style, context) {\n const box = resolveBox({ ...style, width: style.width === undefined || style.width === 'auto' ? context.allocation.width : style.width,\n height: style.height === undefined || style.height === 'auto' ? context.allocation.height : style.height }, context.constraints, { component: 'HtmlBox' });\n return { ...stripLayoutParticipation(style), ...box, overflow: style.overflow ?? 'clip' } as Resolved;\n },\n});\n\nregisterOpaquePrimitiveProps(primitive, ['data']);\nsetPrimitivePresentation<Resolved>(primitive, style => ({ transform: createGroupTransform(style) }));\n\ntype HtmlBoxInput<Props> = Omit<PrimitiveInput<HtmlBoxProps<Props>, HtmlBoxStyle>, 'data' | 'mount'> & Pick<HtmlBoxProps<Props>, 'data' | 'mount'>;\ntype HtmlBoxComponent = {\n <Props>(props: HtmlBoxInput<Props>): PibblRenderResult;\n};\n/**\n * A persistent native HTML box projected into Pibbl layout, transforms and clips.\n *\n * @see {@link HtmlBoxProps}\n * @see {@link HtmlBoxStyle}\n * @see {@link HtmlMountCallback}\n */\nexport const HtmlBox = primitive as HtmlBoxComponent;\n"],
5
+ "mappings": "AAEA,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAE3B,SAAS,sBAAsB,gCAAgC;AAC/D,SAAS,gCAAgC;AACzC,SAAS,oCAAoC;AAC7C,SAAS,oBAAoB,qBAAqB;AAGlD,SAAS,gCAAgC;AAMzC,SAAS,cAAc,OAA8B,OAA2B,KAA+B;AAC7G,QAAM,OAAO,aAAa;AAC1B,QAAM,QAAQ,aAAa;AAC3B,QAAM,UAAU,mBAAmB,KAAK;AACxC,MAAI,OAAO,KAAK,KAAK,CAAC;AACtB,MAAI,CAAC,QAAQ,KAAK,UAAU;AAC1B,QAAI,OAAO,MAAM,UAAU,WAAY,OAAM,IAAI,UAAU,mCAAmC;AAC9F,WAAO,EAAE,WAAW,MAAM,OAAO,OAAO,MAAM,OAAO,UAAU,OAAO,QAAQ,EAAE,UAAU,CAAC,GAAG,OAAO,SAAS,QAAW,YAAY,QAAW,QAAQ,KAAK,EAAE;AAC/J,UAAM,SAAS;AACf,WAAO,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EAAE;AAa5F,MAAM,UAAU;",
6
6
  "names": []
7
7
  }
@@ -3,7 +3,7 @@ import { definePrimitive } from "../define-primitive.js";
3
3
  import { useRectPath } from "../hooks/use-rect-path.js";
4
4
  import { useReaction } from "../hooks/use-reaction.js";
5
5
  import { useSignal } from "../hooks/use-signal.js";
6
- import { resolveLength } from "../style/resolve-length.js";
6
+ import { resolveScalarSizingLength } from "../style/sizing-length.js";
7
7
  import {
8
8
  resolveOptionalLength,
9
9
  stripLayoutParticipation
@@ -129,13 +129,13 @@ function measureImage({
129
129
  return {
130
130
  status: "measured",
131
131
  size: {
132
- width: resolveLength(
132
+ width: resolveScalarSizingLength(
133
133
  style.width,
134
134
  constraints.maxWidth,
135
135
  "width",
136
136
  context
137
137
  ),
138
- height: resolveLength(
138
+ height: resolveScalarSizingLength(
139
139
  style.height,
140
140
  constraints.maxHeight,
141
141
  "height",