@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
@@ -11,60 +11,23 @@ import { TextState } from "./descriptors/text.js";
11
11
  import { TextBlockLayout } from "./text-layout.js";
12
12
  import type { NodeRenderState, RasterizedSurface, RenderContext2D, RenderPass2D, SpaceRects, EffectTarget } from "./render-context2d.js";
13
13
  import type { NodeEffect } from "../attributes/shape/effects/union.js";
14
- /**
15
- * The base every {@link RenderContext2D} backend extends.
16
- *
17
- * It owns the parts of a render context that are the *same* whatever is being
18
- * rasterized — the text-default stack, the node scope stack, disposal — plus
19
- * the host-facing half of the surface (`execute`, `screenshot`, `unmount`),
20
- * which the {@link RenderContext2D} interface deliberately leaves out because a
21
- * node has no business driving a render pass from inside one.
22
- *
23
- * **`draw` is final by convention.** It resolves the ambient text defaults onto
24
- * the op list and hands the result to {@link drawGraphics}, which is where a
25
- * backend does its actual drawing. Owning that step here rather than in each
26
- * backend is what keeps the real renderer and the precomp asset walk agreeing
27
- * on which font an under-specified `text` op shapes with: a family that one
28
- * resolves and the other does not is a font that never loads and glyphs that
29
- * never paint.
30
- */
14
+ /** The base every {@link RenderContext2D} backend extends. Owns what is the same whatever is rasterized (text-default stack, node scope stack, disposal) plus the host-facing half (`execute`, `screenshot`, `unmount`) the interface leaves out. **`draw` is final by convention**: it resolves ambient text defaults onto the op list and hands it to {@link drawGraphics}; owning that step here keeps the real renderer and the precomp asset walk agreeing on which font an under-specified `text` op uses. */
31
15
  export declare abstract class CanvasRenderContext2D implements RenderPass2D {
32
16
  abstract measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): Size2D;
33
- /**
34
- * Defaults in effect for the current draw scope, innermost last. Each entry
35
- * is **already merged** onto the one below it (see {@link pushTextStyle}), so
36
- * the top of the stack is the effective style and reading it costs nothing.
37
- */
17
+ /** Defaults for the current draw scope, innermost last. Each entry is already merged onto the one below (see {@link pushTextStyle}), so the top is the effective style. */
38
18
  private readonly textStyleStack;
39
- /** See {@link RenderContext2D.pushTextStyle}. */
40
19
  pushTextStyle(style: TextStyle | null): void;
41
- /** Close the innermost scope opened by {@link pushTextStyle}. */
42
20
  popTextStyle(): void;
43
- /**
44
- * The text-style defaults in effect right now — the innermost
45
- * {@link pushTextStyle} scope, or the project's `theme.typography.default`
46
- * when no scope is open.
47
- *
48
- * Carries all ten {@link TEXT_STYLE_KEYS}, but only the shaping ones reach a
49
- * `Graphics2D` op; see `TEXT_SHAPING_KEYS` for why `fill`/`stroke`/`shadow`
50
- * stay a node-level concern.
51
- */
21
+ /** The defaults in effect: innermost {@link pushTextStyle} scope, else the project's `theme.typography.default`. Carries all ten {@link TEXT_STYLE_KEYS}, but only shaping ones reach a `Graphics2D` op (see `TEXT_SHAPING_KEYS`). */
52
22
  get defaultTextStyle(): TextStyle;
53
23
  /** See {@link RenderContext2D.draw}. Final by convention — override {@link drawGraphics}. */
54
24
  draw(graphics: Graphics2D): void;
55
25
  /** Paint a `Graphics2D` whose text ops have already been resolved against the
56
26
  * ambient defaults. Backends implement this instead of {@link draw}. */
57
27
  protected abstract drawGraphics(graphics: Graphics2D): void;
58
- /**
59
- * See {@link RenderContext2D.layoutTextBlock}. Concrete rather than abstract,
60
- * and `null` by default, so a backend that has no need to report glyph
61
- * positions is unaffected — the only thing it gives up is on-canvas text
62
- * editing in a host built on it.
63
- */
28
+ /** `null` by default, so a backend that never reports glyph positions only gives up on-canvas text editing. See {@link RenderContext2D.layoutTextBlock}. */
64
29
  layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null;
65
- /** Stack of node ids currently being drawn, innermost last. */
66
30
  protected currentNodeStack: string[];
67
- /** Returns the id of the innermost node currently being drawn. */
68
31
  protected currentNodeId(): string;
69
32
  /** Remove all renderer-side resources for the current node (called on unmount). */
70
33
  abstract unmount(): void;
@@ -72,19 +35,9 @@ export declare abstract class CanvasRenderContext2D implements RenderPass2D {
72
35
  /** `true` after `dispose()` — the context must not be used after this point. */
73
36
  isDisposed(): boolean;
74
37
  dispose(): void;
75
- /**
76
- * Execute `callback`, which issues shape/paint calls, and flush the result
77
- * to the underlying render target (canvas, SVG document, etc.). A callback
78
- * that throws still throws, and the next pass starts from a clean context.
79
- */
38
+ /** Runs `callback`, which issues shape/paint calls, then flushes to the render target. A throwing callback still throws, and the next pass starts clean. */
80
39
  abstract execute(callback: () => void): void;
81
- /**
82
- * What the frames since the last call drew without failing but not as the
83
- * document says (a blend mode the backend lacks, a shader that does not
84
- * compile, a lost GPU device), once per kind, feature and node. The
85
- * playback controller reports them as render errors; an export hands them
86
- * to its `onIssue`. A bare string is a `shader` issue.
87
- */
40
+ /** What the frames since the last call drew without failing but not as the document says (a missing blend mode, a shader that doesn't compile, a lost GPU device), once per kind, feature and node; a bare string is a `shader` issue. Playback reports them as render errors, export hands them to `onIssue`. */
88
41
  takeRenderIssues(): Array<RenderIssue | string>;
89
42
  /** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */
90
43
  abstract screenshot(): string | undefined;
@@ -108,30 +61,17 @@ export declare abstract class CanvasRenderContext2D implements RenderPass2D {
108
61
  height: number;
109
62
  }, lookAt: Vector2, zoom: number, heading: number): void;
110
63
  abstract endCamera(): void;
111
- /**
112
- * Per-node render state for each node on the draw stack, in push order
113
- * (innermost last). Kept parallel to `currentNodeStack` so fills with
114
- * `space: 'parent'` can resolve their reference rect and so
115
- * motion-driven effects can read the current node's velocity.
116
- */
64
+ /** Render state per node on the draw stack, parallel to `currentNodeStack`, so `space: 'parent'` fills can resolve their reference rect and motion effects read the node's velocity. */
117
65
  protected renderStateStack: NodeRenderState[];
118
- /** See {@link RenderContext2D.readsSpaceRects}. */
119
66
  readonly readsSpaceRects: boolean;
120
- /** See {@link RenderContext2D.drawsVisibleOnly}. */
121
67
  readonly drawsVisibleOnly: boolean;
122
- /** See {@link RenderPass2D.begin}. */
123
68
  begin(state: NodeRenderState): void;
124
- /** Close the innermost node draw scope opened by `begin()`. */
125
69
  end(): void;
126
70
  /** Reference rects for the node currently being drawn (parent / viewport). */
127
71
  protected currentSpaceRects(): SpaceRects;
128
72
  /** Full render state (incl. velocity) for the node currently being drawn, if any. */
129
73
  protected currentRenderState(): NodeRenderState | undefined;
130
- /**
131
- * Close every node and text-style scope still open. A backend calls this
132
- * when a pass ends, so a pass that threw cannot leave the next one inside
133
- * its scopes.
134
- */
74
+ /** Closes every node and text-style scope still open; a backend calls it when a pass ends so a pass that threw can't leave the next inside its scopes. */
135
75
  protected _resetScopes(): void;
136
76
  }
137
77
  //# sourceMappingURL=canvas-render-context2d.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-render-context2d.d.ts","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,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AC7I,QAAQ,CAAC,SAAS,IAAI,IAAI;IAE1B,wLAAwL;IACxL,SAAS,CAAC,gBAAgB,EAAE,eAAe,EAAE,CAAM;IAEnD,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAQ;IAEzC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAQ;IAE1C,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAKnC,GAAG,IAAI,IAAI;IAKX,8EAA8E;IAC9E,SAAS,CAAC,iBAAiB,IAAI,UAAU;IAIzC,qFAAqF;IACrF,SAAS,CAAC,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAI3D,0JAA0J;IAC1J,SAAS,CAAC,YAAY,IAAI,IAAI;CAKjC"}
@@ -1,52 +1,17 @@
1
1
  import { EMPTY_TEXT_STYLE, textOps } from "../attributes/text/ops.js";
2
2
  import { applyGraphicsTextDefaults } from "./text-defaults.js";
3
- /**
4
- * The base every {@link RenderContext2D} backend extends.
5
- *
6
- * It owns the parts of a render context that are the *same* whatever is being
7
- * rasterized — the text-default stack, the node scope stack, disposal — plus
8
- * the host-facing half of the surface (`execute`, `screenshot`, `unmount`),
9
- * which the {@link RenderContext2D} interface deliberately leaves out because a
10
- * node has no business driving a render pass from inside one.
11
- *
12
- * **`draw` is final by convention.** It resolves the ambient text defaults onto
13
- * the op list and hands the result to {@link drawGraphics}, which is where a
14
- * backend does its actual drawing. Owning that step here rather than in each
15
- * backend is what keeps the real renderer and the precomp asset walk agreeing
16
- * on which font an under-specified `text` op shapes with: a family that one
17
- * resolves and the other does not is a font that never loads and glyphs that
18
- * never paint.
19
- */
3
+ /** The base every {@link RenderContext2D} backend extends. Owns what is the same whatever is rasterized (text-default stack, node scope stack, disposal) plus the host-facing half (`execute`, `screenshot`, `unmount`) the interface leaves out. **`draw` is final by convention**: it resolves ambient text defaults onto the op list and hands it to {@link drawGraphics}; owning that step here keeps the real renderer and the precomp asset walk agreeing on which font an under-specified `text` op uses. */
20
4
  export class CanvasRenderContext2D {
21
- // ---- Inherited text-style defaults ------------------------------------
22
- // `<DefaultTextStyle>` reaches a `Text`/`RichText` node through the context
23
- // map, applied once when the node binds. A raw `Graphics2D` has no node to
24
- // bind, so it inherits the same defaults here instead — pushed around a
25
- // subtree's draw scope, and folded into each `text`/`richText` op by
26
- // `draw()`. Same vocabulary (`TextStyle`), same precedence, two channels.
27
- /**
28
- * Defaults in effect for the current draw scope, innermost last. Each entry
29
- * is **already merged** onto the one below it (see {@link pushTextStyle}), so
30
- * the top of the stack is the effective style and reading it costs nothing.
31
- */
5
+ // Inherited text-style defaults (see RenderContext2D.pushTextStyle).
6
+ /** Defaults for the current draw scope, innermost last. Each entry is already merged onto the one below (see {@link pushTextStyle}), so the top is the effective style. */
32
7
  textStyleStack = [];
33
- /** See {@link RenderContext2D.pushTextStyle}. */
34
8
  pushTextStyle(style) {
35
9
  this.textStyleStack.push(style === null ? EMPTY_TEXT_STYLE : textOps.mergeStyle(this.defaultTextStyle, style));
36
10
  }
37
- /** Close the innermost scope opened by {@link pushTextStyle}. */
38
11
  popTextStyle() {
39
12
  this.textStyleStack.pop();
40
13
  }
41
- /**
42
- * The text-style defaults in effect right now — the innermost
43
- * {@link pushTextStyle} scope, or the project's `theme.typography.default`
44
- * when no scope is open.
45
- *
46
- * Carries all ten {@link TEXT_STYLE_KEYS}, but only the shaping ones reach a
47
- * `Graphics2D` op; see `TEXT_SHAPING_KEYS` for why `fill`/`stroke`/`shadow`
48
- * stay a node-level concern.
49
- */
14
+ /** The defaults in effect: innermost {@link pushTextStyle} scope, else the project's `theme.typography.default`. Carries all ten {@link TEXT_STYLE_KEYS}, but only shaping ones reach a `Graphics2D` op (see `TEXT_SHAPING_KEYS`). */
50
15
  get defaultTextStyle() {
51
16
  return this.textStyleStack[this.textStyleStack.length - 1] ?? textOps.preset("default");
52
17
  }
@@ -54,18 +19,11 @@ export class CanvasRenderContext2D {
54
19
  draw(graphics) {
55
20
  this.drawGraphics(applyGraphicsTextDefaults(graphics, this.defaultTextStyle));
56
21
  }
57
- /**
58
- * See {@link RenderContext2D.layoutTextBlock}. Concrete rather than abstract,
59
- * and `null` by default, so a backend that has no need to report glyph
60
- * positions is unaffected — the only thing it gives up is on-canvas text
61
- * editing in a host built on it.
62
- */
22
+ /** `null` by default, so a backend that never reports glyph positions only gives up on-canvas text editing. See {@link RenderContext2D.layoutTextBlock}. */
63
23
  layoutTextBlock(state) {
64
24
  return null;
65
25
  }
66
- /** Stack of node ids currently being drawn, innermost last. */
67
26
  currentNodeStack = [];
68
- /** Returns the id of the innermost node currently being drawn. */
69
27
  currentNodeId() {
70
28
  if (this.currentNodeStack.length === 0) {
71
29
  throw new Error("No current node in context");
@@ -80,13 +38,7 @@ export class CanvasRenderContext2D {
80
38
  dispose() {
81
39
  this._disposed = true;
82
40
  }
83
- /**
84
- * What the frames since the last call drew without failing but not as the
85
- * document says (a blend mode the backend lacks, a shader that does not
86
- * compile, a lost GPU device), once per kind, feature and node. The
87
- * playback controller reports them as render errors; an export hands them
88
- * to its `onIssue`. A bare string is a `shader` issue.
89
- */
41
+ /** What the frames since the last call drew without failing but not as the document says (a missing blend mode, a shader that doesn't compile, a lost GPU device), once per kind, feature and node; a bare string is a `shader` issue. Playback reports them as render errors, export hands them to `onIssue`. */
90
42
  takeRenderIssues() {
91
43
  return [];
92
44
  }
@@ -97,23 +49,14 @@ export class CanvasRenderContext2D {
97
49
  rasterize(width, height, draw, pixelRatio) {
98
50
  return null;
99
51
  }
100
- /**
101
- * Per-node render state for each node on the draw stack, in push order
102
- * (innermost last). Kept parallel to `currentNodeStack` so fills with
103
- * `space: 'parent'` can resolve their reference rect and so
104
- * motion-driven effects can read the current node's velocity.
105
- */
52
+ /** Render state per node on the draw stack, parallel to `currentNodeStack`, so `space: 'parent'` fills can resolve their reference rect and motion effects read the node's velocity. */
106
53
  renderStateStack = [];
107
- /** See {@link RenderContext2D.readsSpaceRects}. */
108
54
  readsSpaceRects = true;
109
- /** See {@link RenderContext2D.drawsVisibleOnly}. */
110
55
  drawsVisibleOnly = true;
111
- /** See {@link RenderPass2D.begin}. */
112
56
  begin(state) {
113
57
  this.currentNodeStack.push(state.id);
114
58
  this.renderStateStack.push(state);
115
59
  }
116
- /** Close the innermost node draw scope opened by `begin()`. */
117
60
  end() {
118
61
  this.currentNodeStack.pop();
119
62
  this.renderStateStack.pop();
@@ -126,11 +69,7 @@ export class CanvasRenderContext2D {
126
69
  currentRenderState() {
127
70
  return this.renderStateStack[this.renderStateStack.length - 1];
128
71
  }
129
- /**
130
- * Close every node and text-style scope still open. A backend calls this
131
- * when a pass ends, so a pass that threw cannot leave the next one inside
132
- * its scopes.
133
- */
72
+ /** Closes every node and text-style scope still open; a backend calls it when a pass ends so a pass that threw can't leave the next inside its scopes. */
134
73
  _resetScopes() {
135
74
  this.textStyleStack.length = 0;
136
75
  this.currentNodeStack.length = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-render-context2d.js","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAI5D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAgB,qBAAqB;IAGvC,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,wEAAwE;IACxE,qEAAqE;IACrE,0EAA0E;IAE1E;;;;OAIG;IACc,cAAc,GAAgB,EAAE,CAAC;IAElD,iDAAiD;IACjD,aAAa,CAAC,KAAuB;QACjC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;IACnH,CAAC;IAED,iEAAiE;IACjE,YAAY;QACR,IAAI,CAAC,cAAc,CAA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;IACO,gBAAgB,GAAsB,EAAE,CAAC;IAEnD,mDAAmD;IAC1C,eAAe,GAAY,IAAI,CAAC;IAEzC,oDAAoD;IAC3C,gBAAgB,GAAY,IAAI,CAAC;IAE1C,sCAAsC;IACtC,KAAK,CAAC,KAAsB;QACxB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,+DAA+D;IAC/D,GAAG;QACC,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC;IAChC,CAAC;IAED,8EAA8E;IACpE,iBAAiB;QACvB,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IAChF,CAAC;IAED,qFAAqF;IAC3E,kBAAkB;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACO,YAAY;QAClB,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;IACrC,CAAC;CACJ","sourcesContent":["import { Graphics2D } from \"./graphics2d\";\nimport type { Clip } from \"./clip\";\nimport type { RenderIssue } from \"./render-issue\";\nimport type { TransformState } from \"./descriptors/transform\";\nimport type { FontStyle, TextStyle } from \"@/attributes/text/types\";\nimport type { Size2D } from \"@/attributes/layout/size\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport { TextState } from \"./descriptors/text\";\nimport { TextBlockLayout } from \"./text-layout\";\nimport { EMPTY_TEXT_STYLE, textOps } from \"@/attributes/text/ops\";\nimport { applyGraphicsTextDefaults } from \"./text-defaults\";\nimport type { NodeRenderState, RasterizedSurface, RenderContext2D, RenderPass2D, SpaceRects, EffectTarget } from \"./render-context2d\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\n\n/**\n * The base every {@link RenderContext2D} backend extends.\n *\n * It owns the parts of a render context that are the *same* whatever is being\n * rasterized — the text-default stack, the node scope stack, disposal — plus\n * the host-facing half of the surface (`execute`, `screenshot`, `unmount`),\n * which the {@link RenderContext2D} interface deliberately leaves out because a\n * node has no business driving a render pass from inside one.\n *\n * **`draw` is final by convention.** It resolves the ambient text defaults onto\n * the op list and hands the result to {@link drawGraphics}, which is where a\n * backend does its actual drawing. Owning that step here rather than in each\n * backend is what keeps the real renderer and the precomp asset walk agreeing\n * on which font an under-specified `text` op shapes with: a family that one\n * resolves and the other does not is a font that never loads and glyphs that\n * never paint.\n */\nexport abstract class CanvasRenderContext2D implements RenderPass2D {\n abstract measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): 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 * Defaults in effect for the current draw scope, innermost last. Each entry\n * is **already merged** onto the one below it (see {@link pushTextStyle}), so\n * the top of the stack is the effective style and reading it costs nothing.\n */\n private readonly textStyleStack: TextStyle[] = [];\n\n /** See {@link RenderContext2D.pushTextStyle}. */\n pushTextStyle(style: TextStyle | null): void {\n this.textStyleStack.push(style === null ? EMPTY_TEXT_STYLE : textOps.mergeStyle(this.defaultTextStyle, style));\n }\n\n /** Close the innermost scope opened by {@link pushTextStyle}. */\n popTextStyle(): void {\n this.textStyleStack.pop();\n }\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.\n *\n * Carries all ten {@link TEXT_STYLE_KEYS}, but only the shaping ones reach a\n * `Graphics2D` op; see `TEXT_SHAPING_KEYS` for why `fill`/`stroke`/`shadow`\n * stay a node-level concern.\n */\n get defaultTextStyle(): TextStyle {\n return this.textStyleStack[this.textStyleStack.length - 1] ?? textOps.preset(\"default\");\n }\n\n /** See {@link RenderContext2D.draw}. Final by convention — override {@link drawGraphics}. */\n draw(graphics: Graphics2D): void {\n this.drawGraphics(applyGraphicsTextDefaults(graphics, this.defaultTextStyle));\n }\n\n /** Paint a `Graphics2D` whose text ops have already been resolved against the\n * ambient defaults. Backends implement this instead of {@link draw}. */\n protected abstract drawGraphics(graphics: Graphics2D): void;\n\n /**\n * See {@link RenderContext2D.layoutTextBlock}. Concrete rather than abstract,\n * and `null` by default, so a backend that has no need to report glyph\n * positions is unaffected — the only thing it gives up is on-canvas text\n * editing in a host built on it.\n */\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null {\n return null;\n }\n\n /** Stack of node ids currently being drawn, innermost last. */\n protected currentNodeStack: string[] = [];\n\n /** Returns the id of the innermost node currently being drawn. */\n protected currentNodeId(): string {\n if (this.currentNodeStack.length === 0) {\n throw new Error(\"No current node in context\");\n }\n\n return this.currentNodeStack[this.currentNodeStack.length - 1];\n }\n\n /** Remove all renderer-side resources for the current node (called on unmount). */\n abstract unmount(): void;\n\n private _disposed = false;\n /** `true` after `dispose()` — the context must not be used after this point. */\n isDisposed(): boolean {\n return this._disposed;\n }\n dispose(): void {\n this._disposed = true;\n }\n\n /**\n * Execute `callback`, which issues shape/paint calls, and flush the result\n * to the underlying render target (canvas, SVG document, etc.). A callback\n * that throws still throws, and the next pass starts from a clean context.\n */\n abstract execute(callback: () => void): void;\n /**\n * What the frames since the last call drew without failing but not as the\n * document says (a blend mode the backend lacks, a shader that does not\n * compile, a lost GPU device), once per kind, feature and node. The\n * playback controller reports them as render errors; an export hands them\n * to its `onIssue`. A bare string is a `shader` issue.\n */\n takeRenderIssues(): Array<RenderIssue | string> {\n return [];\n }\n /** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */\n abstract screenshot(): string | undefined;\n\n abstract transform(state: Partial<TransformState>): RenderContext2D;\n\n abstract beginBoolean(op: BooleanOperation): void;\n abstract endBoolean(): void;\n\n abstract beginMask(options?: MaskOptions): void;\n abstract applyMask(): void;\n abstract endMask(): void;\n\n abstract beginClip(clip: Clip): void;\n abstract endClip(): void;\n\n /** See {@link RenderContext2D.beginEffects}. No-op by default. */\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void { }\n endEffects(): void { }\n\n /** See {@link RenderContext2D.rasterize}. Returns `null` by default. */\n rasterize(\n width: number,\n height: number,\n draw: () => void,\n pixelRatio?: number,\n ): RasterizedSurface | null {\n return null;\n }\n\n abstract beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\n abstract endCamera(): void;\n\n /**\n * Per-node render state for each node on the draw stack, in push order\n * (innermost last). Kept parallel to `currentNodeStack` so fills with\n * `space: 'parent'` can resolve their reference rect and so\n * motion-driven effects can read the current node's velocity.\n */\n protected renderStateStack: NodeRenderState[] = [];\n\n /** See {@link RenderContext2D.readsSpaceRects}. */\n readonly readsSpaceRects: boolean = true;\n\n /** See {@link RenderContext2D.drawsVisibleOnly}. */\n readonly drawsVisibleOnly: boolean = true;\n\n /** See {@link RenderPass2D.begin}. */\n begin(state: NodeRenderState): void {\n this.currentNodeStack.push(state.id);\n this.renderStateStack.push(state);\n }\n\n /** Close the innermost node draw scope opened by `begin()`. */\n end(): void {\n this.currentNodeStack.pop();\n this.renderStateStack.pop();\n }\n\n /** Reference rects for the node currently being drawn (parent / viewport). */\n protected currentSpaceRects(): SpaceRects {\n return this.renderStateStack[this.renderStateStack.length - 1]?.rects ?? {};\n }\n\n /** Full render state (incl. velocity) for the node currently being drawn, if any. */\n protected currentRenderState(): NodeRenderState | undefined {\n return this.renderStateStack[this.renderStateStack.length - 1];\n }\n\n /**\n * Close every node and text-style scope still open. A backend calls this\n * when a pass ends, so a pass that threw cannot leave the next one inside\n * its scopes.\n */\n protected _resetScopes(): void {\n this.textStyleStack.length = 0;\n this.currentNodeStack.length = 0;\n this.renderStateStack.length = 0;\n }\n}\n"]}
1
+ {"version":3,"file":"canvas-render-context2d.js","sourceRoot":"","sources":["../../src/render/canvas-render-context2d.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAI5D,ofAAof;AACpf,MAAM,OAAgB,qBAAqB;IAGvC,qEAAqE;IAErE,2KAA2K;IAC1J,cAAc,GAAgB,EAAE,CAAC;IAElD,aAAa,CAAC,KAAuB;QACjC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;IACnH,CAAC;IAED,YAAY;QACR,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC;IAC9B,CAAC;IAED,sOAAsO;IACtO,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5F,CAAC;IAED,6FAA6F;IAC7F,IAAI,CAAC,QAAoB;QACrB,IAAI,CAAC,YAAY,CAAC,yBAAyB,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAA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AC,GAAG,EAAE,CAAC;IAChC,CAAC;IAED,8EAA8E;IACpE,iBAAiB;QACvB,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IAChF,CAAC;IAED,qFAAqF;IAC3E,kBAAkB;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,0JAA0J;IAChJ,YAAY;QAClB,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;IACrC,CAAC;CACJ","sourcesContent":["import { Graphics2D } from \"./graphics2d\";\nimport type { Clip } from \"./clip\";\nimport type { RenderIssue } from \"./render-issue\";\nimport type { TransformState } from \"./descriptors/transform\";\nimport type { FontStyle, TextStyle } from \"@/attributes/text/types\";\nimport type { Size2D } from \"@/attributes/layout/size\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { MaskOptions } from \"@/attributes/mask/mask\";\nimport type { BooleanOperation } from \"@/attributes/mask/boolean\";\nimport { TextState } from \"./descriptors/text\";\nimport { TextBlockLayout } from \"./text-layout\";\nimport { EMPTY_TEXT_STYLE, textOps } from \"@/attributes/text/ops\";\nimport { applyGraphicsTextDefaults } from \"./text-defaults\";\nimport type { NodeRenderState, RasterizedSurface, RenderContext2D, RenderPass2D, SpaceRects, EffectTarget } from \"./render-context2d\";\nimport type { NodeEffect } from \"@/attributes/shape/effects/union\";\n\n/** The base every {@link RenderContext2D} backend extends. Owns what is the same whatever is rasterized (text-default stack, node scope stack, disposal) plus the host-facing half (`execute`, `screenshot`, `unmount`) the interface leaves out. **`draw` is final by convention**: it resolves ambient text defaults onto the op list and hands it to {@link drawGraphics}; owning that step here keeps the real renderer and the precomp asset walk agreeing on which font an under-specified `text` op uses. */\nexport abstract class CanvasRenderContext2D implements RenderPass2D {\n abstract measureText(text: string, fontSize: number, fontFamily: string, fontWeight?: number, letterSpacing?: number, fontStyle?: FontStyle): Size2D;\n\n // Inherited text-style defaults (see RenderContext2D.pushTextStyle).\n\n /** Defaults for the current draw scope, innermost last. Each entry is already merged onto the one below (see {@link pushTextStyle}), so the top is the effective style. */\n private readonly textStyleStack: TextStyle[] = [];\n\n pushTextStyle(style: TextStyle | null): void {\n this.textStyleStack.push(style === null ? EMPTY_TEXT_STYLE : textOps.mergeStyle(this.defaultTextStyle, style));\n }\n\n popTextStyle(): void {\n this.textStyleStack.pop();\n }\n\n /** The defaults in effect: innermost {@link pushTextStyle} scope, else the project's `theme.typography.default`. Carries all ten {@link TEXT_STYLE_KEYS}, but only shaping ones reach a `Graphics2D` op (see `TEXT_SHAPING_KEYS`). */\n get defaultTextStyle(): TextStyle {\n return this.textStyleStack[this.textStyleStack.length - 1] ?? textOps.preset(\"default\");\n }\n\n /** See {@link RenderContext2D.draw}. Final by convention — override {@link drawGraphics}. */\n draw(graphics: Graphics2D): void {\n this.drawGraphics(applyGraphicsTextDefaults(graphics, this.defaultTextStyle));\n }\n\n /** Paint a `Graphics2D` whose text ops have already been resolved against the\n * ambient defaults. Backends implement this instead of {@link draw}. */\n protected abstract drawGraphics(graphics: Graphics2D): void;\n\n /** `null` by default, so a backend that never reports glyph positions only gives up on-canvas text editing. See {@link RenderContext2D.layoutTextBlock}. */\n layoutTextBlock(state: Partial<TextState>): TextBlockLayout | null {\n return null;\n }\n\n protected currentNodeStack: string[] = [];\n\n protected currentNodeId(): string {\n if (this.currentNodeStack.length === 0) {\n throw new Error(\"No current node in context\");\n }\n\n return this.currentNodeStack[this.currentNodeStack.length - 1];\n }\n\n /** Remove all renderer-side resources for the current node (called on unmount). */\n abstract unmount(): void;\n\n private _disposed = false;\n /** `true` after `dispose()` — the context must not be used after this point. */\n isDisposed(): boolean {\n return this._disposed;\n }\n dispose(): void {\n this._disposed = true;\n }\n\n /** Runs `callback`, which issues shape/paint calls, then flushes to the render target. A throwing callback still throws, and the next pass starts clean. */\n abstract execute(callback: () => void): void;\n /** What the frames since the last call drew without failing but not as the document says (a missing blend mode, a shader that doesn't compile, a lost GPU device), once per kind, feature and node; a bare string is a `shader` issue. Playback reports them as render errors, export hands them to `onIssue`. */\n takeRenderIssues(): Array<RenderIssue | string> {\n return [];\n }\n /** Capture the current frame as a base-64 PNG data URL, or `undefined` if unsupported. */\n abstract screenshot(): string | undefined;\n\n abstract transform(state: Partial<TransformState>): RenderContext2D;\n\n abstract beginBoolean(op: BooleanOperation): void;\n abstract endBoolean(): void;\n\n abstract beginMask(options?: MaskOptions): void;\n abstract applyMask(): void;\n abstract endMask(): void;\n\n abstract beginClip(clip: Clip): void;\n abstract endClip(): void;\n\n /** See {@link RenderContext2D.beginEffects}. No-op by default. */\n beginEffects(effects: NodeEffect[], target: EffectTarget, width: number, height: number): void { }\n endEffects(): void { }\n\n /** See {@link RenderContext2D.rasterize}. Returns `null` by default. */\n rasterize(\n width: number,\n height: number,\n draw: () => void,\n pixelRatio?: number,\n ): RasterizedSurface | null {\n return null;\n }\n\n abstract beginCamera(viewport: { x: number; y: number; width: number; height: number }, lookAt: Vector2, zoom: number, heading: number): void;\n abstract endCamera(): void;\n\n /** Render state per node on the draw stack, parallel to `currentNodeStack`, so `space: 'parent'` fills can resolve their reference rect and motion effects read the node's velocity. */\n protected renderStateStack: NodeRenderState[] = [];\n\n readonly readsSpaceRects: boolean = true;\n\n readonly drawsVisibleOnly: boolean = true;\n\n begin(state: NodeRenderState): void {\n this.currentNodeStack.push(state.id);\n this.renderStateStack.push(state);\n }\n\n end(): void {\n this.currentNodeStack.pop();\n this.renderStateStack.pop();\n }\n\n /** Reference rects for the node currently being drawn (parent / viewport). */\n protected currentSpaceRects(): SpaceRects {\n return this.renderStateStack[this.renderStateStack.length - 1]?.rects ?? {};\n }\n\n /** Full render state (incl. velocity) for the node currently being drawn, if any. */\n protected currentRenderState(): NodeRenderState | undefined {\n return this.renderStateStack[this.renderStateStack.length - 1];\n }\n\n /** Closes every node and text-style scope still open; a backend calls it when a pass ends so a pass that threw can't leave the next inside its scopes. */\n protected _resetScopes(): void {\n this.textStyleStack.length = 0;\n this.currentNodeStack.length = 0;\n this.renderStateStack.length = 0;\n }\n}\n"]}
@@ -1,23 +1,9 @@
1
1
  import { Vector2 } from "../attributes/layout/vector2.js";
2
2
  import { Clip, ClipOp } from "./clip.js";
3
- /**
4
- * Whether `point` falls inside the region a {@link Clip} describes, within
5
- * `tolerance` scene units of its edge.
6
- *
7
- * Shape ops union; a `cut` subtracts the immediately preceding shape from
8
- * everything declared before it, mirroring how the renderer replays the op list.
9
- * `tolerance` widens each shape outward — including a cutter, which therefore
10
- * takes a slightly larger bite, keeping the test forgiving in both directions
11
- * rather than making a hole's rim unpickable.
12
- */
3
+ /** Whether `point` is inside the region a {@link Clip} describes, within `tolerance` scene units of its edge. Shape ops union; a `cut` subtracts the preceding shape from everything before it, as the renderer replays. `tolerance` widens each shape outward, a cutter included (a slightly larger bite), keeping the test forgiving rather than making a hole's rim unpickable. */
13
4
  export declare function containsClip(clip: Clip, point: Vector2, tolerance?: number): boolean;
14
- /** {@link containsClip} over a raw op list. */
15
5
  export declare function containsOps(ops: readonly ClipOp[], point: Vector2, tolerance?: number): boolean;
16
- /**
17
- * Vertices of a regular polygon inscribed in `width`×`height`, y-up author
18
- * space. The renderer starts at the top vertex and steps clockwise in canvas
19
- * space; in y-up that is `+π/2` stepping negative.
20
- */
6
+ /** Vertices of a regular polygon inscribed in `width` x `height`, y-up. The renderer starts at the top vertex and steps clockwise in canvas space; in y-up that is `+π/2` stepping negative. */
21
7
  export declare function polygonVertices(width: number, height: number, sides: number): Vector2[];
22
8
  /** Vertices of a star polygon: outer radius 1 alternating with inner radius `ratio`. */
23
9
  export declare function polygramVertices(width: number, height: number, sides: number, ratio: number): Vector2[];
@@ -1 +1 @@
1
- {"version":3,"file":"clip-contains.d.ts","sourceRoot":"","sources":["../../src/render/clip-contains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AA2BnD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,SAAI,GAAG,OAAO,CAE/E;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,SAAI,GAAG,OAAO,CAwB1F;AAsLD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAWvF;AAED,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAavG;AAYD,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAW7E;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAQ7G;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAQ5E"}
1
+ {"version":3,"file":"clip-contains.d.ts","sourceRoot":"","sources":["../../src/render/clip-contains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAkBnD,sXAAsX;AACtX,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,SAAI,GAAG,OAAO,CAE/E;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,SAAI,GAAG,OAAO,CAsB1F;AAmJD,gMAAgM;AAChM,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAWvF;AAED,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAavG;AAQD,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAW7E;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAQ7G;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAQ5E"}
@@ -5,40 +5,20 @@ import { withPolygramDescriptor } from "./descriptors/polygram.js";
5
5
  import { withLineDescriptor } from "./descriptors/line.js";
6
6
  import { cornerRadiusOps } from "../attributes/shape/corners/corner-radius.js";
7
7
  /**
8
- * Point-in-region tests for {@link Clip}, used by node hit testing so a click
9
- * follows a shape's silhouette rather than its bounding box.
10
- *
11
- * Geometry only — no renderer — because a `Clip` is a declarative
12
- * record of primitives rather than a built path. That is what lets hit testing
13
- * live in `core` and share one outline definition with clipping and backdrop
14
- * effects: a shape declares its outline once, in `clipSelf()`, and both the
15
- * pixels and the grab region derive from it.
16
- *
17
- * Every point and every descriptor coordinate here is in **y-up author space**
18
- * (the space `Graphics2D`/`Clip` descriptors are written in; the renderer flips to
19
- * canvas y-down at draw time — see `flipPositionY`). Angles follow from that:
8
+ * Point-in-region tests for {@link Clip}, so a click follows a shape's silhouette rather than its bounding box.
9
+ * Geometry only, since a `Clip` is a declarative record of primitives rather than a built path: a shape declares its
10
+ * outline once in `clipSelf()` and both the pixels and the grab region derive from it. Points and descriptor
11
+ * coordinates are **y-up author space** (the renderer flips at draw time, see `flipPositionY`), so
20
12
  * `startAngle`/`sweep` measure counter-clockwise from +x.
21
13
  */
22
- /** Guard against divide-by-zero on collapsed geometry. */
23
14
  const EPS = 1e-9;
24
- /**
25
- * Whether `point` falls inside the region a {@link Clip} describes, within
26
- * `tolerance` scene units of its edge.
27
- *
28
- * Shape ops union; a `cut` subtracts the immediately preceding shape from
29
- * everything declared before it, mirroring how the renderer replays the op list.
30
- * `tolerance` widens each shape outward — including a cutter, which therefore
31
- * takes a slightly larger bite, keeping the test forgiving in both directions
32
- * rather than making a hole's rim unpickable.
33
- */
15
+ /** Whether `point` is inside the region a {@link Clip} describes, within `tolerance` scene units of its edge. Shape ops union; a `cut` subtracts the preceding shape from everything before it, as the renderer replays. `tolerance` widens each shape outward, a cutter included (a slightly larger bite), keeping the test forgiving rather than making a hole's rim unpickable. */
34
16
  export function containsClip(clip, point, tolerance = 0) {
35
17
  return containsOps(clip.ops(), point, tolerance);
36
18
  }
37
- /** {@link containsClip} over a raw op list. */
38
19
  export function containsOps(ops, point, tolerance = 0) {
39
20
  let inside = false;
40
- // The shape immediately preceding the current position, held back so a
41
- // following `cut` can subtract it instead of unioning it.
21
+ // Held back so a following `cut` can subtract it instead of unioning it.
42
22
  let pending = null;
43
23
  const flush = () => {
44
24
  if (pending && containsShape(pending, point, tolerance))
@@ -47,8 +27,7 @@ export function containsOps(ops, point, tolerance = 0) {
47
27
  };
48
28
  for (const op of ops) {
49
29
  if (op.kind === "cut") {
50
- // The pending shape is the cutter: it never joins the union, and it
51
- // punches whatever was accumulated before it.
30
+ // The pending shape is the cutter: it never joins the union and punches what came before.
52
31
  if (pending && containsShape(pending, point, tolerance))
53
32
  inside = false;
54
33
  pending = null;
@@ -60,11 +39,7 @@ export function containsOps(ops, point, tolerance = 0) {
60
39
  flush();
61
40
  return inside;
62
41
  }
63
- /**
64
- * Dispatch one shape op to its own containment test, after undoing the shape's
65
- * local rotation/scale about its pivot — mirroring `BaseShape.applyShapeTransform`,
66
- * which bakes that same transform into the drawn path.
67
- */
42
+ /** Dispatches a shape op to its containment test after undoing its local rotation/scale about its pivot, mirroring `BaseShape.applyShapeTransform`. */
68
43
  function containsShape(op, point, tolerance) {
69
44
  switch (op.kind) {
70
45
  case "rect": {
@@ -92,37 +67,27 @@ function containsShape(op, point, tolerance) {
92
67
  const p = toShapeLocal(point, s, s.width, s.height);
93
68
  if (p === null || s.points.length === 0)
94
69
  return false;
95
- // As a clip region a polyline is filled with its contour implicitly
96
- // closed, whether or not `closed` was set — so test the enclosed area
97
- // first, then fall back to the band around the stroke itself.
70
+ // As a clip region a polyline is filled with its contour implicitly closed, so test the enclosed area first, then the band around the stroke.
98
71
  if (s.points.length >= 3 && containsPolyline(p, s.points, true, tolerance))
99
72
  return true;
100
73
  return nearPolyline(p, s.points, s.closed, tolerance);
101
74
  }
102
75
  case "path": {
103
- // An arbitrary Bézier winding test is not worth carrying, and no
104
- // built-in shape emits a `path` clip — only a hand-built `Clip` can.
105
- // Fall back to the declared box.
76
+ // A Bézier winding test isn't worth carrying and no built-in shape emits a `path` clip, only a hand-built `Clip`; fall back to the declared box.
106
77
  const s = op.state;
107
78
  const local = { x: point.x - (s.x ?? 0), y: point.y - (s.y ?? 0) };
108
79
  return containsRect(local, s.width ?? 0, s.height ?? 0, cornerRadiusOps.resolve(0), tolerance);
109
80
  }
110
81
  }
111
82
  }
112
- /**
113
- * Map `point` out of the shape's own `x`/`y`/`rotation`/`scale` (about its
114
- * pivot) and into the shape's un-transformed, centred frame. Returns `null` when
115
- * the scale is zero — the shape has collapsed and encloses nothing.
116
- */
83
+ /** Maps `point` out of the shape's `x`/`y`/`rotation`/`scale` (about its pivot) into its un-transformed, centred frame; `null` when scale is zero (collapsed, encloses nothing). */
117
84
  function toShapeLocal(point, s, width, height) {
118
85
  if (s.scale === 0)
119
86
  return null;
120
87
  const pivot = s.pivot;
121
- // Pivot is normalised [-1, 1] about the shape centre, y-up here (the
122
- // renderer negates its y because it works in canvas space).
88
+ // Pivot is normalised [-1, 1] about the centre, y-up here (the renderer negates y in canvas space).
123
89
  const px = pivot.x * (width / 2);
124
90
  const py = pivot.y * (height / 2);
125
- // Relative to the pivot, in the parent's (unrotated) frame.
126
91
  const dx = point.x - (s.x + px);
127
92
  const dy = point.y - (s.y + py);
128
93
  // Undo the clockwise rotation: in y-up space the forward map is
@@ -132,31 +97,22 @@ function toShapeLocal(point, s, width, height) {
132
97
  const sin = Math.sin(rad);
133
98
  const rx = (cos * dx - sin * dy) / s.scale;
134
99
  const ry = (sin * dx + cos * dy) / s.scale;
135
- // Back to centre-relative: the pivot sits (px, py) from the centre.
136
100
  return { x: rx + px, y: ry + py };
137
101
  }
138
- /**
139
- * Axis-aligned box centred on the origin, with per-corner rounding. A corner is
140
- * only excluded when the point sits beyond that corner's quarter-circle, so a
141
- * plain rect (all radii 0) reduces to the box test exactly. `cornerStyle` is not
142
- * consulted: an `'angled'` chamfer cuts strictly inside the arc, so testing the
143
- * arc over-estimates by a sliver — the forgiving direction for a grab test.
144
- */
102
+ /** Box centred on the origin with per-corner rounding; a corner excludes the point only beyond its quarter-circle, so a plain rect reduces to the box test. `cornerStyle` is ignored: an `'angled'` chamfer cuts inside the arc, so the arc over-estimates by a sliver, the forgiving direction for a grab. */
145
103
  function containsRect(p, width, height, radius, tolerance) {
146
104
  const halfW = width / 2 + tolerance;
147
105
  const halfH = height / 2 + tolerance;
148
106
  if (Math.abs(p.x) > halfW || Math.abs(p.y) > halfH)
149
107
  return false;
150
- // Pick the corner the point is nearest and test its arc. Radii are clamped
151
- // the way any rounded-rect rasteriser clamps them: never past half the side.
108
+ // Test the nearest corner's arc; radii clamp to half the side as any rounded-rect rasteriser clamps them.
152
109
  const maxR = Math.min(width, height) / 2;
153
110
  const r = Math.min(maxR, p.x <= 0
154
111
  ? (p.y >= 0 ? radius.topLeft : radius.bottomLeft)
155
112
  : (p.y >= 0 ? radius.topRight : radius.bottomRight));
156
113
  if (r <= 0)
157
114
  return true;
158
- // Centre of that corner's arc, then the usual "outside the quarter-circle"
159
- // check — which only bites inside the corner square itself.
115
+ // Centre of that corner's arc, then the "outside the quarter-circle" check, which only bites inside the corner square.
160
116
  const sx = Math.sign(p.x || 1);
161
117
  const sy = Math.sign(p.y || 1);
162
118
  const dx = p.x - sx * (width / 2 - r);
@@ -166,14 +122,9 @@ function containsRect(p, width, height, radius, tolerance) {
166
122
  return dx * dx + dy * dy <= (r + tolerance) * (r + tolerance);
167
123
  }
168
124
  /**
169
- * Ellipse, honouring the same `ratio`/`sweep`/`startAngle` family the renderer
170
- * draws (see `EllipseShape.buildSVGPath`), so the grab region is the region that
171
- * was actually painted:
172
- *
173
- * - `ratio` ≤ 0 → solid disk, or a wedge for a partial sweep
174
- * - 0 < `ratio` < 1 → annulus / annular sector (the hole is not hittable)
175
- * - `ratio` ≥ 1 → the band has collapsed to the bare outer curve, so only
176
- * points near that curve hit
125
+ * Ellipse with the `ratio`/`sweep`/`startAngle` family the renderer draws (see `EllipseShape.buildSVGPath`), so the
126
+ * grab region is what was painted: `ratio` <= 0 is a disk (or wedge for a partial sweep); 0 < `ratio` < 1 an annulus /
127
+ * annular sector (the hole is not hittable); `ratio` >= 1 collapses to the bare outer curve, hit only near it.
177
128
  */
178
129
  function containsEllipse(p, width, height, ratio, sweep, startAngle, tolerance) {
179
130
  const rx = width / 2;
@@ -198,11 +149,7 @@ function containsEllipse(p, width, height, ratio, sweep, startAngle, tolerance)
198
149
  function norm(p, rx, ry) {
199
150
  return Math.hypot(p.x / rx, p.y / ry);
200
151
  }
201
- /**
202
- * Whether `angleDeg` lies within the arc `[startAngle, startAngle + sweep]`,
203
- * with `tolerance` converted to angular slack at the point's own radius so
204
- * grab-slop widens the wedge's straight edges too. Handles negative sweeps.
205
- */
152
+ /** Whether `angleDeg` is in the arc `[startAngle, startAngle + sweep]` (negative sweeps handled), with `tolerance` converted to angular slack at the point's radius so grab-slop widens the wedge's straight edges too. */
206
153
  function withinSweep(angleDeg, startAngle, sweep, p, tolerance) {
207
154
  const lo = sweep >= 0 ? startAngle : startAngle + sweep;
208
155
  const span = Math.abs(sweep);
@@ -217,11 +164,7 @@ function withinSweep(angleDeg, startAngle, sweep, p, tolerance) {
217
164
  // Accept the wrap-around side within slack as well.
218
165
  return delta <= span + slack || delta >= 360 - slack;
219
166
  }
220
- /**
221
- * Vertices of a regular polygon inscribed in `width`×`height`, y-up author
222
- * space. The renderer starts at the top vertex and steps clockwise in canvas
223
- * space; in y-up that is `+π/2` stepping negative.
224
- */
167
+ /** Vertices of a regular polygon inscribed in `width` x `height`, y-up. The renderer starts at the top vertex and steps clockwise in canvas space; in y-up that is `+π/2` stepping negative. */
225
168
  export function polygonVertices(width, height, sides) {
226
169
  const n = Math.max(3, Math.round(sides));
227
170
  const rx = width / 2;
@@ -249,11 +192,7 @@ export function polygramVertices(width, height, sides, ratio) {
249
192
  }
250
193
  return out;
251
194
  }
252
- /**
253
- * Even-odd crossing test against a polygon, widened by `tolerance`: a point just
254
- * outside an edge still counts. `closed` also closes the last→first segment for
255
- * the tolerance band.
256
- */
195
+ /** Even-odd crossing test against a polygon, widened by `tolerance` (a point just outside an edge counts). `closed` also closes the last-to-first segment for the tolerance band. */
257
196
  function containsPolyline(p, verts, closed, tolerance) {
258
197
  if (verts.length >= 3 && pointInPolygon(p, verts))
259
198
  return true;