@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,563 @@
1
+ import { assertFiniteBox, assertFinitePoint, freezeBox } from "./geometry.js";
2
+ import {
3
+ assertFiniteOrigin,
4
+ assertPositiveFiniteStep,
5
+ isSnapActive,
6
+ snapToLattice
7
+ } from "./snap.js";
8
+ function solveManipulation(input) {
9
+ assertFiniteBox(input.initial, "initial");
10
+ assertFinitePoint(input.initialPoint, "initialPoint");
11
+ assertFinitePoint(input.currentPoint, "currentPoint");
12
+ validateConfiguredSnaps(input);
13
+ if (!Number.isFinite(input.initialRotation ?? 0))
14
+ throw new Error("initialRotation must be finite.");
15
+ switch (input.operation) {
16
+ case "move":
17
+ return solveMove(input);
18
+ case "resize":
19
+ return solveResize(input);
20
+ case "rotate":
21
+ return solveRotation(input);
22
+ }
23
+ }
24
+ function solveMove(input) {
25
+ const { initial } = input;
26
+ const axis = input.move?.axis ?? "both";
27
+ if (input.move?.bounds) {
28
+ assertFiniteBox(input.move.bounds, "move.bounds");
29
+ if (!containsRotated(input.move.bounds, initial, input.initialRotation ?? 0))
30
+ throw new Error("Move bounds must contain the initial box.");
31
+ }
32
+ const deltaX = input.currentPoint.x - input.initialPoint.x;
33
+ const deltaY = input.currentPoint.y - input.initialPoint.y;
34
+ const proposed = freezeBox({
35
+ ...initial,
36
+ left: axis === "y" ? initial.left : initial.left + deltaX,
37
+ top: axis === "x" ? initial.top : initial.top + deltaY
38
+ });
39
+ const snap = input.move?.snap;
40
+ const snapActive = snap !== void 0 && isSnapActive(snap.enabled, snap.when, input.modifiers);
41
+ if (!snapActive)
42
+ return result(
43
+ proposed,
44
+ clampMoveToBounds(
45
+ proposed,
46
+ input.move?.bounds,
47
+ input.initialRotation ?? 0
48
+ ),
49
+ false,
50
+ true,
51
+ input.initialRotation
52
+ );
53
+ const [stepX, stepY] = moveSteps(snap);
54
+ const origin = snap.origin;
55
+ const applied = freezeBox({
56
+ ...proposed,
57
+ left: axis === "y" ? proposed.left : snapToLattice(proposed.left, stepX, origin?.x ?? 0),
58
+ top: axis === "x" ? proposed.top : snapToLattice(proposed.top, stepY, origin?.y ?? 0)
59
+ });
60
+ const bounded = clampMoveToBounds(
61
+ applied,
62
+ input.move?.bounds,
63
+ input.initialRotation ?? 0
64
+ );
65
+ return result(
66
+ proposed,
67
+ bounded,
68
+ true,
69
+ boxesEqual(applied, bounded),
70
+ input.initialRotation
71
+ );
72
+ }
73
+ function solveResize(input) {
74
+ const handle = input.handle;
75
+ if (!handle) throw new Error("Resize manipulation requires a handle.");
76
+ const rotation = input.initialRotation ?? 0;
77
+ if (!Number.isFinite(rotation))
78
+ throw new Error("initialRotation must be finite.");
79
+ if (input.resize?.snap?.target === "grid" && rotation !== 0)
80
+ throw new Error("Grid resize snapping requires an unrotated box.");
81
+ const raw = resizeFromPoint(
82
+ input.initial,
83
+ handle,
84
+ rotateInverse(
85
+ {
86
+ x: input.currentPoint.x - input.initialPoint.x,
87
+ y: input.currentPoint.y - input.initialPoint.y
88
+ },
89
+ rotation
90
+ )
91
+ );
92
+ const proposed = resizeFromDimensionsRotated(
93
+ input.initial,
94
+ handle,
95
+ raw.width,
96
+ raw.height,
97
+ rotation
98
+ );
99
+ const ratio = activeRatio(input.initial, input.resize, input.modifiers);
100
+ const changesWidth = handle.includes("left") || handle.includes("right");
101
+ const changesHeight = handle.includes("top") || handle.includes("bottom");
102
+ const constraints = resolvedResizeConstraints(input.resize);
103
+ if (ratio === void 0) {
104
+ if (!changesWidth) {
105
+ if (input.initial.width < constraints.minWidth || input.initial.width > constraints.maxWidth)
106
+ throw new Error(
107
+ "Resize width constraints conflict with the fixed dimension."
108
+ );
109
+ constraints.minWidth = constraints.maxWidth = input.initial.width;
110
+ }
111
+ if (!changesHeight) {
112
+ if (input.initial.height < constraints.minHeight || input.initial.height > constraints.maxHeight)
113
+ throw new Error(
114
+ "Resize height constraints conflict with the fixed dimension."
115
+ );
116
+ constraints.minHeight = constraints.maxHeight = input.initial.height;
117
+ }
118
+ }
119
+ const snap = input.resize?.snap;
120
+ const snapActive = snap !== void 0 && isSnapActive(snap.enabled, snap.when, input.modifiers);
121
+ let width = raw.width;
122
+ let height = raw.height;
123
+ if (ratio !== void 0) {
124
+ const widthDrives = changesWidth && (!changesHeight || Math.abs(raw.width / input.initial.width - 1) >= Math.abs(raw.height / input.initial.height - 1));
125
+ if (snapActive) {
126
+ const snapped = snapResize(input.initial, raw, handle, snap);
127
+ if (widthDrives) width = snapped.width;
128
+ else height = snapped.height;
129
+ }
130
+ if (widthDrives) height = width / ratio;
131
+ else width = height * ratio;
132
+ } else if (snapActive) {
133
+ const snapped = snapResize(input.initial, raw, handle, snap);
134
+ width = snapped.width;
135
+ height = snapped.height;
136
+ }
137
+ const bounded = constrainDimensions(
138
+ input.initial,
139
+ handle,
140
+ { width, height },
141
+ rotation,
142
+ input.resize?.bounds,
143
+ ratio,
144
+ constraints
145
+ );
146
+ const applied = resizeFromDimensionsRotated(
147
+ input.initial,
148
+ handle,
149
+ bounded.width,
150
+ bounded.height,
151
+ rotation
152
+ );
153
+ const onLattice = (value, step, origin = 0) => Math.abs(value - snapToLattice(value, step, origin)) <= 1e-9 * Math.max(1, Math.abs(value));
154
+ let snapSatisfied = true;
155
+ if (snapActive) {
156
+ if (snap.target === "grid") {
157
+ const grid = snap;
158
+ const [stepX, stepY] = gridSteps(grid);
159
+ snapSatisfied = (!changesWidth || onLattice(
160
+ handle.includes("left") ? applied.left : applied.left + applied.width,
161
+ stepX,
162
+ grid.origin?.x
163
+ )) && (!changesHeight || onLattice(
164
+ handle.includes("top") ? applied.top : applied.top + applied.height,
165
+ stepY,
166
+ grid.origin?.y
167
+ ));
168
+ } else {
169
+ const [stepWidth, stepHeight] = sizeSteps(
170
+ snap
171
+ );
172
+ snapSatisfied = (!(changesWidth || ratio !== void 0) || onLattice(applied.width, stepWidth)) && (!(changesHeight || ratio !== void 0) || onLattice(applied.height, stepHeight));
173
+ }
174
+ }
175
+ return result(proposed, applied, snapActive, snapSatisfied, rotation);
176
+ }
177
+ function solveRotation(input) {
178
+ const initialRotation = input.initialRotation ?? 0;
179
+ const delta = input.rotationDelta ?? 0;
180
+ if (!Number.isFinite(initialRotation) || !Number.isFinite(delta)) {
181
+ throw new Error("Rotation values must be finite.");
182
+ }
183
+ const proposedRotation = initialRotation + delta;
184
+ const snap = input.rotate?.snap;
185
+ const snapActive = snap !== void 0 && isSnapActive(snap.enabled, snap.when, input.modifiers);
186
+ const appliedRotation = snapActive ? snapToLattice(proposedRotation, snap.step, snap.origin ?? 0) : proposedRotation;
187
+ return result(
188
+ input.initial,
189
+ input.initial,
190
+ snapActive,
191
+ true,
192
+ initialRotation,
193
+ proposedRotation,
194
+ appliedRotation
195
+ );
196
+ }
197
+ function resizeFromPoint(initial, handle, delta) {
198
+ const movesLeft = handle.includes("left");
199
+ const movesRight = handle.includes("right");
200
+ const movesTop = handle.includes("top");
201
+ const movesBottom = handle.includes("bottom");
202
+ return freezeBox({
203
+ left: movesLeft ? initial.left + delta.x : initial.left,
204
+ top: movesTop ? initial.top + delta.y : initial.top,
205
+ width: initial.width + (movesRight ? delta.x : 0) - (movesLeft ? delta.x : 0),
206
+ height: initial.height + (movesBottom ? delta.y : 0) - (movesTop ? delta.y : 0)
207
+ });
208
+ }
209
+ function resizeFromDimensions(initial, handle, width, height) {
210
+ return freezeBox({
211
+ left: handle.includes("left") ? initial.left + initial.width - width : initial.left,
212
+ top: handle.includes("top") ? initial.top + initial.height - height : initial.top,
213
+ width,
214
+ height
215
+ });
216
+ }
217
+ function snapResize(initial, proposed, handle, snap) {
218
+ if (snap.target === "grid") {
219
+ const [stepX, stepY] = gridSteps(snap);
220
+ const origin = snap.origin;
221
+ const movesLeft = handle.includes("left");
222
+ const movesTop = handle.includes("top");
223
+ const edgeX = movesLeft ? proposed.left : proposed.left + proposed.width;
224
+ const edgeY = movesTop ? proposed.top : proposed.top + proposed.height;
225
+ const snappedEdgeX = snapToLattice(edgeX, stepX, origin?.x ?? 0);
226
+ const snappedEdgeY = snapToLattice(edgeY, stepY, origin?.y ?? 0);
227
+ const width = !(handle.includes("left") || handle.includes("right")) ? initial.width : movesLeft ? initial.left + initial.width - snappedEdgeX : snappedEdgeX - initial.left;
228
+ const height = !(handle.includes("top") || handle.includes("bottom")) ? initial.height : movesTop ? initial.top + initial.height - snappedEdgeY : snappedEdgeY - initial.top;
229
+ return resizeFromDimensions(initial, handle, width, height);
230
+ }
231
+ const [stepWidth, stepHeight] = sizeSteps(snap);
232
+ return resizeFromDimensions(
233
+ proposed,
234
+ handle,
235
+ handle.includes("left") || handle.includes("right") ? snapToLattice(proposed.width, stepWidth) : proposed.width,
236
+ handle.includes("top") || handle.includes("bottom") ? snapToLattice(proposed.height, stepHeight) : proposed.height
237
+ );
238
+ }
239
+ function moveSteps(snap) {
240
+ return typeof snap.step === "number" ? [snap.step, snap.step] : [snap.step.x, snap.step.y];
241
+ }
242
+ function sizeSteps(snap) {
243
+ return typeof snap.step === "number" ? [snap.step, snap.step] : [snap.step.width, snap.step.height];
244
+ }
245
+ function gridSteps(snap) {
246
+ return typeof snap.step === "number" ? [snap.step, snap.step] : [snap.step.x, snap.step.y];
247
+ }
248
+ function resolvedResizeConstraints(options) {
249
+ for (const name of [
250
+ "minWidth",
251
+ "minHeight",
252
+ "maxWidth",
253
+ "maxHeight"
254
+ ]) {
255
+ const value = options?.[name];
256
+ if (value !== void 0 && (!Number.isFinite(value) || value <= 0))
257
+ throw new Error(`${name} must be positive and finite.`);
258
+ }
259
+ const minWidth = options?.minWidth ?? 1;
260
+ const minHeight = options?.minHeight ?? 1;
261
+ const maxWidth = options?.maxWidth ?? Number.POSITIVE_INFINITY;
262
+ const maxHeight = options?.maxHeight ?? Number.POSITIVE_INFINITY;
263
+ for (const [name, value] of Object.entries({
264
+ minWidth,
265
+ minHeight,
266
+ maxWidth,
267
+ maxHeight
268
+ })) {
269
+ if (!Number.isFinite(value) && value !== Number.POSITIVE_INFINITY) {
270
+ throw new Error(`${name} must be finite, received ${value}`);
271
+ }
272
+ }
273
+ if (minWidth <= 0 || minHeight <= 0 || maxWidth <= 0 || maxHeight <= 0) {
274
+ throw new Error("Resize constraints must be greater than zero.");
275
+ }
276
+ if (minWidth > maxWidth || minHeight > maxHeight) {
277
+ throw new Error(
278
+ "Resize minimum dimensions must not exceed maximum dimensions."
279
+ );
280
+ }
281
+ return { minWidth, minHeight, maxWidth, maxHeight };
282
+ }
283
+ function clamp(value, min, max) {
284
+ return Math.min(max, Math.max(min, value));
285
+ }
286
+ function clampMoveToBounds(box, bounds, rotation = 0) {
287
+ if (!bounds) return box;
288
+ assertFiniteBox(bounds, "move.bounds");
289
+ const corners = rotatedCorners(box, rotation);
290
+ const minX = Math.min(...corners.map((point) => point.x));
291
+ const maxX = Math.max(...corners.map((point) => point.x));
292
+ const minY = Math.min(...corners.map((point) => point.y));
293
+ const maxY = Math.max(...corners.map((point) => point.y));
294
+ if (maxX - minX > bounds.width || maxY - minY > bounds.height)
295
+ throw new Error("Move bounds cannot contain the initial box.");
296
+ return freezeBox({
297
+ ...box,
298
+ left: box.left + clamp(0, bounds.left - minX, bounds.left + bounds.width - maxX),
299
+ top: box.top + clamp(0, bounds.top - minY, bounds.top + bounds.height - maxY)
300
+ });
301
+ }
302
+ function activeRatio(initial, options, modifiers) {
303
+ const aspect = options?.aspectRatio;
304
+ if (!aspect) return void 0;
305
+ const ratio = aspect.value === "initial" ? initial.width / initial.height : aspect.value;
306
+ if (!Number.isFinite(ratio) || ratio <= 0)
307
+ throw new Error(
308
+ "Resize aspect ratio must be finite and greater than zero."
309
+ );
310
+ return isSnapActive(true, aspect.when, modifiers) ? ratio : void 0;
311
+ }
312
+ function rotateInverse(point, radians) {
313
+ const cosine = Math.cos(radians);
314
+ const sine = Math.sin(radians);
315
+ return {
316
+ x: point.x * cosine + point.y * sine,
317
+ y: -point.x * sine + point.y * cosine
318
+ };
319
+ }
320
+ function resizeFromDimensionsRotated(initial, handle, width, height, radians) {
321
+ const oldCenter = {
322
+ x: initial.left + initial.width / 2,
323
+ y: initial.top + initial.height / 2
324
+ };
325
+ const opposite = {
326
+ x: handle.includes("left") ? initial.width / 2 : handle.includes("right") ? -initial.width / 2 : 0,
327
+ y: handle.includes("top") ? initial.height / 2 : handle.includes("bottom") ? -initial.height / 2 : 0
328
+ };
329
+ const cosine = Math.cos(radians);
330
+ const sine = Math.sin(radians);
331
+ const anchor = {
332
+ x: oldCenter.x + opposite.x * cosine - opposite.y * sine,
333
+ y: oldCenter.y + opposite.x * sine + opposite.y * cosine
334
+ };
335
+ const nextOpposite = {
336
+ x: handle.includes("left") ? width / 2 : handle.includes("right") ? -width / 2 : 0,
337
+ y: handle.includes("top") ? height / 2 : handle.includes("bottom") ? -height / 2 : 0
338
+ };
339
+ const center = {
340
+ x: anchor.x - (nextOpposite.x * cosine - nextOpposite.y * sine),
341
+ y: anchor.y - (nextOpposite.x * sine + nextOpposite.y * cosine)
342
+ };
343
+ return freezeBox({
344
+ left: center.x - width / 2,
345
+ top: center.y - height / 2,
346
+ width,
347
+ height
348
+ });
349
+ }
350
+ function constrainDimensions(initial, handle, proposed, rotation, bounds, ratio, constraints) {
351
+ if (!Number.isFinite(proposed.width) || !Number.isFinite(proposed.height))
352
+ throw new Error("Resize geometry exceeds finite coordinates.");
353
+ if (bounds) {
354
+ assertFiniteBox(bounds, "resize.bounds");
355
+ if (!containsRotated(bounds, initial, rotation))
356
+ throw new Error("Resize bounds must contain the initial box.");
357
+ }
358
+ if (ratio !== void 0) {
359
+ let minimum = Math.max(constraints.minWidth, constraints.minHeight * ratio);
360
+ let maximum = Math.min(constraints.maxWidth, constraints.maxHeight * ratio);
361
+ for (const plane of bounds ? boundsPlanes(initial, handle, rotation, bounds) : []) {
362
+ const slope = plane.a + plane.b / ratio;
363
+ if (Math.abs(slope) < 1e-12) {
364
+ if (plane.c < -1e-9)
365
+ throw new Error("Resize bounds have no feasible ratio.");
366
+ } else if (slope > 0) maximum = Math.min(maximum, plane.c / slope);
367
+ else minimum = Math.max(minimum, plane.c / slope);
368
+ }
369
+ if (minimum > maximum)
370
+ throw new Error(
371
+ "Resize constraints cannot satisfy the aspect ratio and bounds."
372
+ );
373
+ const width = clamp(proposed.width, minimum, maximum);
374
+ return { width, height: width / ratio };
375
+ }
376
+ if (bounds)
377
+ return projectSizeToBounds(
378
+ initial,
379
+ handle,
380
+ proposed,
381
+ rotation,
382
+ bounds,
383
+ constraints
384
+ );
385
+ return {
386
+ width: clamp(proposed.width, constraints.minWidth, constraints.maxWidth),
387
+ height: clamp(
388
+ proposed.height,
389
+ constraints.minHeight,
390
+ constraints.maxHeight
391
+ )
392
+ };
393
+ }
394
+ function projectSizeToBounds(initial, handle, proposed, rotation, bounds, constraints) {
395
+ const maximumWidth = Number.isFinite(constraints.maxWidth) ? constraints.maxWidth : Math.max(initial.width, bounds.width + bounds.height);
396
+ const maximumHeight = Number.isFinite(constraints.maxHeight) ? constraints.maxHeight : Math.max(initial.height, bounds.width + bounds.height);
397
+ let polygon = [
398
+ { width: constraints.minWidth, height: constraints.minHeight },
399
+ { width: maximumWidth, height: constraints.minHeight },
400
+ { width: maximumWidth, height: maximumHeight },
401
+ { width: constraints.minWidth, height: maximumHeight }
402
+ ];
403
+ const planes = boundsPlanes(initial, handle, rotation, bounds);
404
+ for (const plane of planes) polygon = clipPolygon(polygon, plane);
405
+ if (polygon.length === 0)
406
+ throw new Error("Resize bounds have no feasible size region.");
407
+ return closestPointInPolygon(
408
+ { width: proposed.width, height: proposed.height },
409
+ polygon
410
+ );
411
+ }
412
+ function boundsPlanes(initial, handle, rotation, bounds) {
413
+ const zero = resizeFromDimensionsRotated(initial, handle, 0, 0, rotation);
414
+ const unitWidth = resizeFromDimensionsRotated(
415
+ initial,
416
+ handle,
417
+ 1,
418
+ 0,
419
+ rotation
420
+ );
421
+ const unitHeight = resizeFromDimensionsRotated(
422
+ initial,
423
+ handle,
424
+ 0,
425
+ 1,
426
+ rotation
427
+ );
428
+ const planes = [];
429
+ const zeroCorners = rotatedCorners(zero, rotation);
430
+ const widthCorners = rotatedCorners(unitWidth, rotation);
431
+ const heightCorners = rotatedCorners(unitHeight, rotation);
432
+ for (let index = 0; index < 4; index++) {
433
+ for (const [coordinate, lower, upper] of [
434
+ ["x", bounds.left, bounds.left + bounds.width],
435
+ ["y", bounds.top, bounds.top + bounds.height]
436
+ ]) {
437
+ const constant = zeroCorners[index][coordinate];
438
+ const a = widthCorners[index][coordinate] - constant;
439
+ const b = heightCorners[index][coordinate] - constant;
440
+ planes.push(
441
+ { a, b, c: upper - constant },
442
+ { a: -a, b: -b, c: constant - lower }
443
+ );
444
+ }
445
+ }
446
+ return planes;
447
+ }
448
+ function clipPolygon(points, plane) {
449
+ const output = [];
450
+ for (let index = 0; index < points.length; index++) {
451
+ const from = points[index];
452
+ const to = points[(index + 1) % points.length];
453
+ const fromValue = plane.a * from.width + plane.b * from.height - plane.c;
454
+ const toValue = plane.a * to.width + plane.b * to.height - plane.c;
455
+ if (fromValue <= 0) output.push(from);
456
+ if (fromValue <= 0 !== toValue <= 0) {
457
+ const t = fromValue / (fromValue - toValue);
458
+ output.push({
459
+ width: from.width + (to.width - from.width) * t,
460
+ height: from.height + (to.height - from.height) * t
461
+ });
462
+ }
463
+ }
464
+ return output;
465
+ }
466
+ function closestPointInPolygon(point, polygon) {
467
+ const area = polygon.reduce((sum, candidate, index) => {
468
+ const next = polygon[(index + 1) % polygon.length];
469
+ return sum + candidate.width * next.height - next.width * candidate.height;
470
+ }, 0);
471
+ if (Math.abs(area) > 1e-12 && polygon.every((candidate, index) => {
472
+ const next = polygon[(index + 1) % polygon.length];
473
+ return (next.width - candidate.width) * (point.height - candidate.height) - (next.height - candidate.height) * (point.width - candidate.width) >= -1e-9;
474
+ }))
475
+ return point;
476
+ let best = polygon[0];
477
+ let distance = Number.POSITIVE_INFINITY;
478
+ for (let index = 0; index < polygon.length; index++) {
479
+ const from = polygon[index];
480
+ const to = polygon[(index + 1) % polygon.length];
481
+ const dx = to.width - from.width;
482
+ const dy = to.height - from.height;
483
+ const scale = dx === 0 && dy === 0 ? 0 : clamp(
484
+ ((point.width - from.width) * dx + (point.height - from.height) * dy) / (dx * dx + dy * dy),
485
+ 0,
486
+ 1
487
+ );
488
+ const candidate = {
489
+ width: from.width + dx * scale,
490
+ height: from.height + dy * scale
491
+ };
492
+ const nextDistance = (candidate.width - point.width) ** 2 + (candidate.height - point.height) ** 2;
493
+ if (nextDistance < distance || nextDistance === distance && (candidate.width > best.width || candidate.width === best.width && candidate.height > best.height)) {
494
+ best = candidate;
495
+ distance = nextDistance;
496
+ }
497
+ }
498
+ return best;
499
+ }
500
+ function containsRotated(bounds, box, radians) {
501
+ return rotatedCorners(box, radians).every(
502
+ (point) => point.x >= bounds.left && point.x <= bounds.left + bounds.width && point.y >= bounds.top && point.y <= bounds.top + bounds.height
503
+ );
504
+ }
505
+ function rotatedCorners(box, radians) {
506
+ const center = { x: box.left + box.width / 2, y: box.top + box.height / 2 };
507
+ const cosine = Math.cos(radians);
508
+ const sine = Math.sin(radians);
509
+ return [
510
+ [-box.width / 2, -box.height / 2],
511
+ [box.width / 2, -box.height / 2],
512
+ [box.width / 2, box.height / 2],
513
+ [-box.width / 2, box.height / 2]
514
+ ].map(([x, y]) => ({
515
+ x: center.x + x * cosine - y * sine,
516
+ y: center.y + x * sine + y * cosine
517
+ }));
518
+ }
519
+ function validateConfiguredSnaps(input) {
520
+ const check = (step, origin, label) => {
521
+ for (const [name, value] of Object.entries(
522
+ typeof step === "number" ? { value: step } : step
523
+ ))
524
+ assertPositiveFiniteStep(value, `${label}.${name}`);
525
+ for (const [name, value] of Object.entries(origin ?? {}))
526
+ if (value !== void 0)
527
+ assertFiniteOrigin(value, `${label}.origin.${name}`);
528
+ };
529
+ if (input.move?.snap)
530
+ check(input.move.snap.step, input.move.snap.origin, "move.snap.step");
531
+ if (input.resize?.snap)
532
+ check(
533
+ input.resize.snap.step,
534
+ input.resize.snap.target === "grid" ? input.resize.snap.origin : void 0,
535
+ "resize.snap.step"
536
+ );
537
+ if (input.rotate?.snap)
538
+ check(
539
+ input.rotate.snap.step,
540
+ { value: input.rotate.snap.origin },
541
+ "rotate.snap.step"
542
+ );
543
+ }
544
+ function boxesEqual(left, right) {
545
+ return left.left === right.left && left.top === right.top && left.width === right.width && left.height === right.height;
546
+ }
547
+ function result(proposed, applied, snapActive, snapSatisfied, initialRotation = 0, proposedRotation = initialRotation, appliedRotation = proposedRotation) {
548
+ assertFiniteBox(applied, "applied");
549
+ if (!Number.isFinite(proposedRotation) || !Number.isFinite(appliedRotation))
550
+ throw new Error("Rotation exceeds finite coordinates.");
551
+ return Object.freeze({
552
+ proposed,
553
+ applied,
554
+ snapActive,
555
+ snapSatisfied,
556
+ proposedRotation,
557
+ appliedRotation
558
+ });
559
+ }
560
+ export {
561
+ solveManipulation
562
+ };
563
+ //# sourceMappingURL=solve.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/lib/manipulation/solve.ts"],
4
+ "sourcesContent": ["import { assertFiniteBox, assertFinitePoint, freezeBox } from \"./geometry.js\";\nimport {\n assertFiniteOrigin,\n assertPositiveFiniteStep,\n isSnapActive,\n snapToLattice,\n} from \"./snap.js\";\nimport type {\n PibblManipulationBox,\n PibblManipulationMoveSnap,\n PibblManipulationResizeOptions,\n PibblManipulationResizeGridSnap,\n PibblManipulationResizeSizeSnap,\n PibblResizePosition,\n ManipulationSolveInput,\n ManipulationSolveResult,\n} from \"./types.js\";\n\nexport function solveManipulation(\n input: ManipulationSolveInput,\n): ManipulationSolveResult {\n assertFiniteBox(input.initial, \"initial\");\n assertFinitePoint(input.initialPoint, \"initialPoint\");\n assertFinitePoint(input.currentPoint, \"currentPoint\");\n validateConfiguredSnaps(input);\n if (!Number.isFinite(input.initialRotation ?? 0))\n throw new Error(\"initialRotation must be finite.\");\n\n switch (input.operation) {\n case \"move\":\n return solveMove(input);\n case \"resize\":\n return solveResize(input);\n case \"rotate\":\n return solveRotation(input);\n }\n}\n\nfunction solveMove(input: ManipulationSolveInput): ManipulationSolveResult {\n const { initial } = input;\n const axis = input.move?.axis ?? \"both\";\n if (input.move?.bounds) {\n assertFiniteBox(input.move.bounds, \"move.bounds\");\n if (\n !containsRotated(input.move.bounds, initial, input.initialRotation ?? 0)\n )\n throw new Error(\"Move bounds must contain the initial box.\");\n }\n const deltaX = input.currentPoint.x - input.initialPoint.x;\n const deltaY = input.currentPoint.y - input.initialPoint.y;\n const proposed = freezeBox({\n ...initial,\n left: axis === \"y\" ? initial.left : initial.left + deltaX,\n top: axis === \"x\" ? initial.top : initial.top + deltaY,\n });\n const snap = input.move?.snap;\n const snapActive =\n snap !== undefined &&\n isSnapActive(snap.enabled, snap.when, input.modifiers);\n if (!snapActive)\n return result(\n proposed,\n clampMoveToBounds(\n proposed,\n input.move?.bounds,\n input.initialRotation ?? 0,\n ),\n false,\n true,\n input.initialRotation,\n );\n\n const [stepX, stepY] = moveSteps(snap!);\n const origin = snap!.origin;\n const applied = freezeBox({\n ...proposed,\n left:\n axis === \"y\"\n ? proposed.left\n : snapToLattice(proposed.left, stepX, origin?.x ?? 0),\n top:\n axis === \"x\"\n ? proposed.top\n : snapToLattice(proposed.top, stepY, origin?.y ?? 0),\n });\n const bounded = clampMoveToBounds(\n applied,\n input.move?.bounds,\n input.initialRotation ?? 0,\n );\n return result(\n proposed,\n bounded,\n true,\n boxesEqual(applied, bounded),\n input.initialRotation,\n );\n}\n\nfunction solveResize(input: ManipulationSolveInput): ManipulationSolveResult {\n const handle = input.handle;\n if (!handle) throw new Error(\"Resize manipulation requires a handle.\");\n const rotation = input.initialRotation ?? 0;\n if (!Number.isFinite(rotation))\n throw new Error(\"initialRotation must be finite.\");\n if (input.resize?.snap?.target === \"grid\" && rotation !== 0)\n throw new Error(\"Grid resize snapping requires an unrotated box.\");\n const raw = resizeFromPoint(\n input.initial,\n handle,\n rotateInverse(\n {\n x: input.currentPoint.x - input.initialPoint.x,\n y: input.currentPoint.y - input.initialPoint.y,\n },\n rotation,\n ),\n );\n const proposed = resizeFromDimensionsRotated(\n input.initial,\n handle,\n raw.width,\n raw.height,\n rotation,\n );\n const ratio = activeRatio(input.initial, input.resize, input.modifiers);\n const changesWidth = handle.includes(\"left\") || handle.includes(\"right\");\n const changesHeight = handle.includes(\"top\") || handle.includes(\"bottom\");\n const constraints = resolvedResizeConstraints(input.resize);\n if (ratio === undefined) {\n if (!changesWidth) {\n if (\n input.initial.width < constraints.minWidth ||\n input.initial.width > constraints.maxWidth\n )\n throw new Error(\n \"Resize width constraints conflict with the fixed dimension.\",\n );\n constraints.minWidth = constraints.maxWidth = input.initial.width;\n }\n if (!changesHeight) {\n if (\n input.initial.height < constraints.minHeight ||\n input.initial.height > constraints.maxHeight\n )\n throw new Error(\n \"Resize height constraints conflict with the fixed dimension.\",\n );\n constraints.minHeight = constraints.maxHeight = input.initial.height;\n }\n }\n const snap = input.resize?.snap;\n const snapActive =\n snap !== undefined &&\n isSnapActive(snap.enabled, snap.when, input.modifiers);\n let width = raw.width;\n let height = raw.height;\n if (ratio !== undefined) {\n const widthDrives =\n changesWidth &&\n (!changesHeight ||\n Math.abs(raw.width / input.initial.width - 1) >=\n Math.abs(raw.height / input.initial.height - 1));\n if (snapActive) {\n const snapped = snapResize(input.initial, raw, handle, snap!);\n if (widthDrives) width = snapped.width;\n else height = snapped.height;\n }\n if (widthDrives) height = width / ratio;\n else width = height * ratio;\n } else if (snapActive) {\n const snapped = snapResize(input.initial, raw, handle, snap!);\n width = snapped.width;\n height = snapped.height;\n }\n const bounded = constrainDimensions(\n input.initial,\n handle,\n { width, height },\n rotation,\n input.resize?.bounds,\n ratio,\n constraints,\n );\n const applied = resizeFromDimensionsRotated(\n input.initial,\n handle,\n bounded.width,\n bounded.height,\n rotation,\n );\n const onLattice = (value: number, step: number, origin = 0) =>\n Math.abs(value - snapToLattice(value, step, origin)) <=\n 1e-9 * Math.max(1, Math.abs(value));\n let snapSatisfied = true;\n if (snapActive) {\n if (snap!.target === \"grid\") {\n const grid = snap as PibblManipulationResizeGridSnap;\n const [stepX, stepY] = gridSteps(grid);\n snapSatisfied =\n (!changesWidth ||\n onLattice(\n handle.includes(\"left\")\n ? applied.left\n : applied.left + applied.width,\n stepX,\n grid.origin?.x,\n )) &&\n (!changesHeight ||\n onLattice(\n handle.includes(\"top\") ? applied.top : applied.top + applied.height,\n stepY,\n grid.origin?.y,\n ));\n } else {\n const [stepWidth, stepHeight] = sizeSteps(\n snap as PibblManipulationResizeSizeSnap,\n );\n snapSatisfied =\n (!(changesWidth || ratio !== undefined) ||\n onLattice(applied.width, stepWidth)) &&\n (!(changesHeight || ratio !== undefined) ||\n onLattice(applied.height, stepHeight));\n }\n }\n return result(proposed, applied, snapActive, snapSatisfied, rotation);\n}\n\nfunction solveRotation(input: ManipulationSolveInput): ManipulationSolveResult {\n const initialRotation = input.initialRotation ?? 0;\n const delta = input.rotationDelta ?? 0;\n if (!Number.isFinite(initialRotation) || !Number.isFinite(delta)) {\n throw new Error(\"Rotation values must be finite.\");\n }\n const proposedRotation = initialRotation + delta;\n const snap = input.rotate?.snap;\n const snapActive =\n snap !== undefined &&\n isSnapActive(snap.enabled, snap.when, input.modifiers);\n const appliedRotation = snapActive\n ? snapToLattice(proposedRotation, snap!.step, snap!.origin ?? 0)\n : proposedRotation;\n return result(\n input.initial,\n input.initial,\n snapActive,\n true,\n initialRotation,\n proposedRotation,\n appliedRotation,\n );\n}\n\nfunction resizeFromPoint(\n initial: PibblManipulationBox,\n handle: PibblResizePosition,\n delta: Readonly<{ x: number; y: number }>,\n): PibblManipulationBox {\n const movesLeft = handle.includes(\"left\");\n const movesRight = handle.includes(\"right\");\n const movesTop = handle.includes(\"top\");\n const movesBottom = handle.includes(\"bottom\");\n return freezeBox({\n left: movesLeft ? initial.left + delta.x : initial.left,\n top: movesTop ? initial.top + delta.y : initial.top,\n width:\n initial.width + (movesRight ? delta.x : 0) - (movesLeft ? delta.x : 0),\n height:\n initial.height + (movesBottom ? delta.y : 0) - (movesTop ? delta.y : 0),\n });\n}\n\nfunction resizeFromDimensions(\n initial: PibblManipulationBox,\n handle: PibblResizePosition,\n width: number,\n height: number,\n): PibblManipulationBox {\n return freezeBox({\n left: handle.includes(\"left\")\n ? initial.left + initial.width - width\n : initial.left,\n top: handle.includes(\"top\")\n ? initial.top + initial.height - height\n : initial.top,\n width,\n height,\n });\n}\n\nfunction snapResize(\n initial: PibblManipulationBox,\n proposed: PibblManipulationBox,\n handle: PibblResizePosition,\n snap: PibblManipulationResizeSizeSnap | PibblManipulationResizeGridSnap,\n): PibblManipulationBox {\n if (snap.target === \"grid\") {\n const [stepX, stepY] = gridSteps(snap);\n const origin = snap.origin;\n const movesLeft = handle.includes(\"left\");\n const movesTop = handle.includes(\"top\");\n const edgeX = movesLeft ? proposed.left : proposed.left + proposed.width;\n const edgeY = movesTop ? proposed.top : proposed.top + proposed.height;\n const snappedEdgeX = snapToLattice(edgeX, stepX, origin?.x ?? 0);\n const snappedEdgeY = snapToLattice(edgeY, stepY, origin?.y ?? 0);\n const width = !(handle.includes(\"left\") || handle.includes(\"right\"))\n ? initial.width\n : movesLeft\n ? initial.left + initial.width - snappedEdgeX\n : snappedEdgeX - initial.left;\n const height = !(handle.includes(\"top\") || handle.includes(\"bottom\"))\n ? initial.height\n : movesTop\n ? initial.top + initial.height - snappedEdgeY\n : snappedEdgeY - initial.top;\n return resizeFromDimensions(initial, handle, width, height);\n }\n const [stepWidth, stepHeight] = sizeSteps(snap);\n return resizeFromDimensions(\n proposed,\n handle,\n handle.includes(\"left\") || handle.includes(\"right\")\n ? snapToLattice(proposed.width, stepWidth)\n : proposed.width,\n handle.includes(\"top\") || handle.includes(\"bottom\")\n ? snapToLattice(proposed.height, stepHeight)\n : proposed.height,\n );\n}\n\nfunction moveSteps(snap: PibblManipulationMoveSnap): readonly [number, number] {\n return typeof snap.step === \"number\"\n ? [snap.step, snap.step]\n : [snap.step.x, snap.step.y];\n}\n\nfunction sizeSteps(\n snap: PibblManipulationResizeSizeSnap,\n): readonly [number, number] {\n return typeof snap.step === \"number\"\n ? [snap.step, snap.step]\n : [snap.step.width, snap.step.height];\n}\n\nfunction gridSteps(\n snap: PibblManipulationResizeGridSnap,\n): readonly [number, number] {\n return typeof snap.step === \"number\"\n ? [snap.step, snap.step]\n : [snap.step.x, snap.step.y];\n}\n\nfunction resolvedResizeConstraints(\n options: PibblManipulationResizeOptions | undefined,\n): {\n minWidth: number;\n minHeight: number;\n maxWidth: number;\n maxHeight: number;\n} {\n for (const name of [\n \"minWidth\",\n \"minHeight\",\n \"maxWidth\",\n \"maxHeight\",\n ] as const) {\n const value = options?.[name];\n if (value !== undefined && (!Number.isFinite(value) || value <= 0))\n throw new Error(`${name} must be positive and finite.`);\n }\n const minWidth = options?.minWidth ?? 1;\n const minHeight = options?.minHeight ?? 1;\n const maxWidth = options?.maxWidth ?? Number.POSITIVE_INFINITY;\n const maxHeight = options?.maxHeight ?? Number.POSITIVE_INFINITY;\n for (const [name, value] of Object.entries({\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n })) {\n if (!Number.isFinite(value) && value !== Number.POSITIVE_INFINITY) {\n throw new Error(`${name} must be finite, received ${value}`);\n }\n }\n if (minWidth <= 0 || minHeight <= 0 || maxWidth <= 0 || maxHeight <= 0) {\n throw new Error(\"Resize constraints must be greater than zero.\");\n }\n if (minWidth > maxWidth || minHeight > maxHeight) {\n throw new Error(\n \"Resize minimum dimensions must not exceed maximum dimensions.\",\n );\n }\n return { minWidth, minHeight, maxWidth, maxHeight };\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\nfunction clampMoveToBounds(\n box: PibblManipulationBox,\n bounds: PibblManipulationBox | undefined,\n rotation = 0,\n): PibblManipulationBox {\n if (!bounds) return box;\n assertFiniteBox(bounds, \"move.bounds\");\n const corners = rotatedCorners(box, rotation);\n const minX = Math.min(...corners.map((point) => point.x));\n const maxX = Math.max(...corners.map((point) => point.x));\n const minY = Math.min(...corners.map((point) => point.y));\n const maxY = Math.max(...corners.map((point) => point.y));\n if (maxX - minX > bounds.width || maxY - minY > bounds.height)\n throw new Error(\"Move bounds cannot contain the initial box.\");\n return freezeBox({\n ...box,\n left:\n box.left +\n clamp(0, bounds.left - minX, bounds.left + bounds.width - maxX),\n top:\n box.top + clamp(0, bounds.top - minY, bounds.top + bounds.height - maxY),\n });\n}\n\nfunction activeRatio(\n initial: PibblManipulationBox,\n options: PibblManipulationResizeOptions | undefined,\n modifiers: ManipulationSolveInput[\"modifiers\"],\n): number | undefined {\n const aspect = options?.aspectRatio;\n if (!aspect) return undefined;\n const ratio =\n aspect.value === \"initial\" ? initial.width / initial.height : aspect.value;\n if (!Number.isFinite(ratio) || ratio <= 0)\n throw new Error(\n \"Resize aspect ratio must be finite and greater than zero.\",\n );\n return isSnapActive(true, aspect.when, modifiers) ? ratio : undefined;\n}\n\nfunction rotateInverse(\n point: Readonly<{ x: number; y: number }>,\n radians: number,\n): Readonly<{ x: number; y: number }> {\n const cosine = Math.cos(radians);\n const sine = Math.sin(radians);\n return {\n x: point.x * cosine + point.y * sine,\n y: -point.x * sine + point.y * cosine,\n };\n}\n\nfunction resizeFromDimensionsRotated(\n initial: PibblManipulationBox,\n handle: PibblResizePosition,\n width: number,\n height: number,\n radians: number,\n): PibblManipulationBox {\n const oldCenter = {\n x: initial.left + initial.width / 2,\n y: initial.top + initial.height / 2,\n };\n const opposite = {\n x: handle.includes(\"left\")\n ? initial.width / 2\n : handle.includes(\"right\")\n ? -initial.width / 2\n : 0,\n y: handle.includes(\"top\")\n ? initial.height / 2\n : handle.includes(\"bottom\")\n ? -initial.height / 2\n : 0,\n };\n const cosine = Math.cos(radians);\n const sine = Math.sin(radians);\n const anchor = {\n x: oldCenter.x + opposite.x * cosine - opposite.y * sine,\n y: oldCenter.y + opposite.x * sine + opposite.y * cosine,\n };\n const nextOpposite = {\n x: handle.includes(\"left\")\n ? width / 2\n : handle.includes(\"right\")\n ? -width / 2\n : 0,\n y: handle.includes(\"top\")\n ? height / 2\n : handle.includes(\"bottom\")\n ? -height / 2\n : 0,\n };\n const center = {\n x: anchor.x - (nextOpposite.x * cosine - nextOpposite.y * sine),\n y: anchor.y - (nextOpposite.x * sine + nextOpposite.y * cosine),\n };\n return freezeBox({\n left: center.x - width / 2,\n top: center.y - height / 2,\n width,\n height,\n });\n}\n\nfunction constrainDimensions(\n initial: PibblManipulationBox,\n handle: PibblResizePosition,\n proposed: SizePoint,\n rotation: number,\n bounds: PibblManipulationBox | undefined,\n ratio: number | undefined,\n constraints: ReturnType<typeof resolvedResizeConstraints>,\n): SizePoint {\n if (!Number.isFinite(proposed.width) || !Number.isFinite(proposed.height))\n throw new Error(\"Resize geometry exceeds finite coordinates.\");\n if (bounds) {\n assertFiniteBox(bounds, \"resize.bounds\");\n if (!containsRotated(bounds, initial, rotation))\n throw new Error(\"Resize bounds must contain the initial box.\");\n }\n if (ratio !== undefined) {\n let minimum = Math.max(constraints.minWidth, constraints.minHeight * ratio);\n let maximum = Math.min(constraints.maxWidth, constraints.maxHeight * ratio);\n for (const plane of bounds\n ? boundsPlanes(initial, handle, rotation, bounds)\n : []) {\n const slope = plane.a + plane.b / ratio;\n if (Math.abs(slope) < 1e-12) {\n if (plane.c < -1e-9)\n throw new Error(\"Resize bounds have no feasible ratio.\");\n } else if (slope > 0) maximum = Math.min(maximum, plane.c / slope);\n else minimum = Math.max(minimum, plane.c / slope);\n }\n if (minimum > maximum)\n throw new Error(\n \"Resize constraints cannot satisfy the aspect ratio and bounds.\",\n );\n const width = clamp(proposed.width, minimum, maximum);\n return { width, height: width / ratio };\n }\n if (bounds)\n return projectSizeToBounds(\n initial,\n handle,\n proposed,\n rotation,\n bounds,\n constraints,\n );\n return {\n width: clamp(proposed.width, constraints.minWidth, constraints.maxWidth),\n height: clamp(\n proposed.height,\n constraints.minHeight,\n constraints.maxHeight,\n ),\n };\n}\n\ntype SizePoint = Readonly<{ width: number; height: number }>;\ntype HalfPlane = Readonly<{ a: number; b: number; c: number }>;\n\nfunction projectSizeToBounds(\n initial: PibblManipulationBox,\n handle: PibblResizePosition,\n proposed: SizePoint,\n rotation: number,\n bounds: PibblManipulationBox,\n constraints: ReturnType<typeof resolvedResizeConstraints>,\n): SizePoint {\n const maximumWidth = Number.isFinite(constraints.maxWidth)\n ? constraints.maxWidth\n : Math.max(initial.width, bounds.width + bounds.height);\n const maximumHeight = Number.isFinite(constraints.maxHeight)\n ? constraints.maxHeight\n : Math.max(initial.height, bounds.width + bounds.height);\n let polygon: SizePoint[] = [\n { width: constraints.minWidth, height: constraints.minHeight },\n { width: maximumWidth, height: constraints.minHeight },\n { width: maximumWidth, height: maximumHeight },\n { width: constraints.minWidth, height: maximumHeight },\n ];\n const planes = boundsPlanes(initial, handle, rotation, bounds);\n for (const plane of planes) polygon = clipPolygon(polygon, plane);\n if (polygon.length === 0)\n throw new Error(\"Resize bounds have no feasible size region.\");\n return closestPointInPolygon(\n { width: proposed.width, height: proposed.height },\n polygon,\n );\n}\n\nfunction boundsPlanes(\n initial: PibblManipulationBox,\n handle: PibblResizePosition,\n rotation: number,\n bounds: PibblManipulationBox,\n): readonly HalfPlane[] {\n const zero = resizeFromDimensionsRotated(initial, handle, 0, 0, rotation);\n const unitWidth = resizeFromDimensionsRotated(\n initial,\n handle,\n 1,\n 0,\n rotation,\n );\n const unitHeight = resizeFromDimensionsRotated(\n initial,\n handle,\n 0,\n 1,\n rotation,\n );\n const planes: HalfPlane[] = [];\n const zeroCorners = rotatedCorners(zero, rotation);\n const widthCorners = rotatedCorners(unitWidth, rotation);\n const heightCorners = rotatedCorners(unitHeight, rotation);\n for (let index = 0; index < 4; index++) {\n for (const [coordinate, lower, upper] of [\n [\"x\", bounds.left, bounds.left + bounds.width],\n [\"y\", bounds.top, bounds.top + bounds.height],\n ] as const) {\n const constant = zeroCorners[index][coordinate];\n const a = widthCorners[index][coordinate] - constant;\n const b = heightCorners[index][coordinate] - constant;\n planes.push(\n { a, b, c: upper - constant },\n { a: -a, b: -b, c: constant - lower },\n );\n }\n }\n return planes;\n}\n\nfunction clipPolygon(\n points: readonly SizePoint[],\n plane: HalfPlane,\n): SizePoint[] {\n const output: SizePoint[] = [];\n for (let index = 0; index < points.length; index++) {\n const from = points[index];\n const to = points[(index + 1) % points.length];\n const fromValue = plane.a * from.width + plane.b * from.height - plane.c;\n const toValue = plane.a * to.width + plane.b * to.height - plane.c;\n if (fromValue <= 0) output.push(from);\n if (fromValue <= 0 !== toValue <= 0) {\n const t = fromValue / (fromValue - toValue);\n output.push({\n width: from.width + (to.width - from.width) * t,\n height: from.height + (to.height - from.height) * t,\n });\n }\n }\n return output;\n}\n\nfunction closestPointInPolygon(\n point: SizePoint,\n polygon: readonly SizePoint[],\n): SizePoint {\n const area = polygon.reduce((sum, candidate, index) => {\n const next = polygon[(index + 1) % polygon.length];\n return sum + candidate.width * next.height - next.width * candidate.height;\n }, 0);\n if (\n Math.abs(area) > 1e-12 &&\n polygon.every((candidate, index) => {\n const next = polygon[(index + 1) % polygon.length];\n return (\n (next.width - candidate.width) * (point.height - candidate.height) -\n (next.height - candidate.height) * (point.width - candidate.width) >=\n -1e-9\n );\n })\n )\n return point;\n let best = polygon[0];\n let distance = Number.POSITIVE_INFINITY;\n for (let index = 0; index < polygon.length; index++) {\n const from = polygon[index];\n const to = polygon[(index + 1) % polygon.length];\n const dx = to.width - from.width;\n const dy = to.height - from.height;\n const scale =\n dx === 0 && dy === 0\n ? 0\n : clamp(\n ((point.width - from.width) * dx +\n (point.height - from.height) * dy) /\n (dx * dx + dy * dy),\n 0,\n 1,\n );\n const candidate = {\n width: from.width + dx * scale,\n height: from.height + dy * scale,\n };\n const nextDistance =\n (candidate.width - point.width) ** 2 +\n (candidate.height - point.height) ** 2;\n if (\n nextDistance < distance ||\n (nextDistance === distance &&\n (candidate.width > best.width ||\n (candidate.width === best.width && candidate.height > best.height)))\n ) {\n best = candidate;\n distance = nextDistance;\n }\n }\n return best;\n}\n\nfunction containsRotated(\n bounds: PibblManipulationBox,\n box: PibblManipulationBox,\n radians: number,\n): boolean {\n return rotatedCorners(box, radians).every(\n (point) =>\n point.x >= bounds.left &&\n point.x <= bounds.left + bounds.width &&\n point.y >= bounds.top &&\n point.y <= bounds.top + bounds.height,\n );\n}\n\nfunction rotatedCorners(\n box: PibblManipulationBox,\n radians: number,\n): readonly Readonly<{ x: number; y: number }>[] {\n const center = { x: box.left + box.width / 2, y: box.top + box.height / 2 };\n const cosine = Math.cos(radians);\n const sine = Math.sin(radians);\n return [\n [-box.width / 2, -box.height / 2],\n [box.width / 2, -box.height / 2],\n [box.width / 2, box.height / 2],\n [-box.width / 2, box.height / 2],\n ].map(([x, y]) => ({\n x: center.x + x * cosine - y * sine,\n y: center.y + x * sine + y * cosine,\n }));\n}\n\nfunction validateConfiguredSnaps(input: ManipulationSolveInput): void {\n const check = (\n step: number | Readonly<Record<string, number>>,\n origin: Readonly<Record<string, number | undefined>> | undefined,\n label: string,\n ) => {\n for (const [name, value] of Object.entries(\n typeof step === \"number\" ? { value: step } : step,\n ))\n assertPositiveFiniteStep(value, `${label}.${name}`);\n for (const [name, value] of Object.entries(origin ?? {}))\n if (value !== undefined)\n assertFiniteOrigin(value, `${label}.origin.${name}`);\n };\n if (input.move?.snap)\n check(input.move.snap.step, input.move.snap.origin, \"move.snap.step\");\n if (input.resize?.snap)\n check(\n input.resize.snap.step,\n input.resize.snap.target === \"grid\"\n ? input.resize.snap.origin\n : undefined,\n \"resize.snap.step\",\n );\n if (input.rotate?.snap)\n check(\n input.rotate.snap.step,\n { value: input.rotate.snap.origin },\n \"rotate.snap.step\",\n );\n}\n\nfunction boxesEqual(\n left: PibblManipulationBox,\n right: PibblManipulationBox,\n): boolean {\n return (\n left.left === right.left &&\n left.top === right.top &&\n left.width === right.width &&\n left.height === right.height\n );\n}\n\nfunction result(\n proposed: PibblManipulationBox,\n applied: PibblManipulationBox,\n snapActive: boolean,\n snapSatisfied: boolean,\n initialRotation = 0,\n proposedRotation = initialRotation,\n appliedRotation = proposedRotation,\n): ManipulationSolveResult {\n assertFiniteBox(applied, \"applied\");\n if (!Number.isFinite(proposedRotation) || !Number.isFinite(appliedRotation))\n throw new Error(\"Rotation exceeds finite coordinates.\");\n return Object.freeze({\n proposed,\n applied,\n snapActive,\n snapSatisfied,\n proposedRotation,\n appliedRotation,\n });\n}\n"],
5
+ "mappings": "AAAA,SAAS,iBAAiB,mBAAmB,iBAAiB;AAC9D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAYA,SAAS,kBACd,OACyB;AACzB,kBAAgB,MAAM,SAAS,SAAS;AACxC,oBAAkB,MAAM,cAAc,cAAc;AACpD,oBAAkB,MAAM,cAAc,cAAc;AACpD,0BAAwB,KAAK;AAC7B,MAAI,CAAC,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC7C,UAAM,IAAI,MAAM,iCAAiC;AAEnD,UAAQ,MAAM,WAAW;AAAA,IACvB,KAAK;AACH,aAAO,UAAU,KAAK;AAAA,IACxB,KAAK;AACH,aAAO,YAAY,KAAK;AAAA,IAC1B,KAAK;AACH,aAAO,cAAc,KAAK;AAAA,EAC9B;AACF;AAEA,SAAS,UAAU,OAAwD;AACzE,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,OAAO,MAAM,MAAM,QAAQ;AACjC,MAAI,MAAM,MAAM,QAAQ;AACtB,oBAAgB,MAAM,KAAK,QAAQ,aAAa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