@pibbl/core 0.0.1 → 0.0.3-alpha.109.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (683) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.txt +81 -0
  3. package/dist/features/machines/animation.d.ts +64 -0
  4. package/dist/features/machines/animation.js +55 -0
  5. package/dist/features/machines/animation.js.map +7 -0
  6. package/dist/features/machines/animation.mjs +1 -0
  7. package/dist/features/machines/assign.d.ts +16 -0
  8. package/dist/features/machines/assign.js +15 -0
  9. package/dist/features/machines/assign.js.map +7 -0
  10. package/dist/features/machines/callback.d.ts +9 -0
  11. package/dist/features/machines/callback.js +7 -0
  12. package/dist/features/machines/callback.js.map +7 -0
  13. package/dist/features/machines/hook.d.ts +30 -0
  14. package/dist/features/machines/hook.js +37 -0
  15. package/dist/features/machines/hook.js.map +7 -0
  16. package/dist/features/machines/index.d.ts +6 -0
  17. package/dist/features/machines/index.js +12 -0
  18. package/dist/features/machines/index.js.map +7 -0
  19. package/dist/features/machines/index.mjs +1 -0
  20. package/dist/features/machines/runtime.d.ts +18 -0
  21. package/dist/features/machines/runtime.js +363 -0
  22. package/dist/features/machines/runtime.js.map +7 -0
  23. package/dist/features/machines/types.d.ts +164 -0
  24. package/dist/features/physics/2d-geometry.d.ts +3 -3
  25. package/dist/features/physics/2d-geometry.js.map +1 -1
  26. package/dist/features/physics/2d-testing.d.ts +1 -1
  27. package/dist/features/physics/2d-testing.js +2 -2
  28. package/dist/features/physics/2d-testing.js.map +2 -2
  29. package/dist/features/physics/2d.d.ts +115 -62
  30. package/dist/features/physics/2d.js +59 -28
  31. package/dist/features/physics/2d.js.map +2 -2
  32. package/dist/features/physics/lib/2d/canvas/components.js +25 -21
  33. package/dist/features/physics/lib/2d/canvas/components.js.map +2 -2
  34. package/dist/features/physics/lib/2d/canvas/presentation.js +1 -2
  35. package/dist/features/physics/lib/2d/canvas/presentation.js.map +2 -2
  36. package/dist/features/physics/lib/2d/collision/casts.js +4 -2
  37. package/dist/features/physics/lib/2d/collision/casts.js.map +2 -2
  38. package/dist/features/physics/lib/2d/query-types.d.ts +6 -0
  39. package/dist/features/physics/lib/2d/runtime/controller.d.ts +7 -6
  40. package/dist/features/physics/lib/2d/runtime/controller.js +1 -1
  41. package/dist/features/physics/lib/2d/runtime/controller.js.map +2 -2
  42. package/dist/features/physics/lib/2d/runtime/obstacles.js +9 -11
  43. package/dist/features/physics/lib/2d/runtime/obstacles.js.map +2 -2
  44. package/dist/features/physics/lib/2d/shapes.js +8 -9
  45. package/dist/features/physics/lib/2d/shapes.js.map +2 -2
  46. package/dist/features/physics/lib/2d/types.d.ts +8 -30
  47. package/dist/features/physics/lib/2d/world/queries.d.ts +7 -6
  48. package/dist/features/physics/lib/2d/world/queries.js.map +2 -2
  49. package/dist/features/physics/lib/2d/world/rapier.js +22 -26
  50. package/dist/features/physics/lib/2d/world/rapier.js.map +2 -2
  51. package/dist/features/sprites/formats/aseprite.d.ts +5 -0
  52. package/dist/features/sprites/formats/texture-packer.d.ts +5 -0
  53. package/dist/features/sprites/index.d.ts +6 -0
  54. package/dist/features/sprites/loader.d.ts +25 -0
  55. package/dist/features/sprites/loader.js +6 -3
  56. package/dist/features/sprites/loader.js.map +2 -2
  57. package/dist/features/sprites/model.d.ts +75 -0
  58. package/dist/features/sprites/sprite.d.ts +22 -0
  59. package/dist/features/textures/index.d.ts +12 -2
  60. package/dist/features/textures/index.js +33 -1
  61. package/dist/features/textures/index.js.map +2 -2
  62. package/dist/features/textures/lib/chemical-field.d.ts +56 -0
  63. package/dist/features/textures/lib/chemical-field.js +154 -0
  64. package/dist/features/textures/lib/chemical-field.js.map +7 -0
  65. package/dist/features/textures/lib/chemical-recipes.d.ts +119 -0
  66. package/dist/features/textures/lib/chemical-recipes.js +275 -0
  67. package/dist/features/textures/lib/chemical-recipes.js.map +7 -0
  68. package/dist/features/textures/lib/definitions.d.ts +3 -18
  69. package/dist/features/textures/lib/definitions.js +17 -24
  70. package/dist/features/textures/lib/definitions.js.map +2 -2
  71. package/dist/features/textures/lib/geometric-patterns.d.ts +149 -0
  72. package/dist/features/textures/lib/geometric-patterns.js +305 -0
  73. package/dist/features/textures/lib/geometric-patterns.js.map +7 -0
  74. package/dist/features/textures/lib/gray-scott.d.ts +55 -0
  75. package/dist/features/textures/lib/gray-scott.js +37 -0
  76. package/dist/features/textures/lib/gray-scott.js.map +7 -0
  77. package/dist/features/textures/lib/palette.js +1 -3
  78. package/dist/features/textures/lib/palette.js.map +2 -2
  79. package/dist/features/textures/lib/patterns.d.ts +123 -0
  80. package/dist/features/textures/lib/patterns.js +344 -0
  81. package/dist/features/textures/lib/patterns.js.map +7 -0
  82. package/dist/features/textures/lib/rain-drops.js +2 -1
  83. package/dist/features/textures/lib/rain-drops.js.map +2 -2
  84. package/dist/features/textures/lib/reaction-diffusion.d.ts +3 -2
  85. package/dist/features/textures/lib/reaction-diffusion.js +9 -20
  86. package/dist/features/textures/lib/reaction-diffusion.js.map +2 -2
  87. package/dist/features/textures/lib/simulation.d.ts +10 -4
  88. package/dist/features/textures/lib/simulation.js +23 -13
  89. package/dist/features/textures/lib/simulation.js.map +2 -2
  90. package/dist/features/textures/lib/wasm/electric.js +8 -1
  91. package/dist/features/textures/lib/wasm/electric.js.map +2 -2
  92. package/dist/features/textures/lib/water-surface.js +1 -3
  93. package/dist/features/textures/lib/water-surface.js.map +2 -2
  94. package/dist/features/viz/index.d.ts +92 -5
  95. package/dist/features/viz/index.js +202 -4
  96. package/dist/features/viz/index.js.map +2 -2
  97. package/dist/features/viz/inspection/bar.d.ts +79 -0
  98. package/dist/features/viz/inspection/bar.js +49 -0
  99. package/dist/features/viz/inspection/bar.js.map +7 -0
  100. package/dist/features/viz/inspection/candle.d.ts +156 -0
  101. package/dist/features/viz/inspection/candle.js +120 -0
  102. package/dist/features/viz/inspection/candle.js.map +7 -0
  103. package/dist/features/viz/inspection/capture-types.d.ts +65 -0
  104. package/dist/features/viz/inspection/capture.d.ts +16 -0
  105. package/dist/features/viz/inspection/capture.js +49 -0
  106. package/dist/features/viz/inspection/capture.js.map +7 -0
  107. package/dist/features/viz/inspection/handler.d.ts +36 -0
  108. package/dist/features/viz/inspection/handler.js +91 -0
  109. package/dist/features/viz/inspection/handler.js.map +7 -0
  110. package/dist/features/viz/inspection/ohlc-bar.d.ts +132 -0
  111. package/dist/features/viz/inspection/ohlc-bar.js +118 -0
  112. package/dist/features/viz/inspection/ohlc-bar.js.map +7 -0
  113. package/dist/features/viz/inspection/owned-ref.d.ts +16 -0
  114. package/dist/features/viz/inspection/owned-ref.js +99 -0
  115. package/dist/features/viz/inspection/owned-ref.js.map +7 -0
  116. package/dist/features/viz/inspection/painted-point.d.ts +22 -0
  117. package/dist/features/viz/inspection/painted-point.js +29 -0
  118. package/dist/features/viz/inspection/painted-point.js.map +7 -0
  119. package/dist/features/viz/inspection/queries.d.ts +100 -0
  120. package/dist/features/viz/inspection/queries.js +192 -0
  121. package/dist/features/viz/inspection/queries.js.map +7 -0
  122. package/dist/features/viz/inspection/query-types.d.ts +177 -0
  123. package/dist/features/viz/inspection/volume.d.ts +104 -0
  124. package/dist/features/viz/inspection/volume.js +95 -0
  125. package/dist/features/viz/inspection/volume.js.map +7 -0
  126. package/dist/features/viz/inspection.d.ts +19 -0
  127. package/dist/features/viz/inspection.js +54 -0
  128. package/dist/features/viz/inspection.js.map +7 -0
  129. package/dist/features/viz/inspection.mjs +1 -0
  130. package/dist/features/viz/lib/area-series.d.ts +62 -0
  131. package/dist/features/viz/lib/area-series.js +120 -0
  132. package/dist/features/viz/lib/area-series.js.map +7 -0
  133. package/dist/features/viz/lib/axis-labels.d.ts +2 -0
  134. package/dist/features/viz/lib/axis-labels.js +41 -0
  135. package/dist/features/viz/lib/axis-labels.js.map +7 -0
  136. package/dist/features/viz/lib/axis-title.d.ts +23 -0
  137. package/dist/features/viz/lib/axis-title.js +24 -0
  138. package/dist/features/viz/lib/axis-title.js.map +7 -0
  139. package/dist/features/viz/lib/axis.d.ts +1 -1
  140. package/dist/features/viz/lib/axis.js +50 -50
  141. package/dist/features/viz/lib/axis.js.map +2 -2
  142. package/dist/features/viz/lib/bar-scale.d.ts +7 -0
  143. package/dist/features/viz/lib/bar-scale.js +34 -0
  144. package/dist/features/viz/lib/bar-scale.js.map +7 -0
  145. package/dist/features/viz/lib/bar-series.d.ts +3 -1
  146. package/dist/features/viz/lib/bar-series.js +21 -5
  147. package/dist/features/viz/lib/bar-series.js.map +2 -2
  148. package/dist/features/viz/lib/baseline-series.d.ts +55 -0
  149. package/dist/features/viz/lib/baseline-series.js +136 -0
  150. package/dist/features/viz/lib/baseline-series.js.map +7 -0
  151. package/dist/features/viz/lib/candlestick-series.d.ts +62 -0
  152. package/dist/features/viz/lib/candlestick-series.js +150 -0
  153. package/dist/features/viz/lib/candlestick-series.js.map +7 -0
  154. package/dist/features/viz/lib/censored-point-series.d.ts +71 -0
  155. package/dist/features/viz/lib/censored-point-series.js +129 -0
  156. package/dist/features/viz/lib/censored-point-series.js.map +7 -0
  157. package/dist/features/viz/lib/chart-lines.d.ts +41 -0
  158. package/dist/features/viz/lib/chart-lines.js +32 -0
  159. package/dist/features/viz/lib/chart-lines.js.map +7 -0
  160. package/dist/features/viz/lib/color-context.d.ts +4 -0
  161. package/dist/features/viz/lib/color-context.js +41 -0
  162. package/dist/features/viz/lib/color-context.js.map +7 -0
  163. package/dist/features/viz/lib/color-math.d.ts +4 -0
  164. package/dist/features/viz/lib/color-math.js +31 -0
  165. package/dist/features/viz/lib/color-math.js.map +7 -0
  166. package/dist/features/viz/lib/color-types.d.ts +53 -0
  167. package/dist/features/viz/lib/curve-definition.d.ts +49 -0
  168. package/dist/features/viz/lib/curve-definition.js +142 -0
  169. package/dist/features/viz/lib/curve-definition.js.map +7 -0
  170. package/dist/features/viz/lib/diverging-color-scale.d.ts +11 -0
  171. package/dist/features/viz/lib/diverging-color-scale.js +51 -0
  172. package/dist/features/viz/lib/diverging-color-scale.js.map +7 -0
  173. package/dist/features/viz/lib/domain-navigation.d.ts +40 -0
  174. package/dist/features/viz/lib/domain-navigation.js +77 -0
  175. package/dist/features/viz/lib/domain-navigation.js.map +7 -0
  176. package/dist/features/viz/lib/editable-chart-elements.d.ts +178 -0
  177. package/dist/features/viz/lib/editable-chart-elements.js +733 -0
  178. package/dist/features/viz/lib/editable-chart-elements.js.map +7 -0
  179. package/dist/features/viz/lib/financial-aggregation.d.ts +127 -0
  180. package/dist/features/viz/lib/financial-aggregation.js +116 -0
  181. package/dist/features/viz/lib/financial-aggregation.js.map +7 -0
  182. package/dist/features/viz/lib/financial-autoscale.d.ts +64 -0
  183. package/dist/features/viz/lib/financial-autoscale.js +61 -0
  184. package/dist/features/viz/lib/financial-autoscale.js.map +7 -0
  185. package/dist/features/viz/lib/financial-comparison.d.ts +62 -0
  186. package/dist/features/viz/lib/financial-comparison.js +98 -0
  187. package/dist/features/viz/lib/financial-comparison.js.map +7 -0
  188. package/dist/features/viz/lib/financial-geometry.d.ts +77 -0
  189. package/dist/features/viz/lib/financial-geometry.js +67 -0
  190. package/dist/features/viz/lib/financial-geometry.js.map +7 -0
  191. package/dist/features/viz/lib/financial-indicators.d.ts +114 -0
  192. package/dist/features/viz/lib/financial-indicators.js +135 -0
  193. package/dist/features/viz/lib/financial-indicators.js.map +7 -0
  194. package/dist/features/viz/lib/financial-oscillators.d.ts +171 -0
  195. package/dist/features/viz/lib/financial-oscillators.js +265 -0
  196. package/dist/features/viz/lib/financial-oscillators.js.map +7 -0
  197. package/dist/features/viz/lib/graph/bipartite.d.ts +14 -0
  198. package/dist/features/viz/lib/graph/bipartite.js +250 -0
  199. package/dist/features/viz/lib/graph/bipartite.js.map +7 -0
  200. package/dist/features/viz/lib/graph/chord.d.ts +44 -0
  201. package/dist/features/viz/lib/graph/chord.js +348 -0
  202. package/dist/features/viz/lib/graph/chord.js.map +7 -0
  203. package/dist/features/viz/lib/graph/dependency.d.ts +26 -0
  204. package/dist/features/viz/lib/graph/dependency.js +140 -0
  205. package/dist/features/viz/lib/graph/dependency.js.map +7 -0
  206. package/dist/features/viz/lib/graph/force.d.ts +28 -0
  207. package/dist/features/viz/lib/graph/force.js +580 -0
  208. package/dist/features/viz/lib/graph/force.js.map +7 -0
  209. package/dist/features/viz/lib/graph/hierarchy.d.ts +21 -0
  210. package/dist/features/viz/lib/graph/hierarchy.js +112 -0
  211. package/dist/features/viz/lib/graph/hierarchy.js.map +7 -0
  212. package/dist/features/viz/lib/graph/icicle.d.ts +16 -0
  213. package/dist/features/viz/lib/graph/icicle.js +153 -0
  214. package/dist/features/viz/lib/graph/icicle.js.map +7 -0
  215. package/dist/features/viz/lib/graph/matrix.d.ts +30 -0
  216. package/dist/features/viz/lib/graph/matrix.js +243 -0
  217. package/dist/features/viz/lib/graph/matrix.js.map +7 -0
  218. package/dist/features/viz/lib/graph/neighborhood.d.ts +11 -0
  219. package/dist/features/viz/lib/graph/neighborhood.js +281 -0
  220. package/dist/features/viz/lib/graph/neighborhood.js.map +7 -0
  221. package/dist/features/viz/lib/graph/routes.d.ts +35 -0
  222. package/dist/features/viz/lib/graph/routes.js +101 -0
  223. package/dist/features/viz/lib/graph/routes.js.map +7 -0
  224. package/dist/features/viz/lib/graph/sankey.d.ts +44 -0
  225. package/dist/features/viz/lib/graph/sankey.js +341 -0
  226. package/dist/features/viz/lib/graph/sankey.js.map +7 -0
  227. package/dist/features/viz/lib/graph/shared.d.ts +59 -0
  228. package/dist/features/viz/lib/graph/shared.js +301 -0
  229. package/dist/features/viz/lib/graph/shared.js.map +7 -0
  230. package/dist/features/viz/lib/graph/tree.d.ts +11 -0
  231. package/dist/features/viz/lib/graph/tree.js +232 -0
  232. package/dist/features/viz/lib/graph/tree.js.map +7 -0
  233. package/dist/features/viz/lib/graph/treemap.d.ts +20 -0
  234. package/dist/features/viz/lib/graph/treemap.js +227 -0
  235. package/dist/features/viz/lib/graph/treemap.js.map +7 -0
  236. package/dist/features/viz/lib/graph/types.d.ts +1097 -0
  237. package/dist/features/viz/lib/hover-card.js +8 -9
  238. package/dist/features/viz/lib/hover-card.js.map +2 -2
  239. package/dist/features/viz/lib/hover-data.d.ts +1 -1
  240. package/dist/features/viz/lib/hover-data.js +6 -3
  241. package/dist/features/viz/lib/hover-data.js.map +2 -2
  242. package/dist/features/viz/lib/hover-types.d.ts +5 -5
  243. package/dist/features/viz/lib/interval-band-series.d.ts +49 -0
  244. package/dist/features/viz/lib/interval-band-series.js +136 -0
  245. package/dist/features/viz/lib/interval-band-series.js.map +7 -0
  246. package/dist/features/viz/lib/interval-diamond-series.d.ts +43 -0
  247. package/dist/features/viz/lib/interval-diamond-series.js +122 -0
  248. package/dist/features/viz/lib/interval-diamond-series.js.map +7 -0
  249. package/dist/features/viz/lib/interval-series.d.ts +79 -0
  250. package/dist/features/viz/lib/interval-series.js +158 -0
  251. package/dist/features/viz/lib/interval-series.js.map +7 -0
  252. package/dist/features/viz/lib/layout-pie.js +9 -13
  253. package/dist/features/viz/lib/layout-pie.js.map +2 -2
  254. package/dist/features/viz/lib/line-series.d.ts +1 -1
  255. package/dist/features/viz/lib/line-series.js +47 -28
  256. package/dist/features/viz/lib/line-series.js.map +2 -2
  257. package/dist/features/viz/lib/linear-scale-component.d.ts +7 -0
  258. package/dist/features/viz/lib/linear-scale-component.js +18 -0
  259. package/dist/features/viz/lib/linear-scale-component.js.map +7 -0
  260. package/dist/features/viz/lib/linear-scale.js +1 -1
  261. package/dist/features/viz/lib/linear-scale.js.map +2 -2
  262. package/dist/features/viz/lib/log-scale-component.d.ts +7 -0
  263. package/dist/features/viz/lib/log-scale-component.js +19 -0
  264. package/dist/features/viz/lib/log-scale-component.js.map +7 -0
  265. package/dist/features/viz/lib/log-scale.d.ts +2 -0
  266. package/dist/features/viz/lib/log-scale.js +53 -0
  267. package/dist/features/viz/lib/log-scale.js.map +7 -0
  268. package/dist/features/viz/lib/monotone-curve.d.ts +11 -0
  269. package/dist/features/viz/lib/monotone-curve.js +63 -0
  270. package/dist/features/viz/lib/monotone-curve.js.map +7 -0
  271. package/dist/features/viz/lib/nearest.d.ts +9 -9
  272. package/dist/features/viz/lib/nearest.js.map +1 -1
  273. package/dist/features/viz/lib/numeric-range-interpolation.d.ts +15 -0
  274. package/dist/features/viz/lib/numeric-range-interpolation.js +36 -0
  275. package/dist/features/viz/lib/numeric-range-interpolation.js.map +7 -0
  276. package/dist/features/viz/lib/numeric-ticks.d.ts +38 -0
  277. package/dist/features/viz/lib/numeric-ticks.js +54 -0
  278. package/dist/features/viz/lib/numeric-ticks.js.map +7 -0
  279. package/dist/features/viz/lib/ohlc-bar-series.d.ts +55 -0
  280. package/dist/features/viz/lib/ohlc-bar-series.js +168 -0
  281. package/dist/features/viz/lib/ohlc-bar-series.js.map +7 -0
  282. package/dist/features/viz/lib/paired-series.d.ts +44 -0
  283. package/dist/features/viz/lib/paired-series.js +93 -0
  284. package/dist/features/viz/lib/paired-series.js.map +7 -0
  285. package/dist/features/viz/lib/pie-layout.js +2 -1
  286. package/dist/features/viz/lib/pie-layout.js.map +2 -2
  287. package/dist/features/viz/lib/plot-series.js +11 -6
  288. package/dist/features/viz/lib/plot-series.js.map +2 -2
  289. package/dist/features/viz/lib/plot-types.d.ts +4 -3
  290. package/dist/features/viz/lib/point-scale-component.d.ts +7 -0
  291. package/dist/features/viz/lib/point-scale-component.js +19 -0
  292. package/dist/features/viz/lib/point-scale-component.js.map +7 -0
  293. package/dist/features/viz/lib/point-scale.d.ts +2 -0
  294. package/dist/features/viz/lib/point-scale.js +45 -0
  295. package/dist/features/viz/lib/point-scale.js.map +7 -0
  296. package/dist/features/viz/lib/point-series.d.ts +1 -1
  297. package/dist/features/viz/lib/point-series.js +36 -9
  298. package/dist/features/viz/lib/point-series.js.map +2 -2
  299. package/dist/features/viz/lib/point-types.d.ts +5 -2
  300. package/dist/features/viz/lib/reference-band.d.ts +16 -0
  301. package/dist/features/viz/lib/reference-band.js +30 -0
  302. package/dist/features/viz/lib/reference-band.js.map +7 -0
  303. package/dist/features/viz/lib/scale-adjust.js +9 -4
  304. package/dist/features/viz/lib/scale-adjust.js.map +2 -2
  305. package/dist/features/viz/lib/scale-context.d.ts +5 -4
  306. package/dist/features/viz/lib/scale-context.js +15 -11
  307. package/dist/features/viz/lib/scale-context.js.map +2 -2
  308. package/dist/features/viz/lib/scale-provider.d.ts +2 -0
  309. package/dist/features/viz/lib/scale-provider.js +13 -0
  310. package/dist/features/viz/lib/scale-provider.js.map +7 -0
  311. package/dist/features/viz/lib/scale-ticks.d.ts +5 -0
  312. package/dist/features/viz/lib/scale-ticks.js +64 -0
  313. package/dist/features/viz/lib/scale-ticks.js.map +7 -0
  314. package/dist/features/viz/lib/scale-view.d.ts +4 -0
  315. package/dist/features/viz/lib/scale-view.js +21 -0
  316. package/dist/features/viz/lib/scale-view.js.map +7 -0
  317. package/dist/features/viz/lib/sequential-color-scale.d.ts +11 -0
  318. package/dist/features/viz/lib/sequential-color-scale.js +49 -0
  319. package/dist/features/viz/lib/sequential-color-scale.js.map +7 -0
  320. package/dist/features/viz/lib/series-position.d.ts +12 -0
  321. package/dist/features/viz/lib/series-position.js +44 -0
  322. package/dist/features/viz/lib/series-position.js.map +7 -0
  323. package/dist/features/viz/lib/step-curves.d.ts +19 -0
  324. package/dist/features/viz/lib/step-curves.js +53 -0
  325. package/dist/features/viz/lib/step-curves.js.map +7 -0
  326. package/dist/features/viz/lib/symlog-scale-component.d.ts +7 -0
  327. package/dist/features/viz/lib/symlog-scale-component.js +19 -0
  328. package/dist/features/viz/lib/symlog-scale-component.js.map +7 -0
  329. package/dist/features/viz/lib/symlog-scale.d.ts +2 -0
  330. package/dist/features/viz/lib/symlog-scale.js +38 -0
  331. package/dist/features/viz/lib/symlog-scale.js.map +7 -0
  332. package/dist/features/viz/lib/threshold-color-scale.d.ts +43 -0
  333. package/dist/features/viz/lib/threshold-color-scale.js +59 -0
  334. package/dist/features/viz/lib/threshold-color-scale.js.map +7 -0
  335. package/dist/features/viz/lib/trading-time-mapping.d.ts +32 -0
  336. package/dist/features/viz/lib/trading-time-mapping.js +89 -0
  337. package/dist/features/viz/lib/trading-time-mapping.js.map +7 -0
  338. package/dist/features/viz/lib/trading-time-scale.d.ts +83 -0
  339. package/dist/features/viz/lib/trading-time-scale.js +96 -0
  340. package/dist/features/viz/lib/trading-time-scale.js.map +7 -0
  341. package/dist/features/viz/lib/trajectory-series.d.ts +71 -0
  342. package/dist/features/viz/lib/trajectory-series.js +111 -0
  343. package/dist/features/viz/lib/trajectory-series.js.map +7 -0
  344. package/dist/features/viz/lib/types.d.ts +114 -21
  345. package/dist/features/viz/lib/use-bar-scale.d.ts +8 -0
  346. package/dist/features/viz/lib/use-bar-scale.js +9 -0
  347. package/dist/features/viz/lib/use-bar-scale.js.map +7 -0
  348. package/dist/features/viz/lib/use-continuous-scale.d.ts +8 -0
  349. package/dist/features/viz/lib/use-continuous-scale.js +14 -0
  350. package/dist/features/viz/lib/use-continuous-scale.js.map +7 -0
  351. package/dist/features/viz/lib/use-linear-scale.d.ts +8 -0
  352. package/dist/features/viz/lib/use-linear-scale.js +9 -0
  353. package/dist/features/viz/lib/use-linear-scale.js.map +7 -0
  354. package/dist/features/viz/lib/use-log-scale.d.ts +8 -0
  355. package/dist/features/viz/lib/use-log-scale.js +9 -0
  356. package/dist/features/viz/lib/use-log-scale.js.map +7 -0
  357. package/dist/features/viz/lib/use-point-scale.d.ts +8 -0
  358. package/dist/features/viz/lib/use-point-scale.js +9 -0
  359. package/dist/features/viz/lib/use-point-scale.js.map +7 -0
  360. package/dist/features/viz/lib/use-symlog-scale.d.ts +8 -0
  361. package/dist/features/viz/lib/use-symlog-scale.js +9 -0
  362. package/dist/features/viz/lib/use-symlog-scale.js.map +7 -0
  363. package/dist/features/viz/lib/use-utc-scale.d.ts +8 -0
  364. package/dist/features/viz/lib/use-utc-scale.js +9 -0
  365. package/dist/features/viz/lib/use-utc-scale.js.map +7 -0
  366. package/dist/features/viz/lib/utc-labels.d.ts +12 -0
  367. package/dist/features/viz/lib/utc-labels.js +27 -0
  368. package/dist/features/viz/lib/utc-labels.js.map +7 -0
  369. package/dist/features/viz/lib/utc-scale-component.d.ts +7 -0
  370. package/dist/features/viz/lib/utc-scale-component.js +18 -0
  371. package/dist/features/viz/lib/utc-scale-component.js.map +7 -0
  372. package/dist/features/viz/lib/utc-scale.d.ts +21 -0
  373. package/dist/features/viz/lib/utc-scale.js +124 -0
  374. package/dist/features/viz/lib/utc-scale.js.map +7 -0
  375. package/dist/features/viz/lib/volume-series.d.ts +59 -0
  376. package/dist/features/viz/lib/volume-series.js +117 -0
  377. package/dist/features/viz/lib/volume-series.js.map +7 -0
  378. package/dist/features/viz/lib/weighted-point-series.d.ts +71 -0
  379. package/dist/features/viz/lib/weighted-point-series.js +169 -0
  380. package/dist/features/viz/lib/weighted-point-series.js.map +7 -0
  381. package/dist/filters/backdrop-contrast-gpu.d.ts +5 -0
  382. package/dist/filters/backdrop-contrast-gpu.js +33 -0
  383. package/dist/filters/backdrop-contrast-gpu.js.map +7 -0
  384. package/dist/filters/backdrop-contrast.d.ts +21 -0
  385. package/dist/filters/backdrop-contrast.js +61 -0
  386. package/dist/filters/backdrop-contrast.js.map +7 -0
  387. package/dist/filters/displacement.js +1 -1
  388. package/dist/filters/displacement.js.map +2 -2
  389. package/dist/filters/emboss-gpu.d.ts +4 -0
  390. package/dist/filters/emboss-gpu.js +39 -0
  391. package/dist/filters/emboss-gpu.js.map +7 -0
  392. package/dist/filters/emboss.d.ts +32 -0
  393. package/dist/filters/emboss.js +104 -0
  394. package/dist/filters/emboss.js.map +7 -0
  395. package/dist/filters/filter-executor.d.ts +11 -4
  396. package/dist/filters/filter-executor.js +104 -49
  397. package/dist/filters/filter-executor.js.map +2 -2
  398. package/dist/filters/reflected-light.js +1 -1
  399. package/dist/filters/reflected-light.js.map +2 -2
  400. package/dist/filters/reflection-gpu.d.ts +3 -1
  401. package/dist/filters/reflection-gpu.js +5 -2
  402. package/dist/filters/reflection-gpu.js.map +2 -2
  403. package/dist/filters/render-backdrop-contrast-boundary.d.ts +31 -0
  404. package/dist/filters/render-backdrop-contrast-boundary.js +116 -0
  405. package/dist/filters/render-backdrop-contrast-boundary.js.map +7 -0
  406. package/dist/filters/render-emboss-boundary.d.ts +13 -0
  407. package/dist/filters/render-emboss-boundary.js +131 -0
  408. package/dist/filters/render-emboss-boundary.js.map +7 -0
  409. package/dist/filters.d.ts +9 -5
  410. package/dist/filters.js +4 -0
  411. package/dist/filters.js.map +2 -2
  412. package/dist/index.d.ts +10 -6
  413. package/dist/index.js +18 -2
  414. package/dist/index.js.map +2 -2
  415. package/dist/internal.d.ts +4 -0
  416. package/dist/internal.js +6 -0
  417. package/dist/internal.js.map +2 -2
  418. package/dist/layout-kernel.d.ts +12 -0
  419. package/dist/layout-kernel.js +11 -0
  420. package/dist/layout-kernel.js.map +7 -0
  421. package/dist/layout-kernel.mjs +1 -0
  422. package/dist/lib/animation/definition.d.ts +5 -3
  423. package/dist/lib/animation/definition.js +29 -4
  424. package/dist/lib/animation/definition.js.map +2 -2
  425. package/dist/lib/animation/playback.d.ts +8 -0
  426. package/dist/lib/animation/playback.js +33 -11
  427. package/dist/lib/animation/playback.js.map +2 -2
  428. package/dist/lib/animation/spring.d.ts +3 -1
  429. package/dist/lib/animation/spring.js.map +2 -2
  430. package/dist/lib/animation/types.d.ts +29 -73
  431. package/dist/lib/backend/types.d.ts +13 -1
  432. package/dist/lib/backend/types.js.map +2 -2
  433. package/dist/lib/components/arc-geometry.js +2 -1
  434. package/dist/lib/components/arc-geometry.js.map +2 -2
  435. package/dist/lib/components/g.js +2 -0
  436. package/dist/lib/components/g.js.map +2 -2
  437. package/dist/lib/components/html-box.js +2 -1
  438. package/dist/lib/components/html-box.js.map +2 -2
  439. package/dist/lib/components/img.js +3 -3
  440. package/dist/lib/components/img.js.map +2 -2
  441. package/dist/lib/components/layer.js +98 -16
  442. package/dist/lib/components/layer.js.map +3 -3
  443. package/dist/lib/components/text.d.ts +16 -0
  444. package/dist/lib/components/text.js +131 -24
  445. package/dist/lib/components/text.js.map +2 -2
  446. package/dist/lib/define-primitive.d.ts +4 -2
  447. package/dist/lib/define-primitive.js +3 -1
  448. package/dist/lib/define-primitive.js.map +2 -2
  449. package/dist/lib/element/metadata.d.ts +9 -0
  450. package/dist/lib/element/metadata.js +19 -0
  451. package/dist/lib/element/metadata.js.map +2 -2
  452. package/dist/lib/element/resolve-primitive-inputs.d.ts +2 -0
  453. package/dist/lib/element/resolve-primitive-inputs.js +17 -4
  454. package/dist/lib/element/resolve-primitive-inputs.js.map +2 -2
  455. package/dist/lib/events/event-facade.d.ts +18 -0
  456. package/dist/lib/events/event-facade.js +28 -2
  457. package/dist/lib/events/event-facade.js.map +2 -2
  458. package/dist/lib/events/hit-test.js +2 -1
  459. package/dist/lib/events/hit-test.js.map +2 -2
  460. package/dist/lib/events/propagation.d.ts +2 -1
  461. package/dist/lib/events/propagation.js +22 -16
  462. package/dist/lib/events/propagation.js.map +2 -2
  463. package/dist/lib/events/registrations.d.ts +10 -0
  464. package/dist/lib/events/registrations.js +160 -5
  465. package/dist/lib/events/registrations.js.map +2 -2
  466. package/dist/lib/execute-render.js +25 -1
  467. package/dist/lib/execute-render.js.map +2 -2
  468. package/dist/lib/filter/filter-region.js +3 -10
  469. package/dist/lib/filter/filter-region.js.map +2 -2
  470. package/dist/lib/focus/focus-manager.d.ts +8 -1
  471. package/dist/lib/focus/focus-manager.js +87 -43
  472. package/dist/lib/focus/focus-manager.js.map +2 -2
  473. package/dist/lib/focus/geometry.d.ts +2 -0
  474. package/dist/lib/focus/geometry.js +6 -0
  475. package/dist/lib/focus/geometry.js.map +2 -2
  476. package/dist/lib/geometry/path-bend-guide.js +1 -1
  477. package/dist/lib/geometry/path-bend-guide.js.map +2 -2
  478. package/dist/lib/geometry/path-geometry.js +12 -11
  479. package/dist/lib/geometry/path-geometry.js.map +2 -2
  480. package/dist/lib/geometry/path-transforms.js +17 -21
  481. package/dist/lib/geometry/path-transforms.js.map +2 -2
  482. package/dist/lib/geometry/path-warp-bezier.js +3 -1
  483. package/dist/lib/geometry/path-warp-bezier.js.map +2 -2
  484. package/dist/lib/geometry/path-warp.js +1 -1
  485. package/dist/lib/geometry/path-warp.js.map +2 -2
  486. package/dist/lib/global-state.js +2 -0
  487. package/dist/lib/global-state.js.map +2 -2
  488. package/dist/lib/hooks/use-animated-value.d.ts +11 -21
  489. package/dist/lib/hooks/use-animated-value.js +23 -70
  490. package/dist/lib/hooks/use-animated-value.js.map +3 -3
  491. package/dist/lib/hooks/use-playback.js +1 -0
  492. package/dist/lib/hooks/use-playback.js.map +2 -2
  493. package/dist/lib/html/html-events.d.ts +32 -0
  494. package/dist/lib/html/html-events.js +179 -0
  495. package/dist/lib/html/html-events.js.map +7 -0
  496. package/dist/lib/html/html-service.d.ts +8 -2
  497. package/dist/lib/html/html-service.js +198 -65
  498. package/dist/lib/html/html-service.js.map +2 -2
  499. package/dist/lib/html/overlay-config.js +7 -6
  500. package/dist/lib/html/overlay-config.js.map +2 -2
  501. package/dist/lib/html/types.d.ts +29 -2
  502. package/dist/lib/layout/absolute.d.ts +11 -5
  503. package/dist/lib/layout/absolute.js +329 -55
  504. package/dist/lib/layout/absolute.js.map +3 -3
  505. package/dist/lib/layout/allocation-checkpoint-owner.d.ts +11 -0
  506. package/dist/lib/layout/allocation-checkpoint-owner.js +86 -0
  507. package/dist/lib/layout/allocation-checkpoint-owner.js.map +7 -0
  508. package/dist/lib/layout/allocation-checkpoint.d.ts +53 -0
  509. package/dist/lib/layout/allocation-checkpoint.js +463 -0
  510. package/dist/lib/layout/allocation-checkpoint.js.map +7 -0
  511. package/dist/lib/layout/allocation-dependencies.d.ts +30 -0
  512. package/dist/lib/layout/allocation-dependencies.js +90 -0
  513. package/dist/lib/layout/allocation-dependencies.js.map +7 -0
  514. package/dist/lib/layout/allocation-revision.d.ts +13 -0
  515. package/dist/lib/layout/allocation-revision.js +67 -0
  516. package/dist/lib/layout/allocation-revision.js.map +7 -0
  517. package/dist/lib/layout/box-insets.d.ts +17 -0
  518. package/dist/lib/layout/box-insets.js +138 -0
  519. package/dist/lib/layout/box-insets.js.map +7 -0
  520. package/dist/lib/layout/box-sizing.d.ts +16 -0
  521. package/dist/lib/layout/box-sizing.js +77 -0
  522. package/dist/lib/layout/box-sizing.js.map +7 -0
  523. package/dist/lib/layout/box.js +42 -12
  524. package/dist/lib/layout/box.js.map +2 -2
  525. package/dist/lib/layout/canvas-measurement.d.ts +13 -0
  526. package/dist/lib/layout/canvas-measurement.js +57 -0
  527. package/dist/lib/layout/canvas-measurement.js.map +7 -0
  528. package/dist/lib/layout/context.d.ts +35 -6
  529. package/dist/lib/layout/context.js +72 -3
  530. package/dist/lib/layout/context.js.map +2 -2
  531. package/dist/lib/layout/define-layout-component.d.ts +23 -0
  532. package/dist/lib/layout/define-layout-component.js +84 -0
  533. package/dist/lib/layout/define-layout-component.js.map +7 -0
  534. package/dist/lib/layout/flex-allocation-cache.d.ts +42 -0
  535. package/dist/lib/layout/flex-baseline-mode.d.ts +2 -0
  536. package/dist/lib/layout/flex-baseline-mode.js +7 -0
  537. package/dist/lib/layout/flex-baseline-mode.js.map +7 -0
  538. package/dist/lib/layout/flex.d.ts +50 -15
  539. package/dist/lib/layout/flex.js +2124 -195
  540. package/dist/lib/layout/flex.js.map +3 -3
  541. package/dist/lib/layout/flow.js +225 -49
  542. package/dist/lib/layout/flow.js.map +2 -2
  543. package/dist/lib/layout/geometry-publication.d.ts +53 -0
  544. package/dist/lib/layout/geometry-publication.js +244 -0
  545. package/dist/lib/layout/geometry-publication.js.map +7 -0
  546. package/dist/lib/layout/grid-kernel.d.ts +63 -0
  547. package/dist/lib/layout/grid-kernel.js +168 -0
  548. package/dist/lib/layout/grid-kernel.js.map +7 -0
  549. package/dist/lib/layout/grid.d.ts +63 -4
  550. package/dist/lib/layout/grid.js +767 -171
  551. package/dist/lib/layout/grid.js.map +3 -3
  552. package/dist/lib/layout/measure.d.ts +55 -3
  553. package/dist/lib/layout/measure.js +448 -15
  554. package/dist/lib/layout/measure.js.map +2 -2
  555. package/dist/lib/layout/overlay.js +81 -23
  556. package/dist/lib/layout/overlay.js.map +2 -2
  557. package/dist/lib/layout/participation.d.ts +27 -0
  558. package/dist/lib/layout/participation.js +188 -0
  559. package/dist/lib/layout/participation.js.map +7 -0
  560. package/dist/lib/layout/place-child.js +1 -1
  561. package/dist/lib/layout/place-child.js.map +2 -2
  562. package/dist/lib/layout/positioning-diagnostics.d.ts +1 -1
  563. package/dist/lib/layout/positioning-diagnostics.js +13 -2
  564. package/dist/lib/layout/positioning-diagnostics.js.map +2 -2
  565. package/dist/lib/layout/prepared-root.d.ts +121 -0
  566. package/dist/lib/layout/prepared-root.js +360 -0
  567. package/dist/lib/layout/prepared-root.js.map +7 -0
  568. package/dist/lib/layout/standalone-kernel.d.ts +60 -0
  569. package/dist/lib/layout/standalone-kernel.js +722 -0
  570. package/dist/lib/layout/standalone-kernel.js.map +7 -0
  571. package/dist/lib/layout/topology.d.ts +21 -0
  572. package/dist/lib/layout/topology.js +113 -0
  573. package/dist/lib/layout/topology.js.map +7 -0
  574. package/dist/lib/layout/types.d.ts +5 -0
  575. package/dist/lib/layout/wasm/artifact.d.ts +1 -0
  576. package/dist/lib/layout/wasm/artifact.js +5 -0
  577. package/dist/lib/layout/wasm/artifact.js.map +7 -0
  578. package/dist/lib/layout/wasm/bytes.d.ts +1 -0
  579. package/dist/lib/layout/wasm/bytes.js +5 -0
  580. package/dist/lib/layout/wasm/bytes.js.map +7 -0
  581. package/dist/lib/layout/wasm/embedded.d.ts +2 -0
  582. package/dist/lib/layout/wasm/embedded.js +12 -0
  583. package/dist/lib/layout/wasm/embedded.js.map +7 -0
  584. package/dist/lib/layout/wasm/layout.wasm +0 -0
  585. package/dist/lib/layout/wasm/module.d.ts +8 -0
  586. package/dist/lib/layout/wasm/module.js +70 -0
  587. package/dist/lib/layout/wasm/module.js.map +7 -0
  588. package/dist/lib/layout/wasm/region.d.ts +267 -0
  589. package/dist/lib/layout/wasm/region.js +1018 -0
  590. package/dist/lib/layout/wasm/region.js.map +7 -0
  591. package/dist/lib/manipulation/controller.js +4 -7
  592. package/dist/lib/manipulation/controller.js.map +2 -2
  593. package/dist/lib/manipulation/frame.js +1 -1
  594. package/dist/lib/manipulation/frame.js.map +2 -2
  595. package/dist/lib/manipulation/handles.js +32 -33
  596. package/dist/lib/manipulation/handles.js.map +2 -2
  597. package/dist/lib/manipulation/solve.js +12 -10
  598. package/dist/lib/manipulation/solve.js.map +2 -2
  599. package/dist/lib/mount-pibbl.js +1 -0
  600. package/dist/lib/mount-pibbl.js.map +2 -2
  601. package/dist/lib/mount-prepared-pibbl.d.ts +5 -0
  602. package/dist/lib/mount-prepared-pibbl.js +29 -0
  603. package/dist/lib/mount-prepared-pibbl.js.map +7 -0
  604. package/dist/lib/mount-request.d.ts +8 -0
  605. package/dist/lib/mount-request.js +41 -0
  606. package/dist/lib/mount-request.js.map +7 -0
  607. package/dist/lib/pibbl.d.ts +21 -13
  608. package/dist/lib/pibbl.js +18 -16
  609. package/dist/lib/pibbl.js.map +2 -2
  610. package/dist/lib/recording/recording.d.ts +43 -0
  611. package/dist/lib/recording/recording.js +555 -0
  612. package/dist/lib/recording/recording.js.map +7 -0
  613. package/dist/lib/recording/types.d.ts +118 -0
  614. package/dist/lib/recording/wasm-bytes.d.ts +1 -0
  615. package/dist/lib/recording/wasm-bytes.js +5 -0
  616. package/dist/lib/recording/wasm-bytes.js.map +7 -0
  617. package/dist/lib/recording/worker-source.d.ts +1 -0
  618. package/dist/lib/recording/worker-source.js +5 -0
  619. package/dist/lib/recording/worker-source.js.map +7 -0
  620. package/dist/lib/render-layer/controller.d.ts +9 -3
  621. package/dist/lib/render-layer/controller.js +259 -110
  622. package/dist/lib/render-layer/controller.js.map +2 -2
  623. package/dist/lib/render-transaction.d.ts +12 -2
  624. package/dist/lib/render-transaction.js +69 -1
  625. package/dist/lib/render-transaction.js.map +2 -2
  626. package/dist/lib/render.js +32 -8
  627. package/dist/lib/render.js.map +2 -2
  628. package/dist/lib/scheduler/realm-scheduler.d.ts +2 -0
  629. package/dist/lib/scheduler/realm-scheduler.js +55 -26
  630. package/dist/lib/scheduler/realm-scheduler.js.map +2 -2
  631. package/dist/lib/scheduler/renderer-participant.js +1 -0
  632. package/dist/lib/scheduler/renderer-participant.js.map +2 -2
  633. package/dist/lib/series-inspection-frame.d.ts +18 -0
  634. package/dist/lib/series-inspection-frame.js +70 -0
  635. package/dist/lib/series-inspection-frame.js.map +7 -0
  636. package/dist/lib/signals/edge.d.ts +7 -4
  637. package/dist/lib/signals/edge.js +25 -3
  638. package/dist/lib/signals/edge.js.map +2 -2
  639. package/dist/lib/signals/graph.d.ts +16 -2
  640. package/dist/lib/signals/graph.js +54 -12
  641. package/dist/lib/signals/graph.js.map +2 -2
  642. package/dist/lib/signals/input-provision.d.ts +15 -0
  643. package/dist/lib/signals/input-provision.js +53 -3
  644. package/dist/lib/signals/input-provision.js.map +2 -2
  645. package/dist/lib/signals/render-consumer.d.ts +3 -0
  646. package/dist/lib/signals/render-consumer.js +22 -14
  647. package/dist/lib/signals/render-consumer.js.map +2 -2
  648. package/dist/lib/style/positioning.d.ts +50 -2
  649. package/dist/lib/style/positioning.js +28 -4
  650. package/dist/lib/style/positioning.js.map +2 -2
  651. package/dist/lib/style/resolve-built-in.d.ts +4 -3
  652. package/dist/lib/style/resolve-built-in.js +17 -3
  653. package/dist/lib/style/resolve-built-in.js.map +2 -2
  654. package/dist/lib/style/resolve-dispatch.d.ts +3 -0
  655. package/dist/lib/style/resolve-dispatch.js +77 -4
  656. package/dist/lib/style/resolve-dispatch.js.map +2 -2
  657. package/dist/lib/style/resolve-length.d.ts +2 -0
  658. package/dist/lib/style/resolve-length.js +13 -9
  659. package/dist/lib/style/resolve-length.js.map +2 -2
  660. package/dist/lib/style/sizing-length.d.ts +51 -0
  661. package/dist/lib/style/sizing-length.js +77 -0
  662. package/dist/lib/style/sizing-length.js.map +7 -0
  663. package/dist/lib/style/types.d.ts +63 -25
  664. package/dist/lib/surface/root-surface.js +10 -6
  665. package/dist/lib/surface/root-surface.js.map +2 -2
  666. package/dist/lib/textures/texture.js +10 -8
  667. package/dist/lib/textures/texture.js.map +2 -2
  668. package/dist/lib/transitions/capture.js +4 -1
  669. package/dist/lib/transitions/capture.js.map +2 -2
  670. package/dist/lib/transitions/embers-physics.js +17 -10
  671. package/dist/lib/transitions/embers-physics.js.map +2 -2
  672. package/dist/lib/types.d.ts +110 -1
  673. package/dist/sync.d.ts +16 -0
  674. package/dist/sync.js +13 -0
  675. package/dist/sync.js.map +7 -0
  676. package/dist/sync.mjs +1 -0
  677. package/package.json +43 -6
  678. package/dist/features/viz/lib/scale.d.ts +0 -11
  679. package/dist/features/viz/lib/scale.js +0 -80
  680. package/dist/features/viz/lib/scale.js.map +0 -7
  681. package/dist/features/viz/lib/use-scale.d.ts +0 -20
  682. package/dist/features/viz/lib/use-scale.js +0 -10
  683. package/dist/features/viz/lib/use-scale.js.map +0 -7
@@ -0,0 +1,463 @@
1
+ import { allocationExplicitRevision } from "./allocation-revision.js";
2
+ import { checkpointGeneration, registerCheckpointDisposal, disposeAllocationCheckpoint } from "./allocation-checkpoint-owner.js";
3
+ import { disposeAllocationCheckpoint as disposeAllocationCheckpoint2, mountedAllocationCheckpointOwner } from "./allocation-checkpoint-owner.js";
4
+ import { GLOBAL_STATE } from "../global-state.js";
5
+ import { clonePibblElement, isPibblElement } from "../element/create-element.js";
6
+ import { getChildPrimitiveReceiverToken, getPrimitiveReceiverToken, primitiveReceiverPath, primitiveReceiverAtPath } from "../element/metadata.js";
7
+ import { isSignal, untracked } from "../signals/graph.js";
8
+ import { replayReceiverInputProvision, observeReceiverInputReads } from "../signals/input-provision.js";
9
+ import { peekPreNormalizedStyle, setPreNormalizedStyle } from "../style/resolve-dispatch.js";
10
+ import { preparedStyleValue, preparedStyleQuery } from "../style/responsive.js";
11
+ import { styleInputRole } from "../element/resolve-primitive-inputs.js";
12
+ let prepareDirectChildStyle;
13
+ let childWithUsedSize;
14
+ let takePreparedStyle;
15
+ let stagePreparedStyle;
16
+ let isDescription;
17
+ let isStructural;
18
+ let prepareDescription;
19
+ function configureAllocationCheckpointAdapter(prepare, place, takePrepared, stagePrepared, described, structural, describe) {
20
+ prepareDirectChildStyle = prepare;
21
+ childWithUsedSize = place;
22
+ takePreparedStyle = takePrepared;
23
+ stagePreparedStyle = stagePrepared;
24
+ isDescription = described;
25
+ isStructural = structural;
26
+ prepareDescription = describe;
27
+ }
28
+ import { AllocationDependency, stageAllocationDependency } from "./allocation-dependencies.js";
29
+ import { getLayoutDirection, getLogicalContainingBox } from "./context.js";
30
+ const checkpoints = /* @__PURE__ */ new WeakMap();
31
+ const styleReceipts = /* @__PURE__ */ new WeakMap();
32
+ let trace;
33
+ let measuringTrace;
34
+ let untracedQueryRevision = 0;
35
+ let volatileQueryRevision = 0;
36
+ function markVolatileAllocationQuery() {
37
+ volatileQueryRevision++;
38
+ }
39
+ function allocationQueryVolatilityRevision() {
40
+ return volatileQueryRevision;
41
+ }
42
+ function declineUntracedAllocationQuery() {
43
+ untracedQueryRevision++;
44
+ }
45
+ function allocationQueryReplayRevision() {
46
+ return untracedQueryRevision;
47
+ }
48
+ const OPAQUE_PAINT = /* @__PURE__ */ Symbol("opaque paint input");
49
+ const RESPONSIVE_INPUT = /* @__PURE__ */ Symbol("responsive input");
50
+ const SIGNAL_STYLE_INPUT = /* @__PURE__ */ Symbol("signal style input");
51
+ const NO_RECEIPT = Object.freeze([]);
52
+ function presentationOrMeasurement(key) {
53
+ const role = styleInputRole(key);
54
+ return role === "paint" || role === "measurement" || role === "interaction" || role === "transform";
55
+ }
56
+ function snapshot(value, style = false, geometry = false) {
57
+ const result = [];
58
+ const visiting = /* @__PURE__ */ new Set();
59
+ function append(value2, opaquePaint = false) {
60
+ if (style && isSignal(value2)) {
61
+ result.push(SIGNAL_STYLE_INPUT, value2);
62
+ return true;
63
+ }
64
+ if (value2 === null || typeof value2 !== "object") {
65
+ result.push(value2);
66
+ return true;
67
+ }
68
+ if (isSignal(value2)) {
69
+ result.push(value2);
70
+ return true;
71
+ }
72
+ const prototype = Object.getPrototypeOf(value2);
73
+ if (!Array.isArray(value2) && prototype !== Object.prototype && prototype !== null) {
74
+ if (!opaquePaint) return false;
75
+ result.push(OPAQUE_PAINT, value2);
76
+ return true;
77
+ }
78
+ if (visiting.has(value2)) return false;
79
+ visiting.add(value2);
80
+ const keys = Reflect.ownKeys(value2);
81
+ result.push(Array.isArray(value2) ? Array : Object);
82
+ for (const key of keys) {
83
+ if (geometry && typeof key === "string" && presentationOrMeasurement(key)) continue;
84
+ const field = Object.getOwnPropertyDescriptor(value2, key);
85
+ if (!("value" in field)) return false;
86
+ result.push(key);
87
+ if (style && key === "when") {
88
+ result.push(RESPONSIVE_INPUT, field.value);
89
+ continue;
90
+ }
91
+ if (!append(field.value, opaquePaint || style && typeof key === "string" && styleInputRole(key) === "paint")) return false;
92
+ }
93
+ result.push(null);
94
+ visiting.delete(value2);
95
+ return true;
96
+ }
97
+ return untracked(() => append(value) ? result : void 0);
98
+ }
99
+ function same(left, right) {
100
+ if (!left || !right || left.length !== right.length) return false;
101
+ for (let index = 0; index < left.length; index++) if (!Object.is(left[index], right[index])) return false;
102
+ return true;
103
+ }
104
+ function programSnapshot(element, receiver, visiting = /* @__PURE__ */ new Set()) {
105
+ if (visiting.has(element)) return;
106
+ visiting.add(element);
107
+ const result = [];
108
+ const props = element.props;
109
+ function children(value) {
110
+ if (Array.isArray(value)) {
111
+ if (visiting.has(value)) return false;
112
+ visiting.add(value);
113
+ result.push(Array, value.length);
114
+ for (let index = 0; index < value.length; index++) if (!children(value[index])) return false;
115
+ visiting.delete(value);
116
+ return true;
117
+ }
118
+ if (isPibblElement(value)) {
119
+ const style = snapshot(value.props.style, true), program = programSnapshot(value, void 0, visiting);
120
+ if (!style || !program) return false;
121
+ result.push(value.type, value.key, style.length, ...style, program.length, ...program);
122
+ return true;
123
+ }
124
+ if (value !== null && typeof value === "object" && !isSignal(value) || typeof value === "function") return false;
125
+ result.push(value);
126
+ return true;
127
+ }
128
+ for (const key of Object.keys(props)) {
129
+ if (key === "style") continue;
130
+ const field = Object.getOwnPropertyDescriptor(props, key);
131
+ if (!("value" in field)) return;
132
+ const value = field.value;
133
+ result.push(key);
134
+ if (key === "children" && isStructural(element.type)) {
135
+ if (!children(value)) return;
136
+ } else {
137
+ if (value !== null && typeof value === "object" && !isSignal(value)) return;
138
+ result.push(value);
139
+ }
140
+ }
141
+ if (isDescription(element.type)) {
142
+ if (!receiver) return;
143
+ const root = prepareDescription(element, { receiverToken: receiver });
144
+ const rootStyle = snapshot(root.props.style, true), rootProgram = programSnapshot(root, getPrimitiveReceiverToken(root), visiting);
145
+ if (!rootStyle || !rootProgram) return;
146
+ result.push(root.type, root.key, rootStyle.length, ...rootStyle, rootProgram.length, ...rootProgram);
147
+ }
148
+ visiting.delete(element);
149
+ return result;
150
+ }
151
+ function recordAllocationStyle(receiver, prepared, receipt) {
152
+ if (receipt) styleReceipts.set(prepared, receipt);
153
+ if (!trace || !receiver || trace === measuringTrace) return;
154
+ const index = trace.receivers.get(receiver);
155
+ if (index !== void 0) {
156
+ trace.inputs[index].prepared = prepared;
157
+ trace.inputs[index].receipt = receipt ?? styleReceipts.get(prepared);
158
+ }
159
+ }
160
+ function allocationMeasurement(element, execute, allowResponsive = false) {
161
+ const active = trace;
162
+ if (!active || active === measuringTrace) return execute(element);
163
+ const index = active.receivers.get(getPrimitiveReceiverToken(element));
164
+ const normalized = peekPreNormalizedStyle(element);
165
+ if (index === void 0 || !normalized || normalized.query && !allowResponsive) {
166
+ active.valid = false;
167
+ return execute(element);
168
+ }
169
+ const props = programSnapshot(element, getPrimitiveReceiverToken(element));
170
+ const previousMeasuring = measuringTrace;
171
+ measuringTrace = active;
172
+ let collected;
173
+ try {
174
+ collected = collectQueryReads(getPrimitiveReceiverToken(element), () => execute(element));
175
+ } finally {
176
+ measuringTrace = previousMeasuring;
177
+ }
178
+ const result = collected.result;
179
+ const numeric = snapshot(result);
180
+ if (!numeric || !collected.reads) active.valid = false;
181
+ else active.queries.push({ volatile: collected.volatile, index, style: normalized.style, props, result: numeric, execute, reads: collected.reads });
182
+ return result;
183
+ }
184
+ function collectQueryReads(root, run) {
185
+ const revision = untracedQueryRevision, volatility = volatileQueryRevision;
186
+ const captured = /* @__PURE__ */ new Map();
187
+ let valid = true;
188
+ const result = observeReceiverInputReads((node, roles, receiver) => {
189
+ let target = captured.get(receiver);
190
+ if (!target) {
191
+ const path = primitiveReceiverPath(receiver, root);
192
+ if (!path) {
193
+ valid = false;
194
+ return;
195
+ }
196
+ target = { path, receipt: [] };
197
+ captured.set(receiver, target);
198
+ }
199
+ for (const entry of target.receipt) if (entry.node === node) {
200
+ entry.roles |= roles;
201
+ return;
202
+ }
203
+ target.receipt.push({ node, roles });
204
+ }, run);
205
+ return { result, reads: valid && revision === untracedQueryRevision ? Array.from(captured.values()) : void 0, volatile: volatility !== volatileQueryRevision };
206
+ }
207
+ function bindQueryReads(reads, input, transaction, root) {
208
+ for (const read of reads) {
209
+ const receiver = primitiveReceiverAtPath(transaction, root, read.path);
210
+ if (read.path.length) {
211
+ read.dependency ??= new AllocationDependency((roles) => {
212
+ input.dirty |= roles;
213
+ input.revision++;
214
+ });
215
+ stageAllocationDependency(transaction, receiver, read.dependency);
216
+ }
217
+ replayReceiverInputProvision(transaction, receiver, read.receipt);
218
+ }
219
+ }
220
+ function disposeQueryReads(reads) {
221
+ for (const read of reads) read.dependency?.dispose();
222
+ }
223
+ function disposeCheckpoint(checkpoint) {
224
+ for (const input of checkpoint.inputs) input.dependency.dispose();
225
+ for (const query of checkpoint.queries) disposeQueryReads(query.reads);
226
+ }
227
+ function declineUnrecordedAllocationMeasurement() {
228
+ if (trace && trace !== measuringTrace) trace.valid = false;
229
+ }
230
+ function receiverFor(options, transaction, index) {
231
+ return options.receiverTokens?.[index] ?? getChildPrimitiveReceiverToken(transaction, GLOBAL_STATE.primitiveReceiverToken, index);
232
+ }
233
+ function withAllocationCheckpoint(owner, options) {
234
+ const transaction = GLOBAL_STATE.renderTransaction;
235
+ if (!owner || !transaction || !GLOBAL_STATE.primitiveReceiverToken) return options.calculate();
236
+ const { children, content } = options;
237
+ const containing = GLOBAL_STATE.layoutStack?.length ? getLogicalContainingBox() : content;
238
+ const key = snapshot({ content, settings: options.settings, containing, explicitRevision: allocationExplicitRevision(), direction: getLayoutDirection() }, true, true);
239
+ if (!key) {
240
+ retireOnSuccess(owner, transaction);
241
+ return options.calculate();
242
+ }
243
+ const receivers = /* @__PURE__ */ new Map();
244
+ for (let index = 0; index < children.length; index++) receivers.set(receiverFor(options, transaction, index), index);
245
+ const continuation = options.continuation === void 0 ? void 0 : snapshot(options.continuation);
246
+ if (options.continuation !== void 0 && !continuation) {
247
+ retireOnSuccess(owner, transaction);
248
+ return options.calculate();
249
+ }
250
+ const previous = checkpoints.get(owner);
251
+ if (previous && same(previous.key, key) && previous.inputs.length === children.length) {
252
+ const attempted = [];
253
+ const placements2 = reuse(owner, previous, options, transaction, receivers, attempted);
254
+ if (placements2) {
255
+ options.onHit?.();
256
+ return placements2;
257
+ }
258
+ for (const input of attempted) {
259
+ replayReceiverInputProvision(transaction, input.receiver, input.receipt);
260
+ stagePreparedStyle(children[input.index], input.receiver, content, input.prepared);
261
+ }
262
+ }
263
+ const active = { receivers, inputs: children.map(() => ({})), queries: [], valid: true };
264
+ const outer = trace;
265
+ trace = active;
266
+ let placements;
267
+ try {
268
+ placements = options.calculate();
269
+ } finally {
270
+ trace = outer;
271
+ }
272
+ if (!active.valid || placements.length !== children.length) {
273
+ retireOnSuccess(owner, transaction);
274
+ return placements;
275
+ }
276
+ const inputs = [];
277
+ for (const [receiver, index] of receivers) {
278
+ const prepared = active.inputs[index].prepared;
279
+ const raw = snapshot(children[index].props.style, true);
280
+ const normalized = prepared && snapshot(preparedStyleValue(prepared), false, true);
281
+ if (!prepared || !raw || !normalized || !options.pending?.read(index) && !peekPreNormalizedStyle(placements[index].element)) {
282
+ for (const input2 of inputs) input2.dependency.dispose();
283
+ retireOnSuccess(owner, transaction);
284
+ return placements;
285
+ }
286
+ const input = {
287
+ type: children[index].type,
288
+ key: children[index].key,
289
+ raw,
290
+ normalized,
291
+ prepared,
292
+ receipt: active.inputs[index].receipt ?? NO_RECEIPT,
293
+ dirty: 0,
294
+ revision: 0,
295
+ dependency: void 0
296
+ };
297
+ input.dependency = new AllocationDependency((roles) => {
298
+ input.dirty |= roles;
299
+ input.revision++;
300
+ });
301
+ inputs.push(input);
302
+ stageAllocationDependency(transaction, receiver, input.dependency);
303
+ }
304
+ for (const query of active.queries) bindQueryReads(query.reads, inputs[query.index], transaction, receiverFor(options, transaction, query.index));
305
+ const generation = checkpointGeneration(owner);
306
+ const numericPlacements = placements.map((value, index) => {
307
+ const pending = options.pending?.read(index);
308
+ if (pending) return { pending: { style: { ...pending.style }, data: pending.data } };
309
+ const { element, ...placement } = value;
310
+ const allocated = peekPreNormalizedStyle(element).style;
311
+ return { placement: { ...placement, box: { ...placement.box } }, width: allocated.width, height: allocated.height, style: { ...peekPreNormalizedStyle(element).style } };
312
+ });
313
+ const programs = continuation && children.map((child, index) => programSnapshot(child, receiverFor(options, transaction, index)));
314
+ const next = { key, inputs, queries: active.queries, placements: numericPlacements, continuation, programs };
315
+ transaction.onFinish((success) => {
316
+ if (!success || checkpointGeneration(owner) !== generation) {
317
+ disposeCheckpoint(next);
318
+ return;
319
+ }
320
+ const old = checkpoints.get(owner);
321
+ if (old) disposeCheckpoint(old);
322
+ checkpoints.set(owner, next);
323
+ registerCheckpointDisposal(owner, () => {
324
+ disposeCheckpoint(next);
325
+ if (checkpoints.get(owner) === next) checkpoints.delete(owner);
326
+ });
327
+ });
328
+ return placements;
329
+ }
330
+ function retireOnSuccess(owner, transaction) {
331
+ const previous = checkpoints.get(owner);
332
+ if (!previous) return;
333
+ transaction.onFinish((success) => {
334
+ if (success && checkpoints.get(owner) === previous) disposeAllocationCheckpoint(owner);
335
+ });
336
+ }
337
+ function reuse(owner, checkpoint, options, transaction, receivers, attempted) {
338
+ const continuation = options.continuation === void 0 ? void 0 : snapshot(options.continuation);
339
+ if (continuation && !same(continuation, checkpoint.continuation)) return;
340
+ if (checkpoint.continuation && !continuation) {
341
+ for (const [receiver, index] of receivers) {
342
+ const program = programSnapshot(options.children[index], receiver);
343
+ if (checkpoint.inputs[index].dirty || program?.includes(SIGNAL_STYLE_INPUT) || !same(program, checkpoint.programs?.[index])) return;
344
+ }
345
+ }
346
+ const prepared = [];
347
+ const rawSnapshots = [];
348
+ const styleReads = [];
349
+ const revisions = [];
350
+ const changed = /* @__PURE__ */ new Set();
351
+ for (const [receiver, index] of receivers) {
352
+ const child = options.children[index], input = checkpoint.inputs[index];
353
+ if (child.type !== input.type || child.key !== input.key) return;
354
+ const raw = snapshot(child.props.style, true);
355
+ if (!raw) return;
356
+ const staged = takePreparedStyle(child, receiver, options.content);
357
+ let current = staged ?? input.prepared;
358
+ let geometryChanged = false;
359
+ if (staged || raw.includes(OPAQUE_PAINT) || raw.includes(RESPONSIVE_INPUT) || raw.includes(SIGNAL_STYLE_INPUT) || preparedStyleQuery(input.prepared) || isDescription(child.type) || !same(raw, input.raw) || input.dirty & (1 | 2 | 64)) {
360
+ current = staged ?? prepareDirectChildStyle(child, receiver, options.content, options.flexMargins);
361
+ geometryChanged = !same(snapshot(preparedStyleValue(current), false, true), input.normalized);
362
+ if (!same(snapshot(preparedStyleValue(current)), snapshot(preparedStyleValue(input.prepared))) || !same(snapshot(preparedStyleQuery(current)), snapshot(preparedStyleQuery(input.prepared)))) changed.add(index);
363
+ }
364
+ attempted.push({ index, receiver, prepared: current, receipt: styleReceipts.get(current) ?? input.receipt });
365
+ if (geometryChanged) return;
366
+ prepared.push(current);
367
+ rawSnapshots.push(raw);
368
+ revisions.push(input.revision);
369
+ styleReads.push(styleReceipts.get(current) ?? input.receipt);
370
+ }
371
+ const nextResults = [];
372
+ const queryProps = [];
373
+ const queryReads = [];
374
+ const queryVolatility = [];
375
+ for (const query of checkpoint.queries) {
376
+ const input = checkpoint.inputs[query.index], child = options.children[query.index];
377
+ const props = programSnapshot(child, receiverFor(options, transaction, query.index));
378
+ queryProps.push(props);
379
+ if (query.volatile || !props || props.includes(OPAQUE_PAINT) || props.includes(RESPONSIVE_INPUT) || props.includes(SIGNAL_STYLE_INPUT) || !query.props || input.dirty || changed.has(query.index) || !same(props, query.props)) {
380
+ const element = clonePibblElement(child);
381
+ const style = { ...query.style };
382
+ const currentStyle = preparedStyleValue(prepared[query.index]);
383
+ for (const field of Object.keys(style)) if (presentationOrMeasurement(field) && !(field in currentStyle)) delete style[field];
384
+ for (const field of Object.keys(currentStyle)) if (presentationOrMeasurement(field)) style[field] = currentStyle[field];
385
+ setPreNormalizedStyle(element, style, child, receiverFor(options, transaction, query.index), preparedStyleQuery(prepared[query.index]));
386
+ const previousTrace = trace;
387
+ trace = void 0;
388
+ let collected;
389
+ try {
390
+ collected = collectQueryReads(getPrimitiveReceiverToken(element), () => query.execute(element));
391
+ } finally {
392
+ trace = previousTrace;
393
+ }
394
+ const numeric = snapshot(collected.result);
395
+ if (!collected.reads || !same(numeric, query.result)) return;
396
+ nextResults.push(numeric);
397
+ queryReads.push(collected.reads);
398
+ queryVolatility.push(collected.volatile);
399
+ } else {
400
+ nextResults.push(query.result);
401
+ queryReads.push(query.reads);
402
+ queryVolatility.push(query.volatile);
403
+ }
404
+ }
405
+ for (let index = 0; index < checkpoint.queries.length; index++) {
406
+ const query = checkpoint.queries[index];
407
+ bindQueryReads(queryReads[index], checkpoint.inputs[query.index], transaction, receiverFor(options, transaction, query.index));
408
+ }
409
+ const result = [];
410
+ for (const [receiver, index] of receivers) {
411
+ const input = checkpoint.inputs[index], previous = checkpoint.placements[index];
412
+ replayReceiverInputProvision(transaction, receiver, styleReads[index]);
413
+ stageAllocationDependency(transaction, receiver, input.dependency);
414
+ const style = { ...previous.pending ? previous.pending.style : previous.style };
415
+ const current = preparedStyleValue(prepared[index]);
416
+ for (const field of Object.keys(style)) if (presentationOrMeasurement(field) && !(field in current)) delete style[field];
417
+ for (const field of Object.keys(current)) if (presentationOrMeasurement(field)) style[field] = current[field];
418
+ if (previous.pending) {
419
+ if (!options.pending) return;
420
+ result.push(options.pending.replay(index, style, receiver, preparedStyleQuery(prepared[index]), previous.pending.data));
421
+ continue;
422
+ }
423
+ result.push({ ...previous.placement, element: childWithUsedSize(options.children[index], style, previous.width, previous.height, receiver, preparedStyleQuery(prepared[index])) });
424
+ }
425
+ const nextPrograms = continuation && options.children.map((child, index) => programSnapshot(child, receiverFor(options, transaction, index)));
426
+ transaction.onFinish((success) => {
427
+ if (!success || checkpoints.get(owner) !== checkpoint) {
428
+ for (let index = 0; index < queryReads.length; index++) if (queryReads[index] !== checkpoint.queries[index].reads) disposeQueryReads(queryReads[index]);
429
+ return;
430
+ }
431
+ if (nextPrograms) checkpoint.programs = nextPrograms;
432
+ for (let index = 0; index < checkpoint.inputs.length; index++) {
433
+ const input = checkpoint.inputs[index];
434
+ input.prepared = prepared[index];
435
+ input.raw = rawSnapshots[index];
436
+ input.receipt = styleReads[index];
437
+ if (input.revision === revisions[index]) input.dirty = 0;
438
+ }
439
+ for (let index = 0; index < checkpoint.queries.length; index++) {
440
+ const query = checkpoint.queries[index];
441
+ if (query.reads !== queryReads[index]) disposeQueryReads(query.reads);
442
+ query.result = nextResults[index];
443
+ query.props = queryProps[index];
444
+ query.reads = queryReads[index];
445
+ query.volatile = queryVolatility[index];
446
+ }
447
+ });
448
+ return result;
449
+ }
450
+ export {
451
+ allocationMeasurement,
452
+ allocationQueryReplayRevision,
453
+ allocationQueryVolatilityRevision,
454
+ configureAllocationCheckpointAdapter,
455
+ declineUnrecordedAllocationMeasurement,
456
+ declineUntracedAllocationQuery,
457
+ disposeAllocationCheckpoint2 as disposeAllocationCheckpoint,
458
+ markVolatileAllocationQuery,
459
+ mountedAllocationCheckpointOwner,
460
+ recordAllocationStyle,
461
+ withAllocationCheckpoint
462
+ };
463
+ //# sourceMappingURL=allocation-checkpoint.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/lib/layout/allocation-checkpoint.ts"],
4
+ "sourcesContent": ["import { allocationExplicitRevision } from './allocation-revision.js';\nimport { checkpointGeneration, registerCheckpointDisposal, disposeAllocationCheckpoint } from './allocation-checkpoint-owner.js';\nexport { disposeAllocationCheckpoint, mountedAllocationCheckpointOwner } from './allocation-checkpoint-owner.js';\nimport { GLOBAL_STATE } from '../global-state.js';\nimport { clonePibblElement, isPibblElement } from '../element/create-element.js';\nimport { getChildPrimitiveReceiverToken, getPrimitiveReceiverToken, primitiveReceiverPath, primitiveReceiverAtPath } from '../element/metadata.js';\nimport type { PibblElement } from '../element/types.js';\nimport { isSignal, untracked, type SignalNode } from '../signals/graph.js';\nimport { replayReceiverInputProvision, observeReceiverInputReads, type ReceiverInputProvisionReceipt } from '../signals/input-provision.js';\nimport { peekPreNormalizedStyle, setPreNormalizedStyle } from '../style/resolve-dispatch.js';\nimport { preparedStyleValue, preparedStyleQuery, type PreparedQuery } from '../style/responsive.js';\nimport type { SystemStyle, PibblRenderTransaction } from '../types.js';\nimport { styleInputRole } from '../element/resolve-primitive-inputs.js';\nimport type { takePreparedChildStyle as TakePreparedStyle, stagePreparedChildStyle as StagePreparedStyle } from './prepared-root.js';\nimport type { prepareDirectChildStyle as PrepareStyle, childWithUsedSize as PlaceStyle } from './absolute.js';\nlet prepareDirectChildStyle: typeof PrepareStyle;\nlet childWithUsedSize: typeof PlaceStyle;\nlet takePreparedStyle: typeof TakePreparedStyle;\nlet stagePreparedStyle: typeof StagePreparedStyle;\nlet isDescription: (type: Function) => boolean;\nlet isStructural: (type: Function) => boolean;\nlet prepareDescription: (element: PibblElement<any>, options?: { receiverToken?: object }) => PibblElement<any>;\n/** Installed lazily by the existing direct-style boundary to avoid module cycles. */\nexport function configureAllocationCheckpointAdapter(prepare: typeof PrepareStyle, place: typeof PlaceStyle, takePrepared: typeof TakePreparedStyle, stagePrepared: typeof StagePreparedStyle, described: (type: Function) => boolean, structural: (type: Function) => boolean, describe: typeof prepareDescription): void {\n prepareDirectChildStyle = prepare; childWithUsedSize = place; takePreparedStyle = takePrepared; stagePreparedStyle = stagePrepared; isDescription = described; isStructural = structural; prepareDescription = describe;\n}\nimport { AllocationDependency, stageAllocationDependency } from './allocation-dependencies.js';\nimport { getLayoutDirection, getLogicalContainingBox } from './context.js';\nimport type { LayoutBox } from './types.js';\n\ntype Snapshot = readonly unknown[];\ntype PreparedStyle = ReturnType<typeof prepareDirectChildStyle>;\ntype Placement = { box: LayoutBox; element: PibblElement<any> };\ninterface Input {\n type: Function;\n key: string | undefined;\n raw: Snapshot;\n normalized: Snapshot;\n prepared: PreparedStyle;\n receipt: ReceiverInputProvisionReceipt;\n dependency: AllocationDependency;\n dirty: number;\n revision: number;\n}\ninterface QueryRead {\n path: readonly number[];\n receipt: ReceiverInputProvisionReceipt;\n dependency?: AllocationDependency;\n}\ninterface Query {\n volatile: boolean;\n index: number;\n style: Readonly<SystemStyle>;\n props: Snapshot | undefined;\n result: Snapshot;\n execute: (element: PibblElement<any>) => unknown;\n reads: QueryRead[];\n}\ninterface Checkpoint {\n key: Snapshot;\n continuation?: Snapshot;\n programs?: Array<Snapshot | undefined>;\n inputs: Input[];\n queries: Query[];\n placements: ({ placement: Omit<Placement, 'element'>; width: number; height: number; style: Readonly<SystemStyle>; pending?: undefined } | { pending: { style: Readonly<SystemStyle>; data: unknown } })[];\n}\ninterface Trace {\n receivers: Map<object, number>;\n inputs: Array<{ prepared?: PreparedStyle; receipt?: ReceiverInputProvisionReceipt }>;\n queries: Query[];\n valid: boolean;\n}\nconst checkpoints = new WeakMap<object, Checkpoint>();\nconst styleReceipts = new WeakMap<object, ReceiverInputProvisionReceipt>();\nlet trace: Trace | undefined;\nlet measuringTrace: Trace | undefined;\n// Public recursive queries do not prove the nested descriptor's normalized inputs.\n// A nested refusal must reach every enclosing numeric query capture.\nlet untracedQueryRevision = 0;\nlet volatileQueryRevision = 0;\nexport function markVolatileAllocationQuery(): void { volatileQueryRevision++; }\nexport function allocationQueryVolatilityRevision(): number { return volatileQueryRevision; }\nexport function declineUntracedAllocationQuery(): void { untracedQueryRevision++; }\nexport function allocationQueryReplayRevision(): number { return untracedQueryRevision; }\nconst OPAQUE_PAINT = Symbol('opaque paint input');\nconst RESPONSIVE_INPUT = Symbol('responsive input');\nconst SIGNAL_STYLE_INPUT = Symbol('signal style input');\nconst NO_RECEIPT: ReceiverInputProvisionReceipt = Object.freeze([]);\nfunction presentationOrMeasurement(key: string): boolean {\n const role = styleInputRole(key);\n return role === 'paint' || role === 'measurement' || role === 'interaction' || role === 'transform';\n}\n\n// Snapshot only the declared style schema and direct program values. Unknown\n// prototype-bearing records/accessors decline reuse instead of invoking getters\n// or trusting identity for mutable application records.\nfunction snapshot(value: unknown, style = false, geometry = false): Snapshot | undefined {\n const result: unknown[] = [];\n const visiting = new Set<object>();\n function append(value: unknown, opaquePaint = false): boolean {\n if (style && isSignal(value)) { result.push(SIGNAL_STYLE_INPUT, value); return true; }\n if (value === null || typeof value !== 'object') { result.push(value); return true; }\n if (isSignal(value)) { result.push(value); return true; }\n const prototype = Object.getPrototypeOf(value);\n if (!Array.isArray(value) && prototype !== Object.prototype && prototype !== null) {\n if (!opaquePaint) return false;\n result.push(OPAQUE_PAINT, value); return true;\n }\n if (visiting.has(value)) return false;\n visiting.add(value);\n const keys = Reflect.ownKeys(value);\n result.push(Array.isArray(value) ? Array : Object);\n for (const key of keys) {\n if (geometry && typeof key === 'string' && presentationOrMeasurement(key)) continue;\n const field = Object.getOwnPropertyDescriptor(value, key)!;\n if (!('value' in field)) return false;\n result.push(key);\n // Responsive selection is reevaluated on every hit; do not read inactive patch signals.\n if (style && key === 'when') { result.push(RESPONSIVE_INPUT, field.value); continue; }\n if (!append(field.value, opaquePaint || style && typeof key === 'string' && styleInputRole(key) === 'paint')) return false;\n }\n result.push(null); visiting.delete(value); return true;\n }\n return untracked(() => append(value) ? result : undefined);\n}\nfunction same(left: Snapshot | undefined, right: Snapshot | undefined): boolean {\n if (!left || !right || left.length !== right.length) return false;\n for (let index = 0; index < left.length; index++) if (!Object.is(left[index], right[index])) return false;\n return true;\n}\nfunction programSnapshot(element: PibblElement<any>, receiver?: object, visiting = new Set<object>()): Snapshot | undefined {\n if (visiting.has(element)) return;\n visiting.add(element);\n const result: unknown[] = [];\n const props = element.props as Record<string, unknown>;\n function children(value: unknown): boolean {\n if (Array.isArray(value)) {\n if (visiting.has(value)) return false;\n visiting.add(value); result.push(Array, value.length);\n for (let index = 0; index < value.length; index++) if (!children(value[index])) return false;\n visiting.delete(value); return true;\n }\n if (isPibblElement(value)) {\n const style = snapshot(value.props.style, true), program = programSnapshot(value, undefined, visiting);\n if (!style || !program) return false;\n result.push(value.type, value.key, style.length, ...style, program.length, ...program); return true;\n }\n if (value !== null && typeof value === 'object' && !isSignal(value) || typeof value === 'function') return false;\n result.push(value); return true;\n }\n for (const key of Object.keys(props)) {\n if (key === 'style') continue;\n const field = Object.getOwnPropertyDescriptor(props, key)!;\n if (!('value' in field)) return;\n const value = field.value;\n result.push(key);\n if (key === 'children' && isStructural(element.type)) { if (!children(value)) return; }\n else {\n if (value !== null && typeof value === 'object' && !isSignal(value)) return;\n result.push(value);\n }\n }\n if (isDescription(element.type)) {\n if (!receiver) return;\n const root = prepareDescription(element, { receiverToken: receiver });\n const rootStyle = snapshot(root.props.style, true), rootProgram = programSnapshot(root, getPrimitiveReceiverToken(root), visiting);\n if (!rootStyle || !rootProgram) return;\n result.push(root.type, root.key, rootStyle.length, ...rootStyle, rootProgram.length, ...rootProgram);\n }\n visiting.delete(element); return result;\n}\n\n/** Called at the existing normalization boundary; never sizes or places an item. */\nexport function recordAllocationStyle(receiver: object | undefined, prepared: PreparedStyle, receipt?: ReceiverInputProvisionReceipt): void {\n if (receipt) styleReceipts.set(prepared, receipt);\n if (!trace || !receiver || trace === measuringTrace) return;\n const index = trace.receivers.get(receiver);\n if (index !== undefined) { trace.inputs[index].prepared = prepared; trace.inputs[index].receipt = receipt ?? styleReceipts.get(prepared); }\n}\n\n/** Records actual demanded pure queries, including their selected constraints. */\nexport function allocationMeasurement<T>(element: PibblElement<any>, execute: (element: PibblElement<any>) => T, allowResponsive = false): T {\n const active = trace;\n if (!active || active === measuringTrace) return execute(element);\n const index = active.receivers.get(getPrimitiveReceiverToken(element)!);\n const normalized = peekPreNormalizedStyle(element);\n if (index === undefined || !normalized || normalized.query && !allowResponsive) { active.valid = false; return execute(element); }\n const props = programSnapshot(element, getPrimitiveReceiverToken(element));\n const previousMeasuring = measuringTrace;\n measuringTrace = active;\n let collected: { result: T; reads: QueryRead[] | undefined; volatile: boolean };\n try { collected = collectQueryReads(getPrimitiveReceiverToken(element)!, () => execute(element)); } finally { measuringTrace = previousMeasuring; }\n const result = collected.result;\n const numeric = snapshot(result);\n if (!numeric || !collected.reads) active.valid = false;\n else active.queries.push({ volatile: collected.volatile, index, style: normalized.style, props, result: numeric, execute, reads: collected.reads });\n return result;\n}\n\nfunction collectQueryReads<T>(root: object, run: () => T): { result: T; reads: QueryRead[] | undefined; volatile: boolean } {\n const revision = untracedQueryRevision, volatility = volatileQueryRevision;\n const captured = new Map<object, { path: readonly number[]; receipt: { node: SignalNode<unknown>; roles: number }[] }>();\n let valid = true;\n const result = observeReceiverInputReads((node, roles, receiver) => {\n let target = captured.get(receiver);\n if (!target) {\n const path = primitiveReceiverPath(receiver, root);\n if (!path) { valid = false; return; }\n target = { path, receipt: [] }; captured.set(receiver, target);\n }\n for (const entry of target.receipt) if (entry.node === node) { entry.roles |= roles; return; }\n target.receipt.push({ node, roles });\n }, run);\n return { result, reads: valid && revision === untracedQueryRevision ? Array.from(captured.values()) : undefined, volatile: volatility !== volatileQueryRevision };\n}\nfunction bindQueryReads(reads: QueryRead[], input: Input, transaction: PibblRenderTransaction, root: object): void {\n for (const read of reads) {\n const receiver = primitiveReceiverAtPath(transaction, root, read.path);\n if (read.path.length) {\n read.dependency ??= new AllocationDependency(roles => { input.dirty |= roles; input.revision++; });\n stageAllocationDependency(transaction, receiver, read.dependency);\n }\n replayReceiverInputProvision(transaction, receiver, read.receipt);\n }\n}\nfunction disposeQueryReads(reads: readonly QueryRead[]): void { for (const read of reads) read.dependency?.dispose(); }\nfunction disposeCheckpoint(checkpoint: Checkpoint): void {\n for (const input of checkpoint.inputs) input.dependency.dispose();\n for (const query of checkpoint.queries) disposeQueryReads(query.reads);\n}\n\n/** A query without a replayable receiver/constraint record stays on the normal path. */\nexport function declineUnrecordedAllocationMeasurement(): void {\n if (trace && trace !== measuringTrace) trace.valid = false;\n}\n\nexport interface AllocationCheckpointOptions<P extends Placement> {\n children: readonly PibblElement<any>[];\n content: Readonly<LayoutBox>;\n settings: unknown;\n flexMargins?: boolean;\n /** Numeric output of a current prerequisite phase, never its receiver leases. */\n continuation?: unknown;\n receiverTokens?: readonly object[];\n pending?: {\n read(index: number): { style: Readonly<SystemStyle>; data: unknown } | undefined;\n replay(index: number, style: Readonly<SystemStyle>, receiver: object, query: PreparedQuery | undefined, data: unknown): P;\n };\n calculate(): P[];\n onHit?(): void;\n}\n\nfunction receiverFor<P extends Placement>(options: AllocationCheckpointOptions<P>, transaction: PibblRenderTransaction, index: number): object {\n return options.receiverTokens?.[index] ?? getChildPrimitiveReceiverToken(transaction, GLOBAL_STATE.primitiveReceiverToken, index);\n}\n\n/**\n * A numeric-region checkpoint. It bypasses the actual family allocator, leaving\n * its work counters at their original call sites. Mutable input verification is\n * deliberately separate from sizing/measurement/placement visits.\n */\nexport function withAllocationCheckpoint<P extends Placement>(owner: object | undefined, options: AllocationCheckpointOptions<P>): P[] {\n const transaction = GLOBAL_STATE.renderTransaction;\n if (!owner || !transaction || !GLOBAL_STATE.primitiveReceiverToken) return options.calculate();\n const { children, content } = options;\n const containing = GLOBAL_STATE.layoutStack?.length ? getLogicalContainingBox() : content;\n const key = snapshot({ content, settings: options.settings, containing, explicitRevision: allocationExplicitRevision(), direction: getLayoutDirection() }, true, true);\n if (!key) { retireOnSuccess(owner, transaction); return options.calculate(); }\n const receivers = new Map<object, number>();\n for (let index = 0; index < children.length; index++) receivers.set(receiverFor(options, transaction, index), index);\n const continuation = options.continuation === undefined ? undefined : snapshot(options.continuation);\n if (options.continuation !== undefined && !continuation) { retireOnSuccess(owner, transaction); return options.calculate(); }\n const previous = checkpoints.get(owner);\n if (previous && same(previous.key, key) && previous.inputs.length === children.length) {\n const attempted: PreparedInputAttempt[] = [];\n const placements = reuse(owner, previous, options, transaction, receivers, attempted);\n if (placements) { options.onHit?.(); return placements; }\n // A numeric miss must consume the current preparation, not resolve its\n // signals again. Existing handoffs are scoped by transaction/receiver/box.\n for (const input of attempted) {\n replayReceiverInputProvision(transaction, input.receiver, input.receipt);\n stagePreparedStyle(children[input.index], input.receiver, content, input.prepared);\n }\n }\n const active: Trace = { receivers, inputs: children.map(() => ({})), queries: [], valid: true };\n const outer = trace; trace = active;\n let placements: P[];\n try { placements = options.calculate(); } finally { trace = outer; }\n if (!active.valid || placements.length !== children.length) { retireOnSuccess(owner, transaction); return placements; }\n const inputs: Input[] = [];\n for (const [receiver, index] of receivers) {\n const prepared = active.inputs[index].prepared;\n const raw = snapshot(children[index].props.style, true);\n const normalized = prepared && snapshot(preparedStyleValue(prepared), false, true);\n if (!prepared || !raw || !normalized || !options.pending?.read(index) && !peekPreNormalizedStyle(placements[index].element)) {\n for (const input of inputs) input.dependency.dispose();\n retireOnSuccess(owner, transaction);\n return placements;\n }\n const input: Input = { type: children[index].type, key: children[index].key, raw, normalized, prepared, receipt: active.inputs[index].receipt ?? NO_RECEIPT,\n dirty: 0, revision: 0, dependency: undefined! };\n input.dependency = new AllocationDependency(roles => { input.dirty |= roles; input.revision++; });\n inputs.push(input);\n stageAllocationDependency(transaction, receiver, input.dependency);\n }\n for (const query of active.queries) bindQueryReads(query.reads, inputs[query.index], transaction, receiverFor(options, transaction, query.index));\n const generation = checkpointGeneration(owner);\n const numericPlacements = placements.map((value, index) => {\n const pending = options.pending?.read(index);\n if (pending) return { pending: { style: { ...pending.style }, data: pending.data } };\n const { element, ...placement } = value;\n const allocated = peekPreNormalizedStyle(element)!.style as { width: number; height: number };\n return { placement: { ...placement, box: { ...placement.box } }, width: allocated.width, height: allocated.height, style: { ...peekPreNormalizedStyle(element)!.style } };\n });\n const programs = continuation && children.map((child, index) => programSnapshot(child, receiverFor(options, transaction, index)));\n const next: Checkpoint = { key, inputs, queries: active.queries, placements: numericPlacements, continuation, programs };\n transaction.onFinish(success => {\n if (!success || (checkpointGeneration(owner)) !== generation) { disposeCheckpoint(next); return; }\n const old = checkpoints.get(owner);\n if (old) disposeCheckpoint(old);\n checkpoints.set(owner, next);\n registerCheckpointDisposal(owner, () => { disposeCheckpoint(next); if (checkpoints.get(owner) === next) checkpoints.delete(owner); });\n });\n return placements;\n}\n\nfunction retireOnSuccess(owner: object, transaction: PibblRenderTransaction): void {\n const previous = checkpoints.get(owner);\n if (!previous) return;\n transaction.onFinish(success => { if (success && checkpoints.get(owner) === previous) disposeAllocationCheckpoint(owner); });\n}\n\ninterface PreparedInputAttempt { index: number; receiver: object; prepared: PreparedStyle; receipt: ReceiverInputProvisionReceipt; }\n\nfunction reuse<P extends Placement>(owner: object, checkpoint: Checkpoint, options: AllocationCheckpointOptions<P>, transaction: PibblRenderTransaction, receivers: Map<object, number>, attempted: PreparedInputAttempt[]): P[] | undefined {\n const continuation = options.continuation === undefined ? undefined : snapshot(options.continuation);\n if (continuation && !same(continuation, checkpoint.continuation)) return;\n // An absent stage means the upstream contribution was not demanded this time.\n // Reuse only while its original input program and dependencies remain clean.\n if (checkpoint.continuation && !continuation) {\n for (const [receiver, index] of receivers) {\n const program = programSnapshot(options.children[index], receiver);\n if (checkpoint.inputs[index].dirty || program?.includes(SIGNAL_STYLE_INPUT) || !same(program, checkpoint.programs?.[index])) return;\n }\n }\n const prepared: PreparedStyle[] = [];\n const rawSnapshots: Snapshot[] = [];\n const styleReads: ReceiverInputProvisionReceipt[] = [];\n const revisions: number[] = [];\n const changed = new Set<number>();\n for (const [receiver, index] of receivers) {\n const child = options.children[index], input = checkpoint.inputs[index];\n if (child.type !== input.type || child.key !== input.key) return;\n const raw = snapshot(child.props.style, true);\n if (!raw) return;\n const staged = takePreparedStyle(child, receiver, options.content);\n let current = staged ?? input.prepared;\n let geometryChanged = false;\n if (staged || raw.includes(OPAQUE_PAINT) || raw.includes(RESPONSIVE_INPUT) || raw.includes(SIGNAL_STYLE_INPUT) || preparedStyleQuery(input.prepared) || isDescription(child.type) || !same(raw, input.raw) || (input.dirty & (1 | 2 | 64))) {\n current = staged ?? prepareDirectChildStyle(child, receiver, options.content, options.flexMargins);\n geometryChanged = !same(snapshot(preparedStyleValue(current), false, true), input.normalized);\n if (!same(snapshot(preparedStyleValue(current)), snapshot(preparedStyleValue(input.prepared))) || !same(snapshot(preparedStyleQuery(current)), snapshot(preparedStyleQuery(input.prepared)))) changed.add(index);\n }\n attempted.push({ index, receiver, prepared: current, receipt: styleReceipts.get(current) ?? input.receipt });\n if (geometryChanged) return;\n prepared.push(current); rawSnapshots.push(raw); revisions.push(input.revision);\n styleReads.push(styleReceipts.get(current) ?? input.receipt);\n }\n // Query order is the allocator's original demand order. A changed contribution\n // aborts reuse immediately, so width-dependent later queries run only after a\n // new allocation has selected their new constraints.\n const nextResults: Snapshot[] = [];\n const queryProps: Array<Snapshot | undefined> = [];\n const queryReads: QueryRead[][] = [];\n const queryVolatility: boolean[] = [];\n for (const query of checkpoint.queries) {\n const input = checkpoint.inputs[query.index], child = options.children[query.index];\n const props = programSnapshot(child, receiverFor(options, transaction, query.index));\n queryProps.push(props);\n // Unknown model/getter/cyclic props cannot prove unchanged input. Execute\n // the current pure provider on every admitted render and compare its output.\n if (query.volatile || !props || props.includes(OPAQUE_PAINT) || props.includes(RESPONSIVE_INPUT) || props.includes(SIGNAL_STYLE_INPUT) || !query.props || input.dirty || changed.has(query.index) || !same(props, query.props)) {\n const element = clonePibblElement(child);\n const style = { ...query.style } as Record<string, unknown>;\n const currentStyle = preparedStyleValue(prepared[query.index]) as Record<string, unknown>;\n for (const field of Object.keys(style)) if (presentationOrMeasurement(field) && !(field in currentStyle)) delete style[field];\n for (const field of Object.keys(currentStyle)) if (presentationOrMeasurement(field)) style[field] = currentStyle[field];\n setPreNormalizedStyle(element, style, child, receiverFor(options, transaction, query.index), preparedStyleQuery(prepared[query.index]));\n const previousTrace = trace; trace = undefined;\n let collected: { result: unknown; reads: QueryRead[] | undefined; volatile: boolean };\n try { collected = collectQueryReads(getPrimitiveReceiverToken(element)!, () => query.execute(element)); } finally { trace = previousTrace; }\n const numeric = snapshot(collected.result);\n if (!collected.reads || !same(numeric, query.result)) return;\n nextResults.push(numeric!); queryReads.push(collected.reads); queryVolatility.push(collected.volatile);\n } else {\n nextResults.push(query.result); queryReads.push(query.reads); queryVolatility.push(query.volatile);\n }\n }\n for (let index = 0; index < checkpoint.queries.length; index++) {\n const query = checkpoint.queries[index];\n bindQueryReads(queryReads[index], checkpoint.inputs[query.index], transaction, receiverFor(options, transaction, query.index));\n }\n const result: P[] = [];\n for (const [receiver, index] of receivers) {\n const input = checkpoint.inputs[index], previous = checkpoint.placements[index];\n replayReceiverInputProvision(transaction, receiver, styleReads[index]);\n stageAllocationDependency(transaction, receiver, input.dependency);\n // Keep allocation-owned canonical padding/box-sizing/derived-axis markers,\n // while taking presentation and measurement fields from current normalization.\n const style = { ...(previous.pending ? previous.pending.style : previous.style) } as Record<string, unknown>;\n const current = preparedStyleValue(prepared[index]) as Record<string, unknown>;\n for (const field of Object.keys(style)) if (presentationOrMeasurement(field) && !(field in current)) delete style[field];\n for (const field of Object.keys(current)) if (presentationOrMeasurement(field)) style[field] = current[field];\n if (previous.pending) {\n if (!options.pending) return;\n result.push(options.pending.replay(index, style, receiver, preparedStyleQuery(prepared[index]), previous.pending.data));\n continue;\n }\n result.push({ ...previous.placement, element: childWithUsedSize(options.children[index], style, previous.width, previous.height, receiver, preparedStyleQuery(prepared[index])) } as P);\n }\n const nextPrograms = continuation && options.children.map((child, index) => programSnapshot(child, receiverFor(options, transaction, index)));\n transaction.onFinish(success => {\n if (!success || checkpoints.get(owner) !== checkpoint) {\n for (let index = 0; index < queryReads.length; index++) if (queryReads[index] !== checkpoint.queries[index].reads) disposeQueryReads(queryReads[index]);\n return;\n }\n if (nextPrograms) checkpoint.programs = nextPrograms;\n for (let index = 0; index < checkpoint.inputs.length; index++) {\n const input = checkpoint.inputs[index];\n input.prepared = prepared[index];\n input.raw = rawSnapshots[index];\n input.receipt = styleReads[index];\n if (input.revision === revisions[index]) input.dirty = 0;\n }\n for (let index = 0; index < checkpoint.queries.length; index++) {\n const query = checkpoint.queries[index];\n if (query.reads !== queryReads[index]) disposeQueryReads(query.reads);\n query.result = nextResults[index]; query.props = queryProps[index]; query.reads = queryReads[index]; query.volatile = queryVolatility[index];\n }\n });\n return result;\n}\n"],
5
+ "mappings": "AAAA,SAAS,kCAAkC;AAC3C,SAAS,sBAAsB,4BAA4B,mCAAmC;AAC9F,SAAS,+BAAAA,8BAA6B,wCAAwC;AAC9E,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB,sBAAsB;AAClD,SAAS,gCAAgC,2BAA2B,uBAAuB,+BAA+B;AAE1H,SAAS,UAAU,iBAAkC;AACrD,SAAS,8BAA8B,iCAAqE;AAC5G,SAAS,wBAAwB,6BAA6B;AAC9D,SAAS,oBAAoB,0BAA8C;AAE3E,SAAS,sBAAsB;AAG/B,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AAEG,SAAS,qCAAqC,SAA8B,OAA0B,cAAwC,eAA0C,WAAwC,YAAyC,UAA2C;AACzT,4BAA0B;AAAS,sBAAoB;AAAO,sBAAoB;AAAc,uBAAqB;AAAe,kBAAgB;AAAW,iBAAe;AAAY,uBAAqB;AACjN;AACA,SAAS,sBAAsB,iCAAiC;AAChE,SAAS,oBAAoB,+BAA+B;AA6C5D,MAAM,cAAc,oBAA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,QAAQ,WAAW,QAAQ,QAAS,KAAI,WAAW,KAAK,MAAM,WAAW,QAAQ,KAAK,EAAE,MAAO,mBAAkB,WAAW,KAAK,CAAC;AACtJ;AAAA,IACF;AACA,QAAI,aAAc,YAAW,WAAW;AACxC,aAAS,QAAQ,GAAG,QAAQ,WAAW,OAAO,QAAQ,SAAS;AAC7D,YAAM,QAAQ,WAAW,OAAO,KAAK;AACrC,YAAM,WAAW,SAAS,KAAK;AAC/B,YAAM,MAAM,aAAa,KAAK;AAC9B,YAAM,UAAU,WAAW,KAAK;AAChC,UAAI,MAAM,aAAa,UAAU,KAAK,EAAG,OAAM,QAAQ;AAAA,IACzD;AACA,aAAS,QAAQ,GAAG,QAAQ,WAAW,QAAQ,QAAQ,SAAS;AAC9D,YAAM,QAAQ,WAAW,QAAQ,KAAK;AACtC,UAAI,MAAM,UAAU,WAAW,KAAK,EAAG,mBAAkB,MAAM,KAAK;AACpE,YAAM,SAAS,YAAY,KAAK;AAAG,YAAM,QAAQ,WAAW,KAAK;AAAG,YAAM,QAAQ,WAAW,KAAK;AAAG,YAAM,WAAW,gBAAgB,KAAK;AAAA,IAC7I;AAAA,EACF,CAAC;AACD,SAAO;AACT;",
6
+ "names": ["disposeAllocationCheckpoint", "value", "placements", "input"]
7
+ }
@@ -0,0 +1,30 @@
1
+ import type { PibblRenderTransaction } from '../types.js';
2
+ /** One numeric contribution consumed by an allocating region. */
3
+ export declare class AllocationDependency {
4
+ private readonly invalidate;
5
+ private owner;
6
+ private disposed;
7
+ constructor(invalidate: (roles: number) => void);
8
+ notify(roles: number): void;
9
+ adopt(owner: object): void;
10
+ private detach;
11
+ release(owner: object): void;
12
+ dispose(): void;
13
+ }
14
+ /** Stage correspondence using this transaction's receiver, never an old token. */
15
+ export declare function stageAllocationDependency(transaction: PibblRenderTransaction, receiver: object, dependency: AllocationDependency): void;
16
+ /** Publish identity correspondence only after successful receiver adoption. */
17
+ export declare function adoptAllocationReceiver(transaction: PibblRenderTransaction, receiver: object, owner: object & {
18
+ readonly teardowns?: {
19
+ readonly closed: boolean;
20
+ };
21
+ }): void;
22
+ /** Called by the existing combined-role receiver consumer, before coalescing paint. */
23
+ export declare function invalidateAllocationReceiver(owner: object, roles: number): void;
24
+ /** Removal releases reverse numeric relationships without holding component refs. */
25
+ export declare function releaseAllocationReceiver(owner: object): void;
26
+ /** Internal ownership diagnostics; numeric relationships acquire no signal lease. */
27
+ export declare function snapshotAllocationDependencies(): Readonly<{
28
+ dependencies: number;
29
+ bindings: number;
30
+ }>;