@motionscript/core 0.1.0 → 0.1.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1072) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/assets/asset-index.d.ts +1 -8
  3. package/dist/assets/asset-index.d.ts.map +1 -1
  4. package/dist/assets/asset-index.js +1 -8
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +10 -72
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +3 -29
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts +8 -20
  11. package/dist/assets/errors.d.ts.map +1 -1
  12. package/dist/assets/errors.js +8 -20
  13. package/dist/assets/errors.js.map +1 -1
  14. package/dist/assets/index.d.ts.map +1 -1
  15. package/dist/assets/index.js.map +1 -1
  16. package/dist/assets/manager.d.ts +9 -51
  17. package/dist/assets/manager.d.ts.map +1 -1
  18. package/dist/assets/manager.js +13 -78
  19. package/dist/assets/manager.js.map +1 -1
  20. package/dist/assets/record.d.ts +2 -18
  21. package/dist/assets/record.d.ts.map +1 -1
  22. package/dist/assets/record.js.map +1 -1
  23. package/dist/assets/scope.d.ts +3 -18
  24. package/dist/assets/scope.d.ts.map +1 -1
  25. package/dist/assets/scope.js +2 -11
  26. package/dist/assets/scope.js.map +1 -1
  27. package/dist/attributes/audio/effects/chain.d.ts +2 -12
  28. package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
  29. package/dist/attributes/audio/effects/chain.js +1 -7
  30. package/dist/attributes/audio/effects/chain.js.map +1 -1
  31. package/dist/attributes/audio/effects/registry.d.ts +3 -18
  32. package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
  33. package/dist/attributes/audio/effects/registry.js +4 -23
  34. package/dist/attributes/audio/effects/registry.js.map +1 -1
  35. package/dist/attributes/audio/ramp.d.ts +5 -38
  36. package/dist/attributes/audio/ramp.d.ts.map +1 -1
  37. package/dist/attributes/audio/ramp.js +3 -28
  38. package/dist/attributes/audio/ramp.js.map +1 -1
  39. package/dist/attributes/audio/request.d.ts +10 -80
  40. package/dist/attributes/audio/request.d.ts.map +1 -1
  41. package/dist/attributes/audio/request.js +1 -4
  42. package/dist/attributes/audio/request.js.map +1 -1
  43. package/dist/attributes/audio/schedule.d.ts +2 -12
  44. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  45. package/dist/attributes/audio/schedule.js +2 -11
  46. package/dist/attributes/audio/schedule.js.map +1 -1
  47. package/dist/attributes/audio/sound.d.ts +2 -26
  48. package/dist/attributes/audio/sound.d.ts.map +1 -1
  49. package/dist/attributes/audio/sound.js +1 -9
  50. package/dist/attributes/audio/sound.js.map +1 -1
  51. package/dist/attributes/audio/transition.d.ts +1 -8
  52. package/dist/attributes/audio/transition.d.ts.map +1 -1
  53. package/dist/attributes/audio/transition.js.map +1 -1
  54. package/dist/attributes/layout/alignment.d.ts +6 -38
  55. package/dist/attributes/layout/alignment.d.ts.map +1 -1
  56. package/dist/attributes/layout/alignment.js.map +1 -1
  57. package/dist/attributes/layout/insets.d.ts +2 -27
  58. package/dist/attributes/layout/insets.d.ts.map +1 -1
  59. package/dist/attributes/layout/insets.js.map +1 -1
  60. package/dist/attributes/layout/matrix2d.d.ts +29 -114
  61. package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
  62. package/dist/attributes/layout/matrix2d.js +26 -110
  63. package/dist/attributes/layout/matrix2d.js.map +1 -1
  64. package/dist/attributes/layout/size.d.ts +3 -25
  65. package/dist/attributes/layout/size.d.ts.map +1 -1
  66. package/dist/attributes/layout/size.js +2 -18
  67. package/dist/attributes/layout/size.js.map +1 -1
  68. package/dist/attributes/layout/space3d.d.ts +16 -79
  69. package/dist/attributes/layout/space3d.d.ts.map +1 -1
  70. package/dist/attributes/layout/space3d.js +17 -81
  71. package/dist/attributes/layout/space3d.js.map +1 -1
  72. package/dist/attributes/layout/transform3d.d.ts +2 -23
  73. package/dist/attributes/layout/transform3d.d.ts.map +1 -1
  74. package/dist/attributes/layout/transform3d.js +1 -7
  75. package/dist/attributes/layout/transform3d.js.map +1 -1
  76. package/dist/attributes/layout/world-transform.d.ts +2 -16
  77. package/dist/attributes/layout/world-transform.d.ts.map +1 -1
  78. package/dist/attributes/layout/world-transform.js.map +1 -1
  79. package/dist/attributes/properties/decorator.d.ts +13 -73
  80. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  81. package/dist/attributes/properties/decorator.js +9 -40
  82. package/dist/attributes/properties/decorator.js.map +1 -1
  83. package/dist/attributes/properties/typed.d.ts +6 -45
  84. package/dist/attributes/properties/typed.d.ts.map +1 -1
  85. package/dist/attributes/properties/typed.js +6 -37
  86. package/dist/attributes/properties/typed.js.map +1 -1
  87. package/dist/attributes/render3d/orbit.d.ts +11 -83
  88. package/dist/attributes/render3d/orbit.d.ts.map +1 -1
  89. package/dist/attributes/render3d/orbit.js +10 -73
  90. package/dist/attributes/render3d/orbit.js.map +1 -1
  91. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
  92. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  94. package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
  95. package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
  96. package/dist/attributes/shape/corners/corner-style.js +2 -12
  97. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  98. package/dist/attributes/shape/corners/corners.d.ts +2 -21
  99. package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js +2 -12
  101. package/dist/attributes/shape/corners/corners.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
  103. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  104. package/dist/attributes/shape/effects/backdrop.js +3 -26
  105. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  106. package/dist/attributes/shape/effects/chain.d.ts +36 -328
  107. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  108. package/dist/attributes/shape/effects/chain.js +24 -242
  109. package/dist/attributes/shape/effects/chain.js.map +1 -1
  110. package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
  111. package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
  112. package/dist/attributes/shape/effects/effect-data.js +6 -33
  113. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  114. package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
  115. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
  117. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
  119. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
  121. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
  123. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
  125. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
  127. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  128. package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
  129. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
  131. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/blur.js +0 -1
  133. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
  135. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  136. package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
  137. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  138. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
  139. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  140. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
  141. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  142. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
  143. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  144. package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
  145. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  146. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
  147. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  148. package/dist/attributes/shape/effects/implementations/curves.js +1 -6
  149. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  150. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
  151. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  152. package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
  153. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  154. package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
  155. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  156. package/dist/attributes/shape/effects/implementations/dither.js +1 -7
  157. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  158. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
  159. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  160. package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
  161. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  162. package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
  163. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  164. package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
  165. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  166. package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
  167. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  168. package/dist/attributes/shape/effects/implementations/edges.js +0 -1
  169. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  170. package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
  171. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  172. package/dist/attributes/shape/effects/implementations/glass.js +0 -1
  173. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  174. package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
  175. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  176. package/dist/attributes/shape/effects/implementations/glow.js +1 -9
  177. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  178. package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
  179. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  180. package/dist/attributes/shape/effects/implementations/grain.js +0 -1
  181. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  182. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
  183. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  184. package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
  185. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  186. package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
  187. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  188. package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
  189. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  190. package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
  191. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  192. package/dist/attributes/shape/effects/implementations/invert.js +0 -1
  193. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  194. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
  195. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  196. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
  197. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  198. package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
  199. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  200. package/dist/attributes/shape/effects/implementations/lut.js +2 -8
  201. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  202. package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
  203. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  204. package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
  205. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  206. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
  207. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  208. package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
  209. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  210. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
  211. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  212. package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
  213. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  214. package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
  215. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  216. package/dist/attributes/shape/effects/implementations/outline.js +0 -1
  217. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  218. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
  219. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  220. package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
  221. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  222. package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
  223. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  224. package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
  225. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  226. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
  227. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  228. package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
  229. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  230. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
  231. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  232. package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
  233. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  234. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
  235. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  236. package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
  237. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  238. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
  239. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  240. package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
  241. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  242. package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
  243. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  244. package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
  245. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  246. package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
  247. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  248. package/dist/attributes/shape/effects/implementations/shader.js +2 -9
  249. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  250. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
  251. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  252. package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
  253. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  254. package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
  255. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  256. package/dist/attributes/shape/effects/implementations/streak.js +0 -1
  257. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  258. package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
  259. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  260. package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
  261. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  262. package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
  263. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  264. package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
  265. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  266. package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
  267. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  268. package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
  269. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  270. package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
  271. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  272. package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
  273. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  274. package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
  275. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  276. package/dist/attributes/shape/effects/implementations/wave.js +1 -5
  277. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  278. package/dist/attributes/shape/effects/registry.d.ts +6 -41
  279. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  280. package/dist/attributes/shape/effects/registry.js +7 -45
  281. package/dist/attributes/shape/effects/registry.js.map +1 -1
  282. package/dist/attributes/shape/effects/spec.d.ts +6 -30
  283. package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
  284. package/dist/attributes/shape/effects/spec.js +3 -9
  285. package/dist/attributes/shape/effects/spec.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.d.ts +1 -17
  287. package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
  288. package/dist/attributes/shape/fill/blend.js +2 -15
  289. package/dist/attributes/shape/fill/blend.js.map +1 -1
  290. package/dist/attributes/shape/fill/chain.d.ts +17 -125
  291. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  292. package/dist/attributes/shape/fill/chain.js +22 -109
  293. package/dist/attributes/shape/fill/chain.js.map +1 -1
  294. package/dist/attributes/shape/fill/coerce.d.ts +10 -35
  295. package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
  296. package/dist/attributes/shape/fill/coerce.js +12 -47
  297. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  298. package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
  299. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  300. package/dist/attributes/shape/fill/color/parser.js +15 -91
  301. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  302. package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
  303. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
  304. package/dist/attributes/shape/fill/gradient-stops.js +2 -13
  305. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  306. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
  307. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
  308. package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
  309. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
  311. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
  312. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  313. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
  314. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  315. package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
  316. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  317. package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
  318. package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
  319. package/dist/attributes/shape/fill/implementations/grid.js +2 -8
  320. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  321. package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
  322. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  323. package/dist/attributes/shape/fill/implementations/image.js +6 -23
  324. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  325. package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
  326. package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
  327. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  328. package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
  329. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  330. package/dist/attributes/shape/fill/implementations/shader.js +5 -17
  331. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  332. package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
  333. package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
  334. package/dist/attributes/shape/fill/implementations/video.js +12 -50
  335. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  336. package/dist/attributes/shape/fill/lerp.d.ts +2 -13
  337. package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
  338. package/dist/attributes/shape/fill/lerp.js +2 -9
  339. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  340. package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
  341. package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
  342. package/dist/attributes/shape/fill/media-preset.js +8 -35
  343. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  344. package/dist/attributes/shape/fill/registry.d.ts +2 -26
  345. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  346. package/dist/attributes/shape/fill/registry.js +5 -40
  347. package/dist/attributes/shape/fill/registry.js.map +1 -1
  348. package/dist/attributes/shape/fill/union.d.ts +6 -30
  349. package/dist/attributes/shape/fill/union.d.ts.map +1 -1
  350. package/dist/attributes/shape/fill/union.js +1 -9
  351. package/dist/attributes/shape/fill/union.js.map +1 -1
  352. package/dist/attributes/shape/filters/chain.d.ts +15 -168
  353. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  354. package/dist/attributes/shape/filters/chain.js +8 -132
  355. package/dist/attributes/shape/filters/chain.js.map +1 -1
  356. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
  357. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  358. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  359. package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
  360. package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
  361. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  362. package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
  363. package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
  364. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  365. package/dist/attributes/shape/filters/index.d.ts +1 -6
  366. package/dist/attributes/shape/filters/index.d.ts.map +1 -1
  367. package/dist/attributes/shape/filters/index.js +0 -2
  368. package/dist/attributes/shape/filters/index.js.map +1 -1
  369. package/dist/attributes/shape/filters/registry.d.ts +5 -35
  370. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  371. package/dist/attributes/shape/filters/registry.js +7 -50
  372. package/dist/attributes/shape/filters/registry.js.map +1 -1
  373. package/dist/attributes/shape/filters/union.d.ts +10 -51
  374. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  375. package/dist/attributes/shape/filters/union.js.map +1 -1
  376. package/dist/attributes/shape/path/anchors.d.ts +18 -106
  377. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  378. package/dist/attributes/shape/path/anchors.js +15 -124
  379. package/dist/attributes/shape/path/anchors.js.map +1 -1
  380. package/dist/attributes/shape/path/bezier.d.ts +6 -54
  381. package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
  382. package/dist/attributes/shape/path/bezier.js +10 -98
  383. package/dist/attributes/shape/path/bezier.js.map +1 -1
  384. package/dist/attributes/shape/path/index.d.ts +1 -11
  385. package/dist/attributes/shape/path/index.d.ts.map +1 -1
  386. package/dist/attributes/shape/path/index.js +1 -11
  387. package/dist/attributes/shape/path/index.js.map +1 -1
  388. package/dist/attributes/shape/path/measure.d.ts +5 -41
  389. package/dist/attributes/shape/path/measure.d.ts.map +1 -1
  390. package/dist/attributes/shape/path/measure.js +8 -57
  391. package/dist/attributes/shape/path/measure.js.map +1 -1
  392. package/dist/attributes/shape/path/morph.d.ts +4 -41
  393. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  394. package/dist/attributes/shape/path/morph.js +17 -117
  395. package/dist/attributes/shape/path/morph.js.map +1 -1
  396. package/dist/attributes/shape/path/ops.d.ts +5 -19
  397. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  398. package/dist/attributes/shape/path/ops.js.map +1 -1
  399. package/dist/attributes/shape/path/types.d.ts +10 -67
  400. package/dist/attributes/shape/path/types.d.ts.map +1 -1
  401. package/dist/attributes/shape/path/types.js +0 -1
  402. package/dist/attributes/shape/path/types.js.map +1 -1
  403. package/dist/attributes/shape/path/walk.d.ts +9 -63
  404. package/dist/attributes/shape/path/walk.d.ts.map +1 -1
  405. package/dist/attributes/shape/path/walk.js +21 -100
  406. package/dist/attributes/shape/path/walk.js.map +1 -1
  407. package/dist/attributes/shape/shaders/language.d.ts +2 -14
  408. package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
  409. package/dist/attributes/shape/shaders/language.js +1 -8
  410. package/dist/attributes/shape/shaders/language.js.map +1 -1
  411. package/dist/attributes/shape/shaders/pack.d.ts +13 -78
  412. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  413. package/dist/attributes/shape/shaders/pack.js +1 -10
  414. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  415. package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
  416. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  417. package/dist/attributes/shape/shaders/resolve.js +3 -28
  418. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  419. package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
  420. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
  421. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  422. package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
  423. package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
  424. package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
  425. package/dist/attributes/shape/shadow/shadow.js +0 -3
  426. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  427. package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
  428. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  429. package/dist/attributes/shape/stroke/stroke.js +0 -6
  430. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  431. package/dist/attributes/shared/operators.d.ts +1 -8
  432. package/dist/attributes/shared/operators.d.ts.map +1 -1
  433. package/dist/attributes/shared/operators.js.map +1 -1
  434. package/dist/attributes/text/index.d.ts +1 -11
  435. package/dist/attributes/text/index.d.ts.map +1 -1
  436. package/dist/attributes/text/index.js +1 -11
  437. package/dist/attributes/text/index.js.map +1 -1
  438. package/dist/attributes/text/ops.d.ts +4 -30
  439. package/dist/attributes/text/ops.d.ts.map +1 -1
  440. package/dist/attributes/text/ops.js +7 -23
  441. package/dist/attributes/text/ops.js.map +1 -1
  442. package/dist/attributes/text/types.d.ts +5 -28
  443. package/dist/attributes/text/types.d.ts.map +1 -1
  444. package/dist/attributes/text/types.js.map +1 -1
  445. package/dist/browser/chunks/chunk-5GLXFSCC.js +13 -0
  446. package/dist/browser/chunks/chunk-5GLXFSCC.js.map +7 -0
  447. package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
  448. package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
  449. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  450. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  451. package/dist/browser/chunks/chunk-MNMIIGNE.js +6 -0
  452. package/dist/browser/chunks/chunk-MNMIIGNE.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/style.d.ts +38 -0
  510. package/dist/components/factory/style.d.ts.map +1 -0
  511. package/dist/components/factory/style.js +104 -0
  512. package/dist/components/factory/style.js.map +1 -0
  513. package/dist/components/factory/types.d.ts +9 -0
  514. package/dist/components/factory/types.d.ts.map +1 -1
  515. package/dist/components/factory/types.js +11 -0
  516. package/dist/components/factory/types.js.map +1 -1
  517. package/dist/components/factory/views.d.ts.map +1 -1
  518. package/dist/components/factory/views.js +0 -2
  519. package/dist/components/factory/views.js.map +1 -1
  520. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  521. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  522. package/dist/components/trees/2d/group-bounds.js +3 -22
  523. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  524. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  525. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  527. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  528. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  529. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-motion.js +3 -31
  531. package/dist/components/trees/2d/node-motion.js.map +1 -1
  532. package/dist/components/trees/2d/node-render.d.ts +3 -20
  533. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-render.js +4 -23
  535. package/dist/components/trees/2d/node-render.js.map +1 -1
  536. package/dist/components/trees/2d/node-space.d.ts +4 -23
  537. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node-space.js +3 -17
  539. package/dist/components/trees/2d/node-space.js.map +1 -1
  540. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  541. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  542. package/dist/components/trees/2d/node-transform.js +4 -33
  543. package/dist/components/trees/2d/node-transform.js.map +1 -1
  544. package/dist/components/trees/2d/node2d.d.ts +112 -622
  545. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  546. package/dist/components/trees/2d/node2d.js +131 -605
  547. package/dist/components/trees/2d/node2d.js.map +1 -1
  548. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  549. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  550. package/dist/components/trees/audio/node-audio.js +18 -68
  551. package/dist/components/trees/audio/node-audio.js.map +1 -1
  552. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  553. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-editor-state.js +1 -13
  555. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  556. package/dist/components/trees/node/node-reactive.d.ts +6 -53
  557. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  558. package/dist/components/trees/node/node-reactive.js +4 -33
  559. package/dist/components/trees/node/node-reactive.js.map +1 -1
  560. package/dist/components/trees/node/node-time.d.ts +2 -15
  561. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  562. package/dist/components/trees/node/node-time.js.map +1 -1
  563. package/dist/components/trees/node/node-walk.d.ts +7 -32
  564. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  565. package/dist/components/trees/node/node-walk.js +7 -32
  566. package/dist/components/trees/node/node-walk.js.map +1 -1
  567. package/dist/components/trees/node/node.d.ts +43 -248
  568. package/dist/components/trees/node/node.d.ts.map +1 -1
  569. package/dist/components/trees/node/node.js +51 -229
  570. package/dist/components/trees/node/node.js.map +1 -1
  571. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  572. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  573. package/dist/components/trees/root/canvas2d-node.js +7 -47
  574. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  575. package/dist/components/trees/three/node3d.d.ts +24 -112
  576. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  577. package/dist/components/trees/three/node3d.js +22 -104
  578. package/dist/components/trees/three/node3d.js.map +1 -1
  579. package/dist/document/audio.d.ts +9 -21
  580. package/dist/document/audio.d.ts.map +1 -1
  581. package/dist/document/audio.js +13 -28
  582. package/dist/document/audio.js.map +1 -1
  583. package/dist/document/builtins.d.ts +3 -9
  584. package/dist/document/builtins.d.ts.map +1 -1
  585. package/dist/document/builtins.js +43 -89
  586. package/dist/document/builtins.js.map +1 -1
  587. package/dist/document/command-traits.d.ts +14 -37
  588. package/dist/document/command-traits.d.ts.map +1 -1
  589. package/dist/document/command-traits.js +22 -39
  590. package/dist/document/command-traits.js.map +1 -1
  591. package/dist/document/deny-globals.d.ts +9 -43
  592. package/dist/document/deny-globals.d.ts.map +1 -1
  593. package/dist/document/deny-globals.js +18 -58
  594. package/dist/document/deny-globals.js.map +1 -1
  595. package/dist/document/diff.d.ts +6 -16
  596. package/dist/document/diff.d.ts.map +1 -1
  597. package/dist/document/diff.js +5 -11
  598. package/dist/document/diff.js.map +1 -1
  599. package/dist/document/doc-index.d.ts +5 -13
  600. package/dist/document/doc-index.d.ts.map +1 -1
  601. package/dist/document/doc-index.js +0 -2
  602. package/dist/document/doc-index.js.map +1 -1
  603. package/dist/document/expression/compile.d.ts +2 -2
  604. package/dist/document/expression/compile.d.ts.map +1 -1
  605. package/dist/document/expression/compile.js +8 -18
  606. package/dist/document/expression/compile.js.map +1 -1
  607. package/dist/document/expression/index.d.ts +11 -41
  608. package/dist/document/expression/index.d.ts.map +1 -1
  609. package/dist/document/expression/index.js +11 -41
  610. package/dist/document/expression/index.js.map +1 -1
  611. package/dist/document/expression/ops.d.ts +3 -12
  612. package/dist/document/expression/ops.d.ts.map +1 -1
  613. package/dist/document/expression/ops.js +4 -20
  614. package/dist/document/expression/ops.js.map +1 -1
  615. package/dist/document/expression/parse.d.ts +4 -14
  616. package/dist/document/expression/parse.d.ts.map +1 -1
  617. package/dist/document/expression/parse.js +34 -55
  618. package/dist/document/expression/parse.js.map +1 -1
  619. package/dist/document/expression/refs.d.ts +2 -8
  620. package/dist/document/expression/refs.d.ts.map +1 -1
  621. package/dist/document/expression/refs.js +2 -6
  622. package/dist/document/expression/refs.js.map +1 -1
  623. package/dist/document/expression/types.d.ts +18 -63
  624. package/dist/document/expression/types.d.ts.map +1 -1
  625. package/dist/document/expression/types.js +4 -15
  626. package/dist/document/expression/types.js.map +1 -1
  627. package/dist/document/expression/walk.d.ts +6 -20
  628. package/dist/document/expression/walk.d.ts.map +1 -1
  629. package/dist/document/expression/walk.js +18 -44
  630. package/dist/document/expression/walk.js.map +1 -1
  631. package/dist/document/index.js +2 -3
  632. package/dist/document/index.js.map +1 -1
  633. package/dist/document/migrate.d.ts +7 -22
  634. package/dist/document/migrate.d.ts.map +1 -1
  635. package/dist/document/migrate.js +44 -15
  636. package/dist/document/migrate.js.map +1 -1
  637. package/dist/document/missing-node.d.ts +4 -11
  638. package/dist/document/missing-node.d.ts.map +1 -1
  639. package/dist/document/missing-node.js +2 -5
  640. package/dist/document/missing-node.js.map +1 -1
  641. package/dist/document/node-decorator.d.ts +12 -53
  642. package/dist/document/node-decorator.d.ts.map +1 -1
  643. package/dist/document/node-decorator.js +16 -57
  644. package/dist/document/node-decorator.js.map +1 -1
  645. package/dist/document/node-descriptor.d.ts +25 -62
  646. package/dist/document/node-descriptor.d.ts.map +1 -1
  647. package/dist/document/node-descriptor.js.map +1 -1
  648. package/dist/document/placement.d.ts +18 -41
  649. package/dist/document/placement.d.ts.map +1 -1
  650. package/dist/document/placement.js +4 -11
  651. package/dist/document/placement.js.map +1 -1
  652. package/dist/document/project.d.ts +19 -52
  653. package/dist/document/project.d.ts.map +1 -1
  654. package/dist/document/project.js +2 -6
  655. package/dist/document/project.js.map +1 -1
  656. package/dist/document/prop-evolution.d.ts +10 -20
  657. package/dist/document/prop-evolution.d.ts.map +1 -1
  658. package/dist/document/prop-evolution.js +3 -7
  659. package/dist/document/prop-evolution.js.map +1 -1
  660. package/dist/document/registry.d.ts +80 -318
  661. package/dist/document/registry.d.ts.map +1 -1
  662. package/dist/document/registry.js +43 -147
  663. package/dist/document/registry.js.map +1 -1
  664. package/dist/document/settled-index.d.ts +11 -23
  665. package/dist/document/settled-index.d.ts.map +1 -1
  666. package/dist/document/settled-index.js +15 -34
  667. package/dist/document/settled-index.js.map +1 -1
  668. package/dist/document/timeline-patch.d.ts +6 -15
  669. package/dist/document/timeline-patch.d.ts.map +1 -1
  670. package/dist/document/timeline-patch.js +12 -21
  671. package/dist/document/timeline-patch.js.map +1 -1
  672. package/dist/document/timeline.d.ts +56 -263
  673. package/dist/document/timeline.d.ts.map +1 -1
  674. package/dist/document/timeline.js +71 -275
  675. package/dist/document/timeline.js.map +1 -1
  676. package/dist/document/types.d.ts +90 -264
  677. package/dist/document/types.d.ts.map +1 -1
  678. package/dist/document/types.js +13 -30
  679. package/dist/document/types.js.map +1 -1
  680. package/dist/document/validate.d.ts +10 -40
  681. package/dist/document/validate.d.ts.map +1 -1
  682. package/dist/document/validate.js +72 -137
  683. package/dist/document/validate.js.map +1 -1
  684. package/dist/document/vocabulary.d.ts +4 -7
  685. package/dist/document/vocabulary.d.ts.map +1 -1
  686. package/dist/document/vocabulary.js +0 -1
  687. package/dist/document/vocabulary.js.map +1 -1
  688. package/dist/experimental.d.ts +2 -0
  689. package/dist/experimental.d.ts.map +1 -1
  690. package/dist/index.d.ts +0 -1
  691. package/dist/index.d.ts.map +1 -1
  692. package/dist/index.js +0 -1
  693. package/dist/index.js.map +1 -1
  694. package/dist/layout/bounds.d.ts +1 -11
  695. package/dist/layout/bounds.d.ts.map +1 -1
  696. package/dist/layout/bounds.js.map +1 -1
  697. package/dist/layout/flex.d.ts +6 -20
  698. package/dist/layout/flex.d.ts.map +1 -1
  699. package/dist/layout/flex.js +7 -28
  700. package/dist/layout/flex.js.map +1 -1
  701. package/dist/layout/ops.d.ts +2 -11
  702. package/dist/layout/ops.d.ts.map +1 -1
  703. package/dist/layout/ops.js +2 -22
  704. package/dist/layout/ops.js.map +1 -1
  705. package/dist/layout/types.d.ts +11 -55
  706. package/dist/layout/types.d.ts.map +1 -1
  707. package/dist/layout/types.js.map +1 -1
  708. package/dist/platform/audio-sink.d.ts +7 -43
  709. package/dist/platform/audio-sink.d.ts.map +1 -1
  710. package/dist/platform/audio-sink.js +4 -29
  711. package/dist/platform/audio-sink.js.map +1 -1
  712. package/dist/platform/exporter.d.ts +5 -31
  713. package/dist/platform/exporter.d.ts.map +1 -1
  714. package/dist/platform/exporter.js.map +1 -1
  715. package/dist/platform/stepped-clock.d.ts +1 -16
  716. package/dist/platform/stepped-clock.d.ts.map +1 -1
  717. package/dist/platform/stepped-clock.js +1 -16
  718. package/dist/platform/stepped-clock.js.map +1 -1
  719. package/dist/platform/storage-adapter.d.ts +8 -68
  720. package/dist/platform/storage-adapter.d.ts.map +1 -1
  721. package/dist/platform/storage-adapter.js +8 -60
  722. package/dist/platform/storage-adapter.js.map +1 -1
  723. package/dist/platform/ticker.d.ts +11 -45
  724. package/dist/platform/ticker.d.ts.map +1 -1
  725. package/dist/platform/ticker.js +10 -37
  726. package/dist/platform/ticker.js.map +1 -1
  727. package/dist/project/config.d.ts +4 -14
  728. package/dist/project/config.d.ts.map +1 -1
  729. package/dist/project/config.js.map +1 -1
  730. package/dist/project/tree.d.ts +6 -35
  731. package/dist/project/tree.d.ts.map +1 -1
  732. package/dist/project/tree.js +1 -8
  733. package/dist/project/tree.js.map +1 -1
  734. package/dist/props/host.d.ts +2 -13
  735. package/dist/props/host.d.ts.map +1 -1
  736. package/dist/props/host.js.map +1 -1
  737. package/dist/props/layout.d.ts +1 -12
  738. package/dist/props/layout.d.ts.map +1 -1
  739. package/dist/props/layout.js +1 -12
  740. package/dist/props/layout.js.map +1 -1
  741. package/dist/props/observer.d.ts +1 -7
  742. package/dist/props/observer.d.ts.map +1 -1
  743. package/dist/props/observer.js.map +1 -1
  744. package/dist/props/slot.d.ts +6 -19
  745. package/dist/props/slot.d.ts.map +1 -1
  746. package/dist/props/slot.js +5 -14
  747. package/dist/props/slot.js.map +1 -1
  748. package/dist/render/canvas-render-context2d.d.ts +8 -68
  749. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  750. package/dist/render/canvas-render-context2d.js +8 -69
  751. package/dist/render/canvas-render-context2d.js.map +1 -1
  752. package/dist/render/clip-contains.d.ts +2 -16
  753. package/dist/render/clip-contains.d.ts.map +1 -1
  754. package/dist/render/clip-contains.js +21 -82
  755. package/dist/render/clip-contains.js.map +1 -1
  756. package/dist/render/clip.d.ts +7 -25
  757. package/dist/render/clip.d.ts.map +1 -1
  758. package/dist/render/clip.js +5 -17
  759. package/dist/render/clip.js.map +1 -1
  760. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  761. package/dist/render/descriptors/ellipse.js +0 -1
  762. package/dist/render/descriptors/ellipse.js.map +1 -1
  763. package/dist/render/descriptors/line.d.ts.map +1 -1
  764. package/dist/render/descriptors/line.js +0 -1
  765. package/dist/render/descriptors/line.js.map +1 -1
  766. package/dist/render/descriptors/path-builder.d.ts +4 -32
  767. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  768. package/dist/render/descriptors/path-builder.js +3 -25
  769. package/dist/render/descriptors/path-builder.js.map +1 -1
  770. package/dist/render/descriptors/path.d.ts +1 -11
  771. package/dist/render/descriptors/path.d.ts.map +1 -1
  772. package/dist/render/descriptors/path.js +0 -1
  773. package/dist/render/descriptors/path.js.map +1 -1
  774. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  775. package/dist/render/descriptors/polygon.js +0 -1
  776. package/dist/render/descriptors/polygon.js.map +1 -1
  777. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  778. package/dist/render/descriptors/polygram.js +0 -1
  779. package/dist/render/descriptors/polygram.js.map +1 -1
  780. package/dist/render/descriptors/rect.d.ts.map +1 -1
  781. package/dist/render/descriptors/rect.js +0 -1
  782. package/dist/render/descriptors/rect.js.map +1 -1
  783. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  784. package/dist/render/descriptors/richtext.js +0 -1
  785. package/dist/render/descriptors/richtext.js.map +1 -1
  786. package/dist/render/descriptors/shape.d.ts +17 -77
  787. package/dist/render/descriptors/shape.d.ts.map +1 -1
  788. package/dist/render/descriptors/shape.js +13 -47
  789. package/dist/render/descriptors/shape.js.map +1 -1
  790. package/dist/render/descriptors/text.d.ts +15 -94
  791. package/dist/render/descriptors/text.d.ts.map +1 -1
  792. package/dist/render/descriptors/text.js +8 -50
  793. package/dist/render/descriptors/text.js.map +1 -1
  794. package/dist/render/descriptors/transform.d.ts +5 -16
  795. package/dist/render/descriptors/transform.d.ts.map +1 -1
  796. package/dist/render/descriptors/transform.js +1 -17
  797. package/dist/render/descriptors/transform.js.map +1 -1
  798. package/dist/render/graphics2d.d.ts +24 -116
  799. package/dist/render/graphics2d.d.ts.map +1 -1
  800. package/dist/render/graphics2d.js +23 -108
  801. package/dist/render/graphics2d.js.map +1 -1
  802. package/dist/render/measure-context.d.ts +5 -29
  803. package/dist/render/measure-context.d.ts.map +1 -1
  804. package/dist/render/measure-context.js.map +1 -1
  805. package/dist/render/null-render-context.d.ts +2 -20
  806. package/dist/render/null-render-context.d.ts.map +1 -1
  807. package/dist/render/null-render-context.js +2 -20
  808. package/dist/render/null-render-context.js.map +1 -1
  809. package/dist/render/render-context2d.d.ts +52 -208
  810. package/dist/render/render-context2d.d.ts.map +1 -1
  811. package/dist/render/render-context2d.js.map +1 -1
  812. package/dist/render/surface.d.ts +2 -19
  813. package/dist/render/surface.d.ts.map +1 -1
  814. package/dist/render/surface.js.map +1 -1
  815. package/dist/render/text-defaults.d.ts +1 -17
  816. package/dist/render/text-defaults.d.ts.map +1 -1
  817. package/dist/render/text-defaults.js +6 -40
  818. package/dist/render/text-defaults.js.map +1 -1
  819. package/dist/render/text-layout.d.ts +12 -55
  820. package/dist/render/text-layout.d.ts.map +1 -1
  821. package/dist/render/text-layout.js +2 -16
  822. package/dist/render/text-layout.js.map +1 -1
  823. package/dist/render3d/bounds3d.d.ts +10 -32
  824. package/dist/render3d/bounds3d.d.ts.map +1 -1
  825. package/dist/render3d/bounds3d.js +2 -12
  826. package/dist/render3d/bounds3d.js.map +1 -1
  827. package/dist/render3d/builders.d.ts +8 -35
  828. package/dist/render3d/builders.d.ts.map +1 -1
  829. package/dist/render3d/builders.js +8 -35
  830. package/dist/render3d/builders.js.map +1 -1
  831. package/dist/render3d/camera.d.ts +10 -57
  832. package/dist/render3d/camera.d.ts.map +1 -1
  833. package/dist/render3d/camera.js +4 -26
  834. package/dist/render3d/camera.js.map +1 -1
  835. package/dist/render3d/fill3d.d.ts +7 -45
  836. package/dist/render3d/fill3d.d.ts.map +1 -1
  837. package/dist/render3d/fill3d.js +15 -85
  838. package/dist/render3d/fill3d.js.map +1 -1
  839. package/dist/render3d/geometry.d.ts +18 -106
  840. package/dist/render3d/geometry.d.ts.map +1 -1
  841. package/dist/render3d/geometry.js +2 -20
  842. package/dist/render3d/geometry.js.map +1 -1
  843. package/dist/render3d/graphics3d.d.ts +29 -133
  844. package/dist/render3d/graphics3d.d.ts.map +1 -1
  845. package/dist/render3d/graphics3d.js +23 -110
  846. package/dist/render3d/graphics3d.js.map +1 -1
  847. package/dist/render3d/index.d.ts +1 -16
  848. package/dist/render3d/index.d.ts.map +1 -1
  849. package/dist/render3d/index.js +1 -16
  850. package/dist/render3d/index.js.map +1 -1
  851. package/dist/render3d/inert.d.ts.map +1 -1
  852. package/dist/render3d/inert.js +1 -14
  853. package/dist/render3d/inert.js.map +1 -1
  854. package/dist/render3d/light.d.ts +3 -26
  855. package/dist/render3d/light.d.ts.map +1 -1
  856. package/dist/render3d/light.js.map +1 -1
  857. package/dist/render3d/material.d.ts +13 -87
  858. package/dist/render3d/material.d.ts.map +1 -1
  859. package/dist/render3d/material.js +2 -16
  860. package/dist/render3d/material.js.map +1 -1
  861. package/dist/render3d/matrix4.d.ts +14 -68
  862. package/dist/render3d/matrix4.d.ts.map +1 -1
  863. package/dist/render3d/matrix4.js +11 -60
  864. package/dist/render3d/matrix4.js.map +1 -1
  865. package/dist/render3d/render-context3d.d.ts +13 -51
  866. package/dist/render3d/render-context3d.d.ts.map +1 -1
  867. package/dist/render3d/render-context3d.js +9 -21
  868. package/dist/render3d/render-context3d.js.map +1 -1
  869. package/dist/render3d/resources.d.ts +9 -53
  870. package/dist/render3d/resources.d.ts.map +1 -1
  871. package/dist/render3d/resources.js +8 -48
  872. package/dist/render3d/resources.js.map +1 -1
  873. package/dist/render3d/rounded-box.d.ts +7 -21
  874. package/dist/render3d/rounded-box.d.ts.map +1 -1
  875. package/dist/render3d/rounded-box.js +7 -46
  876. package/dist/render3d/rounded-box.js.map +1 -1
  877. package/dist/render3d/scene-settings.d.ts +20 -78
  878. package/dist/render3d/scene-settings.d.ts.map +1 -1
  879. package/dist/render3d/scene-settings.js.map +1 -1
  880. package/dist/render3d/scene3d.d.ts +11 -53
  881. package/dist/render3d/scene3d.d.ts.map +1 -1
  882. package/dist/render3d/scene3d.js +12 -59
  883. package/dist/render3d/scene3d.js.map +1 -1
  884. package/dist/render3d/segments.d.ts +2 -25
  885. package/dist/render3d/segments.d.ts.map +1 -1
  886. package/dist/render3d/segments.js +1 -11
  887. package/dist/render3d/segments.js.map +1 -1
  888. package/dist/render3d/texture.d.ts +25 -112
  889. package/dist/render3d/texture.d.ts.map +1 -1
  890. package/dist/render3d/texture.js +3 -27
  891. package/dist/render3d/texture.js.map +1 -1
  892. package/dist/render3d/tracking.d.ts +2 -19
  893. package/dist/render3d/tracking.d.ts.map +1 -1
  894. package/dist/render3d/tracking.js +2 -19
  895. package/dist/render3d/tracking.js.map +1 -1
  896. package/dist/render3d/transform.d.ts +14 -60
  897. package/dist/render3d/transform.d.ts.map +1 -1
  898. package/dist/render3d/transform.js +0 -2
  899. package/dist/render3d/transform.js.map +1 -1
  900. package/dist/render3d/vector3.d.ts +6 -48
  901. package/dist/render3d/vector3.d.ts.map +1 -1
  902. package/dist/render3d/vector3.js +4 -38
  903. package/dist/render3d/vector3.js.map +1 -1
  904. package/dist/render3d/walk.d.ts +3 -27
  905. package/dist/render3d/walk.d.ts.map +1 -1
  906. package/dist/render3d/walk.js +5 -33
  907. package/dist/render3d/walk.js.map +1 -1
  908. package/dist/runtime/asset-refine.d.ts +34 -20
  909. package/dist/runtime/asset-refine.d.ts.map +1 -1
  910. package/dist/runtime/asset-refine.js +127 -31
  911. package/dist/runtime/asset-refine.js.map +1 -1
  912. package/dist/runtime/asset-timeline.d.ts +14 -53
  913. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  914. package/dist/runtime/asset-timeline.js +6 -27
  915. package/dist/runtime/asset-timeline.js.map +1 -1
  916. package/dist/runtime/asset-update.d.ts +7 -26
  917. package/dist/runtime/asset-update.d.ts.map +1 -1
  918. package/dist/runtime/asset-update.js +6 -18
  919. package/dist/runtime/asset-update.js.map +1 -1
  920. package/dist/runtime/audio-index.d.ts +0 -2
  921. package/dist/runtime/audio-index.d.ts.map +1 -1
  922. package/dist/runtime/audio-index.js +0 -2
  923. package/dist/runtime/audio-index.js.map +1 -1
  924. package/dist/runtime/builtin-context.d.ts +3 -9
  925. package/dist/runtime/builtin-context.d.ts.map +1 -1
  926. package/dist/runtime/builtin-context.js +3 -9
  927. package/dist/runtime/builtin-context.js.map +1 -1
  928. package/dist/runtime/clip-instance.d.ts +12 -39
  929. package/dist/runtime/clip-instance.d.ts.map +1 -1
  930. package/dist/runtime/clip-instance.js +21 -45
  931. package/dist/runtime/clip-instance.js.map +1 -1
  932. package/dist/runtime/clip-store.d.ts +26 -68
  933. package/dist/runtime/clip-store.d.ts.map +1 -1
  934. package/dist/runtime/clip-store.js +47 -81
  935. package/dist/runtime/clip-store.js.map +1 -1
  936. package/dist/runtime/engine.d.ts +31 -85
  937. package/dist/runtime/engine.d.ts.map +1 -1
  938. package/dist/runtime/engine.js +16 -49
  939. package/dist/runtime/engine.js.map +1 -1
  940. package/dist/runtime/frame-time.d.ts +4 -15
  941. package/dist/runtime/frame-time.d.ts.map +1 -1
  942. package/dist/runtime/frame-time.js +5 -12
  943. package/dist/runtime/frame-time.js.map +1 -1
  944. package/dist/runtime/index.d.ts +0 -1
  945. package/dist/runtime/index.d.ts.map +1 -1
  946. package/dist/runtime/index.js +0 -1
  947. package/dist/runtime/index.js.map +1 -1
  948. package/dist/runtime/node-picking.d.ts +59 -139
  949. package/dist/runtime/node-picking.d.ts.map +1 -1
  950. package/dist/runtime/node-picking.js +87 -157
  951. package/dist/runtime/node-picking.js.map +1 -1
  952. package/dist/runtime/node-picking3d.d.ts +39 -96
  953. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  954. package/dist/runtime/node-picking3d.js +98 -141
  955. package/dist/runtime/node-picking3d.js.map +1 -1
  956. package/dist/runtime/placement.d.ts +8 -17
  957. package/dist/runtime/placement.d.ts.map +1 -1
  958. package/dist/runtime/placement.js +7 -16
  959. package/dist/runtime/placement.js.map +1 -1
  960. package/dist/runtime/playback-controller.d.ts +78 -207
  961. package/dist/runtime/playback-controller.d.ts.map +1 -1
  962. package/dist/runtime/playback-controller.js +111 -226
  963. package/dist/runtime/playback-controller.js.map +1 -1
  964. package/dist/runtime/playback.d.ts +6 -14
  965. package/dist/runtime/playback.d.ts.map +1 -1
  966. package/dist/runtime/playback.js +6 -14
  967. package/dist/runtime/playback.js.map +1 -1
  968. package/dist/runtime/project-assets.d.ts +6 -14
  969. package/dist/runtime/project-assets.d.ts.map +1 -1
  970. package/dist/runtime/project-assets.js +7 -16
  971. package/dist/runtime/project-assets.js.map +1 -1
  972. package/dist/runtime/session.d.ts +22 -45
  973. package/dist/runtime/session.d.ts.map +1 -1
  974. package/dist/runtime/session.js +26 -46
  975. package/dist/runtime/session.js.map +1 -1
  976. package/dist/runtime/settle.d.ts +4 -10
  977. package/dist/runtime/settle.d.ts.map +1 -1
  978. package/dist/runtime/settle.js +4 -10
  979. package/dist/runtime/settle.js.map +1 -1
  980. package/dist/runtime/state-evaluator.d.ts +15 -37
  981. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  982. package/dist/runtime/state-evaluator.js +27 -44
  983. package/dist/runtime/state-evaluator.js.map +1 -1
  984. package/dist/runtime/text-geometry.d.ts +18 -47
  985. package/dist/runtime/text-geometry.d.ts.map +1 -1
  986. package/dist/runtime/text-geometry.js +13 -27
  987. package/dist/runtime/text-geometry.js.map +1 -1
  988. package/dist/sdk/index.d.ts +2 -7
  989. package/dist/sdk/index.d.ts.map +1 -1
  990. package/dist/sdk/index.js +30 -138
  991. package/dist/sdk/index.js.map +1 -1
  992. package/dist/tween/command-decorator.d.ts +6 -26
  993. package/dist/tween/command-decorator.d.ts.map +1 -1
  994. package/dist/tween/command-decorator.js +1 -6
  995. package/dist/tween/command-decorator.js.map +1 -1
  996. package/dist/tween/command.d.ts +6 -53
  997. package/dist/tween/command.d.ts.map +1 -1
  998. package/dist/tween/command.js +5 -40
  999. package/dist/tween/command.js.map +1 -1
  1000. package/dist/tween/ease/curve.d.ts +2 -17
  1001. package/dist/tween/ease/curve.d.ts.map +1 -1
  1002. package/dist/tween/ease/curve.js +1 -6
  1003. package/dist/tween/ease/curve.js.map +1 -1
  1004. package/dist/tween/ease/describe.d.ts +0 -11
  1005. package/dist/tween/ease/describe.d.ts.map +1 -1
  1006. package/dist/tween/ease/describe.js +0 -23
  1007. package/dist/tween/ease/describe.js.map +1 -1
  1008. package/dist/tween/ease/spec.d.ts +2 -18
  1009. package/dist/tween/ease/spec.d.ts.map +1 -1
  1010. package/dist/tween/ease/spec.js.map +1 -1
  1011. package/dist/tween/inert.d.ts +1 -14
  1012. package/dist/tween/inert.d.ts.map +1 -1
  1013. package/dist/tween/inert.js +1 -14
  1014. package/dist/tween/inert.js.map +1 -1
  1015. package/dist/tween/lerp.d.ts +2 -26
  1016. package/dist/tween/lerp.d.ts.map +1 -1
  1017. package/dist/tween/lerp.js +2 -26
  1018. package/dist/tween/lerp.js.map +1 -1
  1019. package/dist/tween/loop.d.ts +9 -50
  1020. package/dist/tween/loop.d.ts.map +1 -1
  1021. package/dist/tween/loop.js +6 -31
  1022. package/dist/tween/loop.js.map +1 -1
  1023. package/dist/tween/prepare.d.ts +2 -30
  1024. package/dist/tween/prepare.d.ts.map +1 -1
  1025. package/dist/tween/prepare.js +2 -30
  1026. package/dist/tween/prepare.js.map +1 -1
  1027. package/dist/tween/stepper.d.ts +4 -25
  1028. package/dist/tween/stepper.d.ts.map +1 -1
  1029. package/dist/tween/stepper.js.map +1 -1
  1030. package/dist/tween/to-command.d.ts +1 -8
  1031. package/dist/tween/to-command.d.ts.map +1 -1
  1032. package/dist/tween/to-command.js +2 -25
  1033. package/dist/tween/to-command.js.map +1 -1
  1034. package/dist/util/context.d.ts +4 -29
  1035. package/dist/util/context.d.ts.map +1 -1
  1036. package/dist/util/context.js +3 -15
  1037. package/dist/util/context.js.map +1 -1
  1038. package/dist/util/csv.d.ts +4 -29
  1039. package/dist/util/csv.d.ts.map +1 -1
  1040. package/dist/util/csv.js +3 -22
  1041. package/dist/util/csv.js.map +1 -1
  1042. package/dist/util/metrics.d.ts +2 -26
  1043. package/dist/util/metrics.d.ts.map +1 -1
  1044. package/dist/util/metrics.js +2 -26
  1045. package/dist/util/metrics.js.map +1 -1
  1046. package/dist/util/random.d.ts +20 -87
  1047. package/dist/util/random.d.ts.map +1 -1
  1048. package/dist/util/random.js +20 -87
  1049. package/dist/util/random.js.map +1 -1
  1050. package/dist/util/reference.d.ts +6 -35
  1051. package/dist/util/reference.d.ts.map +1 -1
  1052. package/dist/util/reference.js +1 -4
  1053. package/dist/util/reference.js.map +1 -1
  1054. package/dist/util/scheduler.d.ts +6 -27
  1055. package/dist/util/scheduler.d.ts.map +1 -1
  1056. package/dist/util/scheduler.js +8 -35
  1057. package/dist/util/scheduler.js.map +1 -1
  1058. package/package.json +1 -1
  1059. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1060. package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
  1061. package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
  1062. package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
  1063. package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
  1064. package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
  1065. package/dist/renamed-scene-names.d.ts +0 -17
  1066. package/dist/renamed-scene-names.d.ts.map +0 -1
  1067. package/dist/renamed-scene-names.js +0 -9
  1068. package/dist/renamed-scene-names.js.map +0 -1
  1069. package/dist/runtime/precompisition.d.ts +0 -24
  1070. package/dist/runtime/precompisition.d.ts.map +0 -1
  1071. package/dist/runtime/precompisition.js +0 -7
  1072. package/dist/runtime/precompisition.js.map +0 -1
@@ -10,62 +10,30 @@ import type { MaskOptions } from "../attributes/mask/mask.js";
10
10
  import type { BooleanOperation } from "../attributes/mask/boolean.js";
11
11
  import type { NodeEffect } from "../attributes/shape/effects/union.js";
12
12
  import type { Size2D } from "../attributes/layout/size.js";
13
- /**
14
- * Where an effect scope draws: `'foreground'` warps/filters the node's *own*
15
- * content (its fill, stroke and children), `'backdrop'` warps/filters the canvas
16
- * content already painted *beneath* the node (clipped to its silhouette). See
17
- * {@link RenderContext2D.beginEffects}.
18
- */
13
+ /** Where an effect scope draws: `'foreground'` filters the node's own content, `'backdrop'` the canvas content already painted beneath it (clipped to its silhouette). See {@link RenderContext2D.beginEffects}. */
19
14
  export type EffectTarget = "foreground" | "backdrop";
20
- /**
21
- * Pixels produced by {@link RenderContext2D.rasterize}: RGBA8888,
22
- * unpremultiplied, top-down (canvas row order). `width`/`height` are **device**
23
- * px, so they reflect the pixel ratio the renderer actually used rather than the
24
- * logical size that was asked for.
25
- */
15
+ /** Pixels from {@link RenderContext2D.rasterize}: RGBA8888, unpremultiplied, top-down. `width`/`height` are device px (the pixel ratio actually used), not the logical size asked for. */
26
16
  export interface RasterizedSurface {
27
17
  pixels: Uint8Array;
28
18
  width: number;
29
19
  height: number;
30
20
  }
31
- /**
32
- * A bounding box in the current node's local space (origin = the node's
33
- * layout-cell centre, the same space shapes are drawn in). `left/top` use the
34
- * canvas convention (y down).
35
- */
21
+ /** A box in the current node's local space (origin at the layout-cell centre); `left/top` are canvas y-down. */
36
22
  export interface SpaceRect {
37
23
  left: number;
38
24
  top: number;
39
25
  right: number;
40
26
  bottom: number;
41
27
  }
42
- /**
43
- * Reference rects a fill can resolve against, supplied per-node at `begin()`.
44
- * `local` is derived from the drawn shapes themselves and `global` (the
45
- * viewport) is computed by the renderer from the surface size, so only the
46
- * parent frame is passed here.
47
- */
28
+ /** Reference rects a fill resolves against, supplied per node at `begin()`. `local` comes from the drawn shapes and `global` from the renderer's surface size, so only the parent frame is passed. */
48
29
  export interface SpaceRects {
49
30
  /** The parent node's content rect, in this node's local space. */
50
31
  parent?: SpaceRect;
51
32
  }
52
- /**
53
- * Per-node state supplied to {@link RenderContext2D.begin} for the duration of a
54
- * node's draw scope. Carries the node identity and gradient-space `rects` plus
55
- * the node's per-frame motion, sampled at render time. Motion-driven effects
56
- * (e.g. motion blur) read the current node's `velocity` from this state instead
57
- * of being authored with a fixed direction.
58
- *
59
- * Velocity fields are `0`/`{0,0}` when the motion is unknown — the first frame a
60
- * node renders, or after a time discontinuity (scrub/seek) where no trustworthy
61
- * delta exists.
62
- */
33
+ /** Per-node state for the duration of a node's draw scope: identity, gradient-space `rects` and per-frame motion, which motion-driven effects (motion blur) read instead of a fixed authored direction. Velocity fields are 0 when unknown: the first frame, or after a scrub/seek discontinuity. */
63
34
  export interface NodeRenderState {
64
- /** Stable node identifier. */
65
35
  id: string;
66
- /** Parent / viewport rects in this node's local space. */
67
36
  rects: SpaceRects;
68
- /** How long this node has existed, in seconds (`NodeTime.elapsed`). */
69
37
  elapsed: number;
70
38
  /** The frame delta, in seconds, used to derive displacement from velocity. */
71
39
  dt: number;
@@ -81,170 +49,77 @@ export interface NodeRenderState {
81
49
  scaleVelocity: number;
82
50
  }
83
51
  /**
84
- * The drawing surface a `Node2D` paints into — **the whole of what a node may
85
- * ask of a renderer, and nothing else.**
52
+ * The drawing surface a `Node2D` paints into: the whole of what a node may ask of a renderer.
86
53
  *
87
- * Shapes are never declared directly on the context: they are built with a
88
- * {@link Graphics2D} command list and submitted via {@link draw}. Multiple
89
- * shapes chained on one `Graphics2D` before a paint call are combined into a
90
- * single surface and painted together:
54
+ * Shapes are built with a {@link Graphics2D} command list and submitted via {@link draw}; shapes chained on one
55
+ * `Graphics2D` before a paint call share a single surface. It extends {@link MeasureContext2D}, so a node
56
+ * measures and draws through one object.
91
57
  *
92
- * ctx.draw(new Graphics2D().ellipse(...).rect(...).fill(...)); // shared surface
93
- *
94
- * On top of that it carries text measurement — it extends {@link MeasureContext2D}, so
95
- * a node measures and draws through one object — and the higher-level scoping
96
- * operations: transforms, masks, clips, camera, boolean ops, effect scopes.
97
- * `begin(state)` / `end()` bracket each node's draw call so the context can
98
- * track which node is active.
99
- *
100
- * **An interface, with `CanvasRenderContext2D` as its one base class.** What a
101
- * node calls and what a *host* calls are different lists: `execute`,
102
- * `screenshot`, `unmount` and `dispose` drive a render pass and have no business
103
- * being reachable from inside one. Splitting them is what keeps this surface
104
- * the size it is. Every real backend still extends the class, which preserves
105
- * the `draw` to `drawGraphics` invariant that gives them all one implementation
106
- * of text-default resolution.
107
- *
108
- * `RenderContext3D` is its sibling, not its subclass: the two share no members,
109
- * because a 3D scene is described with lights, a camera and meshes rather than
110
- * with paths and paint.
58
+ * An interface so node-facing and host-facing lists stay apart: `execute`, `screenshot`, `unmount` and `dispose`
59
+ * drive a pass and mustn't be reachable from inside one. Every real backend still extends `CanvasRenderContext2D`,
60
+ * keeping the `draw` to `drawGraphics` invariant that gives them one text-default resolution.
61
+ * `RenderContext3D` is a sibling, not a subclass: they share no members.
111
62
  */
112
63
  export interface RenderContext2D extends MeasureContext2D {
113
64
  measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): Size2D;
114
65
  /**
115
- * Set text-style defaults for everything drawn until the matching
116
- * {@link popTextStyle} — the drawn-graphics half of `<DefaultTextStyle>`.
117
- *
118
- * `style` is **merged** onto the defaults already in effect, per key, so
119
- * nesting accumulates the way the node channel does: an outer scope's
120
- * `fontFamily` and an inner scope's `fontSize` both apply, and a key set by
121
- * both takes the inner value. Values are resolved (a tweened `fontSize`
122
- * arrives as this frame's number), not callbacks.
123
- *
124
- * Pass `null` to open a scope that inherits **nothing** — not the enclosing
125
- * defaults and not the project's `theme.typography.default`. That is for a
126
- * node whose text is its own vocabulary rather than the document's: `Code`
127
- * does it so a scene-wide serif face doesn't reflow a monospaced code block.
128
- *
129
- * Always pair with `popTextStyle()` in a `finally`; the stack is shared with
130
- * every sibling drawn afterwards.
66
+ * Sets text-style defaults until the matching {@link popTextStyle} (the drawn-graphics half of `<DefaultTextStyle>`).
67
+ * `style` is merged per key onto the defaults in effect, so nesting accumulates and the inner value wins; values
68
+ * are resolved, not callbacks. `null` opens a scope inheriting nothing, not even `theme.typography.default`
69
+ * (`Code` does this so a serif scene face doesn't reflow monospaced code). Pair with `popTextStyle()` in a
70
+ * `finally`: the stack is shared with every later sibling.
131
71
  */
132
72
  pushTextStyle(style: TextStyle | null): void;
133
- /** Close the innermost scope opened by {@link pushTextStyle}. */
134
73
  popTextStyle(): void;
135
- /**
136
- * The text-style defaults in effect right now: the innermost
137
- * {@link pushTextStyle} scope, or the project's `theme.typography.default`
138
- * when no scope is open — the same preset a `Text` node falls back to, so a
139
- * drawn label and a node label agree on the project's base typography.
140
- */
74
+ /** The defaults in effect: the innermost {@link pushTextStyle} scope, else the project's `theme.typography.default` (the same preset a `Text` node falls back to). */
141
75
  readonly defaultTextStyle: TextStyle;
142
- /**
143
- * Replay a built `Graphics2D` against this context.
144
- *
145
- * Resolves the ambient text defaults onto the op list before handing it to
146
- * the backend, which is what keeps the real renderer and the precomp asset
147
- * walk agreeing on which font an under-specified `text` op shapes with: a
148
- * family that one resolves and the other does not is a font that never loads
149
- * and glyphs that never paint.
150
- */
76
+ /** Replays a built `Graphics2D`. Resolves ambient text defaults onto the op list first, so the real renderer and the precomp asset walk agree on which font an under-specified `text` op uses (a family only one resolves is a font that never loads). */
151
77
  draw(graphics: Graphics2D): void;
152
78
  /**
153
- * Lay `state` out the way it would be drawn and report where every character
154
- * landed — see {@link TextBlockLayout} for the space and the caret model.
79
+ * Lays `state` out as it would be drawn and reports where every character landed (see {@link TextBlockLayout}
80
+ * for the space and caret model). Glyph positions live in the backend's shaper, so a host's own caret and
81
+ * selection can't compute them; DOM approximations drift once font, line height or wrapping change. Takes the
82
+ * whole {@link TextState} because `'autofit'`, `wrap` and `textAlign` resolve in the backend and must match what is drawn.
155
83
  *
156
- * This is what makes on-canvas text editing possible: glyph positions live
157
- * in the backend's shaper, so a host drawing its own caret and selection has
158
- * no way to compute them, and anything it approximates in the DOM disagrees
159
- * with the render as soon as the font, the line height or the wrapping does.
160
- *
161
- * Takes the whole {@link TextState} rather than a handful of font fields
162
- * because the resolution a caret has to agree with lives in the backend:
163
- * `'autofit'` picks a size from the box, `wrap` turns the width into a wrap
164
- * limit, and `textAlign` places the lines within it. Handing over the same
165
- * descriptor that gets drawn is what keeps the two from drifting apart.
166
- *
167
- * Returns `null` when the backend cannot measure this — the default, so a
168
- * backend that never needed glyph positions keeps working, and for cases no
169
- * caret model fits: text-on-path (glyphs follow a curve, not a line box) and
170
- * a block drawn in styled segments.
84
+ * `null` when the backend can't measure (the default) or no caret model fits: text-on-path and styled-segment blocks.
171
85
  */
172
86
  layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null;
173
- /**
174
- * Push a transform (position, rotation, scale, opacity, …) and return the
175
- * context so subsequent draw calls are issued in the transformed space. The
176
- * transform is popped when `end()` is called for the node that pushed it.
177
- */
87
+ /** Pushes a transform and returns the context for draws in the transformed space; popped by `end()` for the node that pushed it. */
178
88
  transform(state: Partial<TransformState>): RenderContext2D;
179
- /**
180
- * Open a boolean-path collection scope. Shapes drawn until `endBoolean()`
181
- * are gathered (fills/strokes suppressed) and combined with `op`. After
182
- * `endBoolean()` the merged path is left as the active surface, so a
183
- * paint-only `Graphics2D` (`new Graphics2D().fill(...).stroke(...)`)
184
- * submitted via `draw()` styles the combined result.
185
- */
89
+ /** Opens a boolean-path scope: shapes drawn until `endBoolean()` are gathered (fills/strokes suppressed) and combined with `op`; the merged path then stays the active surface, so a paint-only `Graphics2D` submitted via `draw()` styles it. */
186
90
  beginBoolean(op: BooleanOperation): void;
187
91
  endBoolean(): void;
188
92
  beginMask(options?: MaskOptions): void;
189
93
  applyMask(): void;
190
94
  endMask(): void;
191
- /**
192
- * Push a clip region built from a {@link Clip} command list. The clip's
193
- * shapes are unioned (with `cut()`s subtracted) into a single path and
194
- * intersected with the active clip, so children are confined to that
195
- * compound outline — any silhouette, not just a rect or ellipse. Used both
196
- * for a node's `clip` boundary and to confine backdrop effects (blur,
197
- * magnify) to the node's exact shape. Paired with `endClip()`.
198
- */
95
+ /** Pushes a clip from a {@link Clip} command list: its shapes are unioned (minus `cut()`s) into one path and intersected with the active clip, so any silhouette confines children. Also confines backdrop effects to the node's exact shape. Paired with `endClip()`. */
199
96
  beginClip(clip: Clip): void;
200
- /** Pop the most-recently pushed clip region. */
201
97
  endClip(): void;
202
98
  /**
203
- * Open an effect scope over the node, applying `effects` to either the node's
204
- * own content or the content beneath it. Paired with {@link endEffects}.
205
- *
206
- * `target`:
207
- * - `'foreground'` — warps/filters the node's *own* drawing (its fill, stroke
208
- * and children captured between begin/end), like blur. Used for bulge and
209
- * foreground posterize.
210
- * - `'backdrop'` — warps/filters the canvas content already painted *beneath*
211
- * the node, clipped to the active silhouette clip, so the node's own edges
212
- * stay sharp (Figma-style). Used for backdrop-flagged filters (blur,
213
- * grayscale, pixelate, …), magnify, backdrop posterize, and backdrop shader.
214
- *
215
- * The renderer decides per effect whether to compose it as an `ImageFilter`
216
- * or run it as a snapshot/redraw shader — callers never route by effect type.
217
- * `width`/`height` are the node's logical size, for size-relative effects
218
- * (e.g. pixelate) and shader lens boxes.
99
+ * Opens an effect scope over the node, paired with {@link endEffects}. `'foreground'` filters the node's own
100
+ * drawing (blur, bulge, foreground posterize); `'backdrop'` filters what is already painted beneath it, clipped
101
+ * to the active silhouette clip so the node's edges stay sharp (backdrop filters, magnify, backdrop shader).
102
+ * The renderer routes each effect to an `ImageFilter` or a snapshot/redraw shader; callers never do.
103
+ * `width`/`height` are the node's logical size, for size-relative effects (pixelate) and shader lens boxes.
219
104
  */
220
105
  beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void;
221
106
  endEffects(): void;
222
107
  /**
223
- * Draw `draw` into an offscreen buffer instead of onto the canvas, and hand
224
- * back its pixels. The buffer is `width` × `height` **logical** px with its
225
- * origin at the centre, matching the space a node draws in — so `draw` can be
226
- * an ordinary `render()` call on a node subtree and needs no special casing.
227
- *
228
- * This is what backs `Tex.surface`: `Canvas3D` rasterizes each of its 2D
229
- * sources through here, then hands the pixels to the 3D backend as a texture.
230
- * It runs *inside* the frame that consumes it, so a scrubbed frame is
231
- * identical to a played one.
232
- *
233
- * Returns `null` when the backend cannot rasterize offscreen — the material
234
- * then renders without that map. `pixelRatio` is a ceiling on the buffer's
235
- * device-pixel scale, not a guarantee; the renderer may clamp it.
108
+ * Draws `draw` into an offscreen buffer and returns its pixels. The buffer is `width` x `height` **logical** px,
109
+ * origin at the centre (the space a node draws in), so `draw` can be an ordinary `render()` of a node subtree.
110
+ * Backs `Tex.surface`: it runs inside the consuming frame, so a scrubbed frame equals a played one.
111
+ * `null` when the backend can't rasterize offscreen (the material then renders without that map).
112
+ * `pixelRatio` is a ceiling on the device-pixel scale; the renderer may clamp it.
236
113
  */
237
114
  rasterize(width: number, height: number, draw: () => void, pixelRatio?: number): RasterizedSurface | null;
238
115
  /**
239
- * Push a camera viewport. Clips to `viewport` (canvas-space, centred
240
- * coords) and applies the inverse camera transform so children render as
241
- * seen through the lens. `heading` rotates the world counter to the camera
242
- * angle. Paired with `endCamera()`.
116
+ * Pushes a camera viewport: clips to `viewport` and applies the inverse camera transform so children render as
117
+ * seen through the lens. Paired with `endCamera()`.
243
118
  *
244
- * @param viewport Bounding rect of the camera node in canvas space.
119
+ * @param viewport Bounding rect of the camera node in canvas space (centred coords).
245
120
  * @param lookAt World-space point the camera looks at.
246
121
  * @param zoom Uniform scale applied around `lookAt`.
247
- * @param heading Camera rotation in degrees.
122
+ * @param heading Camera rotation in degrees; the world rotates counter to it.
248
123
  */
249
124
  beginCamera(viewport: {
250
125
  x: number;
@@ -253,58 +128,27 @@ export interface RenderContext2D extends MeasureContext2D {
253
128
  height: number;
254
129
  }, lookAt: Vector2, zoom: number, heading: number): void;
255
130
  endCamera(): void;
256
- /**
257
- * Whether this context ever reads `NodeRenderState.rects`.
258
- *
259
- * True for anything that actually paints, since a fill with `space:'parent'`
260
- * resolves against them. A context that only inspects *what* would be drawn
261
- * never looks at them, and computing them costs an object allocation per node
262
- * per frame. Nodes check this before doing that work; see `Node2D.renderState`.
263
- */
131
+ /** Whether this context reads `NodeRenderState.rects`: true for anything that paints (`space:'parent'` fills resolve against them). A context that only inspects skips them, saving an object allocation per node per frame; see `Node2D.renderState`. */
264
132
  readonly readsSpaceRects: boolean;
265
133
  /**
266
- * Whether this context only cares about *visible* output.
267
- *
268
- * True for anything that paints: a subtree at zero opacity contributes no
269
- * pixels, so walking it produces draw calls the rasterizer will discard.
270
- *
271
- * A context that inspects rather than paints sets this `false`, and that is
272
- * the whole reason this is a capability rather than an unconditional check:
273
- * such a walk exists to discover which images, videos, fonts and effects a
274
- * frame *references* — regardless of whether they can be seen. An invisible
275
- * node's font still has to load, because it may fade in two frames later and
276
- * glyphs that were never registered never paint. Skipping it there is not an
277
- * optimisation, it is a missing asset.
278
- *
279
- * Same shape and same reasoning as {@link readsSpaceRects}: the context
280
- * declares what it needs, and nodes check before doing work that would be
281
- * thrown away. See `Node2D.render`.
134
+ * Whether this context only cares about visible output: true for anything that paints (a zero-opacity subtree
135
+ * contributes no pixels). A context that inspects rather than paints sets it `false`: its walk discovers which
136
+ * images, videos, fonts and effects a frame references, and an invisible node's font may fade in two frames
137
+ * later, so skipping it there is a missing asset, not an optimisation. See `Node2D.render`.
282
138
  */
283
139
  readonly drawsVisibleOnly: boolean;
284
140
  }
285
141
  /**
286
- * A render *pass*: a {@link RenderContext2D} plus the per-node scope bracket the
287
- * walk opens around each node.
288
- *
289
- * Split off from the drawing surface because the two have different callers.
290
- * `begin`/`end` are `Node2D.render`'s, once per node, and they push onto a stack
291
- * every fill with `space:'parent'` and every motion-driven effect reads back
292
- * from. A custom node's `renderSelf` calling one would open a scope nothing
293
- * closes — and since `renderSelf` is handed a {@link RenderContext2D}, it now
294
- * cannot.
295
- *
296
- * Every backend implements this; a host driving a render pass holds one.
142
+ * A render pass: a {@link RenderContext2D} plus the per-node scope bracket the walk opens around each node.
143
+ * `begin`/`end` belong to `Node2D.render` and push onto the stack that `space:'parent'` fills and motion-driven
144
+ * effects read; a custom `renderSelf` calling one would open a scope nothing closes, so it is handed only a
145
+ * {@link RenderContext2D}.
297
146
  *
298
147
  * @internal
299
148
  */
300
149
  export interface RenderPass2D extends RenderContext2D {
301
- /**
302
- * Open a node draw scope. Must be paired with `end()`, also when the scope
303
- * throws. Pushes the node's id and {@link NodeRenderState} (gradient-space
304
- * rects + per-frame motion) for the duration of the scope.
305
- */
150
+ /** Opens a node draw scope pushing the node's id and {@link NodeRenderState}; pair with `end()`, also when the scope throws. */
306
151
  begin(state: NodeRenderState): void;
307
- /** Close the innermost node draw scope opened by `begin()`. */
308
152
  end(): void;
309
153
  }
310
154
  //# sourceMappingURL=render-context2d.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-context2d.d.ts","sourceRoot":"","sources":["../../src/render/render-context2d.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"render-context2d.d.ts","sourceRoot":"","sources":["../../src/render/render-context2d.ts"],"names":[],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"render-context2d.js","sourceRoot":"","sources":["../../src/render/render-context2d.ts"],"names":[],"mappings":"","sourcesContent":["import type { FontStyle, TextStyle } from \"@/attributes/text/types\";\nimport type { TransformState } from \"./descriptors/transform\";\nimport type { MeasureContext2D } from \"./measure-context\";\nimport type { TextState } from \"./descriptors/text\";\nimport type { TextBlockLayout } from \"./text-layout\";\nimport type { Graphics2D } from \"./graphics2d\";\nimport type { Clip } from \"./clip\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\nimport type { Size2D } from \"@/attributes/layout/size\";\n\n/**\n * Where an effect scope draws: `'foreground'` warps/filters the node's *own*\n * content (its fill, stroke and children), `'backdrop'` warps/filters the canvas\n * content already painted *beneath* the node (clipped to its silhouette). See\n * {@link RenderContext2D.beginEffects}.\n */\nexport type EffectTarget = \"foreground\" | \"backdrop\";\n\n/**\n * Pixels produced by {@link RenderContext2D.rasterize}: RGBA8888,\n * unpremultiplied, top-down (canvas row order). `width`/`height` are **device**\n * px, so they reflect the pixel ratio the renderer actually used rather than the\n * logical size that was asked for.\n */\nexport interface RasterizedSurface {\n pixels: Uint8Array;\n width: number;\n height: number;\n}\n\n/**\n * A bounding box in the current node's local space (origin = the node's\n * layout-cell centre, the same space shapes are drawn in). `left/top` use the\n * canvas convention (y down).\n */\nexport interface SpaceRect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\n/**\n * Reference rects a fill can resolve against, supplied per-node at `begin()`.\n * `local` is derived from the drawn shapes themselves and `global` (the\n * viewport) is computed by the renderer from the surface size, so only the\n * parent frame is passed here.\n */\nexport interface SpaceRects {\n /** The parent node's content rect, in this node's local space. */\n parent?: SpaceRect;\n}\n\n/**\n * Per-node state supplied to {@link RenderContext2D.begin} for the duration of a\n * node's draw scope. Carries the node identity and gradient-space `rects` plus\n * the node's per-frame motion, sampled at render time. Motion-driven effects\n * (e.g. motion blur) read the current node's `velocity` from this state instead\n * of being authored with a fixed direction.\n *\n * Velocity fields are `0`/`{0,0}` when the motion is unknown — the first frame a\n * node renders, or after a time discontinuity (scrub/seek) where no trustworthy\n * delta exists.\n */\nexport interface NodeRenderState {\n /** Stable node identifier. */\n id: string;\n /** Parent / viewport rects in this node's local space. */\n rects: SpaceRects;\n /** How long this node has existed, in seconds (`NodeTime.elapsed`). */\n elapsed: number;\n /** The frame delta, in seconds, used to derive displacement from velocity. */\n dt: number;\n /** Translational velocity in px/sec, world space (y-down). `{0,0}` when unknown. */\n velocity: Vector2;\n /** Heading of `velocity` in degrees (`atan2(vy, vx)`). `0` when unknown. */\n direction: number;\n /** Magnitude of `velocity` in px/sec. `0` when unknown. */\n speed: number;\n /** Rotational velocity in degrees/sec. `0` when unknown. Reserved for radial motion blur. */\n angularVelocity: number;\n /** Scale velocity in scale-units/sec. `0` when unknown. Reserved for zoom motion blur. */\n scaleVelocity: number;\n}\n\n/**\n * The drawing surface a `Node2D` paints into — **the whole of what a node may\n * ask of a renderer, and nothing else.**\n *\n * Shapes are never declared directly on the context: they are built with a\n * {@link Graphics2D} command list and submitted via {@link draw}. Multiple\n * shapes chained on one `Graphics2D` before a paint call are combined into a\n * single surface and painted together:\n *\n * ctx.draw(new Graphics2D().ellipse(...).rect(...).fill(...)); // shared surface\n *\n * On top of that it carries text measurement — it extends {@link MeasureContext2D}, so\n * a node measures and draws through one object — and the higher-level scoping\n * operations: transforms, masks, clips, camera, boolean ops, effect scopes.\n * `begin(state)` / `end()` bracket each node's draw call so the context can\n * track which node is active.\n *\n * **An interface, with `CanvasRenderContext2D` as its one base class.** What a\n * node calls and what a *host* calls are different lists: `execute`,\n * `screenshot`, `unmount` and `dispose` drive a render pass and have no business\n * being reachable from inside one. Splitting them is what keeps this surface\n * the size it is. Every real backend still extends the class, which preserves\n * the `draw` to `drawGraphics` invariant that gives them all one implementation\n * of text-default resolution.\n *\n * `RenderContext3D` is its sibling, not its subclass: the two share no members,\n * because a 3D scene is described with lights, a camera and meshes rather than\n * with paths and paint.\n */\nexport interface RenderContext2D extends MeasureContext2D {\n measureText(\n text: string,\n fontSize: number,\n fontFamily: string,\n fontWeight?: number,\n letterSpacing?: number,\n fontStyle?: FontStyle,\n ): Size2D;\n\n // ---- Inherited text-style defaults ------------------------------------\n // `<DefaultTextStyle>` reaches a `Text`/`RichText` node through the context\n // map, applied once when the node binds. A raw `Graphics2D` has no node to\n // bind, so it inherits the same defaults here instead — pushed around a\n // subtree's draw scope, and folded into each `text`/`richText` op by\n // `draw()`. Same vocabulary (`TextStyle`), same precedence, two channels.\n\n /**\n * Set text-style defaults for everything drawn until the matching\n * {@link popTextStyle} — the drawn-graphics half of `<DefaultTextStyle>`.\n *\n * `style` is **merged** onto the defaults already in effect, per key, so\n * nesting accumulates the way the node channel does: an outer scope's\n * `fontFamily` and an inner scope's `fontSize` both apply, and a key set by\n * both takes the inner value. Values are resolved (a tweened `fontSize`\n * arrives as this frame's number), not callbacks.\n *\n * Pass `null` to open a scope that inherits **nothing** — not the enclosing\n * defaults and not the project's `theme.typography.default`. That is for a\n * node whose text is its own vocabulary rather than the document's: `Code`\n * does it so a scene-wide serif face doesn't reflow a monospaced code block.\n *\n * Always pair with `popTextStyle()` in a `finally`; the stack is shared with\n * every sibling drawn afterwards.\n */\n pushTextStyle(style: TextStyle | null): void;\n\n /** Close the innermost scope opened by {@link pushTextStyle}. */\n popTextStyle(): void;\n\n /**\n * The text-style defaults in effect right now: the innermost\n * {@link pushTextStyle} scope, or the project's `theme.typography.default`\n * when no scope is open — the same preset a `Text` node falls back to, so a\n * drawn label and a node label agree on the project's base typography.\n */\n readonly defaultTextStyle: TextStyle;\n\n /**\n * Replay a built `Graphics2D` against this context.\n *\n * Resolves the ambient text defaults onto the op list before handing it to\n * the backend, which is what keeps the real renderer and the precomp asset\n * walk agreeing on which font an under-specified `text` op shapes with: a\n * family that one resolves and the other does not is a font that never loads\n * and glyphs that never paint.\n */\n draw(graphics: Graphics2D): void;\n\n /**\n * Lay `state` out the way it would be drawn and report where every character\n * landed — see {@link TextBlockLayout} for the space and the caret model.\n *\n * This is what makes on-canvas text editing possible: glyph positions live\n * in the backend's shaper, so a host drawing its own caret and selection has\n * no way to compute them, and anything it approximates in the DOM disagrees\n * with the render as soon as the font, the line height or the wrapping does.\n *\n * Takes the whole {@link TextState} rather than a handful of font fields\n * because the resolution a caret has to agree with lives in the backend:\n * `'autofit'` picks a size from the box, `wrap` turns the width into a wrap\n * limit, and `textAlign` places the lines within it. Handing over the same\n * descriptor that gets drawn is what keeps the two from drifting apart.\n *\n * Returns `null` when the backend cannot measure this — the default, so a\n * backend that never needed glyph positions keeps working, and for cases no\n * caret model fits: text-on-path (glyphs follow a curve, not a line box) and\n * a block drawn in styled segments.\n */\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null;\n\n /**\n * Push a transform (position, rotation, scale, opacity, …) and return the\n * context so subsequent draw calls are issued in the transformed space. The\n * transform is popped when `end()` is called for the node that pushed it.\n */\n transform(state: Partial<TransformState>): RenderContext2D;\n\n /**\n * Open a boolean-path collection scope. Shapes drawn until `endBoolean()`\n * are gathered (fills/strokes suppressed) and combined with `op`. After\n * `endBoolean()` the merged path is left as the active surface, so a\n * paint-only `Graphics2D` (`new Graphics2D().fill(...).stroke(...)`)\n * submitted via `draw()` styles the combined result.\n */\n beginBoolean(op: BooleanOperation): void;\n endBoolean(): void;\n\n // Mask scope (imperative) — used by MaskGroup and other node-level callers\n // that manage the scope with explicit begin/apply/end:\n //\n // beginMask({ mode, inverted })\n // <render mask child> // child draws its own Graphics2D\n // applyMask()\n // <render content children> // children draw their own Graphics2D\n // endMask()\n //\n // The chain-friendly form lives on `Graphics2D` (`.mask().applyMask().endMask()`)\n // for inline use within a single `draw()`.\n //\n // For `vector` mode the mask child's path is collected and used as a\n // clipPath; fills/strokes are suppressed. For `alpha` and `luminance`\n // the mask is rendered into an offscreen layer and combined with content\n // via blend modes.\n beginMask(options?: MaskOptions): void;\n applyMask(): void;\n endMask(): void;\n\n /**\n * Push a clip region built from a {@link Clip} command list. The clip's\n * shapes are unioned (with `cut()`s subtracted) into a single path and\n * intersected with the active clip, so children are confined to that\n * compound outline — any silhouette, not just a rect or ellipse. Used both\n * for a node's `clip` boundary and to confine backdrop effects (blur,\n * magnify) to the node's exact shape. Paired with `endClip()`.\n */\n beginClip(clip: Clip): void;\n /** Pop the most-recently pushed clip region. */\n endClip(): void;\n\n /**\n * Open an effect scope over the node, applying `effects` to either the node's\n * own content or the content beneath it. Paired with {@link endEffects}.\n *\n * `target`:\n * - `'foreground'` — warps/filters the node's *own* drawing (its fill, stroke\n * and children captured between begin/end), like blur. Used for bulge and\n * foreground posterize.\n * - `'backdrop'` — warps/filters the canvas content already painted *beneath*\n * the node, clipped to the active silhouette clip, so the node's own edges\n * stay sharp (Figma-style). Used for backdrop-flagged filters (blur,\n * grayscale, pixelate, …), magnify, backdrop posterize, and backdrop shader.\n *\n * The renderer decides per effect whether to compose it as an `ImageFilter`\n * or run it as a snapshot/redraw shader — callers never route by effect type.\n * `width`/`height` are the node's logical size, for size-relative effects\n * (e.g. pixelate) and shader lens boxes.\n */\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void;\n endEffects(): void;\n\n /**\n * Draw `draw` into an offscreen buffer instead of onto the canvas, and hand\n * back its pixels. The buffer is `width` × `height` **logical** px with its\n * origin at the centre, matching the space a node draws in — so `draw` can be\n * an ordinary `render()` call on a node subtree and needs no special casing.\n *\n * This is what backs `Tex.surface`: `Canvas3D` rasterizes each of its 2D\n * sources through here, then hands the pixels to the 3D backend as a texture.\n * It runs *inside* the frame that consumes it, so a scrubbed frame is\n * identical to a played one.\n *\n * Returns `null` when the backend cannot rasterize offscreen — the material\n * then renders without that map. `pixelRatio` is a ceiling on the buffer's\n * device-pixel scale, not a guarantee; the renderer may clamp it.\n */\n rasterize(\n width: number,\n height: number,\n draw: () => void,\n pixelRatio?: number,\n ): RasterizedSurface | null;\n\n /**\n * Push a camera viewport. Clips to `viewport` (canvas-space, centred\n * coords) and applies the inverse camera transform so children render as\n * seen through the lens. `heading` rotates the world counter to the camera\n * angle. Paired with `endCamera()`.\n *\n * @param viewport Bounding rect of the camera node in canvas space.\n * @param lookAt World-space point the camera looks at.\n * @param zoom Uniform scale applied around `lookAt`.\n * @param heading Camera rotation in degrees.\n */\n beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\n endCamera(): void;\n\n /**\n * Whether this context ever reads `NodeRenderState.rects`.\n *\n * True for anything that actually paints, since a fill with `space:'parent'`\n * resolves against them. A context that only inspects *what* would be drawn\n * never looks at them, and computing them costs an object allocation per node\n * per frame. Nodes check this before doing that work; see `Node2D.renderState`.\n */\n readonly readsSpaceRects: boolean;\n\n /**\n * Whether this context only cares about *visible* output.\n *\n * True for anything that paints: a subtree at zero opacity contributes no\n * pixels, so walking it produces draw calls the rasterizer will discard.\n *\n * A context that inspects rather than paints sets this `false`, and that is\n * the whole reason this is a capability rather than an unconditional check:\n * such a walk exists to discover which images, videos, fonts and effects a\n * frame *references* — regardless of whether they can be seen. An invisible\n * node's font still has to load, because it may fade in two frames later and\n * glyphs that were never registered never paint. Skipping it there is not an\n * optimisation, it is a missing asset.\n *\n * Same shape and same reasoning as {@link readsSpaceRects}: the context\n * declares what it needs, and nodes check before doing work that would be\n * thrown away. See `Node2D.render`.\n */\n readonly drawsVisibleOnly: boolean;\n\n}\n\n/**\n * A render *pass*: a {@link RenderContext2D} plus the per-node scope bracket the\n * walk opens around each node.\n *\n * Split off from the drawing surface because the two have different callers.\n * `begin`/`end` are `Node2D.render`'s, once per node, and they push onto a stack\n * every fill with `space:'parent'` and every motion-driven effect reads back\n * from. A custom node's `renderSelf` calling one would open a scope nothing\n * closes — and since `renderSelf` is handed a {@link RenderContext2D}, it now\n * cannot.\n *\n * Every backend implements this; a host driving a render pass holds one.\n *\n * @internal\n */\nexport interface RenderPass2D extends RenderContext2D {\n /**\n * Open a node draw scope. Must be paired with `end()`, also when the scope\n * throws. Pushes the node's id and {@link NodeRenderState} (gradient-space\n * rects + per-frame motion) for the duration of the scope.\n */\n begin(state: NodeRenderState): void;\n\n /** Close the innermost node draw scope opened by `begin()`. */\n end(): void;\n}\n"]}
1
+ {"version":3,"file":"render-context2d.js","sourceRoot":"","sources":["../../src/render/render-context2d.ts"],"names":[],"mappings":"","sourcesContent":["import type { FontStyle, TextStyle } from \"@/attributes/text/types\";\nimport type { TransformState } from \"./descriptors/transform\";\nimport type { MeasureContext2D } from \"./measure-context\";\nimport type { TextState } from \"./descriptors/text\";\nimport type { TextBlockLayout } from \"./text-layout\";\nimport type { Graphics2D } from \"./graphics2d\";\nimport type { Clip } from \"./clip\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\nimport type { Size2D } from \"@/attributes/layout/size\";\n\n/** Where an effect scope draws: `'foreground'` filters the node's own content, `'backdrop'` the canvas content already painted beneath it (clipped to its silhouette). See {@link RenderContext2D.beginEffects}. */\nexport type EffectTarget = \"foreground\" | \"backdrop\";\n\n/** Pixels from {@link RenderContext2D.rasterize}: RGBA8888, unpremultiplied, top-down. `width`/`height` are device px (the pixel ratio actually used), not the logical size asked for. */\nexport interface RasterizedSurface {\n pixels: Uint8Array;\n width: number;\n height: number;\n}\n\n/** A box in the current node's local space (origin at the layout-cell centre); `left/top` are canvas y-down. */\nexport interface SpaceRect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\n/** Reference rects a fill resolves against, supplied per node at `begin()`. `local` comes from the drawn shapes and `global` from the renderer's surface size, so only the parent frame is passed. */\nexport interface SpaceRects {\n /** The parent node's content rect, in this node's local space. */\n parent?: SpaceRect;\n}\n\n/** Per-node state for the duration of a node's draw scope: identity, gradient-space `rects` and per-frame motion, which motion-driven effects (motion blur) read instead of a fixed authored direction. Velocity fields are 0 when unknown: the first frame, or after a scrub/seek discontinuity. */\nexport interface NodeRenderState {\n id: string;\n rects: SpaceRects;\n elapsed: number;\n /** The frame delta, in seconds, used to derive displacement from velocity. */\n dt: number;\n /** Translational velocity in px/sec, world space (y-down). `{0,0}` when unknown. */\n velocity: Vector2;\n /** Heading of `velocity` in degrees (`atan2(vy, vx)`). `0` when unknown. */\n direction: number;\n /** Magnitude of `velocity` in px/sec. `0` when unknown. */\n speed: number;\n /** Rotational velocity in degrees/sec. `0` when unknown. Reserved for radial motion blur. */\n angularVelocity: number;\n /** Scale velocity in scale-units/sec. `0` when unknown. Reserved for zoom motion blur. */\n scaleVelocity: number;\n}\n\n/**\n * The drawing surface a `Node2D` paints into: the whole of what a node may ask of a renderer.\n *\n * Shapes are built with a {@link Graphics2D} command list and submitted via {@link draw}; shapes chained on one\n * `Graphics2D` before a paint call share a single surface. It extends {@link MeasureContext2D}, so a node\n * measures and draws through one object.\n *\n * An interface so node-facing and host-facing lists stay apart: `execute`, `screenshot`, `unmount` and `dispose`\n * drive a pass and mustn't be reachable from inside one. Every real backend still extends `CanvasRenderContext2D`,\n * keeping the `draw` to `drawGraphics` invariant that gives them one text-default resolution.\n * `RenderContext3D` is a sibling, not a subclass: they share no members.\n */\nexport interface RenderContext2D extends MeasureContext2D {\n measureText(\n text: string,\n fontSize: number,\n fontFamily: string,\n fontWeight?: number,\n letterSpacing?: number,\n fontStyle?: FontStyle,\n ): Size2D;\n\n // Inherited text-style defaults: `<DefaultTextStyle>` reaches node text through the context map; a raw `Graphics2D`\n // has no node to bind, so it inherits the same defaults (same `TextStyle` vocabulary and precedence) pushed around\n // a subtree and folded into each text op by `draw()`.\n\n /**\n * Sets text-style defaults until the matching {@link popTextStyle} (the drawn-graphics half of `<DefaultTextStyle>`).\n * `style` is merged per key onto the defaults in effect, so nesting accumulates and the inner value wins; values\n * are resolved, not callbacks. `null` opens a scope inheriting nothing, not even `theme.typography.default`\n * (`Code` does this so a serif scene face doesn't reflow monospaced code). Pair with `popTextStyle()` in a\n * `finally`: the stack is shared with every later sibling.\n */\n pushTextStyle(style: TextStyle | null): void;\n\n popTextStyle(): void;\n\n /** The defaults in effect: the innermost {@link pushTextStyle} scope, else the project's `theme.typography.default` (the same preset a `Text` node falls back to). */\n readonly defaultTextStyle: TextStyle;\n\n /** Replays a built `Graphics2D`. Resolves ambient text defaults onto the op list first, so the real renderer and the precomp asset walk agree on which font an under-specified `text` op uses (a family only one resolves is a font that never loads). */\n draw(graphics: Graphics2D): void;\n\n /**\n * Lays `state` out as it would be drawn and reports where every character landed (see {@link TextBlockLayout}\n * for the space and caret model). Glyph positions live in the backend's shaper, so a host's own caret and\n * selection can't compute them; DOM approximations drift once font, line height or wrapping change. Takes the\n * whole {@link TextState} because `'autofit'`, `wrap` and `textAlign` resolve in the backend and must match what is drawn.\n *\n * `null` when the backend can't measure (the default) or no caret model fits: text-on-path and styled-segment blocks.\n */\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null;\n\n /** Pushes a transform and returns the context for draws in the transformed space; popped by `end()` for the node that pushed it. */\n transform(state: Partial<TransformState>): RenderContext2D;\n\n /** Opens a boolean-path scope: shapes drawn until `endBoolean()` are gathered (fills/strokes suppressed) and combined with `op`; the merged path then stays the active surface, so a paint-only `Graphics2D` submitted via `draw()` styles it. */\n beginBoolean(op: BooleanOperation): void;\n endBoolean(): void;\n\n // Imperative mask scope for node-level callers: beginMask, render the mask child, applyMask, render the content\n // children, endMask. The chain form lives on `Graphics2D` (`.mask().applyMask().endMask()`). `vector` mode collects\n // the mask child's path as a clipPath (fills/strokes suppressed); `alpha` and `luminance` render it into an\n // offscreen layer combined via blend modes.\n beginMask(options?: MaskOptions): void;\n applyMask(): void;\n endMask(): void;\n\n /** Pushes a clip from a {@link Clip} command list: its shapes are unioned (minus `cut()`s) into one path and intersected with the active clip, so any silhouette confines children. Also confines backdrop effects to the node's exact shape. Paired with `endClip()`. */\n beginClip(clip: Clip): void;\n endClip(): void;\n\n /**\n * Opens an effect scope over the node, paired with {@link endEffects}. `'foreground'` filters the node's own\n * drawing (blur, bulge, foreground posterize); `'backdrop'` filters what is already painted beneath it, clipped\n * to the active silhouette clip so the node's edges stay sharp (backdrop filters, magnify, backdrop shader).\n * The renderer routes each effect to an `ImageFilter` or a snapshot/redraw shader; callers never do.\n * `width`/`height` are the node's logical size, for size-relative effects (pixelate) and shader lens boxes.\n */\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void;\n endEffects(): void;\n\n /**\n * Draws `draw` into an offscreen buffer and returns its pixels. The buffer is `width` x `height` **logical** px,\n * origin at the centre (the space a node draws in), so `draw` can be an ordinary `render()` of a node subtree.\n * Backs `Tex.surface`: it runs inside the consuming frame, so a scrubbed frame equals a played one.\n * `null` when the backend can't rasterize offscreen (the material then renders without that map).\n * `pixelRatio` is a ceiling on the device-pixel scale; the renderer may clamp it.\n */\n rasterize(\n width: number,\n height: number,\n draw: () => void,\n pixelRatio?: number,\n ): RasterizedSurface | null;\n\n /**\n * Pushes a camera viewport: clips to `viewport` and applies the inverse camera transform so children render as\n * seen through the lens. Paired with `endCamera()`.\n *\n * @param viewport Bounding rect of the camera node in canvas space (centred coords).\n * @param lookAt World-space point the camera looks at.\n * @param zoom Uniform scale applied around `lookAt`.\n * @param heading Camera rotation in degrees; the world rotates counter to it.\n */\n beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\n endCamera(): void;\n\n /** Whether this context reads `NodeRenderState.rects`: true for anything that paints (`space:'parent'` fills resolve against them). A context that only inspects skips them, saving an object allocation per node per frame; see `Node2D.renderState`. */\n readonly readsSpaceRects: boolean;\n\n /**\n * Whether this context only cares about visible output: true for anything that paints (a zero-opacity subtree\n * contributes no pixels). A context that inspects rather than paints sets it `false`: its walk discovers which\n * images, videos, fonts and effects a frame references, and an invisible node's font may fade in two frames\n * later, so skipping it there is a missing asset, not an optimisation. See `Node2D.render`.\n */\n readonly drawsVisibleOnly: boolean;\n\n}\n\n/**\n * A render pass: a {@link RenderContext2D} plus the per-node scope bracket the walk opens around each node.\n * `begin`/`end` belong to `Node2D.render` and push onto the stack that `space:'parent'` fills and motion-driven\n * effects read; a custom `renderSelf` calling one would open a scope nothing closes, so it is handed only a\n * {@link RenderContext2D}.\n *\n * @internal\n */\nexport interface RenderPass2D extends RenderContext2D {\n /** Opens a node draw scope pushing the node's id and {@link NodeRenderState}; pair with `end()`, also when the scope throws. */\n begin(state: NodeRenderState): void;\n\n end(): void;\n}\n"]}
@@ -1,19 +1,5 @@
1
1
  import { Size2D } from "../attributes/layout/size.js";
2
- /**
3
- * The host-facing half of a render context: where pixels land, and how the
4
- * preview frames them.
5
- *
6
- * Split out from `CanvasRenderContext2D` because a *node* never touches any of
7
- * it — a node draws, and the host decides what it is drawing into. A `Session`
8
- * owns one of these; a node is handed a `RenderContext2D`.
9
- *
10
- * **`mount` takes `unknown`, not `HTMLCanvasElement`.** `packages/core` compiles
11
- * with `lib: ["ES2022"]` and no DOM, deliberately, so this layer cannot name a
12
- * canvas — and it does not need to: a browser backend takes a canvas, a headless
13
- * one takes a size. Each narrows the argument at its own `mount`, where the
14
- * relevant types exist. A backend's context satisfies this structurally, so it
15
- * never imports it.
16
- */
2
+ /** The host-facing half of a render context: where pixels land and how the preview frames them. Split from `CanvasRenderContext2D` because a *node* never touches it; a `Session` owns one of these, a node gets a `RenderContext2D`. `mount` takes `unknown`, not `HTMLCanvasElement`: core compiles with `lib: ["ES2022"]` and no DOM, so this layer can't name a canvas; a browser backend takes a canvas, a headless one a size, each narrowing at its own `mount`, and a backend's context satisfies this structurally. */
17
3
  export interface RenderSurface {
18
4
  mount(target: unknown): void;
19
5
  unmount(): void;
@@ -28,10 +14,7 @@ export interface RenderSurface {
28
14
  /** The frame's own size when the surface is a window onto it, else `null`. */
29
15
  frame: Size2D | null;
30
16
  clipToFrame: boolean;
31
- /**
32
- * What the frame's backdrop is painted with. `"transparent"` lets whatever
33
- * is behind the canvas show through where nothing was drawn.
34
- */
17
+ /** What the frame's backdrop is painted with; `"transparent"` lets whatever is behind the canvas show where nothing was drawn. */
35
18
  frameBackground: "black" | "transparent";
36
19
  }
37
20
  //# sourceMappingURL=surface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../src/render/surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,aAAa;IAC1B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,OAAO,IAAI,IAAI,CAAC;IAChB,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,8EAA8E;IAC9E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,eAAe,EAAE,OAAO,GAAG,aAAa,CAAC;CAC5C"}
1
+ {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../src/render/surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,ggBAAggB;AAChgB,MAAM,WAAW,aAAa;IAC1B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,OAAO,IAAI,IAAI,CAAC;IAChB,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,8EAA8E;IAC9E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,kIAAkI;IAClI,eAAe,EAAE,OAAO,GAAG,aAAa,CAAC;CAC5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/render/surface.ts"],"names":[],"mappings":"","sourcesContent":["import { Size2D } from \"@/attributes/layout/size\";\n\n/**\n * The host-facing half of a render context: where pixels land, and how the\n * preview frames them.\n *\n * Split out from `CanvasRenderContext2D` because a *node* never touches any of\n * it — a node draws, and the host decides what it is drawing into. A `Session`\n * owns one of these; a node is handed a `RenderContext2D`.\n *\n * **`mount` takes `unknown`, not `HTMLCanvasElement`.** `packages/core` compiles\n * with `lib: [\"ES2022\"]` and no DOM, deliberately, so this layer cannot name a\n * canvas — and it does not need to: a browser backend takes a canvas, a headless\n * one takes a size. Each narrows the argument at its own `mount`, where the\n * relevant types exist. A backend's context satisfies this structurally, so it\n * never imports it.\n */\nexport interface RenderSurface {\n mount(target: unknown): void;\n unmount(): void;\n /** Device pixels per viewport unit. Rasterization, not zoom — see {@link view}. */\n pixelRatio: number;\n /** Preview pan/zoom over the frame. Costs a repaint, never a surface rebuild. */\n view: { zoom: number; x: number; y: number };\n /** The frame's own size when the surface is a window onto it, else `null`. */\n frame: Size2D | null;\n clipToFrame: boolean;\n /**\n * What the frame's backdrop is painted with. `\"transparent\"` lets whatever\n * is behind the canvas show through where nothing was drawn.\n */\n frameBackground: \"black\" | \"transparent\";\n}\n"]}
1
+ {"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/render/surface.ts"],"names":[],"mappings":"","sourcesContent":["import { Size2D } from \"@/attributes/layout/size\";\n\n/** The host-facing half of a render context: where pixels land and how the preview frames them. Split from `CanvasRenderContext2D` because a *node* never touches it; a `Session` owns one of these, a node gets a `RenderContext2D`. `mount` takes `unknown`, not `HTMLCanvasElement`: core compiles with `lib: [\"ES2022\"]` and no DOM, so this layer can't name a canvas; a browser backend takes a canvas, a headless one a size, each narrowing at its own `mount`, and a backend's context satisfies this structurally. */\nexport interface RenderSurface {\n mount(target: unknown): void;\n unmount(): void;\n /** Device pixels per viewport unit. Rasterization, not zoom — see {@link view}. */\n pixelRatio: number;\n /** Preview pan/zoom over the frame. Costs a repaint, never a surface rebuild. */\n view: { zoom: number; x: number; y: number };\n /** The frame's own size when the surface is a window onto it, else `null`. */\n frame: Size2D | null;\n clipToFrame: boolean;\n /** What the frame's backdrop is painted with; `\"transparent\"` lets whatever is behind the canvas show where nothing was drawn. */\n frameBackground: \"black\" | \"transparent\";\n}\n"]}
@@ -1,21 +1,5 @@
1
1
  import type { TextStyle } from "../attributes/text/types.js";
2
2
  import { Graphics2D } from "./graphics2d.js";
3
- /**
4
- * `graphics` with `style` filled into every `text`/`richText` op that left a
5
- * shaping field unset — the drawn-text half of `<DefaultTextStyle>`.
6
- *
7
- * A `Text` node inherits defaults through the context channel, once, at bind
8
- * time (`applyTextDefaults`); a raw `Graphics2D` has no node to bind, so it
9
- * inherits here instead, at draw time, from the scope it is drawn in. Called
10
- * from `RenderContext2D.draw`, so a custom node's `ctx.draw(...)`, an offscreen
11
- * rasterization and the precomp pass's asset walk all see the same resolved op
12
- * list — which is what makes an inherited font actually *load* rather than
13
- * merely be asked for.
14
- *
15
- * A key counts as unset only when it is `undefined`: an op that names a value
16
- * always wins, exactly as an author-set prop beats an inherited one on a node.
17
- * Returns `graphics` itself when nothing changes, which is the common case (the
18
- * scene sets no defaults, or every op already names its own).
19
- */
3
+ /** `graphics` with `style` filled into every `text`/`richText` op that left a shaping field unset: the drawn-text half of `<DefaultTextStyle>`. A `Text` node inherits through the context channel at bind; a raw `Graphics2D` has no node to bind, so it inherits here at draw time from the scope it is drawn in. Called from `RenderContext2D.draw`, so custom `ctx.draw(...)`, offscreen rasterization and the precomp asset walk see the same resolved ops (an inherited font actually *loads*). A key is unset only when `undefined`: an op naming a value wins. Returns `graphics` itself when nothing changes. */
20
4
  export declare function applyGraphicsTextDefaults(graphics: Graphics2D, style: TextStyle): Graphics2D;
21
5
  //# sourceMappingURL=text-defaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-defaults.d.ts","sourceRoot":"","sources":["../../src/render/text-defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoC,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAyC,MAAM,cAAc,CAAC;AAsBjF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,UAAU,CAuB5F"}
1
+ {"version":3,"file":"text-defaults.d.ts","sourceRoot":"","sources":["../../src/render/text-defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoC,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAyC,MAAM,cAAc,CAAC;AAejF,0lBAA0lB;AAC1lB,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,UAAU,CAoB5F"}
@@ -1,10 +1,5 @@
1
1
  import { EMPTY_TEXT_STYLE, TEXT_SHAPING_KEYS, textOps } from "../attributes/text/ops.js";
2
- /**
3
- * The span-level half of {@link TEXT_SHAPING_KEYS}. A `richText` op carries its
4
- * typography per span rather than on the shape, so a default has to be filled in
5
- * span by span — except `lineHeight`/`textAlign`, which lay the block out as a
6
- * whole and so live on the op itself.
7
- */
2
+ /** The span-level half of {@link TEXT_SHAPING_KEYS}: a `richText` op carries typography per span, so defaults are filled span by span, except `lineHeight`/`textAlign`, which lay out the whole block and live on the op. */
8
3
  const SPAN_KEYS = [
9
4
  'fontFamily', 'fontSize', 'fontWeight', 'fontStyle', 'letterSpacing',
10
5
  ];
@@ -12,27 +7,9 @@ const SPAN_KEYS = [
12
7
  const RICHTEXT_BLOCK_KEYS = [
13
8
  'lineHeight', 'textAlign',
14
9
  ];
15
- /**
16
- * `graphics` with `style` filled into every `text`/`richText` op that left a
17
- * shaping field unset — the drawn-text half of `<DefaultTextStyle>`.
18
- *
19
- * A `Text` node inherits defaults through the context channel, once, at bind
20
- * time (`applyTextDefaults`); a raw `Graphics2D` has no node to bind, so it
21
- * inherits here instead, at draw time, from the scope it is drawn in. Called
22
- * from `RenderContext2D.draw`, so a custom node's `ctx.draw(...)`, an offscreen
23
- * rasterization and the precomp pass's asset walk all see the same resolved op
24
- * list — which is what makes an inherited font actually *load* rather than
25
- * merely be asked for.
26
- *
27
- * A key counts as unset only when it is `undefined`: an op that names a value
28
- * always wins, exactly as an author-set prop beats an inherited one on a node.
29
- * Returns `graphics` itself when nothing changes, which is the common case (the
30
- * scene sets no defaults, or every op already names its own).
31
- */
10
+ /** `graphics` with `style` filled into every `text`/`richText` op that left a shaping field unset: the drawn-text half of `<DefaultTextStyle>`. A `Text` node inherits through the context channel at bind; a raw `Graphics2D` has no node to bind, so it inherits here at draw time from the scope it is drawn in. Called from `RenderContext2D.draw`, so custom `ctx.draw(...)`, offscreen rasterization and the precomp asset walk see the same resolved ops (an inherited font actually *loads*). A key is unset only when `undefined`: an op naming a value wins. Returns `graphics` itself when nothing changes. */
32
11
  export function applyGraphicsTextDefaults(graphics, style) {
33
- // Not gated on `style` alone any more: an op naming a `variant` has
34
- // something to inherit even in a scope that sets nothing, so the walk has to
35
- // happen either way. The lazy copy below is what keeps that cheap.
12
+ // Not gated on `style` alone: an op naming a `variant` has something to inherit even in a scope that sets nothing. The lazy copy below keeps the walk cheap.
36
13
  const ambient = hasShapingDefaults(style) ? style : EMPTY_TEXT_STYLE;
37
14
  const ops = graphics.ops();
38
15
  let next = null;
@@ -48,23 +25,14 @@ export function applyGraphicsTextDefaults(graphics, style) {
48
25
  : patchRichText(op, effective);
49
26
  if (!patched)
50
27
  continue;
51
- // Copy lazily: an op list with nothing to fill in keeps its identity, so
52
- // a fully-specified Text node allocates nothing on the way through.
28
+ // Copy lazily: an op list with nothing to fill in keeps its identity, so a fully specified Text node allocates nothing.
53
29
  if (!next)
54
30
  next = ops.slice();
55
31
  next[i] = patched;
56
32
  }
57
33
  return next ? graphics._withOps(next) : graphics;
58
34
  }
59
- /**
60
- * The defaults one op inherits: its `variant`'s preset laid over the enclosing
61
- * scope's.
62
- *
63
- * That order is the node ladder one level down — an explicit value beats a
64
- * variant beats an inherited `<DefaultTextStyle>` — and it is why the merge is
65
- * here rather than in the caller: the ambient scope is per *subtree* while a
66
- * variant is per *op*, so they cannot be flattened before the walk.
67
- */
35
+ /** The defaults one op inherits: its `variant`'s preset laid over the enclosing scope's (explicit beats variant beats inherited `<DefaultTextStyle>`). Merged here, not by the caller, because the ambient scope is per subtree while a variant is per op, so they can't be flattened before the walk. */
68
36
  function effectiveStyle(variant, ambient) {
69
37
  return textOps.mergeStyle(ambient, variant ? textOps.preset(variant) : undefined);
70
38
  }
@@ -91,9 +59,7 @@ function patchRichText(op, style) {
91
59
  function patchSpans(spans, style) {
92
60
  if (!spans || spans.length === 0)
93
61
  return null;
94
- // A span has no autofit mode — it is a run inside a block, sized by the
95
- // block — so an inherited `'autofit'` is skipped rather than written through
96
- // as a bad number.
62
+ // A span has no autofit mode (it is sized by its block), so an inherited `'autofit'` is skipped rather than written through as a bad number.
97
63
  const spanStyle = style.fontSize === "autofit" ? { ...style, fontSize: undefined } : style;
98
64
  let next = null;
99
65
  for (let i = 0; i < spans.length; i++) {