@pibbl/core 0.0.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 (1069) hide show
  1. package/LICENSE.txt +19 -0
  2. package/README.md +76 -0
  3. package/THIRD_PARTY_NOTICES.txt +205 -0
  4. package/dist/features/particles/index.d.ts +7 -0
  5. package/dist/features/particles/index.js +26 -0
  6. package/dist/features/particles/index.js.map +7 -0
  7. package/dist/features/particles/index.mjs +1 -0
  8. package/dist/features/particles/lib/canvas/birth-ledger.d.ts +69 -0
  9. package/dist/features/particles/lib/canvas/birth-ledger.js +752 -0
  10. package/dist/features/particles/lib/canvas/birth-ledger.js.map +7 -0
  11. package/dist/features/particles/lib/canvas/component.d.ts +14 -0
  12. package/dist/features/particles/lib/canvas/component.js +249 -0
  13. package/dist/features/particles/lib/canvas/component.js.map +7 -0
  14. package/dist/features/particles/lib/canvas/executor.d.ts +31 -0
  15. package/dist/features/particles/lib/canvas/executor.js +537 -0
  16. package/dist/features/particles/lib/canvas/executor.js.map +7 -0
  17. package/dist/features/particles/lib/canvas/primitive.d.ts +14 -0
  18. package/dist/features/particles/lib/canvas/primitive.js +50 -0
  19. package/dist/features/particles/lib/canvas/primitive.js.map +7 -0
  20. package/dist/features/particles/lib/canvas/raster-cache.d.ts +13 -0
  21. package/dist/features/particles/lib/canvas/raster-cache.js +106 -0
  22. package/dist/features/particles/lib/canvas/raster-cache.js.map +7 -0
  23. package/dist/features/particles/lib/color.d.ts +7 -0
  24. package/dist/features/particles/lib/color.js +159 -0
  25. package/dist/features/particles/lib/color.js.map +7 -0
  26. package/dist/features/particles/lib/compiler.d.ts +134 -0
  27. package/dist/features/particles/lib/compiler.js +443 -0
  28. package/dist/features/particles/lib/compiler.js.map +7 -0
  29. package/dist/features/particles/lib/curve.d.ts +19 -0
  30. package/dist/features/particles/lib/curve.js +129 -0
  31. package/dist/features/particles/lib/curve.js.map +7 -0
  32. package/dist/features/particles/lib/definition-records.d.ts +58 -0
  33. package/dist/features/particles/lib/definition-records.js +500 -0
  34. package/dist/features/particles/lib/definition-records.js.map +7 -0
  35. package/dist/features/particles/lib/definition.d.ts +18 -0
  36. package/dist/features/particles/lib/definition.js +602 -0
  37. package/dist/features/particles/lib/definition.js.map +7 -0
  38. package/dist/features/particles/lib/emission.d.ts +54 -0
  39. package/dist/features/particles/lib/emission.js +184 -0
  40. package/dist/features/particles/lib/emission.js.map +7 -0
  41. package/dist/features/particles/lib/flow/field.d.ts +81 -0
  42. package/dist/features/particles/lib/flow/field.js +585 -0
  43. package/dist/features/particles/lib/flow/field.js.map +7 -0
  44. package/dist/features/particles/lib/flow/hook.d.ts +158 -0
  45. package/dist/features/particles/lib/flow/hook.js +215 -0
  46. package/dist/features/particles/lib/flow/hook.js.map +7 -0
  47. package/dist/features/particles/lib/flow/population.d.ts +25 -0
  48. package/dist/features/particles/lib/flow/population.js +104 -0
  49. package/dist/features/particles/lib/flow/population.js.map +7 -0
  50. package/dist/features/particles/lib/particle.d.ts +113 -0
  51. package/dist/features/particles/lib/particle.js +192 -0
  52. package/dist/features/particles/lib/particle.js.map +7 -0
  53. package/dist/features/particles/lib/random.d.ts +16 -0
  54. package/dist/features/particles/lib/random.js +61 -0
  55. package/dist/features/particles/lib/random.js.map +7 -0
  56. package/dist/features/particles/lib/sample.d.ts +32 -0
  57. package/dist/features/particles/lib/sample.js +397 -0
  58. package/dist/features/particles/lib/sample.js.map +7 -0
  59. package/dist/features/particles/lib/signal-inputs.d.ts +6 -0
  60. package/dist/features/particles/lib/signal-inputs.js +41 -0
  61. package/dist/features/particles/lib/signal-inputs.js.map +7 -0
  62. package/dist/features/particles/lib/system/binding.d.ts +59 -0
  63. package/dist/features/particles/lib/system/binding.js +122 -0
  64. package/dist/features/particles/lib/system/binding.js.map +7 -0
  65. package/dist/features/particles/lib/system/controller.d.ts +58 -0
  66. package/dist/features/particles/lib/system/controller.js +1446 -0
  67. package/dist/features/particles/lib/system/controller.js.map +7 -0
  68. package/dist/features/particles/lib/system/hook.d.ts +13 -0
  69. package/dist/features/particles/lib/system/hook.js +52 -0
  70. package/dist/features/particles/lib/system/hook.js.map +7 -0
  71. package/dist/features/particles/lib/system/ownership.d.ts +26 -0
  72. package/dist/features/particles/lib/system/ownership.js +128 -0
  73. package/dist/features/particles/lib/system/ownership.js.map +7 -0
  74. package/dist/features/particles/lib/types.d.ts +983 -0
  75. package/dist/features/physics/2d-geometry.d.ts +216 -0
  76. package/dist/features/physics/2d-geometry.js +59 -0
  77. package/dist/features/physics/2d-geometry.js.map +7 -0
  78. package/dist/features/physics/2d-geometry.mjs +1 -0
  79. package/dist/features/physics/2d-testing.d.ts +80 -0
  80. package/dist/features/physics/2d-testing.js +141 -0
  81. package/dist/features/physics/2d-testing.js.map +7 -0
  82. package/dist/features/physics/2d-testing.mjs +1 -0
  83. package/dist/features/physics/2d.d.ts +165 -0
  84. package/dist/features/physics/2d.js +119 -0
  85. package/dist/features/physics/2d.js.map +7 -0
  86. package/dist/features/physics/2d.mjs +1 -0
  87. package/dist/features/physics/lib/2d/canvas/components.d.ts +46 -0
  88. package/dist/features/physics/lib/2d/canvas/components.js +212 -0
  89. package/dist/features/physics/lib/2d/canvas/components.js.map +7 -0
  90. package/dist/features/physics/lib/2d/canvas/custom.d.ts +24 -0
  91. package/dist/features/physics/lib/2d/canvas/custom.js +45 -0
  92. package/dist/features/physics/lib/2d/canvas/custom.js.map +7 -0
  93. package/dist/features/physics/lib/2d/canvas/debug.d.ts +23 -0
  94. package/dist/features/physics/lib/2d/canvas/debug.js +53 -0
  95. package/dist/features/physics/lib/2d/canvas/debug.js.map +7 -0
  96. package/dist/features/physics/lib/2d/canvas/inference.d.ts +9 -0
  97. package/dist/features/physics/lib/2d/canvas/inference.js +704 -0
  98. package/dist/features/physics/lib/2d/canvas/inference.js.map +7 -0
  99. package/dist/features/physics/lib/2d/canvas/presentation.d.ts +11 -0
  100. package/dist/features/physics/lib/2d/canvas/presentation.js +169 -0
  101. package/dist/features/physics/lib/2d/canvas/presentation.js.map +7 -0
  102. package/dist/features/physics/lib/2d/collision/analytic.d.ts +15 -0
  103. package/dist/features/physics/lib/2d/collision/analytic.js +151 -0
  104. package/dist/features/physics/lib/2d/collision/analytic.js.map +7 -0
  105. package/dist/features/physics/lib/2d/collision/casts.d.ts +37 -0
  106. package/dist/features/physics/lib/2d/collision/casts.js +631 -0
  107. package/dist/features/physics/lib/2d/collision/casts.js.map +7 -0
  108. package/dist/features/physics/lib/2d/collision/epa.d.ts +21 -0
  109. package/dist/features/physics/lib/2d/collision/epa.js +102 -0
  110. package/dist/features/physics/lib/2d/collision/epa.js.map +7 -0
  111. package/dist/features/physics/lib/2d/collision/gjk.d.ts +28 -0
  112. package/dist/features/physics/lib/2d/collision/gjk.js +233 -0
  113. package/dist/features/physics/lib/2d/collision/gjk.js.map +7 -0
  114. package/dist/features/physics/lib/2d/collision/manifold.d.ts +35 -0
  115. package/dist/features/physics/lib/2d/collision/manifold.js +238 -0
  116. package/dist/features/physics/lib/2d/collision/manifold.js.map +7 -0
  117. package/dist/features/physics/lib/2d/collision/pairs.d.ts +10 -0
  118. package/dist/features/physics/lib/2d/collision/pairs.js +285 -0
  119. package/dist/features/physics/lib/2d/collision/pairs.js.map +7 -0
  120. package/dist/features/physics/lib/2d/collision/support.d.ts +20 -0
  121. package/dist/features/physics/lib/2d/collision/support.js +155 -0
  122. package/dist/features/physics/lib/2d/collision/support.js.map +7 -0
  123. package/dist/features/physics/lib/2d/inspection-types.d.ts +159 -0
  124. package/dist/features/physics/lib/2d/math.d.ts +27 -0
  125. package/dist/features/physics/lib/2d/math.js +314 -0
  126. package/dist/features/physics/lib/2d/math.js.map +7 -0
  127. package/dist/features/physics/lib/2d/numeric-policy.d.ts +24 -0
  128. package/dist/features/physics/lib/2d/numeric-policy.js +51 -0
  129. package/dist/features/physics/lib/2d/numeric-policy.js.map +7 -0
  130. package/dist/features/physics/lib/2d/runtime/body-handle.d.ts +148 -0
  131. package/dist/features/physics/lib/2d/runtime/body-handle.js +305 -0
  132. package/dist/features/physics/lib/2d/runtime/body-handle.js.map +7 -0
  133. package/dist/features/physics/lib/2d/runtime/context.d.ts +9 -0
  134. package/dist/features/physics/lib/2d/runtime/context.js +57 -0
  135. package/dist/features/physics/lib/2d/runtime/context.js.map +7 -0
  136. package/dist/features/physics/lib/2d/runtime/controller.d.ts +106 -0
  137. package/dist/features/physics/lib/2d/runtime/controller.js +1317 -0
  138. package/dist/features/physics/lib/2d/runtime/controller.js.map +7 -0
  139. package/dist/features/physics/lib/2d/runtime/descriptors.d.ts +153 -0
  140. package/dist/features/physics/lib/2d/runtime/descriptors.js +526 -0
  141. package/dist/features/physics/lib/2d/runtime/descriptors.js.map +7 -0
  142. package/dist/features/physics/lib/2d/runtime/events.d.ts +56 -0
  143. package/dist/features/physics/lib/2d/runtime/events.js +153 -0
  144. package/dist/features/physics/lib/2d/runtime/events.js.map +7 -0
  145. package/dist/features/physics/lib/2d/runtime/obstacles.d.ts +22 -0
  146. package/dist/features/physics/lib/2d/runtime/obstacles.js +192 -0
  147. package/dist/features/physics/lib/2d/runtime/obstacles.js.map +7 -0
  148. package/dist/features/physics/lib/2d/runtime/ownership.d.ts +41 -0
  149. package/dist/features/physics/lib/2d/runtime/ownership.js +46 -0
  150. package/dist/features/physics/lib/2d/runtime/ownership.js.map +7 -0
  151. package/dist/features/physics/lib/2d/runtime/trace.d.ts +32 -0
  152. package/dist/features/physics/lib/2d/runtime/trace.js +22 -0
  153. package/dist/features/physics/lib/2d/runtime/trace.js.map +7 -0
  154. package/dist/features/physics/lib/2d/runtime/world-component.d.ts +18 -0
  155. package/dist/features/physics/lib/2d/runtime/world-component.js +41 -0
  156. package/dist/features/physics/lib/2d/runtime/world-component.js.map +7 -0
  157. package/dist/features/physics/lib/2d/runtime/world-props.d.ts +16 -0
  158. package/dist/features/physics/lib/2d/shape-records.d.ts +60 -0
  159. package/dist/features/physics/lib/2d/shape-records.js +26 -0
  160. package/dist/features/physics/lib/2d/shape-records.js.map +7 -0
  161. package/dist/features/physics/lib/2d/shapes.d.ts +191 -0
  162. package/dist/features/physics/lib/2d/shapes.js +543 -0
  163. package/dist/features/physics/lib/2d/shapes.js.map +7 -0
  164. package/dist/features/physics/lib/2d/types.d.ts +713 -0
  165. package/dist/features/physics/lib/2d/types.js +1 -0
  166. package/dist/features/physics/lib/2d/types.js.map +7 -0
  167. package/dist/features/physics/lib/2d/world/broad-phase.d.ts +77 -0
  168. package/dist/features/physics/lib/2d/world/broad-phase.js +762 -0
  169. package/dist/features/physics/lib/2d/world/broad-phase.js.map +7 -0
  170. package/dist/features/physics/lib/2d/world/ccd.d.ts +19 -0
  171. package/dist/features/physics/lib/2d/world/ccd.js +265 -0
  172. package/dist/features/physics/lib/2d/world/ccd.js.map +7 -0
  173. package/dist/features/physics/lib/2d/world/contact-cache.d.ts +81 -0
  174. package/dist/features/physics/lib/2d/world/contact-cache.js +497 -0
  175. package/dist/features/physics/lib/2d/world/contact-cache.js.map +7 -0
  176. package/dist/features/physics/lib/2d/world/integrator.d.ts +11 -0
  177. package/dist/features/physics/lib/2d/world/integrator.js +99 -0
  178. package/dist/features/physics/lib/2d/world/integrator.js.map +7 -0
  179. package/dist/features/physics/lib/2d/world/queries.d.ts +62 -0
  180. package/dist/features/physics/lib/2d/world/queries.js +424 -0
  181. package/dist/features/physics/lib/2d/world/queries.js.map +7 -0
  182. package/dist/features/physics/lib/2d/world/rapier-engine.js +7054 -0
  183. package/dist/features/physics/lib/2d/world/rapier-engine.js.map +7 -0
  184. package/dist/features/physics/lib/2d/world/rapier.d.ts +50 -0
  185. package/dist/features/physics/lib/2d/world/rapier.js +655 -0
  186. package/dist/features/physics/lib/2d/world/rapier.js.map +7 -0
  187. package/dist/features/physics/lib/2d/world/solver.d.ts +58 -0
  188. package/dist/features/physics/lib/2d/world/solver.js +660 -0
  189. package/dist/features/physics/lib/2d/world/solver.js.map +7 -0
  190. package/dist/features/physics/lib/2d/world/storage.d.ts +96 -0
  191. package/dist/features/physics/lib/2d/world/storage.js +371 -0
  192. package/dist/features/physics/lib/2d/world/storage.js.map +7 -0
  193. package/dist/features/physics/lib/2d/world/world.d.ts +265 -0
  194. package/dist/features/physics/lib/2d/world/world.js +1713 -0
  195. package/dist/features/physics/lib/2d/world/world.js.map +7 -0
  196. package/dist/features/physics/lib/shared/signal-inputs.d.ts +5 -0
  197. package/dist/features/physics/lib/shared/signal-inputs.js +20 -0
  198. package/dist/features/physics/lib/shared/signal-inputs.js.map +7 -0
  199. package/dist/features/physics/lib/shared/validation.d.ts +5 -0
  200. package/dist/features/physics/lib/shared/validation.js +48 -0
  201. package/dist/features/physics/lib/shared/validation.js.map +7 -0
  202. package/dist/features/sprites/formats/aseprite.js +23 -0
  203. package/dist/features/sprites/formats/aseprite.js.map +7 -0
  204. package/dist/features/sprites/formats/aseprite.mjs +1 -0
  205. package/dist/features/sprites/formats/texture-packer.js +14 -0
  206. package/dist/features/sprites/formats/texture-packer.js.map +7 -0
  207. package/dist/features/sprites/formats/texture-packer.mjs +1 -0
  208. package/dist/features/sprites/index.js +9 -0
  209. package/dist/features/sprites/index.js.map +7 -0
  210. package/dist/features/sprites/index.mjs +1 -0
  211. package/dist/features/sprites/loader.js +63 -0
  212. package/dist/features/sprites/loader.js.map +7 -0
  213. package/dist/features/sprites/model.js +64 -0
  214. package/dist/features/sprites/model.js.map +7 -0
  215. package/dist/features/sprites/sprite.js +31 -0
  216. package/dist/features/sprites/sprite.js.map +7 -0
  217. package/dist/features/textures/index.d.ts +22 -0
  218. package/dist/features/textures/index.js +31 -0
  219. package/dist/features/textures/index.js.map +7 -0
  220. package/dist/features/textures/index.mjs +1 -0
  221. package/dist/features/textures/lib/definitions.d.ts +117 -0
  222. package/dist/features/textures/lib/definitions.js +179 -0
  223. package/dist/features/textures/lib/definitions.js.map +7 -0
  224. package/dist/features/textures/lib/electric-boundary.d.ts +3 -0
  225. package/dist/features/textures/lib/electric-boundary.js +11 -0
  226. package/dist/features/textures/lib/electric-boundary.js.map +7 -0
  227. package/dist/features/textures/lib/electric-shared.d.ts +69 -0
  228. package/dist/features/textures/lib/electric-shared.js +43 -0
  229. package/dist/features/textures/lib/electric-shared.js.map +7 -0
  230. package/dist/features/textures/lib/electric-sources.d.ts +50 -0
  231. package/dist/features/textures/lib/electric-sources.js +43 -0
  232. package/dist/features/textures/lib/electric-sources.js.map +7 -0
  233. package/dist/features/textures/lib/lightning.d.ts +72 -0
  234. package/dist/features/textures/lib/lightning.js +139 -0
  235. package/dist/features/textures/lib/lightning.js.map +7 -0
  236. package/dist/features/textures/lib/material-field.d.ts +12 -0
  237. package/dist/features/textures/lib/material-field.js +31 -0
  238. package/dist/features/textures/lib/material-field.js.map +7 -0
  239. package/dist/features/textures/lib/palette.d.ts +45 -0
  240. package/dist/features/textures/lib/palette.js +52 -0
  241. package/dist/features/textures/lib/palette.js.map +7 -0
  242. package/dist/features/textures/lib/presentation.d.ts +54 -0
  243. package/dist/features/textures/lib/presentation.js +83 -0
  244. package/dist/features/textures/lib/presentation.js.map +7 -0
  245. package/dist/features/textures/lib/procedural-texture.d.ts +44 -0
  246. package/dist/features/textures/lib/procedural-texture.js +110 -0
  247. package/dist/features/textures/lib/procedural-texture.js.map +7 -0
  248. package/dist/features/textures/lib/rain-drops.d.ts +96 -0
  249. package/dist/features/textures/lib/rain-drops.js +322 -0
  250. package/dist/features/textures/lib/rain-drops.js.map +7 -0
  251. package/dist/features/textures/lib/reaction-diffusion.d.ts +67 -0
  252. package/dist/features/textures/lib/reaction-diffusion.js +210 -0
  253. package/dist/features/textures/lib/reaction-diffusion.js.map +7 -0
  254. package/dist/features/textures/lib/simulation.d.ts +16 -0
  255. package/dist/features/textures/lib/simulation.js +85 -0
  256. package/dist/features/textures/lib/simulation.js.map +7 -0
  257. package/dist/features/textures/lib/tendrils.d.ts +57 -0
  258. package/dist/features/textures/lib/tendrils.js +216 -0
  259. package/dist/features/textures/lib/tendrils.js.map +7 -0
  260. package/dist/features/textures/lib/wasm/cellular-bytes.d.ts +1 -0
  261. package/dist/features/textures/lib/wasm/cellular-bytes.js +5 -0
  262. package/dist/features/textures/lib/wasm/cellular-bytes.js.map +7 -0
  263. package/dist/features/textures/lib/wasm/electric.d.ts +88 -0
  264. package/dist/features/textures/lib/wasm/electric.js +299 -0
  265. package/dist/features/textures/lib/wasm/electric.js.map +7 -0
  266. package/dist/features/textures/lib/wasm/ink-bytes.d.ts +1 -0
  267. package/dist/features/textures/lib/wasm/ink-bytes.js +5 -0
  268. package/dist/features/textures/lib/wasm/ink-bytes.js.map +7 -0
  269. package/dist/features/textures/lib/wasm/lightning-bytes.d.ts +1 -0
  270. package/dist/features/textures/lib/wasm/lightning-bytes.js +5 -0
  271. package/dist/features/textures/lib/wasm/lightning-bytes.js.map +7 -0
  272. package/dist/features/textures/lib/wasm/marble-bytes.d.ts +1 -0
  273. package/dist/features/textures/lib/wasm/marble-bytes.js +5 -0
  274. package/dist/features/textures/lib/wasm/marble-bytes.js.map +7 -0
  275. package/dist/features/textures/lib/wasm/memory.d.ts +31 -0
  276. package/dist/features/textures/lib/wasm/memory.js +103 -0
  277. package/dist/features/textures/lib/wasm/memory.js.map +7 -0
  278. package/dist/features/textures/lib/wasm/paper-bytes.d.ts +1 -0
  279. package/dist/features/textures/lib/wasm/paper-bytes.js +5 -0
  280. package/dist/features/textures/lib/wasm/paper-bytes.js.map +7 -0
  281. package/dist/features/textures/lib/wasm/tendrils-bytes.d.ts +1 -0
  282. package/dist/features/textures/lib/wasm/tendrils-bytes.js +5 -0
  283. package/dist/features/textures/lib/wasm/tendrils-bytes.js.map +7 -0
  284. package/dist/features/textures/lib/wasm/water-surface-bytes.d.ts +1 -0
  285. package/dist/features/textures/lib/wasm/water-surface-bytes.js +5 -0
  286. package/dist/features/textures/lib/wasm/water-surface-bytes.js.map +7 -0
  287. package/dist/features/textures/lib/wasm/water-waves-bytes.d.ts +1 -0
  288. package/dist/features/textures/lib/wasm/water-waves-bytes.js +5 -0
  289. package/dist/features/textures/lib/wasm/water-waves-bytes.js.map +7 -0
  290. package/dist/features/textures/lib/water-surface.d.ts +92 -0
  291. package/dist/features/textures/lib/water-surface.js +378 -0
  292. package/dist/features/textures/lib/water-surface.js.map +7 -0
  293. package/dist/features/textures/lib/water-waves.d.ts +60 -0
  294. package/dist/features/textures/lib/water-waves.js +154 -0
  295. package/dist/features/textures/lib/water-waves.js.map +7 -0
  296. package/dist/features/viz/index.d.ts +28 -0
  297. package/dist/features/viz/index.js +45 -0
  298. package/dist/features/viz/index.js.map +7 -0
  299. package/dist/features/viz/index.mjs +1 -0
  300. package/dist/features/viz/lib/anchored-layout.d.ts +104 -0
  301. package/dist/features/viz/lib/anchored-layout.js +166 -0
  302. package/dist/features/viz/lib/anchored-layout.js.map +7 -0
  303. package/dist/features/viz/lib/axis.d.ts +10 -0
  304. package/dist/features/viz/lib/axis.js +116 -0
  305. package/dist/features/viz/lib/axis.js.map +7 -0
  306. package/dist/features/viz/lib/band-scale.d.ts +3 -0
  307. package/dist/features/viz/lib/band-scale.js +57 -0
  308. package/dist/features/viz/lib/band-scale.js.map +7 -0
  309. package/dist/features/viz/lib/bar-fill.d.ts +16 -0
  310. package/dist/features/viz/lib/bar-fill.js +53 -0
  311. package/dist/features/viz/lib/bar-fill.js.map +7 -0
  312. package/dist/features/viz/lib/bar-series.d.ts +150 -0
  313. package/dist/features/viz/lib/bar-series.js +152 -0
  314. package/dist/features/viz/lib/bar-series.js.map +7 -0
  315. package/dist/features/viz/lib/hover-card.d.ts +92 -0
  316. package/dist/features/viz/lib/hover-card.js +146 -0
  317. package/dist/features/viz/lib/hover-card.js.map +7 -0
  318. package/dist/features/viz/lib/hover-data.d.ts +12 -0
  319. package/dist/features/viz/lib/hover-data.js +50 -0
  320. package/dist/features/viz/lib/hover-data.js.map +7 -0
  321. package/dist/features/viz/lib/hover-placement.d.ts +46 -0
  322. package/dist/features/viz/lib/hover-placement.js +51 -0
  323. package/dist/features/viz/lib/hover-placement.js.map +7 -0
  324. package/dist/features/viz/lib/hover-queries.d.ts +60 -0
  325. package/dist/features/viz/lib/hover-queries.js +185 -0
  326. package/dist/features/viz/lib/hover-queries.js.map +7 -0
  327. package/dist/features/viz/lib/hover-types.d.ts +277 -0
  328. package/dist/features/viz/lib/layout-pie.d.ts +13 -0
  329. package/dist/features/viz/lib/layout-pie.js +159 -0
  330. package/dist/features/viz/lib/layout-pie.js.map +7 -0
  331. package/dist/features/viz/lib/line-series.d.ts +11 -0
  332. package/dist/features/viz/lib/line-series.js +89 -0
  333. package/dist/features/viz/lib/line-series.js.map +7 -0
  334. package/dist/features/viz/lib/linear-scale.d.ts +3 -0
  335. package/dist/features/viz/lib/linear-scale.js +70 -0
  336. package/dist/features/viz/lib/linear-scale.js.map +7 -0
  337. package/dist/features/viz/lib/nearest.d.ts +82 -0
  338. package/dist/features/viz/lib/nearest.js +51 -0
  339. package/dist/features/viz/lib/nearest.js.map +7 -0
  340. package/dist/features/viz/lib/paint.d.ts +2 -0
  341. package/dist/features/viz/lib/paint.js +17 -0
  342. package/dist/features/viz/lib/paint.js.map +7 -0
  343. package/dist/features/viz/lib/pie-layout.d.ts +31 -0
  344. package/dist/features/viz/lib/pie-layout.js +324 -0
  345. package/dist/features/viz/lib/pie-layout.js.map +7 -0
  346. package/dist/features/viz/lib/pie-slices.d.ts +51 -0
  347. package/dist/features/viz/lib/pie-slices.js +50 -0
  348. package/dist/features/viz/lib/pie-slices.js.map +7 -0
  349. package/dist/features/viz/lib/pie-types.d.ts +215 -0
  350. package/dist/features/viz/lib/plot-series.d.ts +13 -0
  351. package/dist/features/viz/lib/plot-series.js +53 -0
  352. package/dist/features/viz/lib/plot-series.js.map +7 -0
  353. package/dist/features/viz/lib/plot-types.d.ts +63 -0
  354. package/dist/features/viz/lib/point-data.d.ts +5 -0
  355. package/dist/features/viz/lib/point-data.js +17 -0
  356. package/dist/features/viz/lib/point-data.js.map +7 -0
  357. package/dist/features/viz/lib/point-geometry.d.ts +2 -0
  358. package/dist/features/viz/lib/point-geometry.js +24 -0
  359. package/dist/features/viz/lib/point-geometry.js.map +7 -0
  360. package/dist/features/viz/lib/point-series.d.ts +11 -0
  361. package/dist/features/viz/lib/point-series.js +118 -0
  362. package/dist/features/viz/lib/point-series.js.map +7 -0
  363. package/dist/features/viz/lib/point-types.d.ts +94 -0
  364. package/dist/features/viz/lib/scale-adjust.d.ts +11 -0
  365. package/dist/features/viz/lib/scale-adjust.js +25 -0
  366. package/dist/features/viz/lib/scale-adjust.js.map +7 -0
  367. package/dist/features/viz/lib/scale-context.d.ts +8 -0
  368. package/dist/features/viz/lib/scale-context.js +61 -0
  369. package/dist/features/viz/lib/scale-context.js.map +7 -0
  370. package/dist/features/viz/lib/scale.d.ts +11 -0
  371. package/dist/features/viz/lib/scale.js +80 -0
  372. package/dist/features/viz/lib/scale.js.map +7 -0
  373. package/dist/features/viz/lib/types.d.ts +414 -0
  374. package/dist/features/viz/lib/use-scale.d.ts +20 -0
  375. package/dist/features/viz/lib/use-scale.js +10 -0
  376. package/dist/features/viz/lib/use-scale.js.map +7 -0
  377. package/dist/filters/displacement-gpu.d.ts +38 -0
  378. package/dist/filters/displacement-gpu.js +243 -0
  379. package/dist/filters/displacement-gpu.js.map +7 -0
  380. package/dist/filters/displacement-math.d.ts +5 -0
  381. package/dist/filters/displacement-math.js +22 -0
  382. package/dist/filters/displacement-math.js.map +7 -0
  383. package/dist/filters/displacement.d.ts +13 -0
  384. package/dist/filters/displacement.js +65 -0
  385. package/dist/filters/displacement.js.map +7 -0
  386. package/dist/filters/filter-executor.d.ts +21 -0
  387. package/dist/filters/filter-executor.js +120 -0
  388. package/dist/filters/filter-executor.js.map +7 -0
  389. package/dist/filters/native-canvas-filter.d.ts +4 -0
  390. package/dist/filters/native-canvas-filter.js +105 -0
  391. package/dist/filters/native-canvas-filter.js.map +7 -0
  392. package/dist/filters/native-color.d.ts +2 -0
  393. package/dist/filters/native-color.js +200 -0
  394. package/dist/filters/native-color.js.map +7 -0
  395. package/dist/filters/native-operations.d.ts +8 -0
  396. package/dist/filters/native-operations.js +7 -0
  397. package/dist/filters/native-operations.js.map +7 -0
  398. package/dist/filters/native.d.ts +113 -0
  399. package/dist/filters/native.js +115 -0
  400. package/dist/filters/native.js.map +7 -0
  401. package/dist/filters/reflected-light.d.ts +12 -0
  402. package/dist/filters/reflected-light.js +93 -0
  403. package/dist/filters/reflected-light.js.map +7 -0
  404. package/dist/filters/reflection-gpu.d.ts +58 -0
  405. package/dist/filters/reflection-gpu.js +266 -0
  406. package/dist/filters/reflection-gpu.js.map +7 -0
  407. package/dist/filters/render-displacement-boundary.d.ts +12 -0
  408. package/dist/filters/render-displacement-boundary.js +116 -0
  409. package/dist/filters/render-displacement-boundary.js.map +7 -0
  410. package/dist/filters/render-reflection-boundary.d.ts +15 -0
  411. package/dist/filters/render-reflection-boundary.js +127 -0
  412. package/dist/filters/render-reflection-boundary.js.map +7 -0
  413. package/dist/filters.d.ts +5 -0
  414. package/dist/filters.js +29 -0
  415. package/dist/filters.js.map +7 -0
  416. package/dist/filters.mjs +1 -0
  417. package/dist/index.d.ts +111 -0
  418. package/dist/index.js +300 -0
  419. package/dist/index.js.map +7 -0
  420. package/dist/index.mjs +1 -0
  421. package/dist/internal.d.ts +160 -0
  422. package/dist/internal.js +320 -0
  423. package/dist/internal.js.map +7 -0
  424. package/dist/internal.mjs +1 -0
  425. package/dist/jsx-dev-runtime.d.ts +35 -0
  426. package/dist/jsx-dev-runtime.js +6 -0
  427. package/dist/jsx-dev-runtime.js.map +7 -0
  428. package/dist/jsx-dev-runtime.mjs +1 -0
  429. package/dist/jsx-runtime.d.ts +35 -0
  430. package/dist/jsx-runtime.js +7 -0
  431. package/dist/jsx-runtime.js.map +7 -0
  432. package/dist/jsx-runtime.mjs +1 -0
  433. package/dist/lib/animation/definition.d.ts +140 -0
  434. package/dist/lib/animation/definition.js +605 -0
  435. package/dist/lib/animation/definition.js.map +7 -0
  436. package/dist/lib/animation/easing.d.ts +55 -0
  437. package/dist/lib/animation/easing.js +112 -0
  438. package/dist/lib/animation/easing.js.map +7 -0
  439. package/dist/lib/animation/evaluate.d.ts +118 -0
  440. package/dist/lib/animation/evaluate.js +2398 -0
  441. package/dist/lib/animation/evaluate.js.map +7 -0
  442. package/dist/lib/animation/playback.d.ts +30 -0
  443. package/dist/lib/animation/playback.js +932 -0
  444. package/dist/lib/animation/playback.js.map +7 -0
  445. package/dist/lib/animation/program.d.ts +145 -0
  446. package/dist/lib/animation/program.js +741 -0
  447. package/dist/lib/animation/program.js.map +7 -0
  448. package/dist/lib/animation/spring.d.ts +30 -0
  449. package/dist/lib/animation/spring.js +324 -0
  450. package/dist/lib/animation/spring.js.map +7 -0
  451. package/dist/lib/animation/types.d.ts +418 -0
  452. package/dist/lib/animation/writer-leases.d.ts +47 -0
  453. package/dist/lib/animation/writer-leases.js +314 -0
  454. package/dist/lib/animation/writer-leases.js.map +7 -0
  455. package/dist/lib/backend/canvas-2d-backend.d.ts +4 -0
  456. package/dist/lib/backend/canvas-2d-backend.js +97 -0
  457. package/dist/lib/backend/canvas-2d-backend.js.map +7 -0
  458. package/dist/lib/backend/types.d.ts +309 -0
  459. package/dist/lib/backend/types.js +26 -0
  460. package/dist/lib/backend/types.js.map +7 -0
  461. package/dist/lib/components/arc-geometry.d.ts +4 -0
  462. package/dist/lib/components/arc-geometry.js +46 -0
  463. package/dist/lib/components/arc-geometry.js.map +7 -0
  464. package/dist/lib/components/arc.d.ts +55 -0
  465. package/dist/lib/components/arc.js +91 -0
  466. package/dist/lib/components/arc.js.map +7 -0
  467. package/dist/lib/components/circle.d.ts +49 -0
  468. package/dist/lib/components/circle.js +46 -0
  469. package/dist/lib/components/circle.js.map +7 -0
  470. package/dist/lib/components/clip.d.ts +43 -0
  471. package/dist/lib/components/clip.js +24 -0
  472. package/dist/lib/components/clip.js.map +7 -0
  473. package/dist/lib/components/ellipse.d.ts +53 -0
  474. package/dist/lib/components/ellipse.js +59 -0
  475. package/dist/lib/components/ellipse.js.map +7 -0
  476. package/dist/lib/components/g.d.ts +56 -0
  477. package/dist/lib/components/g.js +24 -0
  478. package/dist/lib/components/g.js.map +7 -0
  479. package/dist/lib/components/horizontal-line.d.ts +56 -0
  480. package/dist/lib/components/horizontal-line.js +71 -0
  481. package/dist/lib/components/horizontal-line.js.map +7 -0
  482. package/dist/lib/components/html-box.d.ts +16 -0
  483. package/dist/lib/components/html-box.js +57 -0
  484. package/dist/lib/components/html-box.js.map +7 -0
  485. package/dist/lib/components/img.d.ts +24 -0
  486. package/dist/lib/components/img.js +150 -0
  487. package/dist/lib/components/img.js.map +7 -0
  488. package/dist/lib/components/layer-node-equality.d.ts +65 -0
  489. package/dist/lib/components/layer-node-equality.js +91 -0
  490. package/dist/lib/components/layer-node-equality.js.map +7 -0
  491. package/dist/lib/components/layer.d.ts +34 -0
  492. package/dist/lib/components/layer.js +172 -0
  493. package/dist/lib/components/layer.js.map +7 -0
  494. package/dist/lib/components/line.d.ts +51 -0
  495. package/dist/lib/components/line.js +76 -0
  496. package/dist/lib/components/line.js.map +7 -0
  497. package/dist/lib/components/path.d.ts +28 -0
  498. package/dist/lib/components/path.js +47 -0
  499. package/dist/lib/components/path.js.map +7 -0
  500. package/dist/lib/components/polygon.d.ts +45 -0
  501. package/dist/lib/components/polygon.js +93 -0
  502. package/dist/lib/components/polygon.js.map +7 -0
  503. package/dist/lib/components/rect.d.ts +24 -0
  504. package/dist/lib/components/rect.js +83 -0
  505. package/dist/lib/components/rect.js.map +7 -0
  506. package/dist/lib/components/regular-polygon.d.ts +102 -0
  507. package/dist/lib/components/regular-polygon.js +112 -0
  508. package/dist/lib/components/regular-polygon.js.map +7 -0
  509. package/dist/lib/components/rounded-corner-style.d.ts +7 -0
  510. package/dist/lib/components/rounded-corner-style.js +40 -0
  511. package/dist/lib/components/rounded-corner-style.js.map +7 -0
  512. package/dist/lib/components/shape-style.d.ts +7 -0
  513. package/dist/lib/components/shape-style.js +52 -0
  514. package/dist/lib/components/shape-style.js.map +7 -0
  515. package/dist/lib/components/star.d.ts +56 -0
  516. package/dist/lib/components/star.js +98 -0
  517. package/dist/lib/components/star.js.map +7 -0
  518. package/dist/lib/components/structural-events.d.ts +10 -0
  519. package/dist/lib/components/structural-events.js +8 -0
  520. package/dist/lib/components/structural-events.js.map +7 -0
  521. package/dist/lib/components/svg-path.d.ts +23 -0
  522. package/dist/lib/components/svg-path.js +25 -0
  523. package/dist/lib/components/svg-path.js.map +7 -0
  524. package/dist/lib/components/text-layout.d.ts +31 -0
  525. package/dist/lib/components/text-layout.js +139 -0
  526. package/dist/lib/components/text-layout.js.map +7 -0
  527. package/dist/lib/components/text.d.ts +29 -0
  528. package/dist/lib/components/text.js +174 -0
  529. package/dist/lib/components/text.js.map +7 -0
  530. package/dist/lib/components/vertical-line.d.ts +57 -0
  531. package/dist/lib/components/vertical-line.js +71 -0
  532. package/dist/lib/components/vertical-line.js.map +7 -0
  533. package/dist/lib/components/wedge.d.ts +55 -0
  534. package/dist/lib/components/wedge.js +93 -0
  535. package/dist/lib/components/wedge.js.map +7 -0
  536. package/dist/lib/define-primitive.d.ts +82 -0
  537. package/dist/lib/define-primitive.js +85 -0
  538. package/dist/lib/define-primitive.js.map +7 -0
  539. package/dist/lib/development.d.ts +2 -0
  540. package/dist/lib/development.js +5 -0
  541. package/dist/lib/development.js.map +7 -0
  542. package/dist/lib/element/children.d.ts +16 -0
  543. package/dist/lib/element/children.js +333 -0
  544. package/dist/lib/element/children.js.map +7 -0
  545. package/dist/lib/element/create-element.d.ts +34 -0
  546. package/dist/lib/element/create-element.js +75 -0
  547. package/dist/lib/element/create-element.js.map +7 -0
  548. package/dist/lib/element/fragment.d.ts +15 -0
  549. package/dist/lib/element/fragment.js +11 -0
  550. package/dist/lib/element/fragment.js.map +7 -0
  551. package/dist/lib/element/jsx-runtime.d.ts +48 -0
  552. package/dist/lib/element/jsx-runtime.js +16 -0
  553. package/dist/lib/element/jsx-runtime.js.map +7 -0
  554. package/dist/lib/element/metadata.d.ts +96 -0
  555. package/dist/lib/element/metadata.js +160 -0
  556. package/dist/lib/element/metadata.js.map +7 -0
  557. package/dist/lib/element/resolve-primitive-inputs.d.ts +12 -0
  558. package/dist/lib/element/resolve-primitive-inputs.js +83 -0
  559. package/dist/lib/element/resolve-primitive-inputs.js.map +7 -0
  560. package/dist/lib/element/types.d.ts +123 -0
  561. package/dist/lib/element-enhancers.d.ts +134 -0
  562. package/dist/lib/element-enhancers.js +193 -0
  563. package/dist/lib/element-enhancers.js.map +7 -0
  564. package/dist/lib/events/adapters/clipboard.d.ts +9 -0
  565. package/dist/lib/events/adapters/clipboard.js +23 -0
  566. package/dist/lib/events/adapters/clipboard.js.map +7 -0
  567. package/dist/lib/events/adapters/drag.d.ts +12 -0
  568. package/dist/lib/events/adapters/drag.js +29 -0
  569. package/dist/lib/events/adapters/drag.js.map +7 -0
  570. package/dist/lib/events/adapters/editing.d.ts +15 -0
  571. package/dist/lib/events/adapters/editing.js +41 -0
  572. package/dist/lib/events/adapters/editing.js.map +7 -0
  573. package/dist/lib/events/adapters/keyboard-focus.d.ts +12 -0
  574. package/dist/lib/events/adapters/keyboard-focus.js +36 -0
  575. package/dist/lib/events/adapters/keyboard-focus.js.map +7 -0
  576. package/dist/lib/events/adapters/mouse.d.ts +17 -0
  577. package/dist/lib/events/adapters/mouse.js +32 -0
  578. package/dist/lib/events/adapters/mouse.js.map +7 -0
  579. package/dist/lib/events/adapters/pointer.d.ts +19 -0
  580. package/dist/lib/events/adapters/pointer.js +40 -0
  581. package/dist/lib/events/adapters/pointer.js.map +7 -0
  582. package/dist/lib/events/adapters/touch.d.ts +16 -0
  583. package/dist/lib/events/adapters/touch.js +36 -0
  584. package/dist/lib/events/adapters/touch.js.map +7 -0
  585. package/dist/lib/events/adapters/wheel.d.ts +10 -0
  586. package/dist/lib/events/adapters/wheel.js +16 -0
  587. package/dist/lib/events/adapters/wheel.js.map +7 -0
  588. package/dist/lib/events/boundary-transitions.d.ts +9 -0
  589. package/dist/lib/events/boundary-transitions.js +16 -0
  590. package/dist/lib/events/boundary-transitions.js.map +7 -0
  591. package/dist/lib/events/dispatch.d.ts +21 -0
  592. package/dist/lib/events/dispatch.js +1078 -0
  593. package/dist/lib/events/dispatch.js.map +7 -0
  594. package/dist/lib/events/event-definitions.d.ts +23 -0
  595. package/dist/lib/events/event-definitions.js +74 -0
  596. package/dist/lib/events/event-definitions.js.map +7 -0
  597. package/dist/lib/events/event-facade.d.ts +19 -0
  598. package/dist/lib/events/event-facade.js +188 -0
  599. package/dist/lib/events/event-facade.js.map +7 -0
  600. package/dist/lib/events/event-path.d.ts +3 -0
  601. package/dist/lib/events/event-path.js +43 -0
  602. package/dist/lib/events/event-path.js.map +7 -0
  603. package/dist/lib/events/hit-test.d.ts +13 -0
  604. package/dist/lib/events/hit-test.js +135 -0
  605. package/dist/lib/events/hit-test.js.map +7 -0
  606. package/dist/lib/events/native-listener-hub.d.ts +10 -0
  607. package/dist/lib/events/native-listener-hub.js +72 -0
  608. package/dist/lib/events/native-listener-hub.js.map +7 -0
  609. package/dist/lib/events/paint-entry.d.ts +66 -0
  610. package/dist/lib/events/paint-entry.js +30 -0
  611. package/dist/lib/events/paint-entry.js.map +7 -0
  612. package/dist/lib/events/pointer-capture.d.ts +23 -0
  613. package/dist/lib/events/pointer-capture.js +339 -0
  614. package/dist/lib/events/pointer-capture.js.map +7 -0
  615. package/dist/lib/events/propagation.d.ts +7 -0
  616. package/dist/lib/events/propagation.js +56 -0
  617. package/dist/lib/events/propagation.js.map +7 -0
  618. package/dist/lib/events/registrations.d.ts +120 -0
  619. package/dist/lib/events/registrations.js +397 -0
  620. package/dist/lib/events/registrations.js.map +7 -0
  621. package/dist/lib/events/resolver-input.d.ts +25 -0
  622. package/dist/lib/events/resolver-input.js +62 -0
  623. package/dist/lib/events/resolver-input.js.map +7 -0
  624. package/dist/lib/events/types.d.ts +596 -0
  625. package/dist/lib/execute-render.d.ts +9 -0
  626. package/dist/lib/execute-render.js +195 -0
  627. package/dist/lib/execute-render.js.map +7 -0
  628. package/dist/lib/filter/canvas-state.d.ts +2 -0
  629. package/dist/lib/filter/canvas-state.js +31 -0
  630. package/dist/lib/filter/canvas-state.js.map +7 -0
  631. package/dist/lib/filter/filter-region.d.ts +33 -0
  632. package/dist/lib/filter/filter-region.js +291 -0
  633. package/dist/lib/filter/filter-region.js.map +7 -0
  634. package/dist/lib/filter/filter-surface-pool.d.ts +38 -0
  635. package/dist/lib/filter/filter-surface-pool.js +252 -0
  636. package/dist/lib/filter/filter-surface-pool.js.map +7 -0
  637. package/dist/lib/filter/render-filter-boundary.d.ts +14 -0
  638. package/dist/lib/filter/render-filter-boundary.js +211 -0
  639. package/dist/lib/filter/render-filter-boundary.js.map +7 -0
  640. package/dist/lib/focus/directional-navigation.d.ts +12 -0
  641. package/dist/lib/focus/directional-navigation.js +86 -0
  642. package/dist/lib/focus/directional-navigation.js.map +7 -0
  643. package/dist/lib/focus/dom-focus-host.d.ts +13 -0
  644. package/dist/lib/focus/dom-focus-host.js +352 -0
  645. package/dist/lib/focus/dom-focus-host.js.map +7 -0
  646. package/dist/lib/focus/dom-tab-stops.d.ts +3 -0
  647. package/dist/lib/focus/dom-tab-stops.js +71 -0
  648. package/dist/lib/focus/dom-tab-stops.js.map +7 -0
  649. package/dist/lib/focus/focus-events.d.ts +4 -0
  650. package/dist/lib/focus/focus-events.js +78 -0
  651. package/dist/lib/focus/focus-events.js.map +7 -0
  652. package/dist/lib/focus/focus-manager.d.ts +121 -0
  653. package/dist/lib/focus/focus-manager.js +1131 -0
  654. package/dist/lib/focus/focus-manager.js.map +7 -0
  655. package/dist/lib/focus/geometry.d.ts +4 -0
  656. package/dist/lib/focus/geometry.js +64 -0
  657. package/dist/lib/focus/geometry.js.map +7 -0
  658. package/dist/lib/focus/html-focus-region.d.ts +27 -0
  659. package/dist/lib/focus/keyboard-defaults.d.ts +7 -0
  660. package/dist/lib/focus/keyboard-defaults.js +110 -0
  661. package/dist/lib/focus/keyboard-defaults.js.map +7 -0
  662. package/dist/lib/focus/policy-components.d.ts +45 -0
  663. package/dist/lib/focus/policy-components.js +94 -0
  664. package/dist/lib/focus/policy-components.js.map +7 -0
  665. package/dist/lib/focus/types.d.ts +37 -0
  666. package/dist/lib/focus/types.js +7 -0
  667. package/dist/lib/focus/types.js.map +7 -0
  668. package/dist/lib/geometry/circle.d.ts +22 -0
  669. package/dist/lib/geometry/circle.js +13 -0
  670. package/dist/lib/geometry/circle.js.map +7 -0
  671. package/dist/lib/geometry/circular-sweep.d.ts +54 -0
  672. package/dist/lib/geometry/circular-sweep.js +95 -0
  673. package/dist/lib/geometry/circular-sweep.js.map +7 -0
  674. package/dist/lib/geometry/ellipse.d.ts +26 -0
  675. package/dist/lib/geometry/ellipse.js +17 -0
  676. package/dist/lib/geometry/ellipse.js.map +7 -0
  677. package/dist/lib/geometry/line.d.ts +20 -0
  678. package/dist/lib/geometry/line.js +15 -0
  679. package/dist/lib/geometry/line.js.map +7 -0
  680. package/dist/lib/geometry/path-arc.d.ts +25 -0
  681. package/dist/lib/geometry/path-arc.js +57 -0
  682. package/dist/lib/geometry/path-arc.js.map +7 -0
  683. package/dist/lib/geometry/path-bend-guide.d.ts +31 -0
  684. package/dist/lib/geometry/path-bend-guide.js +282 -0
  685. package/dist/lib/geometry/path-bend-guide.js.map +7 -0
  686. package/dist/lib/geometry/path-bend-spans.d.ts +31 -0
  687. package/dist/lib/geometry/path-bend-spans.js +109 -0
  688. package/dist/lib/geometry/path-bend-spans.js.map +7 -0
  689. package/dist/lib/geometry/path-bending.d.ts +90 -0
  690. package/dist/lib/geometry/path-bending.js +202 -0
  691. package/dist/lib/geometry/path-bending.js.map +7 -0
  692. package/dist/lib/geometry/path-conversion.d.ts +19 -0
  693. package/dist/lib/geometry/path-conversion.js +114 -0
  694. package/dist/lib/geometry/path-conversion.js.map +7 -0
  695. package/dist/lib/geometry/path-geometry.d.ts +218 -0
  696. package/dist/lib/geometry/path-geometry.js +557 -0
  697. package/dist/lib/geometry/path-geometry.js.map +7 -0
  698. package/dist/lib/geometry/path-radial.d.ts +15 -0
  699. package/dist/lib/geometry/path-radial.js +107 -0
  700. package/dist/lib/geometry/path-radial.js.map +7 -0
  701. package/dist/lib/geometry/path-transforms.d.ts +233 -0
  702. package/dist/lib/geometry/path-transforms.js +478 -0
  703. package/dist/lib/geometry/path-transforms.js.map +7 -0
  704. package/dist/lib/geometry/path-utilities.d.ts +78 -0
  705. package/dist/lib/geometry/path-utilities.js +341 -0
  706. package/dist/lib/geometry/path-utilities.js.map +7 -0
  707. package/dist/lib/geometry/path-wang.d.ts +18 -0
  708. package/dist/lib/geometry/path-wang.js +136 -0
  709. package/dist/lib/geometry/path-wang.js.map +7 -0
  710. package/dist/lib/geometry/path-warp-bezier.d.ts +17 -0
  711. package/dist/lib/geometry/path-warp-bezier.js +109 -0
  712. package/dist/lib/geometry/path-warp-bezier.js.map +7 -0
  713. package/dist/lib/geometry/path-warp.d.ts +27 -0
  714. package/dist/lib/geometry/path-warp.js +165 -0
  715. package/dist/lib/geometry/path-warp.js.map +7 -0
  716. package/dist/lib/geometry/polygon.d.ts +21 -0
  717. package/dist/lib/geometry/polygon.js +12 -0
  718. package/dist/lib/geometry/polygon.js.map +7 -0
  719. package/dist/lib/geometry/rectangle.d.ts +38 -0
  720. package/dist/lib/geometry/rectangle.js +22 -0
  721. package/dist/lib/geometry/rectangle.js.map +7 -0
  722. package/dist/lib/geometry/regular-polygon.d.ts +88 -0
  723. package/dist/lib/geometry/regular-polygon.js +67 -0
  724. package/dist/lib/geometry/regular-polygon.js.map +7 -0
  725. package/dist/lib/geometry/resolve-path.d.ts +4 -0
  726. package/dist/lib/geometry/resolve-path.js +16 -0
  727. package/dist/lib/geometry/resolve-path.js.map +7 -0
  728. package/dist/lib/geometry/rounded-corners.d.ts +28 -0
  729. package/dist/lib/geometry/rounded-corners.js +118 -0
  730. package/dist/lib/geometry/rounded-corners.js.map +7 -0
  731. package/dist/lib/geometry/star.d.ts +39 -0
  732. package/dist/lib/geometry/star.js +90 -0
  733. package/dist/lib/geometry/star.js.map +7 -0
  734. package/dist/lib/geometry/svg-path.d.ts +21 -0
  735. package/dist/lib/geometry/svg-path.js +7 -0
  736. package/dist/lib/geometry/svg-path.js.map +7 -0
  737. package/dist/lib/geometry/transform-bend.d.ts +46 -0
  738. package/dist/lib/geometry/transform-bend.js +219 -0
  739. package/dist/lib/geometry/transform-bend.js.map +7 -0
  740. package/dist/lib/geometry/transform-guide.d.ts +57 -0
  741. package/dist/lib/geometry/transform-guide.js +157 -0
  742. package/dist/lib/geometry/transform-guide.js.map +7 -0
  743. package/dist/lib/geometry/transform-math.d.ts +21 -0
  744. package/dist/lib/geometry/transform-math.js +91 -0
  745. package/dist/lib/geometry/transform-math.js.map +7 -0
  746. package/dist/lib/geometry/transform-mesh.d.ts +39 -0
  747. package/dist/lib/geometry/transform-mesh.js +129 -0
  748. package/dist/lib/geometry/transform-mesh.js.map +7 -0
  749. package/dist/lib/geometry/validation.d.ts +6 -0
  750. package/dist/lib/geometry/validation.js +42 -0
  751. package/dist/lib/geometry/validation.js.map +7 -0
  752. package/dist/lib/global-state.d.ts +63 -0
  753. package/dist/lib/global-state.js +176 -0
  754. package/dist/lib/global-state.js.map +7 -0
  755. package/dist/lib/hooks/hook-slot.d.ts +30 -0
  756. package/dist/lib/hooks/hook-slot.js +66 -0
  757. package/dist/lib/hooks/hook-slot.js.map +7 -0
  758. package/dist/lib/hooks/use-animated-value.d.ts +24 -0
  759. package/dist/lib/hooks/use-animated-value.js +169 -0
  760. package/dist/lib/hooks/use-animated-value.js.map +7 -0
  761. package/dist/lib/hooks/use-canvas-context.d.ts +10 -0
  762. package/dist/lib/hooks/use-canvas-context.js +13 -0
  763. package/dist/lib/hooks/use-canvas-context.js.map +7 -0
  764. package/dist/lib/hooks/use-computed.d.ts +13 -0
  765. package/dist/lib/hooks/use-computed.js +91 -0
  766. package/dist/lib/hooks/use-computed.js.map +7 -0
  767. package/dist/lib/hooks/use-const.d.ts +10 -0
  768. package/dist/lib/hooks/use-const.js +15 -0
  769. package/dist/lib/hooks/use-const.js.map +7 -0
  770. package/dist/lib/hooks/use-cursor.d.ts +16 -0
  771. package/dist/lib/hooks/use-cursor.js +51 -0
  772. package/dist/lib/hooks/use-cursor.js.map +7 -0
  773. package/dist/lib/hooks/use-event-listener.d.ts +10 -0
  774. package/dist/lib/hooks/use-event-listener.js +24 -0
  775. package/dist/lib/hooks/use-event-listener.js.map +7 -0
  776. package/dist/lib/hooks/use-event-target.d.ts +14 -0
  777. package/dist/lib/hooks/use-event-target.js +30 -0
  778. package/dist/lib/hooks/use-event-target.js.map +7 -0
  779. package/dist/lib/hooks/use-layout-box.d.ts +9 -0
  780. package/dist/lib/hooks/use-layout-box.js +8 -0
  781. package/dist/lib/hooks/use-layout-box.js.map +7 -0
  782. package/dist/lib/hooks/use-line-path.d.ts +14 -0
  783. package/dist/lib/hooks/use-line-path.js +13 -0
  784. package/dist/lib/hooks/use-line-path.js.map +7 -0
  785. package/dist/lib/hooks/use-paint-target.d.ts +3 -0
  786. package/dist/lib/hooks/use-paint-target.js +34 -0
  787. package/dist/lib/hooks/use-paint-target.js.map +7 -0
  788. package/dist/lib/hooks/use-playback.d.ts +21 -0
  789. package/dist/lib/hooks/use-playback.js +87 -0
  790. package/dist/lib/hooks/use-playback.js.map +7 -0
  791. package/dist/lib/hooks/use-reaction.d.ts +19 -0
  792. package/dist/lib/hooks/use-reaction.js +245 -0
  793. package/dist/lib/hooks/use-reaction.js.map +7 -0
  794. package/dist/lib/hooks/use-rect-path.d.ts +20 -0
  795. package/dist/lib/hooks/use-rect-path.js +25 -0
  796. package/dist/lib/hooks/use-rect-path.js.map +7 -0
  797. package/dist/lib/hooks/use-ref.d.ts +17 -0
  798. package/dist/lib/hooks/use-ref.js +8 -0
  799. package/dist/lib/hooks/use-ref.js.map +7 -0
  800. package/dist/lib/hooks/use-region.d.ts +11 -0
  801. package/dist/lib/hooks/use-region.js +34 -0
  802. package/dist/lib/hooks/use-region.js.map +7 -0
  803. package/dist/lib/hooks/use-signal.d.ts +12 -0
  804. package/dist/lib/hooks/use-signal.js +12 -0
  805. package/dist/lib/hooks/use-signal.js.map +7 -0
  806. package/dist/lib/hooks/use-svg-path.d.ts +11 -0
  807. package/dist/lib/hooks/use-svg-path.js +13 -0
  808. package/dist/lib/hooks/use-svg-path.js.map +7 -0
  809. package/dist/lib/hooks/use-value-memo-slot.d.ts +12 -0
  810. package/dist/lib/hooks/use-value-memo-slot.js +45 -0
  811. package/dist/lib/hooks/use-value-memo-slot.js.map +7 -0
  812. package/dist/lib/hooks/use-visibility-transition.d.ts +103 -0
  813. package/dist/lib/hooks/use-visibility-transition.js +195 -0
  814. package/dist/lib/hooks/use-visibility-transition.js.map +7 -0
  815. package/dist/lib/html/html-service.d.ts +30 -0
  816. package/dist/lib/html/html-service.js +281 -0
  817. package/dist/lib/html/html-service.js.map +7 -0
  818. package/dist/lib/html/overlay-config.d.ts +3 -0
  819. package/dist/lib/html/overlay-config.js +37 -0
  820. package/dist/lib/html/overlay-config.js.map +7 -0
  821. package/dist/lib/html/portable-clips.d.ts +4 -0
  822. package/dist/lib/html/portable-clips.js +20 -0
  823. package/dist/lib/html/portable-clips.js.map +7 -0
  824. package/dist/lib/html/types.d.ts +110 -0
  825. package/dist/lib/layout/absolute.d.ts +57 -0
  826. package/dist/lib/layout/absolute.js +348 -0
  827. package/dist/lib/layout/absolute.js.map +7 -0
  828. package/dist/lib/layout/box.d.ts +19 -0
  829. package/dist/lib/layout/box.js +209 -0
  830. package/dist/lib/layout/box.js.map +7 -0
  831. package/dist/lib/layout/context.d.ts +13 -0
  832. package/dist/lib/layout/context.js +42 -0
  833. package/dist/lib/layout/context.js.map +7 -0
  834. package/dist/lib/layout/diagnostics.d.ts +15 -0
  835. package/dist/lib/layout/diagnostics.js +30 -0
  836. package/dist/lib/layout/diagnostics.js.map +7 -0
  837. package/dist/lib/layout/flex.d.ts +64 -0
  838. package/dist/lib/layout/flex.js +803 -0
  839. package/dist/lib/layout/flex.js.map +7 -0
  840. package/dist/lib/layout/flow.d.ts +53 -0
  841. package/dist/lib/layout/flow.js +400 -0
  842. package/dist/lib/layout/flow.js.map +7 -0
  843. package/dist/lib/layout/grid.d.ts +64 -0
  844. package/dist/lib/layout/grid.js +597 -0
  845. package/dist/lib/layout/grid.js.map +7 -0
  846. package/dist/lib/layout/measure.d.ts +19 -0
  847. package/dist/lib/layout/measure.js +144 -0
  848. package/dist/lib/layout/measure.js.map +7 -0
  849. package/dist/lib/layout/overlay.d.ts +42 -0
  850. package/dist/lib/layout/overlay.js +151 -0
  851. package/dist/lib/layout/overlay.js.map +7 -0
  852. package/dist/lib/layout/place-child.d.ts +12 -0
  853. package/dist/lib/layout/place-child.js +72 -0
  854. package/dist/lib/layout/place-child.js.map +7 -0
  855. package/dist/lib/layout/positioning-diagnostics.d.ts +3 -0
  856. package/dist/lib/layout/positioning-diagnostics.js +15 -0
  857. package/dist/lib/layout/positioning-diagnostics.js.map +7 -0
  858. package/dist/lib/layout/types.d.ts +78 -0
  859. package/dist/lib/manipulation/controller-types.d.ts +299 -0
  860. package/dist/lib/manipulation/controller.d.ts +57 -0
  861. package/dist/lib/manipulation/controller.js +464 -0
  862. package/dist/lib/manipulation/controller.js.map +7 -0
  863. package/dist/lib/manipulation/coordinates.d.ts +9 -0
  864. package/dist/lib/manipulation/coordinates.js +55 -0
  865. package/dist/lib/manipulation/coordinates.js.map +7 -0
  866. package/dist/lib/manipulation/degrees.d.ts +10 -0
  867. package/dist/lib/manipulation/degrees.js +9 -0
  868. package/dist/lib/manipulation/degrees.js.map +7 -0
  869. package/dist/lib/manipulation/frame.d.ts +24 -0
  870. package/dist/lib/manipulation/frame.js +101 -0
  871. package/dist/lib/manipulation/frame.js.map +7 -0
  872. package/dist/lib/manipulation/geometry.d.ts +4 -0
  873. package/dist/lib/manipulation/geometry.js +26 -0
  874. package/dist/lib/manipulation/geometry.js.map +7 -0
  875. package/dist/lib/manipulation/handles.d.ts +298 -0
  876. package/dist/lib/manipulation/handles.js +598 -0
  877. package/dist/lib/manipulation/handles.js.map +7 -0
  878. package/dist/lib/manipulation/manipulable.d.ts +65 -0
  879. package/dist/lib/manipulation/manipulable.js +47 -0
  880. package/dist/lib/manipulation/manipulable.js.map +7 -0
  881. package/dist/lib/manipulation/ownership.d.ts +15 -0
  882. package/dist/lib/manipulation/ownership.js +80 -0
  883. package/dist/lib/manipulation/ownership.js.map +7 -0
  884. package/dist/lib/manipulation/snap.d.ts +6 -0
  885. package/dist/lib/manipulation/snap.js +40 -0
  886. package/dist/lib/manipulation/snap.js.map +7 -0
  887. package/dist/lib/manipulation/solve.d.ts +2 -0
  888. package/dist/lib/manipulation/solve.js +563 -0
  889. package/dist/lib/manipulation/solve.js.map +7 -0
  890. package/dist/lib/manipulation/types.d.ts +178 -0
  891. package/dist/lib/mount-pibbl.d.ts +25 -0
  892. package/dist/lib/mount-pibbl.js +278 -0
  893. package/dist/lib/mount-pibbl.js.map +7 -0
  894. package/dist/lib/optional-services.d.ts +8 -0
  895. package/dist/lib/optional-services.js +11 -0
  896. package/dist/lib/optional-services.js.map +7 -0
  897. package/dist/lib/pibbl.d.ts +17 -0
  898. package/dist/lib/pibbl.js +21 -0
  899. package/dist/lib/pibbl.js.map +7 -0
  900. package/dist/lib/primitive-presentation.d.ts +24 -0
  901. package/dist/lib/primitive-presentation.js +102 -0
  902. package/dist/lib/primitive-presentation.js.map +7 -0
  903. package/dist/lib/render-layer/controller.d.ts +67 -0
  904. package/dist/lib/render-layer/controller.js +603 -0
  905. package/dist/lib/render-layer/controller.js.map +7 -0
  906. package/dist/lib/render-layer/define-render-layer.d.ts +17 -0
  907. package/dist/lib/render-layer/define-render-layer.js +90 -0
  908. package/dist/lib/render-layer/define-render-layer.js.map +7 -0
  909. package/dist/lib/render-layer/types.d.ts +315 -0
  910. package/dist/lib/render-target.d.ts +27 -0
  911. package/dist/lib/render-target.js +118 -0
  912. package/dist/lib/render-target.js.map +7 -0
  913. package/dist/lib/render-transaction.d.ts +10 -0
  914. package/dist/lib/render-transaction.js +46 -0
  915. package/dist/lib/render-transaction.js.map +7 -0
  916. package/dist/lib/render.d.ts +3 -0
  917. package/dist/lib/render.js +385 -0
  918. package/dist/lib/render.js.map +7 -0
  919. package/dist/lib/scheduler/realm-scheduler.d.ts +52 -0
  920. package/dist/lib/scheduler/realm-scheduler.js +964 -0
  921. package/dist/lib/scheduler/realm-scheduler.js.map +7 -0
  922. package/dist/lib/scheduler/renderer-participant.d.ts +257 -0
  923. package/dist/lib/scheduler/renderer-participant.js +216 -0
  924. package/dist/lib/scheduler/renderer-participant.js.map +7 -0
  925. package/dist/lib/scheduler/simulation-participant.d.ts +103 -0
  926. package/dist/lib/scheduler/simulation-participant.js +229 -0
  927. package/dist/lib/scheduler/simulation-participant.js.map +7 -0
  928. package/dist/lib/scheduler/testing.d.ts +56 -0
  929. package/dist/lib/scheduler/testing.js +71 -0
  930. package/dist/lib/scheduler/testing.js.map +7 -0
  931. package/dist/lib/scheduler/types.d.ts +103 -0
  932. package/dist/lib/signals/edge.d.ts +44 -0
  933. package/dist/lib/signals/edge.js +245 -0
  934. package/dist/lib/signals/edge.js.map +7 -0
  935. package/dist/lib/signals/graph.d.ts +220 -0
  936. package/dist/lib/signals/graph.js +1035 -0
  937. package/dist/lib/signals/graph.js.map +7 -0
  938. package/dist/lib/signals/input-provision.d.ts +3 -0
  939. package/dist/lib/signals/input-provision.js +67 -0
  940. package/dist/lib/signals/input-provision.js.map +7 -0
  941. package/dist/lib/signals/render-consumer.d.ts +21 -0
  942. package/dist/lib/signals/render-consumer.js +218 -0
  943. package/dist/lib/signals/render-consumer.js.map +7 -0
  944. package/dist/lib/signals/resolve-signal-value.d.ts +10 -0
  945. package/dist/lib/signals/resolve-signal-value.js +17 -0
  946. package/dist/lib/signals/resolve-signal-value.js.map +7 -0
  947. package/dist/lib/signals/types.d.ts +80 -0
  948. package/dist/lib/style/diagnostics.d.ts +83 -0
  949. package/dist/lib/style/diagnostics.js +63 -0
  950. package/dist/lib/style/diagnostics.js.map +7 -0
  951. package/dist/lib/style/empty-style.d.ts +3 -0
  952. package/dist/lib/style/empty-style.js +5 -0
  953. package/dist/lib/style/empty-style.js.map +7 -0
  954. package/dist/lib/style/filter-types.d.ts +243 -0
  955. package/dist/lib/style/filter-types.js +5 -0
  956. package/dist/lib/style/filter-types.js.map +7 -0
  957. package/dist/lib/style/filter.d.ts +7 -0
  958. package/dist/lib/style/filter.js +50 -0
  959. package/dist/lib/style/filter.js.map +7 -0
  960. package/dist/lib/style/normalize.d.ts +18 -0
  961. package/dist/lib/style/normalize.js +50 -0
  962. package/dist/lib/style/normalize.js.map +7 -0
  963. package/dist/lib/style/positioning.d.ts +32 -0
  964. package/dist/lib/style/positioning.js +81 -0
  965. package/dist/lib/style/positioning.js.map +7 -0
  966. package/dist/lib/style/resolve-built-in.d.ts +6 -0
  967. package/dist/lib/style/resolve-built-in.js +58 -0
  968. package/dist/lib/style/resolve-built-in.js.map +7 -0
  969. package/dist/lib/style/resolve-dispatch.d.ts +20 -0
  970. package/dist/lib/style/resolve-dispatch.js +167 -0
  971. package/dist/lib/style/resolve-dispatch.js.map +7 -0
  972. package/dist/lib/style/resolve-length.d.ts +16 -0
  973. package/dist/lib/style/resolve-length.js +54 -0
  974. package/dist/lib/style/resolve-length.js.map +7 -0
  975. package/dist/lib/style/responsive.d.ts +31 -0
  976. package/dist/lib/style/responsive.js +172 -0
  977. package/dist/lib/style/responsive.js.map +7 -0
  978. package/dist/lib/style/types.d.ts +338 -0
  979. package/dist/lib/surface/resolve-surface.d.ts +4 -0
  980. package/dist/lib/surface/resolve-surface.js +184 -0
  981. package/dist/lib/surface/resolve-surface.js.map +7 -0
  982. package/dist/lib/surface/root-surface.d.ts +7 -0
  983. package/dist/lib/surface/root-surface.js +171 -0
  984. package/dist/lib/surface/root-surface.js.map +7 -0
  985. package/dist/lib/surface/transform.d.ts +4 -0
  986. package/dist/lib/surface/transform.js +16 -0
  987. package/dist/lib/surface/transform.js.map +7 -0
  988. package/dist/lib/surface/types.d.ts +132 -0
  989. package/dist/lib/teardowns.d.ts +14 -0
  990. package/dist/lib/teardowns.js +50 -0
  991. package/dist/lib/teardowns.js.map +7 -0
  992. package/dist/lib/textures/texture-protocol.d.ts +124 -0
  993. package/dist/lib/textures/texture-protocol.js +40 -0
  994. package/dist/lib/textures/texture-protocol.js.map +7 -0
  995. package/dist/lib/textures/texture.d.ts +170 -0
  996. package/dist/lib/textures/texture.js +385 -0
  997. package/dist/lib/textures/texture.js.map +7 -0
  998. package/dist/lib/transitions/bifrost.d.ts +47 -0
  999. package/dist/lib/transitions/bifrost.js +91 -0
  1000. package/dist/lib/transitions/bifrost.js.map +7 -0
  1001. package/dist/lib/transitions/binding.d.ts +14 -0
  1002. package/dist/lib/transitions/binding.js +35 -0
  1003. package/dist/lib/transitions/binding.js.map +7 -0
  1004. package/dist/lib/transitions/capture.d.ts +21 -0
  1005. package/dist/lib/transitions/capture.js +91 -0
  1006. package/dist/lib/transitions/capture.js.map +7 -0
  1007. package/dist/lib/transitions/common.d.ts +130 -0
  1008. package/dist/lib/transitions/common.js +57 -0
  1009. package/dist/lib/transitions/common.js.map +7 -0
  1010. package/dist/lib/transitions/define-transition.d.ts +64 -0
  1011. package/dist/lib/transitions/define-transition.js +31 -0
  1012. package/dist/lib/transitions/define-transition.js.map +7 -0
  1013. package/dist/lib/transitions/embers-physics.d.ts +114 -0
  1014. package/dist/lib/transitions/embers-physics.js +161 -0
  1015. package/dist/lib/transitions/embers-physics.js.map +7 -0
  1016. package/dist/lib/transitions/embers.d.ts +67 -0
  1017. package/dist/lib/transitions/embers.js +196 -0
  1018. package/dist/lib/transitions/embers.js.map +7 -0
  1019. package/dist/lib/transitions/fade.d.ts +41 -0
  1020. package/dist/lib/transitions/fade.js +31 -0
  1021. package/dist/lib/transitions/fade.js.map +7 -0
  1022. package/dist/lib/transitions/hologram.d.ts +47 -0
  1023. package/dist/lib/transitions/hologram.js +94 -0
  1024. package/dist/lib/transitions/hologram.js.map +7 -0
  1025. package/dist/lib/transitions/wasm/bifrost-bytes.d.ts +1 -0
  1026. package/dist/lib/transitions/wasm/bifrost-bytes.js +5 -0
  1027. package/dist/lib/transitions/wasm/bifrost-bytes.js.map +7 -0
  1028. package/dist/lib/transitions/wasm/bifrost-kernel.d.ts +1 -0
  1029. package/dist/lib/transitions/wasm/bifrost-kernel.js +27 -0
  1030. package/dist/lib/transitions/wasm/bifrost-kernel.js.map +7 -0
  1031. package/dist/lib/transitions/wasm/embers-bytes.d.ts +1 -0
  1032. package/dist/lib/transitions/wasm/embers-bytes.js +5 -0
  1033. package/dist/lib/transitions/wasm/embers-bytes.js.map +7 -0
  1034. package/dist/lib/transitions/wasm/hologram-bytes.d.ts +1 -0
  1035. package/dist/lib/transitions/wasm/hologram-bytes.js +5 -0
  1036. package/dist/lib/transitions/wasm/hologram-bytes.js.map +7 -0
  1037. package/dist/lib/transitions/wasm/kernel.d.ts +7 -0
  1038. package/dist/lib/transitions/wasm/kernel.js +26 -0
  1039. package/dist/lib/transitions/wasm/kernel.js.map +7 -0
  1040. package/dist/lib/types.d.ts +570 -0
  1041. package/dist/lib/update.d.ts +8 -0
  1042. package/dist/lib/update.js +20 -0
  1043. package/dist/lib/update.js.map +7 -0
  1044. package/dist/lib/util/get-2d-context.d.ts +2 -0
  1045. package/dist/lib/util/get-2d-context.js +11 -0
  1046. package/dist/lib/util/get-2d-context.js.map +7 -0
  1047. package/dist/lib/util/get-mouse-coordinates.d.ts +2 -0
  1048. package/dist/lib/util/get-mouse-coordinates.js +32 -0
  1049. package/dist/lib/util/get-mouse-coordinates.js.map +7 -0
  1050. package/dist/lib/util/is-hit.d.ts +11 -0
  1051. package/dist/lib/util/is-hit.js +52 -0
  1052. package/dist/lib/util/is-hit.js.map +7 -0
  1053. package/dist/lib/util/is-transparent.d.ts +1 -0
  1054. package/dist/lib/util/is-transparent.js +8 -0
  1055. package/dist/lib/util/is-transparent.js.map +7 -0
  1056. package/dist/lib/util/pixel-grid-adjustments.d.ts +8 -0
  1057. package/dist/lib/util/pixel-grid-adjustments.js +28 -0
  1058. package/dist/lib/util/pixel-grid-adjustments.js.map +7 -0
  1059. package/dist/lib/util/push-clipping-path.d.ts +6 -0
  1060. package/dist/lib/util/push-clipping-path.js +28 -0
  1061. package/dist/lib/util/push-clipping-path.js.map +7 -0
  1062. package/dist/lib/util/wire-common-events.d.ts +2 -0
  1063. package/dist/lib/util/wire-common-events.js +15 -0
  1064. package/dist/lib/util/wire-common-events.js.map +7 -0
  1065. package/dist/types.d.ts +1 -0
  1066. package/dist/types.js +1 -0
  1067. package/dist/types.js.map +7 -0
  1068. package/dist/types.mjs +1 -0
  1069. package/package.json +149 -0
@@ -0,0 +1,1131 @@
1
+ import { GLOBAL_STATE } from "../global-state.js";
2
+ import { Teardowns } from "../teardowns.js";
3
+ import { resolveTargetRootBounds } from "./geometry.js";
4
+ import {
5
+ mountDOMFocusHost
6
+ } from "./dom-focus-host.js";
7
+ import {
8
+ applyDirectionalNavigationDefault,
9
+ applyKeyboardActivationDefault,
10
+ applyTabDefault
11
+ } from "./keyboard-defaults.js";
12
+ import { transitionLogicalFocus } from "./focus-events.js";
13
+ import {
14
+ isHtmlFocusCandidate
15
+ } from "./types.js";
16
+ import { getManagedTabStops } from "./dom-tab-stops.js";
17
+ const UNFOCUSED_SNAPSHOT = Object.freeze({
18
+ isFocused: false,
19
+ isFocusVisible: false
20
+ });
21
+ const retainedDirectionalBoundaries = /* @__PURE__ */ new WeakMap();
22
+ const coordinators = /* @__PURE__ */ new WeakMap();
23
+ const managerOwners = /* @__PURE__ */ new WeakMap();
24
+ const COMPATIBILITY_PRESS_WINDOW_MS = 1500;
25
+ class DirectionalBoundary {
26
+ constructor(owner) {
27
+ this.owner = owner;
28
+ }
29
+ owner;
30
+ committedCandidates = Object.freeze([]);
31
+ get candidates() {
32
+ return this.committedCandidates;
33
+ }
34
+ commit(candidates) {
35
+ this.committedCandidates = candidates;
36
+ }
37
+ }
38
+ class FocusManagerCoordinator {
39
+ constructor(eventRoot) {
40
+ this.eventRoot = eventRoot;
41
+ eventRoot.rootInstance?.mainTeardowns.add(() => this.dispose());
42
+ }
43
+ eventRoot;
44
+ managers = /* @__PURE__ */ new Set();
45
+ transactions = /* @__PURE__ */ new WeakMap();
46
+ active;
47
+ domFocusHost;
48
+ domFocusHostTeardowns;
49
+ disposed = false;
50
+ add(manager) {
51
+ if (this.disposed) {
52
+ throw new Error("Pibbl focus manager root is disposed.");
53
+ }
54
+ this.ensureDOMFocusHost();
55
+ this.managers.add(manager);
56
+ const transaction = this.eventRoot.renderTransaction;
57
+ if (transaction) {
58
+ const state = this.stateFor(transaction);
59
+ state.prepared = manager;
60
+ this.eventRoot.focusPolicy = manager;
61
+ }
62
+ }
63
+ claim(manager) {
64
+ const transaction = this.eventRoot.renderTransaction;
65
+ if (!transaction) {
66
+ if (this.active && this.active !== manager) {
67
+ throw duplicateManagerError();
68
+ }
69
+ this.setActive(manager);
70
+ return;
71
+ }
72
+ const state = this.stateFor(transaction);
73
+ if (state.claimed && state.claimed !== manager) {
74
+ throw duplicateManagerError();
75
+ }
76
+ state.claimed = manager;
77
+ this.eventRoot.focusPolicy = manager;
78
+ }
79
+ beforeNativeDispatch(type, event) {
80
+ const manager = this.active;
81
+ const routeLogicalEvent = this.domFocusHost?.beforeNativeDispatch(type, event) ?? true;
82
+ return routeLogicalEvent && manager && !manager.isDestroyed ? manager : void 0;
83
+ }
84
+ syncDOMFocusHost(manager) {
85
+ if (this.active === manager) {
86
+ this.domFocusHost?.syncCandidateAvailability(manager.hasFocusCandidates);
87
+ this.domFocusHost?.syncHtmlRegions(manager.htmlFocusRegions);
88
+ }
89
+ }
90
+ focusCanvasFromPress(manager) {
91
+ if (this.active === manager) this.domFocusHost?.focusFromPress();
92
+ }
93
+ claimRetainedManagers(instance) {
94
+ const retained = Array.from(this.managers).filter((manager) => {
95
+ const owner = managerOwners.get(manager);
96
+ return !manager.isDestroyed && !manager.ownerWasReleased && owner !== void 0 && isInstanceWithin(owner, instance);
97
+ });
98
+ const transaction = this.eventRoot.renderTransaction;
99
+ if (!transaction) {
100
+ for (const manager of retained) this.claim(manager);
101
+ return retained;
102
+ }
103
+ const state = this.stateFor(transaction);
104
+ for (const manager of retained) {
105
+ if (state.replayedManagers.has(manager)) continue;
106
+ state.replayedManagers.add(manager);
107
+ this.claim(manager);
108
+ }
109
+ return retained;
110
+ }
111
+ release(manager) {
112
+ if (manager.isDestroyed) return;
113
+ manager.markOwnerReleased();
114
+ const transaction = this.eventRoot.renderTransaction;
115
+ if (transaction) {
116
+ const state = this.stateFor(transaction);
117
+ if (!state.finished) return;
118
+ }
119
+ if (this.active === manager) {
120
+ this.setActive(void 0);
121
+ }
122
+ this.destroy(manager);
123
+ }
124
+ stateFor(transaction) {
125
+ const existing = this.transactions.get(transaction);
126
+ if (existing) return existing;
127
+ const state = {
128
+ prior: this.active,
129
+ replayedManagers: /* @__PURE__ */ new Set(),
130
+ prepared: void 0,
131
+ claimed: void 0,
132
+ finished: false,
133
+ restored: void 0
134
+ };
135
+ this.transactions.set(transaction, state);
136
+ transaction.onFinish((success) => this.finishTransaction(state, success));
137
+ return state;
138
+ }
139
+ finishTransaction(state, success) {
140
+ if (state.finished) return;
141
+ state.finished = true;
142
+ if (success) {
143
+ if (state.claimed) {
144
+ this.active = state.claimed;
145
+ } else if (this.active?.ownerWasReleased) {
146
+ this.active = void 0;
147
+ }
148
+ this.eventRoot.focusPolicy = this.active;
149
+ for (const manager of Array.from(this.managers)) {
150
+ if (manager !== this.active && manager.ownerWasReleased) {
151
+ this.destroy(manager);
152
+ }
153
+ }
154
+ this.domFocusHost?.setManager(this.active);
155
+ return;
156
+ }
157
+ const attemptedReplacement = state.claimed && state.claimed !== state.prior || state.prepared && state.prepared !== state.prior;
158
+ const restored = state.prior && attemptedReplacement && !state.prior.isDestroyed ? state.prior : void 0;
159
+ state.restored = restored;
160
+ this.active = restored;
161
+ this.eventRoot.focusPolicy = restored;
162
+ for (const manager of Array.from(this.managers)) {
163
+ if (manager !== restored) this.destroy(manager);
164
+ }
165
+ this.domFocusHost?.setManager(restored);
166
+ }
167
+ destroy(manager) {
168
+ this.managers.delete(manager);
169
+ manager.destroyFromCoordinator();
170
+ if (this.managers.size === 0) this.disposeDOMFocusHost();
171
+ }
172
+ ensureDOMFocusHost() {
173
+ if (this.domFocusHost) return;
174
+ const canvas = this.eventRoot.canvas;
175
+ if (!canvas) {
176
+ throw new Error(
177
+ "FocusManagement requires an HTMLCanvasElement root; an OffscreenCanvas has no DOM focus host."
178
+ );
179
+ }
180
+ const teardowns = new Teardowns();
181
+ try {
182
+ this.domFocusHost = mountDOMFocusHost(canvas, this.eventRoot, teardowns);
183
+ this.domFocusHostTeardowns = teardowns;
184
+ } catch (error) {
185
+ teardowns.execute();
186
+ throw error;
187
+ }
188
+ }
189
+ disposeDOMFocusHost() {
190
+ this.domFocusHost = void 0;
191
+ this.domFocusHostTeardowns?.execute();
192
+ this.domFocusHostTeardowns = void 0;
193
+ }
194
+ setActive(manager) {
195
+ this.active = manager;
196
+ this.eventRoot.focusPolicy = manager;
197
+ this.domFocusHost?.setManager(manager);
198
+ }
199
+ dispose() {
200
+ if (this.disposed) return;
201
+ this.disposed = true;
202
+ this.active = void 0;
203
+ this.eventRoot.focusPolicy = void 0;
204
+ for (const manager of Array.from(this.managers)) this.destroy(manager);
205
+ this.disposeDOMFocusHost();
206
+ }
207
+ }
208
+ class PibblFocusManager {
209
+ constructor(eventRoot, owner) {
210
+ this.eventRoot = eventRoot;
211
+ const canvas = eventRoot.canvas;
212
+ if (!canvas) {
213
+ throw new Error(
214
+ "FocusManagement requires an HTMLCanvasElement root; an OffscreenCanvas has no DOM focus host."
215
+ );
216
+ }
217
+ managerOwners.set(this, owner);
218
+ this.coordinator = getCoordinator(eventRoot);
219
+ try {
220
+ this.coordinator.add(this);
221
+ } catch (error) {
222
+ managerOwners.delete(this);
223
+ throw error;
224
+ }
225
+ }
226
+ eventRoot;
227
+ committedCandidates = Object.freeze([]);
228
+ committedHtmlCandidates = Object.freeze([]);
229
+ committedNavigationCandidates = Object.freeze([]);
230
+ committedBoundaries = /* @__PURE__ */ new Set();
231
+ pending;
232
+ transactionalPending;
233
+ directionalStack = [];
234
+ focusedTarget;
235
+ focusedHtmlRegion;
236
+ pendingHtmlFocusModality;
237
+ focusVisible = false;
238
+ pendingSpaceTarget;
239
+ pendingPressFocus;
240
+ representedPointerPresses = /* @__PURE__ */ new Map();
241
+ representedTouchContacts = /* @__PURE__ */ new Map();
242
+ activeTouchIdentifiers = /* @__PURE__ */ new Set();
243
+ primaryTouchIdentifier;
244
+ touchSequenceActive = false;
245
+ touchMouseCompatibility;
246
+ focusRenderRevision = 0;
247
+ layerFocusRenderRevisions = /* @__PURE__ */ new WeakMap();
248
+ destroyed = false;
249
+ ownerReleased = false;
250
+ coordinator;
251
+ get candidates() {
252
+ return this.committedCandidates;
253
+ }
254
+ /** @internal Full source-order list including native HtmlBox regions. */
255
+ get navigationCandidates() {
256
+ return this.committedNavigationCandidates;
257
+ }
258
+ get htmlFocusRegions() {
259
+ return this.committedHtmlCandidates.map((candidate) => candidate.region);
260
+ }
261
+ get focusedNavigationCandidate() {
262
+ if (this.focusedHtmlRegion) {
263
+ return this.committedHtmlCandidates.find(
264
+ (candidate) => candidate.region === this.focusedHtmlRegion
265
+ );
266
+ }
267
+ return this.focusedTarget ? this.committedCandidates.find(
268
+ (candidate) => candidate.target === this.focusedTarget
269
+ ) : void 0;
270
+ }
271
+ /** @internal Resolves dynamic native eligibility at each navigation boundary. */
272
+ isNavigationCandidateFocusable(candidate) {
273
+ return isHtmlFocusCandidate(candidate) ? Boolean(
274
+ candidate.region.active && candidate.region.content && getManagedTabStops(candidate.region.content).length
275
+ ) : Boolean(this.liveFocusCandidate(candidate.target));
276
+ }
277
+ /** Includes a successful render's collected candidates before commit callbacks settle. */
278
+ get hasFocusCandidates() {
279
+ return this.committedNavigationCandidates.length > 0 || (this.transactionalPending?.frame.targets.length ?? 0) + (this.transactionalPending?.frame.htmlRegions.length ?? 0) > 0;
280
+ }
281
+ get isDestroyed() {
282
+ return this.destroyed;
283
+ }
284
+ get ownerWasReleased() {
285
+ return this.ownerReleased;
286
+ }
287
+ get canvas() {
288
+ const canvas = this.eventRoot.canvas;
289
+ if (!canvas) throw new Error("Pibbl focus manager has no DOM Canvas host.");
290
+ return canvas;
291
+ }
292
+ get logicalFocusTarget() {
293
+ return this.focusedTarget;
294
+ }
295
+ get logicalFocusVisible() {
296
+ return this.focusVisible;
297
+ }
298
+ beginCollection() {
299
+ this.assertLive();
300
+ if (this.pending) {
301
+ throw new Error("FocusManagement cannot enter twice on one Pibbl root.");
302
+ }
303
+ this.coordinator.claim(this);
304
+ this.pending = {
305
+ entries: [],
306
+ targets: [],
307
+ htmlRegions: [],
308
+ observedTargets: /* @__PURE__ */ new Set(),
309
+ observedHtmlRegions: /* @__PURE__ */ new Set(),
310
+ ineligibleTargets: /* @__PURE__ */ new Set(),
311
+ boundaries: new Set(this.directionalStack)
312
+ };
313
+ }
314
+ finishCollection(success) {
315
+ const pending = this.pending;
316
+ this.pending = void 0;
317
+ if (!pending || !success || this.destroyed) return;
318
+ const transaction = this.eventRoot.renderTransaction;
319
+ if (transaction) {
320
+ this.transactionalPending = { transaction, frame: pending };
321
+ transaction.onFinish((transactionSucceeded) => {
322
+ if (this.transactionalPending?.transaction === transaction) {
323
+ this.transactionalPending = void 0;
324
+ }
325
+ if (transactionSucceeded && !this.destroyed) {
326
+ this.commitCollection(pending);
327
+ }
328
+ });
329
+ return;
330
+ }
331
+ this.commitCollection(pending);
332
+ }
333
+ commitCollection(pending) {
334
+ const collected = [];
335
+ for (const [sourceIndex, observed] of pending.entries.entries()) {
336
+ if ("target" in observed) {
337
+ const target = observed.target;
338
+ collected.push(
339
+ Object.freeze({
340
+ target,
341
+ sourceIndex,
342
+ directionalBoundary: observed.directionalBoundary,
343
+ rootBounds: resolveTargetRootBounds(target)
344
+ })
345
+ );
346
+ continue;
347
+ }
348
+ const region = observed.region;
349
+ if (region.active && region.content)
350
+ collected.push(
351
+ Object.freeze({
352
+ region,
353
+ sourceIndex,
354
+ directionalBoundary: observed.directionalBoundary,
355
+ rootBounds: region.rootBounds
356
+ })
357
+ );
358
+ }
359
+ const navigation = Object.freeze(collected);
360
+ this.commitNavigationCandidates(navigation, pending.boundaries);
361
+ const candidates = navigation.filter(
362
+ (candidate) => !isHtmlFocusCandidate(candidate)
363
+ );
364
+ for (const candidate of candidates) {
365
+ if (candidate.directionalBoundary) {
366
+ retainedDirectionalBoundaries.set(
367
+ candidate.target,
368
+ asDirectionalBoundary(candidate.directionalBoundary)
369
+ );
370
+ } else {
371
+ retainedDirectionalBoundaries.delete(candidate.target);
372
+ }
373
+ }
374
+ }
375
+ observeTarget(target) {
376
+ const pending = this.pending;
377
+ if (!pending) return;
378
+ if (this.pendingSpaceTarget === target && !target.handlers.click) {
379
+ this.cancelSpaceActivation();
380
+ }
381
+ if (!isKeyboardFocusable(target)) {
382
+ this.markPendingIneligible(target);
383
+ return;
384
+ }
385
+ pending.ineligibleTargets.delete(target);
386
+ this.recordPendingTarget(target, this.currentDirectionalBoundary());
387
+ }
388
+ /** @internal Collects one published HtmlBox in source order. */
389
+ observeHtmlRegion(region) {
390
+ const pending = this.pending;
391
+ if (!pending || pending.observedHtmlRegions.has(region)) return;
392
+ pending.observedHtmlRegions.add(region);
393
+ const observed = {
394
+ region,
395
+ directionalBoundary: this.currentDirectionalBoundary()
396
+ };
397
+ pending.htmlRegions.push(observed);
398
+ pending.entries.push(observed);
399
+ }
400
+ /** @internal Removes an unmounted HtmlBox without manufacturing a Canvas target. */
401
+ removeHtmlFocusRegion(region) {
402
+ if (this.pending?.observedHtmlRegions.delete(region)) {
403
+ this.pending.htmlRegions.splice(
404
+ this.pending.htmlRegions.findIndex((entry) => entry.region === region),
405
+ 1
406
+ );
407
+ const index = this.pending.entries.findIndex(
408
+ (entry) => "region" in entry && entry.region === region
409
+ );
410
+ if (index >= 0) this.pending.entries.splice(index, 1);
411
+ return;
412
+ }
413
+ if (!this.committedHtmlCandidates.some(
414
+ (candidate) => candidate.region === region
415
+ ))
416
+ return;
417
+ const wasFocused = this.focusedHtmlRegion === region;
418
+ const canvas = this.eventRoot.canvas;
419
+ const shouldReturnNativeFocus = Boolean(
420
+ wasFocused && canvas && !this.eventRoot.rootInstance?.mainTeardowns.closed && region.content?.contains(canvas.ownerDocument.activeElement)
421
+ );
422
+ this.commitNavigationCandidates(
423
+ this.committedNavigationCandidates.filter(
424
+ (candidate) => !isHtmlFocusCandidate(candidate) || candidate.region !== region
425
+ ),
426
+ this.committedBoundaries
427
+ );
428
+ if (shouldReturnNativeFocus && canvas) {
429
+ this.coordinator.focusCanvasFromPress(this);
430
+ this.clearFocusState();
431
+ }
432
+ if (wasFocused) this.clearHtmlFocus(region);
433
+ }
434
+ /** @internal Deactivates retained DOM hosts while the root has no display area. */
435
+ suspendHtmlRegions() {
436
+ if (this.committedHtmlCandidates.length === 0) return;
437
+ const focused = this.focusedHtmlRegion;
438
+ const canvas = this.eventRoot.canvas;
439
+ const shouldReturnNativeFocus = Boolean(
440
+ focused && canvas && !this.eventRoot.rootInstance?.mainTeardowns.closed && focused.content?.contains(canvas.ownerDocument.activeElement)
441
+ );
442
+ this.commitNavigationCandidates(
443
+ this.committedNavigationCandidates.filter(
444
+ (candidate) => !isHtmlFocusCandidate(candidate)
445
+ ),
446
+ this.committedBoundaries
447
+ );
448
+ if (shouldReturnNativeFocus && canvas) {
449
+ this.coordinator.focusCanvasFromPress(this);
450
+ this.clearFocusState();
451
+ }
452
+ if (focused) this.clearHtmlFocus(focused);
453
+ }
454
+ observeTransactionalTarget(target) {
455
+ const transactional = this.transactionalPending;
456
+ if (!transactional || transactional.transaction !== this.eventRoot.renderTransaction)
457
+ return;
458
+ const pending = transactional.frame;
459
+ if (this.pendingSpaceTarget === target && !target.handlers.click) {
460
+ this.cancelSpaceActivation();
461
+ }
462
+ if (!isKeyboardFocusable(target)) {
463
+ pending.ineligibleTargets.add(target);
464
+ const index = pending.targets.findIndex(
465
+ (candidate) => candidate.target === target
466
+ );
467
+ if (index !== -1) pending.targets.splice(index, 1);
468
+ const entryIndex = pending.entries.findIndex(
469
+ (entry) => "target" in entry && entry.target === target
470
+ );
471
+ if (entryIndex !== -1) pending.entries.splice(entryIndex, 1);
472
+ pending.observedTargets.delete(target);
473
+ return;
474
+ }
475
+ pending.ineligibleTargets.delete(target);
476
+ if (pending.observedTargets.has(target)) return;
477
+ pending.observedTargets.add(target);
478
+ const observed = {
479
+ target,
480
+ directionalBoundary: this.currentDirectionalBoundary()
481
+ };
482
+ pending.targets.push(observed);
483
+ pending.entries.push(observed);
484
+ }
485
+ removeTarget(target) {
486
+ if (this.pendingSpaceTarget === target) this.cancelSpaceActivation();
487
+ if (this.pending) {
488
+ this.markPendingIneligible(target);
489
+ return;
490
+ }
491
+ if (!this.committedCandidates.some((candidate) => candidate.target === target)) {
492
+ if (this.focusedTarget === target) this.clearFocusState();
493
+ return;
494
+ }
495
+ this.commitRemovedTarget(target);
496
+ }
497
+ snapshot(target) {
498
+ if (this.ownerReleased || this.pending?.ineligibleTargets.has(target) || target !== this.focusedTarget) {
499
+ return UNFOCUSED_SNAPSHOT;
500
+ }
501
+ return Object.freeze({
502
+ isFocused: true,
503
+ isFocusVisible: this.focusVisible
504
+ });
505
+ }
506
+ resolveKeyboardTarget() {
507
+ const target = this.focusedTarget;
508
+ if (target && this.pending?.ineligibleTargets.has(target)) return void 0;
509
+ return target && this.committedCandidates.some((candidate) => candidate.target === target) ? target : void 0;
510
+ }
511
+ afterDispatch(event) {
512
+ if (event.type === "keydown") {
513
+ applyTabDefault(this, event);
514
+ }
515
+ if (event.type === "keydown" || event.type === "keyup") {
516
+ applyKeyboardActivationDefault(this, event);
517
+ }
518
+ if (event.type === "keydown") {
519
+ applyDirectionalNavigationDefault(this, event);
520
+ }
521
+ }
522
+ afterPressDispatch(input) {
523
+ if (this.destroyed) return;
524
+ this.purgeExpiredPresses(input.originalEvent.timeStamp);
525
+ switch (input.source) {
526
+ case "pointer":
527
+ this.recordPointerPress(input);
528
+ if (!pressWasPrevented(input)) this.applyPressFocus(input.target);
529
+ return;
530
+ case "mouse":
531
+ if (this.consumeRepresentedMousePress(input)) return;
532
+ if (!pressWasPrevented(input)) this.applyPressFocus(input.target);
533
+ return;
534
+ case "touch":
535
+ if (this.consumeRepresentedTouchPress(input)) return;
536
+ this.recordTouchFallback(input);
537
+ if (!pressWasPrevented(input)) this.applyPressFocus(input.target);
538
+ return;
539
+ }
540
+ }
541
+ afterTouchDispatch(input) {
542
+ if (this.destroyed) return;
543
+ this.purgeExpiredPresses(input.originalEvent.timeStamp);
544
+ this.reconcileTouchContacts(input);
545
+ if (input.type === "touchstart") {
546
+ const primary = this.recordTouchStarts(input);
547
+ if (!primary) return;
548
+ this.afterPressDispatch({
549
+ source: "touch",
550
+ target: primary.target,
551
+ event: void 0,
552
+ originalEvent: input.originalEvent,
553
+ x: primary.x,
554
+ y: primary.y,
555
+ touchIdentifier: primary.identifier
556
+ });
557
+ return;
558
+ }
559
+ if (input.type === "touchend" || input.type === "touchcancel") {
560
+ this.recordTouchTerminals(input);
561
+ }
562
+ }
563
+ beforeNativeDispatch(type, event) {
564
+ return this.coordinator.beforeNativeDispatch(type, event);
565
+ }
566
+ enterDOMFocus(backwards) {
567
+ if (this.destroyed) return;
568
+ const pendingPress = this.pendingPressFocus;
569
+ if (pendingPress) {
570
+ this.pendingPressFocus = void 0;
571
+ transitionLogicalFocus(
572
+ this,
573
+ this.liveFocusCandidate(pendingPress.target),
574
+ "pointer"
575
+ );
576
+ return;
577
+ }
578
+ const candidates = backwards ? [...this.committedNavigationCandidates].reverse() : this.committedNavigationCandidates;
579
+ for (const candidate of candidates) {
580
+ if (this.focusNavigationCandidate(candidate, "keyboard", backwards))
581
+ return;
582
+ }
583
+ }
584
+ leaveDOMFocus() {
585
+ if (this.destroyed) return;
586
+ this.pendingPressFocus = void 0;
587
+ transitionLogicalFocus(this, void 0, "keyboard");
588
+ }
589
+ activateDOMHost() {
590
+ if (!this.destroyed) this.coordinator.syncDOMFocusHost(this);
591
+ }
592
+ focusNavigationCandidate(candidate, modality, backwards = false) {
593
+ if (!candidate) return false;
594
+ if (!isHtmlFocusCandidate(candidate)) {
595
+ this.focusedHtmlRegion && this.clearHtmlFocus(this.focusedHtmlRegion);
596
+ transitionLogicalFocus(
597
+ this,
598
+ this.liveFocusCandidate(candidate.target),
599
+ modality
600
+ );
601
+ return true;
602
+ }
603
+ const region = candidate.region;
604
+ const content = region.active ? region.content : void 0;
605
+ const stops = content ? getManagedTabStops(content) : [];
606
+ const destination = backwards ? stops.at(-1) : stops[0];
607
+ if (!destination) return false;
608
+ if (this.focusedTarget) transitionLogicalFocus(this, void 0, modality);
609
+ this.adoptHtmlFocus(region, modality);
610
+ this.pendingHtmlFocusModality = modality;
611
+ destination.focus({ preventScroll: true });
612
+ this.pendingHtmlFocusModality = void 0;
613
+ return true;
614
+ }
615
+ /** @internal Called by the native region listeners after the browser focuses a descendant. */
616
+ adoptNativeHtmlFocus(region, modality) {
617
+ if (!this.committedHtmlCandidates.some(
618
+ (candidate) => candidate.region === region
619
+ ))
620
+ return;
621
+ const carriedModality = modality ?? (this.focusVisible ? "keyboard" : "pointer");
622
+ if (this.focusedTarget)
623
+ transitionLogicalFocus(this, void 0, carriedModality);
624
+ this.adoptHtmlFocus(
625
+ region,
626
+ this.pendingHtmlFocusModality ?? carriedModality
627
+ );
628
+ }
629
+ /** @internal Native blur settled outside a registered host. */
630
+ clearNativeHtmlFocus(region) {
631
+ if (this.focusedHtmlRegion === region) this.clearHtmlFocus(region);
632
+ }
633
+ /** @internal Reconciles a committed host list with the browser focus owner. */
634
+ reconcileNativeHtmlFocus(region) {
635
+ if (region) {
636
+ this.adoptNativeHtmlFocus(region, void 0);
637
+ } else if (this.focusedHtmlRegion) {
638
+ this.clearHtmlFocus(this.focusedHtmlRegion);
639
+ }
640
+ }
641
+ replayRetainedSubtree(instance) {
642
+ const retainedManagers = this.coordinator.claimRetainedManagers(instance);
643
+ const replayManager = retainedManagers.length === 1 ? retainedManagers[0] : this;
644
+ replayManager.replayRetainedTargets(instance);
645
+ }
646
+ layerFocusRenderRevision(instance) {
647
+ return this.ownerReleased ? void 0 : this.layerFocusRenderRevisions.get(instance);
648
+ }
649
+ replayRetainedTargets(instance) {
650
+ const retained = this.committedNavigationCandidates.filter(
651
+ (candidate) => isHtmlFocusCandidate(candidate) ? isInstanceWithin(candidate.region.owner, instance) : isInstanceWithin(candidate.target.owner, instance)
652
+ );
653
+ if (!retained.some(isHtmlFocusCandidate)) {
654
+ this.replayCanvasOnlyTargets(instance);
655
+ return;
656
+ }
657
+ if (this.pending) {
658
+ for (const candidate of retained) {
659
+ const retainedBoundary = isHtmlFocusCandidate(candidate) ? candidate.directionalBoundary instanceof DirectionalBoundary && isInstanceWithin(candidate.directionalBoundary.owner, instance) ? candidate.directionalBoundary : void 0 : retainedDirectionalBoundaries.get(candidate.target);
660
+ const directionalBoundary = retainedBoundary && isInstanceWithin(retainedBoundary.owner, instance) ? retainedBoundary : this.currentDirectionalBoundary();
661
+ if (directionalBoundary) {
662
+ this.pending.boundaries.add(directionalBoundary);
663
+ }
664
+ if (isHtmlFocusCandidate(candidate)) {
665
+ const region = candidate.region;
666
+ if (!region.active || !region.content) continue;
667
+ if (!this.pending.observedHtmlRegions.has(region)) {
668
+ this.pending.observedHtmlRegions.add(region);
669
+ const observed = { region, directionalBoundary };
670
+ this.pending.htmlRegions.push(observed);
671
+ this.pending.entries.push(observed);
672
+ }
673
+ } else if (isKeyboardFocusable(candidate.target)) {
674
+ this.recordPendingTarget(candidate.target, directionalBoundary);
675
+ } else {
676
+ this.markPendingIneligible(candidate.target);
677
+ }
678
+ }
679
+ return;
680
+ }
681
+ if (retained.length === 0) return;
682
+ const replayed = new Set(retained);
683
+ const candidates = Object.freeze(
684
+ this.committedNavigationCandidates.map((candidate) => {
685
+ if (!replayed.has(candidate)) return candidate;
686
+ return isHtmlFocusCandidate(candidate) ? Object.freeze({
687
+ ...candidate,
688
+ rootBounds: candidate.region.rootBounds
689
+ }) : Object.freeze({
690
+ ...candidate,
691
+ rootBounds: resolveTargetRootBounds(candidate.target)
692
+ });
693
+ })
694
+ );
695
+ this.commitNavigationCandidates(candidates, this.committedBoundaries);
696
+ }
697
+ replayCanvasOnlyTargets(instance) {
698
+ const targets = [];
699
+ collectRetainedTargets(instance, targets);
700
+ if (this.pending) {
701
+ for (const target of targets) {
702
+ if (!isKeyboardFocusable(target)) {
703
+ this.markPendingIneligible(target);
704
+ continue;
705
+ }
706
+ const retainedBoundary = retainedDirectionalBoundaries.get(target);
707
+ const directionalBoundary = retainedBoundary && isInstanceWithin(retainedBoundary.owner, instance) ? retainedBoundary : this.currentDirectionalBoundary();
708
+ if (directionalBoundary)
709
+ this.pending.boundaries.add(directionalBoundary);
710
+ this.recordPendingTarget(target, directionalBoundary);
711
+ }
712
+ return;
713
+ }
714
+ const replayed = new Set(targets);
715
+ if (!this.committedCandidates.some(
716
+ (candidate) => replayed.has(candidate.target)
717
+ ))
718
+ return;
719
+ const candidates = Object.freeze(
720
+ this.committedCandidates.map(
721
+ (candidate) => replayed.has(candidate.target) ? Object.freeze({
722
+ ...candidate,
723
+ rootBounds: resolveTargetRootBounds(candidate.target)
724
+ }) : candidate
725
+ )
726
+ );
727
+ this.commitCandidates(candidates, this.committedBoundaries);
728
+ }
729
+ setFocusState(target, focusVisible) {
730
+ if (target && !this.committedCandidates.some((candidate) => candidate.target === target)) {
731
+ throw new Error(
732
+ "Pibbl logical focus target is not a live focus candidate."
733
+ );
734
+ }
735
+ this.commitLogicalFocus(target, focusVisible);
736
+ }
737
+ liveFocusCandidate(target) {
738
+ return target?.live && target.owner.eventRoot === this.eventRoot && this.committedCandidates.some((candidate) => candidate.target === target) ? target : void 0;
739
+ }
740
+ commitLogicalFocus(target, focusVisible) {
741
+ const nextFocusVisible = Boolean(target && focusVisible);
742
+ if (target === this.focusedTarget && nextFocusVisible === this.focusVisible) {
743
+ return;
744
+ }
745
+ const previous = this.focusedTarget;
746
+ if (this.focusedTarget !== target) this.cancelSpaceActivation();
747
+ this.focusedTarget = target;
748
+ this.focusVisible = nextFocusVisible;
749
+ const revision = ++this.focusRenderRevision;
750
+ this.markFocusRenderLayers(previous, revision);
751
+ this.markFocusRenderLayers(target, revision);
752
+ }
753
+ enterDirectionalBoundary(boundary) {
754
+ const value = asDirectionalBoundary(boundary);
755
+ this.directionalStack.push(value);
756
+ this.pending?.boundaries.add(value);
757
+ }
758
+ exitDirectionalBoundary(boundary) {
759
+ const value = asDirectionalBoundary(boundary);
760
+ if (this.directionalStack.at(-1) !== value) {
761
+ throw new Error("Pibbl directional boundary scope exited out of order.");
762
+ }
763
+ this.directionalStack.pop();
764
+ }
765
+ currentDirectionalBoundary() {
766
+ return this.directionalStack.at(-1);
767
+ }
768
+ markFocusRenderLayers(target, revision) {
769
+ let instance = target?.owner;
770
+ while (instance && instance !== this.eventRoot.rootInstance) {
771
+ this.layerFocusRenderRevisions.set(instance, revision);
772
+ instance = instance.parent ? GLOBAL_STATE.pibblInstances.get(instance.parent) : void 0;
773
+ }
774
+ }
775
+ dispose() {
776
+ if (this.ownerReleased || this.destroyed) return;
777
+ this.coordinator.release(this);
778
+ }
779
+ markOwnerReleased() {
780
+ this.ownerReleased = true;
781
+ }
782
+ destroyFromCoordinator() {
783
+ if (this.destroyed) return;
784
+ this.destroyed = true;
785
+ managerOwners.delete(this);
786
+ this.pending = void 0;
787
+ this.directionalStack = [];
788
+ this.pendingPressFocus = void 0;
789
+ this.cancelSpaceActivation();
790
+ this.representedPointerPresses.clear();
791
+ this.representedTouchContacts.clear();
792
+ this.activeTouchIdentifiers.clear();
793
+ this.primaryTouchIdentifier = void 0;
794
+ this.touchSequenceActive = false;
795
+ this.touchMouseCompatibility = void 0;
796
+ for (const boundary of this.committedBoundaries) {
797
+ boundary.commit(Object.freeze([]));
798
+ }
799
+ this.committedBoundaries.clear();
800
+ this.committedCandidates = Object.freeze([]);
801
+ this.clearFocusState();
802
+ }
803
+ recordPendingTarget(target, directionalBoundary) {
804
+ const pending = this.pending;
805
+ if (!pending || pending.observedTargets.has(target)) return;
806
+ pending.observedTargets.add(target);
807
+ const observed = { target, directionalBoundary };
808
+ pending.targets.push(observed);
809
+ pending.entries.push(observed);
810
+ }
811
+ markPendingIneligible(target) {
812
+ const pending = this.pending;
813
+ if (!pending) return;
814
+ pending.ineligibleTargets.add(target);
815
+ if (!pending.observedTargets.delete(target)) return;
816
+ for (let index = pending.targets.length - 1; index >= 0; index--) {
817
+ if (pending.targets[index].target === target) {
818
+ pending.targets.splice(index, 1);
819
+ }
820
+ }
821
+ for (let index = pending.entries.length - 1; index >= 0; index--) {
822
+ const entry = pending.entries[index];
823
+ if ("target" in entry && entry.target === target)
824
+ pending.entries.splice(index, 1);
825
+ }
826
+ }
827
+ commitCandidates(candidates, boundaries) {
828
+ const canvasByTarget = new Map(
829
+ candidates.map((candidate) => [candidate.target, candidate])
830
+ );
831
+ const navigation = this.committedNavigationCandidates.map(
832
+ (candidate) => isHtmlFocusCandidate(candidate) ? candidate : canvasByTarget.get(candidate.target) ?? candidate
833
+ ).filter(
834
+ (candidate) => isHtmlFocusCandidate(candidate) || candidates.some((canvas) => canvas.target === candidate.target)
835
+ );
836
+ if (navigation.length === 0 && candidates.length > 0)
837
+ navigation.push(...candidates);
838
+ this.commitNavigationCandidates(Object.freeze(navigation), boundaries);
839
+ }
840
+ commitNavigationCandidates(candidates, boundaries) {
841
+ const pendingByBoundary = /* @__PURE__ */ new Map();
842
+ for (const boundary of boundaries) pendingByBoundary.set(boundary, []);
843
+ for (const candidate of candidates) {
844
+ if (candidate.directionalBoundary instanceof DirectionalBoundary) {
845
+ pendingByBoundary.get(candidate.directionalBoundary)?.push(candidate);
846
+ }
847
+ }
848
+ const committedByBoundary = /* @__PURE__ */ new Map();
849
+ for (const [boundary, directCandidates] of pendingByBoundary) {
850
+ committedByBoundary.set(boundary, Object.freeze(directCandidates));
851
+ }
852
+ for (const boundary of this.committedBoundaries) {
853
+ if (!committedByBoundary.has(boundary)) {
854
+ boundary.commit(Object.freeze([]));
855
+ }
856
+ }
857
+ for (const [boundary, directCandidates] of committedByBoundary) {
858
+ boundary.commit(directCandidates);
859
+ }
860
+ this.committedBoundaries = new Set(committedByBoundary.keys());
861
+ this.committedNavigationCandidates = candidates;
862
+ this.committedCandidates = Object.freeze(
863
+ candidates.filter(
864
+ (candidate) => !isHtmlFocusCandidate(candidate)
865
+ )
866
+ );
867
+ this.committedHtmlCandidates = Object.freeze(
868
+ candidates.filter(
869
+ (candidate) => isHtmlFocusCandidate(candidate)
870
+ )
871
+ );
872
+ if (this.focusedTarget && !candidates.some(
873
+ (candidate) => !isHtmlFocusCandidate(candidate) && candidate.target === this.focusedTarget
874
+ )) {
875
+ this.clearFocusState();
876
+ }
877
+ if (this.focusedHtmlRegion && !this.committedHtmlCandidates.some(
878
+ (candidate) => candidate.region === this.focusedHtmlRegion
879
+ ))
880
+ this.clearHtmlFocus(this.focusedHtmlRegion);
881
+ this.activateDOMHost();
882
+ }
883
+ commitRemovedTarget(target) {
884
+ const retained = this.committedCandidates.filter(
885
+ (candidate) => candidate.target !== target
886
+ );
887
+ const candidates = Object.freeze(
888
+ retained.map(
889
+ (candidate, sourceIndex) => Object.freeze({ ...candidate, sourceIndex })
890
+ )
891
+ );
892
+ this.commitCandidates(candidates, this.committedBoundaries);
893
+ }
894
+ clearFocusState() {
895
+ this.cancelSpaceActivation();
896
+ this.focusedTarget = void 0;
897
+ this.focusVisible = false;
898
+ }
899
+ adoptHtmlFocus(region, modality) {
900
+ const visible = modality === "keyboard";
901
+ if (this.focusedHtmlRegion === region && this.focusVisible === visible)
902
+ return;
903
+ const previous = this.focusedHtmlRegion;
904
+ this.focusedHtmlRegion = region;
905
+ this.focusVisible = visible;
906
+ if (previous && previous !== region)
907
+ this.notifyHtmlFocus(previous, false, false);
908
+ this.notifyHtmlFocus(region, true, visible);
909
+ }
910
+ clearHtmlFocus(region) {
911
+ if (this.focusedHtmlRegion !== region) return;
912
+ this.focusedHtmlRegion = void 0;
913
+ this.focusVisible = false;
914
+ this.notifyHtmlFocus(region, false, false);
915
+ }
916
+ notifyHtmlFocus(region, isFocusWithin, isFocusVisible) {
917
+ region.onFocusSnapshot?.(Object.freeze({ isFocusWithin, isFocusVisible }));
918
+ }
919
+ applyPressFocus(requestedTarget) {
920
+ const target = this.liveFocusCandidate(requestedTarget);
921
+ const pending = { target };
922
+ this.pendingPressFocus = pending;
923
+ try {
924
+ this.coordinator.focusCanvasFromPress(this);
925
+ if (this.pendingPressFocus !== pending || this.destroyed || this.canvas.ownerDocument.activeElement !== this.canvas) {
926
+ return;
927
+ }
928
+ this.pendingPressFocus = void 0;
929
+ transitionLogicalFocus(this, this.liveFocusCandidate(target), "pointer");
930
+ } finally {
931
+ if (this.pendingPressFocus === pending)
932
+ this.pendingPressFocus = void 0;
933
+ }
934
+ }
935
+ beginSpaceActivation(target) {
936
+ this.pendingSpaceTarget = target;
937
+ }
938
+ hasPendingSpaceActivation(target) {
939
+ return Boolean(target && this.pendingSpaceTarget === target);
940
+ }
941
+ consumeSpaceActivation() {
942
+ const target = this.pendingSpaceTarget;
943
+ this.pendingSpaceTarget = void 0;
944
+ return target;
945
+ }
946
+ cancelSpaceActivation() {
947
+ this.pendingSpaceTarget = void 0;
948
+ }
949
+ recordPointerPress(input) {
950
+ if (input.pointerId === void 0) return;
951
+ this.representedPointerPresses.set(input.pointerId, {
952
+ x: input.x,
953
+ y: input.y,
954
+ timeStamp: input.originalEvent.timeStamp,
955
+ suppressMouse: true,
956
+ suppressTouch: input.pointerType === "touch"
957
+ });
958
+ }
959
+ consumeRepresentedMousePress(input) {
960
+ for (const [pointerId, press] of this.representedPointerPresses) {
961
+ if (!press.suppressMouse || !samePress(press, input)) continue;
962
+ press.suppressMouse = false;
963
+ if (!press.suppressTouch)
964
+ this.representedPointerPresses.delete(pointerId);
965
+ return true;
966
+ }
967
+ if (this.touchMouseCompatibility && samePress(this.touchMouseCompatibility, input)) {
968
+ this.touchMouseCompatibility = void 0;
969
+ return true;
970
+ }
971
+ return false;
972
+ }
973
+ consumeRepresentedTouchPress(input) {
974
+ const identifier = input.touchIdentifier;
975
+ if (identifier === void 0) return false;
976
+ const existing = this.representedTouchContacts.get(identifier);
977
+ if (existing && samePress(existing, input)) return true;
978
+ this.representedTouchContacts.set(identifier, pressRecord(input));
979
+ for (const [pointerId, press] of this.representedPointerPresses) {
980
+ if (!press.suppressTouch || !samePress(press, input)) continue;
981
+ press.suppressTouch = false;
982
+ if (!press.suppressMouse)
983
+ this.representedPointerPresses.delete(pointerId);
984
+ return true;
985
+ }
986
+ return false;
987
+ }
988
+ recordTouchFallback(input) {
989
+ this.touchMouseCompatibility = pressRecord(input);
990
+ }
991
+ recordTouchStarts(input) {
992
+ let primary;
993
+ for (const contact of input.changedContacts) {
994
+ if (this.activeTouchIdentifiers.has(contact.identifier)) continue;
995
+ if (!this.touchSequenceActive) {
996
+ this.touchSequenceActive = true;
997
+ this.primaryTouchIdentifier = contact.identifier;
998
+ }
999
+ if (contact.identifier === this.primaryTouchIdentifier) primary = contact;
1000
+ this.activeTouchIdentifiers.add(contact.identifier);
1001
+ }
1002
+ return primary;
1003
+ }
1004
+ reconcileTouchContacts(input) {
1005
+ const activeIdentifiers = new Set(input.activeIdentifiers);
1006
+ for (const identifier of this.activeTouchIdentifiers) {
1007
+ if (activeIdentifiers.has(identifier)) continue;
1008
+ this.activeTouchIdentifiers.delete(identifier);
1009
+ this.representedTouchContacts.delete(identifier);
1010
+ }
1011
+ const startingIdentifiers = input.type === "touchstart" ? new Set(input.changedContacts.map((contact) => contact.identifier)) : void 0;
1012
+ for (const identifier of activeIdentifiers) {
1013
+ if (!startingIdentifiers?.has(identifier)) {
1014
+ this.activeTouchIdentifiers.add(identifier);
1015
+ }
1016
+ }
1017
+ if (this.activeTouchIdentifiers.size > 0) {
1018
+ this.touchSequenceActive = true;
1019
+ return;
1020
+ }
1021
+ this.touchSequenceActive = false;
1022
+ this.primaryTouchIdentifier = void 0;
1023
+ this.representedTouchContacts.clear();
1024
+ }
1025
+ recordTouchTerminals(input) {
1026
+ for (const contact of input.changedContacts) {
1027
+ this.activeTouchIdentifiers.delete(contact.identifier);
1028
+ this.representedTouchContacts.delete(contact.identifier);
1029
+ }
1030
+ if (this.activeTouchIdentifiers.size > 0) return;
1031
+ this.touchSequenceActive = false;
1032
+ this.primaryTouchIdentifier = void 0;
1033
+ this.representedTouchContacts.clear();
1034
+ }
1035
+ purgeExpiredPresses(timeStamp) {
1036
+ for (const [pointerId, press] of this.representedPointerPresses) {
1037
+ if (!recentPress(press, timeStamp)) {
1038
+ this.representedPointerPresses.delete(pointerId);
1039
+ }
1040
+ }
1041
+ for (const [identifier, press] of this.representedTouchContacts) {
1042
+ if (!recentPress(press, timeStamp)) {
1043
+ this.representedTouchContacts.delete(identifier);
1044
+ }
1045
+ }
1046
+ if (this.touchMouseCompatibility && !recentPress(this.touchMouseCompatibility, timeStamp)) {
1047
+ this.touchMouseCompatibility = void 0;
1048
+ }
1049
+ }
1050
+ assertLive() {
1051
+ if (this.destroyed) throw new Error("Pibbl focus manager is disposed.");
1052
+ }
1053
+ }
1054
+ function pressWasPrevented(input) {
1055
+ return input.event?.defaultPrevented ?? input.originalEvent.defaultPrevented;
1056
+ }
1057
+ function pressRecord(input) {
1058
+ return {
1059
+ x: input.x,
1060
+ y: input.y,
1061
+ timeStamp: input.originalEvent.timeStamp
1062
+ };
1063
+ }
1064
+ function samePress(press, input) {
1065
+ return recentPress(press, input.originalEvent.timeStamp) && Math.abs(press.x - input.x) <= 1 && Math.abs(press.y - input.y) <= 1;
1066
+ }
1067
+ function recentPress(press, timeStamp) {
1068
+ const elapsed = timeStamp - press.timeStamp;
1069
+ return elapsed >= 0 && elapsed <= COMPATIBILITY_PRESS_WINDOW_MS;
1070
+ }
1071
+ function createFocusManager(eventRoot, owner) {
1072
+ return new PibblFocusManager(eventRoot, owner);
1073
+ }
1074
+ function requireFocusManager(eventRoot) {
1075
+ const manager = eventRoot.focusPolicy;
1076
+ if (!(manager instanceof PibblFocusManager)) {
1077
+ throw new Error(
1078
+ "KeyboardNavigation requires an active FocusManagement focus manager."
1079
+ );
1080
+ }
1081
+ return manager;
1082
+ }
1083
+ function createDirectionalBoundary(owner) {
1084
+ return new DirectionalBoundary(owner);
1085
+ }
1086
+ function getCoordinator(eventRoot) {
1087
+ let coordinator = coordinators.get(eventRoot);
1088
+ if (!coordinator) {
1089
+ coordinator = new FocusManagerCoordinator(eventRoot);
1090
+ coordinators.set(eventRoot, coordinator);
1091
+ }
1092
+ return coordinator;
1093
+ }
1094
+ function duplicateManagerError() {
1095
+ return new Error(
1096
+ "FocusManagement allows only one focus manager per Pibbl root."
1097
+ );
1098
+ }
1099
+ function asDirectionalBoundary(boundary) {
1100
+ if (!(boundary instanceof DirectionalBoundary)) {
1101
+ throw new Error("Unknown Pibbl directional boundary.");
1102
+ }
1103
+ return boundary;
1104
+ }
1105
+ function isKeyboardFocusable(target) {
1106
+ return target.keyboardFocusable ?? Boolean(
1107
+ target.handlers.click || target.handlers.keydown || target.handlers.keyup
1108
+ );
1109
+ }
1110
+ function collectRetainedTargets(instance, targets) {
1111
+ if (instance.mainTeardowns.closed) return;
1112
+ for (const target of instance.eventRoot.targets) {
1113
+ if (target.live && target.owner.eventRoot === instance.eventRoot && !target.owner.mainTeardowns.closed && isInstanceWithin(target.owner, instance))
1114
+ targets.push(target);
1115
+ }
1116
+ }
1117
+ function isInstanceWithin(instance, ancestor) {
1118
+ let current = instance;
1119
+ while (current) {
1120
+ if (current === ancestor) return true;
1121
+ current = current.parent ? GLOBAL_STATE.pibblInstances.get(current.parent) : void 0;
1122
+ }
1123
+ return false;
1124
+ }
1125
+ export {
1126
+ PibblFocusManager,
1127
+ createDirectionalBoundary,
1128
+ createFocusManager,
1129
+ requireFocusManager
1130
+ };
1131
+ //# sourceMappingURL=focus-manager.js.map