@motionscript/core 0.1.0-alpha.9 → 0.1.1-alpha.0

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 (1064) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/assets/asset-index.d.ts +1 -8
  3. package/dist/assets/asset-index.d.ts.map +1 -1
  4. package/dist/assets/asset-index.js +1 -8
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +10 -72
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +3 -29
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts +8 -20
  11. package/dist/assets/errors.d.ts.map +1 -1
  12. package/dist/assets/errors.js +8 -20
  13. package/dist/assets/errors.js.map +1 -1
  14. package/dist/assets/index.d.ts.map +1 -1
  15. package/dist/assets/index.js.map +1 -1
  16. package/dist/assets/manager.d.ts +9 -51
  17. package/dist/assets/manager.d.ts.map +1 -1
  18. package/dist/assets/manager.js +13 -78
  19. package/dist/assets/manager.js.map +1 -1
  20. package/dist/assets/record.d.ts +2 -18
  21. package/dist/assets/record.d.ts.map +1 -1
  22. package/dist/assets/record.js.map +1 -1
  23. package/dist/assets/scope.d.ts +3 -18
  24. package/dist/assets/scope.d.ts.map +1 -1
  25. package/dist/assets/scope.js +2 -11
  26. package/dist/assets/scope.js.map +1 -1
  27. package/dist/attributes/audio/effects/chain.d.ts +2 -12
  28. package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
  29. package/dist/attributes/audio/effects/chain.js +1 -7
  30. package/dist/attributes/audio/effects/chain.js.map +1 -1
  31. package/dist/attributes/audio/effects/registry.d.ts +3 -18
  32. package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
  33. package/dist/attributes/audio/effects/registry.js +4 -23
  34. package/dist/attributes/audio/effects/registry.js.map +1 -1
  35. package/dist/attributes/audio/ramp.d.ts +5 -38
  36. package/dist/attributes/audio/ramp.d.ts.map +1 -1
  37. package/dist/attributes/audio/ramp.js +3 -28
  38. package/dist/attributes/audio/ramp.js.map +1 -1
  39. package/dist/attributes/audio/request.d.ts +10 -80
  40. package/dist/attributes/audio/request.d.ts.map +1 -1
  41. package/dist/attributes/audio/request.js +1 -4
  42. package/dist/attributes/audio/request.js.map +1 -1
  43. package/dist/attributes/audio/schedule.d.ts +2 -12
  44. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  45. package/dist/attributes/audio/schedule.js +2 -11
  46. package/dist/attributes/audio/schedule.js.map +1 -1
  47. package/dist/attributes/audio/sound.d.ts +2 -26
  48. package/dist/attributes/audio/sound.d.ts.map +1 -1
  49. package/dist/attributes/audio/sound.js +1 -9
  50. package/dist/attributes/audio/sound.js.map +1 -1
  51. package/dist/attributes/audio/transition.d.ts +1 -8
  52. package/dist/attributes/audio/transition.d.ts.map +1 -1
  53. package/dist/attributes/audio/transition.js.map +1 -1
  54. package/dist/attributes/layout/alignment.d.ts +6 -38
  55. package/dist/attributes/layout/alignment.d.ts.map +1 -1
  56. package/dist/attributes/layout/alignment.js.map +1 -1
  57. package/dist/attributes/layout/insets.d.ts +2 -27
  58. package/dist/attributes/layout/insets.d.ts.map +1 -1
  59. package/dist/attributes/layout/insets.js.map +1 -1
  60. package/dist/attributes/layout/matrix2d.d.ts +29 -114
  61. package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
  62. package/dist/attributes/layout/matrix2d.js +26 -110
  63. package/dist/attributes/layout/matrix2d.js.map +1 -1
  64. package/dist/attributes/layout/size.d.ts +3 -25
  65. package/dist/attributes/layout/size.d.ts.map +1 -1
  66. package/dist/attributes/layout/size.js +2 -18
  67. package/dist/attributes/layout/size.js.map +1 -1
  68. package/dist/attributes/layout/space3d.d.ts +16 -79
  69. package/dist/attributes/layout/space3d.d.ts.map +1 -1
  70. package/dist/attributes/layout/space3d.js +17 -81
  71. package/dist/attributes/layout/space3d.js.map +1 -1
  72. package/dist/attributes/layout/transform3d.d.ts +2 -23
  73. package/dist/attributes/layout/transform3d.d.ts.map +1 -1
  74. package/dist/attributes/layout/transform3d.js +1 -7
  75. package/dist/attributes/layout/transform3d.js.map +1 -1
  76. package/dist/attributes/layout/world-transform.d.ts +2 -16
  77. package/dist/attributes/layout/world-transform.d.ts.map +1 -1
  78. package/dist/attributes/layout/world-transform.js.map +1 -1
  79. package/dist/attributes/properties/decorator.d.ts +13 -73
  80. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  81. package/dist/attributes/properties/decorator.js +9 -40
  82. package/dist/attributes/properties/decorator.js.map +1 -1
  83. package/dist/attributes/properties/typed.d.ts +6 -45
  84. package/dist/attributes/properties/typed.d.ts.map +1 -1
  85. package/dist/attributes/properties/typed.js +6 -37
  86. package/dist/attributes/properties/typed.js.map +1 -1
  87. package/dist/attributes/render3d/orbit.d.ts +11 -83
  88. package/dist/attributes/render3d/orbit.d.ts.map +1 -1
  89. package/dist/attributes/render3d/orbit.js +10 -73
  90. package/dist/attributes/render3d/orbit.js.map +1 -1
  91. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
  92. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  94. package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
  95. package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
  96. package/dist/attributes/shape/corners/corner-style.js +2 -12
  97. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  98. package/dist/attributes/shape/corners/corners.d.ts +2 -21
  99. package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js +2 -12
  101. package/dist/attributes/shape/corners/corners.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
  103. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  104. package/dist/attributes/shape/effects/backdrop.js +3 -26
  105. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  106. package/dist/attributes/shape/effects/chain.d.ts +36 -328
  107. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  108. package/dist/attributes/shape/effects/chain.js +24 -242
  109. package/dist/attributes/shape/effects/chain.js.map +1 -1
  110. package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
  111. package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
  112. package/dist/attributes/shape/effects/effect-data.js +6 -33
  113. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  114. package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
  115. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
  117. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
  119. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
  121. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
  123. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
  125. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
  127. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  128. package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
  129. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
  131. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/blur.js +0 -1
  133. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
  135. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  136. package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
  137. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  138. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
  139. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  140. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
  141. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  142. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
  143. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  144. package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
  145. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  146. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
  147. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  148. package/dist/attributes/shape/effects/implementations/curves.js +1 -6
  149. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  150. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
  151. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  152. package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
  153. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  154. package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
  155. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  156. package/dist/attributes/shape/effects/implementations/dither.js +1 -7
  157. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  158. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
  159. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  160. package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
  161. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  162. package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
  163. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  164. package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
  165. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  166. package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
  167. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  168. package/dist/attributes/shape/effects/implementations/edges.js +0 -1
  169. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  170. package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
  171. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  172. package/dist/attributes/shape/effects/implementations/glass.js +0 -1
  173. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  174. package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
  175. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  176. package/dist/attributes/shape/effects/implementations/glow.js +1 -9
  177. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  178. package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
  179. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  180. package/dist/attributes/shape/effects/implementations/grain.js +0 -1
  181. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  182. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
  183. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  184. package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
  185. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  186. package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
  187. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  188. package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
  189. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  190. package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
  191. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  192. package/dist/attributes/shape/effects/implementations/invert.js +0 -1
  193. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  194. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
  195. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  196. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
  197. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  198. package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
  199. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  200. package/dist/attributes/shape/effects/implementations/lut.js +2 -8
  201. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  202. package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
  203. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  204. package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
  205. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  206. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
  207. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  208. package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
  209. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  210. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
  211. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  212. package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
  213. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  214. package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
  215. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  216. package/dist/attributes/shape/effects/implementations/outline.js +0 -1
  217. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  218. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
  219. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  220. package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
  221. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  222. package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
  223. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  224. package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
  225. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  226. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
  227. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  228. package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
  229. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  230. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
  231. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  232. package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
  233. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  234. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
  235. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  236. package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
  237. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  238. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
  239. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  240. package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
  241. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  242. package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
  243. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  244. package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
  245. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  246. package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
  247. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  248. package/dist/attributes/shape/effects/implementations/shader.js +2 -9
  249. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  250. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
  251. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  252. package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
  253. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  254. package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
  255. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  256. package/dist/attributes/shape/effects/implementations/streak.js +0 -1
  257. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  258. package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
  259. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  260. package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
  261. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  262. package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
  263. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  264. package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
  265. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  266. package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
  267. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  268. package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
  269. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  270. package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
  271. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  272. package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
  273. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  274. package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
  275. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  276. package/dist/attributes/shape/effects/implementations/wave.js +1 -5
  277. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  278. package/dist/attributes/shape/effects/registry.d.ts +6 -41
  279. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  280. package/dist/attributes/shape/effects/registry.js +7 -45
  281. package/dist/attributes/shape/effects/registry.js.map +1 -1
  282. package/dist/attributes/shape/effects/spec.d.ts +6 -30
  283. package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
  284. package/dist/attributes/shape/effects/spec.js +3 -9
  285. package/dist/attributes/shape/effects/spec.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.d.ts +1 -17
  287. package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
  288. package/dist/attributes/shape/fill/blend.js +2 -15
  289. package/dist/attributes/shape/fill/blend.js.map +1 -1
  290. package/dist/attributes/shape/fill/chain.d.ts +17 -125
  291. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  292. package/dist/attributes/shape/fill/chain.js +22 -109
  293. package/dist/attributes/shape/fill/chain.js.map +1 -1
  294. package/dist/attributes/shape/fill/coerce.d.ts +10 -35
  295. package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
  296. package/dist/attributes/shape/fill/coerce.js +12 -47
  297. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  298. package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
  299. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  300. package/dist/attributes/shape/fill/color/parser.js +35 -96
  301. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  302. package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
  303. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
  304. package/dist/attributes/shape/fill/gradient-stops.js +2 -13
  305. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  306. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
  307. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
  308. package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
  309. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
  311. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
  312. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  313. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
  314. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  315. package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
  316. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  317. package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
  318. package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
  319. package/dist/attributes/shape/fill/implementations/grid.js +2 -8
  320. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  321. package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
  322. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  323. package/dist/attributes/shape/fill/implementations/image.js +6 -23
  324. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  325. package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
  326. package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
  327. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  328. package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
  329. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  330. package/dist/attributes/shape/fill/implementations/shader.js +5 -17
  331. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  332. package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
  333. package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
  334. package/dist/attributes/shape/fill/implementations/video.js +12 -50
  335. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  336. package/dist/attributes/shape/fill/lerp.d.ts +2 -13
  337. package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
  338. package/dist/attributes/shape/fill/lerp.js +2 -9
  339. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  340. package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
  341. package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
  342. package/dist/attributes/shape/fill/media-preset.js +8 -35
  343. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  344. package/dist/attributes/shape/fill/registry.d.ts +2 -26
  345. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  346. package/dist/attributes/shape/fill/registry.js +5 -40
  347. package/dist/attributes/shape/fill/registry.js.map +1 -1
  348. package/dist/attributes/shape/fill/union.d.ts +6 -30
  349. package/dist/attributes/shape/fill/union.d.ts.map +1 -1
  350. package/dist/attributes/shape/fill/union.js +1 -9
  351. package/dist/attributes/shape/fill/union.js.map +1 -1
  352. package/dist/attributes/shape/filters/chain.d.ts +15 -168
  353. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  354. package/dist/attributes/shape/filters/chain.js +8 -132
  355. package/dist/attributes/shape/filters/chain.js.map +1 -1
  356. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
  357. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  358. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  359. package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
  360. package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
  361. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  362. package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
  363. package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
  364. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  365. package/dist/attributes/shape/filters/index.d.ts +1 -6
  366. package/dist/attributes/shape/filters/index.d.ts.map +1 -1
  367. package/dist/attributes/shape/filters/index.js +0 -2
  368. package/dist/attributes/shape/filters/index.js.map +1 -1
  369. package/dist/attributes/shape/filters/registry.d.ts +5 -35
  370. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  371. package/dist/attributes/shape/filters/registry.js +7 -50
  372. package/dist/attributes/shape/filters/registry.js.map +1 -1
  373. package/dist/attributes/shape/filters/union.d.ts +10 -51
  374. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  375. package/dist/attributes/shape/filters/union.js.map +1 -1
  376. package/dist/attributes/shape/path/anchors.d.ts +18 -106
  377. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  378. package/dist/attributes/shape/path/anchors.js +15 -124
  379. package/dist/attributes/shape/path/anchors.js.map +1 -1
  380. package/dist/attributes/shape/path/bezier.d.ts +6 -54
  381. package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
  382. package/dist/attributes/shape/path/bezier.js +10 -98
  383. package/dist/attributes/shape/path/bezier.js.map +1 -1
  384. package/dist/attributes/shape/path/index.d.ts +1 -11
  385. package/dist/attributes/shape/path/index.d.ts.map +1 -1
  386. package/dist/attributes/shape/path/index.js +1 -11
  387. package/dist/attributes/shape/path/index.js.map +1 -1
  388. package/dist/attributes/shape/path/measure.d.ts +5 -41
  389. package/dist/attributes/shape/path/measure.d.ts.map +1 -1
  390. package/dist/attributes/shape/path/measure.js +8 -57
  391. package/dist/attributes/shape/path/measure.js.map +1 -1
  392. package/dist/attributes/shape/path/morph.d.ts +4 -41
  393. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  394. package/dist/attributes/shape/path/morph.js +17 -117
  395. package/dist/attributes/shape/path/morph.js.map +1 -1
  396. package/dist/attributes/shape/path/ops.d.ts +5 -19
  397. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  398. package/dist/attributes/shape/path/ops.js.map +1 -1
  399. package/dist/attributes/shape/path/types.d.ts +10 -67
  400. package/dist/attributes/shape/path/types.d.ts.map +1 -1
  401. package/dist/attributes/shape/path/types.js +0 -1
  402. package/dist/attributes/shape/path/types.js.map +1 -1
  403. package/dist/attributes/shape/path/walk.d.ts +9 -63
  404. package/dist/attributes/shape/path/walk.d.ts.map +1 -1
  405. package/dist/attributes/shape/path/walk.js +21 -100
  406. package/dist/attributes/shape/path/walk.js.map +1 -1
  407. package/dist/attributes/shape/shaders/language.d.ts +2 -14
  408. package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
  409. package/dist/attributes/shape/shaders/language.js +1 -8
  410. package/dist/attributes/shape/shaders/language.js.map +1 -1
  411. package/dist/attributes/shape/shaders/pack.d.ts +13 -78
  412. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  413. package/dist/attributes/shape/shaders/pack.js +1 -10
  414. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  415. package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
  416. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  417. package/dist/attributes/shape/shaders/resolve.js +3 -28
  418. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  419. package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
  420. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
  421. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  422. package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
  423. package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
  424. package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
  425. package/dist/attributes/shape/shadow/shadow.js +0 -3
  426. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  427. package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
  428. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  429. package/dist/attributes/shape/stroke/stroke.js +0 -6
  430. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  431. package/dist/attributes/shared/operators.d.ts +1 -8
  432. package/dist/attributes/shared/operators.d.ts.map +1 -1
  433. package/dist/attributes/shared/operators.js.map +1 -1
  434. package/dist/attributes/text/index.d.ts +1 -11
  435. package/dist/attributes/text/index.d.ts.map +1 -1
  436. package/dist/attributes/text/index.js +1 -11
  437. package/dist/attributes/text/index.js.map +1 -1
  438. package/dist/attributes/text/ops.d.ts +4 -30
  439. package/dist/attributes/text/ops.d.ts.map +1 -1
  440. package/dist/attributes/text/ops.js +7 -23
  441. package/dist/attributes/text/ops.js.map +1 -1
  442. package/dist/attributes/text/types.d.ts +5 -28
  443. package/dist/attributes/text/types.d.ts.map +1 -1
  444. package/dist/attributes/text/types.js.map +1 -1
  445. package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
  446. package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
  447. package/dist/browser/chunks/chunk-5TDMGUXQ.js +3 -0
  448. package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
  449. package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
  450. package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
  451. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  452. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/views.d.ts.map +1 -1
  510. package/dist/components/factory/views.js +41 -3
  511. package/dist/components/factory/views.js.map +1 -1
  512. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  513. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  514. package/dist/components/trees/2d/group-bounds.js +3 -22
  515. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  516. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  517. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  518. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  519. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  520. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  521. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  522. package/dist/components/trees/2d/node-motion.js +3 -31
  523. package/dist/components/trees/2d/node-motion.js.map +1 -1
  524. package/dist/components/trees/2d/node-render.d.ts +3 -20
  525. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-render.js +4 -23
  527. package/dist/components/trees/2d/node-render.js.map +1 -1
  528. package/dist/components/trees/2d/node-space.d.ts +4 -23
  529. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-space.js +3 -17
  531. package/dist/components/trees/2d/node-space.js.map +1 -1
  532. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  533. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-transform.js +4 -33
  535. package/dist/components/trees/2d/node-transform.js.map +1 -1
  536. package/dist/components/trees/2d/node2d.d.ts +112 -622
  537. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node2d.js +131 -605
  539. package/dist/components/trees/2d/node2d.js.map +1 -1
  540. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  541. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  542. package/dist/components/trees/audio/node-audio.js +18 -68
  543. package/dist/components/trees/audio/node-audio.js.map +1 -1
  544. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  545. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  546. package/dist/components/trees/node/node-editor-state.js +1 -13
  547. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  548. package/dist/components/trees/node/node-reactive.d.ts +6 -54
  549. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  550. package/dist/components/trees/node/node-reactive.js +13 -39
  551. package/dist/components/trees/node/node-reactive.js.map +1 -1
  552. package/dist/components/trees/node/node-time.d.ts +2 -15
  553. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-time.js.map +1 -1
  555. package/dist/components/trees/node/node-walk.d.ts +7 -32
  556. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  557. package/dist/components/trees/node/node-walk.js +7 -32
  558. package/dist/components/trees/node/node-walk.js.map +1 -1
  559. package/dist/components/trees/node/node.d.ts +43 -248
  560. package/dist/components/trees/node/node.d.ts.map +1 -1
  561. package/dist/components/trees/node/node.js +51 -229
  562. package/dist/components/trees/node/node.js.map +1 -1
  563. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  564. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  565. package/dist/components/trees/root/canvas2d-node.js +7 -47
  566. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  567. package/dist/components/trees/three/node3d.d.ts +24 -112
  568. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  569. package/dist/components/trees/three/node3d.js +22 -104
  570. package/dist/components/trees/three/node3d.js.map +1 -1
  571. package/dist/document/audio.d.ts +9 -21
  572. package/dist/document/audio.d.ts.map +1 -1
  573. package/dist/document/audio.js +13 -28
  574. package/dist/document/audio.js.map +1 -1
  575. package/dist/document/builtins.d.ts +3 -9
  576. package/dist/document/builtins.d.ts.map +1 -1
  577. package/dist/document/builtins.js +43 -89
  578. package/dist/document/builtins.js.map +1 -1
  579. package/dist/document/command-traits.d.ts +15 -30
  580. package/dist/document/command-traits.d.ts.map +1 -1
  581. package/dist/document/command-traits.js +31 -31
  582. package/dist/document/command-traits.js.map +1 -1
  583. package/dist/document/deny-globals.d.ts +9 -43
  584. package/dist/document/deny-globals.d.ts.map +1 -1
  585. package/dist/document/deny-globals.js +18 -58
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/diff.d.ts +6 -16
  588. package/dist/document/diff.d.ts.map +1 -1
  589. package/dist/document/diff.js +5 -11
  590. package/dist/document/diff.js.map +1 -1
  591. package/dist/document/doc-index.d.ts +5 -13
  592. package/dist/document/doc-index.d.ts.map +1 -1
  593. package/dist/document/doc-index.js +0 -2
  594. package/dist/document/doc-index.js.map +1 -1
  595. package/dist/document/expression/compile.d.ts +2 -2
  596. package/dist/document/expression/compile.d.ts.map +1 -1
  597. package/dist/document/expression/compile.js +8 -18
  598. package/dist/document/expression/compile.js.map +1 -1
  599. package/dist/document/expression/index.d.ts +11 -41
  600. package/dist/document/expression/index.d.ts.map +1 -1
  601. package/dist/document/expression/index.js +11 -41
  602. package/dist/document/expression/index.js.map +1 -1
  603. package/dist/document/expression/ops.d.ts +3 -12
  604. package/dist/document/expression/ops.d.ts.map +1 -1
  605. package/dist/document/expression/ops.js +4 -20
  606. package/dist/document/expression/ops.js.map +1 -1
  607. package/dist/document/expression/parse.d.ts +4 -14
  608. package/dist/document/expression/parse.d.ts.map +1 -1
  609. package/dist/document/expression/parse.js +34 -55
  610. package/dist/document/expression/parse.js.map +1 -1
  611. package/dist/document/expression/refs.d.ts +2 -8
  612. package/dist/document/expression/refs.d.ts.map +1 -1
  613. package/dist/document/expression/refs.js +2 -6
  614. package/dist/document/expression/refs.js.map +1 -1
  615. package/dist/document/expression/types.d.ts +18 -63
  616. package/dist/document/expression/types.d.ts.map +1 -1
  617. package/dist/document/expression/types.js +4 -15
  618. package/dist/document/expression/types.js.map +1 -1
  619. package/dist/document/expression/walk.d.ts +6 -20
  620. package/dist/document/expression/walk.d.ts.map +1 -1
  621. package/dist/document/expression/walk.js +18 -44
  622. package/dist/document/expression/walk.js.map +1 -1
  623. package/dist/document/index.js +2 -3
  624. package/dist/document/index.js.map +1 -1
  625. package/dist/document/migrate.d.ts +7 -22
  626. package/dist/document/migrate.d.ts.map +1 -1
  627. package/dist/document/migrate.js +44 -15
  628. package/dist/document/migrate.js.map +1 -1
  629. package/dist/document/missing-node.d.ts +4 -11
  630. package/dist/document/missing-node.d.ts.map +1 -1
  631. package/dist/document/missing-node.js +2 -5
  632. package/dist/document/missing-node.js.map +1 -1
  633. package/dist/document/node-decorator.d.ts +12 -53
  634. package/dist/document/node-decorator.d.ts.map +1 -1
  635. package/dist/document/node-decorator.js +16 -57
  636. package/dist/document/node-decorator.js.map +1 -1
  637. package/dist/document/node-descriptor.d.ts +25 -62
  638. package/dist/document/node-descriptor.d.ts.map +1 -1
  639. package/dist/document/node-descriptor.js.map +1 -1
  640. package/dist/document/placement.d.ts +18 -41
  641. package/dist/document/placement.d.ts.map +1 -1
  642. package/dist/document/placement.js +4 -11
  643. package/dist/document/placement.js.map +1 -1
  644. package/dist/document/project.d.ts +19 -52
  645. package/dist/document/project.d.ts.map +1 -1
  646. package/dist/document/project.js +2 -6
  647. package/dist/document/project.js.map +1 -1
  648. package/dist/document/prop-evolution.d.ts +10 -20
  649. package/dist/document/prop-evolution.d.ts.map +1 -1
  650. package/dist/document/prop-evolution.js +3 -7
  651. package/dist/document/prop-evolution.js.map +1 -1
  652. package/dist/document/registry.d.ts +80 -318
  653. package/dist/document/registry.d.ts.map +1 -1
  654. package/dist/document/registry.js +43 -147
  655. package/dist/document/registry.js.map +1 -1
  656. package/dist/document/settled-index.d.ts +12 -18
  657. package/dist/document/settled-index.d.ts.map +1 -1
  658. package/dist/document/settled-index.js +29 -31
  659. package/dist/document/settled-index.js.map +1 -1
  660. package/dist/document/timeline-patch.d.ts +6 -15
  661. package/dist/document/timeline-patch.d.ts.map +1 -1
  662. package/dist/document/timeline-patch.js +12 -21
  663. package/dist/document/timeline-patch.js.map +1 -1
  664. package/dist/document/timeline.d.ts +56 -263
  665. package/dist/document/timeline.d.ts.map +1 -1
  666. package/dist/document/timeline.js +97 -281
  667. package/dist/document/timeline.js.map +1 -1
  668. package/dist/document/types.d.ts +90 -264
  669. package/dist/document/types.d.ts.map +1 -1
  670. package/dist/document/types.js +13 -30
  671. package/dist/document/types.js.map +1 -1
  672. package/dist/document/validate.d.ts +10 -40
  673. package/dist/document/validate.d.ts.map +1 -1
  674. package/dist/document/validate.js +72 -137
  675. package/dist/document/validate.js.map +1 -1
  676. package/dist/document/vocabulary.d.ts +4 -7
  677. package/dist/document/vocabulary.d.ts.map +1 -1
  678. package/dist/document/vocabulary.js +0 -1
  679. package/dist/document/vocabulary.js.map +1 -1
  680. package/dist/index.d.ts +0 -1
  681. package/dist/index.d.ts.map +1 -1
  682. package/dist/index.js +0 -1
  683. package/dist/index.js.map +1 -1
  684. package/dist/layout/bounds.d.ts +1 -11
  685. package/dist/layout/bounds.d.ts.map +1 -1
  686. package/dist/layout/bounds.js.map +1 -1
  687. package/dist/layout/flex.d.ts +6 -20
  688. package/dist/layout/flex.d.ts.map +1 -1
  689. package/dist/layout/flex.js +7 -28
  690. package/dist/layout/flex.js.map +1 -1
  691. package/dist/layout/ops.d.ts +2 -11
  692. package/dist/layout/ops.d.ts.map +1 -1
  693. package/dist/layout/ops.js +2 -22
  694. package/dist/layout/ops.js.map +1 -1
  695. package/dist/layout/types.d.ts +11 -55
  696. package/dist/layout/types.d.ts.map +1 -1
  697. package/dist/layout/types.js.map +1 -1
  698. package/dist/platform/audio-sink.d.ts +7 -43
  699. package/dist/platform/audio-sink.d.ts.map +1 -1
  700. package/dist/platform/audio-sink.js +4 -29
  701. package/dist/platform/audio-sink.js.map +1 -1
  702. package/dist/platform/exporter.d.ts +5 -31
  703. package/dist/platform/exporter.d.ts.map +1 -1
  704. package/dist/platform/exporter.js.map +1 -1
  705. package/dist/platform/stepped-clock.d.ts +1 -16
  706. package/dist/platform/stepped-clock.d.ts.map +1 -1
  707. package/dist/platform/stepped-clock.js +1 -16
  708. package/dist/platform/stepped-clock.js.map +1 -1
  709. package/dist/platform/storage-adapter.d.ts +8 -68
  710. package/dist/platform/storage-adapter.d.ts.map +1 -1
  711. package/dist/platform/storage-adapter.js +8 -60
  712. package/dist/platform/storage-adapter.js.map +1 -1
  713. package/dist/platform/ticker.d.ts +11 -45
  714. package/dist/platform/ticker.d.ts.map +1 -1
  715. package/dist/platform/ticker.js +10 -37
  716. package/dist/platform/ticker.js.map +1 -1
  717. package/dist/project/config.d.ts +4 -14
  718. package/dist/project/config.d.ts.map +1 -1
  719. package/dist/project/config.js.map +1 -1
  720. package/dist/project/tree.d.ts +6 -35
  721. package/dist/project/tree.d.ts.map +1 -1
  722. package/dist/project/tree.js +1 -8
  723. package/dist/project/tree.js.map +1 -1
  724. package/dist/props/host.d.ts +7 -13
  725. package/dist/props/host.d.ts.map +1 -1
  726. package/dist/props/host.js +3 -1
  727. package/dist/props/host.js.map +1 -1
  728. package/dist/props/layout.d.ts +18 -0
  729. package/dist/props/layout.d.ts.map +1 -0
  730. package/dist/props/layout.js +73 -0
  731. package/dist/props/layout.js.map +1 -0
  732. package/dist/props/observer.d.ts +1 -7
  733. package/dist/props/observer.d.ts.map +1 -1
  734. package/dist/props/observer.js.map +1 -1
  735. package/dist/props/slot.d.ts +6 -19
  736. package/dist/props/slot.d.ts.map +1 -1
  737. package/dist/props/slot.js +5 -14
  738. package/dist/props/slot.js.map +1 -1
  739. package/dist/render/canvas-render-context2d.d.ts +8 -68
  740. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  741. package/dist/render/canvas-render-context2d.js +8 -69
  742. package/dist/render/canvas-render-context2d.js.map +1 -1
  743. package/dist/render/clip-contains.d.ts +2 -16
  744. package/dist/render/clip-contains.d.ts.map +1 -1
  745. package/dist/render/clip-contains.js +21 -82
  746. package/dist/render/clip-contains.js.map +1 -1
  747. package/dist/render/clip.d.ts +7 -25
  748. package/dist/render/clip.d.ts.map +1 -1
  749. package/dist/render/clip.js +5 -17
  750. package/dist/render/clip.js.map +1 -1
  751. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  752. package/dist/render/descriptors/ellipse.js +0 -1
  753. package/dist/render/descriptors/ellipse.js.map +1 -1
  754. package/dist/render/descriptors/line.d.ts.map +1 -1
  755. package/dist/render/descriptors/line.js +0 -1
  756. package/dist/render/descriptors/line.js.map +1 -1
  757. package/dist/render/descriptors/path-builder.d.ts +4 -32
  758. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  759. package/dist/render/descriptors/path-builder.js +3 -25
  760. package/dist/render/descriptors/path-builder.js.map +1 -1
  761. package/dist/render/descriptors/path.d.ts +1 -11
  762. package/dist/render/descriptors/path.d.ts.map +1 -1
  763. package/dist/render/descriptors/path.js +0 -1
  764. package/dist/render/descriptors/path.js.map +1 -1
  765. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  766. package/dist/render/descriptors/polygon.js +0 -1
  767. package/dist/render/descriptors/polygon.js.map +1 -1
  768. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  769. package/dist/render/descriptors/polygram.js +0 -1
  770. package/dist/render/descriptors/polygram.js.map +1 -1
  771. package/dist/render/descriptors/rect.d.ts.map +1 -1
  772. package/dist/render/descriptors/rect.js +0 -1
  773. package/dist/render/descriptors/rect.js.map +1 -1
  774. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  775. package/dist/render/descriptors/richtext.js +0 -1
  776. package/dist/render/descriptors/richtext.js.map +1 -1
  777. package/dist/render/descriptors/shape.d.ts +17 -77
  778. package/dist/render/descriptors/shape.d.ts.map +1 -1
  779. package/dist/render/descriptors/shape.js +13 -47
  780. package/dist/render/descriptors/shape.js.map +1 -1
  781. package/dist/render/descriptors/text.d.ts +15 -94
  782. package/dist/render/descriptors/text.d.ts.map +1 -1
  783. package/dist/render/descriptors/text.js +8 -50
  784. package/dist/render/descriptors/text.js.map +1 -1
  785. package/dist/render/descriptors/transform.d.ts +5 -16
  786. package/dist/render/descriptors/transform.d.ts.map +1 -1
  787. package/dist/render/descriptors/transform.js +1 -17
  788. package/dist/render/descriptors/transform.js.map +1 -1
  789. package/dist/render/graphics2d.d.ts +24 -116
  790. package/dist/render/graphics2d.d.ts.map +1 -1
  791. package/dist/render/graphics2d.js +23 -108
  792. package/dist/render/graphics2d.js.map +1 -1
  793. package/dist/render/measure-context.d.ts +5 -29
  794. package/dist/render/measure-context.d.ts.map +1 -1
  795. package/dist/render/measure-context.js.map +1 -1
  796. package/dist/render/null-render-context.d.ts +2 -20
  797. package/dist/render/null-render-context.d.ts.map +1 -1
  798. package/dist/render/null-render-context.js +2 -20
  799. package/dist/render/null-render-context.js.map +1 -1
  800. package/dist/render/render-context2d.d.ts +52 -208
  801. package/dist/render/render-context2d.d.ts.map +1 -1
  802. package/dist/render/render-context2d.js.map +1 -1
  803. package/dist/render/surface.d.ts +2 -19
  804. package/dist/render/surface.d.ts.map +1 -1
  805. package/dist/render/surface.js.map +1 -1
  806. package/dist/render/text-defaults.d.ts +1 -17
  807. package/dist/render/text-defaults.d.ts.map +1 -1
  808. package/dist/render/text-defaults.js +6 -40
  809. package/dist/render/text-defaults.js.map +1 -1
  810. package/dist/render/text-layout.d.ts +12 -55
  811. package/dist/render/text-layout.d.ts.map +1 -1
  812. package/dist/render/text-layout.js +2 -16
  813. package/dist/render/text-layout.js.map +1 -1
  814. package/dist/render3d/bounds3d.d.ts +10 -32
  815. package/dist/render3d/bounds3d.d.ts.map +1 -1
  816. package/dist/render3d/bounds3d.js +2 -12
  817. package/dist/render3d/bounds3d.js.map +1 -1
  818. package/dist/render3d/builders.d.ts +8 -35
  819. package/dist/render3d/builders.d.ts.map +1 -1
  820. package/dist/render3d/builders.js +8 -35
  821. package/dist/render3d/builders.js.map +1 -1
  822. package/dist/render3d/camera.d.ts +10 -57
  823. package/dist/render3d/camera.d.ts.map +1 -1
  824. package/dist/render3d/camera.js +4 -26
  825. package/dist/render3d/camera.js.map +1 -1
  826. package/dist/render3d/fill3d.d.ts +7 -45
  827. package/dist/render3d/fill3d.d.ts.map +1 -1
  828. package/dist/render3d/fill3d.js +15 -85
  829. package/dist/render3d/fill3d.js.map +1 -1
  830. package/dist/render3d/geometry.d.ts +18 -106
  831. package/dist/render3d/geometry.d.ts.map +1 -1
  832. package/dist/render3d/geometry.js +2 -20
  833. package/dist/render3d/geometry.js.map +1 -1
  834. package/dist/render3d/graphics3d.d.ts +29 -133
  835. package/dist/render3d/graphics3d.d.ts.map +1 -1
  836. package/dist/render3d/graphics3d.js +23 -110
  837. package/dist/render3d/graphics3d.js.map +1 -1
  838. package/dist/render3d/index.d.ts +1 -16
  839. package/dist/render3d/index.d.ts.map +1 -1
  840. package/dist/render3d/index.js +1 -16
  841. package/dist/render3d/index.js.map +1 -1
  842. package/dist/render3d/inert.d.ts.map +1 -1
  843. package/dist/render3d/inert.js +1 -14
  844. package/dist/render3d/inert.js.map +1 -1
  845. package/dist/render3d/light.d.ts +3 -26
  846. package/dist/render3d/light.d.ts.map +1 -1
  847. package/dist/render3d/light.js.map +1 -1
  848. package/dist/render3d/material.d.ts +13 -87
  849. package/dist/render3d/material.d.ts.map +1 -1
  850. package/dist/render3d/material.js +2 -16
  851. package/dist/render3d/material.js.map +1 -1
  852. package/dist/render3d/matrix4.d.ts +14 -68
  853. package/dist/render3d/matrix4.d.ts.map +1 -1
  854. package/dist/render3d/matrix4.js +11 -60
  855. package/dist/render3d/matrix4.js.map +1 -1
  856. package/dist/render3d/render-context3d.d.ts +13 -51
  857. package/dist/render3d/render-context3d.d.ts.map +1 -1
  858. package/dist/render3d/render-context3d.js +9 -21
  859. package/dist/render3d/render-context3d.js.map +1 -1
  860. package/dist/render3d/resources.d.ts +9 -53
  861. package/dist/render3d/resources.d.ts.map +1 -1
  862. package/dist/render3d/resources.js +8 -48
  863. package/dist/render3d/resources.js.map +1 -1
  864. package/dist/render3d/rounded-box.d.ts +7 -21
  865. package/dist/render3d/rounded-box.d.ts.map +1 -1
  866. package/dist/render3d/rounded-box.js +7 -46
  867. package/dist/render3d/rounded-box.js.map +1 -1
  868. package/dist/render3d/scene-settings.d.ts +20 -78
  869. package/dist/render3d/scene-settings.d.ts.map +1 -1
  870. package/dist/render3d/scene-settings.js.map +1 -1
  871. package/dist/render3d/scene3d.d.ts +11 -53
  872. package/dist/render3d/scene3d.d.ts.map +1 -1
  873. package/dist/render3d/scene3d.js +12 -59
  874. package/dist/render3d/scene3d.js.map +1 -1
  875. package/dist/render3d/segments.d.ts +2 -25
  876. package/dist/render3d/segments.d.ts.map +1 -1
  877. package/dist/render3d/segments.js +1 -11
  878. package/dist/render3d/segments.js.map +1 -1
  879. package/dist/render3d/texture.d.ts +25 -112
  880. package/dist/render3d/texture.d.ts.map +1 -1
  881. package/dist/render3d/texture.js +3 -27
  882. package/dist/render3d/texture.js.map +1 -1
  883. package/dist/render3d/tracking.d.ts +2 -19
  884. package/dist/render3d/tracking.d.ts.map +1 -1
  885. package/dist/render3d/tracking.js +2 -19
  886. package/dist/render3d/tracking.js.map +1 -1
  887. package/dist/render3d/transform.d.ts +14 -60
  888. package/dist/render3d/transform.d.ts.map +1 -1
  889. package/dist/render3d/transform.js +0 -2
  890. package/dist/render3d/transform.js.map +1 -1
  891. package/dist/render3d/vector3.d.ts +6 -48
  892. package/dist/render3d/vector3.d.ts.map +1 -1
  893. package/dist/render3d/vector3.js +4 -38
  894. package/dist/render3d/vector3.js.map +1 -1
  895. package/dist/render3d/walk.d.ts +3 -27
  896. package/dist/render3d/walk.d.ts.map +1 -1
  897. package/dist/render3d/walk.js +5 -33
  898. package/dist/render3d/walk.js.map +1 -1
  899. package/dist/runtime/asset-refine.d.ts +34 -20
  900. package/dist/runtime/asset-refine.d.ts.map +1 -1
  901. package/dist/runtime/asset-refine.js +127 -31
  902. package/dist/runtime/asset-refine.js.map +1 -1
  903. package/dist/runtime/asset-timeline.d.ts +14 -53
  904. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  905. package/dist/runtime/asset-timeline.js +6 -27
  906. package/dist/runtime/asset-timeline.js.map +1 -1
  907. package/dist/runtime/asset-update.d.ts +7 -26
  908. package/dist/runtime/asset-update.d.ts.map +1 -1
  909. package/dist/runtime/asset-update.js +6 -18
  910. package/dist/runtime/asset-update.js.map +1 -1
  911. package/dist/runtime/audio-index.d.ts +0 -2
  912. package/dist/runtime/audio-index.d.ts.map +1 -1
  913. package/dist/runtime/audio-index.js +0 -2
  914. package/dist/runtime/audio-index.js.map +1 -1
  915. package/dist/runtime/builtin-context.d.ts +3 -9
  916. package/dist/runtime/builtin-context.d.ts.map +1 -1
  917. package/dist/runtime/builtin-context.js +3 -9
  918. package/dist/runtime/builtin-context.js.map +1 -1
  919. package/dist/runtime/clip-instance.d.ts +12 -39
  920. package/dist/runtime/clip-instance.d.ts.map +1 -1
  921. package/dist/runtime/clip-instance.js +21 -45
  922. package/dist/runtime/clip-instance.js.map +1 -1
  923. package/dist/runtime/clip-store.d.ts +26 -68
  924. package/dist/runtime/clip-store.d.ts.map +1 -1
  925. package/dist/runtime/clip-store.js +47 -81
  926. package/dist/runtime/clip-store.js.map +1 -1
  927. package/dist/runtime/engine.d.ts +31 -85
  928. package/dist/runtime/engine.d.ts.map +1 -1
  929. package/dist/runtime/engine.js +16 -49
  930. package/dist/runtime/engine.js.map +1 -1
  931. package/dist/runtime/frame-time.d.ts +4 -15
  932. package/dist/runtime/frame-time.d.ts.map +1 -1
  933. package/dist/runtime/frame-time.js +5 -12
  934. package/dist/runtime/frame-time.js.map +1 -1
  935. package/dist/runtime/index.d.ts +0 -1
  936. package/dist/runtime/index.d.ts.map +1 -1
  937. package/dist/runtime/index.js +0 -1
  938. package/dist/runtime/index.js.map +1 -1
  939. package/dist/runtime/node-picking.d.ts +59 -139
  940. package/dist/runtime/node-picking.d.ts.map +1 -1
  941. package/dist/runtime/node-picking.js +87 -157
  942. package/dist/runtime/node-picking.js.map +1 -1
  943. package/dist/runtime/node-picking3d.d.ts +39 -96
  944. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  945. package/dist/runtime/node-picking3d.js +98 -141
  946. package/dist/runtime/node-picking3d.js.map +1 -1
  947. package/dist/runtime/placement.d.ts +8 -17
  948. package/dist/runtime/placement.d.ts.map +1 -1
  949. package/dist/runtime/placement.js +7 -16
  950. package/dist/runtime/placement.js.map +1 -1
  951. package/dist/runtime/playback-controller.d.ts +78 -207
  952. package/dist/runtime/playback-controller.d.ts.map +1 -1
  953. package/dist/runtime/playback-controller.js +111 -226
  954. package/dist/runtime/playback-controller.js.map +1 -1
  955. package/dist/runtime/playback.d.ts +6 -14
  956. package/dist/runtime/playback.d.ts.map +1 -1
  957. package/dist/runtime/playback.js +6 -14
  958. package/dist/runtime/playback.js.map +1 -1
  959. package/dist/runtime/project-assets.d.ts +6 -14
  960. package/dist/runtime/project-assets.d.ts.map +1 -1
  961. package/dist/runtime/project-assets.js +7 -16
  962. package/dist/runtime/project-assets.js.map +1 -1
  963. package/dist/runtime/session.d.ts +22 -45
  964. package/dist/runtime/session.d.ts.map +1 -1
  965. package/dist/runtime/session.js +26 -46
  966. package/dist/runtime/session.js.map +1 -1
  967. package/dist/runtime/settle.d.ts +4 -10
  968. package/dist/runtime/settle.d.ts.map +1 -1
  969. package/dist/runtime/settle.js +4 -10
  970. package/dist/runtime/settle.js.map +1 -1
  971. package/dist/runtime/state-evaluator.d.ts +15 -37
  972. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  973. package/dist/runtime/state-evaluator.js +27 -44
  974. package/dist/runtime/state-evaluator.js.map +1 -1
  975. package/dist/runtime/text-geometry.d.ts +18 -47
  976. package/dist/runtime/text-geometry.d.ts.map +1 -1
  977. package/dist/runtime/text-geometry.js +13 -27
  978. package/dist/runtime/text-geometry.js.map +1 -1
  979. package/dist/sdk/index.d.ts +1 -7
  980. package/dist/sdk/index.d.ts.map +1 -1
  981. package/dist/sdk/index.js +30 -138
  982. package/dist/sdk/index.js.map +1 -1
  983. package/dist/tween/command-decorator.d.ts +6 -26
  984. package/dist/tween/command-decorator.d.ts.map +1 -1
  985. package/dist/tween/command-decorator.js +1 -6
  986. package/dist/tween/command-decorator.js.map +1 -1
  987. package/dist/tween/command.d.ts +6 -53
  988. package/dist/tween/command.d.ts.map +1 -1
  989. package/dist/tween/command.js +5 -40
  990. package/dist/tween/command.js.map +1 -1
  991. package/dist/tween/ease/curve.d.ts +2 -17
  992. package/dist/tween/ease/curve.d.ts.map +1 -1
  993. package/dist/tween/ease/curve.js +1 -6
  994. package/dist/tween/ease/curve.js.map +1 -1
  995. package/dist/tween/ease/describe.d.ts +0 -11
  996. package/dist/tween/ease/describe.d.ts.map +1 -1
  997. package/dist/tween/ease/describe.js +0 -23
  998. package/dist/tween/ease/describe.js.map +1 -1
  999. package/dist/tween/ease/spec.d.ts +2 -18
  1000. package/dist/tween/ease/spec.d.ts.map +1 -1
  1001. package/dist/tween/ease/spec.js.map +1 -1
  1002. package/dist/tween/inert.d.ts +1 -14
  1003. package/dist/tween/inert.d.ts.map +1 -1
  1004. package/dist/tween/inert.js +1 -14
  1005. package/dist/tween/inert.js.map +1 -1
  1006. package/dist/tween/lerp.d.ts +2 -26
  1007. package/dist/tween/lerp.d.ts.map +1 -1
  1008. package/dist/tween/lerp.js +2 -26
  1009. package/dist/tween/lerp.js.map +1 -1
  1010. package/dist/tween/loop.d.ts +9 -50
  1011. package/dist/tween/loop.d.ts.map +1 -1
  1012. package/dist/tween/loop.js +6 -31
  1013. package/dist/tween/loop.js.map +1 -1
  1014. package/dist/tween/prepare.d.ts +2 -30
  1015. package/dist/tween/prepare.d.ts.map +1 -1
  1016. package/dist/tween/prepare.js +2 -30
  1017. package/dist/tween/prepare.js.map +1 -1
  1018. package/dist/tween/stepper.d.ts +4 -25
  1019. package/dist/tween/stepper.d.ts.map +1 -1
  1020. package/dist/tween/stepper.js.map +1 -1
  1021. package/dist/tween/to-command.d.ts +1 -8
  1022. package/dist/tween/to-command.d.ts.map +1 -1
  1023. package/dist/tween/to-command.js +2 -25
  1024. package/dist/tween/to-command.js.map +1 -1
  1025. package/dist/util/context.d.ts +4 -29
  1026. package/dist/util/context.d.ts.map +1 -1
  1027. package/dist/util/context.js +3 -15
  1028. package/dist/util/context.js.map +1 -1
  1029. package/dist/util/csv.d.ts +4 -29
  1030. package/dist/util/csv.d.ts.map +1 -1
  1031. package/dist/util/csv.js +3 -22
  1032. package/dist/util/csv.js.map +1 -1
  1033. package/dist/util/metrics.d.ts +2 -26
  1034. package/dist/util/metrics.d.ts.map +1 -1
  1035. package/dist/util/metrics.js +2 -26
  1036. package/dist/util/metrics.js.map +1 -1
  1037. package/dist/util/random.d.ts +20 -87
  1038. package/dist/util/random.d.ts.map +1 -1
  1039. package/dist/util/random.js +20 -87
  1040. package/dist/util/random.js.map +1 -1
  1041. package/dist/util/reference.d.ts +6 -35
  1042. package/dist/util/reference.d.ts.map +1 -1
  1043. package/dist/util/reference.js +1 -4
  1044. package/dist/util/reference.js.map +1 -1
  1045. package/dist/util/scheduler.d.ts +6 -27
  1046. package/dist/util/scheduler.d.ts.map +1 -1
  1047. package/dist/util/scheduler.js +8 -35
  1048. package/dist/util/scheduler.js.map +1 -1
  1049. package/package.json +1 -1
  1050. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1051. package/dist/browser/chunks/chunk-7DB6BI27.js +0 -6
  1052. package/dist/browser/chunks/chunk-7DB6BI27.js.map +0 -7
  1053. package/dist/browser/chunks/chunk-IX53IFBD.js +0 -13
  1054. package/dist/browser/chunks/chunk-IX53IFBD.js.map +0 -7
  1055. package/dist/browser/chunks/chunk-Q55UPA3E.js +0 -3
  1056. package/dist/browser/chunks/chunk-Q55UPA3E.js.map +0 -7
  1057. package/dist/renamed-scene-names.d.ts +0 -17
  1058. package/dist/renamed-scene-names.d.ts.map +0 -1
  1059. package/dist/renamed-scene-names.js +0 -9
  1060. package/dist/renamed-scene-names.js.map +0 -1
  1061. package/dist/runtime/precompisition.d.ts +0 -24
  1062. package/dist/runtime/precompisition.d.ts.map +0 -1
  1063. package/dist/runtime/precompisition.js +0 -7
  1064. package/dist/runtime/precompisition.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/chain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAkJ/C,8EAA8E;AAC9E,SAAS,YAAY,CAAmB,GAAe,EAAE,GAAY;IACjE,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,KAAkB;IAClC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAc,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,eAAe;IACL;IAAnB,YAAmB,OAAoB,EAAE;QAAtB,SAAI,GAAJ,IAAI,CAAkB;IAAI,CAAC;IAE9C;;;OAGG;IACO,MAAM,CAAC,MAAiB;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,WAA8C,CAAC;QACjE,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,uEAAuE;IAEvE,8BAA8B;IAC9B,IAAI,CAAC,OAAmC;QACpC,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,iCAAiC;IACjC,SAAS,CAAC,OAAwC;QAC9C,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CA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AsD;IAC1F,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrC,IAAI,OAAO,YAAY,eAAe;QAAE,OAAO,OAAO,CAAC,IAAI,CAAC;IAC5D,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import { MediaAdjustment, VideoOnlyAdjustment } from \"./union\";\nimport { EffectChain } from \"../effects/chain\";\nimport type { BlendMode } from \"../fill/blend\";\nimport type { ColorAdjustmentFilter } from \"./implementations/color-adjustment\";\nimport type { CurvesChannel } from \"./implementations/curves\";\nimport type { EffectOptions } from \"../effects/effect-data\";\nimport type {\n AsciiOptions,\n BitCrushOptions,\n BlockDisplaceOptions,\n BloomOptions,\n BulgeOptions,\n ChromaticAberrationOptions,\n DirectionalBlurOptions,\n DitherOptions,\n DuotoneOptions,\n EdgesOptions,\n GrainOptions,\n HalftoneOptions,\n InvertOptions,\n LutOptions,\n KaleidoscopeOptions,\n OilPaintOptions,\n PixelateOptions,\n PosterizeOptions,\n ProgressiveBlurOptions,\n RadialBlurOptions,\n RgbShiftOptions,\n ScanlinesOptions,\n ScatterOptions,\n SharpenOptions,\n ShaderEffectOptions,\n StreakOptions,\n ThresholdOptions,\n TwirlOptions,\n VignetteOptions,\n VintageOptions,\n WaveOptions,\n} from \"../effects/chain\";\n\n/** Any concrete filter a chain may hold — pixel or video-only. */\ntype AnyFilter = MediaAdjustment | VideoOnlyAdjustment;\n\n/**\n * ## Adjustments and filters are two layers, not two names for one thing\n *\n * An **adjustment** is the unit an author writes: `Adjustments.blur(8)`, one\n * entry in the ordered chain a media fill's `preset` carries. A **filter** is\n * the primitive the renderer realises it as — `BlurFilter`, `CurvesFilter`, and\n * the `FilterData` handlers in `registry.ts`.\n *\n * Most of the time the two are one-to-one, which is what makes the distinction\n * look like pedantry. It isn't: an editor above this layer composes adjustments\n * that have no primitive of their own (a lift/gamma/gain grade is three\n * per-channel `CurvesFilter`s), and one primitive — the LUT's texture lookup —\n * is reached through no chain builder at all. Naming the two layers apart is\n * what lets that mapping be written down instead of assumed.\n *\n * It also settles a collision with no good answer otherwise: the options for\n * `Adjustments.colorAdjustment(…)` are named after the primitive they omit from\n * (`ColorAdjustmentFilterOptions`), because `ColorAdjustmentAdjustmentOptions`\n * is not a name anyone should have to type.\n *\n * ## The builders\n *\n * Media adjustments follow the same one-argument rule as node effects: every\n * builder takes a single options object, and those with one dominant scalar\n * also accept that scalar directly. Field names are the shared vocabulary —\n * `radius` for a pixel distance, `amount` for a 0–1 intensity — so\n * `Adjustments.blur(8)` and `Effects.blur(8)` describe the same quantity.\n *\n * Most of the roster *is* the node-effect roster: an adjustment is an effect\n * applied to one fill layer's own pixels instead of to a node and everything\n * beneath it, so `Adjustments.oilPaint(4)` and `Effects.oilPaint(4)` are the\n * same implementation reached two ways. See {@link EffectAdjustment} for the\n * short list of effects that cannot be adjustments.\n */\n\n/** Gaussian blur. Scalar shorthand sets `radius`. */\nexport interface BlurFilterOptions {\n /** Blur radius in pixels. */\n radius: number;\n}\n\n/** Desaturation. Scalar shorthand sets `amount`. */\nexport interface GrayscaleFilterOptions {\n /** 0 = original, 1 = fully grayscale. */\n amount: number;\n}\n\n/** Alpha (opacity) multiply. Scalar shorthand sets `amount`. */\nexport interface AlphaFilterOptions {\n /** 0 = fully transparent, 1 = unchanged. */\n amount: number;\n}\n\n/** Luminance scale. Scalar shorthand sets `amount`. */\nexport interface ExposureFilterOptions {\n /** Exposure multiplier. 1 = unchanged, >1 brighter, <1 darker. */\n amount: number;\n}\n\n/** Raw 4×5 row-major colour matrix. Array shorthand sets `matrix`. */\nexport interface ColorMatrixFilterOptions {\n /** 4×5 row-major colour matrix: rows R, G, B, A of `[r, g, b, a, bias]`. */\n matrix: number[];\n}\n\n/** Tone curve through control points. */\nexport interface CurvesFilterOptions {\n /** Curve control points as [input, output] pairs in [0, 1]. */\n points: [number, number][];\n /** Channel(s) to apply the curve to (default `'rgb'`). */\n channel?: CurvesChannel;\n}\n\n/** Photographic tonal/colour adjustments. All fields optional. */\nexport type ColorAdjustmentFilterOptions = Omit<ColorAdjustmentFilter, 'type'>;\n\n/** Stop-motion frame-rate resample (video only). Scalar shorthand sets `fps`. */\nexport interface PosterizeTimeFilterOptions {\n /** Target frame rate the source playhead snaps to. */\n fps: number;\n}\n\n/** Motion-trail echo of past frames (video only). */\nexport interface EchoFilterOptions {\n /** Number of past-frame taps drawn behind the current frame. */\n echoes: number;\n /** Delay between successive taps, in source seconds. */\n delay: number;\n /** Per-tap alpha multiplier; tap `n` is drawn at `decay ** n` (default 0.5). */\n decay?: number;\n /** Blend mode used to composite the echo taps (default `'screen'`). */\n blend?: BlendMode;\n}\n\n/**\n * A node effect's builder options as a **filter** accepts them: the same\n * fields minus the cross-cutting {@link EffectOptions} (today `mode`).\n *\n * A filter is on the fill's own pixels by definition, so there is no backdrop\n * to point it at — dropping the knob is clearer than accepting it and silently\n * ignoring it. Scalar shorthands survive untouched.\n */\ntype AsFilterOptions<T> = T extends number ? number : Omit<T, keyof EffectOptions>;\n\n/** Normalise a `number | Options` filter argument onto its dominant field. */\nfunction scalarFilter<O extends object>(arg: number | O, key: keyof O): O {\n return typeof arg === \"number\" ? ({ [key]: arg } as O) : arg;\n}\n\n/**\n * The single effect a one-builder {@link EffectChain} produced.\n *\n * Every effect-backed filter routes through here rather than re-declaring the\n * effect literal, so defaults, scalar shorthands and field normalisation have\n * exactly one definition — the one scenes already use.\n */\nfunction fromEffect(chain: EffectChain): AnyFilter {\n return chain.list[0] as AnyFilter;\n}\n\n/**\n * Immutable, chainable list of media filters — the filters valid on an **image**\n * fill.\n *\n * Each builder method returns a new chain with the filter appended, so chains\n * are safe to share and branch. {@link VideoAdjustmentChain} extends this with the\n * video-only temporal filters; the split is what keeps `posterizeTime` off an\n * image fill, mirroring how `Fill` is structured.\n *\n * @example\n * const chain = Adjustments.blur(4).grayscale(0.5);\n * node.filters = chain; // assign directly\n * node.filters = [...chain, { type: 'alpha', amount: 0.5 }]; // spread into array\n */\nexport class AdjustmentChain {\n constructor(public list: AnyFilter[] = []) { }\n\n /**\n * Append `filter`, returning a chain of the same class — so the video\n * subclass keeps its extra builders reachable after an inherited one.\n */\n protected append(filter: AnyFilter): this {\n const Ctor = this.constructor as new (list: AnyFilter[]) => this;\n return new Ctor([...this.list, filter]);\n }\n\n // -- Filters with no node-effect counterpart -------------------------\n\n /** Append a Gaussian blur. */\n blur(options: number | BlurFilterOptions) {\n const { radius } = scalarFilter(options, \"radius\");\n return this.append({ type: 'blur', radius });\n }\n\n /** Append a grayscale filter. */\n grayscale(options: number | GrayscaleFilterOptions) {\n const { amount } = scalarFilter(options, \"amount\");\n return this.append({ type: 'grayscale', amount });\n }\n\n /** Append an alpha (opacity) filter. */\n alpha(options: number | AlphaFilterOptions) {\n const { amount } = scalarFilter(options, \"amount\");\n return this.append({ type: 'alpha', amount });\n }\n\n /** Append an exposure filter. */\n exposure(options: number | ExposureFilterOptions) {\n const { amount } = scalarFilter(options, \"amount\");\n return this.append({ type: 'exposure', amount });\n }\n\n /** Append a color-adjustment filter from the given partial settings. */\n colorAdjustment(options: ColorAdjustmentFilterOptions) {\n return this.append({ type: 'colorAdjustment', ...options });\n }\n\n /** Append a raw 4×5 row-major color matrix. */\n colorMatrix(options: number[] | ColorMatrixFilterOptions) {\n const matrix = Array.isArray(options) ? options : options.matrix;\n return this.append({ type: 'colorMatrix', matrix });\n }\n\n /** Append a curves filter from control `points` ([input, output] pairs). */\n curves(options: CurvesFilterOptions) {\n return this.append({ type: 'curves', points: options.points, channel: options.channel });\n }\n\n // -- Blur family ------------------------------------------------------\n\n /** Append a directional (linear) blur, smearing the fill along one axis. */\n directionalBlur(options: AsFilterOptions<number | DirectionalBlurOptions>) {\n return this.append(fromEffect(new EffectChain().directionalBlur(options)));\n }\n\n /** Append a radial blur — zoom or spin streaks about a centre point. */\n radialBlur(options?: AsFilterOptions<number | RadialBlurOptions>) {\n return this.append(fromEffect(new EffectChain().radialBlur(options)));\n }\n\n /**\n * Append a progressive blur — a blur that ramps across the fill, for the\n * frosted-toward-one-edge look.\n */\n progressiveBlur(options?: AsFilterOptions<number | ProgressiveBlurOptions>) {\n return this.append(fromEffect(new EffectChain().progressiveBlur(options)));\n }\n\n /** Append a bloom (glow): bright areas bleed soft light outward. */\n bloom(options?: AsFilterOptions<number | BloomOptions>) {\n return this.append(fromEffect(new EffectChain().bloom(options)));\n }\n\n /** Append anamorphic streaks off the fill's highlights. */\n streak(options?: AsFilterOptions<number | StreakOptions>) {\n return this.append(fromEffect(new EffectChain().streak(options)));\n }\n\n /** Append an unsharp-mask sharpen. */\n sharpen(options?: AsFilterOptions<number | SharpenOptions>) {\n return this.append(fromEffect(new EffectChain().sharpen(options)));\n }\n\n // -- Colour -----------------------------------------------------------\n\n /** Append a colour invert (negative). */\n invert(options?: AsFilterOptions<number | InvertOptions>) {\n return this.append(fromEffect(new EffectChain().invert(options)));\n }\n\n /** Append a vintage / film-look grade (sepia + desaturate + warmth). */\n vintage(options?: AsFilterOptions<number | VintageOptions>) {\n return this.append(fromEffect(new EffectChain().vintage(options)));\n }\n\n /** Append a duotone map — remap luminance between two colours. */\n duotone(options?: AsFilterOptions<number | DuotoneOptions>) {\n return this.append(fromEffect(new EffectChain().duotone(options)));\n }\n\n /** Append colour banding: quantize to `levels` tones per channel. */\n posterize(options?: AsFilterOptions<number | PosterizeOptions>) {\n return this.append(fromEffect(new EffectChain().posterize(options)));\n }\n\n /** Append a hard luminance threshold (1-bit black/white). */\n threshold(options?: AsFilterOptions<number | ThresholdOptions>) {\n return this.append(fromEffect(new EffectChain().threshold(options)));\n }\n\n /** Append a bit-depth crush, optionally snapping to a hardware palette. */\n bitCrush(options?: AsFilterOptions<number | BitCrushOptions>) {\n return this.append(fromEffect(new EffectChain().bitCrush(options)));\n }\n\n // -- Texture / pattern ------------------------------------------------\n\n /**\n * Append ordered (Bayer) dithering — quantize to `levels` tones, hiding the\n * banding in a repeating threshold pattern.\n */\n dither(options?: AsFilterOptions<number | DitherOptions>) {\n return this.append(fromEffect(new EffectChain().dither(options)));\n }\n\n /** Append a halftone screen — print-style dots (or lines) sized by tone. */\n halftone(options?: AsFilterOptions<number | HalftoneOptions>) {\n return this.append(fromEffect(new EffectChain().halftone(options)));\n }\n\n /** Append film grain. Animate it by tweening `seed`. */\n grain(options?: AsFilterOptions<number | GrainOptions>) {\n return this.append(fromEffect(new EffectChain().grain(options)));\n }\n\n /** Append a 3D colour lookup table — see {@link EffectChain.lut}. */\n lut(options: AsFilterOptions<LutOptions>) {\n return this.append(fromEffect(new EffectChain().lut(options as LutOptions)));\n }\n\n /** Append CRT-style scanlines. */\n scanlines(options?: AsFilterOptions<number | ScanlinesOptions>) {\n return this.append(fromEffect(new EffectChain().scanlines(options)));\n }\n\n /** Append an After Effects-style Mosaic — `blocks` across the fill. */\n pixelate(options: AsFilterOptions<number | PixelateOptions>) {\n return this.append(fromEffect(new EffectChain().pixelate(options)));\n }\n\n /**\n * Append Kuwahara \"oil paint\" brushwork: average within a region, never\n * across an edge, so flat areas smooth into strokes while edges stay crisp.\n *\n * Cost grows with `radius²` — the most expensive filter in the set.\n */\n oilPaint(options?: AsFilterOptions<number | OilPaintOptions>) {\n return this.append(fromEffect(new EffectChain().oilPaint(options)));\n }\n\n /** Append an ASCII-art remap of the fill through a glyph ramp. */\n ascii(options?: AsFilterOptions<number | AsciiOptions>) {\n return this.append(fromEffect(new EffectChain().ascii(options)));\n }\n\n /** Append an edge-detect pass (Sobel / Prewitt / Laplacian). */\n edges(options?: AsFilterOptions<number | EdgesOptions>) {\n return this.append(fromEffect(new EffectChain().edges(options)));\n }\n\n /** Append a darkened border falling off toward the fill's corners. */\n vignette(options?: AsFilterOptions<number | VignetteOptions>) {\n return this.append(fromEffect(new EffectChain().vignette(options)));\n }\n\n // -- Displacement / lens ----------------------------------------------\n\n /** Append lens-dispersion colour fringing. */\n chromaticAberration(options?: AsFilterOptions<number | ChromaticAberrationOptions>) {\n return this.append(fromEffect(new EffectChain().chromaticAberration(options)));\n }\n\n /** Append a hard per-channel RGB offset (the glitchy cousin of the above). */\n rgbShift(options?: AsFilterOptions<number | RgbShiftOptions>) {\n return this.append(fromEffect(new EffectChain().rgbShift(options)));\n }\n\n /** Append per-pixel random jitter. */\n scatter(options?: AsFilterOptions<number | ScatterOptions>) {\n return this.append(fromEffect(new EffectChain().scatter(options)));\n }\n\n /** Append horizontal band tearing — the datamosh / bad-signal look. */\n blockDisplace(options?: AsFilterOptions<number | BlockDisplaceOptions>) {\n return this.append(fromEffect(new EffectChain().blockDisplace(options)));\n }\n\n /** Append a bulge (barrel) or, with a negative strength, a pinch. */\n bulge(options: AsFilterOptions<number | BulgeOptions>) {\n return this.append(fromEffect(new EffectChain().bulge(options)));\n }\n\n /** Append a twirl (swirl about a centre point). */\n twirl(options?: AsFilterOptions<number | TwirlOptions>) {\n return this.append(fromEffect(new EffectChain().twirl(options)));\n }\n\n /** Append a sine/triangle/square wave warp. */\n wave(options?: AsFilterOptions<number | WaveOptions>) {\n return this.append(fromEffect(new EffectChain().wave(options)));\n }\n\n /** Append a kaleidoscope mirror of the fill about a centre point. */\n kaleidoscope(options?: AsFilterOptions<number | KaleidoscopeOptions>) {\n return this.append(fromEffect(new EffectChain().kaleidoscope(options)));\n }\n\n /** Append a custom shader pass over the fill. */\n shader(options: AsFilterOptions<ShaderEffectOptions>) {\n return this.append(fromEffect(new EffectChain().shader(options)));\n }\n\n /** Allows spreading the chain into an array: `[...Adjustments.blur(5)]`. */\n *[Symbol.iterator]() {\n yield* this.list;\n }\n\n /** Serializes to the raw filter array so frameworks that call `toJSON` get a plain value. */\n toJSON() {\n return this.list;\n }\n}\n\n/**\n * An {@link AdjustmentChain} plus the video-only temporal filters — the\n * filters valid on a **video** fill.\n *\n * @example\n * node.filters = VideoAdjustments.posterizeTime(6).grayscale(1);\n */\nexport class VideoAdjustmentChain extends AdjustmentChain {\n /** Append a posterize-time filter; snaps the video playhead to `fps`. */\n posterizeTime(options: number | PosterizeTimeFilterOptions) {\n const { fps } = scalarFilter(options, \"fps\");\n return this.append({ type: 'posterizeTime', fps });\n }\n\n /** Append an echo (motion-trail) filter over the clip's past frames. */\n echo(options: EchoFilterOptions) {\n return this.append({ type: 'echo', ...options });\n }\n}\n\n/**\n * Accepted shapes for an **image** fill's `filters` prop — a single pixel\n * filter, a plain array of them, or a filter chain. Mirrors how `Fill` is the\n * loose author-facing union for a fill. Video-only filters are excluded here.\n */\nexport type ImageAdjustment = MediaAdjustment | MediaAdjustment[] | AdjustmentChain;\n\n/**\n * Accepted shapes for a **video** fill's `filters` prop — the pixel filters\n * plus the video-only temporal filters (`posterizeTime`, `echo`).\n */\nexport type VideoAdjustment =\n | (MediaAdjustment | VideoOnlyAdjustment)\n | (MediaAdjustment | VideoOnlyAdjustment)[]\n | AdjustmentChain;\n\n/**\n * Entry point for building **image** filter chains fluently.\n *\n * An empty chain, so `Adjustments.blur(8)` is `new AdjustmentChain().blur(8)`\n * — and every builder's signature and documentation has one definition, on\n * {@link AdjustmentChain}, which is what an editor shows on hover.\n *\n * Contains only pixel filters; video-only filters (`posterizeTime`, `echo`)\n * live on {@link VideoAdjustments} because image fills cannot use them.\n *\n * @example\n * node.filters = Adjustments.blur(8).grayscale(1);\n * Rect({ fill: Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) }) })\n */\nexport const Adjustments = new AdjustmentChain();\n\n/**\n * Entry point for building **video** filter chains fluently — every\n * {@link Adjustments} builder plus the video-only temporal ones.\n *\n * @example\n * node.filters = VideoAdjustments.posterizeTime(6);\n * node.filters = VideoAdjustments.grayscale(1).blur(6);\n */\nexport const VideoAdjustments = new VideoAdjustmentChain();\n\n/**\n * The previous name for {@link Adjustments}.\n *\n * Kept because a scene is *source code in someone else's project*: a rename that\n * only shows up as a compile error in a file we can't edit is still a rename that\n * broke their build. The alias costs one line and buys a release in which both\n * spellings work.\n *\n * @deprecated Use {@link Adjustments}. Removed in the next major.\n */\nexport const ImageFilters = Adjustments;\n\n/**\n * The previous name for {@link VideoAdjustments}.\n *\n * @deprecated Use {@link VideoAdjustments}. Removed in the next major.\n */\nexport const VideoFilters = VideoAdjustments;\n\n/**\n * Normalises any `ImageAdjustment`/`VideoAdjustment` value to a plain filter array.\n * Used internally when reading props before rendering or interpolation.\n */\nexport function resolveChainAdjustments(filters: ImageAdjustment | VideoAdjustment | undefined): AnyFilter[] {\n if (filters === undefined) return [];\n if (filters instanceof AdjustmentChain) return filters.list;\n if (Array.isArray(filters)) return filters;\n return [filters];\n}\n"]}
1
+ {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/chain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAgH/C,SAAS,YAAY,CAAmB,GAAe,EAAE,GAAY;IACjE,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,CAAC;AAED,4GAA4G;AAC5G,SAAS,UAAU,CAAC,KAAkB;IAClC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAc,CAAC;AACtC,CAAC;AAED,6IAA6I;AAC7I,MAAM,OAAO,eAAe;IACL;IAAnB,YAAmB,OAAoB,EAAE;QAAtB,SAAI,GAAJ,IAAI,CAAkB;IAAI,CAAC;IAE9C,oGAAoG;IAC1F,MAAM,CAAC,MAAiB;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,WAA8C,CAAC;QACjE,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,CAAC,OAAmC;QACpC,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACnD,OAAO,IAAI,C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CAAC;IACrB,CAAC;CACJ;AAED,4DAA4D;AAC5D,MAAM,OAAO,oBAAqB,SAAQ,eAAe;IACrD,aAAa,CAAC,OAA4C;QACtD,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,CAAC,OAA0B;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;CACJ;AAWD,8JAA8J;AAC9J,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;AAEjD,iEAAiE;AACjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAE3D,wFAAwF;AACxF,MAAM,UAAU,uBAAuB,CAAC,OAAsD;IAC1F,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrC,IAAI,OAAO,YAAY,eAAe;QAAE,OAAO,OAAO,CAAC,IAAI,CAAC;IAC5D,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC;IAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import { MediaAdjustment, VideoOnlyAdjustment } from \"./union\";\nimport { EffectChain } from \"../effects/chain\";\nimport type { BlendMode } from \"../fill/blend\";\nimport type { ColorAdjustmentFilter } from \"./implementations/color-adjustment\";\nimport type { CurvesChannel } from \"./implementations/curves\";\nimport type { EffectOptions } from \"../effects/effect-data\";\nimport type {\n AsciiOptions,\n BitCrushOptions,\n BlockDisplaceOptions,\n BloomOptions,\n BulgeOptions,\n ChromaticAberrationOptions,\n DirectionalBlurOptions,\n DitherOptions,\n DuotoneOptions,\n EdgesOptions,\n GrainOptions,\n HalftoneOptions,\n InvertOptions,\n LutOptions,\n KaleidoscopeOptions,\n OilPaintOptions,\n PixelateOptions,\n PosterizeOptions,\n ProgressiveBlurOptions,\n RadialBlurOptions,\n RgbShiftOptions,\n ScanlinesOptions,\n ScatterOptions,\n SharpenOptions,\n ShaderEffectOptions,\n StreakOptions,\n ThresholdOptions,\n TwirlOptions,\n VignetteOptions,\n VintageOptions,\n WaveOptions,\n} from \"../effects/chain\";\n\n/** Any concrete filter a chain may hold — pixel or video-only. */\ntype AnyFilter = MediaAdjustment | VideoOnlyAdjustment;\n\n/**\n * An *adjustment* is what an author writes (`Adjustments.blur(8)`); a *filter* is the primitive the renderer\n * realises it as (`BlurFilter`, the `FilterData` handlers in `registry.ts`). Usually one-to-one, but a grade can\n * compose several primitives and the LUT lookup has no builder. Most builders delegate to the node-effect\n * roster ({@link EffectAdjustment} lists the exceptions). `colorAdjustment`'s options are named after the\n * primitive (`ColorAdjustmentFilterOptions`) to avoid `ColorAdjustmentAdjustmentOptions`.\n */\n\n/** Gaussian blur. Scalar shorthand sets `radius`. */\nexport interface BlurFilterOptions {\n /** Blur radius in pixels. */\n radius: number;\n}\n\n/** Desaturation. Scalar shorthand sets `amount`. */\nexport interface GrayscaleFilterOptions {\n /** 0 = original, 1 = fully grayscale. */\n amount: number;\n}\n\n/** Alpha (opacity) multiply. Scalar shorthand sets `amount`. */\nexport interface AlphaFilterOptions {\n /** 0 = fully transparent, 1 = unchanged. */\n amount: number;\n}\n\n/** Luminance scale. Scalar shorthand sets `amount`. */\nexport interface ExposureFilterOptions {\n /** Exposure multiplier. 1 = unchanged, >1 brighter, <1 darker. */\n amount: number;\n}\n\n/** Raw 4×5 row-major colour matrix. Array shorthand sets `matrix`. */\nexport interface ColorMatrixFilterOptions {\n /** 4×5 row-major colour matrix: rows R, G, B, A of `[r, g, b, a, bias]`. */\n matrix: number[];\n}\n\n/** Tone curve through control points. */\nexport interface CurvesFilterOptions {\n /** Curve control points as [input, output] pairs in [0, 1]. */\n points: [number, number][];\n /** Channel(s) to apply the curve to (default `'rgb'`). */\n channel?: CurvesChannel;\n}\n\n/** Photographic tonal/colour adjustments. All fields optional. */\nexport type ColorAdjustmentFilterOptions = Omit<ColorAdjustmentFilter, 'type'>;\n\n/** Stop-motion frame-rate resample (video only). Scalar shorthand sets `fps`. */\nexport interface PosterizeTimeFilterOptions {\n /** Target frame rate the source playhead snaps to. */\n fps: number;\n}\n\n/** Motion-trail echo of past frames (video only). */\nexport interface EchoFilterOptions {\n /** Number of past-frame taps drawn behind the current frame. */\n echoes: number;\n /** Delay between successive taps, in source seconds. */\n delay: number;\n /** Per-tap alpha multiplier; tap `n` is drawn at `decay ** n` (default 0.5). */\n decay?: number;\n /** Blend mode used to composite the echo taps (default `'screen'`). */\n blend?: BlendMode;\n}\n\n/** A node effect's builder options as a filter takes them: minus {@link EffectOptions} (`mode`), since a filter acts on the fill's own pixels and has no backdrop. */\ntype AsFilterOptions<T> = T extends number ? number : Omit<T, keyof EffectOptions>;\n\nfunction scalarFilter<O extends object>(arg: number | O, key: keyof O): O {\n return typeof arg === \"number\" ? ({ [key]: arg } as O) : arg;\n}\n\n/** Routes through the effect chain so defaults, scalar shorthands and normalisation have one definition. */\nfunction fromEffect(chain: EffectChain): AnyFilter {\n return chain.list[0] as AnyFilter;\n}\n\n/** Immutable, chainable list of media filters valid on an **image** fill; {@link VideoAdjustmentChain} adds the video-only temporal ones. */\nexport class AdjustmentChain {\n constructor(public list: AnyFilter[] = []) { }\n\n /** Returns the same class so the video subclass keeps its extra builders after an inherited one. */\n protected append(filter: AnyFilter): this {\n const Ctor = this.constructor as new (list: AnyFilter[]) => this;\n return new Ctor([...this.list, filter]);\n }\n\n blur(options: number | BlurFilterOptions) {\n const { radius } = scalarFilter(options, \"radius\");\n return this.append({ type: 'blur', radius });\n }\n\n grayscale(options: number | GrayscaleFilterOptions) {\n const { amount } = scalarFilter(options, \"amount\");\n return this.append({ type: 'grayscale', amount });\n }\n\n alpha(options: number | AlphaFilterOptions) {\n const { amount } = scalarFilter(options, \"amount\");\n return this.append({ type: 'alpha', amount });\n }\n\n exposure(options: number | ExposureFilterOptions) {\n const { amount } = scalarFilter(options, \"amount\");\n return this.append({ type: 'exposure', amount });\n }\n\n colorAdjustment(options: ColorAdjustmentFilterOptions) {\n return this.append({ type: 'colorAdjustment', ...options });\n }\n\n colorMatrix(options: number[] | ColorMatrixFilterOptions) {\n const matrix = Array.isArray(options) ? options : options.matrix;\n return this.append({ type: 'colorMatrix', matrix });\n }\n\n curves(options: CurvesFilterOptions) {\n return this.append({ type: 'curves', points: options.points, channel: options.channel });\n }\n\n directionalBlur(options: AsFilterOptions<number | DirectionalBlurOptions>) {\n return this.append(fromEffect(new EffectChain().directionalBlur(options)));\n }\n\n radialBlur(options?: AsFilterOptions<number | RadialBlurOptions>) {\n return this.append(fromEffect(new EffectChain().radialBlur(options)));\n }\n\n progressiveBlur(options?: AsFilterOptions<number | ProgressiveBlurOptions>) {\n return this.append(fromEffect(new EffectChain().progressiveBlur(options)));\n }\n\n bloom(options?: AsFilterOptions<number | BloomOptions>) {\n return this.append(fromEffect(new EffectChain().bloom(options)));\n }\n\n streak(options?: AsFilterOptions<number | StreakOptions>) {\n return this.append(fromEffect(new EffectChain().streak(options)));\n }\n\n sharpen(options?: AsFilterOptions<number | SharpenOptions>) {\n return this.append(fromEffect(new EffectChain().sharpen(options)));\n }\n\n invert(options?: AsFilterOptions<number | InvertOptions>) {\n return this.append(fromEffect(new EffectChain().invert(options)));\n }\n\n vintage(options?: AsFilterOptions<number | VintageOptions>) {\n return this.append(fromEffect(new EffectChain().vintage(options)));\n }\n\n duotone(options?: AsFilterOptions<number | DuotoneOptions>) {\n return this.append(fromEffect(new EffectChain().duotone(options)));\n }\n\n posterize(options?: AsFilterOptions<number | PosterizeOptions>) {\n return this.append(fromEffect(new EffectChain().posterize(options)));\n }\n\n threshold(options?: AsFilterOptions<number | ThresholdOptions>) {\n return this.append(fromEffect(new EffectChain().threshold(options)));\n }\n\n bitCrush(options?: AsFilterOptions<number | BitCrushOptions>) {\n return this.append(fromEffect(new EffectChain().bitCrush(options)));\n }\n\n dither(options?: AsFilterOptions<number | DitherOptions>) {\n return this.append(fromEffect(new EffectChain().dither(options)));\n }\n\n halftone(options?: AsFilterOptions<number | HalftoneOptions>) {\n return this.append(fromEffect(new EffectChain().halftone(options)));\n }\n\n /** Append film grain. Animate it by tweening `seed`. */\n grain(options?: AsFilterOptions<number | GrainOptions>) {\n return this.append(fromEffect(new EffectChain().grain(options)));\n }\n\n /** Append a 3D colour lookup table — see {@link EffectChain.lut}. */\n lut(options: AsFilterOptions<LutOptions>) {\n return this.append(fromEffect(new EffectChain().lut(options as LutOptions)));\n }\n\n scanlines(options?: AsFilterOptions<number | ScanlinesOptions>) {\n return this.append(fromEffect(new EffectChain().scanlines(options)));\n }\n\n pixelate(options: AsFilterOptions<number | PixelateOptions>) {\n return this.append(fromEffect(new EffectChain().pixelate(options)));\n }\n\n /** Cost grows with `radius^2`: the most expensive filter in the set. */\n oilPaint(options?: AsFilterOptions<number | OilPaintOptions>) {\n return this.append(fromEffect(new EffectChain().oilPaint(options)));\n }\n\n ascii(options?: AsFilterOptions<number | AsciiOptions>) {\n return this.append(fromEffect(new EffectChain().ascii(options)));\n }\n\n edges(options?: AsFilterOptions<number | EdgesOptions>) {\n return this.append(fromEffect(new EffectChain().edges(options)));\n }\n\n vignette(options?: AsFilterOptions<number | VignetteOptions>) {\n return this.append(fromEffect(new EffectChain().vignette(options)));\n }\n\n chromaticAberration(options?: AsFilterOptions<number | ChromaticAberrationOptions>) {\n return this.append(fromEffect(new EffectChain().chromaticAberration(options)));\n }\n\n rgbShift(options?: AsFilterOptions<number | RgbShiftOptions>) {\n return this.append(fromEffect(new EffectChain().rgbShift(options)));\n }\n\n scatter(options?: AsFilterOptions<number | ScatterOptions>) {\n return this.append(fromEffect(new EffectChain().scatter(options)));\n }\n\n blockDisplace(options?: AsFilterOptions<number | BlockDisplaceOptions>) {\n return this.append(fromEffect(new EffectChain().blockDisplace(options)));\n }\n\n bulge(options: AsFilterOptions<number | BulgeOptions>) {\n return this.append(fromEffect(new EffectChain().bulge(options)));\n }\n\n twirl(options?: AsFilterOptions<number | TwirlOptions>) {\n return this.append(fromEffect(new EffectChain().twirl(options)));\n }\n\n wave(options?: AsFilterOptions<number | WaveOptions>) {\n return this.append(fromEffect(new EffectChain().wave(options)));\n }\n\n kaleidoscope(options?: AsFilterOptions<number | KaleidoscopeOptions>) {\n return this.append(fromEffect(new EffectChain().kaleidoscope(options)));\n }\n\n shader(options: AsFilterOptions<ShaderEffectOptions>) {\n return this.append(fromEffect(new EffectChain().shader(options)));\n }\n\n *[Symbol.iterator]() {\n yield* this.list;\n }\n\n toJSON() {\n return this.list;\n }\n}\n\n/** The image chain plus the video-only temporal filters. */\nexport class VideoAdjustmentChain extends AdjustmentChain {\n posterizeTime(options: number | PosterizeTimeFilterOptions) {\n const { fps } = scalarFilter(options, \"fps\");\n return this.append({ type: 'posterizeTime', fps });\n }\n\n echo(options: EchoFilterOptions) {\n return this.append({ type: 'echo', ...options });\n }\n}\n\n/** Accepted shapes for an **image** fill's `filters` prop; video-only filters are excluded. */\nexport type ImageAdjustment = MediaAdjustment | MediaAdjustment[] | AdjustmentChain;\n\n/** Accepted shapes for a **video** fill's `filters` prop: pixel filters plus the video-only `posterizeTime` and `echo`. */\nexport type VideoAdjustment =\n | (MediaAdjustment | VideoOnlyAdjustment)\n | (MediaAdjustment | VideoOnlyAdjustment)[]\n | AdjustmentChain;\n\n/** Empty chain: `Adjustments.blur(8)` is `new AdjustmentChain().blur(8)`, so builders are documented once, on {@link AdjustmentChain}. Pixel filters only. */\nexport const Adjustments = new AdjustmentChain();\n\n/** {@link Adjustments} plus the video-only temporal builders. */\nexport const VideoAdjustments = new VideoAdjustmentChain();\n\n/** Normalises any `ImageAdjustment`/`VideoAdjustment` value to a plain filter array. */\nexport function resolveChainAdjustments(filters: ImageAdjustment | VideoAdjustment | undefined): AnyFilter[] {\n if (filters === undefined) return [];\n if (filters instanceof AdjustmentChain) return filters.list;\n if (Array.isArray(filters)) return filters;\n return [filters];\n}\n"]}
@@ -1,11 +1,5 @@
1
1
  import type { FilterData } from "../registry.js";
2
- /**
3
- * Applies an arbitrary 4×5 color transform.
4
- *
5
- * The matrix is row-major with rows [R, G, B, A], each row being
6
- * [rScale, gScale, bScale, aScale, bias]. Useful for tinting,
7
- * channel swaps, or any effect not covered by the named filters.
8
- */
2
+ /** An arbitrary 4×5 row-major colour transform: rows [R, G, B, A], each `[rScale, gScale, bScale, aScale, bias]`. For tints, channel swaps, anything the named filters don't cover. */
9
3
  export interface ColorMatrixFilter {
10
4
  type: 'colorMatrix';
11
5
  /** 4×5 row-major color matrix. */
@@ -1 +1 @@
1
- {"version":3,"file":"color-matrix.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/color-matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,kCAAkC;IAClC,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAQ3D,CAAC"}
1
+ {"version":3,"file":"color-matrix.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/color-matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,uLAAuL;AACvL,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,kCAAkC;IAClC,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAQ3D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"color-matrix.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/color-matrix.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAe1C,MAAM,CAAC,MAAM,iBAAiB,GAAkC;IAC5D,2EAA2E;IAC3E,wEAAwE;IACxE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;KACzE,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CACvG,CAAC","sourcesContent":["import type { FilterData } from \"../registry\";\nimport { lerpNumber } from \"@/tween/lerp\";\n\n/**\n * Applies an arbitrary 4×5 color transform.\n *\n * The matrix is row-major with rows [R, G, B, A], each row being\n * [rScale, gScale, bScale, aScale, bias]. Useful for tinting,\n * channel swaps, or any effect not covered by the named filters.\n */\nexport interface ColorMatrixFilter {\n type: 'colorMatrix';\n /** 4×5 row-major color matrix. */\n matrix: number[];\n}\n\nexport const colorMatrixFilter: FilterData<ColorMatrixFilter> = {\n // Lerps each matrix coefficient independently; missing target coefficients\n // hold their source value so partial matrices still animate gracefully.\n lerp: (from, to, t) => ({\n type: \"colorMatrix\",\n matrix: from.matrix.map((v, i) => lerpNumber(v, to.matrix[i] ?? v, t)),\n }),\n equals: (a, b) => a.matrix.length === b.matrix.length && a.matrix.every((v, i) => v === b.matrix[i]),\n};\n"]}
1
+ {"version":3,"file":"color-matrix.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/color-matrix.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C,MAAM,CAAC,MAAM,iBAAiB,GAAkC;IAC5D,2EAA2E;IAC3E,wEAAwE;IACxE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;KACzE,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CACvG,CAAC","sourcesContent":["import type { FilterData } from \"../registry\";\nimport { lerpNumber } from \"@/tween/lerp\";\n\n/** An arbitrary 4×5 row-major colour transform: rows [R, G, B, A], each `[rScale, gScale, bScale, aScale, bias]`. For tints, channel swaps, anything the named filters don't cover. */\nexport interface ColorMatrixFilter {\n type: 'colorMatrix';\n /** 4×5 row-major color matrix. */\n matrix: number[];\n}\n\nexport const colorMatrixFilter: FilterData<ColorMatrixFilter> = {\n // Lerps each matrix coefficient independently; missing target coefficients\n // hold their source value so partial matrices still animate gracefully.\n lerp: (from, to, t) => ({\n type: \"colorMatrix\",\n matrix: from.matrix.map((v, i) => lerpNumber(v, to.matrix[i] ?? v, t)),\n }),\n equals: (a, b) => a.matrix.length === b.matrix.length && a.matrix.every((v, i) => v === b.matrix[i]),\n};\n"]}
@@ -1,13 +1,7 @@
1
1
  import type { FilterData } from "../registry.js";
2
2
  /** Which color channel(s) a curves adjustment targets. */
3
3
  export type CurvesChannel = 'rgb' | 'r' | 'g' | 'b' | 'a';
4
- /**
5
- * Remaps pixel values along a tone curve defined by control points.
6
- *
7
- * Points are [input, output] pairs in the [0, 1] range. The renderer
8
- * interpolates a smooth curve through them. Applies to composite RGB
9
- * by default; set `channel` to target a single channel.
10
- */
4
+ /** Remaps pixel values along a tone curve through [input, output] control points in [0, 1] (the renderer interpolates a smooth curve). Composite RGB by default; set `channel` for one. */
11
5
  export interface CurvesFilter {
12
6
  type: 'curves';
13
7
  /** Curve control points as [input, output] pairs in [0, 1]. */
@@ -1 +1 @@
1
- {"version":3,"file":"curves.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/curves.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,0DAA0D;AAC1D,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,+DAA+D;IAC/D,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC3B,uDAAuD;IACvD,OAAO,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,YAAY,CAejD,CAAC"}
1
+ {"version":3,"file":"curves.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/curves.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,0DAA0D;A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E,EAAE,CACb,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM;QACnC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACtF,CAAC","sourcesContent":["import type { FilterData } from \"../registry\";\nimport { lerpNumber } from \"@/tween/lerp\";\n\n/** Which color channel(s) a curves adjustment targets. */\nexport type CurvesChannel = 'rgb' | 'r' | 'g' | 'b' | 'a';\n\n/**\n * Remaps pixel values along a tone curve defined by control points.\n *\n * Points are [input, output] pairs in the [0, 1] range. The renderer\n * interpolates a smooth curve through them. Applies to composite RGB\n * by default; set `channel` to target a single channel.\n */\nexport interface CurvesFilter {\n type: 'curves';\n /** Curve control points as [input, output] pairs in [0, 1]. */\n points: [number, number][];\n /** Channel(s) to apply the curve to. Default 'rgb'. */\n channel?: CurvesChannel;\n}\n\nexport const curvesFilter: FilterData<CurvesFilter> = {\n // Channel hard-cuts at t=0.5 because interpolating between channel names\n // would produce meaningless intermediate states.\n lerp: (from, to, t) => ({\n type: \"curves\",\n channel: t < 0.5 ? from.channel : to.channel,\n points: from.points.map(([x, y], i) => {\n const [tx, ty] = to.points[i] ?? [x, y];\n return [lerpNumber(x, tx, t), lerpNumber(y, ty, t)] as [number, number];\n }),\n }),\n equals: (a, b) =>\n a.channel === b.channel &&\n a.points.length === b.points.length &&\n a.points.every(([x, y], i) => x === b.points[i]?.[0] && y === b.points[i]?.[1]),\n};\n"]}
1
+ {"version":3,"file":"curves.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/curves.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erpNumber } from \"@/tween/lerp\";\n\n/** Which color channel(s) a curves adjustment targets. */\nexport type CurvesChannel = 'rgb' | 'r' | 'g' | 'b' | 'a';\n\n/** Remaps pixel values along a tone curve through [input, output] control points in [0, 1] (the renderer interpolates a smooth curve). Composite RGB by default; set `channel` for one. */\nexport interface CurvesFilter {\n type: 'curves';\n /** Curve control points as [input, output] pairs in [0, 1]. */\n points: [number, number][];\n /** Channel(s) to apply the curve to. Default 'rgb'. */\n channel?: CurvesChannel;\n}\n\nexport const curvesFilter: FilterData<CurvesFilter> = {\n // Channel hard-cuts at t=0.5 because interpolating between channel names\n // would produce meaningless intermediate states.\n lerp: (from, to, t) => ({\n type: \"curves\",\n channel: t < 0.5 ? from.channel : to.channel,\n points: from.points.map(([x, y], i) => {\n const [tx, ty] = to.points[i] ?? [x, y];\n return [lerpNumber(x, tx, t), lerpNumber(y, ty, t)] as [number, number];\n }),\n }),\n equals: (a, b) =>\n a.channel === b.channel &&\n a.points.length === b.points.length &&\n a.points.every(([x, y], i) => x === b.points[i]?.[0] && y === b.points[i]?.[1]),\n};\n"]}
@@ -1,16 +1,6 @@
1
1
  import type { FilterData } from "../registry.js";
2
2
  import type { BlendMode } from "../../fill/blend.js";
3
- /**
4
- * Composites the current video frame with a trail of past frames (After Effects'
5
- * Echo), each delayed by `delay` seconds and faded by a `decay` factor. Needs
6
- * several decoded frames at once, so — unlike the pixel filters — it is rendered
7
- * by a dedicated multi-pass path in the video fill renderer rather than the
8
- * `setImageFilter` chain. Video-only; a no-op on image fills.
9
- *
10
- * The trail reaches back `echoes * delay` source seconds; frames outside the
11
- * adapter's decoded back-window are simply skipped (the trail fills in over the
12
- * first second of playback after a cold seek).
13
- */
3
+ /** Composites the current video frame with a trail of past frames (After Effects' Echo), each delayed by `delay` seconds and faded by `decay`. It needs several decoded frames at once, so a dedicated multi-pass path in the video fill renderer draws it, not the `setImageFilter` chain. Video-only; a no-op on image fills. The trail reaches back `echoes * delay` source seconds; frames outside the adapter's decoded back-window are skipped (it fills in over the first second after a cold seek). */
14
4
  export interface VideoEchoFilter {
15
5
  type: 'echo';
16
6
  /** Number of past-frame taps drawn behind the current frame. */
@@ -1 +1 @@
1
- {"version":3,"file":"echo.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/echo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,eAAe,CAclD,CAAC"}
1
+ {"version":3,"file":"echo.d.ts","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/echo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,+eAA+e;AAC/e,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,eAAe,CAclD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"echo.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/echo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAyB1C,MAAM,CAAC,MAAM,UAAU,GAAgC;IACnD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACzD,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,IAAI,GAAG,EAAE,EAAE,CAAC,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC;QACxD,6DAA6D;QAC7D,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;KACzC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC;QACrC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;CAC1B,CAAC","sourcesContent":["import type { FilterData } from \"../registry\";\nimport type { BlendMode } from \"../../fill/blend\";\nimport { lerpNumber } from \"@/tween/lerp\";\n\n/**\n * Composites the current video frame with a trail of past frames (After Effects'\n * Echo), each delayed by `delay` seconds and faded by a `decay` factor. Needs\n * several decoded frames at once, so — unlike the pixel filters — it is rendered\n * by a dedicated multi-pass path in the video fill renderer rather than the\n * `setImageFilter` chain. Video-only; a no-op on image fills.\n *\n * The trail reaches back `echoes * delay` source seconds; frames outside the\n * adapter's decoded back-window are simply skipped (the trail fills in over the\n * first second of playback after a cold seek).\n */\nexport interface VideoEchoFilter {\n type: 'echo';\n /** Number of past-frame taps drawn behind the current frame. */\n echoes: number;\n /** Delay between successive taps, in source seconds. */\n delay: number;\n /** Per-tap alpha multiplier; tap `n` is drawn at `decay ** n`. Default 0.5. */\n decay?: number;\n /** Blend mode used to composite the echo taps. Default `'screen'`. */\n blend?: BlendMode;\n}\n\nexport const echoFilter: FilterData<VideoEchoFilter> = {\n lerp: (from, to, t) => ({\n type: \"echo\",\n echoes: Math.round(lerpNumber(from.echoes, to.echoes, t)),\n delay: lerpNumber(from.delay, to.delay, t),\n decay: lerpNumber(from.decay ?? 0.5, to.decay ?? 0.5, t),\n // Blend is a discrete enum, so it hard-cuts at the midpoint.\n blend: t < 0.5 ? from.blend : to.blend,\n }),\n equals: (a, b) =>\n a.echoes === b.echoes &&\n a.delay === b.delay &&\n (a.decay ?? 0.5) === (b.decay ?? 0.5) &&\n a.blend === b.blend,\n};\n"]}
1
+ {"version":3,"file":"echo.js","sourceRoot":"","sources":["../../../../../src/attributes/shape/filters/implementations/echo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAe1C,MAAM,CAAC,MAAM,UAAU,GAAgC;IACnD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACzD,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,IAAI,GAAG,EAAE,EAAE,CAAC,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC;QACxD,6DAA6D;QAC7D,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;KACzC,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACb,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC;QACrC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;CAC1B,CAAC","sourcesContent":["import type { FilterData } from \"../registry\";\nimport type { BlendMode } from \"../../fill/blend\";\nimport { lerpNumber } from \"@/tween/lerp\";\n\n/** Composites the current video frame with a trail of past frames (After Effects' Echo), each delayed by `delay` seconds and faded by `decay`. It needs several decoded frames at once, so a dedicated multi-pass path in the video fill renderer draws it, not the `setImageFilter` chain. Video-only; a no-op on image fills. The trail reaches back `echoes * delay` source seconds; frames outside the adapter's decoded back-window are skipped (it fills in over the first second after a cold seek). */\nexport interface VideoEchoFilter {\n type: 'echo';\n /** Number of past-frame taps drawn behind the current frame. */\n echoes: number;\n /** Delay between successive taps, in source seconds. */\n delay: number;\n /** Per-tap alpha multiplier; tap `n` is drawn at `decay ** n`. Default 0.5. */\n decay?: number;\n /** Blend mode used to composite the echo taps. Default `'screen'`. */\n blend?: BlendMode;\n}\n\nexport const echoFilter: FilterData<VideoEchoFilter> = {\n lerp: (from, to, t) => ({\n type: \"echo\",\n echoes: Math.round(lerpNumber(from.echoes, to.echoes, t)),\n delay: lerpNumber(from.delay, to.delay, t),\n decay: lerpNumber(from.decay ?? 0.5, to.decay ?? 0.5, t),\n // Blend is a discrete enum, so it hard-cuts at the midpoint.\n blend: t < 0.5 ? from.blend : to.blend,\n }),\n equals: (a, b) =>\n a.echoes === b.echoes &&\n a.delay === b.delay &&\n (a.decay ?? 0.5) === (b.decay ?? 0.5) &&\n a.blend === b.blend,\n};\n"]}
@@ -10,15 +10,10 @@
10
10
  /** @internal */ export type { VideoEchoFilter } from './implementations/echo.js';
11
11
  /** @internal Chainable filter builder API, chain classes, and the loose author-facing unions. */
12
12
  /** @internal */ export { Adjustments, VideoAdjustments, AdjustmentChain, VideoAdjustmentChain, resolveChainAdjustments } from './chain.js';
13
- /** @internal @deprecated Renamed to `Adjustments`/`VideoAdjustments`. */
14
- /** @internal */ export { ImageFilters, VideoFilters } from './chain.js';
15
13
  /** @internal */ export type { ImageAdjustment, VideoAdjustment } from './chain.js';
16
14
  /** @internal Per-builder options. Each builder takes one of these, or its dominant scalar. */
17
15
  /** @internal */ export type { BlurFilterOptions, GrayscaleFilterOptions, AlphaFilterOptions, ExposureFilterOptions, ColorMatrixFilterOptions, CurvesFilterOptions, ColorAdjustmentFilterOptions, PosterizeTimeFilterOptions, EchoFilterOptions as VideoEchoFilterOptions, } from './chain.js';
18
- /**
19
- * @internal Unions of concrete filter types: pixel (`MediaAdjustment`), video-only,
20
- * and the node effects that double as filters.
21
- */
16
+ /** @internal Unions of concrete filter types: pixel, video-only, and node effects that double as filters. */
22
17
  /** @internal */ export type { MediaAdjustment, VideoOnlyAdjustment, EffectAdjustment } from './union.js';
23
18
  /** @internal Interpolation/equality registry: constants map plus the lerp helpers. */
24
19
  /** @internal */ export { lerpFilter, lerpFilterArray, isPixelFilter, hasFilter, filterSurface } from './registry.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,gBAAgB,CAAC,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAClF,gBAAgB,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,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,gBAAgB,CAAC,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEvG,sFAAsF;AACtF,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACnH,gBAAgB,CAAC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
@@ -1,7 +1,5 @@
1
1
  /** @internal Chainable filter builder API, chain classes, and the loose author-facing unions. */
2
2
  /** @internal */ export { Adjustments, VideoAdjustments, AdjustmentChain, VideoAdjustmentChain, resolveChainAdjustments } from './chain.js';
3
- /** @internal @deprecated Renamed to `Adjustments`/`VideoAdjustments`. */
4
- /** @internal */ export { ImageFilters, VideoFilters } from './chain.js';
5
3
  /** @internal Interpolation/equality registry: constants map plus the lerp helpers. */
6
4
  /** @internal */ export { lerpFilter, lerpFilterArray, isPixelFilter, hasFilter, filterSurface } from './registry.js';
7
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/index.ts"],"names":[],"mappings":"AAWA,iGAAiG;AACjG,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACzI,yEAAyE;AACzE,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsBtE,sFAAsF;AACtF,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/** @internal Media-filter data types for each built-in filter. */\n/** @internal */ export type { ExposureFilter } from './implementations/exposure';\n/** @internal */ export type { BlurFilter } from './implementations/blur';\n/** @internal */ export type { GrayscaleFilter } from './implementations/grayscale';\n/** @internal */ export type { AlphaFilter } from './implementations/alpha';\n/** @internal */ export type { ColorMatrixFilter } from './implementations/color-matrix';\n/** @internal */ export type { CurvesChannel, CurvesFilter } from './implementations/curves';\n/** @internal */ export type { ColorAdjustmentFilter } from './implementations/color-adjustment';\n/** @internal */ export type { PosterizeTimeFilter } from './implementations/posterize-time';\n/** @internal */ export type { VideoEchoFilter } from './implementations/echo';\n\n/** @internal Chainable filter builder API, chain classes, and the loose author-facing unions. */\n/** @internal */ export { Adjustments, VideoAdjustments, AdjustmentChain, VideoAdjustmentChain, resolveChainAdjustments } from './chain';\n/** @internal @deprecated Renamed to `Adjustments`/`VideoAdjustments`. */\n/** @internal */ export { ImageFilters, VideoFilters } from './chain';\n/** @internal */ export type { ImageAdjustment, VideoAdjustment } from './chain';\n\n/** @internal Per-builder options. Each builder takes one of these, or its dominant scalar. */\n/** @internal */ export type {\n BlurFilterOptions,\n GrayscaleFilterOptions,\n AlphaFilterOptions,\n ExposureFilterOptions,\n ColorMatrixFilterOptions,\n CurvesFilterOptions,\n ColorAdjustmentFilterOptions,\n PosterizeTimeFilterOptions,\n EchoFilterOptions as VideoEchoFilterOptions,\n} from './chain';\n\n/**\n * @internal Unions of concrete filter types: pixel (`MediaAdjustment`), video-only,\n * and the node effects that double as filters.\n */\n/** @internal */ export type { MediaAdjustment, VideoOnlyAdjustment, EffectAdjustment } from './union';\n\n/** @internal Interpolation/equality registry: constants map plus the lerp helpers. */\n/** @internal */ export { lerpFilter, lerpFilterArray, isPixelFilter, hasFilter, filterSurface } from './registry';\n/** @internal */ export type { FilterData, AnyFilter } from './registry';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/index.ts"],"names":[],"mappings":"AAWA,iGAAiG;AACjG,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAmBzI,sFAAsF;AACtF,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/** @internal Media-filter data types for each built-in filter. */\n/** @internal */ export type { ExposureFilter } from './implementations/exposure';\n/** @internal */ export type { BlurFilter } from './implementations/blur';\n/** @internal */ export type { GrayscaleFilter } from './implementations/grayscale';\n/** @internal */ export type { AlphaFilter } from './implementations/alpha';\n/** @internal */ export type { ColorMatrixFilter } from './implementations/color-matrix';\n/** @internal */ export type { CurvesChannel, CurvesFilter } from './implementations/curves';\n/** @internal */ export type { ColorAdjustmentFilter } from './implementations/color-adjustment';\n/** @internal */ export type { PosterizeTimeFilter } from './implementations/posterize-time';\n/** @internal */ export type { VideoEchoFilter } from './implementations/echo';\n\n/** @internal Chainable filter builder API, chain classes, and the loose author-facing unions. */\n/** @internal */ export { Adjustments, VideoAdjustments, AdjustmentChain, VideoAdjustmentChain, resolveChainAdjustments } from './chain';\n/** @internal */ export type { ImageAdjustment, VideoAdjustment } from './chain';\n\n/** @internal Per-builder options. Each builder takes one of these, or its dominant scalar. */\n/** @internal */ export type {\n BlurFilterOptions,\n GrayscaleFilterOptions,\n AlphaFilterOptions,\n ExposureFilterOptions,\n ColorMatrixFilterOptions,\n CurvesFilterOptions,\n ColorAdjustmentFilterOptions,\n PosterizeTimeFilterOptions,\n EchoFilterOptions as VideoEchoFilterOptions,\n} from './chain';\n\n/** @internal Unions of concrete filter types: pixel, video-only, and node effects that double as filters. */\n/** @internal */ export type { MediaAdjustment, VideoOnlyAdjustment, EffectAdjustment } from './union';\n\n/** @internal Interpolation/equality registry: constants map plus the lerp helpers. */\n/** @internal */ export { lerpFilter, lerpFilterArray, isPixelFilter, hasFilter, filterSurface } from './registry';\n/** @internal */ export type { FilterData, AnyFilter } from './registry';\n"]}
@@ -4,49 +4,19 @@ import type { AssetScope } from "../../../assets/scope.js";
4
4
  export type AnyFilter = MediaAdjustment | VideoOnlyAdjustment;
5
5
  /** Interpolation and equality contract every filter implementation must implement. */
6
6
  export interface FilterData<T extends AnyFilter> {
7
- /** Return a new filter linearly interpolated between `from` and `to` at progress `t` (0–1). */
8
7
  lerp(from: T, to: T, t: number): T;
9
- /** Return true when both filters are visually identical (used to skip redundant redraws). */
10
8
  equals(a: T, b: T): boolean;
11
9
  }
12
- /** True when `type` is a pixel filter that composes into a media fill's filter chain. */
13
10
  export declare function isPixelFilter(type: string): boolean;
14
- /** True when `type` has a registered `FilterData` handler, here or in the effects registry. */
15
11
  export declare function hasFilter(type: string): boolean;
16
- /**
17
- * Interpolate between two individual filters at progress `t`.
18
- * Falls back to a hard cut at t = 0.5 when the types differ or are unregistered.
19
- *
20
- * A type with no dedicated `FilterData` is an {@link EffectAdjustment}, so it is
21
- * handed to `lerpEffect` — one interpolation per effect, whether it is animated
22
- * on a node or inside a fill.
23
- */
12
+ /** Interpolates two filters, hard-cutting at t = 0.5 when types differ or are unregistered. A type with no dedicated `FilterData` is an {@link EffectAdjustment}, handed to `lerpEffect` so one interpolation serves a node or a fill. */
24
13
  export declare function lerpFilter(from: AnyFilter, to: AnyFilter, t: number): AnyFilter;
25
- /**
26
- * The filters defined here reference nothing, but an {@link EffectAdjustment} can —
27
- * `lut` samples an image — and an undeclared one is a lookup the effect can only
28
- * read as "no lookup table".
29
- */
14
+ /** An {@link EffectAdjustment} can reference assets (`lut` samples an image), and an undeclared one reads as "no lookup table". */
30
15
  export declare function declareFilter(filter: AnyFilter, assets: AssetScope): void;
31
- /**
32
- * How a backend must realise `filter` — `"shader"` when it resamples pixel
33
- * positions and therefore has to wrap the fill's shader rather than compose
34
- * into its `ImageFilter` chain. The filters defined here are all `"filter"`;
35
- * an {@link EffectAdjustment} answers with its effect's own declaration.
36
- */
16
+ /** How a backend must realise `filter`: `"shader"` when it resamples pixel positions, so it wraps the fill's shader rather than composing into its `ImageFilter` chain. The filters defined here are all `"filter"`; an {@link EffectAdjustment} answers with its effect's declaration. */
37
17
  export declare function filterSurface(filter: AnyFilter): "filter" | "shader";
38
- /**
39
- * {@link lerpFilterArray} over two *optional* arrays, answering `undefined`
40
- * when neither side has a filter.
41
- *
42
- * A media fill's `lerp` is spread over the whole fill (`{...a, ...lerp(a,b,t)}`),
43
- * so returning `[]` for the overwhelmingly common no-filter case would allocate
44
- * a fresh array per fill per frame and turn an absent field into a present one.
45
- */
18
+ /** {@link lerpFilterArray} over two *optional* arrays, answering `undefined` when neither has a filter: a media fill's `lerp` is spread over the whole fill, so returning `[]` would allocate per fill per frame and turn an absent field into a present one. */
46
19
  export declare function lerpOptionalFilters<T extends AnyFilter>(from: T[] | undefined, to: T[] | undefined, t: number): T[] | undefined;
47
- /**
48
- * Interpolate between two filter arrays of potentially different lengths.
49
- * Indices present in only one array are kept as-is; matched indices are lerped pairwise.
50
- */
20
+ /** Interpolates two filter arrays of possibly different lengths: indices in only one array are kept, matched ones lerped pairwise. */
51
21
  export declare function lerpFilterArray(from: AnyFilter[], to: AnyFilter[], t: number): AnyFilter[];
52
22
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAYjD,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,mBAAmB,CAAC;AAE9D,sFAAsF;AACtF,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,SAAS;IAC3C,+FAA+F;IAC/F,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IACnC,6FAA6F;IAC7F,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG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AE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IACnC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;CAC/B;AAkBD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,0OAA0O;AAC1O,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAK/E;AAED,mIAAmI;AACnI,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAGzE;AAED,2RAA2R;AAC3R,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAKpE;AAED,iQAAiQ;AACjQ,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EACnD,IAAI,EAAE,CAAC,EAAE,GAAG,SAAS,EACrB,EAAE,EAAE,CAAC,EAAE,GAAG,SAAS,EACnB,CAAC,EAAE,MAAM,GACV,CAAC,EAAE,GAAG,SAAS,CAGjB;AAED,sIAAsI;AACtI,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAe1F"}
@@ -8,17 +8,7 @@ import { curvesFilter } from "./implementations/curves.js";
8
8
  import { colorAdjustmentFilter } from "./implementations/color-adjustment.js";
9
9
  import { posterizeTimeFilter } from "./implementations/posterize-time.js";
10
10
  import { echoFilter } from "./implementations/echo.js";
11
- /**
12
- * Maps each filter `type` to its `FilterData` handler. Statically imported
13
- * constants (no runtime registration step), mirroring the `FILLS` map in the
14
- * fill registry — so the table is always populated and there is no side-effect
15
- * import to forget.
16
- *
17
- * It holds only the filters that exist *solely* as filters. Most of the roster
18
- * is {@link EffectAdjustment} — a node effect applied to a fill's own pixels — and
19
- * those are looked up in the effects registry rather than duplicated here, so
20
- * `dither` interpolates the same way whether it is on a node or on an image.
21
- */
11
+ /** Maps each filter `type` to its `FilterData` handler, as constants (no runtime registration step to forget). Holds only filters that exist *solely* as filters; most of the roster is {@link EffectAdjustment}, looked up in the effects registry so `dither` interpolates the same on a node or an image. */
22
12
  const FILTERS = new Map([
23
13
  ["exposure", exposureFilter],
24
14
  ["blur", blurFilter],
@@ -30,29 +20,15 @@ const FILTERS = new Map([
30
20
  ["posterizeTime", posterizeTimeFilter],
31
21
  ["echo", echoFilter],
32
22
  ]);
33
- /**
34
- * Video-only filter types. These are consumed by the video fill's per-frame
35
- * `update()` (`posterizeTime`) or a dedicated multi-pass renderer (`echo`),
36
- * not the pixel filter chain. `isPixelFilter` lets a renderer skip them when
37
- * composing that chain.
38
- */
23
+ /** Video-only filter types, consumed by the video fill's per-frame `update()` (`posterizeTime`) or a dedicated multi-pass renderer (`echo`); `isPixelFilter` lets a renderer skip them when composing the pixel chain. */
39
24
  const VIDEO_ONLY = new Set(["posterizeTime", "echo"]);
40
- /** True when `type` is a pixel filter that composes into a media fill's filter chain. */
41
25
  export function isPixelFilter(type) {
42
26
  return !VIDEO_ONLY.has(type);
43
27
  }
44
- /** True when `type` has a registered `FilterData` handler, here or in the effects registry. */
45
28
  export function hasFilter(type) {
46
29
  return FILTERS.has(type) || hasEffect(type);
47
30
  }
48
- /**
49
- * Interpolate between two individual filters at progress `t`.
50
- * Falls back to a hard cut at t = 0.5 when the types differ or are unregistered.
51
- *
52
- * A type with no dedicated `FilterData` is an {@link EffectAdjustment}, so it is
53
- * handed to `lerpEffect` — one interpolation per effect, whether it is animated
54
- * on a node or inside a fill.
55
- */
31
+ /** Interpolates two filters, hard-cutting at t = 0.5 when types differ or are unregistered. A type with no dedicated `FilterData` is an {@link EffectAdjustment}, handed to `lerpEffect` so one interpolation serves a node or a fill. */
56
32
  export function lerpFilter(from, to, t) {
57
33
  if (from.type !== to.type)
58
34
  return t < 0.5 ? from : to;
@@ -61,22 +37,13 @@ export function lerpFilter(from, to, t) {
61
37
  return data.lerp(from, to, t);
62
38
  return lerpEffect(from, to, t);
63
39
  }
64
- /**
65
- * The filters defined here reference nothing, but an {@link EffectAdjustment} can —
66
- * `lut` samples an image — and an undeclared one is a lookup the effect can only
67
- * read as "no lookup table".
68
- */
40
+ /** An {@link EffectAdjustment} can reference assets (`lut` samples an image), and an undeclared one reads as "no lookup table". */
69
41
  export function declareFilter(filter, assets) {
70
42
  if (FILTERS.has(filter.type))
71
43
  return;
72
44
  declareEffect(filter, assets);
73
45
  }
74
- /**
75
- * How a backend must realise `filter` — `"shader"` when it resamples pixel
76
- * positions and therefore has to wrap the fill's shader rather than compose
77
- * into its `ImageFilter` chain. The filters defined here are all `"filter"`;
78
- * an {@link EffectAdjustment} answers with its effect's own declaration.
79
- */
46
+ /** How a backend must realise `filter`: `"shader"` when it resamples pixel positions, so it wraps the fill's shader rather than composing into its `ImageFilter` chain. The filters defined here are all `"filter"`; an {@link EffectAdjustment} answers with its effect's declaration. */
80
47
  export function filterSurface(filter) {
81
48
  if (FILTERS.has(filter.type))
82
49
  return "filter";
@@ -84,23 +51,13 @@ export function filterSurface(filter) {
84
51
  // effect however the underlying effect's `mode` predicate reads.
85
52
  return effectSurface({ ...filter, mode: "foreground" });
86
53
  }
87
- /**
88
- * {@link lerpFilterArray} over two *optional* arrays, answering `undefined`
89
- * when neither side has a filter.
90
- *
91
- * A media fill's `lerp` is spread over the whole fill (`{...a, ...lerp(a,b,t)}`),
92
- * so returning `[]` for the overwhelmingly common no-filter case would allocate
93
- * a fresh array per fill per frame and turn an absent field into a present one.
94
- */
54
+ /** {@link lerpFilterArray} over two *optional* arrays, answering `undefined` when neither has a filter: a media fill's `lerp` is spread over the whole fill, so returning `[]` would allocate per fill per frame and turn an absent field into a present one. */
95
55
  export function lerpOptionalFilters(from, to, t) {
96
56
  if (!from?.length && !to?.length)
97
57
  return undefined;
98
58
  return lerpFilterArray(from ?? [], to ?? [], t);
99
59
  }
100
- /**
101
- * Interpolate between two filter arrays of potentially different lengths.
102
- * Indices present in only one array are kept as-is; matched indices are lerped pairwise.
103
- */
60
+ /** Interpolates two filter arrays of possibly different lengths: indices in only one array are kept, matched ones lerped pairwise. */
104
61
  export function lerpFilterArray(from, to, t) {
105
62
  const maxLen = Math.max(from.length, to.length);
106
63
  const result = [];
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI1F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAapD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAgC;IACnD,CAAC,UAAU,EAAE,cAAuC,CAAC;IACrD,CAAC,MAAM,EAAE,UAAmC,CAAC;IAC7C,CAAC,WAAW,EAAE,eAAwC,CAAC;IACvD,CAAC,OAAO,EAAE,WAAoC,CAAC;IAC/C,CAAC,aAAa,EAAE,iBAA0C,CAAC;IAC3D,CAAC,QAAQ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;QACnB,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { MediaAdjustment, VideoOnlyAdjustment } from \"./union\";\nimport { declareEffect, effectSurface, hasEffect, lerpEffect } from \"../effects/registry\";\nimport type { NodeEffect } from \"../effects/union\";\nimport type { AssetScope } from \"@/assets/scope\";\n\nimport { exposureFilter } from \"./implementations/exposure\";\nimport { blurFilter } from \"./implementations/blur\";\nimport { grayscaleFilter } from \"./implementations/grayscale\";\nimport { alphaFilter } from \"./implementations/alpha\";\nimport { colorMatrixFilter } from \"./implementations/color-matrix\";\nimport { curvesFilter } from \"./implementations/curves\";\nimport { colorAdjustmentFilter } from \"./implementations/color-adjustment\";\nimport { posterizeTimeFilter } from \"./implementations/posterize-time\";\nimport { echoFilter } from \"./implementations/echo\";\n\n/** Any concrete filter object accepted on a media fill — pixel or video-only. */\nexport type AnyFilter = MediaAdjustment | VideoOnlyAdjustment;\n\n/** Interpolation and equality contract every filter implementation must implement. */\nexport interface FilterData<T extends AnyFilter> {\n /** Return a new filter linearly interpolated between `from` and `to` at progress `t` (0–1). */\n lerp(from: T, to: T, t: number): T;\n /** Return true when both filters are visually identical (used to skip redundant redraws). */\n equals(a: T, b: T): boolean;\n}\n\n/**\n * Maps each filter `type` to its `FilterData` handler. Statically imported\n * constants (no runtime registration step), mirroring the `FILLS` map in the\n * fill registry — so the table is always populated and there is no side-effect\n * import to forget.\n *\n * It holds only the filters that exist *solely* as filters. Most of the roster\n * is {@link EffectAdjustment} — a node effect applied to a fill's own pixels — and\n * those are looked up in the effects registry rather than duplicated here, so\n * `dither` interpolates the same way whether it is on a node or on an image.\n */\nconst FILTERS = new Map<string, FilterData<AnyFilter>>([\n [\"exposure\", exposureFilter as FilterData<AnyFilter>],\n [\"blur\", blurFilter as FilterData<AnyFilter>],\n [\"grayscale\", grayscaleFilter as FilterData<AnyFilter>],\n [\"alpha\", alphaFilter as FilterData<AnyFilter>],\n [\"colorMatrix\", colorMatrixFilter as FilterData<AnyFilter>],\n [\"curves\", curvesFilter as FilterData<AnyFilter>],\n [\"colorAdjustment\", colorAdjustmentFilter as FilterData<AnyFilter>],\n [\"posterizeTime\", posterizeTimeFilter as FilterData<AnyFilter>],\n [\"echo\", echoFilter as FilterData<AnyFilter>],\n]);\n\n/**\n * Video-only filter types. These are consumed by the video fill's per-frame\n * `update()` (`posterizeTime`) or a dedicated multi-pass renderer (`echo`),\n * not the pixel filter chain. `isPixelFilter` lets a renderer skip them when\n * composing that chain.\n */\nconst VIDEO_ONLY = new Set<string>([\"posterizeTime\", \"echo\"]);\n\n/** True when `type` is a pixel filter that composes into a media fill's filter chain. */\nexport function isPixelFilter(type: string): boolean {\n return !VIDEO_ONLY.has(type);\n}\n\n/** True when `type` has a registered `FilterData` handler, here or in the effects registry. */\nexport function hasFilter(type: string): boolean {\n return FILTERS.has(type) || hasEffect(type);\n}\n\n/**\n * Interpolate between two individual filters at progress `t`.\n * Falls back to a hard cut at t = 0.5 when the types differ or are unregistered.\n *\n * A type with no dedicated `FilterData` is an {@link EffectAdjustment}, so it is\n * handed to `lerpEffect` — one interpolation per effect, whether it is animated\n * on a node or inside a fill.\n */\nexport function lerpFilter(from: AnyFilter, to: AnyFilter, t: number): AnyFilter {\n if (from.type !== to.type) return t < 0.5 ? from : to;\n const data = FILTERS.get(from.type);\n if (data) return data.lerp(from, to, t);\n return lerpEffect(from as NodeEffect, to as NodeEffect, t) as AnyFilter;\n}\n\n/**\n * The filters defined here reference nothing, but an {@link EffectAdjustment} can —\n * `lut` samples an image — and an undeclared one is a lookup the effect can only\n * read as \"no lookup table\".\n */\nexport function declareFilter(filter: AnyFilter, assets: AssetScope): void {\n if (FILTERS.has(filter.type)) return;\n declareEffect(filter as NodeEffect, assets);\n}\n\n/**\n * How a backend must realise `filter` — `\"shader\"` when it resamples pixel\n * positions and therefore has to wrap the fill's shader rather than compose\n * into its `ImageFilter` chain. The filters defined here are all `\"filter\"`;\n * an {@link EffectAdjustment} answers with its effect's own declaration.\n */\nexport function filterSurface(filter: AnyFilter): \"filter\" | \"shader\" {\n if (FILTERS.has(filter.type)) return \"filter\";\n // A filter is applied to the fill's own pixels, so it is never a backdrop\n // effect however the underlying effect's `mode` predicate reads.\n return effectSurface({ ...filter, mode: \"foreground\" } as NodeEffect);\n}\n\n/**\n * {@link lerpFilterArray} over two *optional* arrays, answering `undefined`\n * when neither side has a filter.\n *\n * A media fill's `lerp` is spread over the whole fill (`{...a, ...lerp(a,b,t)}`),\n * so returning `[]` for the overwhelmingly common no-filter case would allocate\n * a fresh array per fill per frame and turn an absent field into a present one.\n */\nexport function lerpOptionalFilters<T extends AnyFilter>(\n from: T[] | undefined,\n to: T[] | undefined,\n t: number,\n): T[] | undefined {\n if (!from?.length && !to?.length) return undefined;\n return lerpFilterArray(from ?? [], to ?? [], t) as T[];\n}\n\n/**\n * Interpolate between two filter arrays of potentially different lengths.\n * Indices present in only one array are kept as-is; matched indices are lerped pairwise.\n */\nexport function lerpFilterArray(from: AnyFilter[], to: AnyFilter[], t: number): AnyFilter[] {\n const maxLen = Math.max(from.length, to.length);\n const result: AnyFilter[] = [];\n for (let i = 0; i < maxLen; i++) {\n const a = from[i];\n const b = to[i];\n if (a && b) {\n result.push(lerpFilter(a, b, t));\n } else if (a) {\n result.push(a);\n } else if (b) {\n result.push(b);\n }\n }\n return result;\n}\n"]}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI1F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,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,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;aAAM,IAAI,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;aAAM,IAAI,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { MediaAdjustment, VideoOnlyAdjustment } from \"./union\";\nimport { declareEffect, effectSurface, hasEffect, lerpEffect } from \"../effects/registry\";\nimport type { NodeEffect } from \"../effects/union\";\nimport type { AssetScope } from \"@/assets/scope\";\n\nimport { exposureFilter } from \"./implementations/exposure\";\nimport { blurFilter } from \"./implementations/blur\";\nimport { grayscaleFilter } from \"./implementations/grayscale\";\nimport { alphaFilter } from \"./implementations/alpha\";\nimport { colorMatrixFilter } from \"./implementations/color-matrix\";\nimport { curvesFilter } from \"./implementations/curves\";\nimport { colorAdjustmentFilter } from \"./implementations/color-adjustment\";\nimport { posterizeTimeFilter } from \"./implementations/posterize-time\";\nimport { echoFilter } from \"./implementations/echo\";\n\n/** Any concrete filter object accepted on a media fill — pixel or video-only. */\nexport type AnyFilter = MediaAdjustment | VideoOnlyAdjustment;\n\n/** Interpolation and equality contract every filter implementation must implement. */\nexport interface FilterData<T extends AnyFilter> {\n lerp(from: T, to: T, t: number): T;\n equals(a: T, b: T): boolean;\n}\n\n/** Maps each filter `type` to its `FilterData` handler, as constants (no runtime registration step to forget). Holds only filters that exist *solely* as filters; most of the roster is {@link EffectAdjustment}, looked up in the effects registry so `dither` interpolates the same on a node or an image. */\nconst FILTERS = new Map<string, FilterData<AnyFilter>>([\n [\"exposure\", exposureFilter as FilterData<AnyFilter>],\n [\"blur\", blurFilter as FilterData<AnyFilter>],\n [\"grayscale\", grayscaleFilter as FilterData<AnyFilter>],\n [\"alpha\", alphaFilter as FilterData<AnyFilter>],\n [\"colorMatrix\", colorMatrixFilter as FilterData<AnyFilter>],\n [\"curves\", curvesFilter as FilterData<AnyFilter>],\n [\"colorAdjustment\", colorAdjustmentFilter as FilterData<AnyFilter>],\n [\"posterizeTime\", posterizeTimeFilter as FilterData<AnyFilter>],\n [\"echo\", echoFilter as FilterData<AnyFilter>],\n]);\n\n/** Video-only filter types, consumed by the video fill's per-frame `update()` (`posterizeTime`) or a dedicated multi-pass renderer (`echo`); `isPixelFilter` lets a renderer skip them when composing the pixel chain. */\nconst VIDEO_ONLY = new Set<string>([\"posterizeTime\", \"echo\"]);\n\nexport function isPixelFilter(type: string): boolean {\n return !VIDEO_ONLY.has(type);\n}\n\nexport function hasFilter(type: string): boolean {\n return FILTERS.has(type) || hasEffect(type);\n}\n\n/** Interpolates two filters, hard-cutting at t = 0.5 when types differ or are unregistered. A type with no dedicated `FilterData` is an {@link EffectAdjustment}, handed to `lerpEffect` so one interpolation serves a node or a fill. */\nexport function lerpFilter(from: AnyFilter, to: AnyFilter, t: number): AnyFilter {\n if (from.type !== to.type) return t < 0.5 ? from : to;\n const data = FILTERS.get(from.type);\n if (data) return data.lerp(from, to, t);\n return lerpEffect(from as NodeEffect, to as NodeEffect, t) as AnyFilter;\n}\n\n/** An {@link EffectAdjustment} can reference assets (`lut` samples an image), and an undeclared one reads as \"no lookup table\". */\nexport function declareFilter(filter: AnyFilter, assets: AssetScope): void {\n if (FILTERS.has(filter.type)) return;\n declareEffect(filter as NodeEffect, assets);\n}\n\n/** How a backend must realise `filter`: `\"shader\"` when it resamples pixel positions, so it wraps the fill's shader rather than composing into its `ImageFilter` chain. The filters defined here are all `\"filter\"`; an {@link EffectAdjustment} answers with its effect's declaration. */\nexport function filterSurface(filter: AnyFilter): \"filter\" | \"shader\" {\n if (FILTERS.has(filter.type)) return \"filter\";\n // A filter is applied to the fill's own pixels, so it is never a backdrop\n // effect however the underlying effect's `mode` predicate reads.\n return effectSurface({ ...filter, mode: \"foreground\" } as NodeEffect);\n}\n\n/** {@link lerpFilterArray} over two *optional* arrays, answering `undefined` when neither has a filter: a media fill's `lerp` is spread over the whole fill, so returning `[]` would allocate per fill per frame and turn an absent field into a present one. */\nexport function lerpOptionalFilters<T extends AnyFilter>(\n from: T[] | undefined,\n to: T[] | undefined,\n t: number,\n): T[] | undefined {\n if (!from?.length && !to?.length) return undefined;\n return lerpFilterArray(from ?? [], to ?? [], t) as T[];\n}\n\n/** Interpolates two filter arrays of possibly different lengths: indices in only one array are kept, matched ones lerped pairwise. */\nexport function lerpFilterArray(from: AnyFilter[], to: AnyFilter[], t: number): AnyFilter[] {\n const maxLen = Math.max(from.length, to.length);\n const result: AnyFilter[] = [];\n for (let i = 0; i < maxLen; i++) {\n const a = from[i];\n const b = to[i];\n if (a && b) {\n result.push(lerpFilter(a, b, t));\n } else if (a) {\n result.push(a);\n } else if (b) {\n result.push(b);\n }\n }\n return result;\n}\n"]}
@@ -19,61 +19,20 @@ import type { DropShadowEffect } from "../../../attributes/shape/effects/impleme
19
19
  import type { GlowEffect } from "../effects/implementations/glow.js";
20
20
  import type { GlassEffect } from "../effects/implementations/glass.js";
21
21
  /**
22
- * The node effects that are **not** media filters, and why.
23
- *
24
- * Everything else in {@link NodeEffect} is a function of the pixels it is
25
- * given, so it means exactly the same thing applied to a node's rendered
26
- * content or to one fill layer's own pixels — and the renderer already runs
27
- * both through a single handler registry. This is the exception list, so a new
28
- * effect becomes a filter by default rather than by remembering to add it.
29
- *
30
- * Two reasons land here:
31
- *
32
- * - **Needs something a fill layer doesn't have.** `magnify` and `glass` sample
33
- * the backdrop beneath the node — glass is a slab you see *through*, and a
34
- * node's own paint is not something there is anything behind; `motionBlur` and
35
- * `trails` are derived from the node's sampled velocity. A fill has no
36
- * backdrop and no motion of its own.
37
- * - **Draws outside the silhouette.** `outline` paints a ring around the
38
- * content, which the shape path a fill is clipped to would cut away, and
39
- * `glow` bleeds past it in every direction — a glow clipped to the thing that
40
- * cast it is not a dimmer glow, it is no glow at all. (`bloom` stays: it is
41
- * the contained version of the same idea, which is what makes it the right
42
- * one to reach for on a fill.)
43
- *
44
- * `blur`, `grayscale`, `curves` and `colorAdjustment` are excluded for a third,
45
- * bookkeeping reason: they already have a dedicated filter type below, sharing
46
- * the same fields and the same renderer handler.
22
+ * The node effects that are **not** media filters. Everything else in {@link NodeEffect} is a function of the pixels it
23
+ * is given, so it means the same on a node's content or one fill layer's pixels; this is the exception list, so a new
24
+ * effect becomes a filter by default. Two reasons: **it needs something a fill layer lacks** (`magnify` and `glass`
25
+ * sample the backdrop, `motionBlur` and `trails` derive from the node's velocity), or **it draws outside the
26
+ * silhouette** (`outline` paints a ring the fill's clip would cut away, and `glow` bleeds past it; `bloom` stays as the
27
+ * contained version). `blur`, `grayscale`, `curves` and `colorAdjustment` are excluded only because they have dedicated
28
+ * filter types below sharing the same fields and renderer handler.
47
29
  */
48
30
  type NonFilterEffect = MagnifyEffect | GlassEffect | MotionBlurEffect | OutlineEffect | DropShadowEffect | GlowEffect | BlurEffect | GrayscaleEffect | CurvesEffect | ColorAdjustmentEffect;
49
- /**
50
- * Node effects usable as a media filter — i.e. applied to one image/video
51
- * fill's own pixels rather than to a node and everything under it.
52
- *
53
- * This is what lets a background image be oil-painted, dithered or posterized
54
- * without wrapping it in a node whose effect would also hit its children:
55
- *
56
- * Rect({
57
- * fill: Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) }),
58
- * children: [Text({ text: "still sharp" })],
59
- * })
60
- *
61
- * The effects carry a `mode` field that means nothing here (a fill has no
62
- * backdrop); the {@link VideoAdjustmentChain} builders drop it, and the renderer ignores
63
- * it on this path.
64
- */
31
+ /** Node effects usable as a media filter: applied to one image/video fill's own pixels rather than a node and everything under it (so a background can be oil-painted without also hitting its children). Their `mode` means nothing here (a fill has no backdrop); the {@link VideoAdjustmentChain} builders drop it and the renderer ignores it. */
65
32
  export type EffectAdjustment = Exclude<NodeEffect, NonFilterEffect>;
66
- /**
67
- * Discriminated union of pixel filters — the filters valid on both image and
68
- * video fills. Each is realised either as a per-pixel colour filter, or — for
69
- * the ones that resample pixel *positions* — as a lens pass over the fill.
70
- */
33
+ /** Pixel filters valid on both image and video fills, each a per-pixel colour filter or, for those that resample pixel *positions*, a lens pass over the fill. */
71
34
  export type MediaAdjustment = ExposureFilter | BlurFilter | GrayscaleFilter | AlphaFilter | ColorMatrixFilter | CurvesFilter | ColorAdjustmentFilter | EffectAdjustment;
72
- /**
73
- * Discriminated union of video-only filters — temporal/multi-frame effects that
74
- * are meaningless on a still image (a single frame has no time axis and no
75
- * previous frames). Consumed outside the pixel `setImageFilter` path.
76
- */
35
+ /** Video-only filters: temporal/multi-frame effects meaningless on a still (no time axis, no previous frames), consumed outside the pixel `setImageFilter` path. */
77
36
  export type VideoOnlyAdjustment = PosterizeTimeFilter | VideoEchoFilter;
78
37
  export {};
79
38
  //# sourceMappingURL=union.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/union.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE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