@motionscript/core 0.1.0 → 0.1.1-alpha.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 (1072) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/assets/asset-index.d.ts +1 -8
  3. package/dist/assets/asset-index.d.ts.map +1 -1
  4. package/dist/assets/asset-index.js +1 -8
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +10 -72
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +3 -29
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts +8 -20
  11. package/dist/assets/errors.d.ts.map +1 -1
  12. package/dist/assets/errors.js +8 -20
  13. package/dist/assets/errors.js.map +1 -1
  14. package/dist/assets/index.d.ts.map +1 -1
  15. package/dist/assets/index.js.map +1 -1
  16. package/dist/assets/manager.d.ts +9 -51
  17. package/dist/assets/manager.d.ts.map +1 -1
  18. package/dist/assets/manager.js +13 -78
  19. package/dist/assets/manager.js.map +1 -1
  20. package/dist/assets/record.d.ts +2 -18
  21. package/dist/assets/record.d.ts.map +1 -1
  22. package/dist/assets/record.js.map +1 -1
  23. package/dist/assets/scope.d.ts +3 -18
  24. package/dist/assets/scope.d.ts.map +1 -1
  25. package/dist/assets/scope.js +2 -11
  26. package/dist/assets/scope.js.map +1 -1
  27. package/dist/attributes/audio/effects/chain.d.ts +2 -12
  28. package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
  29. package/dist/attributes/audio/effects/chain.js +1 -7
  30. package/dist/attributes/audio/effects/chain.js.map +1 -1
  31. package/dist/attributes/audio/effects/registry.d.ts +3 -18
  32. package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
  33. package/dist/attributes/audio/effects/registry.js +4 -23
  34. package/dist/attributes/audio/effects/registry.js.map +1 -1
  35. package/dist/attributes/audio/ramp.d.ts +5 -38
  36. package/dist/attributes/audio/ramp.d.ts.map +1 -1
  37. package/dist/attributes/audio/ramp.js +3 -28
  38. package/dist/attributes/audio/ramp.js.map +1 -1
  39. package/dist/attributes/audio/request.d.ts +10 -80
  40. package/dist/attributes/audio/request.d.ts.map +1 -1
  41. package/dist/attributes/audio/request.js +1 -4
  42. package/dist/attributes/audio/request.js.map +1 -1
  43. package/dist/attributes/audio/schedule.d.ts +2 -12
  44. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  45. package/dist/attributes/audio/schedule.js +2 -11
  46. package/dist/attributes/audio/schedule.js.map +1 -1
  47. package/dist/attributes/audio/sound.d.ts +2 -26
  48. package/dist/attributes/audio/sound.d.ts.map +1 -1
  49. package/dist/attributes/audio/sound.js +1 -9
  50. package/dist/attributes/audio/sound.js.map +1 -1
  51. package/dist/attributes/audio/transition.d.ts +1 -8
  52. package/dist/attributes/audio/transition.d.ts.map +1 -1
  53. package/dist/attributes/audio/transition.js.map +1 -1
  54. package/dist/attributes/layout/alignment.d.ts +6 -38
  55. package/dist/attributes/layout/alignment.d.ts.map +1 -1
  56. package/dist/attributes/layout/alignment.js.map +1 -1
  57. package/dist/attributes/layout/insets.d.ts +2 -27
  58. package/dist/attributes/layout/insets.d.ts.map +1 -1
  59. package/dist/attributes/layout/insets.js.map +1 -1
  60. package/dist/attributes/layout/matrix2d.d.ts +29 -114
  61. package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
  62. package/dist/attributes/layout/matrix2d.js +26 -110
  63. package/dist/attributes/layout/matrix2d.js.map +1 -1
  64. package/dist/attributes/layout/size.d.ts +3 -25
  65. package/dist/attributes/layout/size.d.ts.map +1 -1
  66. package/dist/attributes/layout/size.js +2 -18
  67. package/dist/attributes/layout/size.js.map +1 -1
  68. package/dist/attributes/layout/space3d.d.ts +16 -79
  69. package/dist/attributes/layout/space3d.d.ts.map +1 -1
  70. package/dist/attributes/layout/space3d.js +17 -81
  71. package/dist/attributes/layout/space3d.js.map +1 -1
  72. package/dist/attributes/layout/transform3d.d.ts +2 -23
  73. package/dist/attributes/layout/transform3d.d.ts.map +1 -1
  74. package/dist/attributes/layout/transform3d.js +1 -7
  75. package/dist/attributes/layout/transform3d.js.map +1 -1
  76. package/dist/attributes/layout/world-transform.d.ts +2 -16
  77. package/dist/attributes/layout/world-transform.d.ts.map +1 -1
  78. package/dist/attributes/layout/world-transform.js.map +1 -1
  79. package/dist/attributes/properties/decorator.d.ts +13 -73
  80. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  81. package/dist/attributes/properties/decorator.js +9 -40
  82. package/dist/attributes/properties/decorator.js.map +1 -1
  83. package/dist/attributes/properties/typed.d.ts +6 -45
  84. package/dist/attributes/properties/typed.d.ts.map +1 -1
  85. package/dist/attributes/properties/typed.js +6 -37
  86. package/dist/attributes/properties/typed.js.map +1 -1
  87. package/dist/attributes/render3d/orbit.d.ts +11 -83
  88. package/dist/attributes/render3d/orbit.d.ts.map +1 -1
  89. package/dist/attributes/render3d/orbit.js +10 -73
  90. package/dist/attributes/render3d/orbit.js.map +1 -1
  91. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
  92. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  94. package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
  95. package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
  96. package/dist/attributes/shape/corners/corner-style.js +2 -12
  97. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  98. package/dist/attributes/shape/corners/corners.d.ts +2 -21
  99. package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js +2 -12
  101. package/dist/attributes/shape/corners/corners.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
  103. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  104. package/dist/attributes/shape/effects/backdrop.js +3 -26
  105. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  106. package/dist/attributes/shape/effects/chain.d.ts +36 -328
  107. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  108. package/dist/attributes/shape/effects/chain.js +24 -242
  109. package/dist/attributes/shape/effects/chain.js.map +1 -1
  110. package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
  111. package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
  112. package/dist/attributes/shape/effects/effect-data.js +6 -33
  113. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  114. package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
  115. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
  117. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
  119. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
  121. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
  123. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
  125. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
  127. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  128. package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
  129. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
  131. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/blur.js +0 -1
  133. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
  135. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  136. package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
  137. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  138. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
  139. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  140. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
  141. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  142. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
  143. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  144. package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
  145. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  146. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
  147. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  148. package/dist/attributes/shape/effects/implementations/curves.js +1 -6
  149. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  150. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
  151. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  152. package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
  153. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  154. package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
  155. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  156. package/dist/attributes/shape/effects/implementations/dither.js +1 -7
  157. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  158. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
  159. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  160. package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
  161. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  162. package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
  163. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  164. package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
  165. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  166. package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
  167. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  168. package/dist/attributes/shape/effects/implementations/edges.js +0 -1
  169. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  170. package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
  171. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  172. package/dist/attributes/shape/effects/implementations/glass.js +0 -1
  173. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  174. package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
  175. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  176. package/dist/attributes/shape/effects/implementations/glow.js +1 -9
  177. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  178. package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
  179. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  180. package/dist/attributes/shape/effects/implementations/grain.js +0 -1
  181. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  182. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
  183. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  184. package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
  185. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  186. package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
  187. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  188. package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
  189. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  190. package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
  191. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  192. package/dist/attributes/shape/effects/implementations/invert.js +0 -1
  193. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  194. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
  195. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  196. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
  197. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  198. package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
  199. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  200. package/dist/attributes/shape/effects/implementations/lut.js +2 -8
  201. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  202. package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
  203. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  204. package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
  205. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  206. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
  207. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  208. package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
  209. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  210. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
  211. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  212. package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
  213. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  214. package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
  215. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  216. package/dist/attributes/shape/effects/implementations/outline.js +0 -1
  217. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  218. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
  219. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  220. package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
  221. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  222. package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
  223. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  224. package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
  225. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  226. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
  227. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  228. package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
  229. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  230. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
  231. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  232. package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
  233. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  234. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
  235. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  236. package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
  237. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  238. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
  239. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  240. package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
  241. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  242. package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
  243. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  244. package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
  245. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  246. package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
  247. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  248. package/dist/attributes/shape/effects/implementations/shader.js +2 -9
  249. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  250. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
  251. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  252. package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
  253. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  254. package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
  255. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  256. package/dist/attributes/shape/effects/implementations/streak.js +0 -1
  257. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  258. package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
  259. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  260. package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
  261. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  262. package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
  263. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  264. package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
  265. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  266. package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
  267. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  268. package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
  269. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  270. package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
  271. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  272. package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
  273. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  274. package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
  275. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  276. package/dist/attributes/shape/effects/implementations/wave.js +1 -5
  277. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  278. package/dist/attributes/shape/effects/registry.d.ts +6 -41
  279. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  280. package/dist/attributes/shape/effects/registry.js +7 -45
  281. package/dist/attributes/shape/effects/registry.js.map +1 -1
  282. package/dist/attributes/shape/effects/spec.d.ts +6 -30
  283. package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
  284. package/dist/attributes/shape/effects/spec.js +3 -9
  285. package/dist/attributes/shape/effects/spec.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.d.ts +1 -17
  287. package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
  288. package/dist/attributes/shape/fill/blend.js +2 -15
  289. package/dist/attributes/shape/fill/blend.js.map +1 -1
  290. package/dist/attributes/shape/fill/chain.d.ts +17 -125
  291. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  292. package/dist/attributes/shape/fill/chain.js +22 -109
  293. package/dist/attributes/shape/fill/chain.js.map +1 -1
  294. package/dist/attributes/shape/fill/coerce.d.ts +10 -35
  295. package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
  296. package/dist/attributes/shape/fill/coerce.js +12 -47
  297. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  298. package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
  299. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  300. package/dist/attributes/shape/fill/color/parser.js +15 -91
  301. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  302. package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
  303. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
  304. package/dist/attributes/shape/fill/gradient-stops.js +2 -13
  305. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  306. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
  307. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
  308. package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
  309. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
  311. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
  312. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  313. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
  314. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  315. package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
  316. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  317. package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
  318. package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
  319. package/dist/attributes/shape/fill/implementations/grid.js +2 -8
  320. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  321. package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
  322. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  323. package/dist/attributes/shape/fill/implementations/image.js +6 -23
  324. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  325. package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
  326. package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
  327. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  328. package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
  329. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  330. package/dist/attributes/shape/fill/implementations/shader.js +5 -17
  331. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  332. package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
  333. package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
  334. package/dist/attributes/shape/fill/implementations/video.js +12 -50
  335. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  336. package/dist/attributes/shape/fill/lerp.d.ts +2 -13
  337. package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
  338. package/dist/attributes/shape/fill/lerp.js +2 -9
  339. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  340. package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
  341. package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
  342. package/dist/attributes/shape/fill/media-preset.js +8 -35
  343. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  344. package/dist/attributes/shape/fill/registry.d.ts +2 -26
  345. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  346. package/dist/attributes/shape/fill/registry.js +5 -40
  347. package/dist/attributes/shape/fill/registry.js.map +1 -1
  348. package/dist/attributes/shape/fill/union.d.ts +6 -30
  349. package/dist/attributes/shape/fill/union.d.ts.map +1 -1
  350. package/dist/attributes/shape/fill/union.js +1 -9
  351. package/dist/attributes/shape/fill/union.js.map +1 -1
  352. package/dist/attributes/shape/filters/chain.d.ts +15 -168
  353. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  354. package/dist/attributes/shape/filters/chain.js +8 -132
  355. package/dist/attributes/shape/filters/chain.js.map +1 -1
  356. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
  357. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  358. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  359. package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
  360. package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
  361. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  362. package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
  363. package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
  364. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  365. package/dist/attributes/shape/filters/index.d.ts +1 -6
  366. package/dist/attributes/shape/filters/index.d.ts.map +1 -1
  367. package/dist/attributes/shape/filters/index.js +0 -2
  368. package/dist/attributes/shape/filters/index.js.map +1 -1
  369. package/dist/attributes/shape/filters/registry.d.ts +5 -35
  370. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  371. package/dist/attributes/shape/filters/registry.js +7 -50
  372. package/dist/attributes/shape/filters/registry.js.map +1 -1
  373. package/dist/attributes/shape/filters/union.d.ts +10 -51
  374. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  375. package/dist/attributes/shape/filters/union.js.map +1 -1
  376. package/dist/attributes/shape/path/anchors.d.ts +18 -106
  377. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  378. package/dist/attributes/shape/path/anchors.js +15 -124
  379. package/dist/attributes/shape/path/anchors.js.map +1 -1
  380. package/dist/attributes/shape/path/bezier.d.ts +6 -54
  381. package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
  382. package/dist/attributes/shape/path/bezier.js +10 -98
  383. package/dist/attributes/shape/path/bezier.js.map +1 -1
  384. package/dist/attributes/shape/path/index.d.ts +1 -11
  385. package/dist/attributes/shape/path/index.d.ts.map +1 -1
  386. package/dist/attributes/shape/path/index.js +1 -11
  387. package/dist/attributes/shape/path/index.js.map +1 -1
  388. package/dist/attributes/shape/path/measure.d.ts +5 -41
  389. package/dist/attributes/shape/path/measure.d.ts.map +1 -1
  390. package/dist/attributes/shape/path/measure.js +8 -57
  391. package/dist/attributes/shape/path/measure.js.map +1 -1
  392. package/dist/attributes/shape/path/morph.d.ts +4 -41
  393. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  394. package/dist/attributes/shape/path/morph.js +17 -117
  395. package/dist/attributes/shape/path/morph.js.map +1 -1
  396. package/dist/attributes/shape/path/ops.d.ts +5 -19
  397. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  398. package/dist/attributes/shape/path/ops.js.map +1 -1
  399. package/dist/attributes/shape/path/types.d.ts +10 -67
  400. package/dist/attributes/shape/path/types.d.ts.map +1 -1
  401. package/dist/attributes/shape/path/types.js +0 -1
  402. package/dist/attributes/shape/path/types.js.map +1 -1
  403. package/dist/attributes/shape/path/walk.d.ts +9 -63
  404. package/dist/attributes/shape/path/walk.d.ts.map +1 -1
  405. package/dist/attributes/shape/path/walk.js +21 -100
  406. package/dist/attributes/shape/path/walk.js.map +1 -1
  407. package/dist/attributes/shape/shaders/language.d.ts +2 -14
  408. package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
  409. package/dist/attributes/shape/shaders/language.js +1 -8
  410. package/dist/attributes/shape/shaders/language.js.map +1 -1
  411. package/dist/attributes/shape/shaders/pack.d.ts +13 -78
  412. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  413. package/dist/attributes/shape/shaders/pack.js +1 -10
  414. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  415. package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
  416. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  417. package/dist/attributes/shape/shaders/resolve.js +3 -28
  418. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  419. package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
  420. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
  421. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  422. package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
  423. package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
  424. package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
  425. package/dist/attributes/shape/shadow/shadow.js +0 -3
  426. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  427. package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
  428. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  429. package/dist/attributes/shape/stroke/stroke.js +0 -6
  430. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  431. package/dist/attributes/shared/operators.d.ts +1 -8
  432. package/dist/attributes/shared/operators.d.ts.map +1 -1
  433. package/dist/attributes/shared/operators.js.map +1 -1
  434. package/dist/attributes/text/index.d.ts +1 -11
  435. package/dist/attributes/text/index.d.ts.map +1 -1
  436. package/dist/attributes/text/index.js +1 -11
  437. package/dist/attributes/text/index.js.map +1 -1
  438. package/dist/attributes/text/ops.d.ts +4 -30
  439. package/dist/attributes/text/ops.d.ts.map +1 -1
  440. package/dist/attributes/text/ops.js +7 -23
  441. package/dist/attributes/text/ops.js.map +1 -1
  442. package/dist/attributes/text/types.d.ts +5 -28
  443. package/dist/attributes/text/types.d.ts.map +1 -1
  444. package/dist/attributes/text/types.js.map +1 -1
  445. package/dist/browser/chunks/chunk-5GLXFSCC.js +13 -0
  446. package/dist/browser/chunks/chunk-5GLXFSCC.js.map +7 -0
  447. package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
  448. package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
  449. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  450. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  451. package/dist/browser/chunks/chunk-MNMIIGNE.js +6 -0
  452. package/dist/browser/chunks/chunk-MNMIIGNE.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/style.d.ts +38 -0
  510. package/dist/components/factory/style.d.ts.map +1 -0
  511. package/dist/components/factory/style.js +104 -0
  512. package/dist/components/factory/style.js.map +1 -0
  513. package/dist/components/factory/types.d.ts +9 -0
  514. package/dist/components/factory/types.d.ts.map +1 -1
  515. package/dist/components/factory/types.js +11 -0
  516. package/dist/components/factory/types.js.map +1 -1
  517. package/dist/components/factory/views.d.ts.map +1 -1
  518. package/dist/components/factory/views.js +0 -2
  519. package/dist/components/factory/views.js.map +1 -1
  520. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  521. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  522. package/dist/components/trees/2d/group-bounds.js +3 -22
  523. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  524. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  525. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  527. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  528. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  529. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-motion.js +3 -31
  531. package/dist/components/trees/2d/node-motion.js.map +1 -1
  532. package/dist/components/trees/2d/node-render.d.ts +3 -20
  533. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-render.js +4 -23
  535. package/dist/components/trees/2d/node-render.js.map +1 -1
  536. package/dist/components/trees/2d/node-space.d.ts +4 -23
  537. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node-space.js +3 -17
  539. package/dist/components/trees/2d/node-space.js.map +1 -1
  540. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  541. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  542. package/dist/components/trees/2d/node-transform.js +4 -33
  543. package/dist/components/trees/2d/node-transform.js.map +1 -1
  544. package/dist/components/trees/2d/node2d.d.ts +112 -622
  545. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  546. package/dist/components/trees/2d/node2d.js +131 -605
  547. package/dist/components/trees/2d/node2d.js.map +1 -1
  548. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  549. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  550. package/dist/components/trees/audio/node-audio.js +18 -68
  551. package/dist/components/trees/audio/node-audio.js.map +1 -1
  552. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  553. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-editor-state.js +1 -13
  555. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  556. package/dist/components/trees/node/node-reactive.d.ts +6 -53
  557. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  558. package/dist/components/trees/node/node-reactive.js +4 -33
  559. package/dist/components/trees/node/node-reactive.js.map +1 -1
  560. package/dist/components/trees/node/node-time.d.ts +2 -15
  561. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  562. package/dist/components/trees/node/node-time.js.map +1 -1
  563. package/dist/components/trees/node/node-walk.d.ts +7 -32
  564. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  565. package/dist/components/trees/node/node-walk.js +7 -32
  566. package/dist/components/trees/node/node-walk.js.map +1 -1
  567. package/dist/components/trees/node/node.d.ts +43 -248
  568. package/dist/components/trees/node/node.d.ts.map +1 -1
  569. package/dist/components/trees/node/node.js +51 -229
  570. package/dist/components/trees/node/node.js.map +1 -1
  571. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  572. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  573. package/dist/components/trees/root/canvas2d-node.js +7 -47
  574. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  575. package/dist/components/trees/three/node3d.d.ts +24 -112
  576. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  577. package/dist/components/trees/three/node3d.js +22 -104
  578. package/dist/components/trees/three/node3d.js.map +1 -1
  579. package/dist/document/audio.d.ts +9 -21
  580. package/dist/document/audio.d.ts.map +1 -1
  581. package/dist/document/audio.js +13 -28
  582. package/dist/document/audio.js.map +1 -1
  583. package/dist/document/builtins.d.ts +3 -9
  584. package/dist/document/builtins.d.ts.map +1 -1
  585. package/dist/document/builtins.js +43 -89
  586. package/dist/document/builtins.js.map +1 -1
  587. package/dist/document/command-traits.d.ts +14 -37
  588. package/dist/document/command-traits.d.ts.map +1 -1
  589. package/dist/document/command-traits.js +22 -39
  590. package/dist/document/command-traits.js.map +1 -1
  591. package/dist/document/deny-globals.d.ts +9 -43
  592. package/dist/document/deny-globals.d.ts.map +1 -1
  593. package/dist/document/deny-globals.js +18 -58
  594. package/dist/document/deny-globals.js.map +1 -1
  595. package/dist/document/diff.d.ts +6 -16
  596. package/dist/document/diff.d.ts.map +1 -1
  597. package/dist/document/diff.js +5 -11
  598. package/dist/document/diff.js.map +1 -1
  599. package/dist/document/doc-index.d.ts +5 -13
  600. package/dist/document/doc-index.d.ts.map +1 -1
  601. package/dist/document/doc-index.js +0 -2
  602. package/dist/document/doc-index.js.map +1 -1
  603. package/dist/document/expression/compile.d.ts +2 -2
  604. package/dist/document/expression/compile.d.ts.map +1 -1
  605. package/dist/document/expression/compile.js +8 -18
  606. package/dist/document/expression/compile.js.map +1 -1
  607. package/dist/document/expression/index.d.ts +11 -41
  608. package/dist/document/expression/index.d.ts.map +1 -1
  609. package/dist/document/expression/index.js +11 -41
  610. package/dist/document/expression/index.js.map +1 -1
  611. package/dist/document/expression/ops.d.ts +3 -12
  612. package/dist/document/expression/ops.d.ts.map +1 -1
  613. package/dist/document/expression/ops.js +4 -20
  614. package/dist/document/expression/ops.js.map +1 -1
  615. package/dist/document/expression/parse.d.ts +4 -14
  616. package/dist/document/expression/parse.d.ts.map +1 -1
  617. package/dist/document/expression/parse.js +34 -55
  618. package/dist/document/expression/parse.js.map +1 -1
  619. package/dist/document/expression/refs.d.ts +2 -8
  620. package/dist/document/expression/refs.d.ts.map +1 -1
  621. package/dist/document/expression/refs.js +2 -6
  622. package/dist/document/expression/refs.js.map +1 -1
  623. package/dist/document/expression/types.d.ts +18 -63
  624. package/dist/document/expression/types.d.ts.map +1 -1
  625. package/dist/document/expression/types.js +4 -15
  626. package/dist/document/expression/types.js.map +1 -1
  627. package/dist/document/expression/walk.d.ts +6 -20
  628. package/dist/document/expression/walk.d.ts.map +1 -1
  629. package/dist/document/expression/walk.js +18 -44
  630. package/dist/document/expression/walk.js.map +1 -1
  631. package/dist/document/index.js +2 -3
  632. package/dist/document/index.js.map +1 -1
  633. package/dist/document/migrate.d.ts +7 -22
  634. package/dist/document/migrate.d.ts.map +1 -1
  635. package/dist/document/migrate.js +44 -15
  636. package/dist/document/migrate.js.map +1 -1
  637. package/dist/document/missing-node.d.ts +4 -11
  638. package/dist/document/missing-node.d.ts.map +1 -1
  639. package/dist/document/missing-node.js +2 -5
  640. package/dist/document/missing-node.js.map +1 -1
  641. package/dist/document/node-decorator.d.ts +12 -53
  642. package/dist/document/node-decorator.d.ts.map +1 -1
  643. package/dist/document/node-decorator.js +16 -57
  644. package/dist/document/node-decorator.js.map +1 -1
  645. package/dist/document/node-descriptor.d.ts +25 -62
  646. package/dist/document/node-descriptor.d.ts.map +1 -1
  647. package/dist/document/node-descriptor.js.map +1 -1
  648. package/dist/document/placement.d.ts +18 -41
  649. package/dist/document/placement.d.ts.map +1 -1
  650. package/dist/document/placement.js +4 -11
  651. package/dist/document/placement.js.map +1 -1
  652. package/dist/document/project.d.ts +19 -52
  653. package/dist/document/project.d.ts.map +1 -1
  654. package/dist/document/project.js +2 -6
  655. package/dist/document/project.js.map +1 -1
  656. package/dist/document/prop-evolution.d.ts +10 -20
  657. package/dist/document/prop-evolution.d.ts.map +1 -1
  658. package/dist/document/prop-evolution.js +3 -7
  659. package/dist/document/prop-evolution.js.map +1 -1
  660. package/dist/document/registry.d.ts +80 -318
  661. package/dist/document/registry.d.ts.map +1 -1
  662. package/dist/document/registry.js +43 -147
  663. package/dist/document/registry.js.map +1 -1
  664. package/dist/document/settled-index.d.ts +11 -23
  665. package/dist/document/settled-index.d.ts.map +1 -1
  666. package/dist/document/settled-index.js +15 -34
  667. package/dist/document/settled-index.js.map +1 -1
  668. package/dist/document/timeline-patch.d.ts +6 -15
  669. package/dist/document/timeline-patch.d.ts.map +1 -1
  670. package/dist/document/timeline-patch.js +12 -21
  671. package/dist/document/timeline-patch.js.map +1 -1
  672. package/dist/document/timeline.d.ts +56 -263
  673. package/dist/document/timeline.d.ts.map +1 -1
  674. package/dist/document/timeline.js +71 -275
  675. package/dist/document/timeline.js.map +1 -1
  676. package/dist/document/types.d.ts +90 -264
  677. package/dist/document/types.d.ts.map +1 -1
  678. package/dist/document/types.js +13 -30
  679. package/dist/document/types.js.map +1 -1
  680. package/dist/document/validate.d.ts +10 -40
  681. package/dist/document/validate.d.ts.map +1 -1
  682. package/dist/document/validate.js +72 -137
  683. package/dist/document/validate.js.map +1 -1
  684. package/dist/document/vocabulary.d.ts +4 -7
  685. package/dist/document/vocabulary.d.ts.map +1 -1
  686. package/dist/document/vocabulary.js +0 -1
  687. package/dist/document/vocabulary.js.map +1 -1
  688. package/dist/experimental.d.ts +2 -0
  689. package/dist/experimental.d.ts.map +1 -1
  690. package/dist/index.d.ts +0 -1
  691. package/dist/index.d.ts.map +1 -1
  692. package/dist/index.js +0 -1
  693. package/dist/index.js.map +1 -1
  694. package/dist/layout/bounds.d.ts +1 -11
  695. package/dist/layout/bounds.d.ts.map +1 -1
  696. package/dist/layout/bounds.js.map +1 -1
  697. package/dist/layout/flex.d.ts +6 -20
  698. package/dist/layout/flex.d.ts.map +1 -1
  699. package/dist/layout/flex.js +7 -28
  700. package/dist/layout/flex.js.map +1 -1
  701. package/dist/layout/ops.d.ts +2 -11
  702. package/dist/layout/ops.d.ts.map +1 -1
  703. package/dist/layout/ops.js +2 -22
  704. package/dist/layout/ops.js.map +1 -1
  705. package/dist/layout/types.d.ts +11 -55
  706. package/dist/layout/types.d.ts.map +1 -1
  707. package/dist/layout/types.js.map +1 -1
  708. package/dist/platform/audio-sink.d.ts +7 -43
  709. package/dist/platform/audio-sink.d.ts.map +1 -1
  710. package/dist/platform/audio-sink.js +4 -29
  711. package/dist/platform/audio-sink.js.map +1 -1
  712. package/dist/platform/exporter.d.ts +5 -31
  713. package/dist/platform/exporter.d.ts.map +1 -1
  714. package/dist/platform/exporter.js.map +1 -1
  715. package/dist/platform/stepped-clock.d.ts +1 -16
  716. package/dist/platform/stepped-clock.d.ts.map +1 -1
  717. package/dist/platform/stepped-clock.js +1 -16
  718. package/dist/platform/stepped-clock.js.map +1 -1
  719. package/dist/platform/storage-adapter.d.ts +8 -68
  720. package/dist/platform/storage-adapter.d.ts.map +1 -1
  721. package/dist/platform/storage-adapter.js +8 -60
  722. package/dist/platform/storage-adapter.js.map +1 -1
  723. package/dist/platform/ticker.d.ts +11 -45
  724. package/dist/platform/ticker.d.ts.map +1 -1
  725. package/dist/platform/ticker.js +10 -37
  726. package/dist/platform/ticker.js.map +1 -1
  727. package/dist/project/config.d.ts +4 -14
  728. package/dist/project/config.d.ts.map +1 -1
  729. package/dist/project/config.js.map +1 -1
  730. package/dist/project/tree.d.ts +6 -35
  731. package/dist/project/tree.d.ts.map +1 -1
  732. package/dist/project/tree.js +1 -8
  733. package/dist/project/tree.js.map +1 -1
  734. package/dist/props/host.d.ts +2 -13
  735. package/dist/props/host.d.ts.map +1 -1
  736. package/dist/props/host.js.map +1 -1
  737. package/dist/props/layout.d.ts +1 -12
  738. package/dist/props/layout.d.ts.map +1 -1
  739. package/dist/props/layout.js +1 -12
  740. package/dist/props/layout.js.map +1 -1
  741. package/dist/props/observer.d.ts +1 -7
  742. package/dist/props/observer.d.ts.map +1 -1
  743. package/dist/props/observer.js.map +1 -1
  744. package/dist/props/slot.d.ts +6 -19
  745. package/dist/props/slot.d.ts.map +1 -1
  746. package/dist/props/slot.js +5 -14
  747. package/dist/props/slot.js.map +1 -1
  748. package/dist/render/canvas-render-context2d.d.ts +8 -68
  749. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  750. package/dist/render/canvas-render-context2d.js +8 -69
  751. package/dist/render/canvas-render-context2d.js.map +1 -1
  752. package/dist/render/clip-contains.d.ts +2 -16
  753. package/dist/render/clip-contains.d.ts.map +1 -1
  754. package/dist/render/clip-contains.js +21 -82
  755. package/dist/render/clip-contains.js.map +1 -1
  756. package/dist/render/clip.d.ts +7 -25
  757. package/dist/render/clip.d.ts.map +1 -1
  758. package/dist/render/clip.js +5 -17
  759. package/dist/render/clip.js.map +1 -1
  760. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  761. package/dist/render/descriptors/ellipse.js +0 -1
  762. package/dist/render/descriptors/ellipse.js.map +1 -1
  763. package/dist/render/descriptors/line.d.ts.map +1 -1
  764. package/dist/render/descriptors/line.js +0 -1
  765. package/dist/render/descriptors/line.js.map +1 -1
  766. package/dist/render/descriptors/path-builder.d.ts +4 -32
  767. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  768. package/dist/render/descriptors/path-builder.js +3 -25
  769. package/dist/render/descriptors/path-builder.js.map +1 -1
  770. package/dist/render/descriptors/path.d.ts +1 -11
  771. package/dist/render/descriptors/path.d.ts.map +1 -1
  772. package/dist/render/descriptors/path.js +0 -1
  773. package/dist/render/descriptors/path.js.map +1 -1
  774. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  775. package/dist/render/descriptors/polygon.js +0 -1
  776. package/dist/render/descriptors/polygon.js.map +1 -1
  777. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  778. package/dist/render/descriptors/polygram.js +0 -1
  779. package/dist/render/descriptors/polygram.js.map +1 -1
  780. package/dist/render/descriptors/rect.d.ts.map +1 -1
  781. package/dist/render/descriptors/rect.js +0 -1
  782. package/dist/render/descriptors/rect.js.map +1 -1
  783. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  784. package/dist/render/descriptors/richtext.js +0 -1
  785. package/dist/render/descriptors/richtext.js.map +1 -1
  786. package/dist/render/descriptors/shape.d.ts +17 -77
  787. package/dist/render/descriptors/shape.d.ts.map +1 -1
  788. package/dist/render/descriptors/shape.js +13 -47
  789. package/dist/render/descriptors/shape.js.map +1 -1
  790. package/dist/render/descriptors/text.d.ts +15 -94
  791. package/dist/render/descriptors/text.d.ts.map +1 -1
  792. package/dist/render/descriptors/text.js +8 -50
  793. package/dist/render/descriptors/text.js.map +1 -1
  794. package/dist/render/descriptors/transform.d.ts +5 -16
  795. package/dist/render/descriptors/transform.d.ts.map +1 -1
  796. package/dist/render/descriptors/transform.js +1 -17
  797. package/dist/render/descriptors/transform.js.map +1 -1
  798. package/dist/render/graphics2d.d.ts +24 -116
  799. package/dist/render/graphics2d.d.ts.map +1 -1
  800. package/dist/render/graphics2d.js +23 -108
  801. package/dist/render/graphics2d.js.map +1 -1
  802. package/dist/render/measure-context.d.ts +5 -29
  803. package/dist/render/measure-context.d.ts.map +1 -1
  804. package/dist/render/measure-context.js.map +1 -1
  805. package/dist/render/null-render-context.d.ts +2 -20
  806. package/dist/render/null-render-context.d.ts.map +1 -1
  807. package/dist/render/null-render-context.js +2 -20
  808. package/dist/render/null-render-context.js.map +1 -1
  809. package/dist/render/render-context2d.d.ts +52 -208
  810. package/dist/render/render-context2d.d.ts.map +1 -1
  811. package/dist/render/render-context2d.js.map +1 -1
  812. package/dist/render/surface.d.ts +2 -19
  813. package/dist/render/surface.d.ts.map +1 -1
  814. package/dist/render/surface.js.map +1 -1
  815. package/dist/render/text-defaults.d.ts +1 -17
  816. package/dist/render/text-defaults.d.ts.map +1 -1
  817. package/dist/render/text-defaults.js +6 -40
  818. package/dist/render/text-defaults.js.map +1 -1
  819. package/dist/render/text-layout.d.ts +12 -55
  820. package/dist/render/text-layout.d.ts.map +1 -1
  821. package/dist/render/text-layout.js +2 -16
  822. package/dist/render/text-layout.js.map +1 -1
  823. package/dist/render3d/bounds3d.d.ts +10 -32
  824. package/dist/render3d/bounds3d.d.ts.map +1 -1
  825. package/dist/render3d/bounds3d.js +2 -12
  826. package/dist/render3d/bounds3d.js.map +1 -1
  827. package/dist/render3d/builders.d.ts +8 -35
  828. package/dist/render3d/builders.d.ts.map +1 -1
  829. package/dist/render3d/builders.js +8 -35
  830. package/dist/render3d/builders.js.map +1 -1
  831. package/dist/render3d/camera.d.ts +10 -57
  832. package/dist/render3d/camera.d.ts.map +1 -1
  833. package/dist/render3d/camera.js +4 -26
  834. package/dist/render3d/camera.js.map +1 -1
  835. package/dist/render3d/fill3d.d.ts +7 -45
  836. package/dist/render3d/fill3d.d.ts.map +1 -1
  837. package/dist/render3d/fill3d.js +15 -85
  838. package/dist/render3d/fill3d.js.map +1 -1
  839. package/dist/render3d/geometry.d.ts +18 -106
  840. package/dist/render3d/geometry.d.ts.map +1 -1
  841. package/dist/render3d/geometry.js +2 -20
  842. package/dist/render3d/geometry.js.map +1 -1
  843. package/dist/render3d/graphics3d.d.ts +29 -133
  844. package/dist/render3d/graphics3d.d.ts.map +1 -1
  845. package/dist/render3d/graphics3d.js +23 -110
  846. package/dist/render3d/graphics3d.js.map +1 -1
  847. package/dist/render3d/index.d.ts +1 -16
  848. package/dist/render3d/index.d.ts.map +1 -1
  849. package/dist/render3d/index.js +1 -16
  850. package/dist/render3d/index.js.map +1 -1
  851. package/dist/render3d/inert.d.ts.map +1 -1
  852. package/dist/render3d/inert.js +1 -14
  853. package/dist/render3d/inert.js.map +1 -1
  854. package/dist/render3d/light.d.ts +3 -26
  855. package/dist/render3d/light.d.ts.map +1 -1
  856. package/dist/render3d/light.js.map +1 -1
  857. package/dist/render3d/material.d.ts +13 -87
  858. package/dist/render3d/material.d.ts.map +1 -1
  859. package/dist/render3d/material.js +2 -16
  860. package/dist/render3d/material.js.map +1 -1
  861. package/dist/render3d/matrix4.d.ts +14 -68
  862. package/dist/render3d/matrix4.d.ts.map +1 -1
  863. package/dist/render3d/matrix4.js +11 -60
  864. package/dist/render3d/matrix4.js.map +1 -1
  865. package/dist/render3d/render-context3d.d.ts +13 -51
  866. package/dist/render3d/render-context3d.d.ts.map +1 -1
  867. package/dist/render3d/render-context3d.js +9 -21
  868. package/dist/render3d/render-context3d.js.map +1 -1
  869. package/dist/render3d/resources.d.ts +9 -53
  870. package/dist/render3d/resources.d.ts.map +1 -1
  871. package/dist/render3d/resources.js +8 -48
  872. package/dist/render3d/resources.js.map +1 -1
  873. package/dist/render3d/rounded-box.d.ts +7 -21
  874. package/dist/render3d/rounded-box.d.ts.map +1 -1
  875. package/dist/render3d/rounded-box.js +7 -46
  876. package/dist/render3d/rounded-box.js.map +1 -1
  877. package/dist/render3d/scene-settings.d.ts +20 -78
  878. package/dist/render3d/scene-settings.d.ts.map +1 -1
  879. package/dist/render3d/scene-settings.js.map +1 -1
  880. package/dist/render3d/scene3d.d.ts +11 -53
  881. package/dist/render3d/scene3d.d.ts.map +1 -1
  882. package/dist/render3d/scene3d.js +12 -59
  883. package/dist/render3d/scene3d.js.map +1 -1
  884. package/dist/render3d/segments.d.ts +2 -25
  885. package/dist/render3d/segments.d.ts.map +1 -1
  886. package/dist/render3d/segments.js +1 -11
  887. package/dist/render3d/segments.js.map +1 -1
  888. package/dist/render3d/texture.d.ts +25 -112
  889. package/dist/render3d/texture.d.ts.map +1 -1
  890. package/dist/render3d/texture.js +3 -27
  891. package/dist/render3d/texture.js.map +1 -1
  892. package/dist/render3d/tracking.d.ts +2 -19
  893. package/dist/render3d/tracking.d.ts.map +1 -1
  894. package/dist/render3d/tracking.js +2 -19
  895. package/dist/render3d/tracking.js.map +1 -1
  896. package/dist/render3d/transform.d.ts +14 -60
  897. package/dist/render3d/transform.d.ts.map +1 -1
  898. package/dist/render3d/transform.js +0 -2
  899. package/dist/render3d/transform.js.map +1 -1
  900. package/dist/render3d/vector3.d.ts +6 -48
  901. package/dist/render3d/vector3.d.ts.map +1 -1
  902. package/dist/render3d/vector3.js +4 -38
  903. package/dist/render3d/vector3.js.map +1 -1
  904. package/dist/render3d/walk.d.ts +3 -27
  905. package/dist/render3d/walk.d.ts.map +1 -1
  906. package/dist/render3d/walk.js +5 -33
  907. package/dist/render3d/walk.js.map +1 -1
  908. package/dist/runtime/asset-refine.d.ts +34 -20
  909. package/dist/runtime/asset-refine.d.ts.map +1 -1
  910. package/dist/runtime/asset-refine.js +127 -31
  911. package/dist/runtime/asset-refine.js.map +1 -1
  912. package/dist/runtime/asset-timeline.d.ts +14 -53
  913. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  914. package/dist/runtime/asset-timeline.js +6 -27
  915. package/dist/runtime/asset-timeline.js.map +1 -1
  916. package/dist/runtime/asset-update.d.ts +7 -26
  917. package/dist/runtime/asset-update.d.ts.map +1 -1
  918. package/dist/runtime/asset-update.js +6 -18
  919. package/dist/runtime/asset-update.js.map +1 -1
  920. package/dist/runtime/audio-index.d.ts +0 -2
  921. package/dist/runtime/audio-index.d.ts.map +1 -1
  922. package/dist/runtime/audio-index.js +0 -2
  923. package/dist/runtime/audio-index.js.map +1 -1
  924. package/dist/runtime/builtin-context.d.ts +3 -9
  925. package/dist/runtime/builtin-context.d.ts.map +1 -1
  926. package/dist/runtime/builtin-context.js +3 -9
  927. package/dist/runtime/builtin-context.js.map +1 -1
  928. package/dist/runtime/clip-instance.d.ts +12 -39
  929. package/dist/runtime/clip-instance.d.ts.map +1 -1
  930. package/dist/runtime/clip-instance.js +21 -45
  931. package/dist/runtime/clip-instance.js.map +1 -1
  932. package/dist/runtime/clip-store.d.ts +26 -68
  933. package/dist/runtime/clip-store.d.ts.map +1 -1
  934. package/dist/runtime/clip-store.js +47 -81
  935. package/dist/runtime/clip-store.js.map +1 -1
  936. package/dist/runtime/engine.d.ts +31 -85
  937. package/dist/runtime/engine.d.ts.map +1 -1
  938. package/dist/runtime/engine.js +16 -49
  939. package/dist/runtime/engine.js.map +1 -1
  940. package/dist/runtime/frame-time.d.ts +4 -15
  941. package/dist/runtime/frame-time.d.ts.map +1 -1
  942. package/dist/runtime/frame-time.js +5 -12
  943. package/dist/runtime/frame-time.js.map +1 -1
  944. package/dist/runtime/index.d.ts +0 -1
  945. package/dist/runtime/index.d.ts.map +1 -1
  946. package/dist/runtime/index.js +0 -1
  947. package/dist/runtime/index.js.map +1 -1
  948. package/dist/runtime/node-picking.d.ts +59 -139
  949. package/dist/runtime/node-picking.d.ts.map +1 -1
  950. package/dist/runtime/node-picking.js +87 -157
  951. package/dist/runtime/node-picking.js.map +1 -1
  952. package/dist/runtime/node-picking3d.d.ts +39 -96
  953. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  954. package/dist/runtime/node-picking3d.js +98 -141
  955. package/dist/runtime/node-picking3d.js.map +1 -1
  956. package/dist/runtime/placement.d.ts +8 -17
  957. package/dist/runtime/placement.d.ts.map +1 -1
  958. package/dist/runtime/placement.js +7 -16
  959. package/dist/runtime/placement.js.map +1 -1
  960. package/dist/runtime/playback-controller.d.ts +78 -207
  961. package/dist/runtime/playback-controller.d.ts.map +1 -1
  962. package/dist/runtime/playback-controller.js +111 -226
  963. package/dist/runtime/playback-controller.js.map +1 -1
  964. package/dist/runtime/playback.d.ts +6 -14
  965. package/dist/runtime/playback.d.ts.map +1 -1
  966. package/dist/runtime/playback.js +6 -14
  967. package/dist/runtime/playback.js.map +1 -1
  968. package/dist/runtime/project-assets.d.ts +6 -14
  969. package/dist/runtime/project-assets.d.ts.map +1 -1
  970. package/dist/runtime/project-assets.js +7 -16
  971. package/dist/runtime/project-assets.js.map +1 -1
  972. package/dist/runtime/session.d.ts +22 -45
  973. package/dist/runtime/session.d.ts.map +1 -1
  974. package/dist/runtime/session.js +26 -46
  975. package/dist/runtime/session.js.map +1 -1
  976. package/dist/runtime/settle.d.ts +4 -10
  977. package/dist/runtime/settle.d.ts.map +1 -1
  978. package/dist/runtime/settle.js +4 -10
  979. package/dist/runtime/settle.js.map +1 -1
  980. package/dist/runtime/state-evaluator.d.ts +15 -37
  981. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  982. package/dist/runtime/state-evaluator.js +27 -44
  983. package/dist/runtime/state-evaluator.js.map +1 -1
  984. package/dist/runtime/text-geometry.d.ts +18 -47
  985. package/dist/runtime/text-geometry.d.ts.map +1 -1
  986. package/dist/runtime/text-geometry.js +13 -27
  987. package/dist/runtime/text-geometry.js.map +1 -1
  988. package/dist/sdk/index.d.ts +2 -7
  989. package/dist/sdk/index.d.ts.map +1 -1
  990. package/dist/sdk/index.js +30 -138
  991. package/dist/sdk/index.js.map +1 -1
  992. package/dist/tween/command-decorator.d.ts +6 -26
  993. package/dist/tween/command-decorator.d.ts.map +1 -1
  994. package/dist/tween/command-decorator.js +1 -6
  995. package/dist/tween/command-decorator.js.map +1 -1
  996. package/dist/tween/command.d.ts +6 -53
  997. package/dist/tween/command.d.ts.map +1 -1
  998. package/dist/tween/command.js +5 -40
  999. package/dist/tween/command.js.map +1 -1
  1000. package/dist/tween/ease/curve.d.ts +2 -17
  1001. package/dist/tween/ease/curve.d.ts.map +1 -1
  1002. package/dist/tween/ease/curve.js +1 -6
  1003. package/dist/tween/ease/curve.js.map +1 -1
  1004. package/dist/tween/ease/describe.d.ts +0 -11
  1005. package/dist/tween/ease/describe.d.ts.map +1 -1
  1006. package/dist/tween/ease/describe.js +0 -23
  1007. package/dist/tween/ease/describe.js.map +1 -1
  1008. package/dist/tween/ease/spec.d.ts +2 -18
  1009. package/dist/tween/ease/spec.d.ts.map +1 -1
  1010. package/dist/tween/ease/spec.js.map +1 -1
  1011. package/dist/tween/inert.d.ts +1 -14
  1012. package/dist/tween/inert.d.ts.map +1 -1
  1013. package/dist/tween/inert.js +1 -14
  1014. package/dist/tween/inert.js.map +1 -1
  1015. package/dist/tween/lerp.d.ts +2 -26
  1016. package/dist/tween/lerp.d.ts.map +1 -1
  1017. package/dist/tween/lerp.js +2 -26
  1018. package/dist/tween/lerp.js.map +1 -1
  1019. package/dist/tween/loop.d.ts +9 -50
  1020. package/dist/tween/loop.d.ts.map +1 -1
  1021. package/dist/tween/loop.js +6 -31
  1022. package/dist/tween/loop.js.map +1 -1
  1023. package/dist/tween/prepare.d.ts +2 -30
  1024. package/dist/tween/prepare.d.ts.map +1 -1
  1025. package/dist/tween/prepare.js +2 -30
  1026. package/dist/tween/prepare.js.map +1 -1
  1027. package/dist/tween/stepper.d.ts +4 -25
  1028. package/dist/tween/stepper.d.ts.map +1 -1
  1029. package/dist/tween/stepper.js.map +1 -1
  1030. package/dist/tween/to-command.d.ts +1 -8
  1031. package/dist/tween/to-command.d.ts.map +1 -1
  1032. package/dist/tween/to-command.js +2 -25
  1033. package/dist/tween/to-command.js.map +1 -1
  1034. package/dist/util/context.d.ts +4 -29
  1035. package/dist/util/context.d.ts.map +1 -1
  1036. package/dist/util/context.js +3 -15
  1037. package/dist/util/context.js.map +1 -1
  1038. package/dist/util/csv.d.ts +4 -29
  1039. package/dist/util/csv.d.ts.map +1 -1
  1040. package/dist/util/csv.js +3 -22
  1041. package/dist/util/csv.js.map +1 -1
  1042. package/dist/util/metrics.d.ts +2 -26
  1043. package/dist/util/metrics.d.ts.map +1 -1
  1044. package/dist/util/metrics.js +2 -26
  1045. package/dist/util/metrics.js.map +1 -1
  1046. package/dist/util/random.d.ts +20 -87
  1047. package/dist/util/random.d.ts.map +1 -1
  1048. package/dist/util/random.js +20 -87
  1049. package/dist/util/random.js.map +1 -1
  1050. package/dist/util/reference.d.ts +6 -35
  1051. package/dist/util/reference.d.ts.map +1 -1
  1052. package/dist/util/reference.js +1 -4
  1053. package/dist/util/reference.js.map +1 -1
  1054. package/dist/util/scheduler.d.ts +6 -27
  1055. package/dist/util/scheduler.d.ts.map +1 -1
  1056. package/dist/util/scheduler.js +8 -35
  1057. package/dist/util/scheduler.js.map +1 -1
  1058. package/package.json +1 -1
  1059. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1060. package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
  1061. package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
  1062. package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
  1063. package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
  1064. package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
  1065. package/dist/renamed-scene-names.d.ts +0 -17
  1066. package/dist/renamed-scene-names.d.ts.map +0 -1
  1067. package/dist/renamed-scene-names.js +0 -9
  1068. package/dist/renamed-scene-names.js.map +0 -1
  1069. package/dist/runtime/precompisition.d.ts +0 -24
  1070. package/dist/runtime/precompisition.d.ts.map +0 -1
  1071. package/dist/runtime/precompisition.js +0 -7
  1072. package/dist/runtime/precompisition.js.map +0 -1
@@ -1,12 +1,7 @@
1
1
  import { clamp01 } from "../util/clamp.js";
2
2
  import { loopPasses, loopPhase, loopSpan } from "./loop.js";
3
3
  const SETTLES = Symbol("settles");
4
- /**
5
- * Mark a command whose `at` reads nothing but what it captured when it was built
6
- * and does nothing but write prop slots, its end values all at `at(1)`. A
7
- * timeline may then hold it finished by writing those end values instead of
8
- * running it — see `document/settled-index`.
9
- */
4
+ /** Marks a command whose `at` reads only what it captured when built and only writes prop slots, end values all at `at(1)`, so a timeline may hold it finished by writing those instead of running it (see `document/settled-index`). */
10
5
  export function settling(command) {
11
6
  command[SETTLES] = true;
12
7
  return command;
@@ -14,7 +9,6 @@ export function settling(command) {
14
9
  export function settles(command) {
15
10
  return command[SETTLES] === true;
16
11
  }
17
- /** True when `x` is a {@link Command} rather than a plain object. */
18
12
  export function isCommand(x) {
19
13
  return typeof x?.at === "function"
20
14
  && typeof x?.duration === "number";
@@ -24,14 +18,7 @@ export function makeCommand(target, at, duration, easing) {
24
18
  const value = (t) => at(easing ? easing(clamp01(t)) : clamp01(t));
25
19
  return fromValue(target, duration, value);
26
20
  }
27
- /**
28
- * A {@link Command} whose product is a side effect rather than props — for state
29
- * a `set()` can't reach (a private field, an array element).
30
- *
31
- * `apply` must be a pure function of `t`: it can run for any `t`, any number of
32
- * times, in any order. Accumulating (`x += …`) instead of assigning from `t`
33
- * looks right forwards and drifts the instant anything scrubs.
34
- */
21
+ /** A {@link Command} whose product is a side effect (state a `set()` can't reach). `apply` must be a pure function of `t`: it runs for any `t`, any number of times, in any order, so accumulating (`x += …`) drifts the instant anything scrubs. */
35
22
  export function driveCommand(duration, apply, easing) {
36
23
  const sink = { set: () => { } };
37
24
  return makeCommand(sink, (t) => {
@@ -39,19 +26,7 @@ export function driveCommand(duration, apply, easing) {
39
26
  return {};
40
27
  }, duration, easing);
41
28
  }
42
- /**
43
- * Repeat `command`, as one seekable {@link Command} that lasts for every pass.
44
- *
45
- * Wrapping rather than a parameter on each command is what makes this work for
46
- * every command there is: the inner one is asked for the frame at a pass-local
47
- * `t`, so it never learns it is being repeated, and its easing applies per pass
48
- * — which is what "three bounces" means, rather than one ease stretched over
49
- * three of them.
50
- *
51
- * `fill` is the seconds an unlimited loop (`count: null`) may cover; it defaults
52
- * to a single pass, since a command built outside a timeline has no clip to fill.
53
- * A stamp (`duration === 0`) is returned untouched: there is no pass to repeat.
54
- */
29
+ /** Repeats `command` as one seekable {@link Command} lasting every pass. Wrapping works for every command: the inner one is asked for a pass-local `t`, and its easing applies per pass (three bounces, not one ease over three). `fill` is the seconds an unlimited loop may cover (default one pass). A stamp (`duration === 0`) is returned untouched. */
55
30
  export function loopCommand(command, loop, fill) {
56
31
  const one = command.duration;
57
32
  if (one <= 0 || loopPasses(loop) <= 1)
@@ -78,12 +53,7 @@ export function loopCommand(command, loop, fill) {
78
53
  },
79
54
  };
80
55
  }
81
- /**
82
- * Run `commands` one after another as a single seekable {@link Command}.
83
- *
84
- * A finished child holds at `at(1)` rather than being dropped, so a prop
85
- * written early keeps its value once its step ends.
86
- */
56
+ /** Runs `commands` one after another as a single seekable {@link Command}; a finished child holds at `at(1)`, so an early-written prop keeps its value. */
87
57
  export function commandSequence(target, ...commands) {
88
58
  const duration = commands.reduce((sum, c) => sum + c.duration, 0);
89
59
  return fromValue(target, duration, (t) => {
@@ -113,16 +83,11 @@ export function commandParallel(target, ...commands) {
113
83
  return props;
114
84
  });
115
85
  }
116
- /** Wrap a pure `t → props` function into the full {@link Command} surface. */
117
86
  function fromValue(target, duration, value) {
118
87
  const progress = (elapsed) => (duration > 0 ? elapsed / duration : 1);
119
88
  return {
120
89
  duration,
121
- // Writes as well as returns. A host evaluating a timeline calls `at(t)`
122
- // and discards what comes back — `ToCommand` has always applied its step
123
- // as a side effect, and a `Command` built from a `t → props` function
124
- // that only *described* its frame was silently inert everywhere a
125
- // document is seeked, while behaving correctly under `_stepper`.
90
+ // Writes as well as returns: a host evaluating a timeline calls `at(t)` and discards the result, so a command that only *described* its frame was inert wherever a document is seeked.
126
91
  at(t) {
127
92
  const props = value(t);
128
93
  target.set(props);
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/tween/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAiB,MAAM,QAAQ,CAAC;AAmCxE,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAElC;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAuC,OAAU;IACpE,OAA8C,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAChE,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAmC;IACvD,OAAQ,OAA8C,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;AAC7E,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,SAAS,CAAC,CAAU;IAChC,OAAO,OAAQ,CAAa,EAAE,EAAE,KAAK,UAAU;WACxC,OAAQ,CAAa,EAAE,QAAQ,KAAK,QAAQ,CAAC;AACxD,CAAC;AAOD,sIAAsI;AACtI,MAAM,UAAU,WAAW,CACvB,MAAwB,EACxB,EAA6B,EAC7B,QAAgB,EAChB,MAAuB;IAEvB,MAAM,KAAK,GAAG,CAAC,CAA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AAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAClB,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,QAAQ;YACJ,IAAI,OAAO,GAAG,CAAC,CAAC;YAChB,OAAO;gBACH,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE;oBAChB,OAAO,GAAG,CAAC,CAAC;oBACZ,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnC,CAAC;gBACD,OAAO,EAAE,CAAC,EAAU,EAAW,EAAE;oBAC7B,OAAO,IAAI,EAAE,CAAC;oBACd,MAAM,IAAI,GAAG,OAAO,IAAI,QAAQ,CAAC;oBACjC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAChD,OAAO,IAAI,CAAC;gBAChB,CAAC;aACJ,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { clamp01 } from \"@/util/clamp\";\nimport { EasingFunction } from \"./ease/type\";\nimport { loopPasses, loopPhase, loopSpan, type LoopSpec } from \"./loop\";\nimport { LerpFunction } from \"./lerp\";\nimport { Steppable, TweenStepper } from \"./stepper\";\n\n/**\n * A named animation, as a value: `at(t)` is a pure function of normalized time,\n * so a host can ask what frame N looks like without replaying frames 0..N-1.\n *\n * `at` is only pure once *built* — a factory reads the node's current props to\n * fix its start value, so a host evaluating out of order must build commands in\n * timeline order, leaving each node in the state the previous command left it.\n */\nexport interface Command<P = Record<string, unknown>> extends Steppable {\n readonly duration: number;\n at(t: number): Partial<P>;\n}\n\n/**\n * The single argument a `command()` method takes: its own params under `data`,\n * plus shared timing. One object (not positional args) so a manifest can read a\n * command's shape off `T` directly.\n *\n * `duration`/`data` are optional for a command with a synchronous mode\n * (`restore`, `addChildAt`) or nothing to carry (`restore`).\n *\n * `R` differs from `T` when `data` is loose author input (`Fill`) but `lerp`\n * operates on its resolved form (`FillResolved[]`).\n */\nexport interface CommandArgs<T = Record<string, unknown>, R = T> {\n data?: T;\n duration?: number;\n easing?: EasingFunction;\n lerp?: LerpFunction<R>;\n}\n\nconst SETTLES = Symbol(\"settles\");\n\n/**\n * Mark a command whose `at` reads nothing but what it captured when it was built\n * and does nothing but write prop slots, its end values all at `at(1)`. A\n * timeline may then hold it finished by writing those end values instead of\n * running it — see `document/settled-index`.\n */\nexport function settling<C extends { at(t: number): unknown }>(command: C): C {\n (command as unknown as Record<symbol, boolean>)[SETTLES] = true;\n return command;\n}\n\nexport function settles(command: { at(t: number): unknown }): boolean {\n return (command as unknown as Record<symbol, boolean>)[SETTLES] === true;\n}\n\n/** True when `x` is a {@link Command} rather than a plain object. */\nexport function isCommand(x: unknown): x is Command {\n return typeof (x as Command)?.at === \"function\"\n && typeof (x as Command)?.duration === \"number\";\n}\n\n/** What a {@link Command} writes its evaluated props onto. */\nexport interface CommandTarget<P> {\n set(props: Partial<P>): void;\n}\n\n/** Build a {@link Command} from a pure `t → props` function. `easing` is applied inside, so `at` itself takes raw normalized time. */\nexport function makeCommand<P>(\n target: CommandTarget<P>,\n at: (t: number) => Partial<P>,\n duration: number,\n easing?: EasingFunction,\n): Command<P> {\n const value = (t: number): Partial<P> => at(easing ? easing(clamp01(t)) : clamp01(t));\n return fromValue(target, duration, value);\n}\n\n/**\n * A {@link Command} whose product is a side effect rather than props — for state\n * a `set()` can't reach (a private field, an array element).\n *\n * `apply` must be a pure function of `t`: it can run for any `t`, any number of\n * times, in any order. Accumulating (`x += …`) instead of assigning from `t`\n * looks right forwards and drifts the instant anything scrubs.\n */\nexport function driveCommand(\n duration: number,\n apply: (t: number) => void,\n easing?: EasingFunction,\n): Command<Record<string, never>> {\n const sink: CommandTarget<Record<string, never>> = { set: () => { } };\n return makeCommand(sink, (t) => {\n apply(t);\n return {};\n }, duration, easing);\n}\n\n/**\n * Repeat `command`, as one seekable {@link Command} that lasts for every pass.\n *\n * Wrapping rather than a parameter on each command is what makes this work for\n * every command there is: the inner one is asked for the frame at a pass-local\n * `t`, so it never learns it is being repeated, and its easing applies per pass\n * — which is what \"three bounces\" means, rather than one ease stretched over\n * three of them.\n *\n * `fill` is the seconds an unlimited loop (`count: null`) may cover; it defaults\n * to a single pass, since a command built outside a timeline has no clip to fill.\n * A stamp (`duration === 0`) is returned untouched: there is no pass to repeat.\n */\nexport function loopCommand<P>(command: Command<P>, loop: LoopSpec, fill?: number): Command<P> {\n const one = command.duration;\n if (one <= 0 || loopPasses(loop) <= 1) return command;\n const duration = loopSpan(loop, one, fill);\n const value = (t: number): Partial<P> => command.at(loopPhase(loop, clamp01(t) * duration, one));\n\n return {\n duration,\n at: value,\n _stepper(): TweenStepper {\n let elapsed = 0;\n return {\n seek: (e: number) => {\n elapsed = e;\n value(e / duration);\n },\n advance: (dt: number): boolean => {\n elapsed += dt;\n const done = elapsed >= duration;\n value(done ? 1 : elapsed / duration);\n return done;\n },\n };\n },\n };\n}\n\n/**\n * Run `commands` one after another as a single seekable {@link Command}.\n *\n * A finished child holds at `at(1)` rather than being dropped, so a prop\n * written early keeps its value once its step ends.\n */\nexport function commandSequence<P>(\n target: CommandTarget<P>,\n ...commands: Command<P>[]\n): Command<P> {\n const duration = commands.reduce((sum, c) => sum + c.duration, 0);\n\n return fromValue(target, duration, (t) => {\n const elapsed = t * duration;\n const props: Partial<P> = {};\n let cursor = 0;\n for (const command of commands) {\n if (elapsed < cursor) break;\n const local = command.duration > 0 ? (elapsed - cursor) / command.duration : 1;\n Object.assign(props, command.at(clamp01(local)));\n cursor += command.duration;\n }\n return props;\n });\n}\n\n/** Run `commands` together as one {@link Command}, ending when the longest does. Later commands win on a shared prop. */\nexport function commandParallel<P>(\n target: CommandTarget<P>,\n ...commands: Command<P>[]\n): Command<P> {\n const duration = commands.reduce((max, c) => Math.max(max, c.duration), 0);\n\n return fromValue(target, duration, (t) => {\n const elapsed = t * duration;\n const props: Partial<P> = {};\n for (const command of commands) {\n const local = command.duration > 0 ? elapsed / command.duration : 1;\n Object.assign(props, command.at(clamp01(local)));\n }\n return props;\n });\n}\n\n/** Wrap a pure `t → props` function into the full {@link Command} surface. */\nfunction fromValue<P>(\n target: CommandTarget<P>,\n duration: number,\n value: (t: number) => Partial<P>,\n): Command<P> {\n const progress = (elapsed: number): number => (duration > 0 ? elapsed / duration : 1);\n\n return {\n duration,\n // Writes as well as returns. A host evaluating a timeline calls `at(t)`\n // and discards what comes back — `ToCommand` has always applied its step\n // as a side effect, and a `Command` built from a `t → props` function\n // that only *described* its frame was silently inert everywhere a\n // document is seeked, while behaving correctly under `_stepper`.\n at(t: number): Partial<P> {\n const props = value(t);\n target.set(props);\n return props;\n },\n\n _stepper(): TweenStepper {\n let elapsed = 0;\n return {\n seek: (e: number) => {\n elapsed = e;\n target.set(value(progress(e)));\n },\n advance: (dt: number): boolean => {\n elapsed += dt;\n const done = elapsed >= duration;\n target.set(value(done ? 1 : progress(elapsed)));\n return done;\n },\n };\n },\n };\n}\n"]}
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/tween/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAiB,MAAM,QAAQ,CAAC;AAkBxE,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAElC,yOAAyO;AACzO,MAAM,UAAU,QAAQ,CAAuC,OAAU;IACpE,OAA8C,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAChE,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAmC;IACvD,OAAQ,OAA8C,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,CAAU;IAChC,OAAO,OAAQ,CAAa,EAAE,EAAE,KAAK,UAAU;WACxC,OAAQ,C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;QACvL,EAAE,CAAC,CAAS;YACR,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAClB,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,QAAQ;YACJ,IAAI,OAAO,GAAG,CAAC,CAAC;YAChB,OAAO;gBACH,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE;oBAChB,OAAO,GAAG,CAAC,CAAC;oBACZ,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnC,CAAC;gBACD,OAAO,EAAE,CAAC,EAAU,EAAW,EAAE;oBAC7B,OAAO,IAAI,EAAE,CAAC;oBACd,MAAM,IAAI,GAAG,OAAO,IAAI,QAAQ,CAAC;oBACjC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAChD,OAAO,IAAI,CAAC;gBAChB,CAAC;aACJ,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { clamp01 } from \"@/util/clamp\";\nimport { EasingFunction } from \"./ease/type\";\nimport { loopPasses, loopPhase, loopSpan, type LoopSpec } from \"./loop\";\nimport { LerpFunction } from \"./lerp\";\nimport { Steppable, TweenStepper } from \"./stepper\";\n\n/** A named animation as a value: `at(t)` is a pure function of normalized time, so a host can ask what frame N looks like without replaying 0..N-1. Pure only once *built* (a factory reads the node's current props to fix its start), so out-of-order evaluation must build commands in timeline order. */\nexport interface Command<P = Record<string, unknown>> extends Steppable {\n readonly duration: number;\n at(t: number): Partial<P>;\n}\n\n/** The single argument a `command()` method takes: its own params under `data` plus shared timing, one object so a manifest can read a command's shape off `T`. `duration`/`data` are optional for synchronous or data-free commands. `R` differs from `T` when `data` is loose author input (`Fill`) but `lerp` works on its resolved form. */\nexport interface CommandArgs<T = Record<string, unknown>, R = T> {\n data?: T;\n duration?: number;\n easing?: EasingFunction;\n lerp?: LerpFunction<R>;\n}\n\nconst SETTLES = Symbol(\"settles\");\n\n/** Marks a command whose `at` reads only what it captured when built and only writes prop slots, end values all at `at(1)`, so a timeline may hold it finished by writing those instead of running it (see `document/settled-index`). */\nexport function settling<C extends { at(t: number): unknown }>(command: C): C {\n (command as unknown as Record<symbol, boolean>)[SETTLES] = true;\n return command;\n}\n\nexport function settles(command: { at(t: number): unknown }): boolean {\n return (command as unknown as Record<symbol, boolean>)[SETTLES] === true;\n}\n\nexport function isCommand(x: unknown): x is Command {\n return typeof (x as Command)?.at === \"function\"\n && typeof (x as Command)?.duration === \"number\";\n}\n\n/** What a {@link Command} writes its evaluated props onto. */\nexport interface CommandTarget<P> {\n set(props: Partial<P>): void;\n}\n\n/** Build a {@link Command} from a pure `t → props` function. `easing` is applied inside, so `at` itself takes raw normalized time. */\nexport function makeCommand<P>(\n target: CommandTarget<P>,\n at: (t: number) => Partial<P>,\n duration: number,\n easing?: EasingFunction,\n): Command<P> {\n const value = (t: number): Partial<P> => at(easing ? easing(clamp01(t)) : clamp01(t));\n return fromValue(target, duration, value);\n}\n\n/** A {@link Command} whose product is a side effect (state a `set()` can't reach). `apply` must be a pure function of `t`: it runs for any `t`, any number of times, in any order, so accumulating (`x += …`) drifts the instant anything scrubs. */\nexport function driveCommand(\n duration: number,\n apply: (t: number) => void,\n easing?: EasingFunction,\n): Command<Record<string, never>> {\n const sink: CommandTarget<Record<string, never>> = { set: () => { } };\n return makeCommand(sink, (t) => {\n apply(t);\n return {};\n }, duration, easing);\n}\n\n/** Repeats `command` as one seekable {@link Command} lasting every pass. Wrapping works for every command: the inner one is asked for a pass-local `t`, and its easing applies per pass (three bounces, not one ease over three). `fill` is the seconds an unlimited loop may cover (default one pass). A stamp (`duration === 0`) is returned untouched. */\nexport function loopCommand<P>(command: Command<P>, loop: LoopSpec, fill?: number): Command<P> {\n const one = command.duration;\n if (one <= 0 || loopPasses(loop) <= 1) return command;\n const duration = loopSpan(loop, one, fill);\n const value = (t: number): Partial<P> => command.at(loopPhase(loop, clamp01(t) * duration, one));\n\n return {\n duration,\n at: value,\n _stepper(): TweenStepper {\n let elapsed = 0;\n return {\n seek: (e: number) => {\n elapsed = e;\n value(e / duration);\n },\n advance: (dt: number): boolean => {\n elapsed += dt;\n const done = elapsed >= duration;\n value(done ? 1 : elapsed / duration);\n return done;\n },\n };\n },\n };\n}\n\n/** Runs `commands` one after another as a single seekable {@link Command}; a finished child holds at `at(1)`, so an early-written prop keeps its value. */\nexport function commandSequence<P>(\n target: CommandTarget<P>,\n ...commands: Command<P>[]\n): Command<P> {\n const duration = commands.reduce((sum, c) => sum + c.duration, 0);\n\n return fromValue(target, duration, (t) => {\n const elapsed = t * duration;\n const props: Partial<P> = {};\n let cursor = 0;\n for (const command of commands) {\n if (elapsed < cursor) break;\n const local = command.duration > 0 ? (elapsed - cursor) / command.duration : 1;\n Object.assign(props, command.at(clamp01(local)));\n cursor += command.duration;\n }\n return props;\n });\n}\n\n/** Run `commands` together as one {@link Command}, ending when the longest does. Later commands win on a shared prop. */\nexport function commandParallel<P>(\n target: CommandTarget<P>,\n ...commands: Command<P>[]\n): Command<P> {\n const duration = commands.reduce((max, c) => Math.max(max, c.duration), 0);\n\n return fromValue(target, duration, (t) => {\n const elapsed = t * duration;\n const props: Partial<P> = {};\n for (const command of commands) {\n const local = command.duration > 0 ? elapsed / command.duration : 1;\n Object.assign(props, command.at(clamp01(local)));\n }\n return props;\n });\n}\n\nfunction fromValue<P>(\n target: CommandTarget<P>,\n duration: number,\n value: (t: number) => Partial<P>,\n): Command<P> {\n const progress = (elapsed: number): number => (duration > 0 ? elapsed / duration : 1);\n\n return {\n duration,\n // Writes as well as returns: a host evaluating a timeline calls `at(t)` and discards the result, so a command that only *described* its frame was inert wherever a document is seeked.\n at(t: number): Partial<P> {\n const props = value(t);\n target.set(props);\n return props;\n },\n\n _stepper(): TweenStepper {\n let elapsed = 0;\n return {\n seek: (e: number) => {\n elapsed = e;\n target.set(value(progress(e)));\n },\n advance: (dt: number): boolean => {\n elapsed += dt;\n const done = elapsed >= duration;\n target.set(value(done ? 1 : progress(elapsed)));\n return done;\n },\n };\n },\n };\n}\n"]}
@@ -1,15 +1,5 @@
1
1
  import type { EasingFunction } from "./type.js";
2
- /**
3
- * A hand-drawn timing function: a chain of cubic Bézier segments from (0, 0)
4
- * to (1, 1), where x is progress through the duration and y how far along the
5
- * animation is. This is what an `EaseSpec` of `kind: "custom"` carries inline
6
- * in its `args`, so a drawn curve travels with the document rather than
7
- * needing a host to register a function under a key. Two things keep the
8
- * drawing a function of x, and both are enforced here rather than trusted: a
9
- * control point is clamped into its own segment's x span, and an absent handle
10
- * resolves to the Catmull-Rom tangent. y is deliberately not clamped to [0, 1]
11
- * — overshooting the target and settling back is a real move.
12
- */
2
+ /** A hand-drawn timing function: cubic Bézier segments from (0, 0) to (1, 1), x being progress and y how far along the animation is. It is what an `EaseSpec` of `kind: "custom"` carries inline, so a drawn curve travels with the document. Two things keep it a function of x, both enforced: a control point is clamped into its own segment's x span, and an absent handle resolves to the Catmull-Rom tangent. y is deliberately unclamped: overshooting and settling back is a real move. */
13
3
  /** A point in curve space, or a handle offset within it. */
14
4
  export interface CurveVector {
15
5
  x: number;
@@ -33,12 +23,7 @@ export interface EaseCurveSegment {
33
23
  }
34
24
  /** The curve as Bézier segments, every auto handle and every clamp resolved. */
35
25
  export declare function curveSegments(points: readonly CurvePoint[]): EaseCurveSegment[];
36
- /**
37
- * The curve parameter at which a segment reaches `x`. Bisection rather than
38
- * Newton: x is monotonic along the segment, so halving converges, where Newton
39
- * needs a derivative that goes to zero exactly at the flat ends an ease-in-out
40
- * is made of.
41
- */
26
+ /** The curve parameter at which a segment reaches `x`: bisection rather than Newton, since x is monotonic along the segment while Newton's derivative goes to zero at the flat ends of an ease-in-out. */
42
27
  export declare function curveSegmentT(segment: EaseCurveSegment, x: number): number;
43
28
  /** Whether `value` is a drawable curve: two or more finite points. */
44
29
  export declare function isEaseCurve(value: unknown): value is CurvePoint[];
@@ -1 +1 @@
1
- {"version":3,"file":"curve.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/curve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAG7C;;;;;;;;;;GAUG;AAEH,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,kDAAkD;AAClD,MAAM,WAAW,UAAU;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,yEAAyE;IACzE,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,qEAAqE;IACrE,EAAE,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,WAAW,CAAC;IAChB,EAAE,EAAE,WAAW,CAAC;IAChB,EAAE,EAAE,WAAW,CAAC;IAChB,EAAE,EAAE,WAAW,CAAC;CACnB;AAID,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,gBAAgB,EAAE,CAuB/E;AAQD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAU1E;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,EAAE,CAEjE;AAQD,mEAAmE;AACnE,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,cAAc,CAmBvE"}
1
+ {"version":3,"file":"curve.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/curve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAG7C,oeAAoe;AAEpe,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,kDAAkD;AAClD,MAAM,WAAW,UAAU;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,yEAAyE;IACzE,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,qEAAqE;IACrE,EAAE,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,WAAW,CAAC;IAChB,EAAE,EAAE,WAAW,CAAC;IAChB,EAAE,EAAE,WAAW,CAAC;IAChB,EAAE,EAAE,WAAW,CAAC;CACnB;AAID,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,gBAAgB,EAAE,CAuB/E;AAQD,0MAA0M;AAC1M,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAU1E;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,EAAE,CAEjE;AAQD,mEAAmE;AACnE,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,cAAc,CAmBvE"}
@@ -28,12 +28,7 @@ function bezier(a, b, c, d, t) {
28
28
  const mt = 1 - t;
29
29
  return mt * mt * mt * a + 3 * mt * mt * t * b + 3 * mt * t * t * c + t * t * t * d;
30
30
  }
31
- /**
32
- * The curve parameter at which a segment reaches `x`. Bisection rather than
33
- * Newton: x is monotonic along the segment, so halving converges, where Newton
34
- * needs a derivative that goes to zero exactly at the flat ends an ease-in-out
35
- * is made of.
36
- */
31
+ /** The curve parameter at which a segment reaches `x`: bisection rather than Newton, since x is monotonic along the segment while Newton's derivative goes to zero at the flat ends of an ease-in-out. */
37
32
  export function curveSegmentT(segment, x) {
38
33
  let low = 0;
39
34
  let high = 1;
@@ -1 +1 @@
1
- {"version":3,"file":"curve.js","sourceRoot":"","sources":["../../../src/tween/ease/curve.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAsC1C,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAEvG,gFAAgF;AAChF,MAAM,UAAU,aAAa,CAAC,MAA6B;IACvD,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAElC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG;YACb,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;YAC5C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC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O,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7E,CAAC,EAAE,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import type { EasingFunction } from \"./type\";\nimport { describeEase } from \"./describe\";\n\n/**\n * A hand-drawn timing function: a chain of cubic Bézier segments from (0, 0)\n * to (1, 1), where x is progress through the duration and y how far along the\n * animation is. This is what an `EaseSpec` of `kind: \"custom\"` carries inline\n * in its `args`, so a drawn curve travels with the document rather than\n * needing a host to register a function under a key. Two things keep the\n * drawing a function of x, and both are enforced here rather than trusted: a\n * control point is clamped into its own segment's x span, and an absent handle\n * resolves to the Catmull-Rom tangent. y is deliberately not clamped to [0, 1]\n * — overshooting the target and settling back is a real move.\n */\n\n/** A point in curve space, or a handle offset within it. */\nexport interface CurveVector {\n x: number;\n y: number;\n}\n\n/** One control point of a custom easing curve. */\nexport interface CurvePoint {\n x: number;\n y: number;\n /** The handle steering the segment leaving this point. Absent = auto. */\n out?: CurveVector;\n /** The handle steering the segment arriving at it. Absent = auto. */\n in?: CurveVector;\n}\n\n/** One cubic Bézier segment of the curve, in absolute curve space. */\nexport interface EaseCurveSegment {\n p0: CurveVector;\n c1: CurveVector;\n c2: CurveVector;\n p3: CurveVector;\n}\n\nconst clamp = (value: number, min: number, max: number): number => Math.min(max, Math.max(min, value));\n\n/** The curve as Bézier segments, every auto handle and every clamp resolved. */\nexport function curveSegments(points: readonly CurvePoint[]): EaseCurveSegment[] {\n const segments: EaseCurveSegment[] = [];\n for (let i = 0; i < points.length - 1; i++) {\n const p0 = points[i];\n const p3 = points[i + 1];\n const before = points[i - 1] ?? p0;\n const after = points[i + 2] ?? p3;\n\n const c1 = p0.out\n ? { x: p0.x + p0.out.x, y: p0.y + p0.out.y }\n : { x: p0.x + (p3.x - before.x) / 6, y: p0.y + (p3.y - before.y) / 6 };\n const c2 = p3.in\n ? { x: p3.x + p3.in.x, y: p3.y + p3.in.y }\n : { x: p3.x - (after.x - p0.x) / 6, y: p3.y - (after.y - p0.y) / 6 };\n\n segments.push({\n p0: { x: p0.x, y: p0.y },\n c1: { x: clamp(c1.x, p0.x, p3.x), y: c1.y },\n c2: { x: clamp(c2.x, p0.x, p3.x), y: c2.y },\n p3: { x: p3.x, y: p3.y },\n });\n }\n return segments;\n}\n\n/** A cubic Bézier evaluated on one axis. */\nfunction bezier(a: number, b: number, c: number, d: number, t: number): number {\n const mt = 1 - t;\n return mt * mt * mt * a + 3 * mt * mt * t * b + 3 * mt * t * t * c + t * t * t * d;\n}\n\n/**\n * The curve parameter at which a segment reaches `x`. Bisection rather than\n * Newton: x is monotonic along the segment, so halving converges, where Newton\n * needs a derivative that goes to zero exactly at the flat ends an ease-in-out\n * is made of.\n */\nexport function curveSegmentT(segment: EaseCurveSegment, x: number): number {\n let low = 0;\n let high = 1;\n for (let i = 0; i < 30; i++) {\n const mid = (low + high) / 2;\n const at = bezier(segment.p0.x, segment.c1.x, segment.c2.x, segment.p3.x, mid);\n if (at < x) low = mid;\n else high = mid;\n }\n return (low + high) / 2;\n}\n\n/** Whether `value` is a drawable curve: two or more finite points. */\nexport function isEaseCurve(value: unknown): value is CurvePoint[] {\n return Array.isArray(value) && value.length >= 2 && value.every(isFinitePoint);\n}\n\nfunction isFinitePoint(value: unknown): value is CurveVector {\n if (typeof value !== \"object\" || value === null) return false;\n const { x, y } = value as Partial<CurveVector>;\n return typeof x === \"number\" && Number.isFinite(x) && typeof y === \"number\" && Number.isFinite(y);\n}\n\n/** The easing a curve runs as: progress in, eased progress out. */\nexport function curveEase(points: readonly CurvePoint[]): EasingFunction {\n const segments = curveSegments(points);\n if (segments.length === 0) return describeEase((x) => x, 'lin');\n\n return describeEase((x) => {\n if (x <= 0) return segments[0].p0.y;\n const last = segments[segments.length - 1];\n if (x >= 1) return last.p3.y;\n\n let segment = last;\n for (const candidate of segments) {\n if (x <= candidate.p3.x) {\n segment = candidate;\n break;\n }\n }\n const t = curveSegmentT(segment, x);\n return bezier(segment.p0.y, segment.c1.y, segment.c2.y, segment.p3.y, t);\n }, `curve:${JSON.stringify(points)}`);\n}\n"]}
1
+ {"version":3,"file":"curve.js","sourceRoot":"","sources":["../../../src/tween/ease/curve.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA4B1C,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAEvG,gFAAgF;AAChF,MAAM,UAAU,aAAa,CAAC,MAA6B;IACvD,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAElC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG;YACb,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;YAC5C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,C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CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7E,CAAC,EAAE,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import type { EasingFunction } from \"./type\";\nimport { describeEase } from \"./describe\";\n\n/** A hand-drawn timing function: cubic Bézier segments from (0, 0) to (1, 1), x being progress and y how far along the animation is. It is what an `EaseSpec` of `kind: \"custom\"` carries inline, so a drawn curve travels with the document. Two things keep it a function of x, both enforced: a control point is clamped into its own segment's x span, and an absent handle resolves to the Catmull-Rom tangent. y is deliberately unclamped: overshooting and settling back is a real move. */\n\n/** A point in curve space, or a handle offset within it. */\nexport interface CurveVector {\n x: number;\n y: number;\n}\n\n/** One control point of a custom easing curve. */\nexport interface CurvePoint {\n x: number;\n y: number;\n /** The handle steering the segment leaving this point. Absent = auto. */\n out?: CurveVector;\n /** The handle steering the segment arriving at it. Absent = auto. */\n in?: CurveVector;\n}\n\n/** One cubic Bézier segment of the curve, in absolute curve space. */\nexport interface EaseCurveSegment {\n p0: CurveVector;\n c1: CurveVector;\n c2: CurveVector;\n p3: CurveVector;\n}\n\nconst clamp = (value: number, min: number, max: number): number => Math.min(max, Math.max(min, value));\n\n/** The curve as Bézier segments, every auto handle and every clamp resolved. */\nexport function curveSegments(points: readonly CurvePoint[]): EaseCurveSegment[] {\n const segments: EaseCurveSegment[] = [];\n for (let i = 0; i < points.length - 1; i++) {\n const p0 = points[i];\n const p3 = points[i + 1];\n const before = points[i - 1] ?? p0;\n const after = points[i + 2] ?? p3;\n\n const c1 = p0.out\n ? { x: p0.x + p0.out.x, y: p0.y + p0.out.y }\n : { x: p0.x + (p3.x - before.x) / 6, y: p0.y + (p3.y - before.y) / 6 };\n const c2 = p3.in\n ? { x: p3.x + p3.in.x, y: p3.y + p3.in.y }\n : { x: p3.x - (after.x - p0.x) / 6, y: p3.y - (after.y - p0.y) / 6 };\n\n segments.push({\n p0: { x: p0.x, y: p0.y },\n c1: { x: clamp(c1.x, p0.x, p3.x), y: c1.y },\n c2: { x: clamp(c2.x, p0.x, p3.x), y: c2.y },\n p3: { x: p3.x, y: p3.y },\n });\n }\n return segments;\n}\n\n/** A cubic Bézier evaluated on one axis. */\nfunction bezier(a: number, b: number, c: number, d: number, t: number): number {\n const mt = 1 - t;\n return mt * mt * mt * a + 3 * mt * mt * t * b + 3 * mt * t * t * c + t * t * t * d;\n}\n\n/** The curve parameter at which a segment reaches `x`: bisection rather than Newton, since x is monotonic along the segment while Newton's derivative goes to zero at the flat ends of an ease-in-out. */\nexport function curveSegmentT(segment: EaseCurveSegment, x: number): number {\n let low = 0;\n let high = 1;\n for (let i = 0; i < 30; i++) {\n const mid = (low + high) / 2;\n const at = bezier(segment.p0.x, segment.c1.x, segment.c2.x, segment.p3.x, mid);\n if (at < x) low = mid;\n else high = mid;\n }\n return (low + high) / 2;\n}\n\n/** Whether `value` is a drawable curve: two or more finite points. */\nexport function isEaseCurve(value: unknown): value is CurvePoint[] {\n return Array.isArray(value) && value.length >= 2 && value.every(isFinitePoint);\n}\n\nfunction isFinitePoint(value: unknown): value is CurveVector {\n if (typeof value !== \"object\" || value === null) return false;\n const { x, y } = value as Partial<CurveVector>;\n return typeof x === \"number\" && Number.isFinite(x) && typeof y === \"number\" && Number.isFinite(y);\n}\n\n/** The easing a curve runs as: progress in, eased progress out. */\nexport function curveEase(points: readonly CurvePoint[]): EasingFunction {\n const segments = curveSegments(points);\n if (segments.length === 0) return describeEase((x) => x, 'lin');\n\n return describeEase((x) => {\n if (x <= 0) return segments[0].p0.y;\n const last = segments[segments.length - 1];\n if (x >= 1) return last.p3.y;\n\n let segment = last;\n for (const candidate of segments) {\n if (x <= candidate.p3.x) {\n segment = candidate;\n break;\n }\n }\n const t = curveSegmentT(segment, x);\n return bezier(segment.p0.y, segment.c1.y, segment.c2.y, segment.p3.y, t);\n }, `curve:${JSON.stringify(points)}`);\n}\n"]}
@@ -3,15 +3,4 @@ import type { EasingFunction } from "./type.js";
3
3
  export declare function describeEase<F extends EasingFunction>(ease: F, description: string): F;
4
4
  /** What an engine-built ease was recorded as, or `undefined` for any other function. @internal */
5
5
  export declare function easeDescription(ease: EasingFunction): string | undefined;
6
- /**
7
- * A string that is equal for two easings exactly when they are the same ease.
8
- *
9
- * An engine easing keys by its description, so building the same one twice (a
10
- * document rebuilt from the same row) gives the same key. A function the engine
11
- * did not build keys by its own identity: a different function is always a
12
- * different key, which may over-report a change but never hides one.
13
- *
14
- * @internal
15
- */
16
- export declare function easeKey(ease: EasingFunction): string;
17
6
  //# sourceMappingURL=describe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/describe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAa7C,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAGtF;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAExE;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CASpD"}
1
+ {"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/describe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAW7C,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAGtF;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAExE"}
@@ -6,8 +6,6 @@
6
6
  * deterministic description here, which is what a cache key can be built from.
7
7
  */
8
8
  const descriptions = new WeakMap();
9
- const identities = new WeakMap();
10
- let identityCounter = 0;
11
9
  /** Record what `ease` is, and hand it back. @internal */
12
10
  export function describeEase(ease, description) {
13
11
  descriptions.set(ease, description);
@@ -17,25 +15,4 @@ export function describeEase(ease, description) {
17
15
  export function easeDescription(ease) {
18
16
  return descriptions.get(ease);
19
17
  }
20
- /**
21
- * A string that is equal for two easings exactly when they are the same ease.
22
- *
23
- * An engine easing keys by its description, so building the same one twice (a
24
- * document rebuilt from the same row) gives the same key. A function the engine
25
- * did not build keys by its own identity: a different function is always a
26
- * different key, which may over-report a change but never hides one.
27
- *
28
- * @internal
29
- */
30
- export function easeKey(ease) {
31
- const described = descriptions.get(ease);
32
- if (described !== undefined)
33
- return described;
34
- let id = identities.get(ease);
35
- if (id === undefined) {
36
- id = `fn#${identityCounter++}`;
37
- identities.set(ease, id);
38
- }
39
- return id;
40
- }
41
18
  //# sourceMappingURL=describe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/tween/ease/describe.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,IAAI,OAAO,EAA0B,CAAC;AAC3D,MAAM,UAAU,GAAG,IAAI,OAAO,EAA0B,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,CAAC;AAExB,yDAAyD;AACzD,MAAM,UAAU,YAAY,CAA2B,IAAO,EAAE,WAAmB;IAC/E,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,eAAe,CAAC,IAAoB;IAChD,OAAO,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,IAAoB;IACxC,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;QACnB,EAAE,GAAG,MAAM,eAAe,EAAE,EAAE,CAAC;QAC/B,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,EAAE,CAAC;AACd,CAAC","sourcesContent":["import type { EasingFunction } from \"./type\";\n\n/**\n * Descriptions of engine-built easings, by function.\n *\n * Every engine easing is an anonymous closure, so `fn.name` is `\"\"` and cannot\n * tell two of them apart. A constructor that knows what it built records a short,\n * deterministic description here, which is what a cache key can be built from.\n */\nconst descriptions = new WeakMap<EasingFunction, string>();\nconst identities = new WeakMap<EasingFunction, string>();\nlet identityCounter = 0;\n\n/** Record what `ease` is, and hand it back. @internal */\nexport function describeEase<F extends EasingFunction>(ease: F, description: string): F {\n descriptions.set(ease, description);\n return ease;\n}\n\n/** What an engine-built ease was recorded as, or `undefined` for any other function. @internal */\nexport function easeDescription(ease: EasingFunction): string | undefined {\n return descriptions.get(ease);\n}\n\n/**\n * A string that is equal for two easings exactly when they are the same ease.\n *\n * An engine easing keys by its description, so building the same one twice (a\n * document rebuilt from the same row) gives the same key. A function the engine\n * did not build keys by its own identity: a different function is always a\n * different key, which may over-report a change but never hides one.\n *\n * @internal\n */\nexport function easeKey(ease: EasingFunction): string {\n const described = descriptions.get(ease);\n if (described !== undefined) return described;\n let id = identities.get(ease);\n if (id === undefined) {\n id = `fn#${identityCounter++}`;\n identities.set(ease, id);\n }\n return id;\n}\n"]}
1
+ {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/tween/ease/describe.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,IAAI,OAAO,EAA0B,CAAC;AAE3D,yDAAyD;AACzD,MAAM,UAAU,YAAY,CAA2B,IAAO,EAAE,WAAmB;IAC/E,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,eAAe,CAAC,IAAoB;IAChD,OAAO,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC","sourcesContent":["import type { EasingFunction } from \"./type\";\n\n/**\n * Descriptions of engine-built easings, by function.\n *\n * Every engine easing is an anonymous closure, so `fn.name` is `\"\"` and cannot\n * tell two of them apart. A constructor that knows what it built records a short,\n * deterministic description here, which is what a cache key can be built from.\n */\nconst descriptions = new WeakMap<EasingFunction, string>();\n\n/** Record what `ease` is, and hand it back. @internal */\nexport function describeEase<F extends EasingFunction>(ease: F, description: string): F {\n descriptions.set(ease, description);\n return ease;\n}\n\n/** What an engine-built ease was recorded as, or `undefined` for any other function. @internal */\nexport function easeDescription(ease: EasingFunction): string | undefined {\n return descriptions.get(ease);\n}\n"]}
@@ -1,26 +1,10 @@
1
1
  import { type EaseParams } from "./constants.js";
2
2
  import { type CurvePoint } from "./curve.js";
3
3
  import type { EasingFunction } from "./type.js";
4
- /**
5
- * How something eases, as data.
6
- *
7
- * Mirrors the `linear`/`easeIn`/`easeOut`/`easeInOut` families in
8
- * `tween/ease/constants.ts` — `kind` picks the direction, `args` picks the
9
- * family and its knobs.
10
- *
11
- * `kind: "custom"` takes a drawn curve in `args`, or the key a host passed to
12
- * `Registry.addEase`/`RegistryOptions.eases` for an ease no standard family
13
- * expresses.
14
- */
4
+ /** How something eases, as data: `kind` picks the direction and `args` the family and its knobs, mirroring the families in `tween/ease/constants.ts`. `kind: "custom"` takes a drawn curve in `args`, or the key of an ease the host passed to `Registry.addEase` / `RegistryOptions.eases`. */
15
5
  export interface EaseSpec {
16
6
  kind: "linear" | "in" | "out" | "inOut" | "custom";
17
- /**
18
- * Family and its parameters (`"quad"`, or `{ type: "back", overshoot: 2 }`)
19
- * for every `kind` but `"custom"`, whose `args` is instead the drawn curve
20
- * itself — a {@link CurvePoint} chain from (0, 0) to (1, 1), so the timing
21
- * travels with the document — or the `Registry.addEase` key of a function
22
- * the host registered.
23
- */
7
+ /** Family and parameters (`"quad"`, or `{ type: "back", overshoot: 2 }`) for every `kind` but `"custom"`, whose `args` is the drawn curve itself (a {@link CurvePoint} chain from (0, 0) to (1, 1), so timing travels with the document) or a `Registry.addEase` key. */
24
8
  args?: EaseParams | CurvePoint[] | string;
25
9
  }
26
10
  export declare const EASE_KINDS: ReadonlySet<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,UAAU,EAAqB,MAAM,aAAa,CAAC;AACrG,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IACnD;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,MAAM,CAAC;CAC7C;AAED,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAAyE,CAAC;AAErH,qGAAqG;AACrG,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,cAAc,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,SAAS,MAAM,EAAE,GAAG,cAAc,CAsBhJ;AAID,2GAA2G;AAC3G,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,QAAQ,GAAG,SAAS,CAarE"}
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../../src/tween/ease/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,UAAU,EAAqB,MAAM,aAAa,CAAC;AACrG,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,gSAAgS;AAChS,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IACnD,yQAAyQ;IACzQ,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,MAAM,CAAC;CAC7C;AAED,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAAyE,CAAC;AAErH,qGAAqG;AACrG,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,cAAc,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,SAAS,MAAM,EAAE,GAAG,cAAc,CAsBhJ;AAID,2GAA2G;AAC3G,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,QAAQ,GAAG,SAAS,CAarE"}
@@ -1 +1 @@
1
- {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../src/tween/ease/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAsC,MAAM,aAAa,CAAC;AACrG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAmB,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA0B7C,MAAM,CAAC,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAmB,CAAC,QAAQ,EAAE,IAAI,EAAE,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OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAE,IAAqB,CAAC,CAAC,CAAE,MAAqB,EAAE,CAAC;AACzH,CAAC","sourcesContent":["import { easeIn, easeInOut, easeOut, linear, type EaseParams, type StandardEase } from \"./constants\";\nimport { curveEase, isEaseCurve, type CurvePoint } from \"./curve\";\nimport { easeDescription } from \"./describe\";\nimport type { EasingFunction } from \"./type\";\n\n/**\n * How something eases, as data.\n *\n * Mirrors the `linear`/`easeIn`/`easeOut`/`easeInOut` families in\n * `tween/ease/constants.ts` — `kind` picks the direction, `args` picks the\n * family and its knobs.\n *\n * `kind: \"custom\"` takes a drawn curve in `args`, or the key a host passed to\n * `Registry.addEase`/`RegistryOptions.eases` for an ease no standard family\n * expresses.\n */\nexport interface EaseSpec {\n kind: \"linear\" | \"in\" | \"out\" | \"inOut\" | \"custom\";\n /**\n * Family and its parameters (`\"quad\"`, or `{ type: \"back\", overshoot: 2 }`)\n * for every `kind` but `\"custom\"`, whose `args` is instead the drawn curve\n * itself — a {@link CurvePoint} chain from (0, 0) to (1, 1), so the timing\n * travels with the document — or the `Registry.addEase` key of a function\n * the host registered.\n */\n args?: EaseParams | CurvePoint[] | string;\n}\n\nexport const EASE_KINDS: ReadonlySet<string> = new Set<EaseSpec[\"kind\"]>([\"linear\", \"in\", \"out\", \"inOut\", \"custom\"]);\n\n/** The function `spec` runs as. A registry key resolves through `lookup`, and throws without one. */\nexport function easeOfSpec(spec: EaseSpec, lookup?: (key: string) => EasingFunction | undefined, known?: () => readonly string[]): EasingFunction {\n switch (spec.kind) {\n case \"linear\": return linear();\n case \"in\": return easeIn(spec.args as EaseParams | undefined);\n case \"out\": return easeOut(spec.args as EaseParams | undefined);\n case \"inOut\": return easeInOut(spec.args as EaseParams | undefined);\n case \"custom\": {\n const key = spec.args;\n if (isEaseCurve(key)) return curveEase(key);\n if (typeof key !== \"string\") {\n throw new Error(`A \"custom\" ease needs a curve or its Registry.addEase key in \\`args\\` (got ${JSON.stringify(spec.args)}).`);\n }\n const fn = lookup?.(key);\n if (!fn) {\n const registered = known?.().join(\", \") || \"none\";\n throw new Error(lookup\n ? `No ease registered under \"${key}\". Registered: ${registered}.`\n : `The ease \"${key}\" names a Registry entry, which nothing here can resolve; use a standard ease or a drawn curve.`);\n }\n return fn;\n }\n }\n}\n\nconst STANDARD: ReadonlySet<string> = new Set<StandardEase>([\"sine\", \"quad\", \"cubic\", \"quart\", \"quint\", \"expo\", \"circ\", \"back\", \"elastic\", \"bounce\"]);\n\n/** The spec an engine-built ease was made from, or `undefined` for a function the engine did not build. */\nexport function specOfEase(ease: EasingFunction): EaseSpec | undefined {\n const description = easeDescription(ease);\n if (description === undefined) return undefined;\n if (description === \"lin\") return { kind: \"linear\" };\n if (description.startsWith(\"curve:\")) return { kind: \"custom\", args: JSON.parse(description.slice(6)) as CurvePoint[] };\n const [direction, type, overshoot, amplitude, period] = description.split(\":\");\n if ((direction !== \"in\" && direction !== \"out\" && direction !== \"inOut\") || !STANDARD.has(type)) return undefined;\n const tuning = { overshoot, amplitude, period };\n const config: Record<string, unknown> = { type };\n for (const [name, value] of Object.entries(tuning)) {\n if (value !== undefined && value !== \"_\") config[name] = Number(value);\n }\n return { kind: direction, args: Object.keys(config).length === 1 ? (type as StandardEase) : (config as EaseParams) };\n}\n"]}
1
+ {"version":3,"file":"spec.js","sourceRoot":"","sources":["../../../src/tween/ease/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAsC,MAAM,aAAa,CAAC;AACrG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAmB,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAU7C,MAAM,CAAC,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAmB,CAAC,QAAQ,EAA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3E,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAE,IAAqB,CAAC,CAAC,CAAE,MAAqB,EAAE,CAAC;AACzH,CAAC","sourcesContent":["import { easeIn, easeInOut, easeOut, linear, type EaseParams, type StandardEase } from \"./constants\";\nimport { curveEase, isEaseCurve, type CurvePoint } from \"./curve\";\nimport { easeDescription } from \"./describe\";\nimport type { EasingFunction } from \"./type\";\n\n/** How something eases, as data: `kind` picks the direction and `args` the family and its knobs, mirroring the families in `tween/ease/constants.ts`. `kind: \"custom\"` takes a drawn curve in `args`, or the key of an ease the host passed to `Registry.addEase` / `RegistryOptions.eases`. */\nexport interface EaseSpec {\n kind: \"linear\" | \"in\" | \"out\" | \"inOut\" | \"custom\";\n /** Family and parameters (`\"quad\"`, or `{ type: \"back\", overshoot: 2 }`) for every `kind` but `\"custom\"`, whose `args` is the drawn curve itself (a {@link CurvePoint} chain from (0, 0) to (1, 1), so timing travels with the document) or a `Registry.addEase` key. */\n args?: EaseParams | CurvePoint[] | string;\n}\n\nexport const EASE_KINDS: ReadonlySet<string> = new Set<EaseSpec[\"kind\"]>([\"linear\", \"in\", \"out\", \"inOut\", \"custom\"]);\n\n/** The function `spec` runs as. A registry key resolves through `lookup`, and throws without one. */\nexport function easeOfSpec(spec: EaseSpec, lookup?: (key: string) => EasingFunction | undefined, known?: () => readonly string[]): EasingFunction {\n switch (spec.kind) {\n case \"linear\": return linear();\n case \"in\": return easeIn(spec.args as EaseParams | undefined);\n case \"out\": return easeOut(spec.args as EaseParams | undefined);\n case \"inOut\": return easeInOut(spec.args as EaseParams | undefined);\n case \"custom\": {\n const key = spec.args;\n if (isEaseCurve(key)) return curveEase(key);\n if (typeof key !== \"string\") {\n throw new Error(`A \"custom\" ease needs a curve or its Registry.addEase key in \\`args\\` (got ${JSON.stringify(spec.args)}).`);\n }\n const fn = lookup?.(key);\n if (!fn) {\n const registered = known?.().join(\", \") || \"none\";\n throw new Error(lookup\n ? `No ease registered under \"${key}\". Registered: ${registered}.`\n : `The ease \"${key}\" names a Registry entry, which nothing here can resolve; use a standard ease or a drawn curve.`);\n }\n return fn;\n }\n }\n}\n\nconst STANDARD: ReadonlySet<string> = new Set<StandardEase>([\"sine\", \"quad\", \"cubic\", \"quart\", \"quint\", \"expo\", \"circ\", \"back\", \"elastic\", \"bounce\"]);\n\n/** The spec an engine-built ease was made from, or `undefined` for a function the engine did not build. */\nexport function specOfEase(ease: EasingFunction): EaseSpec | undefined {\n const description = easeDescription(ease);\n if (description === undefined) return undefined;\n if (description === \"lin\") return { kind: \"linear\" };\n if (description.startsWith(\"curve:\")) return { kind: \"custom\", args: JSON.parse(description.slice(6)) as CurvePoint[] };\n const [direction, type, overshoot, amplitude, period] = description.split(\":\");\n if ((direction !== \"in\" && direction !== \"out\" && direction !== \"inOut\") || !STANDARD.has(type)) return undefined;\n const tuning = { overshoot, amplitude, period };\n const config: Record<string, unknown> = { type };\n for (const [name, value] of Object.entries(tuning)) {\n if (value !== undefined && value !== \"_\") config[name] = Number(value);\n }\n return { kind: direction, args: Object.keys(config).length === 1 ? (type as StandardEase) : (config as EaseParams) };\n}\n"]}
@@ -1,19 +1,6 @@
1
1
  import { TweenStepper } from "./stepper.js";
2
2
  import type { Command } from "./command.js";
3
- /**
4
- * An animation that occupies its duration and writes nothing.
5
- *
6
- * What a command on an **unmounted** node becomes. A node that is not in the
7
- * tree has no box, no surface and no timeline, so a tween on it has nothing to
8
- * be a tween *of* — but it still has a duration, and the timeline slot it was
9
- * placed in is entitled to have that duration pass. Returning a real command of
10
- * the right length keeps the scene's timing intact where throwing would abort
11
- * the pass and where returning nothing would silently shorten it.
12
- *
13
- * The failure this turns into a no-op is a real one — animating a node the
14
- * author forgot to `add` — and it reads as "nothing moved", which is what the
15
- * author sees on screen anyway.
16
- */
3
+ /** An animation that occupies its duration and writes nothing: what a command on an **unmounted** node becomes. Such a node has no box, surface or timeline, but the timeline slot it was placed in is entitled to its duration; a real command of the right length keeps the scene's timing where throwing would abort the pass and returning nothing would silently shorten it. The failure (animating a node the author forgot to `add`) reads as "nothing moved", which is what shows on screen anyway. */
17
4
  export declare function inertCommand<P>(target: object, duration: number): Command<P>;
18
5
  /** The {@link TweenStepper} half of {@link inertCommand}: runs its clock, writes nothing. */
19
6
  export declare function inertStepper(duration: number): TweenStepper;
@@ -1 +1 @@
1
- {"version":3,"file":"inert.d.ts","sourceRoot":"","sources":["../../src/tween/inert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAO5E;AAED,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAS3D"}
1
+ {"version":3,"file":"inert.d.ts","sourceRoot":"","sources":["../../src/tween/inert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,+eAA+e;AAC/e,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAO5E;AAED,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAS3D"}
@@ -1,17 +1,4 @@
1
- /**
2
- * An animation that occupies its duration and writes nothing.
3
- *
4
- * What a command on an **unmounted** node becomes. A node that is not in the
5
- * tree has no box, no surface and no timeline, so a tween on it has nothing to
6
- * be a tween *of* — but it still has a duration, and the timeline slot it was
7
- * placed in is entitled to have that duration pass. Returning a real command of
8
- * the right length keeps the scene's timing intact where throwing would abort
9
- * the pass and where returning nothing would silently shorten it.
10
- *
11
- * The failure this turns into a no-op is a real one — animating a node the
12
- * author forgot to `add` — and it reads as "nothing moved", which is what the
13
- * author sees on screen anyway.
14
- */
1
+ /** An animation that occupies its duration and writes nothing: what a command on an **unmounted** node becomes. Such a node has no box, surface or timeline, but the timeline slot it was placed in is entitled to its duration; a real command of the right length keeps the scene's timing where throwing would abort the pass and returning nothing would silently shorten it. The failure (animating a node the author forgot to `add`) reads as "nothing moved", which is what shows on screen anyway. */
15
2
  export function inertCommand(target, duration) {
16
3
  void target;
17
4
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"inert.js","sourceRoot":"","sources":["../../src/tween/inert.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,YAAY,CAAI,MAAc,EAAE,QAAgB;IAC5D,KAAK,MAAM,CAAC;IACZ,OAAO;QACH,QAAQ;QACR,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAe;QAC5B,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC;KACzC,CAAC;AACN,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,QAAgB;IACzC,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,OAAO;QACH,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;QACrC,OAAO,EAAE,CAAC,EAAU,EAAW,EAAE;YAC7B,OAAO,IAAI,EAAE,CAAC;YACd,OAAO,OAAO,IAAI,QAAQ,CAAC;QAC/B,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { TweenStepper } from \"./stepper\";\nimport type { Command } from \"./command\";\n\n/**\n * An animation that occupies its duration and writes nothing.\n *\n * What a command on an **unmounted** node becomes. A node that is not in the\n * tree has no box, no surface and no timeline, so a tween on it has nothing to\n * be a tween *of* — but it still has a duration, and the timeline slot it was\n * placed in is entitled to have that duration pass. Returning a real command of\n * the right length keeps the scene's timing intact where throwing would abort\n * the pass and where returning nothing would silently shorten it.\n *\n * The failure this turns into a no-op is a real one — animating a node the\n * author forgot to `add` — and it reads as \"nothing moved\", which is what the\n * author sees on screen anyway.\n */\nexport function inertCommand<P>(target: object, duration: number): Command<P> {\n void target;\n return {\n duration,\n at: () => ({}) as Partial<P>,\n _stepper: () => inertStepper(duration),\n };\n}\n\n/** The {@link TweenStepper} half of {@link inertCommand}: runs its clock, writes nothing. */\nexport function inertStepper(duration: number): TweenStepper {\n let elapsed = 0;\n return {\n seek: (e: number) => { elapsed = e; },\n advance: (dt: number): boolean => {\n elapsed += dt;\n return elapsed >= duration;\n },\n };\n}\n"]}
1
+ {"version":3,"file":"inert.js","sourceRoot":"","sources":["../../src/tween/inert.ts"],"names":[],"mappings":"AAGA,+eAA+e;AAC/e,MAAM,UAAU,YAAY,CAAI,MAAc,EAAE,QAAgB;IAC5D,KAAK,MAAM,CAAC;IACZ,OAAO;QACH,QAAQ;QACR,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAe;QAC5B,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC;KACzC,CAAC;AACN,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,QAAgB;IACzC,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,OAAO;QACH,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;QACrC,OAAO,EAAE,CAAC,EAAU,EAAW,EAAE;YAC7B,OAAO,IAAI,EAAE,CAAC;YACd,OAAO,OAAO,IAAI,QAAQ,CAAC;QAC/B,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { TweenStepper } from \"./stepper\";\nimport type { Command } from \"./command\";\n\n/** An animation that occupies its duration and writes nothing: what a command on an **unmounted** node becomes. Such a node has no box, surface or timeline, but the timeline slot it was placed in is entitled to its duration; a real command of the right length keeps the scene's timing where throwing would abort the pass and returning nothing would silently shorten it. The failure (animating a node the author forgot to `add`) reads as \"nothing moved\", which is what shows on screen anyway. */\nexport function inertCommand<P>(target: object, duration: number): Command<P> {\n void target;\n return {\n duration,\n at: () => ({}) as Partial<P>,\n _stepper: () => inertStepper(duration),\n };\n}\n\n/** The {@link TweenStepper} half of {@link inertCommand}: runs its clock, writes nothing. */\nexport function inertStepper(duration: number): TweenStepper {\n let elapsed = 0;\n return {\n seek: (e: number) => { elapsed = e; },\n advance: (dt: number): boolean => {\n elapsed += dt;\n return elapsed >= duration;\n },\n };\n}\n"]}
@@ -1,31 +1,7 @@
1
1
  import { EasingFunction } from "./ease/type.js";
2
- /**
3
- * Linearly interpolates between two numbers.
4
- *
5
- * @param from - Start value at `t = 0`.
6
- * @param to - End value at `t = 1`.
7
- * @param t - Normalized progress in [0, 1]. Values outside this range
8
- * extrapolate beyond the endpoints.
9
- * @returns The interpolated value: `from + (to - from) * t`.
10
- */
2
+ /** Linearly interpolates `from + (to - from) * t`; `t` outside [0, 1] extrapolates. */
11
3
  export declare function lerpNumber(from: number, to: number, t: number): number;
12
- /**
13
- * Interpolates a CSS-style perspective distance (viewer-to-plane, in px, where
14
- * `0` means "no perspective" — a parallel projection).
15
- *
16
- * Perspective enters the projection matrix as its reciprocal — a point at depth
17
- * `z` lands at `x / (1 - z/perspective)` — so `1/perspective` (not the raw
18
- * distance) is the quantity that varies smoothly with the visual strength of
19
- * the effect. Lerping the raw px value linearly sweeps through the small
20
- * positive numbers next to `0` on the way between "off" and any finite
21
- * distance, and `1/perspective` diverges there: a `0 → 800` tween would flash
22
- * through a wildly exaggerated, near-degenerate projection right at the start
23
- * before settling down to the mild depth `800` actually asks for. Lerping the
24
- * reciprocal instead — with `0` standing in for a reciprocal of `0`, matching
25
- * the renderer's own convention (see `isProjective`/`invP` in `matrix2d.ts`) —
26
- * keeps that quantity monotonic and bounded between the two endpoints, so the
27
- * effect builds or settles smoothly instead of spiking.
28
- */
4
+ /** Interpolates a CSS-style perspective distance (px; `0` is a parallel projection). Perspective enters the matrix as its reciprocal (`x / (1 - z/perspective)`), so `1/perspective` varies smoothly with visual strength: lerping the raw px value would sweep through small positive numbers near `0` where the reciprocal diverges, flashing a near-degenerate projection at the start of a `0 → 800` tween. Lerping the reciprocal (`0` standing for `0`, as in `isProjective`/`invP` in `matrix2d.ts`) stays monotonic and bounded. */
29
5
  export declare function lerpPerspective(from: number, to: number, t: number): number;
30
6
  export type LerpFunction<T> = (from: T, to: T, t: number) => T;
31
7
  export type TweenOptions<T> = {
@@ -1 +1 @@
1
- {"version":3,"file":"lerp.d.ts","sourceRoot":"","sources":["../../src/tween/lerp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAK3E;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;AAC/D,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAAE,IAAI,CAAC,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"lerp.d.ts","sourceRoot":"","sources":["../../src/tween/lerp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,4gBAA4gB;AAC5gB,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAK3E;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;AAC/D,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAAE,IAAI,CAAC,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC"}
@@ -1,32 +1,8 @@
1
- /**
2
- * Linearly interpolates between two numbers.
3
- *
4
- * @param from - Start value at `t = 0`.
5
- * @param to - End value at `t = 1`.
6
- * @param t - Normalized progress in [0, 1]. Values outside this range
7
- * extrapolate beyond the endpoints.
8
- * @returns The interpolated value: `from + (to - from) * t`.
9
- */
1
+ /** Linearly interpolates `from + (to - from) * t`; `t` outside [0, 1] extrapolates. */
10
2
  export function lerpNumber(from, to, t) {
11
3
  return from + (to - from) * t;
12
4
  }
13
- /**
14
- * Interpolates a CSS-style perspective distance (viewer-to-plane, in px, where
15
- * `0` means "no perspective" — a parallel projection).
16
- *
17
- * Perspective enters the projection matrix as its reciprocal — a point at depth
18
- * `z` lands at `x / (1 - z/perspective)` — so `1/perspective` (not the raw
19
- * distance) is the quantity that varies smoothly with the visual strength of
20
- * the effect. Lerping the raw px value linearly sweeps through the small
21
- * positive numbers next to `0` on the way between "off" and any finite
22
- * distance, and `1/perspective` diverges there: a `0 → 800` tween would flash
23
- * through a wildly exaggerated, near-degenerate projection right at the start
24
- * before settling down to the mild depth `800` actually asks for. Lerping the
25
- * reciprocal instead — with `0` standing in for a reciprocal of `0`, matching
26
- * the renderer's own convention (see `isProjective`/`invP` in `matrix2d.ts`) —
27
- * keeps that quantity monotonic and bounded between the two endpoints, so the
28
- * effect builds or settles smoothly instead of spiking.
29
- */
5
+ /** Interpolates a CSS-style perspective distance (px; `0` is a parallel projection). Perspective enters the matrix as its reciprocal (`x / (1 - z/perspective)`), so `1/perspective` varies smoothly with visual strength: lerping the raw px value would sweep through small positive numbers near `0` where the reciprocal diverges, flashing a near-degenerate projection at the start of a `0 → 800` tween. Lerping the reciprocal (`0` standing for `0`, as in `isProjective`/`invP` in `matrix2d.ts`) stays monotonic and bounded. */
30
6
  export function lerpPerspective(from, to, t) {
31
7
  const invFrom = from !== 0 ? 1 / from : 0;
32
8
  const invTo = to !== 0 ? 1 / to : 0;
@@ -1 +1 @@
1
- {"version":3,"file":"lerp.js","sourceRoot":"","sources":["../../src/tween/lerp.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,EAAU,EAAE,CAAS;IAC1D,OAAO,IAAI,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,EAAU,EAAE,CAAS;IAC/D,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,OAAO,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5C,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import { EasingFunction } from \"./ease/type\";\n\n/**\n * Linearly interpolates between two numbers.\n *\n * @param from - Start value at `t = 0`.\n * @param to - End value at `t = 1`.\n * @param t - Normalized progress in [0, 1]. Values outside this range\n * extrapolate beyond the endpoints.\n * @returns The interpolated value: `from + (to - from) * t`.\n */\nexport function lerpNumber(from: number, to: number, t: number): number {\n return from + (to - from) * t;\n}\n\n/**\n * Interpolates a CSS-style perspective distance (viewer-to-plane, in px, where\n * `0` means \"no perspective\" — a parallel projection).\n *\n * Perspective enters the projection matrix as its reciprocal — a point at depth\n * `z` lands at `x / (1 - z/perspective)` — so `1/perspective` (not the raw\n * distance) is the quantity that varies smoothly with the visual strength of\n * the effect. Lerping the raw px value linearly sweeps through the small\n * positive numbers next to `0` on the way between \"off\" and any finite\n * distance, and `1/perspective` diverges there: a `0 → 800` tween would flash\n * through a wildly exaggerated, near-degenerate projection right at the start\n * before settling down to the mild depth `800` actually asks for. Lerping the\n * reciprocal instead — with `0` standing in for a reciprocal of `0`, matching\n * the renderer's own convention (see `isProjective`/`invP` in `matrix2d.ts`) —\n * keeps that quantity monotonic and bounded between the two endpoints, so the\n * effect builds or settles smoothly instead of spiking.\n */\nexport function lerpPerspective(from: number, to: number, t: number): number {\n const invFrom = from !== 0 ? 1 / from : 0;\n const invTo = to !== 0 ? 1 / to : 0;\n const inv = invFrom + (invTo - invFrom) * t;\n return inv !== 0 ? 1 / inv : 0;\n}\n\nexport type LerpFunction<T> = (from: T, to: T, t: number) => T;\nexport type TweenOptions<T> = { ease?: EasingFunction, lerp?: LerpFunction<T> };"]}
1
+ {"version":3,"file":"lerp.js","sourceRoot":"","sources":["../../src/tween/lerp.ts"],"names":[],"mappings":"AAEA,uFAAuF;AACvF,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,EAAU,EAAE,CAAS;IAC1D,OAAO,IAAI,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,4gBAA4gB;AAC5gB,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,EAAU,EAAE,CAAS;IAC/D,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,OAAO,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5C,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import { EasingFunction } from \"./ease/type\";\n\n/** Linearly interpolates `from + (to - from) * t`; `t` outside [0, 1] extrapolates. */\nexport function lerpNumber(from: number, to: number, t: number): number {\n return from + (to - from) * t;\n}\n\n/** Interpolates a CSS-style perspective distance (px; `0` is a parallel projection). Perspective enters the matrix as its reciprocal (`x / (1 - z/perspective)`), so `1/perspective` varies smoothly with visual strength: lerping the raw px value would sweep through small positive numbers near `0` where the reciprocal diverges, flashing a near-degenerate projection at the start of a `0 → 800` tween. Lerping the reciprocal (`0` standing for `0`, as in `isProjective`/`invP` in `matrix2d.ts`) stays monotonic and bounded. */\nexport function lerpPerspective(from: number, to: number, t: number): number {\n const invFrom = from !== 0 ? 1 / from : 0;\n const invTo = to !== 0 ? 1 / to : 0;\n const inv = invFrom + (invTo - invFrom) * t;\n return inv !== 0 ? 1 / inv : 0;\n}\n\nexport type LerpFunction<T> = (from: T, to: T, t: number) => T;\nexport type TweenOptions<T> = { ease?: EasingFunction, lerp?: LerpFunction<T> };"]}