@motionscript/core 0.1.0-alpha.6 → 0.1.0-alpha.8

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 (804) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/NOTICE +15 -14
  3. package/README.md +5 -7
  4. package/dist/assets/errors.js +4 -5
  5. package/dist/assets/errors.js.map +1 -1
  6. package/dist/assets/manager.d.ts.map +1 -1
  7. package/dist/assets/manager.js +7 -5
  8. package/dist/assets/manager.js.map +1 -1
  9. package/dist/assets/scope.d.ts +1 -1
  10. package/dist/assets/scope.d.ts.map +1 -1
  11. package/dist/assets/scope.js +1 -1
  12. package/dist/assets/scope.js.map +1 -1
  13. package/dist/attributes/audio/effects/chain.d.ts +73 -0
  14. package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
  15. package/dist/attributes/audio/effects/chain.js +67 -0
  16. package/dist/attributes/audio/effects/chain.js.map +1 -0
  17. package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
  18. package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
  19. package/dist/attributes/audio/effects/implementations/echo.js +11 -0
  20. package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
  21. package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
  22. package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
  23. package/dist/attributes/audio/effects/implementations/gain.js +6 -0
  24. package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
  25. package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
  26. package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
  27. package/dist/attributes/audio/effects/implementations/highpass.js +10 -0
  28. package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
  29. package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
  30. package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
  31. package/dist/attributes/audio/effects/implementations/lowpass.js +10 -0
  32. package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
  33. package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
  34. package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
  35. package/dist/attributes/audio/effects/implementations/tremolo.js +10 -0
  36. package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
  37. package/dist/attributes/audio/effects/index.d.ts +12 -0
  38. package/dist/attributes/audio/effects/index.d.ts.map +1 -0
  39. package/dist/attributes/audio/effects/index.js +4 -0
  40. package/dist/attributes/audio/effects/index.js.map +1 -0
  41. package/dist/attributes/audio/effects/registry.d.ts +36 -0
  42. package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
  43. package/dist/attributes/audio/effects/registry.js +80 -0
  44. package/dist/attributes/audio/effects/registry.js.map +1 -0
  45. package/dist/attributes/audio/effects/union.d.ts +14 -0
  46. package/dist/attributes/audio/effects/union.d.ts.map +1 -0
  47. package/dist/attributes/audio/effects/union.js +24 -0
  48. package/dist/attributes/audio/effects/union.js.map +1 -0
  49. package/dist/attributes/audio/ramp.d.ts +103 -0
  50. package/dist/attributes/audio/ramp.d.ts.map +1 -0
  51. package/dist/attributes/audio/ramp.js +246 -0
  52. package/dist/attributes/audio/ramp.js.map +1 -0
  53. package/dist/attributes/audio/request.d.ts +24 -13
  54. package/dist/attributes/audio/request.d.ts.map +1 -1
  55. package/dist/attributes/audio/request.js +4 -3
  56. package/dist/attributes/audio/request.js.map +1 -1
  57. package/dist/attributes/audio/schedule.d.ts +24 -31
  58. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  59. package/dist/attributes/audio/schedule.js +42 -28
  60. package/dist/attributes/audio/schedule.js.map +1 -1
  61. package/dist/attributes/audio/sound.d.ts +15 -12
  62. package/dist/attributes/audio/sound.d.ts.map +1 -1
  63. package/dist/attributes/audio/sound.js +8 -10
  64. package/dist/attributes/audio/sound.js.map +1 -1
  65. package/dist/attributes/audio/transition.d.ts +33 -0
  66. package/dist/attributes/audio/transition.d.ts.map +1 -0
  67. package/dist/attributes/audio/transition.js +48 -0
  68. package/dist/attributes/audio/transition.js.map +1 -0
  69. package/dist/attributes/index.d.ts +7 -8
  70. package/dist/attributes/index.d.ts.map +1 -1
  71. package/dist/attributes/index.js +6 -9
  72. package/dist/attributes/index.js.map +1 -1
  73. package/dist/attributes/layout/insets.d.ts +1 -1
  74. package/dist/attributes/layout/insets.js.map +1 -1
  75. package/dist/attributes/layout/matrix2d.d.ts +2 -2
  76. package/dist/attributes/layout/matrix2d.js.map +1 -1
  77. package/dist/attributes/layout/size.d.ts +1 -1
  78. package/dist/attributes/layout/size.js +1 -1
  79. package/dist/attributes/layout/size.js.map +1 -1
  80. package/dist/attributes/layout/space3d.js +1 -1
  81. package/dist/attributes/layout/space3d.js.map +1 -1
  82. package/dist/attributes/properties/decorator.d.ts +44 -11
  83. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  84. package/dist/attributes/properties/decorator.js +37 -9
  85. package/dist/attributes/properties/decorator.js.map +1 -1
  86. package/dist/attributes/properties/inputs.d.ts +1 -1
  87. package/dist/attributes/properties/inputs.js +1 -1
  88. package/dist/attributes/properties/inputs.js.map +1 -1
  89. package/dist/attributes/properties/typed.d.ts +24 -145
  90. package/dist/attributes/properties/typed.d.ts.map +1 -1
  91. package/dist/attributes/properties/typed.js +16 -112
  92. package/dist/attributes/properties/typed.js.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
  94. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  95. package/dist/attributes/shape/corners/corner-radius.js +2 -3
  96. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  97. package/dist/attributes/shape/effects/chain.d.ts +96 -409
  98. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  99. package/dist/attributes/shape/effects/chain.js +93 -283
  100. package/dist/attributes/shape/effects/chain.js.map +1 -1
  101. package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
  102. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  103. package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
  104. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  105. package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
  106. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
  108. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
  110. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
  112. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
  114. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
  116. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
  118. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
  120. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/blur.js +13 -5
  122. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
  124. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
  126. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
  128. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
  130. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
  132. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
  134. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
  136. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  137. package/dist/attributes/shape/effects/implementations/curves.js +26 -23
  138. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  139. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
  140. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  141. package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
  142. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  143. package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
  144. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  145. package/dist/attributes/shape/effects/implementations/dither.js +26 -20
  146. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  147. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +47 -15
  148. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  149. package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
  150. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  151. package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
  152. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  153. package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
  154. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  155. package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
  156. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  157. package/dist/attributes/shape/effects/implementations/edges.js +17 -14
  158. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  159. package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
  160. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  161. package/dist/attributes/shape/effects/implementations/glass.js +28 -22
  162. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  163. package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
  164. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  165. package/dist/attributes/shape/effects/implementations/glow.js +74 -72
  166. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  167. package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
  168. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  169. package/dist/attributes/shape/effects/implementations/grain.js +21 -18
  170. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  171. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
  172. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  173. package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
  174. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  175. package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
  176. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  177. package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
  178. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  179. package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
  180. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  181. package/dist/attributes/shape/effects/implementations/invert.js +15 -10
  182. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  183. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
  184. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  185. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
  186. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  187. package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
  188. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  189. package/dist/attributes/shape/effects/implementations/lut.js +20 -16
  190. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  191. package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
  192. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  193. package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
  194. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  195. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
  196. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  197. package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
  198. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  199. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
  200. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  201. package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
  202. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  203. package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
  204. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  205. package/dist/attributes/shape/effects/implementations/outline.js +18 -17
  206. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  207. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
  208. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  209. package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
  210. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  211. package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
  212. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  213. package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
  214. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  215. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
  216. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  217. package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
  218. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  219. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
  220. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  221. package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
  222. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  223. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
  224. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  225. package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
  226. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  227. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
  228. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  229. package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
  230. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  231. package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
  232. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  233. package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
  234. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  235. package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
  236. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  237. package/dist/attributes/shape/effects/implementations/shader.js +42 -26
  238. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  239. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
  240. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  241. package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
  242. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  243. package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
  244. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  245. package/dist/attributes/shape/effects/implementations/streak.js +19 -16
  246. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  247. package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
  248. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  249. package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
  250. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  251. package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
  252. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  253. package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
  254. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  255. package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
  256. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  257. package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
  258. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  259. package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
  260. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  261. package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
  262. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  263. package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
  264. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  265. package/dist/attributes/shape/effects/implementations/wave.js +26 -23
  266. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  267. package/dist/attributes/shape/effects/index.d.ts +4 -2
  268. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  269. package/dist/attributes/shape/effects/index.js +1 -1
  270. package/dist/attributes/shape/effects/index.js.map +1 -1
  271. package/dist/attributes/shape/effects/registry.d.ts +11 -0
  272. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  273. package/dist/attributes/shape/effects/registry.js +113 -102
  274. package/dist/attributes/shape/effects/registry.js.map +1 -1
  275. package/dist/attributes/shape/effects/spec.d.ts +229 -0
  276. package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
  277. package/dist/attributes/shape/effects/spec.js +178 -0
  278. package/dist/attributes/shape/effects/spec.js.map +1 -0
  279. package/dist/attributes/shape/fill/chain.d.ts +7 -9
  280. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  281. package/dist/attributes/shape/fill/chain.js +9 -11
  282. package/dist/attributes/shape/fill/chain.js.map +1 -1
  283. package/dist/attributes/shape/fill/color/parser.d.ts +1 -1
  284. package/dist/attributes/shape/fill/color/parser.js +1 -1
  285. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  286. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
  287. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  288. package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
  289. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  290. package/dist/attributes/shape/fill/implementations/shader.js +20 -14
  291. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  292. package/dist/attributes/shape/fill/implementations/video.d.ts +1 -1
  293. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  294. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  295. package/dist/attributes/shape/fill/index.d.ts +1 -1
  296. package/dist/attributes/shape/fill/index.d.ts.map +1 -1
  297. package/dist/attributes/shape/fill/index.js.map +1 -1
  298. package/dist/attributes/shape/fill/lerp.d.ts +1 -1
  299. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  300. package/dist/attributes/shape/fill/registry.d.ts +1 -2
  301. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  302. package/dist/attributes/shape/fill/registry.js +1 -2
  303. package/dist/attributes/shape/fill/registry.js.map +1 -1
  304. package/dist/attributes/shape/filters/chain.d.ts +3 -7
  305. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  306. package/dist/attributes/shape/filters/chain.js +2 -6
  307. package/dist/attributes/shape/filters/chain.js.map +1 -1
  308. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
  309. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  310. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  311. package/dist/attributes/shape/filters/registry.d.ts +1 -1
  312. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  313. package/dist/attributes/shape/filters/registry.js +3 -3
  314. package/dist/attributes/shape/filters/registry.js.map +1 -1
  315. package/dist/attributes/shape/filters/union.d.ts +6 -6
  316. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  317. package/dist/attributes/shape/filters/union.js.map +1 -1
  318. package/dist/attributes/shape/path/ops.d.ts +1 -2
  319. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  320. package/dist/attributes/shape/path/ops.js.map +1 -1
  321. package/dist/attributes/shape/shaders/index.d.ts +2 -0
  322. package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
  323. package/dist/attributes/shape/shaders/index.js +2 -0
  324. package/dist/attributes/shape/shaders/index.js.map +1 -1
  325. package/dist/attributes/shape/shaders/language.d.ts +26 -0
  326. package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
  327. package/dist/attributes/shape/shaders/language.js +20 -0
  328. package/dist/attributes/shape/shaders/language.js.map +1 -0
  329. package/dist/attributes/shape/shaders/pack.d.ts +25 -11
  330. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  331. package/dist/attributes/shape/shaders/pack.js +9 -4
  332. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  333. package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
  334. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  335. package/dist/attributes/shape/shaders/resolve.js +3 -6
  336. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  337. package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
  338. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
  339. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  340. package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
  341. package/dist/attributes/shared/operators.d.ts +2 -2
  342. package/dist/attributes/shared/operators.js.map +1 -1
  343. package/dist/attributes/text/types.d.ts +2 -3
  344. package/dist/attributes/text/types.d.ts.map +1 -1
  345. package/dist/attributes/text/types.js.map +1 -1
  346. package/dist/browser/chunks/chunk-AOT33LMS.js +13 -0
  347. package/dist/browser/chunks/chunk-AOT33LMS.js.map +7 -0
  348. package/dist/browser/chunks/chunk-GKM6UZJR.js +6 -0
  349. package/dist/browser/chunks/chunk-GKM6UZJR.js.map +7 -0
  350. package/dist/browser/chunks/chunk-LKUYVFU3.js +2 -0
  351. package/dist/browser/chunks/{chunk-DHB4COFY.js.map → chunk-LKUYVFU3.js.map} +4 -4
  352. package/dist/browser/chunks/chunk-ZRPZPWZU.js +3 -0
  353. package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +7 -0
  354. package/dist/browser/component.js +1 -1
  355. package/dist/browser/component.js.map +4 -4
  356. package/dist/browser/experimental.js +1 -1
  357. package/dist/browser/experimental.js.map +4 -4
  358. package/dist/browser/index.js +1 -1
  359. package/dist/browser/index.js.map +4 -4
  360. package/dist/browser/manifest.json +2 -4
  361. package/dist/browser/sdk.js +1 -1
  362. package/dist/component.d.ts +10 -18
  363. package/dist/component.d.ts.map +1 -1
  364. package/dist/component.js +10 -17
  365. package/dist/component.js.map +1 -1
  366. package/dist/components/builtins/audio/audio.d.ts +62 -0
  367. package/dist/components/builtins/audio/audio.d.ts.map +1 -0
  368. package/dist/components/builtins/audio/audio.js +38 -0
  369. package/dist/components/builtins/audio/audio.js.map +1 -0
  370. package/dist/components/builtins/geometry/composite.d.ts +93 -0
  371. package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
  372. package/dist/components/builtins/geometry/composite.js +25 -0
  373. package/dist/components/builtins/geometry/composite.js.map +1 -0
  374. package/dist/components/builtins/geometry/geometry.d.ts +921 -0
  375. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
  376. package/dist/components/builtins/geometry/geometry.js +107 -0
  377. package/dist/components/builtins/geometry/geometry.js.map +1 -0
  378. package/dist/components/builtins/geometry/shape-outline.d.ts +93 -0
  379. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
  380. package/dist/components/builtins/geometry/shape-outline.js +470 -0
  381. package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
  382. package/dist/components/builtins/layout/layout.d.ts +186 -0
  383. package/dist/components/builtins/layout/layout.d.ts.map +1 -0
  384. package/dist/components/builtins/layout/layout.js +84 -0
  385. package/dist/components/builtins/layout/layout.js.map +1 -0
  386. package/dist/components/builtins/media/media.d.ts +240 -0
  387. package/dist/components/builtins/media/media.d.ts.map +1 -0
  388. package/dist/components/builtins/media/media.js +143 -0
  389. package/dist/components/builtins/media/media.js.map +1 -0
  390. package/dist/components/builtins/providers/providers.d.ts +47 -0
  391. package/dist/components/builtins/providers/providers.d.ts.map +1 -0
  392. package/dist/components/builtins/providers/providers.js +30 -0
  393. package/dist/components/builtins/providers/providers.js.map +1 -0
  394. package/dist/components/builtins/text/number-format.d.ts +66 -0
  395. package/dist/components/builtins/text/number-format.d.ts.map +1 -0
  396. package/dist/components/builtins/text/number-format.js +227 -0
  397. package/dist/components/builtins/text/number-format.js.map +1 -0
  398. package/dist/components/builtins/text/number-pattern.d.ts +51 -0
  399. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
  400. package/dist/components/builtins/text/number-pattern.js +77 -0
  401. package/dist/components/builtins/text/number-pattern.js.map +1 -0
  402. package/dist/components/builtins/text/text-defaults.d.ts +32 -0
  403. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
  404. package/dist/components/builtins/text/text-defaults.js +37 -0
  405. package/dist/components/builtins/text/text-defaults.js.map +1 -0
  406. package/dist/components/builtins/text/text-layout.d.ts +82 -0
  407. package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
  408. package/dist/components/builtins/text/text-layout.js +331 -0
  409. package/dist/components/builtins/text/text-layout.js.map +1 -0
  410. package/dist/components/builtins/text/text.d.ts +409 -0
  411. package/dist/components/builtins/text/text.d.ts.map +1 -0
  412. package/dist/components/builtins/text/text.js +116 -0
  413. package/dist/components/builtins/text/text.js.map +1 -0
  414. package/dist/components/builtins/three/canvas3d.d.ts +245 -0
  415. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
  416. package/dist/components/builtins/three/canvas3d.js +21 -0
  417. package/dist/components/builtins/three/canvas3d.js.map +1 -0
  418. package/dist/components/builtins/three/grid-geometry3d.d.ts +62 -0
  419. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
  420. package/dist/components/builtins/three/grid-geometry3d.js +114 -0
  421. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
  422. package/dist/components/builtins/three/three.d.ts +1889 -0
  423. package/dist/components/builtins/three/three.d.ts.map +1 -0
  424. package/dist/components/builtins/three/three.js +305 -0
  425. package/dist/components/builtins/three/three.js.map +1 -0
  426. package/dist/components/factory/api.d.ts +543 -0
  427. package/dist/components/factory/api.d.ts.map +1 -0
  428. package/dist/components/factory/api.js +4 -0
  429. package/dist/components/factory/api.js.map +1 -0
  430. package/dist/components/factory/clip-of.d.ts +5 -0
  431. package/dist/components/factory/clip-of.d.ts.map +1 -0
  432. package/dist/components/factory/clip-of.js +33 -0
  433. package/dist/components/factory/clip-of.js.map +1 -0
  434. package/dist/components/factory/commands-for.d.ts +19 -0
  435. package/dist/components/factory/commands-for.d.ts.map +1 -0
  436. package/dist/components/factory/commands-for.js +5 -0
  437. package/dist/components/factory/commands-for.js.map +1 -0
  438. package/dist/components/factory/component-audio.d.ts +9 -0
  439. package/dist/components/factory/component-audio.d.ts.map +1 -0
  440. package/dist/components/factory/component-audio.js +18 -0
  441. package/dist/components/factory/component-audio.js.map +1 -0
  442. package/dist/components/factory/component2d.d.ts +8 -0
  443. package/dist/components/factory/component2d.d.ts.map +1 -0
  444. package/dist/components/factory/component2d.js +240 -0
  445. package/dist/components/factory/component2d.js.map +1 -0
  446. package/dist/components/factory/component3d.d.ts +9 -0
  447. package/dist/components/factory/component3d.d.ts.map +1 -0
  448. package/dist/components/factory/component3d.js +107 -0
  449. package/dist/components/factory/component3d.js.map +1 -0
  450. package/dist/components/factory/factory.d.ts +66 -0
  451. package/dist/components/factory/factory.d.ts.map +1 -0
  452. package/dist/components/factory/factory.js +347 -0
  453. package/dist/components/factory/factory.js.map +1 -0
  454. package/dist/components/factory/timeline.d.ts +22 -0
  455. package/dist/components/factory/timeline.d.ts.map +1 -0
  456. package/dist/components/factory/timeline.js +128 -0
  457. package/dist/components/factory/timeline.js.map +1 -0
  458. package/dist/components/factory/type-def.d.ts +26 -0
  459. package/dist/components/factory/type-def.d.ts.map +1 -0
  460. package/dist/components/factory/type-def.js +16 -0
  461. package/dist/components/factory/type-def.js.map +1 -0
  462. package/dist/components/factory/types.d.ts +91 -0
  463. package/dist/components/factory/types.d.ts.map +1 -0
  464. package/dist/components/factory/types.js +88 -0
  465. package/dist/components/factory/types.js.map +1 -0
  466. package/dist/components/factory/views.d.ts +121 -0
  467. package/dist/components/factory/views.d.ts.map +1 -0
  468. package/dist/components/factory/views.js +413 -0
  469. package/dist/components/factory/views.js.map +1 -0
  470. package/dist/components/modules/aim.d.ts +30 -0
  471. package/dist/components/modules/aim.d.ts.map +1 -0
  472. package/dist/components/modules/aim.js +39 -0
  473. package/dist/components/modules/aim.js.map +1 -0
  474. package/dist/components/modules/corners.d.ts +13 -0
  475. package/dist/components/modules/corners.d.ts.map +1 -0
  476. package/dist/components/modules/corners.js +12 -0
  477. package/dist/components/modules/corners.js.map +1 -0
  478. package/dist/components/modules/flow.d.ts +26 -0
  479. package/dist/components/modules/flow.d.ts.map +1 -0
  480. package/dist/components/modules/flow.js +57 -0
  481. package/dist/components/modules/flow.js.map +1 -0
  482. package/dist/components/modules/material.d.ts +40 -0
  483. package/dist/components/modules/material.d.ts.map +1 -0
  484. package/dist/components/modules/material.js +75 -0
  485. package/dist/components/modules/material.js.map +1 -0
  486. package/dist/components/modules/paint.d.ts +71 -0
  487. package/dist/components/modules/paint.d.ts.map +1 -0
  488. package/dist/components/modules/paint.js +106 -0
  489. package/dist/components/modules/paint.js.map +1 -0
  490. package/dist/components/modules/shapes.d.ts +31 -0
  491. package/dist/components/modules/shapes.d.ts.map +1 -0
  492. package/dist/components/modules/shapes.js +43 -0
  493. package/dist/components/modules/shapes.js.map +1 -0
  494. package/dist/components/modules/text-layout.d.ts +26 -0
  495. package/dist/components/modules/text-layout.d.ts.map +1 -0
  496. package/dist/components/modules/text-layout.js +57 -0
  497. package/dist/components/modules/text-layout.js.map +1 -0
  498. package/dist/components/modules/text-style.d.ts +48 -0
  499. package/dist/components/modules/text-style.d.ts.map +1 -0
  500. package/dist/components/modules/text-style.js +63 -0
  501. package/dist/components/modules/text-style.js.map +1 -0
  502. package/dist/components/modules/three-entries.d.ts +23 -0
  503. package/dist/components/modules/three-entries.d.ts.map +1 -0
  504. package/dist/components/modules/three-entries.js +41 -0
  505. package/dist/components/modules/three-entries.js.map +1 -0
  506. package/dist/components/modules/view3d.d.ts +59 -0
  507. package/dist/components/modules/view3d.d.ts.map +1 -0
  508. package/dist/components/modules/view3d.js +171 -0
  509. package/dist/components/modules/view3d.js.map +1 -0
  510. package/dist/components/trees/2d/group-bounds.d.ts +56 -0
  511. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
  512. package/dist/components/trees/2d/group-bounds.js +87 -0
  513. package/dist/components/trees/2d/group-bounds.js.map +1 -0
  514. package/dist/components/trees/2d/node-lifecycle.d.ts +46 -0
  515. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
  516. package/dist/components/trees/2d/node-lifecycle.js +264 -0
  517. package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
  518. package/dist/components/trees/2d/node-motion.d.ts +56 -0
  519. package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
  520. package/dist/components/trees/2d/node-motion.js +86 -0
  521. package/dist/components/trees/2d/node-motion.js.map +1 -0
  522. package/dist/components/trees/2d/node-render.d.ts +36 -0
  523. package/dist/components/trees/2d/node-render.d.ts.map +1 -0
  524. package/dist/components/trees/2d/node-render.js +67 -0
  525. package/dist/components/trees/2d/node-render.js.map +1 -0
  526. package/dist/components/trees/2d/node-space.d.ts +63 -0
  527. package/dist/components/trees/2d/node-space.d.ts.map +1 -0
  528. package/dist/components/trees/2d/node-space.js +131 -0
  529. package/dist/components/trees/2d/node-space.js.map +1 -0
  530. package/dist/components/trees/2d/node-transform.d.ts +55 -0
  531. package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
  532. package/dist/components/trees/2d/node-transform.js +73 -0
  533. package/dist/components/trees/2d/node-transform.js.map +1 -0
  534. package/dist/components/trees/2d/node2d.d.ts +1020 -0
  535. package/dist/components/trees/2d/node2d.d.ts.map +1 -0
  536. package/dist/components/trees/2d/node2d.js +1481 -0
  537. package/dist/components/trees/2d/node2d.js.map +1 -0
  538. package/dist/components/trees/audio/index.d.ts +2 -0
  539. package/dist/components/trees/audio/index.d.ts.map +1 -0
  540. package/dist/components/trees/audio/index.js +2 -0
  541. package/dist/components/trees/audio/index.js.map +1 -0
  542. package/dist/components/trees/audio/node-audio.d.ts +116 -0
  543. package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
  544. package/dist/components/trees/audio/node-audio.js +171 -0
  545. package/dist/components/trees/audio/node-audio.js.map +1 -0
  546. package/dist/components/trees/index.d.ts +10 -0
  547. package/dist/components/trees/index.d.ts.map +1 -0
  548. package/dist/components/trees/index.js +14 -0
  549. package/dist/components/trees/index.js.map +1 -0
  550. package/dist/components/trees/node/node-editor-state.d.ts +53 -0
  551. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
  552. package/dist/components/trees/node/node-editor-state.js +23 -0
  553. package/dist/components/trees/node/node-editor-state.js.map +1 -0
  554. package/dist/components/trees/node/node-reactive.d.ts +89 -0
  555. package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
  556. package/dist/components/trees/node/node-reactive.js +135 -0
  557. package/dist/components/trees/node/node-reactive.js.map +1 -0
  558. package/dist/components/trees/node/node-time.d.ts +39 -0
  559. package/dist/components/trees/node/node-time.d.ts.map +1 -0
  560. package/dist/components/trees/node/node-time.js +14 -0
  561. package/dist/components/trees/node/node-time.js.map +1 -0
  562. package/dist/components/trees/node/node-walk.d.ts +46 -0
  563. package/dist/components/trees/node/node-walk.d.ts.map +1 -0
  564. package/dist/components/trees/node/node-walk.js +74 -0
  565. package/dist/components/trees/node/node-walk.js.map +1 -0
  566. package/dist/components/trees/node/node.d.ts +401 -0
  567. package/dist/components/trees/node/node.d.ts.map +1 -0
  568. package/dist/components/trees/node/node.js +680 -0
  569. package/dist/components/trees/node/node.js.map +1 -0
  570. package/dist/components/trees/root/canvas2d-node.d.ts +163 -0
  571. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
  572. package/dist/components/trees/root/canvas2d-node.js +216 -0
  573. package/dist/components/trees/root/canvas2d-node.js.map +1 -0
  574. package/dist/components/trees/three/node3d.d.ts +222 -0
  575. package/dist/components/trees/three/node3d.d.ts.map +1 -0
  576. package/dist/components/trees/three/node3d.js +289 -0
  577. package/dist/components/trees/three/node3d.js.map +1 -0
  578. package/dist/document/builtins.js +13 -13
  579. package/dist/document/builtins.js.map +1 -1
  580. package/dist/document/command-traits.d.ts +14 -4
  581. package/dist/document/command-traits.d.ts.map +1 -1
  582. package/dist/document/command-traits.js +35 -7
  583. package/dist/document/command-traits.js.map +1 -1
  584. package/dist/document/deny-globals.d.ts +2 -2
  585. package/dist/document/deny-globals.js +2 -2
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/expression/index.d.ts +1 -1
  588. package/dist/document/expression/index.js +1 -1
  589. package/dist/document/expression/index.js.map +1 -1
  590. package/dist/document/expression/ops.js +1 -1
  591. package/dist/document/expression/ops.js.map +1 -1
  592. package/dist/document/index.d.ts +9 -2
  593. package/dist/document/index.d.ts.map +1 -1
  594. package/dist/document/index.js +5 -2
  595. package/dist/document/index.js.map +1 -1
  596. package/dist/document/migrate.d.ts +70 -0
  597. package/dist/document/migrate.d.ts.map +1 -0
  598. package/dist/document/migrate.js +202 -0
  599. package/dist/document/migrate.js.map +1 -0
  600. package/dist/document/missing-node.d.ts +27 -0
  601. package/dist/document/missing-node.d.ts.map +1 -0
  602. package/dist/document/missing-node.js +48 -0
  603. package/dist/document/missing-node.js.map +1 -0
  604. package/dist/document/node-decorator.d.ts +14 -10
  605. package/dist/document/node-decorator.d.ts.map +1 -1
  606. package/dist/document/node-decorator.js +14 -10
  607. package/dist/document/node-decorator.js.map +1 -1
  608. package/dist/document/node-descriptor.d.ts +7 -3
  609. package/dist/document/node-descriptor.d.ts.map +1 -1
  610. package/dist/document/node-descriptor.js.map +1 -1
  611. package/dist/document/placement.d.ts +2 -1
  612. package/dist/document/placement.d.ts.map +1 -1
  613. package/dist/document/placement.js.map +1 -1
  614. package/dist/document/project.d.ts +2 -0
  615. package/dist/document/project.d.ts.map +1 -1
  616. package/dist/document/project.js +1 -0
  617. package/dist/document/project.js.map +1 -1
  618. package/dist/document/prop-evolution.d.ts +51 -0
  619. package/dist/document/prop-evolution.d.ts.map +1 -0
  620. package/dist/document/prop-evolution.js +83 -0
  621. package/dist/document/prop-evolution.js.map +1 -0
  622. package/dist/document/registry.d.ts +39 -25
  623. package/dist/document/registry.d.ts.map +1 -1
  624. package/dist/document/registry.js +41 -21
  625. package/dist/document/registry.js.map +1 -1
  626. package/dist/document/settled-index.d.ts +2 -0
  627. package/dist/document/settled-index.d.ts.map +1 -1
  628. package/dist/document/settled-index.js +5 -5
  629. package/dist/document/settled-index.js.map +1 -1
  630. package/dist/document/timeline-patch.d.ts +4 -0
  631. package/dist/document/timeline-patch.d.ts.map +1 -1
  632. package/dist/document/timeline-patch.js +28 -3
  633. package/dist/document/timeline-patch.js.map +1 -1
  634. package/dist/document/timeline.d.ts +48 -4
  635. package/dist/document/timeline.d.ts.map +1 -1
  636. package/dist/document/timeline.js +174 -44
  637. package/dist/document/timeline.js.map +1 -1
  638. package/dist/document/types.d.ts +18 -32
  639. package/dist/document/types.d.ts.map +1 -1
  640. package/dist/document/types.js.map +1 -1
  641. package/dist/document/validate.d.ts +18 -6
  642. package/dist/document/validate.d.ts.map +1 -1
  643. package/dist/document/validate.js +158 -21
  644. package/dist/document/validate.js.map +1 -1
  645. package/dist/document/vocabulary.d.ts +28 -0
  646. package/dist/document/vocabulary.d.ts.map +1 -0
  647. package/dist/document/vocabulary.js +42 -0
  648. package/dist/document/vocabulary.js.map +1 -0
  649. package/dist/experimental.d.ts +79 -19
  650. package/dist/experimental.d.ts.map +1 -1
  651. package/dist/experimental.js +31 -17
  652. package/dist/experimental.js.map +1 -1
  653. package/dist/index.d.ts +10 -11
  654. package/dist/index.d.ts.map +1 -1
  655. package/dist/index.js +10 -11
  656. package/dist/index.js.map +1 -1
  657. package/dist/layout/types.d.ts +1 -1
  658. package/dist/layout/types.js.map +1 -1
  659. package/dist/platform/exporter.d.ts +13 -0
  660. package/dist/platform/exporter.d.ts.map +1 -1
  661. package/dist/platform/exporter.js.map +1 -1
  662. package/dist/props/host.d.ts +1 -1
  663. package/dist/props/host.js.map +1 -1
  664. package/dist/props/slot.d.ts +1 -1
  665. package/dist/props/slot.js +1 -1
  666. package/dist/props/slot.js.map +1 -1
  667. package/dist/renamed-scene-names.d.ts +1 -1
  668. package/dist/renamed-scene-names.d.ts.map +1 -1
  669. package/dist/renamed-scene-names.js +1 -1
  670. package/dist/renamed-scene-names.js.map +1 -1
  671. package/dist/render/canvas-render-context2d.d.ts +9 -0
  672. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  673. package/dist/render/canvas-render-context2d.js +10 -0
  674. package/dist/render/canvas-render-context2d.js.map +1 -1
  675. package/dist/render/clip-contains.js +1 -1
  676. package/dist/render/clip-contains.js.map +1 -1
  677. package/dist/render/clip.d.ts +1 -1
  678. package/dist/render/clip.js +1 -1
  679. package/dist/render/clip.js.map +1 -1
  680. package/dist/render/descriptors/rect.js.map +1 -1
  681. package/dist/render/descriptors/text.d.ts +13 -7
  682. package/dist/render/descriptors/text.d.ts.map +1 -1
  683. package/dist/render/descriptors/text.js +9 -3
  684. package/dist/render/descriptors/text.js.map +1 -1
  685. package/dist/render/index.d.ts +2 -0
  686. package/dist/render/index.d.ts.map +1 -1
  687. package/dist/render/index.js +1 -0
  688. package/dist/render/index.js.map +1 -1
  689. package/dist/render/render-context2d.d.ts +3 -3
  690. package/dist/render/render-context2d.js.map +1 -1
  691. package/dist/render/render-issue.d.ts +39 -0
  692. package/dist/render/render-issue.d.ts.map +1 -0
  693. package/dist/render/render-issue.js +29 -0
  694. package/dist/render/render-issue.js.map +1 -0
  695. package/dist/render/surface.d.ts +2 -2
  696. package/dist/render/surface.js.map +1 -1
  697. package/dist/render3d/builders.d.ts +1 -1
  698. package/dist/render3d/builders.js +1 -1
  699. package/dist/render3d/builders.js.map +1 -1
  700. package/dist/render3d/graphics3d.d.ts +13 -19
  701. package/dist/render3d/graphics3d.d.ts.map +1 -1
  702. package/dist/render3d/graphics3d.js +67 -24
  703. package/dist/render3d/graphics3d.js.map +1 -1
  704. package/dist/render3d/scene3d.d.ts +1 -1
  705. package/dist/render3d/scene3d.js +1 -1
  706. package/dist/render3d/scene3d.js.map +1 -1
  707. package/dist/render3d/texture.d.ts +2 -2
  708. package/dist/render3d/texture.d.ts.map +1 -1
  709. package/dist/render3d/texture.js.map +1 -1
  710. package/dist/render3d/vector3.d.ts +2 -2
  711. package/dist/render3d/vector3.js +2 -2
  712. package/dist/render3d/vector3.js.map +1 -1
  713. package/dist/runtime/asset-refine.d.ts +1 -1
  714. package/dist/runtime/asset-refine.d.ts.map +1 -1
  715. package/dist/runtime/asset-refine.js +3 -2
  716. package/dist/runtime/asset-refine.js.map +1 -1
  717. package/dist/runtime/asset-timeline.d.ts +10 -0
  718. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  719. package/dist/runtime/asset-timeline.js.map +1 -1
  720. package/dist/runtime/asset-update.d.ts.map +1 -1
  721. package/dist/runtime/asset-update.js +8 -1
  722. package/dist/runtime/asset-update.js.map +1 -1
  723. package/dist/runtime/audio-index.d.ts +0 -11
  724. package/dist/runtime/audio-index.d.ts.map +1 -1
  725. package/dist/runtime/audio-index.js +0 -25
  726. package/dist/runtime/audio-index.js.map +1 -1
  727. package/dist/runtime/clip-instance.d.ts +6 -4
  728. package/dist/runtime/clip-instance.d.ts.map +1 -1
  729. package/dist/runtime/clip-instance.js +8 -4
  730. package/dist/runtime/clip-instance.js.map +1 -1
  731. package/dist/runtime/clip-store.d.ts +2 -3
  732. package/dist/runtime/clip-store.d.ts.map +1 -1
  733. package/dist/runtime/clip-store.js +34 -37
  734. package/dist/runtime/clip-store.js.map +1 -1
  735. package/dist/runtime/engine.d.ts +8 -6
  736. package/dist/runtime/engine.d.ts.map +1 -1
  737. package/dist/runtime/engine.js +4 -3
  738. package/dist/runtime/engine.js.map +1 -1
  739. package/dist/runtime/node-picking.d.ts +2 -2
  740. package/dist/runtime/node-picking.d.ts.map +1 -1
  741. package/dist/runtime/node-picking.js +3 -3
  742. package/dist/runtime/node-picking.js.map +1 -1
  743. package/dist/runtime/node-picking3d.d.ts +2 -2
  744. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  745. package/dist/runtime/node-picking3d.js +1 -1
  746. package/dist/runtime/node-picking3d.js.map +1 -1
  747. package/dist/runtime/playback-controller.d.ts +2 -2
  748. package/dist/runtime/playback-controller.d.ts.map +1 -1
  749. package/dist/runtime/playback-controller.js +15 -5
  750. package/dist/runtime/playback-controller.js.map +1 -1
  751. package/dist/runtime/session.d.ts +7 -3
  752. package/dist/runtime/session.d.ts.map +1 -1
  753. package/dist/runtime/session.js +11 -4
  754. package/dist/runtime/session.js.map +1 -1
  755. package/dist/runtime/state-evaluator.d.ts +2 -2
  756. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  757. package/dist/runtime/state-evaluator.js.map +1 -1
  758. package/dist/runtime/text-geometry.d.ts +2 -2
  759. package/dist/runtime/text-geometry.d.ts.map +1 -1
  760. package/dist/runtime/text-geometry.js +4 -5
  761. package/dist/runtime/text-geometry.js.map +1 -1
  762. package/dist/sdk/index.d.ts +50 -44
  763. package/dist/sdk/index.d.ts.map +1 -1
  764. package/dist/sdk/index.js +35 -29
  765. package/dist/sdk/index.js.map +1 -1
  766. package/dist/tween/command-decorator.d.ts +14 -9
  767. package/dist/tween/command-decorator.d.ts.map +1 -1
  768. package/dist/tween/command-decorator.js +3 -2
  769. package/dist/tween/command-decorator.js.map +1 -1
  770. package/dist/tween/command.d.ts +1 -1
  771. package/dist/tween/command.js.map +1 -1
  772. package/dist/tween/ease/describe.d.ts +2 -0
  773. package/dist/tween/ease/describe.d.ts.map +1 -1
  774. package/dist/tween/ease/describe.js +4 -0
  775. package/dist/tween/ease/describe.js.map +1 -1
  776. package/dist/tween/ease/spec.d.ts +31 -0
  777. package/dist/tween/ease/spec.d.ts.map +1 -0
  778. package/dist/tween/ease/spec.js +51 -0
  779. package/dist/tween/ease/spec.js.map +1 -0
  780. package/dist/tween/index.d.ts +3 -1
  781. package/dist/tween/index.d.ts.map +1 -1
  782. package/dist/tween/index.js +2 -1
  783. package/dist/tween/index.js.map +1 -1
  784. package/dist/tween/loop.d.ts +1 -1
  785. package/dist/tween/loop.js +1 -1
  786. package/dist/tween/loop.js.map +1 -1
  787. package/dist/util/reference.d.ts +6 -6
  788. package/dist/util/reference.js.map +1 -1
  789. package/package.json +3 -11
  790. package/dist/browser/chunks/chunk-2RIYH36X.js +0 -3
  791. package/dist/browser/chunks/chunk-2RIYH36X.js.map +0 -7
  792. package/dist/browser/chunks/chunk-DDJN3QII.js +0 -15
  793. package/dist/browser/chunks/chunk-DDJN3QII.js.map +0 -7
  794. package/dist/browser/chunks/chunk-DHB4COFY.js +0 -2
  795. package/dist/browser/chunks/chunk-EJDPYDQI.js +0 -5
  796. package/dist/browser/chunks/chunk-EJDPYDQI.js.map +0 -7
  797. package/dist/browser/chunks/chunk-SFNJRPBV.js +0 -2
  798. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +0 -7
  799. package/dist/browser/chunks/chunk-XAWE4EAK.js +0 -2
  800. package/dist/browser/chunks/chunk-XAWE4EAK.js.map +0 -7
  801. package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
  802. package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
  803. package/dist/browser/jsx-jsx-runtime.js +0 -2
  804. package/dist/browser/jsx-jsx-runtime.js.map +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,wEAAwE;AACxE,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,oCAAoC;AAEpC,gEAAgE;AAChE,UAAU;AACV,EAAE;AACF,4EAA4E;AAC5E,yEAAyE;AACzE,iFAAiF;AACjF,iFAAiF;AACjF,sDAAsD;AACtD,gEAAgE;AAChE,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AAKrB,iFAAiF;AACjF,4EAA4E;AAC5E,0EAA0E;AAC1E,0DAA0D;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA2BnD,gEAAgE;AAChE,oBAAoB;AACpB,EAAE;AACF,2EAA2E;AAC3E,0EAA0E;AAC1E,+EAA+E;AAC/E,kCAAkC;AAClC,gEAAgE;AAChE,OAAO,EACH,gBAAgB,EAChB,mBAAmB;AACnB,kEAAkE;AAClE,oEAAoE;AACpE,+DAA+D;AAC/D,QAAQ,GACX,MAAM,aAAa,CAAC;AACrB,gFAAgF;AAChF,mCAAmC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A8E;AAC9E,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,2EAA2E;AAC3E,2EAA2E;AAC3E,0CAA0C;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface published as `@motionscript/sdk` (packages/sdk) and,\r\n// via this file, as `@motionscript/core/sdk`. A deliberate SUBSET of core's own\r\n// root barrel (`../index.ts`): no `Engine`/`Session`/platform seams, no\r\n// `@internal`-tagged descriptor plumbing. Every export here is named, traced to\r\n// its real declaring sub-barrel — never a wildcard — so nothing internal leaks\r\n// by accident. Keep this in lockstep with `packages/sdk/src/index.ts`, which\r\n// mirrors this exact named surface.\r\n\r\n// =============================================================\r\n// Project\r\n//\r\n// A clip is **data**: a still is nodes and props, a composition is the same\r\n// nodes placed in time plus the commands that animate them, and an audio\r\n// document is that one tree over. A **project** is one list of tracks over those\r\n// clips, and it is what the runtime plays — a lone still or composition is sugar\r\n// for a project with one track (`asProjectDocument`).\r\n// =============================================================\r\nexport {\r\n isProjectDocument,\r\n asProjectDocument,\r\n documentDuration,\r\n commandSpan,\r\n hasTimeline,\r\n nodeSpan,\r\n effectiveSpan,\r\n untimed,\r\n ROOT_NODE_ID,\r\n} from '../document';\r\nexport type {\r\n ProjectDocument,\r\n Track,\r\n} from '../document';\r\n// `resolveProjectDocument`/`placeTracks` genuinely live in `../runtime` (session\r\n// resolution and track placement are runtime concerns) — deep-imported from\r\n// their concrete files rather than the runtime barrel, which also carries\r\n// `Engine`/`Session` and is never a source for this file.\r\nexport { resolveProjectDocument } from '../runtime/session';\r\nexport { placeTracks } from '../runtime/placement';\r\nexport type { TrackSpan } from '../runtime/placement';\r\nexport type {\r\n Theme,\r\n ColorTokens,\r\n Typography,\r\n TypographyPreset,\r\n} from '../project';\r\nexport type { NodeTime, AttachScope } from '../nodes';\r\nexport type { BoxBounds, Extents } from '../layout';\r\n\r\n// =============================================================\r\n// Assets\r\n//\r\n// The manifest a host builds a scene against — what images, video, audio and\r\n// fonts it references, resolved before render. An `Engine`'s manifest and\r\n// `@motionscript/headless`'s asset options both take this shape.\r\n// =============================================================\r\nexport type {\r\n ImageMeta,\r\n VideoMeta,\r\n AudioMeta,\r\n FontMeta,\r\n AssetMeta,\r\n AssetManifest,\r\n} from '../assets';\r\n\r\n// =============================================================\r\n// The clip document\r\n//\r\n// The data half of the model. Node types are code — a component registered\r\n// under its key, which is also where a custom node joins the system — and\r\n// everything else is plain JSON: which nodes exist, what props they carry, and\r\n// what happens to them over time.\r\n// =============================================================\r\nexport {\r\n validateDocument,\r\n assertValidDocument,\r\n // The code half of the model, as one object an engine owns. Not a\r\n // singleton: what a document can name is a property of the registry\r\n // compiling it, so two engines in one process disagree freely.\r\n Registry,\r\n} from '../document';\r\n// The shader-pack vocabulary lives beside the rest of the fill/shader attribute\r\n// machinery, not in `../document`.\r\nexport {\r\n normalizeShaderPack,\r\n resolveShaderProperties,\r\n isKnownShaderProperty,\r\n} from '../attributes';\r\nexport type {\r\n RegistryOptions,\r\n NodeTypeMap,\r\n ShaderPackMap,\r\n NodeTypeRecord,\r\n NodeCommandEntry,\r\n VisualDocument,\r\n ClipDocument,\r\n StillDocument,\r\n CompositionDocument,\r\n AudioDocument,\r\n NodeSpec,\r\n TimedNodeSpec,\r\n NodeSpan,\r\n CommandSpec,\r\n EaseSpec,\r\n LoopSpec,\r\n LoopDirection,\r\n VariableSpec,\r\n ValidationIssue,\r\n ValidationResult,\r\n NodeConstructor,\r\n CommandFactory,\r\n CommandTypeEntry,\r\n VariableCommandFactory,\r\n VariableLerp,\r\n VariableTarget,\r\n} from '../document';\r\nexport type {\r\n Shader,\r\n FillShader,\r\n EffectShader,\r\n ShaderProperty,\r\n KnownShaderProperty,\r\n ShaderPropertyValues,\r\n} from '../attributes';\r\n\r\n// Expressions: the string form of a prop that follows a variable — `\"=4[g]+3\"`.\r\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint,\r\n// complete or rewrite one without reimplementing the grammar.\r\nexport { expressionOps, ExpressionError } from '../document';\r\nexport type {\r\n ParsedExpression,\r\n ExpressionNode,\r\n ExpressionDialect,\r\n VariableResolver,\r\n} from '../document';\r\n\r\n// =============================================================\r\n// Components — the factories a node type is written with\r\n//\r\n// A component is one object literal: `key`, `state`, `commands`, `children`\r\n// and its tree's own fields (`measure`/`layout`/`render` for 2D). Behaviour is\r\n// spread in from modules (`...Paint.state`, `...Paint.commands`) and their\r\n// helpers called (`Paint.draw`, `Flow.measure`). See\r\n// `experiments/component-syntax/README.md`.\r\n// =============================================================\r\nexport { component2d } from '../component/component2d';\r\nexport { componentAudio } from '../component/component-audio';\r\nexport { component3d } from '../component/component3d';\r\nexport { commandsFor } from '../component/commands-for';\r\nexport { Types } from '../component/types';\r\nexport { provides } from '../component/api';\r\nexport * as Paint from '../component/modules/paint';\r\nexport * as Flow from '../component/modules/flow';\r\nexport * as Shapes from '../component/modules/shapes';\r\nexport * as Aim from '../component/modules/aim';\r\n// The face text is set in: its entries inherit from the nearest provider.\r\nexport * as Typeface from '../component/modules/text-style';\r\nexport * as TextLayout from '../component/modules/text-layout';\r\n// A mesh's surface: the material entries, and the mesh drawn with them.\r\nexport * as Material from '../component/modules/material';\r\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\r\nexport * as View3D from '../component/modules/view3d';\r\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../component/types';\r\nexport type {\r\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\r\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\r\n Timeline, Type, Values, Writes,\r\n // Named in every component's type, so a package exporting one can declare it.\r\n Merge,\r\n // What `render` is handed; `RenderContext2D` is the renderer's.\r\n RenderContext2D as RenderContext,\r\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\r\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\r\n RenderContext3D as SceneContext,\r\n} from '../component/api';\r\n\r\n// =============================================================\r\n// Nodes — what code holding a built node names it as\r\n//\r\n// `Node` is dimension-agnostic (tree, props, tweens, context, clock); `Node2D`\r\n// adds layout and 2D drawing; `Node3D` and `NodeAudio` are the other trees.\r\n// Types only: a node type is a component, never a subclass.\r\n// =============================================================\r\nexport type { Node, Node2D } from '../nodes';\r\nexport {\r\n // A clip's root container: layout frame, background paint and camera in\r\n // one node. Every track builds into one sized to the viewport.\r\n Canvas2D,\r\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\r\n findNode2D,\r\n frameIn,\r\n} from '../nodes';\r\nexport { Provider, ThemeProvider } from '../component/builtins/providers';\r\nexport type {\r\n NodeProps,\r\n Node2DProps,\r\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\r\n ChildPlacement,\r\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\r\n ChildPlane,\r\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\r\n NodeHandle,\r\n Canvas2DProps,\r\n NodeConfig,\r\n NodeChildren,\r\n NodeDimension,\r\n ProviderProps,\r\n ThemeProviderProps,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Geometry\r\n// =============================================================\r\nexport {\r\n Rect,\r\n Ellipse,\r\n Path,\r\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\r\n // where `Path` draws its `d` at face value.\r\n PathShape,\r\n Polygon,\r\n Polygram,\r\n Triangle,\r\n RightTriangle,\r\n Pentagon,\r\n Hexagon,\r\n Octagon,\r\n Star,\r\n} from '../component/builtins/geometry';\r\nexport { BooleanGroup, MaskGroup } from '../component/builtins/composite';\r\nexport type {\r\n PaintProps,\r\n ShapeProps,\r\n RectProps,\r\n FlexSize,\r\n EllipseProps,\r\n PathProps,\r\n PathShapeProps,\r\n PolygonProps,\r\n PolygramProps,\r\n BooleanGroupProps,\r\n MaskGroupProps,\r\n} from '../nodes';\r\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\r\n// not node-prop types.\r\nexport type {\r\n BooleanOperation,\r\n MaskMode,\r\n MaskOptions,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Layout\r\n// =============================================================\r\nexport {\r\n Camera,\r\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\r\n OrbitCamera,\r\n RotatedBox,\r\n} from '../component/builtins/layout';\r\nexport type {\r\n CameraProps,\r\n OrbitCameraProps,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Text\r\n// =============================================================\r\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../component/builtins/text';\r\nexport { TextSelection } from '../nodes';\r\nexport type {\r\n TextProps,\r\n RichTextProps,\r\n NumberProps,\r\n NumberFormat,\r\n DefaultTextStyleProps,\r\n TextSelectionProps,\r\n TextRange,\r\n SelectionOverrides,\r\n} from '../nodes';\r\nexport { textOps } from '../attributes';\r\nexport type {\r\n TextStyle,\r\n TextAlign,\r\n VerticalAlign,\r\n TextDecoration,\r\n TextCase,\r\n TextSpan,\r\n TextRun,\r\n FontStyle,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Media\r\n// =============================================================\r\nexport { Video } from '../component/builtins/media';\r\nexport type {\r\n VideoProps,\r\n VideoSegment,\r\n} from '../nodes';\r\n\r\n// =============================================================\r\n// Nodes — Audio\r\n// =============================================================\r\n// `SoundNode` plays a clip and `AudioBus` groups what feeds it — the third\r\n// scene graph, beside `Node2D` and `Node3D`. Levels are `Param`, so a fade is a\r\n// curve (`fadeIn`/`fadeOut`/`ramp`/`hold`) rather than a `to()`: sound is\r\n// scheduled once, ahead of time, not written once per frame.\r\nexport type { NodeAudio } from '../nodes';\r\nexport { AudioBus, SoundNode } from '../component/builtins/audio';\r\nexport {\r\n Sound,\r\n AudioFilters,\r\n ramp,\r\n hold,\r\n fadeIn,\r\n fadeOut,\r\n isCurve,\r\n} from '../attributes';\r\nexport type {\r\n NodeAudioProps,\r\n AudioBusProps,\r\n SoundNodeProps,\r\n} from '../nodes';\r\nexport type {\r\n SoundProps,\r\n AudioRequest,\r\n // What a node's `declareAudio` is handed, and the clip it declares into it.\r\n AudioScope,\r\n AudioClip,\r\n AudioBusStop,\r\n AudioFilter,\r\n Param,\r\n Curve,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// 3D — the Canvas3D node and the Graphics3D API\r\n// =============================================================\r\n// There is one 3D node; everything inside it is described with `Graphics3D`.\r\n// `Geo`/`Mat`/`Tex` build the geometry/material/texture descriptors, and the lerps\r\n// are what make a Vector3/Euler/Quaternion prop interpolate rather than snap.\r\n// `Surface2D` is the 2D→3D bridge: a child of `Canvas3D` whose 2D content is\r\n// rasterized offscreen and bound to a material by `Tex.surface(name)`.\r\nexport { Canvas3D } from '../component/builtins/canvas3d';\r\nexport type { Node3D } from '../nodes';\r\n// The 3D scene graph: components, each placed by its transform.\r\nexport {\r\n Group3D,\r\n Mesh3D,\r\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\r\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\r\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\r\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\r\n PointLight3D, SpotLight3D, AreaLight3D,\r\n Camera3D,\r\n Fog3D, Environment3D,\r\n} from '../component/builtins/three';\r\nexport {\r\n Graphics3D,\r\n Scene3D,\r\n RenderContext3D,\r\n Geo,\r\n Mat,\r\n Tex,\r\n lerpVector3,\r\n lerpEuler3,\r\n slerpQuaternion,\r\n quaternionFromEuler,\r\n normalizeQuaternion,\r\n resolveVector3,\r\n evaluateParametric,\r\n evaluateRoundedBox,\r\n resolveSurfaceSource,\r\n resolveFill3D,\r\n segmentsOf,\r\n resolveCameraPlacement,\r\n resolveShadows3D,\r\n shadowCasts,\r\n shadowReceives,\r\n} from '../render3d';\r\nexport type {\r\n Canvas3DProps,\r\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\r\n ChildSpace3D,\r\n Node3DProps, Group3DProps, Mesh3DProps, Material3DProps,\r\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\r\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\r\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\r\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\r\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\r\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\r\n Camera3DProps,\r\n Fog3DProps, Environment3DProps,\r\n} from '../nodes';\r\nexport type {\r\n Node3DRenderState,\r\n Graphics3DOp,\r\n Scene3DOp,\r\n Vector3,\r\n Vector3Input,\r\n Euler3,\r\n EulerOrder,\r\n Quaternion,\r\n Transform3D,\r\n Shadow3D,\r\n ShadowOptions3D,\r\n Faces3D,\r\n Blend3D,\r\n Shading3D,\r\n Segments3D,\r\n Sweep3D,\r\n Bevel3D,\r\n Fill3D,\r\n Geometry3D,\r\n BufferGeometry3D,\r\n Material3D,\r\n MaterialCommon3D,\r\n MeshShorthand3D,\r\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\r\n MaterialShorthand3D,\r\n Uniform3D,\r\n Texture3D,\r\n TextureOptions3D,\r\n SurfaceTexture3D,\r\n SurfaceSource3D,\r\n ResolvedSurfaceSource,\r\n LightData3D,\r\n CameraData3D,\r\n FogData3D,\r\n EnvironmentData3D,\r\n Shadows3D,\r\n ShadowSettings3D,\r\n ToneMapping3D,\r\n ToneSettings3D,\r\n PostEffect3D,\r\n LineMode3D,\r\n LineStroke3D,\r\n ModelAnimation3D,\r\n} from '../render3d';\r\n\r\n// =============================================================\r\n// Rendering — Graphics2D builder, RenderContext2D & asset declaration\r\n// =============================================================\r\nexport {\r\n Graphics2D,\r\n PathBuilder,\r\n Clip,\r\n toPathString,\r\n} from '../render';\r\nexport type {\r\n RenderContext2D,\r\n RenderPass2D,\r\n MeasureContext2D,\r\n TextBlockSource,\r\n // One recorded entry of `Graphics2D.ops()`.\r\n GraphicsOp,\r\n PathData,\r\n PathCommand,\r\n PathBounds,\r\n EllipseArc,\r\n} from '../render';\r\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\r\nexport type { AssetScope, LoaderFn } from '../assets';\r\n\r\n// =============================================================\r\n// Fill & Color\r\n// =============================================================\r\nexport {\r\n Fills,\r\n parseColor,\r\n resolveFill,\r\n fillOps,\r\n colorOps,\r\n} from '../attributes';\r\nexport type {\r\n Fill,\r\n FillChain,\r\n FillOptions,\r\n VideoFillOptions,\r\n // Placement of an image/video source inside the shape it paints:\r\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\r\n MediaPlacementOptions,\r\n ImageFit,\r\n ImageCrop,\r\n ImageMatrix,\r\n FillResolved,\r\n // A custom SkSL shader as a fill. `coords` picks what `fragCoord` means;\r\n // uniforms are keyed by their declared name, and a `ShaderTexture` binds an\r\n // image to a `uniform shader` declaration.\r\n ShaderFillProp,\r\n ShaderFillResolved,\r\n ShaderFillCoords,\r\n ShaderTexture,\r\n SkSLUniformRecord,\r\n FractalNoiseBasis,\r\n // The colour type every fill, stroke, shadow and 3D material accepts —\r\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\r\n // pre-normalized RGBA tuple.\r\n Color,\r\n NormalizedColor,\r\n BlendMode,\r\n FillSpace,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Shape Attributes — Stroke, Shadow, Corners\r\n// =============================================================\r\nexport {\r\n resolveStroke,\r\n strokeOps,\r\n resolveShadow,\r\n shadowOps,\r\n resolveCorners,\r\n cornerRadiusOps,\r\n cornerStyleOps,\r\n // Parsing, measuring, sampling, trimming and morphing a path, and the\r\n // anchor model (`VectorPath`) a pen tool edits.\r\n pathOps,\r\n} from '../attributes';\r\nexport type {\r\n PathSampler,\r\n PathAnchor,\r\n PathSubpath,\r\n VectorPath,\r\n Stroke,\r\n StrokeProp,\r\n StrokeAlign,\r\n StrokeCap,\r\n StrokeMarker,\r\n StrokeEnd,\r\n StrokeJoin,\r\n StrokeResolved,\r\n Shadow,\r\n ShadowProp,\r\n ShadowResolved,\r\n Corners,\r\n CornerStyle,\r\n CornerStyleResolved,\r\n CornerRadiusResolved,\r\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\r\n RectCornerRadius,\r\n RectCornerStyle,\r\n NodeEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Layout Attributes — Vector2, Size, Insets, Alignment, Flow\r\n//\r\n// `flowOps` is the layout a container runs on its children, as plain data in\r\n// and boxes out — so a custom node can lay out what it draws the same way.\r\n// =============================================================\r\nexport {\r\n lerpVector2,\r\n sizeInputOps,\r\n insetsOps,\r\n alignmentOps,\r\n} from '../attributes';\r\n// `flowOps` itself is the layout package's, not the attribute layer's —\r\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\r\nexport { flowOps } from '../layout';\r\nexport type {\r\n Vector2,\r\n Size2D,\r\n Insets,\r\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\r\n InsetsProps,\r\n InsetsResolved,\r\n AlignmentKey,\r\n Alignment,\r\n} from '../attributes';\r\nexport type {\r\n FlowMode,\r\n GapSize,\r\n FlowResolved,\r\n FlowProps,\r\n FlowSettings,\r\n LayoutItem,\r\n FlowSpace,\r\n FlowMeasure,\r\n FlowLine,\r\n // What an overriding `measure(constraints, scope)` is handed.\r\n SizeConstraints,\r\n} from '../layout';\r\n\r\n// =============================================================\r\n// 2.5D space — the stage's `space3D` camera\r\n//\r\n// `space3dOps` is the camera's own projection, for a host drawing over the\r\n// picture (a gizmo aiming the camera) rather than keeping a copy of it.\r\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D\r\n// space of its own.\r\n// =============================================================\r\nexport { space3dOps } from '../attributes/layout/space3d';\r\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\r\n\r\n// =============================================================\r\n// Effects & Media Adjustments\r\n// =============================================================\r\nexport {\r\n Effects,\r\n EffectChain,\r\n Adjustments,\r\n VideoAdjustments,\r\n AdjustmentChain,\r\n VideoAdjustmentChain,\r\n /** @deprecated Renamed to {@link Adjustments}. Removed in the next major. */\r\n ImageFilters,\r\n /** @deprecated Renamed to {@link VideoAdjustments}. Removed in the next major. */\r\n VideoFilters,\r\n} from '../attributes';\r\n\r\nexport type {\r\n /** The `effects` prop type — what a node actually accepts. */\r\n Effect,\r\n EffectMode,\r\n EffectAxis,\r\n EffectSurface,\r\n EffectOptions,\r\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\r\n ImageAdjustment,\r\n VideoAdjustment,\r\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\r\n EffectAdjustment,\r\n MediaAdjustment,\r\n VideoOnlyAdjustment,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options. Every effect builder takes exactly one argument: one of\r\n * these, or the dominant scalar it wraps.\r\n */\r\nexport type {\r\n BlurOptions,\r\n DirectionalBlurOptions,\r\n GrayscaleOptions,\r\n PixelateOptions,\r\n BulgeOptions,\r\n MagnifyOptions,\r\n BloomOptions,\r\n VintageOptions,\r\n ChromaticAberrationOptions,\r\n InvertOptions,\r\n ScatterOptions,\r\n PosterizeOptions,\r\n MotionBlurOptions,\r\n ShaderEffectOptions,\r\n OutlineOptions,\r\n VignetteOptions,\r\n GrainOptions,\r\n SharpenOptions,\r\n EdgesOptions,\r\n ThresholdOptions,\r\n RadialBlurOptions,\r\n HalftoneOptions,\r\n DitherOptions,\r\n DuotoneOptions,\r\n CurvesOptions,\r\n ColorAdjustmentOptions,\r\n RgbShiftOptions,\r\n ScanlinesOptions,\r\n BlockDisplaceOptions,\r\n BitCrushOptions,\r\n AsciiOptions,\r\n StreakOptions,\r\n GlowOptions,\r\n OilPaintOptions,\r\n WaveOptions,\r\n TwirlOptions,\r\n ProgressiveBlurOptions,\r\n KaleidoscopeOptions,\r\n GlassOptions,\r\n LutOptions,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options for the filters that exist only as filters. Everything\r\n * else on {@link Adjustments} takes the matching effect options above, minus\r\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\r\n * point it at.\r\n */\r\nexport type {\r\n BlurFilterOptions,\r\n GrayscaleFilterOptions,\r\n AlphaFilterOptions,\r\n ExposureFilterOptions,\r\n ColorMatrixFilterOptions,\r\n CurvesFilterOptions,\r\n ColorAdjustmentFilterOptions,\r\n PosterizeTimeFilterOptions,\r\n VideoEchoFilterOptions,\r\n} from '../attributes';\r\n\r\n/** Effect data types, for naming an effect value or building one by hand. */\r\nexport type {\r\n BlurEffect,\r\n DirectionalBlurEffect,\r\n GrayscaleEffect,\r\n PixelateEffect,\r\n BulgeEffect,\r\n MagnifyEffect,\r\n BloomEffect,\r\n VintageEffect,\r\n ChromaticAberrationEffect,\r\n InvertEffect,\r\n InvertChannel,\r\n ScatterEffect,\r\n PosterizeEffect,\r\n MotionBlurEffect,\r\n MotionBlurAlignment,\r\n ShaderEffect,\r\n SkSLUniform,\r\n SkSLUniformValue,\r\n OutlineEffect,\r\n OutlinePosition,\r\n VignetteEffect,\r\n GrainEffect,\r\n SharpenEffect,\r\n EdgesEffect,\r\n EdgeKernel,\r\n ThresholdEffect,\r\n RadialBlurEffect,\r\n RadialBlurStyle,\r\n HalftoneEffect,\r\n HalftoneShape,\r\n HalftoneSeparation,\r\n DitherEffect,\r\n DitherMatrix,\r\n DuotoneEffect,\r\n CurvesEffect,\r\n ColorAdjustmentEffect,\r\n RgbShiftEffect,\r\n ScanlinesEffect,\r\n BlockDisplaceEffect,\r\n BitCrushEffect,\r\n BitCrushPalette,\r\n AsciiEffect,\r\n AsciiCharset,\r\n StreakEffect,\r\n GlowEffect,\r\n GlowChannel,\r\n GlowLoopStyle,\r\n GlowOriginal,\r\n GlowTint,\r\n OilPaintEffect,\r\n WaveEffect,\r\n WaveShape,\r\n TwirlEffect,\r\n ProgressiveBlurEffect,\r\n ProgressiveBlurShape,\r\n KaleidoscopeEffect,\r\n GlassEffect,\r\n LutEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Animation — interpolation\r\n//\r\n// There are no `sequence`/`parallel`/`wait` primitives: a command carries its\r\n// own placement, so sequencing is `at + duration`, running two together is a\r\n// shared `at`, and a wait is a gap between them.\r\n// =============================================================\r\nexport {\r\n lerpNumber,\r\n} from '../tween';\r\nexport type {\r\n AnimationTarget,\r\n Steppable,\r\n TweenStepper,\r\n LerpFunction,\r\n TweenOptions,\r\n} from '../tween';\r\n\r\n// An animation as a **value** rather than as control flow: a declared duration\r\n// plus `at(t)`, so a host can ask what it looks like at a time instead of\r\n// running it to one. That is what lets a host place one on a timeline, and what\r\n// makes a scene scrub in constant time rather than replay. A component's\r\n// `commands` return one, and the command registry — and a host listing what a\r\n// node can do — reads them.\r\n//\r\n// One command shape, always: `node.to(a, 1)` is a single command, not a builder\r\n// you can append to. Two of them are sequenced by where they sit on the\r\n// timeline, which is what makes a scene's shape editable rather than implied by\r\n// the order of calls in a function body.\r\nexport {\r\n getCommandMeta,\r\n isCommand,\r\n makeCommand,\r\n commandSequence,\r\n commandParallel,\r\n loopCommand,\r\n} from '../tween';\r\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\r\n\r\n// =============================================================\r\n// Animation — Easing\r\n// =============================================================\r\nexport {\r\n linear,\r\n easeIn,\r\n easeOut,\r\n easeInOut\r\n} from '../tween';\r\nexport type {\r\n EasingFunction,\r\n EaseParams,\r\n StandardEase\r\n} from '../tween';\r\n\r\n// =============================================================\r\n// Utilities\r\n// =============================================================\r\nexport {\r\n createRef,\r\n clamp,\r\n generateList,\r\n createContext,\r\n ContextMap,\r\n Random,\r\n SeedGenerator,\r\n parseCSV,\r\n parseData,\r\n} from '../util';\r\nexport type {\r\n Reference,\r\n RefTarget,\r\n Context,\r\n DataRecord,\r\n ParseCSVOptions,\r\n} from '../util';\r\n\r\n// =============================================================\r\n// Editor selection — node boxes, hit testing, transient overrides\r\n// =============================================================\r\n// The geometry an editor needs to lay a selection gizmo over the canvas: where a\r\n// node's pixels landed, and which node is under a point. Both are pure functions\r\n// over a scene's node tree, so a host can use them directly; a player embedding\r\n// reaches the same thing through `useMotionPlayer` (`getNodeBox`, `pickNode`,\r\n// `setNodeOverride`). Points and boxes are in viewport space — origin at the\r\n// viewport centre, y-up.\r\n//\r\n// These genuinely live in `../runtime` (node hit-testing and the transient\r\n// override store are runtime concerns) — deep-imported from their concrete\r\n// files, never the runtime barrel itself.\r\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\r\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\r\n\r\nexport {\r\n nodeBox,\r\n pickNode,\r\n collectBoxes,\r\n parentPlanePointAt,\r\n childPlanePointAt,\r\n reparentPlacementAt,\r\n nodeHandlesAt,\r\n handleValueAt,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeBox,\r\n ReparentPlacement,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeOverride,\r\n} from '../runtime/playback-controller';\r\nexport type {\r\n TreeState,\r\n} from '../project';\r\n/** @deprecated Kept until 1.0; see `../renamed-scene-names`. */\r\nexport type { SceneDocument, SceneEffect } from '../renamed-scene-names';\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,wEAAwE;AACxE,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,oCAAoC;AAEpC,gEAAgE;A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,MAAM,eAAe,CAAC;AAiJvB,gEAAgE;AAChE,4BAA4B;AAC5B,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,iDAAiD;AACjD,gEAAgE;AAChE,OAAO,EACH,UAAU,GACb,MAAM,UAAU,CAAC;AASlB,+EAA+E;AAC/E,0EAA0E;AAC1E,gFAAgF;AAChF,yEAAyE;AACzE,8EAA8E;AAC9E,4BAA4B;AAC5B,EAAE;AACF,gFAAgF;AAChF,wEAAwE;AACxE,gFAAgF;AAChF,yCAAyC;AACzC,OAAO,EACH,cAAc,EACd,SAAS,EACT,WAAW,EACX,eAAe,EACf,eAAe,EACf,WAAW,GACd,MAAM,UAAU,CAAC;AAGlB,gEAAgE;AAChE,qBAAqB;AACrB,gEAAgE;AAChE,OAAO,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACZ,MAAM,UAAU,CAAC;AAOlB,gEAAgE;AAChE,YAAY;AACZ,gEAAgE;AAChE,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AASjB,gEAAgE;AAChE,kEAAkE;AAClE,gEAAgE;AAChE,iFAAiF;AACjF,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,2EAA2E;AAC3E,2EAA2E;AAC3E,0CAA0C;AAC1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface published as `@motionscript/sdk` (packages/sdk) and,\r\n// via this file, as `@motionscript/core/sdk`. A deliberate SUBSET of core's own\r\n// root barrel (`../index.ts`): no `Engine`/`Session`/platform seams, no\r\n// `@internal`-tagged descriptor plumbing. Every export here is named, traced to\r\n// its real declaring sub-barrel — never a wildcard — so nothing internal leaks\r\n// by accident. Keep this in lockstep with `packages/sdk/src/index.ts`, which\r\n// mirrors this exact named surface.\r\n\r\n// =============================================================\r\n// Project\r\n//\r\n// A clip is **data**: a still is nodes and props, a composition is the same\r\n// nodes placed in time plus the commands that animate them, and an audio\r\n// document is that one tree over. A **project** is one list of tracks over those\r\n// clips, and it is what the runtime plays — a lone still or composition is sugar\r\n// for a project with one track (`asProjectDocument`).\r\n// =============================================================\r\nexport {\r\n isProjectDocument,\r\n asProjectDocument,\r\n documentDuration,\r\n commandSpan,\r\n hasTimeline,\r\n nodeSpan,\r\n effectiveSpan,\r\n untimed,\r\n ROOT_NODE_ID,\r\n} from '../document';\r\nexport type {\r\n ProjectDocument,\r\n Track,\r\n} from '../document';\r\n// `resolveProjectDocument`/`placeTracks` genuinely live in `../runtime` (session\r\n// resolution and track placement are runtime concerns) — deep-imported from\r\n// their concrete files rather than the runtime barrel, which also carries\r\n// `Engine`/`Session` and is never a source for this file.\r\nexport { resolveProjectDocument } from '../runtime/session';\r\nexport { placeTracks } from '../runtime/placement';\r\nexport type { TrackSpan } from '../runtime/placement';\r\nexport type {\r\n Theme,\r\n ColorTokens,\r\n Typography,\r\n TypographyPreset,\r\n} from '../project';\r\nexport type { NodeTime, AttachScope } from '../components/trees';\r\nexport type { BoxBounds, Extents } from '../layout';\r\n\r\n// =============================================================\r\n// Assets\r\n//\r\n// The manifest a host builds a scene against — what images, video, audio and\r\n// fonts it references, resolved before render. An `Engine`'s manifest and\r\n// `@motionscript/headless`'s asset options both take this shape.\r\n// =============================================================\r\nexport type {\r\n ImageMeta,\r\n VideoMeta,\r\n AudioMeta,\r\n FontMeta,\r\n AssetMeta,\r\n AssetManifest,\r\n} from '../assets';\r\n\r\n// =============================================================\r\n// The clip document\r\n//\r\n// The data half of the model. Node types are code — a component registered\r\n// under its key, which is also where a custom node joins the system — and\r\n// everything else is plain JSON: which nodes exist, what props they carry, and\r\n// what happens to them over time.\r\n// =============================================================\r\nexport {\r\n validateDocument,\r\n assertValidDocument,\r\n // Saved documents carry the format they were written in; these bring one\r\n // forward, and a host rewriting stored node rows calls `migrateNodeProps`.\r\n DOCUMENT_FORMAT_VERSION,\r\n DocumentTooNewError,\r\n documentFormatVersion,\r\n migrateDocument,\r\n migrateNodeProps,\r\n missingNodeOf,\r\n // The code half of the model, as one object an engine owns. Not a\r\n // singleton: what a document can name is a property of the registry\r\n // compiling it, so two engines in one process disagree freely.\r\n Registry,\r\n} from '../document';\r\n// The shader-pack vocabulary lives beside the rest of the fill/shader attribute\r\n// machinery, not in `../document`.\r\nexport {\r\n normalizeShaderPack,\r\n resolveShaderProperties,\r\n isKnownShaderProperty,\r\n} from '../attributes';\r\nexport type {\r\n RegistryOptions,\r\n NodeTypeMap,\r\n ShaderPackMap,\r\n NodeTypeRecord,\r\n NodeCommandEntry,\r\n VisualDocument,\r\n ClipDocument,\r\n StillDocument,\r\n CompositionDocument,\r\n AudioDocument,\r\n NodeSpec,\r\n TimedNodeSpec,\r\n NodeSpan,\r\n CommandSpec,\r\n EaseSpec,\r\n LoopSpec,\r\n LoopDirection,\r\n VariableSpec,\r\n ValidationIssue,\r\n ValidationResult,\r\n ValidateOptions,\r\n DocumentChange,\r\n DocumentMigrationResult,\r\n PropMigration,\r\n PropNote,\r\n MissingNodeInfo,\r\n NodeConstructor,\r\n CommandFactory,\r\n CommandTypeEntry,\r\n VariableCommandFactory,\r\n VariableLerp,\r\n VariableTarget,\r\n} from '../document';\r\nexport type {\r\n Shader,\r\n FillShader,\r\n EffectShader,\r\n ShaderProperty,\r\n KnownShaderProperty,\r\n ShaderPropertyValues,\r\n} from '../attributes';\r\n\r\n// Expressions: the string form of a prop that follows a variable — `\"=4[g]+3\"`.\r\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint,\r\n// complete or rewrite one without reimplementing the grammar.\r\nexport { expressionOps, ExpressionError } from '../document';\r\nexport type {\r\n ParsedExpression,\r\n ExpressionNode,\r\n ExpressionDialect,\r\n VariableResolver,\r\n} from '../document';\r\n\r\n// =============================================================\r\n// Components — the factories a node type is written with\r\n//\r\n// A component is one object literal: `key`, `state`, `commands`, `children`\r\n// and its tree's own fields (`measure`/`layout`/`render` for 2D). Behaviour is\r\n// spread in from modules (`...Paint.state`, `...Paint.commands`) and their\r\n// helpers called (`Paint.draw`, `Flow.measure`). See `packages/core/docs/why.md#node-types-are-factory-specs-not-decorated-classes`.\r\n// =============================================================\r\nexport { component2d } from '../components/factory/component2d';\r\nexport { componentAudio } from '../components/factory/component-audio';\r\nexport { component3d } from '../components/factory/component3d';\r\nexport { commandsFor } from '../components/factory/commands-for';\r\nexport { Types } from '../components/factory/types';\r\nexport { provides } from '../components/factory/api';\r\nexport * as Paint from '../components/modules/paint';\r\nexport * as Flow from '../components/modules/flow';\r\nexport * as Shapes from '../components/modules/shapes';\r\nexport * as Aim from '../components/modules/aim';\r\n// The face text is set in: its entries inherit from the nearest provider.\r\nexport * as Typeface from '../components/modules/text-style';\r\nexport * as TextLayout from '../components/modules/text-layout';\r\n// A mesh's surface: the material entries, and the mesh drawn with them.\r\nexport * as Material from '../components/modules/material';\r\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\r\nexport * as View3D from '../components/modules/view3d';\r\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../components/factory/types';\r\nexport type {\r\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\r\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\r\n Timeline, Type, Values, Writes,\r\n // Named in every component's type, so a package exporting one can declare it.\r\n Merge, BuiltNode,\r\n // What `render` is handed; `RenderContext2D` is the renderer's.\r\n RenderContext2D as RenderContext,\r\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\r\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\r\n RenderContext3D as SceneContext,\r\n} from '../components/factory/api';\r\n\r\n// =============================================================\r\n// Nodes — what code holding a built node names it as\r\n//\r\n// `Node` is dimension-agnostic (tree, props, tweens, context, clock); `Node2D`\r\n// adds layout and 2D drawing; `Node3D` and `NodeAudio` are the other trees.\r\n// Types only: a node type is a component, never a subclass.\r\n// =============================================================\r\nexport type { Node, Node2D } from '../components/trees';\r\nexport {\r\n // A clip's root container: layout frame, background paint and camera in\r\n // one node. Every track builds into one sized to the viewport.\r\n Canvas2D,\r\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\r\n findNode2D,\r\n frameIn,\r\n} from '../components/trees';\r\nexport { Provider, ThemeProvider } from '../components/builtins/providers/providers';\r\nexport type {\r\n NodeProps,\r\n Node2DProps,\r\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\r\n ChildPlacement,\r\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\r\n ChildPlane,\r\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\r\n NodeHandle,\r\n Canvas2DProps,\r\n NodeConfig,\r\n NodeChildren,\r\n NodeDimension,\r\n} from '../components/trees';\r\nexport type { ProviderProps, ThemeProviderProps } from '../components/builtins/providers/providers';\r\n\r\n// =============================================================\r\n// Nodes — Geometry\r\n// =============================================================\r\nexport {\r\n Rect,\r\n Ellipse,\r\n Path,\r\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\r\n // where `Path` draws its `d` at face value.\r\n PathShape,\r\n Polygon,\r\n Polygram,\r\n Triangle,\r\n RightTriangle,\r\n Pentagon,\r\n Hexagon,\r\n Octagon,\r\n Star,\r\n} from '../components/builtins/geometry/geometry';\r\nexport { BooleanGroup, MaskGroup } from '../components/builtins/geometry/composite';\r\nexport type {\r\n PaintProps,\r\n ShapeProps,\r\n RectProps,\r\n FlexSize,\r\n EllipseProps,\r\n PathProps,\r\n PathShapeProps,\r\n PolygonProps,\r\n PolygramProps,\r\n} from '../components/builtins/geometry/geometry';\r\nexport type { BooleanGroupProps, MaskGroupProps } from '../components/builtins/geometry/composite';\r\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\r\n// not node-prop types.\r\nexport type {\r\n BooleanOperation,\r\n MaskMode,\r\n MaskOptions,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Layout\r\n// =============================================================\r\nexport {\r\n Camera,\r\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\r\n OrbitCamera,\r\n RotatedBox,\r\n} from '../components/builtins/layout/layout';\r\nexport type {\r\n CameraProps,\r\n OrbitCameraProps,\r\n} from '../components/builtins/layout/layout';\r\n\r\n// =============================================================\r\n// Nodes — Text\r\n// =============================================================\r\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../components/builtins/text/text';\r\nexport type {\r\n TextProps,\r\n RichTextProps,\r\n NumberProps,\r\n NumberFormat,\r\n DefaultTextStyleProps,\r\n} from '../components/builtins/text/text';\r\nexport { textOps } from '../attributes';\r\nexport type {\r\n TextStyle,\r\n TextAlign,\r\n VerticalAlign,\r\n TextDecoration,\r\n TextCase,\r\n TextSpan,\r\n TextRun,\r\n FontStyle,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Nodes — Media\r\n// =============================================================\r\nexport { Video } from '../components/builtins/media/media';\r\nexport type {\r\n VideoProps,\r\n VideoSegment,\r\n} from '../components/builtins/media/media';\r\n\r\n// =============================================================\r\n// Nodes — Audio\r\n// =============================================================\r\n// `SoundNode` plays a clip and `AudioBus` groups what feeds it — the third\r\n// scene graph, beside `Node2D` and `Node3D`. Levels are `Param`, so a fade is a\r\n// ramp (`ramp`/`hold`) or a transition rather than a `to()`: sound is\r\n// scheduled once, ahead of time, not written once per frame.\r\nexport type { NodeAudio } from '../components/trees';\r\nexport { AudioBus, SoundNode } from '../components/builtins/audio/audio';\r\nexport {\r\n Sound,\r\n AudioEffects,\r\n ramp,\r\n hold,\r\n isRamp,\r\n} from '../attributes';\r\nexport type {\r\n NodeAudioProps,\r\n} from '../components/trees';\r\nexport type { AudioBusProps, SoundNodeProps } from '../components/builtins/audio/audio';\r\nexport type {\r\n SoundProps,\r\n AudioRequest,\r\n AudioBusStop,\r\n AudioEffect,\r\n AudioEffectsInput,\r\n AudioTransition,\r\n Param,\r\n Ramp,\r\n RampKey,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// 3D — the Canvas3D node and the Graphics3D API\r\n// =============================================================\r\n// There is one 3D node; everything inside it is described with `Graphics3D`.\r\n// `Geo`/`Mat`/`Tex` build the geometry/material/texture descriptors, and the lerps\r\n// are what make a Vector3/Euler/Quaternion prop interpolate rather than snap.\r\n// `Surface2D` is the 2D→3D bridge: a child of `Canvas3D` whose 2D content is\r\n// rasterized offscreen and bound to a material by `Tex.surface(name)`.\r\nexport { Canvas3D } from '../components/builtins/three/canvas3d';\r\nexport type { Node3D } from '../components/trees';\r\n// The 3D scene graph: components, each placed by its transform.\r\nexport {\r\n Group3D,\r\n Mesh3D,\r\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\r\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\r\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\r\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\r\n PointLight3D, SpotLight3D, AreaLight3D,\r\n Camera3D,\r\n Fog3D, Environment3D,\r\n} from '../components/builtins/three/three';\r\nexport {\r\n Graphics3D,\r\n Scene3D,\r\n RenderContext3D,\r\n Geo,\r\n Mat,\r\n Tex,\r\n lerpVector3,\r\n lerpEuler3,\r\n slerpQuaternion,\r\n quaternionFromEuler,\r\n normalizeQuaternion,\r\n resolveVector3,\r\n evaluateParametric,\r\n evaluateRoundedBox,\r\n resolveSurfaceSource,\r\n resolveFill3D,\r\n segmentsOf,\r\n resolveCameraPlacement,\r\n resolveShadows3D,\r\n shadowCasts,\r\n shadowReceives,\r\n} from '../render3d';\r\nexport type { Canvas3DProps } from '../components/builtins/three/canvas3d';\r\nexport type {\r\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\r\n ChildSpace3D,\r\n Node3DProps,\r\n} from '../components/trees';\r\nexport type {\r\n Group3DProps, Mesh3DProps, Material3DProps,\r\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\r\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\r\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\r\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\r\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\r\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\r\n Camera3DProps,\r\n Fog3DProps, Environment3DProps,\r\n} from '../components/builtins/three/three';\r\nexport type {\r\n Node3DRenderState,\r\n Graphics3DOp,\r\n Scene3DOp,\r\n Vector3,\r\n Vector3Input,\r\n Euler3,\r\n EulerOrder,\r\n Quaternion,\r\n Transform3D,\r\n Shadow3D,\r\n ShadowOptions3D,\r\n Faces3D,\r\n Blend3D,\r\n Shading3D,\r\n Segments3D,\r\n Sweep3D,\r\n Bevel3D,\r\n Fill3D,\r\n Geometry3D,\r\n BufferGeometry3D,\r\n Material3D,\r\n MaterialCommon3D,\r\n MeshShorthand3D,\r\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\r\n MaterialShorthand3D,\r\n Uniform3D,\r\n Texture3D,\r\n TextureOptions3D,\r\n SurfaceTexture3D,\r\n SurfaceSource3D,\r\n ResolvedSurfaceSource,\r\n LightData3D,\r\n CameraData3D,\r\n FogData3D,\r\n EnvironmentData3D,\r\n Shadows3D,\r\n ShadowSettings3D,\r\n ToneMapping3D,\r\n ToneSettings3D,\r\n PostEffect3D,\r\n LineMode3D,\r\n LineStroke3D,\r\n ModelAnimation3D,\r\n} from '../render3d';\r\n\r\n// =============================================================\r\n// Rendering — Graphics2D builder, RenderContext2D & asset declaration\r\n// =============================================================\r\nexport {\r\n Graphics2D,\r\n PathBuilder,\r\n Clip,\r\n toPathString,\r\n} from '../render';\r\nexport type {\r\n RenderContext2D,\r\n RenderPass2D,\r\n MeasureContext2D,\r\n TextBlockSource,\r\n // One recorded entry of `Graphics2D.ops()`.\r\n GraphicsOp,\r\n PathData,\r\n PathCommand,\r\n PathBounds,\r\n EllipseArc,\r\n} from '../render';\r\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\r\nexport type { AssetScope, LoaderFn } from '../assets';\r\n\r\n// =============================================================\r\n// Fill & Color\r\n// =============================================================\r\nexport {\r\n Fills,\r\n parseColor,\r\n resolveFill,\r\n fillOps,\r\n colorOps,\r\n} from '../attributes';\r\nexport type {\r\n Fill,\r\n FillChain,\r\n FillOptions,\r\n VideoFillOptions,\r\n // Placement of an image/video source inside the shape it paints:\r\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\r\n MediaPlacementOptions,\r\n ImageFit,\r\n ImageCrop,\r\n ImageMatrix,\r\n FillResolved,\r\n // A custom WGSL shader as a fill. Uniforms are keyed by their declared\r\n // name, and a `ShaderTexture` is an image it samples.\r\n ShaderFillProp,\r\n ShaderFillResolved,\r\n ShaderTexture,\r\n ShaderUniformRecord,\r\n FractalNoiseBasis,\r\n // The colour type every fill, stroke, shadow and 3D material accepts —\r\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\r\n // pre-normalized RGBA tuple.\r\n Color,\r\n NormalizedColor,\r\n BlendMode,\r\n FillSpace,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Shape Attributes — Stroke, Shadow, Corners\r\n// =============================================================\r\nexport {\r\n resolveStroke,\r\n strokeOps,\r\n resolveShadow,\r\n shadowOps,\r\n resolveCorners,\r\n cornerRadiusOps,\r\n cornerStyleOps,\r\n // Parsing, measuring, sampling, trimming and morphing a path, and the\r\n // anchor model (`VectorPath`) a pen tool edits.\r\n pathOps,\r\n} from '../attributes';\r\nexport type {\r\n PathSampler,\r\n PathAnchor,\r\n PathSubpath,\r\n VectorPath,\r\n Stroke,\r\n StrokeProp,\r\n StrokeAlign,\r\n StrokeCap,\r\n StrokeMarker,\r\n StrokeEnd,\r\n StrokeJoin,\r\n StrokeResolved,\r\n Shadow,\r\n ShadowProp,\r\n ShadowResolved,\r\n Corners,\r\n CornerStyle,\r\n CornerStyleResolved,\r\n CornerRadiusResolved,\r\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\r\n RectCornerRadius,\r\n RectCornerStyle,\r\n NodeEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Layout Attributes — Vector2, Size, Insets, Alignment, Flow\r\n//\r\n// `flowOps` is the layout a container runs on its children, as plain data in\r\n// and boxes out — so a custom node can lay out what it draws the same way.\r\n// =============================================================\r\nexport {\r\n lerpVector2,\r\n sizeInputOps,\r\n insetsOps,\r\n alignmentOps,\r\n} from '../attributes';\r\n// `flowOps` itself is the layout package's, not the attribute layer's —\r\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\r\nexport { flowOps } from '../layout';\r\nexport type {\r\n Vector2,\r\n Size2D,\r\n Insets,\r\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\r\n InsetsProps,\r\n InsetsResolved,\r\n AlignmentKey,\r\n Alignment,\r\n} from '../attributes';\r\nexport type {\r\n FlowMode,\r\n GapSize,\r\n FlowResolved,\r\n FlowProps,\r\n FlowSettings,\r\n LayoutItem,\r\n FlowSpace,\r\n FlowMeasure,\r\n FlowLine,\r\n // What an overriding `measure(constraints, scope)` is handed.\r\n SizeConstraints,\r\n} from '../layout';\r\n\r\n// =============================================================\r\n// 2.5D space — the stage's `space3D` camera\r\n//\r\n// `space3dOps` is the camera's own projection, for a host drawing over the\r\n// picture (a gizmo aiming the camera) rather than keeping a copy of it.\r\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D\r\n// space of its own.\r\n// =============================================================\r\nexport { space3dOps } from '../attributes/layout/space3d';\r\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\r\n\r\n// =============================================================\r\n// Effects & Media Adjustments\r\n//\r\n// `describeEffect` / `effectDescriptors` describe each built-in effect's\r\n// fields (kind, default, range, unit, inspector hints) as plain JSON, so a\r\n// host builds its effect UI from the engine rather than a copy of it.\r\n// =============================================================\r\nexport { describeEffect, effectDescriptors } from '../attributes';\r\nexport type {\r\n EffectDescriptor,\r\n EffectParamDescriptor,\r\n EffectParamKind,\r\n EffectParamUnit,\r\n EffectParamControl,\r\n EffectGroup,\r\n EffectJson,\r\n} from '../attributes';\r\nexport {\r\n Effects,\r\n EffectChain,\r\n Adjustments,\r\n VideoAdjustments,\r\n AdjustmentChain,\r\n VideoAdjustmentChain,\r\n /** @deprecated Renamed to {@link Adjustments}. Removed in the next major. */\r\n ImageFilters,\r\n /** @deprecated Renamed to {@link VideoAdjustments}. Removed in the next major. */\r\n VideoFilters,\r\n} from '../attributes';\r\n\r\nexport type {\r\n /** The `effects` prop type — what a node actually accepts. */\r\n Effect,\r\n EffectMode,\r\n EffectAxis,\r\n EffectSurface,\r\n EffectOptions,\r\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\r\n ImageAdjustment,\r\n VideoAdjustment,\r\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\r\n EffectAdjustment,\r\n MediaAdjustment,\r\n VideoOnlyAdjustment,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options. Every effect builder takes exactly one argument: one of\r\n * these, or the dominant scalar it wraps.\r\n */\r\nexport type {\r\n BlurOptions,\r\n DirectionalBlurOptions,\r\n GrayscaleOptions,\r\n PixelateOptions,\r\n BulgeOptions,\r\n MagnifyOptions,\r\n BloomOptions,\r\n VintageOptions,\r\n ChromaticAberrationOptions,\r\n InvertOptions,\r\n ScatterOptions,\r\n PosterizeOptions,\r\n MotionBlurOptions,\r\n ShaderEffectOptions,\r\n OutlineOptions,\r\n VignetteOptions,\r\n GrainOptions,\r\n SharpenOptions,\r\n EdgesOptions,\r\n ThresholdOptions,\r\n RadialBlurOptions,\r\n HalftoneOptions,\r\n DitherOptions,\r\n DuotoneOptions,\r\n CurvesOptions,\r\n ColorAdjustmentOptions,\r\n RgbShiftOptions,\r\n ScanlinesOptions,\r\n BlockDisplaceOptions,\r\n BitCrushOptions,\r\n AsciiOptions,\r\n StreakOptions,\r\n GlowOptions,\r\n OilPaintOptions,\r\n WaveOptions,\r\n TwirlOptions,\r\n ProgressiveBlurOptions,\r\n KaleidoscopeOptions,\r\n GlassOptions,\r\n LutOptions,\r\n} from '../attributes';\r\n\r\n/**\r\n * Per-builder options for the filters that exist only as filters. Everything\r\n * else on {@link Adjustments} takes the matching effect options above, minus\r\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\r\n * point it at.\r\n */\r\nexport type {\r\n BlurFilterOptions,\r\n GrayscaleFilterOptions,\r\n AlphaFilterOptions,\r\n ExposureFilterOptions,\r\n ColorMatrixFilterOptions,\r\n CurvesFilterOptions,\r\n ColorAdjustmentFilterOptions,\r\n PosterizeTimeFilterOptions,\r\n VideoEchoFilterOptions,\r\n} from '../attributes';\r\n\r\n/** Effect data types, for naming an effect value or building one by hand. */\r\nexport type {\r\n BlurEffect,\r\n DirectionalBlurEffect,\r\n GrayscaleEffect,\r\n PixelateEffect,\r\n BulgeEffect,\r\n MagnifyEffect,\r\n BloomEffect,\r\n VintageEffect,\r\n ChromaticAberrationEffect,\r\n InvertEffect,\r\n InvertChannel,\r\n ScatterEffect,\r\n PosterizeEffect,\r\n MotionBlurEffect,\r\n MotionBlurAlignment,\r\n ShaderEffect,\r\n ShaderUniform,\r\n ShaderUniformValue,\r\n OutlineEffect,\r\n OutlinePosition,\r\n VignetteEffect,\r\n GrainEffect,\r\n SharpenEffect,\r\n EdgesEffect,\r\n EdgeKernel,\r\n ThresholdEffect,\r\n RadialBlurEffect,\r\n RadialBlurStyle,\r\n HalftoneEffect,\r\n HalftoneShape,\r\n HalftoneSeparation,\r\n DitherEffect,\r\n DitherMatrix,\r\n DuotoneEffect,\r\n CurvesEffect,\r\n ColorAdjustmentEffect,\r\n RgbShiftEffect,\r\n ScanlinesEffect,\r\n BlockDisplaceEffect,\r\n BitCrushEffect,\r\n BitCrushPalette,\r\n AsciiEffect,\r\n AsciiCharset,\r\n StreakEffect,\r\n GlowEffect,\r\n GlowChannel,\r\n GlowLoopStyle,\r\n GlowOriginal,\r\n GlowTint,\r\n OilPaintEffect,\r\n WaveEffect,\r\n WaveShape,\r\n TwirlEffect,\r\n ProgressiveBlurEffect,\r\n ProgressiveBlurShape,\r\n KaleidoscopeEffect,\r\n GlassEffect,\r\n LutEffect,\r\n} from '../attributes';\r\n\r\n// =============================================================\r\n// Animation — interpolation\r\n//\r\n// There are no `sequence`/`parallel`/`wait` primitives: a command carries its\r\n// own placement, so sequencing is `at + duration`, running two together is a\r\n// shared `at`, and a wait is a gap between them.\r\n// =============================================================\r\nexport {\r\n lerpNumber,\r\n} from '../tween';\r\nexport type {\r\n AnimationTarget,\r\n Steppable,\r\n TweenStepper,\r\n LerpFunction,\r\n TweenOptions,\r\n} from '../tween';\r\n\r\n// An animation as a **value** rather than as control flow: a declared duration\r\n// plus `at(t)`, so a host can ask what it looks like at a time instead of\r\n// running it to one. That is what lets a host place one on a timeline, and what\r\n// makes a scene scrub in constant time rather than replay. A component's\r\n// `commands` return one, and the command registry — and a host listing what a\r\n// node can do — reads them.\r\n//\r\n// One command shape, always: `node.to(a, 1)` is a single command, not a builder\r\n// you can append to. Two of them are sequenced by where they sit on the\r\n// timeline, which is what makes a scene's shape editable rather than implied by\r\n// the order of calls in a function body.\r\nexport {\r\n getCommandMeta,\r\n isCommand,\r\n makeCommand,\r\n commandSequence,\r\n commandParallel,\r\n loopCommand,\r\n} from '../tween';\r\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\r\n\r\n// =============================================================\r\n// Animation — Easing\r\n// =============================================================\r\nexport {\r\n linear,\r\n easeIn,\r\n easeOut,\r\n easeInOut\r\n} from '../tween';\r\nexport type {\r\n EasingFunction,\r\n EaseParams,\r\n StandardEase\r\n} from '../tween';\r\n\r\n// =============================================================\r\n// Utilities\r\n// =============================================================\r\nexport {\r\n createRef,\r\n clamp,\r\n generateList,\r\n createContext,\r\n ContextMap,\r\n Random,\r\n SeedGenerator,\r\n parseCSV,\r\n parseData,\r\n} from '../util';\r\nexport type {\r\n Reference,\r\n RefTarget,\r\n Context,\r\n DataRecord,\r\n ParseCSVOptions,\r\n} from '../util';\r\n\r\n// =============================================================\r\n// Editor selection — node boxes, hit testing, transient overrides\r\n// =============================================================\r\n// The geometry an editor needs to lay a selection gizmo over the canvas: where a\r\n// node's pixels landed, and which node is under a point. Both are pure functions\r\n// over a scene's node tree, so a host can use them directly; a player embedding\r\n// reaches the same thing through `useMotionPlayer` (`getNodeBox`, `pickNode`,\r\n// `setNodeOverride`). Points and boxes are in viewport space — origin at the\r\n// viewport centre, y-up.\r\n//\r\n// These genuinely live in `../runtime` (node hit-testing and the transient\r\n// override store are runtime concerns) — deep-imported from their concrete\r\n// files, never the runtime barrel itself.\r\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\r\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\r\n\r\nexport {\r\n nodeBox,\r\n pickNode,\r\n collectBoxes,\r\n parentPlanePointAt,\r\n childPlanePointAt,\r\n reparentPlacementAt,\r\n nodeHandlesAt,\r\n handleValueAt,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeBox,\r\n ReparentPlacement,\r\n} from '../runtime/node-picking';\r\nexport type {\r\n NodeOverride,\r\n} from '../runtime/playback-controller';\r\nexport type {\r\n TreeState,\r\n} from '../project';\r\n/** @deprecated Kept until 1.0; see `../renamed-scene-names`. */\r\nexport type { SceneDocument, SceneEffect } from '../renamed-scene-names';\r\n"]}
@@ -4,10 +4,10 @@ import { type PropertyEditor } from "../attributes/properties/decorator.js";
4
4
  * offer, place on a timeline and store by name. Metadata only.
5
5
  *
6
6
  * ```ts
7
- * @command({ args: ["index"] })
8
- * showSeries({ data, duration = 1, easing }: CommandArgs<{ index: number }>): Command<ChartProps> {
9
- * …
7
+ * class Chart extends Node2D<ChartProps> {
8
+ * showSeries({ data, duration = 1, easing }: CommandArgs<{ index: number }>): Command<ChartProps> { … }
10
9
  * }
10
+ * declareMembers(Chart, { showSeries: command({ args: ["index"] }) });
11
11
  * ```
12
12
  *
13
13
  * `args` maps a stored command's `params` object onto `data`'s keys — see
@@ -22,12 +22,12 @@ export interface CommandArgDescriptor extends PropertyEditor {
22
22
  default?: unknown;
23
23
  }
24
24
  export type CommandArg = string | CommandArgDescriptor;
25
- /** Symbol under which `@command` metadata is stored on class prototypes. */
25
+ /** Symbol under which `command` metadata is stored on class prototypes. */
26
26
  export declare const COMMAND_META: unique symbol;
27
27
  export interface CommandMeta {
28
- /** The key a host stores and dispatches on: the method name unless `@command({ key })` renamed it. */
28
+ /** The key a host stores and dispatches on: the method name unless `command({ key })` renamed it. */
29
29
  key: string;
30
- /** The decorated method, which dispatching {@link key} calls. */
30
+ /** The method, which dispatching {@link key} calls. */
31
31
  method: string;
32
32
  /** Display name; built-ins leave this unset and localize by {@link key} instead. */
33
33
  name?: string;
@@ -38,17 +38,22 @@ export interface CommandMeta {
38
38
  * (`data`/`duration`/`easing`, not `index` or `wobble`).
39
39
  */
40
40
  args?: readonly CommandArg[];
41
- /** Withdrawn by a subclass: unpublished, still dispatched. See `withdraw`. */
42
- withdrawn?: boolean;
41
+ /**
42
+ * Brings its target in: a timeline holds its first frame from the moment
43
+ * the target could first show it, so the resting node never flashes up
44
+ * ahead of it. The hold window is in `docs/timeline.md`.
45
+ */
46
+ entrance?: boolean;
43
47
  }
44
48
  export interface CommandOptions {
45
49
  /** Publishes the method under another key, for a name the method cannot take (a prop, an inherited method). */
46
50
  key?: string;
47
51
  name?: string;
48
52
  args?: readonly CommandArg[];
53
+ entrance?: boolean;
49
54
  }
50
55
  /**
51
- * Every `@command` on an instance's class, inherited included, base → subclass.
56
+ * Every `command` on an instance's class, inherited included, base → subclass.
52
57
  * A subclass that redeclares a key replaces the inherited declaration — method,
53
58
  * name and args — at the position the base gave it.
54
59
  */
@@ -1 +1 @@
1
- {"version":3,"file":"command-decorator.d.ts","sourceRoot":"","sources":["../../src/tween/command-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAErF;;;;;;;;;;;;;;;GAeG;AAEH,kLAAkL;AAClL,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IACxD,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,oBAAoB,CAAC;AAEvD,4EAA4E;AAC5E,eAAO,MAAM,YAAY,eAAwB,CAAC;AAElD,MAAM,WAAW,WAAW;IACxB,sGAAsG;IACtG,GAAG,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,8EAA8E;IAC9E,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC3B,+GAA+G;IAC/G,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAE9D;AAED,+BAA+B;AAC/B,wBAAgB,OAAO,CAAC,OAAO,CAAC,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import { mostDerived } from "../attributes/properties/decorator.js";
2
- /** Symbol under which `@command` metadata is stored on class prototypes. */
2
+ /** Symbol under which `command` metadata is stored on class prototypes. */
3
3
  export const COMMAND_META = Symbol("commandMeta");
4
4
  /**
5
- * Every `@command` on an instance's class, inherited included, base → subclass.
5
+ * Every `command` on an instance's class, inherited included, base → subclass.
6
6
  * A subclass that redeclares a key replaces the inherited declaration — method,
7
7
  * name and args — at the position the base gave it.
8
8
  */
@@ -25,6 +25,7 @@ export function command(options) {
25
25
  method,
26
26
  ...(options?.name ? { name: options.name } : {}),
27
27
  ...(options?.args ? { args: options.args } : {}),
28
+ ...(options?.entrance ? { entrance: true } : {}),
28
29
  });
29
30
  };
30
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"command-decorator.js","sourceRoot":"","sources":["../../src/tween/command-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,mCAAmC,CAAC;AA4BrF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AA2BlD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC3C,OAAO,WAAW,CAAc,QAAQ,EAAE,YAAY,CAAC,CAAC;AAC5D,CAAC;AAED,+BAA+B;AAC/B,MAAM,UAAU,OAAO,CAAC,OAAwB;IAC5C,OAAO,UAAU,MAAc,EAAE,WAA4B;QACzD,MAAM,MAAM,GAAG,WAAqB,CAAC;QACrC,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,MAAM,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;YAC7D,MAAkC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;QAC3D,CAAC;QACD,MAAM,IAAI,GAAI,MAAkC,CAAC,YAAY,CAAkB,CAAC;QAChF,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;YAAE,OAAO;QAC1C,IAAI,CAAC,IAAI,CAAC;YACN,GAAG;YACH,MAAM;YACN,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACnD,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC","sourcesContent":["import { mostDerived, type PropertyEditor } from \"@/attributes/properties/decorator\";\r\n\r\n/**\r\n * Marks a method as a command: a named, parameterised animation a host can\r\n * offer, place on a timeline and store by name. Metadata only.\r\n *\r\n * ```ts\r\n * @command({ args: [\"index\"] })\r\n * showSeries({ data, duration = 1, easing }: CommandArgs<{ index: number }>): Command<ChartProps> {\r\n * …\r\n * }\r\n * ```\r\n *\r\n * `args` maps a stored command's `params` object onto `data`'s keys — see\r\n * {@link CommandMeta.args}. Every command takes one {@link CommandArgs}\r\n * argument rather than positional params, so a manifest can read its shape\r\n * off `T` directly.\r\n */\r\n\r\n/** One argument a command takes, in the same vocabulary a property uses ({@link PropertyEditor}) — a range, an enum, a unit. A bare string is a name with nothing else to say. */\r\nexport interface CommandArgDescriptor extends PropertyEditor {\r\n /** The key under a `CommandSpec`'s `params` this is read from. */\r\n key: string;\r\n default?: unknown;\r\n}\r\n\r\nexport type CommandArg = string | CommandArgDescriptor;\r\n\r\n/** Symbol under which `@command` metadata is stored on class prototypes. */\r\nexport const COMMAND_META = Symbol(\"commandMeta\");\r\n\r\nexport interface CommandMeta {\r\n /** The key a host stores and dispatches on: the method name unless `@command({ key })` renamed it. */\r\n key: string;\r\n /** The decorated method, which dispatching {@link key} calls. */\r\n method: string;\r\n /** Display name; built-ins leave this unset and localize by {@link key} instead. */\r\n name?: string;\r\n /**\r\n * Keys of `params` that become `data`'s fields, in a document. Written here\r\n * rather than derived from the method's own parameter names, which a\r\n * minifier mangles and which don't match the document vocabulary anyway\r\n * (`data`/`duration`/`easing`, not `index` or `wobble`).\r\n */\r\n args?: readonly CommandArg[];\r\n /** Withdrawn by a subclass: unpublished, still dispatched. See `withdraw`. */\r\n withdrawn?: boolean;\r\n}\r\n\r\nexport interface CommandOptions {\r\n /** Publishes the method under another key, for a name the method cannot take (a prop, an inherited method). */\r\n key?: string;\r\n name?: string;\r\n args?: readonly CommandArg[];\r\n}\r\n\r\n/**\r\n * Every `@command` on an instance's class, inherited included, base → subclass.\r\n * A subclass that redeclares a key replaces the inherited declaration — method,\r\n * name and args — at the position the base gave it.\r\n */\r\nexport function getCommandMeta(instance: object): CommandMeta[] {\r\n return mostDerived<CommandMeta>(instance, COMMAND_META);\r\n}\r\n\r\n/** See the module docblock. */\r\nexport function command(options?: CommandOptions) {\r\n return function (target: object, propertyKey: string | symbol): void {\r\n const method = propertyKey as string;\r\n const key = options?.key ?? method;\r\n if (!Object.prototype.hasOwnProperty.call(target, COMMAND_META)) {\r\n (target as Record<symbol, unknown>)[COMMAND_META] = [];\r\n }\r\n const list = (target as Record<symbol, unknown>)[COMMAND_META] as CommandMeta[];\r\n if (list.some(m => m.key === key)) return;\r\n list.push({\r\n key,\r\n method,\r\n ...(options?.name ? { name: options.name } : {}),\r\n ...(options?.args ? { args: options.args } : {}),\r\n });\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"command-decorator.js","sourceRoot":"","sources":["../../src/tween/command-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,mCAAmC,CAAC;AA4BrF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAgClD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC3C,OAAO,WAAW,CAAc,QAAQ,EAAE,YAAY,CAAC,CAAC;AAC5D,CAAC;AAED,+BAA+B;AAC/B,MAAM,UAAU,OAAO,CAAC,OAAwB;IAC5C,OAAO,UAAU,MAAc,EAAE,WAA4B;QACzD,MAAM,MAAM,GAAG,WAAqB,CAAC;QACrC,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,MAAM,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;YAC7D,MAAkC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;QAC3D,CAAC;QACD,MAAM,IAAI,GAAI,MAAkC,CAAC,YAAY,CAAkB,CAAC;QAChF,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;YAAE,OAAO;QAC1C,IAAI,CAAC,IAAI,CAAC;YACN,GAAG;YACH,MAAM;YACN,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACnD,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC","sourcesContent":["import { mostDerived, type PropertyEditor } from \"@/attributes/properties/decorator\";\r\n\r\n/**\r\n * Marks a method as a command: a named, parameterised animation a host can\r\n * offer, place on a timeline and store by name. Metadata only.\r\n *\r\n * ```ts\r\n * class Chart extends Node2D<ChartProps> {\r\n * showSeries({ data, duration = 1, easing }: CommandArgs<{ index: number }>): Command<ChartProps> { … }\r\n * }\r\n * declareMembers(Chart, { showSeries: command({ args: [\"index\"] }) });\r\n * ```\r\n *\r\n * `args` maps a stored command's `params` object onto `data`'s keys — see\r\n * {@link CommandMeta.args}. Every command takes one {@link CommandArgs}\r\n * argument rather than positional params, so a manifest can read its shape\r\n * off `T` directly.\r\n */\r\n\r\n/** One argument a command takes, in the same vocabulary a property uses ({@link PropertyEditor}) — a range, an enum, a unit. A bare string is a name with nothing else to say. */\r\nexport interface CommandArgDescriptor extends PropertyEditor {\r\n /** The key under a `CommandSpec`'s `params` this is read from. */\r\n key: string;\r\n default?: unknown;\r\n}\r\n\r\nexport type CommandArg = string | CommandArgDescriptor;\r\n\r\n/** Symbol under which `command` metadata is stored on class prototypes. */\r\nexport const COMMAND_META = Symbol(\"commandMeta\");\r\n\r\nexport interface CommandMeta {\r\n /** The key a host stores and dispatches on: the method name unless `command({ key })` renamed it. */\r\n key: string;\r\n /** The method, which dispatching {@link key} calls. */\r\n method: string;\r\n /** Display name; built-ins leave this unset and localize by {@link key} instead. */\r\n name?: string;\r\n /**\r\n * Keys of `params` that become `data`'s fields, in a document. Written here\r\n * rather than derived from the method's own parameter names, which a\r\n * minifier mangles and which don't match the document vocabulary anyway\r\n * (`data`/`duration`/`easing`, not `index` or `wobble`).\r\n */\r\n args?: readonly CommandArg[];\r\n /**\r\n * Brings its target in: a timeline holds its first frame from the moment\r\n * the target could first show it, so the resting node never flashes up\r\n * ahead of it. The hold window is in `docs/timeline.md`.\r\n */\r\n entrance?: boolean;\r\n}\r\n\r\nexport interface CommandOptions {\r\n /** Publishes the method under another key, for a name the method cannot take (a prop, an inherited method). */\r\n key?: string;\r\n name?: string;\r\n args?: readonly CommandArg[];\r\n entrance?: boolean;\r\n}\r\n\r\n/**\r\n * Every `command` on an instance's class, inherited included, base → subclass.\r\n * A subclass that redeclares a key replaces the inherited declaration — method,\r\n * name and args — at the position the base gave it.\r\n */\r\nexport function getCommandMeta(instance: object): CommandMeta[] {\r\n return mostDerived<CommandMeta>(instance, COMMAND_META);\r\n}\r\n\r\n/** See the module docblock. */\r\nexport function command(options?: CommandOptions) {\r\n return function (target: object, propertyKey: string | symbol): void {\r\n const method = propertyKey as string;\r\n const key = options?.key ?? method;\r\n if (!Object.prototype.hasOwnProperty.call(target, COMMAND_META)) {\r\n (target as Record<symbol, unknown>)[COMMAND_META] = [];\r\n }\r\n const list = (target as Record<symbol, unknown>)[COMMAND_META] as CommandMeta[];\r\n if (list.some(m => m.key === key)) return;\r\n list.push({\r\n key,\r\n method,\r\n ...(options?.name ? { name: options.name } : {}),\r\n ...(options?.args ? { args: options.args } : {}),\r\n ...(options?.entrance ? { entrance: true } : {}),\r\n });\r\n };\r\n}\r\n"]}
@@ -15,7 +15,7 @@ export interface Command<P = Record<string, unknown>> extends Steppable {
15
15
  at(t: number): Partial<P>;
16
16
  }
17
17
  /**
18
- * The single argument a `@command()` method takes: its own params under `data`,
18
+ * The single argument a `command()` method takes: its own params under `data`,
19
19
  * plus shared timing. One object (not positional args) so a manifest can read a
20
20
  * command's shape off `T` directly.
21
21
  *
@@ -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,UA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C,CAAC,CAAC,CAAC,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtF,OAAO;QACH,QAAQ;QACR,wEAAwE;QACxE,yEAAyE;QACzE,sEAAsE;QACtE,kEAAkE;QAClE,iEAAiE;QACjE,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\";\r\nimport { EasingFunction } from \"./ease/type\";\r\nimport { loopPasses, loopPhase, loopSpan, type LoopSpec } from \"./loop\";\r\nimport { LerpFunction } from \"./lerp\";\r\nimport { Steppable, TweenStepper } from \"./stepper\";\r\n\r\n/**\r\n * A named animation, as a value: `at(t)` is a pure function of normalized time,\r\n * so a host can ask what frame N looks like without replaying frames 0..N-1.\r\n *\r\n * `at` is only pure once *built* — a factory reads the node's current props to\r\n * fix its start value, so a host evaluating out of order must build commands in\r\n * timeline order, leaving each node in the state the previous command left it.\r\n */\r\nexport interface Command<P = Record<string, unknown>> extends Steppable {\r\n readonly duration: number;\r\n at(t: number): Partial<P>;\r\n}\r\n\r\n/**\r\n * The single argument a `@command()` method takes: its own params under `data`,\r\n * plus shared timing. One object (not positional args) so a manifest can read a\r\n * command's shape off `T` directly.\r\n *\r\n * `duration`/`data` are optional for a command with a synchronous mode\r\n * (`restore`, `addChildAt`) or nothing to carry (`restore`).\r\n *\r\n * `R` differs from `T` when `data` is loose author input (`Fill`) but `lerp`\r\n * operates on its resolved form (`FillResolved[]`).\r\n */\r\nexport interface CommandArgs<T = Record<string, unknown>, R = T> {\r\n data?: T;\r\n duration?: number;\r\n easing?: EasingFunction;\r\n lerp?: LerpFunction<R>;\r\n}\r\n\r\nconst SETTLES = Symbol(\"settles\");\r\n\r\n/**\r\n * Mark a command whose `at` reads nothing but what it captured when it was built\r\n * and does nothing but write prop slots, its end values all at `at(1)`. A\r\n * timeline may then hold it finished by writing those end values instead of\r\n * running it — see `document/settled-index`.\r\n */\r\nexport function settling<C extends { at(t: number): unknown }>(command: C): C {\r\n (command as unknown as Record<symbol, boolean>)[SETTLES] = true;\r\n return command;\r\n}\r\n\r\nexport function settles(command: { at(t: number): unknown }): boolean {\r\n return (command as unknown as Record<symbol, boolean>)[SETTLES] === true;\r\n}\r\n\r\n/** True when `x` is a {@link Command} rather than a plain object. */\r\nexport function isCommand(x: unknown): x is Command {\r\n return typeof (x as Command)?.at === \"function\"\r\n && typeof (x as Command)?.duration === \"number\";\r\n}\r\n\r\n/** What a {@link Command} writes its evaluated props onto. */\r\nexport interface CommandTarget<P> {\r\n set(props: Partial<P>): void;\r\n}\r\n\r\n/** Build a {@link Command} from a pure `t → props` function. `easing` is applied inside, so `at` itself takes raw normalized time. */\r\nexport function makeCommand<P>(\r\n target: CommandTarget<P>,\r\n at: (t: number) => Partial<P>,\r\n duration: number,\r\n easing?: EasingFunction,\r\n): Command<P> {\r\n const value = (t: number): Partial<P> => at(easing ? easing(clamp01(t)) : clamp01(t));\r\n return fromValue(target, duration, value);\r\n}\r\n\r\n/**\r\n * A {@link Command} whose product is a side effect rather than props — for state\r\n * a `set()` can't reach (a private field, an array element).\r\n *\r\n * `apply` must be a pure function of `t`: it can run for any `t`, any number of\r\n * times, in any order. Accumulating (`x += …`) instead of assigning from `t`\r\n * looks right forwards and drifts the instant anything scrubs.\r\n */\r\nexport function driveCommand(\r\n duration: number,\r\n apply: (t: number) => void,\r\n easing?: EasingFunction,\r\n): Command<Record<string, never>> {\r\n const sink: CommandTarget<Record<string, never>> = { set: () => { } };\r\n return makeCommand(sink, (t) => {\r\n apply(t);\r\n return {};\r\n }, duration, easing);\r\n}\r\n\r\n/**\r\n * Repeat `command`, as one seekable {@link Command} that lasts for every pass.\r\n *\r\n * Wrapping rather than a parameter on each command is what makes this work for\r\n * every command there is: the inner one is asked for the frame at a pass-local\r\n * `t`, so it never learns it is being repeated, and its easing applies per pass\r\n * — which is what \"three bounces\" means, rather than one ease stretched over\r\n * three of them.\r\n *\r\n * `fill` is the seconds an unlimited loop (`count: null`) may cover; it defaults\r\n * to a single pass, since a command built outside a timeline has no clip to fill.\r\n * A stamp (`duration === 0`) is returned untouched: there is no pass to repeat.\r\n */\r\nexport function loopCommand<P>(command: Command<P>, loop: LoopSpec, fill?: number): Command<P> {\r\n const one = command.duration;\r\n if (one <= 0 || loopPasses(loop) <= 1) return command;\r\n const duration = loopSpan(loop, one, fill);\r\n const value = (t: number): Partial<P> => command.at(loopPhase(loop, clamp01(t) * duration, one));\r\n\r\n return {\r\n duration,\r\n at: value,\r\n _stepper(): TweenStepper {\r\n let elapsed = 0;\r\n return {\r\n seek: (e: number) => {\r\n elapsed = e;\r\n value(e / duration);\r\n },\r\n advance: (dt: number): boolean => {\r\n elapsed += dt;\r\n const done = elapsed >= duration;\r\n value(done ? 1 : elapsed / duration);\r\n return done;\r\n },\r\n };\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * Run `commands` one after another as a single seekable {@link Command}.\r\n *\r\n * A finished child holds at `at(1)` rather than being dropped, so a prop\r\n * written early keeps its value once its step ends.\r\n */\r\nexport function commandSequence<P>(\r\n target: CommandTarget<P>,\r\n ...commands: Command<P>[]\r\n): Command<P> {\r\n const duration = commands.reduce((sum, c) => sum + c.duration, 0);\r\n\r\n return fromValue(target, duration, (t) => {\r\n const elapsed = t * duration;\r\n const props: Partial<P> = {};\r\n let cursor = 0;\r\n for (const command of commands) {\r\n if (elapsed < cursor) break;\r\n const local = command.duration > 0 ? (elapsed - cursor) / command.duration : 1;\r\n Object.assign(props, command.at(clamp01(local)));\r\n cursor += command.duration;\r\n }\r\n return props;\r\n });\r\n}\r\n\r\n/** Run `commands` together as one {@link Command}, ending when the longest does. Later commands win on a shared prop. */\r\nexport function commandParallel<P>(\r\n target: CommandTarget<P>,\r\n ...commands: Command<P>[]\r\n): Command<P> {\r\n const duration = commands.reduce((max, c) => Math.max(max, c.duration), 0);\r\n\r\n return fromValue(target, duration, (t) => {\r\n const elapsed = t * duration;\r\n const props: Partial<P> = {};\r\n for (const command of commands) {\r\n const local = command.duration > 0 ? elapsed / command.duration : 1;\r\n Object.assign(props, command.at(clamp01(local)));\r\n }\r\n return props;\r\n });\r\n}\r\n\r\n/** Wrap a pure `t → props` function into the full {@link Command} surface. */\r\nfunction fromValue<P>(\r\n target: CommandTarget<P>,\r\n duration: number,\r\n value: (t: number) => Partial<P>,\r\n): Command<P> {\r\n const progress = (elapsed: number): number => (duration > 0 ? elapsed / duration : 1);\r\n\r\n return {\r\n duration,\r\n // Writes as well as returns. A host evaluating a timeline calls `at(t)`\r\n // and discards what comes back — `ToCommand` has always applied its step\r\n // as a side effect, and a `Command` built from a `t → props` function\r\n // that only *described* its frame was silently inert everywhere a\r\n // document is seeked, while behaving correctly under `_stepper`.\r\n at(t: number): Partial<P> {\r\n const props = value(t);\r\n target.set(props);\r\n return props;\r\n },\r\n\r\n _stepper(): TweenStepper {\r\n let elapsed = 0;\r\n return {\r\n seek: (e: number) => {\r\n elapsed = e;\r\n target.set(value(progress(e)));\r\n },\r\n advance: (dt: number): boolean => {\r\n elapsed += dt;\r\n const done = elapsed >= duration;\r\n target.set(value(done ? 1 : progress(elapsed)));\r\n return done;\r\n },\r\n };\r\n },\r\n };\r\n}\r\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;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,CAAS,EAAc,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACtF,OAAO,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;GAOG;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Q,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\";\r\nimport { EasingFunction } from \"./ease/type\";\r\nimport { loopPasses, loopPhase, loopSpan, type LoopSpec } from \"./loop\";\r\nimport { LerpFunction } from \"./lerp\";\r\nimport { Steppable, TweenStepper } from \"./stepper\";\r\n\r\n/**\r\n * A named animation, as a value: `at(t)` is a pure function of normalized time,\r\n * so a host can ask what frame N looks like without replaying frames 0..N-1.\r\n *\r\n * `at` is only pure once *built* — a factory reads the node's current props to\r\n * fix its start value, so a host evaluating out of order must build commands in\r\n * timeline order, leaving each node in the state the previous command left it.\r\n */\r\nexport interface Command<P = Record<string, unknown>> extends Steppable {\r\n readonly duration: number;\r\n at(t: number): Partial<P>;\r\n}\r\n\r\n/**\r\n * The single argument a `command()` method takes: its own params under `data`,\r\n * plus shared timing. One object (not positional args) so a manifest can read a\r\n * command's shape off `T` directly.\r\n *\r\n * `duration`/`data` are optional for a command with a synchronous mode\r\n * (`restore`, `addChildAt`) or nothing to carry (`restore`).\r\n *\r\n * `R` differs from `T` when `data` is loose author input (`Fill`) but `lerp`\r\n * operates on its resolved form (`FillResolved[]`).\r\n */\r\nexport interface CommandArgs<T = Record<string, unknown>, R = T> {\r\n data?: T;\r\n duration?: number;\r\n easing?: EasingFunction;\r\n lerp?: LerpFunction<R>;\r\n}\r\n\r\nconst SETTLES = Symbol(\"settles\");\r\n\r\n/**\r\n * Mark a command whose `at` reads nothing but what it captured when it was built\r\n * and does nothing but write prop slots, its end values all at `at(1)`. A\r\n * timeline may then hold it finished by writing those end values instead of\r\n * running it — see `document/settled-index`.\r\n */\r\nexport function settling<C extends { at(t: number): unknown }>(command: C): C {\r\n (command as unknown as Record<symbol, boolean>)[SETTLES] = true;\r\n return command;\r\n}\r\n\r\nexport function settles(command: { at(t: number): unknown }): boolean {\r\n return (command as unknown as Record<symbol, boolean>)[SETTLES] === true;\r\n}\r\n\r\n/** True when `x` is a {@link Command} rather than a plain object. */\r\nexport function isCommand(x: unknown): x is Command {\r\n return typeof (x as Command)?.at === \"function\"\r\n && typeof (x as Command)?.duration === \"number\";\r\n}\r\n\r\n/** What a {@link Command} writes its evaluated props onto. */\r\nexport interface CommandTarget<P> {\r\n set(props: Partial<P>): void;\r\n}\r\n\r\n/** Build a {@link Command} from a pure `t → props` function. `easing` is applied inside, so `at` itself takes raw normalized time. */\r\nexport function makeCommand<P>(\r\n target: CommandTarget<P>,\r\n at: (t: number) => Partial<P>,\r\n duration: number,\r\n easing?: EasingFunction,\r\n): Command<P> {\r\n const value = (t: number): Partial<P> => at(easing ? easing(clamp01(t)) : clamp01(t));\r\n return fromValue(target, duration, value);\r\n}\r\n\r\n/**\r\n * A {@link Command} whose product is a side effect rather than props — for state\r\n * a `set()` can't reach (a private field, an array element).\r\n *\r\n * `apply` must be a pure function of `t`: it can run for any `t`, any number of\r\n * times, in any order. Accumulating (`x += …`) instead of assigning from `t`\r\n * looks right forwards and drifts the instant anything scrubs.\r\n */\r\nexport function driveCommand(\r\n duration: number,\r\n apply: (t: number) => void,\r\n easing?: EasingFunction,\r\n): Command<Record<string, never>> {\r\n const sink: CommandTarget<Record<string, never>> = { set: () => { } };\r\n return makeCommand(sink, (t) => {\r\n apply(t);\r\n return {};\r\n }, duration, easing);\r\n}\r\n\r\n/**\r\n * Repeat `command`, as one seekable {@link Command} that lasts for every pass.\r\n *\r\n * Wrapping rather than a parameter on each command is what makes this work for\r\n * every command there is: the inner one is asked for the frame at a pass-local\r\n * `t`, so it never learns it is being repeated, and its easing applies per pass\r\n * — which is what \"three bounces\" means, rather than one ease stretched over\r\n * three of them.\r\n *\r\n * `fill` is the seconds an unlimited loop (`count: null`) may cover; it defaults\r\n * to a single pass, since a command built outside a timeline has no clip to fill.\r\n * A stamp (`duration === 0`) is returned untouched: there is no pass to repeat.\r\n */\r\nexport function loopCommand<P>(command: Command<P>, loop: LoopSpec, fill?: number): Command<P> {\r\n const one = command.duration;\r\n if (one <= 0 || loopPasses(loop) <= 1) return command;\r\n const duration = loopSpan(loop, one, fill);\r\n const value = (t: number): Partial<P> => command.at(loopPhase(loop, clamp01(t) * duration, one));\r\n\r\n return {\r\n duration,\r\n at: value,\r\n _stepper(): TweenStepper {\r\n let elapsed = 0;\r\n return {\r\n seek: (e: number) => {\r\n elapsed = e;\r\n value(e / duration);\r\n },\r\n advance: (dt: number): boolean => {\r\n elapsed += dt;\r\n const done = elapsed >= duration;\r\n value(done ? 1 : elapsed / duration);\r\n return done;\r\n },\r\n };\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * Run `commands` one after another as a single seekable {@link Command}.\r\n *\r\n * A finished child holds at `at(1)` rather than being dropped, so a prop\r\n * written early keeps its value once its step ends.\r\n */\r\nexport function commandSequence<P>(\r\n target: CommandTarget<P>,\r\n ...commands: Command<P>[]\r\n): Command<P> {\r\n const duration = commands.reduce((sum, c) => sum + c.duration, 0);\r\n\r\n return fromValue(target, duration, (t) => {\r\n const elapsed = t * duration;\r\n const props: Partial<P> = {};\r\n let cursor = 0;\r\n for (const command of commands) {\r\n if (elapsed < cursor) break;\r\n const local = command.duration > 0 ? (elapsed - cursor) / command.duration : 1;\r\n Object.assign(props, command.at(clamp01(local)));\r\n cursor += command.duration;\r\n }\r\n return props;\r\n });\r\n}\r\n\r\n/** Run `commands` together as one {@link Command}, ending when the longest does. Later commands win on a shared prop. */\r\nexport function commandParallel<P>(\r\n target: CommandTarget<P>,\r\n ...commands: Command<P>[]\r\n): Command<P> {\r\n const duration = commands.reduce((max, c) => Math.max(max, c.duration), 0);\r\n\r\n return fromValue(target, duration, (t) => {\r\n const elapsed = t * duration;\r\n const props: Partial<P> = {};\r\n for (const command of commands) {\r\n const local = command.duration > 0 ? elapsed / command.duration : 1;\r\n Object.assign(props, command.at(clamp01(local)));\r\n }\r\n return props;\r\n });\r\n}\r\n\r\n/** Wrap a pure `t → props` function into the full {@link Command} surface. */\r\nfunction fromValue<P>(\r\n target: CommandTarget<P>,\r\n duration: number,\r\n value: (t: number) => Partial<P>,\r\n): Command<P> {\r\n const progress = (elapsed: number): number => (duration > 0 ? elapsed / duration : 1);\r\n\r\n return {\r\n duration,\r\n // Writes as well as returns. A host evaluating a timeline calls `at(t)`\r\n // and discards what comes back — `ToCommand` has always applied its step\r\n // as a side effect, and a `Command` built from a `t → props` function\r\n // that only *described* its frame was silently inert everywhere a\r\n // document is seeked, while behaving correctly under `_stepper`.\r\n at(t: number): Partial<P> {\r\n const props = value(t);\r\n target.set(props);\r\n return props;\r\n },\r\n\r\n _stepper(): TweenStepper {\r\n let elapsed = 0;\r\n return {\r\n seek: (e: number) => {\r\n elapsed = e;\r\n target.set(value(progress(e)));\r\n },\r\n advance: (dt: number): boolean => {\r\n elapsed += dt;\r\n const done = elapsed >= duration;\r\n target.set(value(done ? 1 : progress(elapsed)));\r\n return done;\r\n },\r\n };\r\n },\r\n };\r\n}\r\n"]}
@@ -1,6 +1,8 @@
1
1
  import type { EasingFunction } from "./type.js";
2
2
  /** Record what `ease` is, and hand it back. @internal */
3
3
  export declare function describeEase<F extends EasingFunction>(ease: F, description: string): F;
4
+ /** What an engine-built ease was recorded as, or `undefined` for any other function. @internal */
5
+ export declare function easeDescription(ease: EasingFunction): string | undefined;
4
6
  /**
5
7
  * A string that is equal for two easings exactly when they are the same ease.
6
8
  *
@@ -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;;;;;;;;;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;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"}
@@ -13,6 +13,10 @@ export function describeEase(ease, description) {
13
13
  descriptions.set(ease, description);
14
14
  return ease;
15
15
  }
16
+ /** What an engine-built ease was recorded as, or `undefined` for any other function. @internal */
17
+ export function easeDescription(ease) {
18
+ return descriptions.get(ease);
19
+ }
16
20
  /**
17
21
  * A string that is equal for two easings exactly when they are the same ease.
18
22
  *
@@ -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;;;;;;;;;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\";\r\n\r\n/**\r\n * Descriptions of engine-built easings, by function.\r\n *\r\n * Every engine easing is an anonymous closure, so `fn.name` is `\"\"` and cannot\r\n * tell two of them apart. A constructor that knows what it built records a short,\r\n * deterministic description here, which is what a cache key can be built from.\r\n */\r\nconst descriptions = new WeakMap<EasingFunction, string>();\r\nconst identities = new WeakMap<EasingFunction, string>();\r\nlet identityCounter = 0;\r\n\r\n/** Record what `ease` is, and hand it back. @internal */\r\nexport function describeEase<F extends EasingFunction>(ease: F, description: string): F {\r\n descriptions.set(ease, description);\r\n return ease;\r\n}\r\n\r\n/**\r\n * A string that is equal for two easings exactly when they are the same ease.\r\n *\r\n * An engine easing keys by its description, so building the same one twice (a\r\n * document rebuilt from the same row) gives the same key. A function the engine\r\n * did not build keys by its own identity: a different function is always a\r\n * different key, which may over-report a change but never hides one.\r\n *\r\n * @internal\r\n */\r\nexport function easeKey(ease: EasingFunction): string {\r\n const described = descriptions.get(ease);\r\n if (described !== undefined) return described;\r\n let id = identities.get(ease);\r\n if (id === undefined) {\r\n id = `fn#${identityCounter++}`;\r\n identities.set(ease, id);\r\n }\r\n return id;\r\n}\r\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;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\";\r\n\r\n/**\r\n * Descriptions of engine-built easings, by function.\r\n *\r\n * Every engine easing is an anonymous closure, so `fn.name` is `\"\"` and cannot\r\n * tell two of them apart. A constructor that knows what it built records a short,\r\n * deterministic description here, which is what a cache key can be built from.\r\n */\r\nconst descriptions = new WeakMap<EasingFunction, string>();\r\nconst identities = new WeakMap<EasingFunction, string>();\r\nlet identityCounter = 0;\r\n\r\n/** Record what `ease` is, and hand it back. @internal */\r\nexport function describeEase<F extends EasingFunction>(ease: F, description: string): F {\r\n descriptions.set(ease, description);\r\n return ease;\r\n}\r\n\r\n/** What an engine-built ease was recorded as, or `undefined` for any other function. @internal */\r\nexport function easeDescription(ease: EasingFunction): string | undefined {\r\n return descriptions.get(ease);\r\n}\r\n\r\n/**\r\n * A string that is equal for two easings exactly when they are the same ease.\r\n *\r\n * An engine easing keys by its description, so building the same one twice (a\r\n * document rebuilt from the same row) gives the same key. A function the engine\r\n * did not build keys by its own identity: a different function is always a\r\n * different key, which may over-report a change but never hides one.\r\n *\r\n * @internal\r\n */\r\nexport function easeKey(ease: EasingFunction): string {\r\n const described = descriptions.get(ease);\r\n if (described !== undefined) return described;\r\n let id = identities.get(ease);\r\n if (id === undefined) {\r\n id = `fn#${identityCounter++}`;\r\n identities.set(ease, id);\r\n }\r\n return id;\r\n}\r\n"]}
@@ -0,0 +1,31 @@
1
+ import { type EaseParams } from "./constants.js";
2
+ import { type CurvePoint } from "./curve.js";
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
+ */
15
+ export interface EaseSpec {
16
+ 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
+ */
24
+ args?: EaseParams | CurvePoint[] | string;
25
+ }
26
+ export declare const EASE_KINDS: ReadonlySet<string>;
27
+ /** The function `spec` runs as. A registry key resolves through `lookup`, and throws without one. */
28
+ export declare function easeOfSpec(spec: EaseSpec, lookup?: (key: string) => EasingFunction | undefined, known?: () => readonly string[]): EasingFunction;
29
+ /** The spec an engine-built ease was made from, or `undefined` for a function the engine did not build. */
30
+ export declare function specOfEase(ease: EasingFunction): EaseSpec | undefined;
31
+ //# sourceMappingURL=spec.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,51 @@
1
+ import { easeIn, easeInOut, easeOut, linear } from "./constants.js";
2
+ import { curveEase, isEaseCurve } from "./curve.js";
3
+ import { easeDescription } from "./describe.js";
4
+ export const EASE_KINDS = new Set(["linear", "in", "out", "inOut", "custom"]);
5
+ /** The function `spec` runs as. A registry key resolves through `lookup`, and throws without one. */
6
+ export function easeOfSpec(spec, lookup, known) {
7
+ switch (spec.kind) {
8
+ case "linear": return linear();
9
+ case "in": return easeIn(spec.args);
10
+ case "out": return easeOut(spec.args);
11
+ case "inOut": return easeInOut(spec.args);
12
+ case "custom": {
13
+ const key = spec.args;
14
+ if (isEaseCurve(key))
15
+ return curveEase(key);
16
+ if (typeof key !== "string") {
17
+ throw new Error(`A "custom" ease needs a curve or its Registry.addEase key in \`args\` (got ${JSON.stringify(spec.args)}).`);
18
+ }
19
+ const fn = lookup?.(key);
20
+ if (!fn) {
21
+ const registered = known?.().join(", ") || "none";
22
+ throw new Error(lookup
23
+ ? `No ease registered under "${key}". Registered: ${registered}.`
24
+ : `The ease "${key}" names a Registry entry, which nothing here can resolve; use a standard ease or a drawn curve.`);
25
+ }
26
+ return fn;
27
+ }
28
+ }
29
+ }
30
+ const STANDARD = new Set(["sine", "quad", "cubic", "quart", "quint", "expo", "circ", "back", "elastic", "bounce"]);
31
+ /** The spec an engine-built ease was made from, or `undefined` for a function the engine did not build. */
32
+ export function specOfEase(ease) {
33
+ const description = easeDescription(ease);
34
+ if (description === undefined)
35
+ return undefined;
36
+ if (description === "lin")
37
+ return { kind: "linear" };
38
+ if (description.startsWith("curve:"))
39
+ return { kind: "custom", args: JSON.parse(description.slice(6)) };
40
+ const [direction, type, overshoot, amplitude, period] = description.split(":");
41
+ if ((direction !== "in" && direction !== "out" && direction !== "inOut") || !STANDARD.has(type))
42
+ return undefined;
43
+ const tuning = { overshoot, amplitude, period };
44
+ const config = { type };
45
+ for (const [name, value] of Object.entries(tuning)) {
46
+ if (value !== undefined && value !== "_")
47
+ config[name] = Number(value);
48
+ }
49
+ return { kind: direction, args: Object.keys(config).length === 1 ? type : config };
50
+ }
51
+ //# sourceMappingURL=spec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,OAAO,SAAS,CAAC;IAClH,MAAM,MAAM,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IAChD,MAAM,MAAM,GAA4B,EAAE,IAAI,EAAE,CAAC;IACjD,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACjD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,GAAG;YAAE,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3E,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\";\r\nimport { curveEase, isEaseCurve, type CurvePoint } from \"./curve\";\r\nimport { easeDescription } from \"./describe\";\r\nimport type { EasingFunction } from \"./type\";\r\n\r\n/**\r\n * How something eases, as data.\r\n *\r\n * Mirrors the `linear`/`easeIn`/`easeOut`/`easeInOut` families in\r\n * `tween/ease/constants.ts` — `kind` picks the direction, `args` picks the\r\n * family and its knobs.\r\n *\r\n * `kind: \"custom\"` takes a drawn curve in `args`, or the key a host passed to\r\n * `Registry.addEase`/`RegistryOptions.eases` for an ease no standard family\r\n * expresses.\r\n */\r\nexport interface EaseSpec {\r\n kind: \"linear\" | \"in\" | \"out\" | \"inOut\" | \"custom\";\r\n /**\r\n * Family and its parameters (`\"quad\"`, or `{ type: \"back\", overshoot: 2 }`)\r\n * for every `kind` but `\"custom\"`, whose `args` is instead the drawn curve\r\n * itself — a {@link CurvePoint} chain from (0, 0) to (1, 1), so the timing\r\n * travels with the document — or the `Registry.addEase` key of a function\r\n * the host registered.\r\n */\r\n args?: EaseParams | CurvePoint[] | string;\r\n}\r\n\r\nexport const EASE_KINDS: ReadonlySet<string> = new Set<EaseSpec[\"kind\"]>([\"linear\", \"in\", \"out\", \"inOut\", \"custom\"]);\r\n\r\n/** The function `spec` runs as. A registry key resolves through `lookup`, and throws without one. */\r\nexport function easeOfSpec(spec: EaseSpec, lookup?: (key: string) => EasingFunction | undefined, known?: () => readonly string[]): EasingFunction {\r\n switch (spec.kind) {\r\n case \"linear\": return linear();\r\n case \"in\": return easeIn(spec.args as EaseParams | undefined);\r\n case \"out\": return easeOut(spec.args as EaseParams | undefined);\r\n case \"inOut\": return easeInOut(spec.args as EaseParams | undefined);\r\n case \"custom\": {\r\n const key = spec.args;\r\n if (isEaseCurve(key)) return curveEase(key);\r\n if (typeof key !== \"string\") {\r\n throw new Error(`A \"custom\" ease needs a curve or its Registry.addEase key in \\`args\\` (got ${JSON.stringify(spec.args)}).`);\r\n }\r\n const fn = lookup?.(key);\r\n if (!fn) {\r\n const registered = known?.().join(\", \") || \"none\";\r\n throw new Error(lookup\r\n ? `No ease registered under \"${key}\". Registered: ${registered}.`\r\n : `The ease \"${key}\" names a Registry entry, which nothing here can resolve; use a standard ease or a drawn curve.`);\r\n }\r\n return fn;\r\n }\r\n }\r\n}\r\n\r\nconst STANDARD: ReadonlySet<string> = new Set<StandardEase>([\"sine\", \"quad\", \"cubic\", \"quart\", \"quint\", \"expo\", \"circ\", \"back\", \"elastic\", \"bounce\"]);\r\n\r\n/** The spec an engine-built ease was made from, or `undefined` for a function the engine did not build. */\r\nexport function specOfEase(ease: EasingFunction): EaseSpec | undefined {\r\n const description = easeDescription(ease);\r\n if (description === undefined) return undefined;\r\n if (description === \"lin\") return { kind: \"linear\" };\r\n if (description.startsWith(\"curve:\")) return { kind: \"custom\", args: JSON.parse(description.slice(6)) as CurvePoint[] };\r\n const [direction, type, overshoot, amplitude, period] = description.split(\":\");\r\n if ((direction !== \"in\" && direction !== \"out\" && direction !== \"inOut\") || !STANDARD.has(type)) return undefined;\r\n const tuning = { overshoot, amplitude, period };\r\n const config: Record<string, unknown> = { type };\r\n for (const [name, value] of Object.entries(tuning)) {\r\n if (value !== undefined && value !== \"_\") config[name] = Number(value);\r\n }\r\n return { kind: direction, args: Object.keys(config).length === 1 ? (type as StandardEase) : (config as EaseParams) };\r\n}\r\n"]}
@@ -4,8 +4,10 @@ export * from './ease/curve.js';
4
4
  export * from './to-command.js';
5
5
  export * from './command.js';
6
6
  export * from './loop.js';
7
- export * from './command-decorator.js';
7
+ export { COMMAND_META, getCommandMeta } from './command-decorator.js';
8
+ export type { CommandArg, CommandArgDescriptor, CommandMeta, CommandOptions } from './command-decorator.js';
8
9
  export * from './prepare.js';
9
10
  export * from './stepper.js';
10
11
  export * from './lerp.js';
12
+ export { easeOfSpec, specOfEase } from './ease/spec.js';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AAEpC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEzG,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -4,8 +4,9 @@ export * from './ease/curve.js';
4
4
  export * from './to-command.js';
5
5
  export * from './command.js';
6
6
  export * from './loop.js';
7
- export * from './command-decorator.js';
7
+ export { COMMAND_META, getCommandMeta } from './command-decorator.js';
8
8
  export * from './prepare.js';
9
9
  export * from './stepper.js';
10
10
  export * from './lerp.js';
11
+ export { easeOfSpec, specOfEase } from './ease/spec.js';
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AAEpC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC","sourcesContent":["export * from './ease/type';\r\nexport * from './ease/constants';\r\nexport * from './ease/curve';\r\n\r\nexport * from './to-command';\r\nexport * from './command';\r\nexport * from './loop';\r\nexport * from './command-decorator';\r\n\r\nexport * from './prepare';\r\nexport * from './stepper';\r\nexport * from './lerp';\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGnE,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export * from './ease/type';\r\nexport * from './ease/constants';\r\nexport * from './ease/curve';\r\n\r\nexport * from './to-command';\r\nexport * from './command';\r\nexport * from './loop';\r\nexport { COMMAND_META, getCommandMeta } from './command-decorator';\r\nexport type { CommandArg, CommandArgDescriptor, CommandMeta, CommandOptions } from './command-decorator';\r\n\r\nexport * from './prepare';\r\nexport * from './stepper';\r\nexport * from './lerp';\r\nexport { easeOfSpec, specOfEase } from './ease/spec';\r\n"]}
@@ -6,7 +6,7 @@
6
6
  * `duration` — it says when the command is running, never what it does. That is
7
7
  * why it lives out here rather than in any one command's args: the wrapper goes
8
8
  * *around* a built `Command`, so `to`, `fillTo`, `countTo` and a custom
9
- * `@command()` nobody has written yet all loop by the same code, with nothing to
9
+ * `command()` nobody has written yet all loop by the same code, with nothing to
10
10
  * forward and nothing to forget.
11
11
  *
12
12
  * And it stays seekable. A looped command is still a pure function of its own
@@ -6,7 +6,7 @@
6
6
  * `duration` — it says when the command is running, never what it does. That is
7
7
  * why it lives out here rather than in any one command's args: the wrapper goes
8
8
  * *around* a built `Command`, so `to`, `fillTo`, `countTo` and a custom
9
- * `@command()` nobody has written yet all loop by the same code, with nothing to
9
+ * `command()` nobody has written yet all loop by the same code, with nothing to
10
10
  * forward and nothing to forget.
11
11
  *
12
12
  * And it stays seekable. A looped command is still a pure function of its own