@motionscript/core 0.1.0 → 0.1.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1062) hide show
  1. package/CHANGELOG.md +10 -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-3ZIUZZC7.js +13 -0
  446. package/dist/browser/chunks/chunk-3ZIUZZC7.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-7YOYMMXK.js +6 -0
  450. package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
  451. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  452. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/views.d.ts.map +1 -1
  510. package/dist/components/factory/views.js +0 -2
  511. package/dist/components/factory/views.js.map +1 -1
  512. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  513. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  514. package/dist/components/trees/2d/group-bounds.js +3 -22
  515. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  516. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  517. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  518. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  519. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  520. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  521. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  522. package/dist/components/trees/2d/node-motion.js +3 -31
  523. package/dist/components/trees/2d/node-motion.js.map +1 -1
  524. package/dist/components/trees/2d/node-render.d.ts +3 -20
  525. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-render.js +4 -23
  527. package/dist/components/trees/2d/node-render.js.map +1 -1
  528. package/dist/components/trees/2d/node-space.d.ts +4 -23
  529. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-space.js +3 -17
  531. package/dist/components/trees/2d/node-space.js.map +1 -1
  532. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  533. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-transform.js +4 -33
  535. package/dist/components/trees/2d/node-transform.js.map +1 -1
  536. package/dist/components/trees/2d/node2d.d.ts +112 -622
  537. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node2d.js +131 -605
  539. package/dist/components/trees/2d/node2d.js.map +1 -1
  540. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  541. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  542. package/dist/components/trees/audio/node-audio.js +18 -68
  543. package/dist/components/trees/audio/node-audio.js.map +1 -1
  544. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  545. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  546. package/dist/components/trees/node/node-editor-state.js +1 -13
  547. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  548. package/dist/components/trees/node/node-reactive.d.ts +6 -53
  549. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  550. package/dist/components/trees/node/node-reactive.js +4 -33
  551. package/dist/components/trees/node/node-reactive.js.map +1 -1
  552. package/dist/components/trees/node/node-time.d.ts +2 -15
  553. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-time.js.map +1 -1
  555. package/dist/components/trees/node/node-walk.d.ts +7 -32
  556. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  557. package/dist/components/trees/node/node-walk.js +7 -32
  558. package/dist/components/trees/node/node-walk.js.map +1 -1
  559. package/dist/components/trees/node/node.d.ts +43 -248
  560. package/dist/components/trees/node/node.d.ts.map +1 -1
  561. package/dist/components/trees/node/node.js +51 -229
  562. package/dist/components/trees/node/node.js.map +1 -1
  563. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  564. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  565. package/dist/components/trees/root/canvas2d-node.js +7 -47
  566. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  567. package/dist/components/trees/three/node3d.d.ts +24 -112
  568. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  569. package/dist/components/trees/three/node3d.js +22 -104
  570. package/dist/components/trees/three/node3d.js.map +1 -1
  571. package/dist/document/audio.d.ts +9 -21
  572. package/dist/document/audio.d.ts.map +1 -1
  573. package/dist/document/audio.js +13 -28
  574. package/dist/document/audio.js.map +1 -1
  575. package/dist/document/builtins.d.ts +3 -9
  576. package/dist/document/builtins.d.ts.map +1 -1
  577. package/dist/document/builtins.js +43 -89
  578. package/dist/document/builtins.js.map +1 -1
  579. package/dist/document/command-traits.d.ts +14 -37
  580. package/dist/document/command-traits.d.ts.map +1 -1
  581. package/dist/document/command-traits.js +22 -39
  582. package/dist/document/command-traits.js.map +1 -1
  583. package/dist/document/deny-globals.d.ts +9 -43
  584. package/dist/document/deny-globals.d.ts.map +1 -1
  585. package/dist/document/deny-globals.js +18 -58
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/diff.d.ts +6 -16
  588. package/dist/document/diff.d.ts.map +1 -1
  589. package/dist/document/diff.js +5 -11
  590. package/dist/document/diff.js.map +1 -1
  591. package/dist/document/doc-index.d.ts +5 -13
  592. package/dist/document/doc-index.d.ts.map +1 -1
  593. package/dist/document/doc-index.js +0 -2
  594. package/dist/document/doc-index.js.map +1 -1
  595. package/dist/document/expression/compile.d.ts +2 -2
  596. package/dist/document/expression/compile.d.ts.map +1 -1
  597. package/dist/document/expression/compile.js +8 -18
  598. package/dist/document/expression/compile.js.map +1 -1
  599. package/dist/document/expression/index.d.ts +11 -41
  600. package/dist/document/expression/index.d.ts.map +1 -1
  601. package/dist/document/expression/index.js +11 -41
  602. package/dist/document/expression/index.js.map +1 -1
  603. package/dist/document/expression/ops.d.ts +3 -12
  604. package/dist/document/expression/ops.d.ts.map +1 -1
  605. package/dist/document/expression/ops.js +4 -20
  606. package/dist/document/expression/ops.js.map +1 -1
  607. package/dist/document/expression/parse.d.ts +4 -14
  608. package/dist/document/expression/parse.d.ts.map +1 -1
  609. package/dist/document/expression/parse.js +34 -55
  610. package/dist/document/expression/parse.js.map +1 -1
  611. package/dist/document/expression/refs.d.ts +2 -8
  612. package/dist/document/expression/refs.d.ts.map +1 -1
  613. package/dist/document/expression/refs.js +2 -6
  614. package/dist/document/expression/refs.js.map +1 -1
  615. package/dist/document/expression/types.d.ts +18 -63
  616. package/dist/document/expression/types.d.ts.map +1 -1
  617. package/dist/document/expression/types.js +4 -15
  618. package/dist/document/expression/types.js.map +1 -1
  619. package/dist/document/expression/walk.d.ts +6 -20
  620. package/dist/document/expression/walk.d.ts.map +1 -1
  621. package/dist/document/expression/walk.js +18 -44
  622. package/dist/document/expression/walk.js.map +1 -1
  623. package/dist/document/index.js +2 -3
  624. package/dist/document/index.js.map +1 -1
  625. package/dist/document/migrate.d.ts +7 -22
  626. package/dist/document/migrate.d.ts.map +1 -1
  627. package/dist/document/migrate.js +44 -15
  628. package/dist/document/migrate.js.map +1 -1
  629. package/dist/document/missing-node.d.ts +4 -11
  630. package/dist/document/missing-node.d.ts.map +1 -1
  631. package/dist/document/missing-node.js +2 -5
  632. package/dist/document/missing-node.js.map +1 -1
  633. package/dist/document/node-decorator.d.ts +12 -53
  634. package/dist/document/node-decorator.d.ts.map +1 -1
  635. package/dist/document/node-decorator.js +16 -57
  636. package/dist/document/node-decorator.js.map +1 -1
  637. package/dist/document/node-descriptor.d.ts +25 -62
  638. package/dist/document/node-descriptor.d.ts.map +1 -1
  639. package/dist/document/node-descriptor.js.map +1 -1
  640. package/dist/document/placement.d.ts +18 -41
  641. package/dist/document/placement.d.ts.map +1 -1
  642. package/dist/document/placement.js +4 -11
  643. package/dist/document/placement.js.map +1 -1
  644. package/dist/document/project.d.ts +19 -52
  645. package/dist/document/project.d.ts.map +1 -1
  646. package/dist/document/project.js +2 -6
  647. package/dist/document/project.js.map +1 -1
  648. package/dist/document/prop-evolution.d.ts +10 -20
  649. package/dist/document/prop-evolution.d.ts.map +1 -1
  650. package/dist/document/prop-evolution.js +3 -7
  651. package/dist/document/prop-evolution.js.map +1 -1
  652. package/dist/document/registry.d.ts +80 -318
  653. package/dist/document/registry.d.ts.map +1 -1
  654. package/dist/document/registry.js +43 -147
  655. package/dist/document/registry.js.map +1 -1
  656. package/dist/document/settled-index.d.ts +11 -23
  657. package/dist/document/settled-index.d.ts.map +1 -1
  658. package/dist/document/settled-index.js +15 -34
  659. package/dist/document/settled-index.js.map +1 -1
  660. package/dist/document/timeline-patch.d.ts +6 -15
  661. package/dist/document/timeline-patch.d.ts.map +1 -1
  662. package/dist/document/timeline-patch.js +12 -21
  663. package/dist/document/timeline-patch.js.map +1 -1
  664. package/dist/document/timeline.d.ts +56 -263
  665. package/dist/document/timeline.d.ts.map +1 -1
  666. package/dist/document/timeline.js +71 -275
  667. package/dist/document/timeline.js.map +1 -1
  668. package/dist/document/types.d.ts +90 -264
  669. package/dist/document/types.d.ts.map +1 -1
  670. package/dist/document/types.js +13 -30
  671. package/dist/document/types.js.map +1 -1
  672. package/dist/document/validate.d.ts +10 -40
  673. package/dist/document/validate.d.ts.map +1 -1
  674. package/dist/document/validate.js +72 -137
  675. package/dist/document/validate.js.map +1 -1
  676. package/dist/document/vocabulary.d.ts +4 -7
  677. package/dist/document/vocabulary.d.ts.map +1 -1
  678. package/dist/document/vocabulary.js +0 -1
  679. package/dist/document/vocabulary.js.map +1 -1
  680. package/dist/index.d.ts +0 -1
  681. package/dist/index.d.ts.map +1 -1
  682. package/dist/index.js +0 -1
  683. package/dist/index.js.map +1 -1
  684. package/dist/layout/bounds.d.ts +1 -11
  685. package/dist/layout/bounds.d.ts.map +1 -1
  686. package/dist/layout/bounds.js.map +1 -1
  687. package/dist/layout/flex.d.ts +6 -20
  688. package/dist/layout/flex.d.ts.map +1 -1
  689. package/dist/layout/flex.js +7 -28
  690. package/dist/layout/flex.js.map +1 -1
  691. package/dist/layout/ops.d.ts +2 -11
  692. package/dist/layout/ops.d.ts.map +1 -1
  693. package/dist/layout/ops.js +2 -22
  694. package/dist/layout/ops.js.map +1 -1
  695. package/dist/layout/types.d.ts +11 -55
  696. package/dist/layout/types.d.ts.map +1 -1
  697. package/dist/layout/types.js.map +1 -1
  698. package/dist/platform/audio-sink.d.ts +7 -43
  699. package/dist/platform/audio-sink.d.ts.map +1 -1
  700. package/dist/platform/audio-sink.js +4 -29
  701. package/dist/platform/audio-sink.js.map +1 -1
  702. package/dist/platform/exporter.d.ts +5 -31
  703. package/dist/platform/exporter.d.ts.map +1 -1
  704. package/dist/platform/exporter.js.map +1 -1
  705. package/dist/platform/stepped-clock.d.ts +1 -16
  706. package/dist/platform/stepped-clock.d.ts.map +1 -1
  707. package/dist/platform/stepped-clock.js +1 -16
  708. package/dist/platform/stepped-clock.js.map +1 -1
  709. package/dist/platform/storage-adapter.d.ts +8 -68
  710. package/dist/platform/storage-adapter.d.ts.map +1 -1
  711. package/dist/platform/storage-adapter.js +8 -60
  712. package/dist/platform/storage-adapter.js.map +1 -1
  713. package/dist/platform/ticker.d.ts +11 -45
  714. package/dist/platform/ticker.d.ts.map +1 -1
  715. package/dist/platform/ticker.js +10 -37
  716. package/dist/platform/ticker.js.map +1 -1
  717. package/dist/project/config.d.ts +4 -14
  718. package/dist/project/config.d.ts.map +1 -1
  719. package/dist/project/config.js.map +1 -1
  720. package/dist/project/tree.d.ts +6 -35
  721. package/dist/project/tree.d.ts.map +1 -1
  722. package/dist/project/tree.js +1 -8
  723. package/dist/project/tree.js.map +1 -1
  724. package/dist/props/host.d.ts +2 -13
  725. package/dist/props/host.d.ts.map +1 -1
  726. package/dist/props/host.js.map +1 -1
  727. package/dist/props/layout.d.ts +1 -12
  728. package/dist/props/layout.d.ts.map +1 -1
  729. package/dist/props/layout.js +1 -12
  730. package/dist/props/layout.js.map +1 -1
  731. package/dist/props/observer.d.ts +1 -7
  732. package/dist/props/observer.d.ts.map +1 -1
  733. package/dist/props/observer.js.map +1 -1
  734. package/dist/props/slot.d.ts +6 -19
  735. package/dist/props/slot.d.ts.map +1 -1
  736. package/dist/props/slot.js +5 -14
  737. package/dist/props/slot.js.map +1 -1
  738. package/dist/render/canvas-render-context2d.d.ts +8 -68
  739. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  740. package/dist/render/canvas-render-context2d.js +8 -69
  741. package/dist/render/canvas-render-context2d.js.map +1 -1
  742. package/dist/render/clip-contains.d.ts +2 -16
  743. package/dist/render/clip-contains.d.ts.map +1 -1
  744. package/dist/render/clip-contains.js +21 -82
  745. package/dist/render/clip-contains.js.map +1 -1
  746. package/dist/render/clip.d.ts +7 -25
  747. package/dist/render/clip.d.ts.map +1 -1
  748. package/dist/render/clip.js +5 -17
  749. package/dist/render/clip.js.map +1 -1
  750. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  751. package/dist/render/descriptors/ellipse.js +0 -1
  752. package/dist/render/descriptors/ellipse.js.map +1 -1
  753. package/dist/render/descriptors/line.d.ts.map +1 -1
  754. package/dist/render/descriptors/line.js +0 -1
  755. package/dist/render/descriptors/line.js.map +1 -1
  756. package/dist/render/descriptors/path-builder.d.ts +4 -32
  757. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  758. package/dist/render/descriptors/path-builder.js +3 -25
  759. package/dist/render/descriptors/path-builder.js.map +1 -1
  760. package/dist/render/descriptors/path.d.ts +1 -11
  761. package/dist/render/descriptors/path.d.ts.map +1 -1
  762. package/dist/render/descriptors/path.js +0 -1
  763. package/dist/render/descriptors/path.js.map +1 -1
  764. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  765. package/dist/render/descriptors/polygon.js +0 -1
  766. package/dist/render/descriptors/polygon.js.map +1 -1
  767. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  768. package/dist/render/descriptors/polygram.js +0 -1
  769. package/dist/render/descriptors/polygram.js.map +1 -1
  770. package/dist/render/descriptors/rect.d.ts.map +1 -1
  771. package/dist/render/descriptors/rect.js +0 -1
  772. package/dist/render/descriptors/rect.js.map +1 -1
  773. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  774. package/dist/render/descriptors/richtext.js +0 -1
  775. package/dist/render/descriptors/richtext.js.map +1 -1
  776. package/dist/render/descriptors/shape.d.ts +17 -77
  777. package/dist/render/descriptors/shape.d.ts.map +1 -1
  778. package/dist/render/descriptors/shape.js +13 -47
  779. package/dist/render/descriptors/shape.js.map +1 -1
  780. package/dist/render/descriptors/text.d.ts +15 -94
  781. package/dist/render/descriptors/text.d.ts.map +1 -1
  782. package/dist/render/descriptors/text.js +8 -50
  783. package/dist/render/descriptors/text.js.map +1 -1
  784. package/dist/render/descriptors/transform.d.ts +5 -16
  785. package/dist/render/descriptors/transform.d.ts.map +1 -1
  786. package/dist/render/descriptors/transform.js +1 -17
  787. package/dist/render/descriptors/transform.js.map +1 -1
  788. package/dist/render/graphics2d.d.ts +24 -116
  789. package/dist/render/graphics2d.d.ts.map +1 -1
  790. package/dist/render/graphics2d.js +23 -108
  791. package/dist/render/graphics2d.js.map +1 -1
  792. package/dist/render/measure-context.d.ts +5 -29
  793. package/dist/render/measure-context.d.ts.map +1 -1
  794. package/dist/render/measure-context.js.map +1 -1
  795. package/dist/render/null-render-context.d.ts +2 -20
  796. package/dist/render/null-render-context.d.ts.map +1 -1
  797. package/dist/render/null-render-context.js +2 -20
  798. package/dist/render/null-render-context.js.map +1 -1
  799. package/dist/render/render-context2d.d.ts +52 -208
  800. package/dist/render/render-context2d.d.ts.map +1 -1
  801. package/dist/render/render-context2d.js.map +1 -1
  802. package/dist/render/surface.d.ts +2 -19
  803. package/dist/render/surface.d.ts.map +1 -1
  804. package/dist/render/surface.js.map +1 -1
  805. package/dist/render/text-defaults.d.ts +1 -17
  806. package/dist/render/text-defaults.d.ts.map +1 -1
  807. package/dist/render/text-defaults.js +6 -40
  808. package/dist/render/text-defaults.js.map +1 -1
  809. package/dist/render/text-layout.d.ts +12 -55
  810. package/dist/render/text-layout.d.ts.map +1 -1
  811. package/dist/render/text-layout.js +2 -16
  812. package/dist/render/text-layout.js.map +1 -1
  813. package/dist/render3d/bounds3d.d.ts +10 -32
  814. package/dist/render3d/bounds3d.d.ts.map +1 -1
  815. package/dist/render3d/bounds3d.js +2 -12
  816. package/dist/render3d/bounds3d.js.map +1 -1
  817. package/dist/render3d/builders.d.ts +8 -35
  818. package/dist/render3d/builders.d.ts.map +1 -1
  819. package/dist/render3d/builders.js +8 -35
  820. package/dist/render3d/builders.js.map +1 -1
  821. package/dist/render3d/camera.d.ts +10 -57
  822. package/dist/render3d/camera.d.ts.map +1 -1
  823. package/dist/render3d/camera.js +4 -26
  824. package/dist/render3d/camera.js.map +1 -1
  825. package/dist/render3d/fill3d.d.ts +7 -45
  826. package/dist/render3d/fill3d.d.ts.map +1 -1
  827. package/dist/render3d/fill3d.js +15 -85
  828. package/dist/render3d/fill3d.js.map +1 -1
  829. package/dist/render3d/geometry.d.ts +18 -106
  830. package/dist/render3d/geometry.d.ts.map +1 -1
  831. package/dist/render3d/geometry.js +2 -20
  832. package/dist/render3d/geometry.js.map +1 -1
  833. package/dist/render3d/graphics3d.d.ts +29 -133
  834. package/dist/render3d/graphics3d.d.ts.map +1 -1
  835. package/dist/render3d/graphics3d.js +23 -110
  836. package/dist/render3d/graphics3d.js.map +1 -1
  837. package/dist/render3d/index.d.ts +1 -16
  838. package/dist/render3d/index.d.ts.map +1 -1
  839. package/dist/render3d/index.js +1 -16
  840. package/dist/render3d/index.js.map +1 -1
  841. package/dist/render3d/inert.d.ts.map +1 -1
  842. package/dist/render3d/inert.js +1 -14
  843. package/dist/render3d/inert.js.map +1 -1
  844. package/dist/render3d/light.d.ts +3 -26
  845. package/dist/render3d/light.d.ts.map +1 -1
  846. package/dist/render3d/light.js.map +1 -1
  847. package/dist/render3d/material.d.ts +13 -87
  848. package/dist/render3d/material.d.ts.map +1 -1
  849. package/dist/render3d/material.js +2 -16
  850. package/dist/render3d/material.js.map +1 -1
  851. package/dist/render3d/matrix4.d.ts +14 -68
  852. package/dist/render3d/matrix4.d.ts.map +1 -1
  853. package/dist/render3d/matrix4.js +11 -60
  854. package/dist/render3d/matrix4.js.map +1 -1
  855. package/dist/render3d/render-context3d.d.ts +13 -51
  856. package/dist/render3d/render-context3d.d.ts.map +1 -1
  857. package/dist/render3d/render-context3d.js +9 -21
  858. package/dist/render3d/render-context3d.js.map +1 -1
  859. package/dist/render3d/resources.d.ts +9 -53
  860. package/dist/render3d/resources.d.ts.map +1 -1
  861. package/dist/render3d/resources.js +8 -48
  862. package/dist/render3d/resources.js.map +1 -1
  863. package/dist/render3d/rounded-box.d.ts +7 -21
  864. package/dist/render3d/rounded-box.d.ts.map +1 -1
  865. package/dist/render3d/rounded-box.js +7 -46
  866. package/dist/render3d/rounded-box.js.map +1 -1
  867. package/dist/render3d/scene-settings.d.ts +20 -78
  868. package/dist/render3d/scene-settings.d.ts.map +1 -1
  869. package/dist/render3d/scene-settings.js.map +1 -1
  870. package/dist/render3d/scene3d.d.ts +11 -53
  871. package/dist/render3d/scene3d.d.ts.map +1 -1
  872. package/dist/render3d/scene3d.js +12 -59
  873. package/dist/render3d/scene3d.js.map +1 -1
  874. package/dist/render3d/segments.d.ts +2 -25
  875. package/dist/render3d/segments.d.ts.map +1 -1
  876. package/dist/render3d/segments.js +1 -11
  877. package/dist/render3d/segments.js.map +1 -1
  878. package/dist/render3d/texture.d.ts +25 -112
  879. package/dist/render3d/texture.d.ts.map +1 -1
  880. package/dist/render3d/texture.js +3 -27
  881. package/dist/render3d/texture.js.map +1 -1
  882. package/dist/render3d/tracking.d.ts +2 -19
  883. package/dist/render3d/tracking.d.ts.map +1 -1
  884. package/dist/render3d/tracking.js +2 -19
  885. package/dist/render3d/tracking.js.map +1 -1
  886. package/dist/render3d/transform.d.ts +14 -60
  887. package/dist/render3d/transform.d.ts.map +1 -1
  888. package/dist/render3d/transform.js +0 -2
  889. package/dist/render3d/transform.js.map +1 -1
  890. package/dist/render3d/vector3.d.ts +6 -48
  891. package/dist/render3d/vector3.d.ts.map +1 -1
  892. package/dist/render3d/vector3.js +4 -38
  893. package/dist/render3d/vector3.js.map +1 -1
  894. package/dist/render3d/walk.d.ts +3 -27
  895. package/dist/render3d/walk.d.ts.map +1 -1
  896. package/dist/render3d/walk.js +5 -33
  897. package/dist/render3d/walk.js.map +1 -1
  898. package/dist/runtime/asset-refine.d.ts +34 -20
  899. package/dist/runtime/asset-refine.d.ts.map +1 -1
  900. package/dist/runtime/asset-refine.js +127 -31
  901. package/dist/runtime/asset-refine.js.map +1 -1
  902. package/dist/runtime/asset-timeline.d.ts +14 -53
  903. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  904. package/dist/runtime/asset-timeline.js +6 -27
  905. package/dist/runtime/asset-timeline.js.map +1 -1
  906. package/dist/runtime/asset-update.d.ts +7 -26
  907. package/dist/runtime/asset-update.d.ts.map +1 -1
  908. package/dist/runtime/asset-update.js +6 -18
  909. package/dist/runtime/asset-update.js.map +1 -1
  910. package/dist/runtime/audio-index.d.ts +0 -2
  911. package/dist/runtime/audio-index.d.ts.map +1 -1
  912. package/dist/runtime/audio-index.js +0 -2
  913. package/dist/runtime/audio-index.js.map +1 -1
  914. package/dist/runtime/builtin-context.d.ts +3 -9
  915. package/dist/runtime/builtin-context.d.ts.map +1 -1
  916. package/dist/runtime/builtin-context.js +3 -9
  917. package/dist/runtime/builtin-context.js.map +1 -1
  918. package/dist/runtime/clip-instance.d.ts +12 -39
  919. package/dist/runtime/clip-instance.d.ts.map +1 -1
  920. package/dist/runtime/clip-instance.js +21 -45
  921. package/dist/runtime/clip-instance.js.map +1 -1
  922. package/dist/runtime/clip-store.d.ts +26 -68
  923. package/dist/runtime/clip-store.d.ts.map +1 -1
  924. package/dist/runtime/clip-store.js +47 -81
  925. package/dist/runtime/clip-store.js.map +1 -1
  926. package/dist/runtime/engine.d.ts +31 -85
  927. package/dist/runtime/engine.d.ts.map +1 -1
  928. package/dist/runtime/engine.js +16 -49
  929. package/dist/runtime/engine.js.map +1 -1
  930. package/dist/runtime/frame-time.d.ts +4 -15
  931. package/dist/runtime/frame-time.d.ts.map +1 -1
  932. package/dist/runtime/frame-time.js +5 -12
  933. package/dist/runtime/frame-time.js.map +1 -1
  934. package/dist/runtime/index.d.ts +0 -1
  935. package/dist/runtime/index.d.ts.map +1 -1
  936. package/dist/runtime/index.js +0 -1
  937. package/dist/runtime/index.js.map +1 -1
  938. package/dist/runtime/node-picking.d.ts +59 -139
  939. package/dist/runtime/node-picking.d.ts.map +1 -1
  940. package/dist/runtime/node-picking.js +87 -157
  941. package/dist/runtime/node-picking.js.map +1 -1
  942. package/dist/runtime/node-picking3d.d.ts +39 -96
  943. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  944. package/dist/runtime/node-picking3d.js +98 -141
  945. package/dist/runtime/node-picking3d.js.map +1 -1
  946. package/dist/runtime/placement.d.ts +8 -17
  947. package/dist/runtime/placement.d.ts.map +1 -1
  948. package/dist/runtime/placement.js +7 -16
  949. package/dist/runtime/placement.js.map +1 -1
  950. package/dist/runtime/playback-controller.d.ts +78 -207
  951. package/dist/runtime/playback-controller.d.ts.map +1 -1
  952. package/dist/runtime/playback-controller.js +111 -226
  953. package/dist/runtime/playback-controller.js.map +1 -1
  954. package/dist/runtime/playback.d.ts +6 -14
  955. package/dist/runtime/playback.d.ts.map +1 -1
  956. package/dist/runtime/playback.js +6 -14
  957. package/dist/runtime/playback.js.map +1 -1
  958. package/dist/runtime/project-assets.d.ts +6 -14
  959. package/dist/runtime/project-assets.d.ts.map +1 -1
  960. package/dist/runtime/project-assets.js +7 -16
  961. package/dist/runtime/project-assets.js.map +1 -1
  962. package/dist/runtime/session.d.ts +22 -45
  963. package/dist/runtime/session.d.ts.map +1 -1
  964. package/dist/runtime/session.js +26 -46
  965. package/dist/runtime/session.js.map +1 -1
  966. package/dist/runtime/settle.d.ts +4 -10
  967. package/dist/runtime/settle.d.ts.map +1 -1
  968. package/dist/runtime/settle.js +4 -10
  969. package/dist/runtime/settle.js.map +1 -1
  970. package/dist/runtime/state-evaluator.d.ts +15 -37
  971. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  972. package/dist/runtime/state-evaluator.js +27 -44
  973. package/dist/runtime/state-evaluator.js.map +1 -1
  974. package/dist/runtime/text-geometry.d.ts +18 -47
  975. package/dist/runtime/text-geometry.d.ts.map +1 -1
  976. package/dist/runtime/text-geometry.js +13 -27
  977. package/dist/runtime/text-geometry.js.map +1 -1
  978. package/dist/sdk/index.d.ts +1 -7
  979. package/dist/sdk/index.d.ts.map +1 -1
  980. package/dist/sdk/index.js +30 -138
  981. package/dist/sdk/index.js.map +1 -1
  982. package/dist/tween/command-decorator.d.ts +6 -26
  983. package/dist/tween/command-decorator.d.ts.map +1 -1
  984. package/dist/tween/command-decorator.js +1 -6
  985. package/dist/tween/command-decorator.js.map +1 -1
  986. package/dist/tween/command.d.ts +6 -53
  987. package/dist/tween/command.d.ts.map +1 -1
  988. package/dist/tween/command.js +5 -40
  989. package/dist/tween/command.js.map +1 -1
  990. package/dist/tween/ease/curve.d.ts +2 -17
  991. package/dist/tween/ease/curve.d.ts.map +1 -1
  992. package/dist/tween/ease/curve.js +1 -6
  993. package/dist/tween/ease/curve.js.map +1 -1
  994. package/dist/tween/ease/describe.d.ts +0 -11
  995. package/dist/tween/ease/describe.d.ts.map +1 -1
  996. package/dist/tween/ease/describe.js +0 -23
  997. package/dist/tween/ease/describe.js.map +1 -1
  998. package/dist/tween/ease/spec.d.ts +2 -18
  999. package/dist/tween/ease/spec.d.ts.map +1 -1
  1000. package/dist/tween/ease/spec.js.map +1 -1
  1001. package/dist/tween/inert.d.ts +1 -14
  1002. package/dist/tween/inert.d.ts.map +1 -1
  1003. package/dist/tween/inert.js +1 -14
  1004. package/dist/tween/inert.js.map +1 -1
  1005. package/dist/tween/lerp.d.ts +2 -26
  1006. package/dist/tween/lerp.d.ts.map +1 -1
  1007. package/dist/tween/lerp.js +2 -26
  1008. package/dist/tween/lerp.js.map +1 -1
  1009. package/dist/tween/loop.d.ts +9 -50
  1010. package/dist/tween/loop.d.ts.map +1 -1
  1011. package/dist/tween/loop.js +6 -31
  1012. package/dist/tween/loop.js.map +1 -1
  1013. package/dist/tween/prepare.d.ts +2 -30
  1014. package/dist/tween/prepare.d.ts.map +1 -1
  1015. package/dist/tween/prepare.js +2 -30
  1016. package/dist/tween/prepare.js.map +1 -1
  1017. package/dist/tween/stepper.d.ts +4 -25
  1018. package/dist/tween/stepper.d.ts.map +1 -1
  1019. package/dist/tween/stepper.js.map +1 -1
  1020. package/dist/tween/to-command.d.ts +1 -8
  1021. package/dist/tween/to-command.d.ts.map +1 -1
  1022. package/dist/tween/to-command.js +2 -25
  1023. package/dist/tween/to-command.js.map +1 -1
  1024. package/dist/util/context.d.ts +4 -29
  1025. package/dist/util/context.d.ts.map +1 -1
  1026. package/dist/util/context.js +3 -15
  1027. package/dist/util/context.js.map +1 -1
  1028. package/dist/util/csv.d.ts +4 -29
  1029. package/dist/util/csv.d.ts.map +1 -1
  1030. package/dist/util/csv.js +3 -22
  1031. package/dist/util/csv.js.map +1 -1
  1032. package/dist/util/metrics.d.ts +2 -26
  1033. package/dist/util/metrics.d.ts.map +1 -1
  1034. package/dist/util/metrics.js +2 -26
  1035. package/dist/util/metrics.js.map +1 -1
  1036. package/dist/util/random.d.ts +20 -87
  1037. package/dist/util/random.d.ts.map +1 -1
  1038. package/dist/util/random.js +20 -87
  1039. package/dist/util/random.js.map +1 -1
  1040. package/dist/util/reference.d.ts +6 -35
  1041. package/dist/util/reference.d.ts.map +1 -1
  1042. package/dist/util/reference.js +1 -4
  1043. package/dist/util/reference.js.map +1 -1
  1044. package/dist/util/scheduler.d.ts +6 -27
  1045. package/dist/util/scheduler.d.ts.map +1 -1
  1046. package/dist/util/scheduler.js +8 -35
  1047. package/dist/util/scheduler.js.map +1 -1
  1048. package/package.json +1 -1
  1049. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1050. package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
  1051. package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
  1052. package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
  1053. package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
  1054. package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
  1055. package/dist/renamed-scene-names.d.ts +0 -17
  1056. package/dist/renamed-scene-names.d.ts.map +0 -1
  1057. package/dist/renamed-scene-names.js +0 -9
  1058. package/dist/renamed-scene-names.js.map +0 -1
  1059. package/dist/runtime/precompisition.d.ts +0 -24
  1060. package/dist/runtime/precompisition.d.ts.map +0 -1
  1061. package/dist/runtime/precompisition.js +0 -7
  1062. package/dist/runtime/precompisition.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/union.ts"],"names":[],"mappings":"","sourcesContent":["import type { AlphaFilter } from \"./implementations/alpha\";\nimport type { BlurFilter } from \"./implementations/blur\";\nimport type { ColorAdjustmentFilter } from \"./implementations/color-adjustment\";\nimport type { ColorMatrixFilter } from \"./implementations/color-matrix\";\nimport type { CurvesFilter } from \"./implementations/curves\";\nimport type { ExposureFilter } from \"./implementations/exposure\";\nimport type { GrayscaleFilter } from \"./implementations/grayscale\";\nimport type { PosterizeTimeFilter } from \"./implementations/posterize-time\";\nimport type { VideoEchoFilter } from \"./implementations/echo\";\n\nimport type { NodeEffect } from \"../effects/union\";\nimport type { BlurEffect } from \"../effects/implementations/blur\";\nimport type { GrayscaleEffect } from \"../effects/implementations/grayscale\";\nimport type { CurvesEffect } from \"../effects/implementations/curves\";\nimport type { ColorAdjustmentEffect } from \"../effects/implementations/color-adjustment\";\nimport type { MagnifyEffect } from \"../effects/implementations/magnify\";\nimport type { MotionBlurEffect } from \"../effects/implementations/motion-blur\";\nimport type { OutlineEffect } from \"../effects/implementations/outline\";\nimport type { DropShadowEffect } from \"@/attributes/shape/effects/implementations/drop-shadow\";\nimport type { GlowEffect } from \"../effects/implementations/glow\";\nimport type { GlassEffect } from \"../effects/implementations/glass\";\n\n/**\n * The node effects that are **not** media filters, and why.\n *\n * Everything else in {@link NodeEffect} is a function of the pixels it is\n * given, so it means exactly the same thing applied to a node's rendered\n * content or to one fill layer's own pixels — and the renderer already runs\n * both through a single handler registry. This is the exception list, so a new\n * effect becomes a filter by default rather than by remembering to add it.\n *\n * Two reasons land here:\n *\n * - **Needs something a fill layer doesn't have.** `magnify` and `glass` sample\n * the backdrop beneath the node — glass is a slab you see *through*, and a\n * node's own paint is not something there is anything behind; `motionBlur` and\n * `trails` are derived from the node's sampled velocity. A fill has no\n * backdrop and no motion of its own.\n * - **Draws outside the silhouette.** `outline` paints a ring around the\n * content, which the shape path a fill is clipped to would cut away, and\n * `glow` bleeds past it in every direction — a glow clipped to the thing that\n * cast it is not a dimmer glow, it is no glow at all. (`bloom` stays: it is\n * the contained version of the same idea, which is what makes it the right\n * one to reach for on a fill.)\n *\n * `blur`, `grayscale`, `curves` and `colorAdjustment` are excluded for a third,\n * bookkeeping reason: they already have a dedicated filter type below, sharing\n * the same fields and the same renderer handler.\n */\ntype NonFilterEffect =\n | MagnifyEffect\n | GlassEffect\n | MotionBlurEffect\n | OutlineEffect\n | DropShadowEffect\n | GlowEffect\n | BlurEffect\n | GrayscaleEffect\n | CurvesEffect\n | ColorAdjustmentEffect;\n\n/**\n * Node effects usable as a media filter — i.e. applied to one image/video\n * fill's own pixels rather than to a node and everything under it.\n *\n * This is what lets a background image be oil-painted, dithered or posterized\n * without wrapping it in a node whose effect would also hit its children:\n *\n * Rect({\n * fill: Fills.image('bg.jpg', { filters: Adjustments.oilPaint(4) }),\n * children: [Text({ text: \"still sharp\" })],\n * })\n *\n * The effects carry a `mode` field that means nothing here (a fill has no\n * backdrop); the {@link VideoAdjustmentChain} builders drop it, and the renderer ignores\n * it on this path.\n */\nexport type EffectAdjustment = Exclude<NodeEffect, NonFilterEffect>;\n\n/**\n * Discriminated union of pixel filters — the filters valid on both image and\n * video fills. Each is realised either as a per-pixel colour filter, or — for\n * the ones that resample pixel *positions* — as a lens pass over the fill.\n */\nexport type MediaAdjustment =\n | ExposureFilter\n | BlurFilter\n | GrayscaleFilter\n | AlphaFilter\n | ColorMatrixFilter\n | CurvesFilter\n | ColorAdjustmentFilter\n | EffectAdjustment;\n\n/**\n * Discriminated union of video-only filters — temporal/multi-frame effects that\n * are meaningless on a still image (a single frame has no time axis and no\n * previous frames). Consumed outside the pixel `setImageFilter` path.\n */\nexport type VideoOnlyAdjustment =\n | PosterizeTimeFilter\n | VideoEchoFilter;\n"]}
1
+ {"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../src/attributes/shape/filters/union.ts"],"names":[],"mappings":"","sourcesContent":["import type { AlphaFilter } from \"./implementations/alpha\";\nimport type { BlurFilter } from \"./implementations/blur\";\nimport type { ColorAdjustmentFilter } from \"./implementations/color-adjustment\";\nimport type { ColorMatrixFilter } from \"./implementations/color-matrix\";\nimport type { CurvesFilter } from \"./implementations/curves\";\nimport type { ExposureFilter } from \"./implementations/exposure\";\nimport type { GrayscaleFilter } from \"./implementations/grayscale\";\nimport type { PosterizeTimeFilter } from \"./implementations/posterize-time\";\nimport type { VideoEchoFilter } from \"./implementations/echo\";\n\nimport type { NodeEffect } from \"../effects/union\";\nimport type { BlurEffect } from \"../effects/implementations/blur\";\nimport type { GrayscaleEffect } from \"../effects/implementations/grayscale\";\nimport type { CurvesEffect } from \"../effects/implementations/curves\";\nimport type { ColorAdjustmentEffect } from \"../effects/implementations/color-adjustment\";\nimport type { MagnifyEffect } from \"../effects/implementations/magnify\";\nimport type { MotionBlurEffect } from \"../effects/implementations/motion-blur\";\nimport type { OutlineEffect } from \"../effects/implementations/outline\";\nimport type { DropShadowEffect } from \"@/attributes/shape/effects/implementations/drop-shadow\";\nimport type { GlowEffect } from \"../effects/implementations/glow\";\nimport type { GlassEffect } from \"../effects/implementations/glass\";\n\n/**\n * The node effects that are **not** media filters. Everything else in {@link NodeEffect} is a function of the pixels it\n * is given, so it means the same on a node's content or one fill layer's pixels; this is the exception list, so a new\n * effect becomes a filter by default. Two reasons: **it needs something a fill layer lacks** (`magnify` and `glass`\n * sample the backdrop, `motionBlur` and `trails` derive from the node's velocity), or **it draws outside the\n * silhouette** (`outline` paints a ring the fill's clip would cut away, and `glow` bleeds past it; `bloom` stays as the\n * contained version). `blur`, `grayscale`, `curves` and `colorAdjustment` are excluded only because they have dedicated\n * filter types below sharing the same fields and renderer handler.\n */\ntype NonFilterEffect =\n | MagnifyEffect\n | GlassEffect\n | MotionBlurEffect\n | OutlineEffect\n | DropShadowEffect\n | GlowEffect\n | BlurEffect\n | GrayscaleEffect\n | CurvesEffect\n | ColorAdjustmentEffect;\n\n/** Node effects usable as a media filter: applied to one image/video fill's own pixels rather than a node and everything under it (so a background can be oil-painted without also hitting its children). Their `mode` means nothing here (a fill has no backdrop); the {@link VideoAdjustmentChain} builders drop it and the renderer ignores it. */\nexport type EffectAdjustment = Exclude<NodeEffect, NonFilterEffect>;\n\n/** Pixel filters valid on both image and video fills, each a per-pixel colour filter or, for those that resample pixel *positions*, a lens pass over the fill. */\nexport type MediaAdjustment =\n | ExposureFilter\n | BlurFilter\n | GrayscaleFilter\n | AlphaFilter\n | ColorMatrixFilter\n | CurvesFilter\n | ColorAdjustmentFilter\n | EffectAdjustment;\n\n/** Video-only filters: temporal/multi-frame effects meaningless on a still (no time axis, no previous frames), consumed outside the pixel `setImageFilter` path. */\nexport type VideoOnlyAdjustment =\n | PosterizeTimeFilter\n | VideoEchoFilter;\n"]}
@@ -1,22 +1,12 @@
1
1
  /**
2
- * The editable vector model — subpaths of anchors, each carrying the two bezier
3
- * handles that govern the segments either side of it — and the unit box it is
4
- * quoted against. Figma's vector model, and what a person actually drags.
2
+ * The editable vector model: subpaths of anchors, each with the two bezier handles of the segments either side
3
+ * (Figma's model). The **second** boundary where geometry is deliberately flattened to one curve type: an arc has
4
+ * no handles to drag, so it becomes cubics on the way in.
5
5
  *
6
- * The **second** of the two boundaries where geometry is deliberately flattened
7
- * to one curve type. An arc has no handles to drag, so it becomes cubics on the
8
- * way in — a conversion, where it used to be a truncation: `A` was missing from
9
- * the old parser's letter list, so it stopped dead at the first arc and
10
- * everything after it disappeared. Real-world icons draw their rounded joins
11
- * with arcs, so pasting one in lost most of the shape.
12
- *
13
- * **The coordinate space is the node's own box**: `x` and `y` run -0.5 to +0.5
14
- * across its width and height, y pointing *down* the way SVG's does. Resizing is
15
- * then an ordinary width/height drag, because the geometry is a fraction of the
16
- * box rather than a pixel count inside it — no gizmo code has to know a path
17
- * from a rect. Points *may* sit outside it: a point dragged past an edge is
18
- * honest about where it was dropped, and {@link normalize} pulls the
19
- * box back around the geometry once, on the way out of an edit.
6
+ * **The coordinate space is the node's own box**: `x`/`y` run -0.5 to +0.5 across its width and height, y pointing
7
+ * *down* as in SVG. Resizing is then an ordinary width/height drag, since geometry is a fraction of the box. Points
8
+ * *may* sit outside it (a point dragged past an edge); {@link normalize} pulls the box back around the geometry once,
9
+ * on the way out of an edit.
20
10
  */
21
11
  import { Vector2 } from "../../../attributes/layout/vector2.js";
22
12
  import { PathCommand, PathData } from "../../../render/descriptors/path.js";
@@ -24,109 +14,31 @@ import type { Extents } from "../../../layout/bounds.js";
24
14
  import type { PathAnchor, PathNormalization, VectorPath } from "./types.js";
25
15
  /** An empty path, as the value an unset `data` field resolves to. */
26
16
  export declare const EMPTY_PATH_DATA = "";
27
- /**
28
- * Any {@link PathData} as the editable model.
29
- *
30
- * Takes `PathData`, not a string. The old entry point took only a string and
31
- * every caller had to guard — `typeof data === "string" ? data : ""` — which
32
- * meant a node animating its `data` drew *nothing* for the whole tween, because
33
- * a morph hands over a `PathCommand[]` at every `t` strictly between 0 and 1.
34
- */
17
+ /** Any {@link PathData} as the editable model. Takes `PathData`, not a string: a morph hands over a `PathCommand[]` at every `t` strictly between 0 and 1, which string-only callers drew as nothing. */
35
18
  export declare function anchors(d: PathData | null | undefined): VectorPath;
36
- /**
37
- * Serializes the model back to a `d` string.
38
- *
39
- * Only `M`, `L`, `C` and `Z` are emitted — the four commands the editor can
40
- * round-trip — so what is stored is always what can be edited.
41
- */
19
+ /** Serializes the model back to a `d` string. Only `M`, `L`, `C` and `Z` are emitted, so what is stored can always be edited. */
42
20
  export declare function fromAnchors(path: VectorPath): string;
43
- /**
44
- * The model as drawable commands, with a transform folded into the same pass.
45
- *
46
- * Every caller needs one — unit box → the node's laid-out pixels, and y-down →
47
- * the renderer's y-up — and doing it here means one allocation per frame instead
48
- * of two, on a list rebuilt every time the node repaints.
49
- */
21
+ /** The model as drawable commands, with a transform (unit box -> laid-out pixels, y-down -> y-up) folded into the same pass: one allocation per repaint instead of two. */
50
22
  export declare function anchorCommands(path: VectorPath, transform?: (point: Vector2) => Vector2): PathCommand[];
51
- /**
52
- * The path's tight bounding box, or `null` when it has no points.
53
- *
54
- * Tight, not the handle polygon's hull: a cubic's own extrema are solved for,
55
- * because the handles can sit a long way outside the curve and a box derived
56
- * from them would leave a visible gap between a normalized shape and the edge of
57
- * its node.
58
- */
23
+ /** The path's tight bounding box (a cubic's own extrema, not the handle hull, which would leave a gap to the node's edge), or `null` when it has no points. */
59
24
  export declare function anchorBounds(path: VectorPath): Extents | null;
60
- /** Applies `fn` to every point and handle, returning a new path. */
61
25
  export declare function map(path: VectorPath, fn: (point: Vector2) => Vector2): VectorPath;
62
- /**
63
- * The turn-and-scale about `start` that carries `end` onto `to` — how `moveTo`
64
- * fits a path aimed at another node. Where `start` and `end` coincide there is
65
- * no chord to turn, so it translates instead.
66
- */
26
+ /** The turn-and-scale about `start` that carries `end` onto `to` (how `moveTo` fits a path at another node); translates when `start` and `end` coincide. */
67
27
  export declare function endFit(start: Vector2, end: Vector2, to: Vector2): (point: Vector2) => Vector2;
68
- /** Whether a path would draw anything at all. */
69
28
  export declare function isEmpty(path: VectorPath): boolean;
70
- /**
71
- * The unit box's extent — the node's own layout rect, as a fraction of itself.
72
- *
73
- * Exported because two very different callers need the same half: a renderer
74
- * scales by the extent (1 unit = the node's full width), and an editor projects
75
- * a screen point into it.
76
- */
29
+ /** The unit box's extent: the node's layout rect as a fraction of itself. A renderer scales by it; an editor projects a screen point into it. */
77
30
  export declare const PATH_UNIT_EXTENT = 1;
78
- /** Half of {@link PATH_UNIT_EXTENT} — the distance from the centre to an edge. */
79
31
  export declare const PATH_UNIT_HALF: number;
80
- /**
81
- * The box a path's coordinates are already quoted against — the node's own
82
- * frame, as {@link PATH_UNIT_HALF} either side of centre.
83
- */
32
+ /** The box a path's coordinates are quoted against: the node's own frame, {@link PATH_UNIT_HALF} either side of centre. */
84
33
  export declare const UNIT_PATH_BOX: Extents;
85
- /**
86
- * Pulls the unit box back around the geometry.
87
- *
88
- * What an editor runs on the way *out* of a path edit, and the reason a node
89
- * whose points were dragged all over the canvas still ends up with a selection
90
- * box that hugs it. The caller pairs it with the node's own size and position:
91
- * the box grows by `scaleX`/`scaleY` and moves by `centerX`/`centerY` scaled
92
- * into the node's parent, so the drawing doesn't shift on screen while its frame
93
- * changes underneath it.
94
- */
34
+ /** Pulls the unit box back around the geometry, run on the way out of a path edit. The caller pairs it with the node's size and position (grow by `scaleX`/`scaleY`, move by `centerX`/`centerY`) so the drawing doesn't shift on screen. */
95
35
  export declare function normalize(path: VectorPath): PathNormalization;
96
- /**
97
- * Re-quotes a path against `box` — the general form of
98
- * {@link normalize}, which is this with the geometry's own bounds.
99
- *
100
- * The two callers want the same arithmetic for opposite reasons. A canvas editor
101
- * fits the box to the drawing on the way out, so a node drawn in a corner of its
102
- * frame ends up with a frame that hugs it. An appearance dialog lets the frame
103
- * be **stated** instead — dragged wider than the drawing to leave a margin, or
104
- * slid so the drawing sits off-centre — and then fits to that.
105
- *
106
- * A degenerate axis — every point on one line, which is a perfectly reasonable
107
- * thing to draw — keeps its scale at 1 rather than dividing by zero, so a flat
108
- * path stays where it is instead of becoming NaN.
109
- */
36
+ /** Re-quotes a path against `box`; {@link normalize} is this with the geometry's own bounds. A dialog can instead *state* the frame (margin, off-centre). A degenerate axis (all points on a line) keeps scale 1 instead of dividing by zero. */
110
37
  export declare function fitToBox(path: VectorPath, box: Extents): PathNormalization;
111
- /** Moves every point and handle by the same delta. */
112
38
  export declare function translate(path: VectorPath, delta: Vector2): VectorPath;
113
- /**
114
- * A point on the segment between two anchors, at parameter `t`.
115
- *
116
- * An editor needs it twice over: to find where on a segment a click landed (so a
117
- * double-click can insert an anchor there), and to draw the preview of the
118
- * anchor that insertion would create.
119
- */
39
+ /** A point on the segment between two anchors at `t`: where a click landed, and the preview of the anchor an insertion would create. */
120
40
  export declare function pointOn(from: PathAnchor, to: PathAnchor, t: number): Vector2;
121
- /**
122
- * Splits the segment between two anchors at `t`, returning the three anchors
123
- * that replace them — the two ends with their outer handles shortened, and the
124
- * new anchor in the middle carrying both halves of the split tangent.
125
- *
126
- * De Casteljau, which is what makes the insertion *invisible*: the curve through
127
- * the new point is the same curve, so double-clicking a segment adds somewhere
128
- * to grab rather than changing the shape under the pointer.
129
- */
41
+ /** Splits the segment at `t` into the three anchors that replace the pair (ends with shortened outer handles, new anchor carrying both halves of the tangent). De Casteljau keeps the curve identical, so insertion is invisible. */
130
42
  export declare function split(from: PathAnchor, to: PathAnchor, t: number): {
131
43
  from: PathAnchor;
132
44
  middle: PathAnchor;
@@ -1 +1 @@
1
- {"version":3,"file":"anchors.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/path/anchors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAS,UAAU,EAAe,iBAAiB,EAAe,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1G,qEAAqE;AACrE,eAAO,MAAM,eAAe,KAAK,CAAC;AAyElC;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,CAIlE;AAiDD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAwBpD;AAID;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC1B,IAAI,EAAE,UAAU,EAChB,SAAS,GAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAkB,GAClD,WAAW,EAAE,CA6Bf;AAID;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAA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M,cAAc,QAAuB,CAAC;AAEnD,2HAA2H;AAC3H,eAAO,MAAM,aAAa,EAAE,OAK3B,CAAC;AAEF,6OAA6O;AAC7O,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAI7D;AAED,iPAAiP;AACjP,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,GAAG,iBAAiB,CAkB1E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,CAEtE;AAED,wIAAwI;AACxI,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAa5E;AAED,qOAAqO;AACrO,wBAAgB,KAAK,CACjB,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,GAC5C;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,UAAU,CAAA;CAAE,CAqB1D"}
@@ -2,21 +2,11 @@ import { arcSweepToCubics, cubicAxis, cubicExtrema, quadToCubic, splitCubicAt }
2
2
  import { contours, segmentArc } from "./walk.js";
3
3
  /** An empty path, as the value an unset `data` field resolves to. */
4
4
  export const EMPTY_PATH_DATA = "";
5
- // ── Reading ────────────────────────────────────────────────────────────────
6
5
  /** Whether two points are the same to within serialization noise. */
7
6
  function samePoint(a, b) {
8
7
  return Math.abs(a.x - b.x) < 1e-6 && Math.abs(a.y - b.y) < 1e-6;
9
8
  }
10
- /**
11
- * Marks a subpath closed, folding a duplicated last anchor into the first.
12
- *
13
- * A `d` string that ends `… L 0 0 Z` — which every serializer that closes
14
- * explicitly produces, ours included when a closing segment carries handles —
15
- * names the start point twice: once as the last `L`/`C` target and once
16
- * implicitly by `Z`. Left alone, the round trip would grow an anchor on every
17
- * load, which is the kind of drift that only shows up after a file has been
18
- * opened a hundred times.
19
- */
9
+ /** Marks a subpath closed, folding a duplicated last anchor into the first: a `d` ending `… L 0 0 Z` names the start twice, and left alone the round trip would grow an anchor on every load. */
20
10
  function closeSubpath(subpath) {
21
11
  subpath.closed = true;
22
12
  const { anchors } = subpath;
@@ -69,30 +59,13 @@ function contourToSubpath(contour) {
69
59
  closeSubpath(subpath);
70
60
  return subpath;
71
61
  }
72
- /**
73
- * Any {@link PathData} as the editable model.
74
- *
75
- * Takes `PathData`, not a string. The old entry point took only a string and
76
- * every caller had to guard — `typeof data === "string" ? data : ""` — which
77
- * meant a node animating its `data` drew *nothing* for the whole tween, because
78
- * a morph hands over a `PathCommand[]` at every `t` strictly between 0 and 1.
79
- */
62
+ /** Any {@link PathData} as the editable model. Takes `PathData`, not a string: a morph hands over a `PathCommand[]` at every `t` strictly between 0 and 1, which string-only callers drew as nothing. */
80
63
  export function anchors(d) {
81
64
  return contours(d)
82
65
  .map(contourToSubpath)
83
66
  .filter((subpath) => subpath.anchors.length > 0);
84
67
  }
85
- // ── Writing ────────────────────────────────────────────────────────────────
86
- /**
87
- * How many decimals a stored coordinate keeps.
88
- *
89
- * The space is the unit box, so a coordinate is a fraction of the node's size:
90
- * five decimals is sub-pixel on a 10,000px node and keeps the string short
91
- * enough that a path is a sane thing to hold in a JSON column. It also makes the
92
- * round trip *stable* — a drag that lands where it started re-serializes to the
93
- * identical string, which is what lets an editor tell "nothing changed" from
94
- * "changed by a rounding error".
95
- */
68
+ /** Decimals a stored coordinate keeps: sub-pixel on a 10,000px node (a coordinate is a fraction of its size) and stable, so a drag that lands where it started re-serializes identically. */
96
69
  const COORD_PRECISION = 5;
97
70
  function fmt(value) {
98
71
  if (!Number.isFinite(value))
@@ -102,21 +75,12 @@ function fmt(value) {
102
75
  // with the wind would make the "did anything change" comparison lie.
103
76
  return String(rounded === 0 ? 0 : rounded);
104
77
  }
105
- /**
106
- * What one segment between two anchors *is* — a line, or a cubic and its
107
- * controls.
108
- *
109
- * The decision lived twice, once per output format: `segmentData` wrote it as a
110
- * `d` string and `pushSegment` as a `PathCommand`, with the same rule about a
111
- * missing handle standing in as its own anchor written out both times.
112
- */
78
+ /** What one segment between two anchors *is*: a line, or a cubic and its controls. Shared by both output formats (`d` string and `PathCommand`). */
113
79
  function segmentBetween(from, to) {
114
80
  if (from.outHandle === null && to.inHandle === null) {
115
81
  return { line: true, to: to.point };
116
82
  }
117
- // A missing handle stands in as its own anchor, which is the degenerate cubic
118
- // that draws as a straight pull towards the other end — the same thing every
119
- // vector editor means by "one side of this segment is a curve".
83
+ // A missing handle stands in as its own anchor: the degenerate cubic that draws as a straight pull towards the other end.
120
84
  return {
121
85
  line: false,
122
86
  c1: from.outHandle ?? from.point,
@@ -124,12 +88,7 @@ function segmentBetween(from, to) {
124
88
  to: to.point,
125
89
  };
126
90
  }
127
- /**
128
- * Serializes the model back to a `d` string.
129
- *
130
- * Only `M`, `L`, `C` and `Z` are emitted — the four commands the editor can
131
- * round-trip — so what is stored is always what can be edited.
132
- */
91
+ /** Serializes the model back to a `d` string. Only `M`, `L`, `C` and `Z` are emitted, so what is stored can always be edited. */
133
92
  export function fromAnchors(path) {
134
93
  const parts = [];
135
94
  for (const { anchors, closed } of path) {
@@ -157,13 +116,7 @@ export function fromAnchors(path) {
157
116
  return parts.join(" ");
158
117
  }
159
118
  const identity = (point) => point;
160
- /**
161
- * The model as drawable commands, with a transform folded into the same pass.
162
- *
163
- * Every caller needs one — unit box → the node's laid-out pixels, and y-down →
164
- * the renderer's y-up — and doing it here means one allocation per frame instead
165
- * of two, on a list rebuilt every time the node repaints.
166
- */
119
+ /** The model as drawable commands, with a transform (unit box -> laid-out pixels, y-down -> y-up) folded into the same pass: one allocation per repaint instead of two. */
167
120
  export function anchorCommands(path, transform = identity) {
168
121
  const out = [];
169
122
  const emit = (from, to) => {
@@ -196,15 +149,7 @@ export function anchorCommands(path, transform = identity) {
196
149
  }
197
150
  return out;
198
151
  }
199
- // ── Measuring ──────────────────────────────────────────────────────────────
200
- /**
201
- * The path's tight bounding box, or `null` when it has no points.
202
- *
203
- * Tight, not the handle polygon's hull: a cubic's own extrema are solved for,
204
- * because the handles can sit a long way outside the curve and a box derived
205
- * from them would leave a visible gap between a normalized shape and the edge of
206
- * its node.
207
- */
152
+ /** The path's tight bounding box (a cubic's own extrema, not the handle hull, which would leave a gap to the node's edge), or `null` when it has no points. */
208
153
  export function anchorBounds(path) {
209
154
  let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
210
155
  let seen = false;
@@ -240,8 +185,6 @@ export function anchorBounds(path) {
240
185
  }
241
186
  return seen ? { minX, minY, maxX, maxY } : null;
242
187
  }
243
- // ── Transforming ───────────────────────────────────────────────────────────
244
- /** Applies `fn` to every point and handle, returning a new path. */
245
188
  export function map(path, fn) {
246
189
  return path.map((subpath) => ({
247
190
  closed: subpath.closed,
@@ -252,11 +195,7 @@ export function map(path, fn) {
252
195
  })),
253
196
  }));
254
197
  }
255
- /**
256
- * The turn-and-scale about `start` that carries `end` onto `to` — how `moveTo`
257
- * fits a path aimed at another node. Where `start` and `end` coincide there is
258
- * no chord to turn, so it translates instead.
259
- */
198
+ /** The turn-and-scale about `start` that carries `end` onto `to` (how `moveTo` fits a path at another node); translates when `start` and `end` coincide. */
260
199
  export function endFit(start, end, to) {
261
200
  const cx = end.x - start.x;
262
201
  const cy = end.y - start.y;
@@ -277,60 +216,27 @@ export function endFit(start, end, to) {
277
216
  return { x: start.x + re * ux - im * uy, y: start.y + im * ux + re * uy };
278
217
  };
279
218
  }
280
- /** Whether a path would draw anything at all. */
281
219
  export function isEmpty(path) {
282
220
  return path.every((subpath) => subpath.anchors.length < 2);
283
221
  }
284
- /**
285
- * The unit box's extent — the node's own layout rect, as a fraction of itself.
286
- *
287
- * Exported because two very different callers need the same half: a renderer
288
- * scales by the extent (1 unit = the node's full width), and an editor projects
289
- * a screen point into it.
290
- */
222
+ /** The unit box's extent: the node's layout rect as a fraction of itself. A renderer scales by it; an editor projects a screen point into it. */
291
223
  export const PATH_UNIT_EXTENT = 1;
292
- /** Half of {@link PATH_UNIT_EXTENT} — the distance from the centre to an edge. */
293
224
  export const PATH_UNIT_HALF = PATH_UNIT_EXTENT / 2;
294
- /**
295
- * The box a path's coordinates are already quoted against — the node's own
296
- * frame, as {@link PATH_UNIT_HALF} either side of centre.
297
- */
225
+ /** The box a path's coordinates are quoted against: the node's own frame, {@link PATH_UNIT_HALF} either side of centre. */
298
226
  export const UNIT_PATH_BOX = {
299
227
  minX: -PATH_UNIT_HALF,
300
228
  minY: -PATH_UNIT_HALF,
301
229
  maxX: PATH_UNIT_HALF,
302
230
  maxY: PATH_UNIT_HALF,
303
231
  };
304
- /**
305
- * Pulls the unit box back around the geometry.
306
- *
307
- * What an editor runs on the way *out* of a path edit, and the reason a node
308
- * whose points were dragged all over the canvas still ends up with a selection
309
- * box that hugs it. The caller pairs it with the node's own size and position:
310
- * the box grows by `scaleX`/`scaleY` and moves by `centerX`/`centerY` scaled
311
- * into the node's parent, so the drawing doesn't shift on screen while its frame
312
- * changes underneath it.
313
- */
232
+ /** Pulls the unit box back around the geometry, run on the way out of a path edit. The caller pairs it with the node's size and position (grow by `scaleX`/`scaleY`, move by `centerX`/`centerY`) so the drawing doesn't shift on screen. */
314
233
  export function normalize(path) {
315
234
  const bounds = anchorBounds(path);
316
235
  if (!bounds)
317
236
  return { path, scaleX: 1, scaleY: 1, centerX: 0, centerY: 0 };
318
237
  return fitToBox(path, bounds);
319
238
  }
320
- /**
321
- * Re-quotes a path against `box` — the general form of
322
- * {@link normalize}, which is this with the geometry's own bounds.
323
- *
324
- * The two callers want the same arithmetic for opposite reasons. A canvas editor
325
- * fits the box to the drawing on the way out, so a node drawn in a corner of its
326
- * frame ends up with a frame that hugs it. An appearance dialog lets the frame
327
- * be **stated** instead — dragged wider than the drawing to leave a margin, or
328
- * slid so the drawing sits off-centre — and then fits to that.
329
- *
330
- * A degenerate axis — every point on one line, which is a perfectly reasonable
331
- * thing to draw — keeps its scale at 1 rather than dividing by zero, so a flat
332
- * path stays where it is instead of becoming NaN.
333
- */
239
+ /** Re-quotes a path against `box`; {@link normalize} is this with the geometry's own bounds. A dialog can instead *state* the frame (margin, off-centre). A degenerate axis (all points on a line) keeps scale 1 instead of dividing by zero. */
334
240
  export function fitToBox(path, box) {
335
241
  const width = box.maxX - box.minX;
336
242
  const height = box.maxY - box.minY;
@@ -349,17 +255,10 @@ export function fitToBox(path, box) {
349
255
  centerY,
350
256
  };
351
257
  }
352
- /** Moves every point and handle by the same delta. */
353
258
  export function translate(path, delta) {
354
259
  return map(path, (p) => ({ x: p.x + delta.x, y: p.y + delta.y }));
355
260
  }
356
- /**
357
- * A point on the segment between two anchors, at parameter `t`.
358
- *
359
- * An editor needs it twice over: to find where on a segment a click landed (so a
360
- * double-click can insert an anchor there), and to draw the preview of the
361
- * anchor that insertion would create.
362
- */
261
+ /** A point on the segment between two anchors at `t`: where a click landed, and the preview of the anchor an insertion would create. */
363
262
  export function pointOn(from, to, t) {
364
263
  if (from.outHandle === null && to.inHandle === null) {
365
264
  return {
@@ -374,15 +273,7 @@ export function pointOn(from, to, t) {
374
273
  y: cubicAxis(t, from.point.y, c1.y, c2.y, to.point.y),
375
274
  };
376
275
  }
377
- /**
378
- * Splits the segment between two anchors at `t`, returning the three anchors
379
- * that replace them — the two ends with their outer handles shortened, and the
380
- * new anchor in the middle carrying both halves of the split tangent.
381
- *
382
- * De Casteljau, which is what makes the insertion *invisible*: the curve through
383
- * the new point is the same curve, so double-clicking a segment adds somewhere
384
- * to grab rather than changing the shape under the pointer.
385
- */
276
+ /** Splits the segment at `t` into the three anchors that replace the pair (ends with shortened outer handles, new anchor carrying both halves of the tangent). De Casteljau keeps the curve identical, so insertion is invisible. */
386
277
  export function split(from, to, t) {
387
278
  if (from.outHandle === null && to.inHandle === null) {
388
279
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"anchors.js","sourceRoot":"","sources":["../../../../src/attributes/shape/path/anchors.ts"],"names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,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;YACxE,EAAE;SACL,CAAC;IACN,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,CAChC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,EAC5B,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,KAAK,EACvB,EAAE,CAAC,KAAK,EACR,CAAC,CACJ,CAAC;IACF,OAAO;QACH,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACtC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG,EAAE;QACpE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,EAAE;KACrC,CAAC;AACN,CAAC","sourcesContent":["/**\n * The editable vector model — subpaths of anchors, each carrying the two bezier\n * handles that govern the segments either side of it — and the unit box it is\n * quoted against. Figma's vector model, and what a person actually drags.\n *\n * The **second** of the two boundaries where geometry is deliberately flattened\n * to one curve type. An arc has no handles to drag, so it becomes cubics on the\n * way in — a conversion, where it used to be a truncation: `A` was missing from\n * the old parser's letter list, so it stopped dead at the first arc and\n * everything after it disappeared. Real-world icons draw their rounded joins\n * with arcs, so pasting one in lost most of the shape.\n *\n * **The coordinate space is the node's own box**: `x` and `y` run -0.5 to +0.5\n * across its width and height, y pointing *down* the way SVG's does. Resizing is\n * then an ordinary width/height drag, because the geometry is a fraction of the\n * box rather than a pixel count inside it — no gizmo code has to know a path\n * from a rect. Points *may* sit outside it: a point dragged past an edge is\n * honest about where it was dropped, and {@link normalize} pulls the\n * box back around the geometry once, on the way out of an edit.\n */\nimport { Vector2 } from \"@/attributes/layout/vector2\";\nimport { PathCommand, PathData } from \"@/render/descriptors/path\";\nimport { arcSweepToCubics, cubicAxis, cubicExtrema, quadToCubic, splitCubicAt } from \"./bezier\";\nimport { contours, segmentArc } from \"./walk\";\nimport type { Extents } from \"@/layout/bounds\";\nimport type { Cubic, PathAnchor, PathContour, PathNormalization, PathSubpath, VectorPath } from \"./types\";\n\n/** An empty path, as the value an unset `data` field resolves to. */\nexport const EMPTY_PATH_DATA = \"\";\n\n// ── Reading ────────────────────────────────────────────────────────────────\n\n/** Whether two points are the same to within serialization noise. */\nfunction samePoint(a: Vector2, b: Vector2): boolean {\n return Math.abs(a.x - b.x) < 1e-6 && Math.abs(a.y - b.y) < 1e-6;\n}\n\n/**\n * Marks a subpath closed, folding a duplicated last anchor into the first.\n *\n * A `d` string that ends `… L 0 0 Z` — which every serializer that closes\n * explicitly produces, ours included when a closing segment carries handles —\n * names the start point twice: once as the last `L`/`C` target and once\n * implicitly by `Z`. Left alone, the round trip would grow an anchor on every\n * load, which is the kind of drift that only shows up after a file has been\n * opened a hundred times.\n */\nfunction closeSubpath(subpath: PathSubpath): void {\n subpath.closed = true;\n const { anchors } = subpath;\n if (anchors.length < 2) return;\n const first = anchors[0];\n const last = anchors[anchors.length - 1];\n if (!samePoint(first.point, last.point)) return;\n // The closing segment's own curvature belongs to the join, so the duplicate's\n // in-handle becomes the first anchor's.\n first.inHandle = last.inHandle;\n anchors.pop();\n}\n\n/** A copy of a point of the memoized contour — the model is edited in place. */\nconst copy = (v: Vector2): Vector2 => ({ x: v.x, y: v.y });\n\nfunction contourToSubpath(contour: PathContour): PathSubpath {\n // Every point and handle is copied out of the memoized contour: `contours`\n // shares its result between callers, and an editor moves these in place.\n const anchors: PathAnchor[] = [\n { point: copy(contour.start), inHandle: null, outHandle: null },\n ];\n const curve = (cubic: Cubic) => {\n anchors[anchors.length - 1].outHandle = copy(cubic.c1);\n anchors.push({ point: copy(cubic.p1), inHandle: copy(cubic.c2), outHandle: null });\n };\n\n for (const segment of contour.segments) {\n switch (segment.kind) {\n case \"line\":\n // Both handles stay null, which is what draws a straight segment.\n anchors.push({ point: copy(segment.to), inHandle: null, outHandle: null });\n break;\n case \"cubic\":\n curve({ p0: segment.from, c1: segment.c1, c2: segment.c2, p1: segment.to });\n break;\n case \"quad\":\n curve(quadToCubic(segment.from, segment.c, segment.to));\n break;\n case \"arc\": {\n const arc = segmentArc(segment);\n for (const cubic of arcSweepToCubics(arc, arc.theta1, arc.theta1 + arc.dtheta)) {\n curve(cubic);\n }\n break;\n }\n }\n }\n\n const subpath: PathSubpath = { anchors, closed: false };\n if (contour.closed) closeSubpath(subpath);\n return subpath;\n}\n\n/**\n * Any {@link PathData} as the editable model.\n *\n * Takes `PathData`, not a string. The old entry point took only a string and\n * every caller had to guard — `typeof data === \"string\" ? data : \"\"` — which\n * meant a node animating its `data` drew *nothing* for the whole tween, because\n * a morph hands over a `PathCommand[]` at every `t` strictly between 0 and 1.\n */\nexport function anchors(d: PathData | null | undefined): VectorPath {\n return contours(d)\n .map(contourToSubpath)\n .filter((subpath) => subpath.anchors.length > 0);\n}\n\n// ── Writing ────────────────────────────────────────────────────────────────\n\n/**\n * How many decimals a stored coordinate keeps.\n *\n * The space is the unit box, so a coordinate is a fraction of the node's size:\n * five decimals is sub-pixel on a 10,000px node and keeps the string short\n * enough that a path is a sane thing to hold in a JSON column. It also makes the\n * round trip *stable* — a drag that lands where it started re-serializes to the\n * identical string, which is what lets an editor tell \"nothing changed\" from\n * \"changed by a rounding error\".\n */\nconst COORD_PRECISION = 5;\n\nfunction fmt(value: number): string {\n if (!Number.isFinite(value)) return \"0\";\n const rounded = Number(value.toFixed(COORD_PRECISION));\n // `-0` serializes as \"0\": the two are the same point, and a sign that flips\n // with the wind would make the \"did anything change\" comparison lie.\n return String(rounded === 0 ? 0 : rounded);\n}\n\n/**\n * What one segment between two anchors *is* — a line, or a cubic and its\n * controls.\n *\n * The decision lived twice, once per output format: `segmentData` wrote it as a\n * `d` string and `pushSegment` as a `PathCommand`, with the same rule about a\n * missing handle standing in as its own anchor written out both times.\n */\nfunction segmentBetween(from: PathAnchor, to: PathAnchor):\n | { line: true; to: Vector2 }\n | { line: false; c1: Vector2; c2: Vector2; to: Vector2 } {\n if (from.outHandle === null && to.inHandle === null) {\n return { line: true, to: to.point };\n }\n // A missing handle stands in as its own anchor, which is the degenerate cubic\n // that draws as a straight pull towards the other end — the same thing every\n // vector editor means by \"one side of this segment is a curve\".\n return {\n line: false,\n c1: from.outHandle ?? from.point,\n c2: to.inHandle ?? to.point,\n to: to.point,\n };\n}\n\n/**\n * Serializes the model back to a `d` string.\n *\n * Only `M`, `L`, `C` and `Z` are emitted — the four commands the editor can\n * round-trip — so what is stored is always what can be edited.\n */\nexport function fromAnchors(path: VectorPath): string {\n const parts: string[] = [];\n for (const { anchors, closed } of path) {\n if (anchors.length === 0) continue;\n parts.push(`M ${fmt(anchors[0].point.x)} ${fmt(anchors[0].point.y)}`);\n for (let i = 1; i < anchors.length; i++) {\n const segment = segmentBetween(anchors[i - 1], anchors[i]);\n parts.push(segment.line\n ? `L ${fmt(segment.to.x)} ${fmt(segment.to.y)}`\n : `C ${fmt(segment.c1.x)} ${fmt(segment.c1.y)} ${fmt(segment.c2.x)} ${fmt(segment.c2.y)} ${fmt(segment.to.x)} ${fmt(segment.to.y)}`);\n }\n if (closed) {\n if (anchors.length > 1) {\n const join = segmentBetween(anchors[anchors.length - 1], anchors[0]);\n // A straight closing segment is what `Z` already draws, so emitting\n // it as well would add the duplicate anchor `closeSubpath` undoes.\n if (!join.line) {\n parts.push(`C ${fmt(join.c1.x)} ${fmt(join.c1.y)} ${fmt(join.c2.x)} ${fmt(join.c2.y)} ${fmt(join.to.x)} ${fmt(join.to.y)}`);\n }\n }\n parts.push(\"Z\");\n }\n }\n return parts.join(\" \");\n}\n\nconst identity = (point: Vector2): Vector2 => point;\n\n/**\n * The model as drawable commands, with a transform folded into the same pass.\n *\n * Every caller needs one — unit box → the node's laid-out pixels, and y-down →\n * the renderer's y-up — and doing it here means one allocation per frame instead\n * of two, on a list rebuilt every time the node repaints.\n */\nexport function anchorCommands(\n path: VectorPath,\n transform: (point: Vector2) => Vector2 = identity,\n): PathCommand[] {\n const out: PathCommand[] = [];\n const emit = (from: PathAnchor, to: PathAnchor) => {\n const segment = segmentBetween(from, to);\n const end = transform(segment.to);\n if (segment.line) {\n out.push({ type: \"L\", x: end.x, y: end.y });\n return;\n }\n const c1 = transform(segment.c1);\n const c2 = transform(segment.c2);\n out.push({ type: \"C\", x1: c1.x, y1: c1.y, x2: c2.x, y2: c2.y, x: end.x, y: end.y });\n };\n\n for (const { anchors, closed } of path) {\n if (anchors.length === 0) continue;\n const start = transform(anchors[0].point);\n out.push({ type: \"M\", x: start.x, y: start.y });\n for (let i = 1; i < anchors.length; i++) emit(anchors[i - 1], anchors[i]);\n if (closed) {\n if (anchors.length > 1) {\n const from = anchors[anchors.length - 1];\n const to = anchors[0];\n if (from.outHandle !== null || to.inHandle !== null) emit(from, to);\n }\n out.push({ type: \"Z\" });\n }\n }\n return out;\n}\n\n// ── Measuring ──────────────────────────────────────────────────────────────\n\n/**\n * The path's tight bounding box, or `null` when it has no points.\n *\n * Tight, not the handle polygon's hull: a cubic's own extrema are solved for,\n * because the handles can sit a long way outside the curve and a box derived\n * from them would leave a visible gap between a normalized shape and the edge of\n * its node.\n */\nexport function anchorBounds(path: VectorPath): Extents | null {\n let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n let seen = false;\n\n const includeX = (x: number) => { seen = true; if (x < minX) minX = x; if (x > maxX) maxX = x; };\n const includeY = (y: number) => { seen = true; if (y < minY) minY = y; if (y > maxY) maxY = y; };\n\n for (const { anchors, closed } of path) {\n for (const anchor of anchors) {\n includeX(anchor.point.x);\n includeY(anchor.point.y);\n }\n // The closing join exists only with a second anchor to join: the writers\n // emit none for a lone one (`M x y Z` draws nothing), so its self-loop\n // must not widen the box either.\n const last = closed && anchors.length > 1 ? anchors.length : anchors.length - 1;\n for (let i = 0; i < last; i++) {\n const from = anchors[i];\n const to = anchors[(i + 1) % anchors.length];\n if (from.outHandle === null && to.inHandle === null) continue;\n const c1 = from.outHandle ?? from.point;\n const c2 = to.inHandle ?? to.point;\n for (const t of cubicExtrema(from.point.x, c1.x, c2.x, to.point.x)) {\n includeX(cubicAxis(t, from.point.x, c1.x, c2.x, to.point.x));\n }\n for (const t of cubicExtrema(from.point.y, c1.y, c2.y, to.point.y)) {\n includeY(cubicAxis(t, from.point.y, c1.y, c2.y, to.point.y));\n }\n }\n }\n\n return seen ? { minX, minY, maxX, maxY } : null;\n}\n\n// ── Transforming ───────────────────────────────────────────────────────────\n\n/** Applies `fn` to every point and handle, returning a new path. */\nexport function map(path: VectorPath, fn: (point: Vector2) => Vector2): VectorPath {\n return path.map((subpath) => ({\n closed: subpath.closed,\n anchors: subpath.anchors.map((anchor) => ({\n point: fn(anchor.point),\n inHandle: anchor.inHandle ? fn(anchor.inHandle) : null,\n outHandle: anchor.outHandle ? fn(anchor.outHandle) : null,\n })),\n }));\n}\n\n/**\n * The turn-and-scale about `start` that carries `end` onto `to` — how `moveTo`\n * fits a path aimed at another node. Where `start` and `end` coincide there is\n * no chord to turn, so it translates instead.\n */\nexport function endFit(start: Vector2, end: Vector2, to: Vector2): (point: Vector2) => Vector2 {\n const cx = end.x - start.x;\n const cy = end.y - start.y;\n const chord = cx * cx + cy * cy;\n if (chord < 1e-12) {\n const dx = to.x - end.x;\n const dy = to.y - end.y;\n return (p) => ({ x: p.x + dx, y: p.y + dy });\n }\n // (to - start) / (end - start) as complex numbers: a rotation and a uniform scale.\n const tx = to.x - start.x;\n const ty = to.y - start.y;\n const re = (tx * cx + ty * cy) / chord;\n const im = (ty * cx - tx * cy) / chord;\n return (p) => {\n const ux = p.x - start.x;\n const uy = p.y - start.y;\n return { x: start.x + re * ux - im * uy, y: start.y + im * ux + re * uy };\n };\n}\n\n/** Whether a path would draw anything at all. */\nexport function isEmpty(path: VectorPath): boolean {\n return path.every((subpath) => subpath.anchors.length < 2);\n}\n\n/**\n * The unit box's extent — the node's own layout rect, as a fraction of itself.\n *\n * Exported because two very different callers need the same half: a renderer\n * scales by the extent (1 unit = the node's full width), and an editor projects\n * a screen point into it.\n */\nexport const PATH_UNIT_EXTENT = 1;\n\n/** Half of {@link PATH_UNIT_EXTENT} — the distance from the centre to an edge. */\nexport const PATH_UNIT_HALF = PATH_UNIT_EXTENT / 2;\n\n/**\n * The box a path's coordinates are already quoted against — the node's own\n * frame, as {@link PATH_UNIT_HALF} either side of centre.\n */\nexport const UNIT_PATH_BOX: Extents = {\n minX: -PATH_UNIT_HALF,\n minY: -PATH_UNIT_HALF,\n maxX: PATH_UNIT_HALF,\n maxY: PATH_UNIT_HALF,\n};\n\n/**\n * Pulls the unit box back around the geometry.\n *\n * What an editor runs on the way *out* of a path edit, and the reason a node\n * whose points were dragged all over the canvas still ends up with a selection\n * box that hugs it. The caller pairs it with the node's own size and position:\n * the box grows by `scaleX`/`scaleY` and moves by `centerX`/`centerY` scaled\n * into the node's parent, so the drawing doesn't shift on screen while its frame\n * changes underneath it.\n */\nexport function normalize(path: VectorPath): PathNormalization {\n const bounds = anchorBounds(path);\n if (!bounds) return { path, scaleX: 1, scaleY: 1, centerX: 0, centerY: 0 };\n return fitToBox(path, bounds);\n}\n\n/**\n * Re-quotes a path against `box` — the general form of\n * {@link normalize}, which is this with the geometry's own bounds.\n *\n * The two callers want the same arithmetic for opposite reasons. A canvas editor\n * fits the box to the drawing on the way out, so a node drawn in a corner of its\n * frame ends up with a frame that hugs it. An appearance dialog lets the frame\n * be **stated** instead — dragged wider than the drawing to leave a margin, or\n * slid so the drawing sits off-centre — and then fits to that.\n *\n * A degenerate axis — every point on one line, which is a perfectly reasonable\n * thing to draw — keeps its scale at 1 rather than dividing by zero, so a flat\n * path stays where it is instead of becoming NaN.\n */\nexport function fitToBox(path: VectorPath, box: Extents): PathNormalization {\n const width = box.maxX - box.minX;\n const height = box.maxY - box.minY;\n const centerX = (box.minX + box.maxX) / 2;\n const centerY = (box.minY + box.maxY) / 2;\n const scaleX = width > 1e-9 ? width / PATH_UNIT_EXTENT : 1;\n const scaleY = height > 1e-9 ? height / PATH_UNIT_EXTENT : 1;\n\n return {\n path: map(path, (p) => ({\n x: (p.x - centerX) / scaleX,\n y: (p.y - centerY) / scaleY,\n })),\n scaleX,\n scaleY,\n centerX,\n centerY,\n };\n}\n\n/** Moves every point and handle by the same delta. */\nexport function translate(path: VectorPath, delta: Vector2): VectorPath {\n return map(path, (p) => ({ x: p.x + delta.x, y: p.y + delta.y }));\n}\n\n/**\n * A point on the segment between two anchors, at parameter `t`.\n *\n * An editor needs it twice over: to find where on a segment a click landed (so a\n * double-click can insert an anchor there), and to draw the preview of the\n * anchor that insertion would create.\n */\nexport function pointOn(from: PathAnchor, to: PathAnchor, t: number): Vector2 {\n if (from.outHandle === null && to.inHandle === null) {\n return {\n x: from.point.x + (to.point.x - from.point.x) * t,\n y: from.point.y + (to.point.y - from.point.y) * t,\n };\n }\n const c1 = from.outHandle ?? from.point;\n const c2 = to.inHandle ?? to.point;\n return {\n x: cubicAxis(t, from.point.x, c1.x, c2.x, to.point.x),\n y: cubicAxis(t, from.point.y, c1.y, c2.y, to.point.y),\n };\n}\n\n/**\n * Splits the segment between two anchors at `t`, returning the three anchors\n * that replace them — the two ends with their outer handles shortened, and the\n * new anchor in the middle carrying both halves of the split tangent.\n *\n * De Casteljau, which is what makes the insertion *invisible*: the curve through\n * the new point is the same curve, so double-clicking a segment adds somewhere\n * to grab rather than changing the shape under the pointer.\n */\nexport function split(\n from: PathAnchor, to: PathAnchor, t: number,\n): { from: PathAnchor; middle: PathAnchor; to: PathAnchor } {\n if (from.outHandle === null && to.inHandle === null) {\n return {\n from,\n middle: { point: pointOn(from, to, t), inHandle: null, outHandle: null },\n to,\n };\n }\n\n const { left, right } = splitCubicAt(\n from.point,\n from.outHandle ?? from.point,\n to.inHandle ?? to.point,\n to.point,\n t,\n );\n return {\n from: { ...from, outHandle: left.cp1 },\n middle: { point: left.to, inHandle: left.cp2, outHandle: right.cp1 },\n to: { ...to, inHandle: right.cp2 },\n };\n}\n"]}
1
+ {"version":3,"file":"anchors.js","sourceRoot":"","sources":["../../../../src/attributes/shape/path/anchors.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAI9C,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,qEAAqE;AACrE,SAAS,SAAS,CAAC,CAAU,EAAE,CAAU;IACrC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AACpE,CAAC;AAED,iMAAiM;AACjM,SAAS,YAAY,CAAC,OAAoB;IACtC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO;IAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO;IAChD,8EAA8E;IAC9E,wCAAwC;IACxC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,OAAO,CAAC,GAAG,EAAE,CAAC;AAClB,CAAC;AAED,g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AAO,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;YACxE,EAAE;SACL,CAAC;IACN,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,CAChC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,EAC5B,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,KAAK,EACvB,EAAE,CAAC,KAAK,EACR,CAAC,CACJ,CAAC;IACF,OAAO;QACH,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACtC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG,EAAE;QACpE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,EAAE;KACrC,CAAC;AACN,CAAC","sourcesContent":["/**\n * The editable vector model: subpaths of anchors, each with the two bezier handles of the segments either side\n * (Figma's model). The **second** boundary where geometry is deliberately flattened to one curve type: an arc has\n * no handles to drag, so it becomes cubics on the way in.\n *\n * **The coordinate space is the node's own box**: `x`/`y` run -0.5 to +0.5 across its width and height, y pointing\n * *down* as in SVG. Resizing is then an ordinary width/height drag, since geometry is a fraction of the box. Points\n * *may* sit outside it (a point dragged past an edge); {@link normalize} pulls the box back around the geometry once,\n * on the way out of an edit.\n */\nimport { Vector2 } from \"@/attributes/layout/vector2\";\nimport { PathCommand, PathData } from \"@/render/descriptors/path\";\nimport { arcSweepToCubics, cubicAxis, cubicExtrema, quadToCubic, splitCubicAt } from \"./bezier\";\nimport { contours, segmentArc } from \"./walk\";\nimport type { Extents } from \"@/layout/bounds\";\nimport type { Cubic, PathAnchor, PathContour, PathNormalization, PathSubpath, VectorPath } from \"./types\";\n\n/** An empty path, as the value an unset `data` field resolves to. */\nexport const EMPTY_PATH_DATA = \"\";\n\n/** Whether two points are the same to within serialization noise. */\nfunction samePoint(a: Vector2, b: Vector2): boolean {\n return Math.abs(a.x - b.x) < 1e-6 && Math.abs(a.y - b.y) < 1e-6;\n}\n\n/** Marks a subpath closed, folding a duplicated last anchor into the first: a `d` ending `… L 0 0 Z` names the start twice, and left alone the round trip would grow an anchor on every load. */\nfunction closeSubpath(subpath: PathSubpath): void {\n subpath.closed = true;\n const { anchors } = subpath;\n if (anchors.length < 2) return;\n const first = anchors[0];\n const last = anchors[anchors.length - 1];\n if (!samePoint(first.point, last.point)) return;\n // The closing segment's own curvature belongs to the join, so the duplicate's\n // in-handle becomes the first anchor's.\n first.inHandle = last.inHandle;\n anchors.pop();\n}\n\n/** A copy of a point of the memoized contour — the model is edited in place. */\nconst copy = (v: Vector2): Vector2 => ({ x: v.x, y: v.y });\n\nfunction contourToSubpath(contour: PathContour): PathSubpath {\n // Every point and handle is copied out of the memoized contour: `contours`\n // shares its result between callers, and an editor moves these in place.\n const anchors: PathAnchor[] = [\n { point: copy(contour.start), inHandle: null, outHandle: null },\n ];\n const curve = (cubic: Cubic) => {\n anchors[anchors.length - 1].outHandle = copy(cubic.c1);\n anchors.push({ point: copy(cubic.p1), inHandle: copy(cubic.c2), outHandle: null });\n };\n\n for (const segment of contour.segments) {\n switch (segment.kind) {\n case \"line\":\n // Both handles stay null, which is what draws a straight segment.\n anchors.push({ point: copy(segment.to), inHandle: null, outHandle: null });\n break;\n case \"cubic\":\n curve({ p0: segment.from, c1: segment.c1, c2: segment.c2, p1: segment.to });\n break;\n case \"quad\":\n curve(quadToCubic(segment.from, segment.c, segment.to));\n break;\n case \"arc\": {\n const arc = segmentArc(segment);\n for (const cubic of arcSweepToCubics(arc, arc.theta1, arc.theta1 + arc.dtheta)) {\n curve(cubic);\n }\n break;\n }\n }\n }\n\n const subpath: PathSubpath = { anchors, closed: false };\n if (contour.closed) closeSubpath(subpath);\n return subpath;\n}\n\n/** Any {@link PathData} as the editable model. Takes `PathData`, not a string: a morph hands over a `PathCommand[]` at every `t` strictly between 0 and 1, which string-only callers drew as nothing. */\nexport function anchors(d: PathData | null | undefined): VectorPath {\n return contours(d)\n .map(contourToSubpath)\n .filter((subpath) => subpath.anchors.length > 0);\n}\n\n/** Decimals a stored coordinate keeps: sub-pixel on a 10,000px node (a coordinate is a fraction of its size) and stable, so a drag that lands where it started re-serializes identically. */\nconst COORD_PRECISION = 5;\n\nfunction fmt(value: number): string {\n if (!Number.isFinite(value)) return \"0\";\n const rounded = Number(value.toFixed(COORD_PRECISION));\n // `-0` serializes as \"0\": the two are the same point, and a sign that flips\n // with the wind would make the \"did anything change\" comparison lie.\n return String(rounded === 0 ? 0 : rounded);\n}\n\n/** What one segment between two anchors *is*: a line, or a cubic and its controls. Shared by both output formats (`d` string and `PathCommand`). */\nfunction segmentBetween(from: PathAnchor, to: PathAnchor):\n | { line: true; to: Vector2 }\n | { line: false; c1: Vector2; c2: Vector2; to: Vector2 } {\n if (from.outHandle === null && to.inHandle === null) {\n return { line: true, to: to.point };\n }\n // A missing handle stands in as its own anchor: the degenerate cubic that draws as a straight pull towards the other end.\n return {\n line: false,\n c1: from.outHandle ?? from.point,\n c2: to.inHandle ?? to.point,\n to: to.point,\n };\n}\n\n/** Serializes the model back to a `d` string. Only `M`, `L`, `C` and `Z` are emitted, so what is stored can always be edited. */\nexport function fromAnchors(path: VectorPath): string {\n const parts: string[] = [];\n for (const { anchors, closed } of path) {\n if (anchors.length === 0) continue;\n parts.push(`M ${fmt(anchors[0].point.x)} ${fmt(anchors[0].point.y)}`);\n for (let i = 1; i < anchors.length; i++) {\n const segment = segmentBetween(anchors[i - 1], anchors[i]);\n parts.push(segment.line\n ? `L ${fmt(segment.to.x)} ${fmt(segment.to.y)}`\n : `C ${fmt(segment.c1.x)} ${fmt(segment.c1.y)} ${fmt(segment.c2.x)} ${fmt(segment.c2.y)} ${fmt(segment.to.x)} ${fmt(segment.to.y)}`);\n }\n if (closed) {\n if (anchors.length > 1) {\n const join = segmentBetween(anchors[anchors.length - 1], anchors[0]);\n // A straight closing segment is what `Z` already draws, so emitting\n // it as well would add the duplicate anchor `closeSubpath` undoes.\n if (!join.line) {\n parts.push(`C ${fmt(join.c1.x)} ${fmt(join.c1.y)} ${fmt(join.c2.x)} ${fmt(join.c2.y)} ${fmt(join.to.x)} ${fmt(join.to.y)}`);\n }\n }\n parts.push(\"Z\");\n }\n }\n return parts.join(\" \");\n}\n\nconst identity = (point: Vector2): Vector2 => point;\n\n/** The model as drawable commands, with a transform (unit box -> laid-out pixels, y-down -> y-up) folded into the same pass: one allocation per repaint instead of two. */\nexport function anchorCommands(\n path: VectorPath,\n transform: (point: Vector2) => Vector2 = identity,\n): PathCommand[] {\n const out: PathCommand[] = [];\n const emit = (from: PathAnchor, to: PathAnchor) => {\n const segment = segmentBetween(from, to);\n const end = transform(segment.to);\n if (segment.line) {\n out.push({ type: \"L\", x: end.x, y: end.y });\n return;\n }\n const c1 = transform(segment.c1);\n const c2 = transform(segment.c2);\n out.push({ type: \"C\", x1: c1.x, y1: c1.y, x2: c2.x, y2: c2.y, x: end.x, y: end.y });\n };\n\n for (const { anchors, closed } of path) {\n if (anchors.length === 0) continue;\n const start = transform(anchors[0].point);\n out.push({ type: \"M\", x: start.x, y: start.y });\n for (let i = 1; i < anchors.length; i++) emit(anchors[i - 1], anchors[i]);\n if (closed) {\n if (anchors.length > 1) {\n const from = anchors[anchors.length - 1];\n const to = anchors[0];\n if (from.outHandle !== null || to.inHandle !== null) emit(from, to);\n }\n out.push({ type: \"Z\" });\n }\n }\n return out;\n}\n\n/** The path's tight bounding box (a cubic's own extrema, not the handle hull, which would leave a gap to the node's edge), or `null` when it has no points. */\nexport function anchorBounds(path: VectorPath): Extents | null {\n let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n let seen = false;\n\n const includeX = (x: number) => { seen = true; if (x < minX) minX = x; if (x > maxX) maxX = x; };\n const includeY = (y: number) => { seen = true; if (y < minY) minY = y; if (y > maxY) maxY = y; };\n\n for (const { anchors, closed } of path) {\n for (const anchor of anchors) {\n includeX(anchor.point.x);\n includeY(anchor.point.y);\n }\n // The closing join exists only with a second anchor to join: the writers\n // emit none for a lone one (`M x y Z` draws nothing), so its self-loop\n // must not widen the box either.\n const last = closed && anchors.length > 1 ? anchors.length : anchors.length - 1;\n for (let i = 0; i < last; i++) {\n const from = anchors[i];\n const to = anchors[(i + 1) % anchors.length];\n if (from.outHandle === null && to.inHandle === null) continue;\n const c1 = from.outHandle ?? from.point;\n const c2 = to.inHandle ?? to.point;\n for (const t of cubicExtrema(from.point.x, c1.x, c2.x, to.point.x)) {\n includeX(cubicAxis(t, from.point.x, c1.x, c2.x, to.point.x));\n }\n for (const t of cubicExtrema(from.point.y, c1.y, c2.y, to.point.y)) {\n includeY(cubicAxis(t, from.point.y, c1.y, c2.y, to.point.y));\n }\n }\n }\n\n return seen ? { minX, minY, maxX, maxY } : null;\n}\n\nexport function map(path: VectorPath, fn: (point: Vector2) => Vector2): VectorPath {\n return path.map((subpath) => ({\n closed: subpath.closed,\n anchors: subpath.anchors.map((anchor) => ({\n point: fn(anchor.point),\n inHandle: anchor.inHandle ? fn(anchor.inHandle) : null,\n outHandle: anchor.outHandle ? fn(anchor.outHandle) : null,\n })),\n }));\n}\n\n/** The turn-and-scale about `start` that carries `end` onto `to` (how `moveTo` fits a path at another node); translates when `start` and `end` coincide. */\nexport function endFit(start: Vector2, end: Vector2, to: Vector2): (point: Vector2) => Vector2 {\n const cx = end.x - start.x;\n const cy = end.y - start.y;\n const chord = cx * cx + cy * cy;\n if (chord < 1e-12) {\n const dx = to.x - end.x;\n const dy = to.y - end.y;\n return (p) => ({ x: p.x + dx, y: p.y + dy });\n }\n // (to - start) / (end - start) as complex numbers: a rotation and a uniform scale.\n const tx = to.x - start.x;\n const ty = to.y - start.y;\n const re = (tx * cx + ty * cy) / chord;\n const im = (ty * cx - tx * cy) / chord;\n return (p) => {\n const ux = p.x - start.x;\n const uy = p.y - start.y;\n return { x: start.x + re * ux - im * uy, y: start.y + im * ux + re * uy };\n };\n}\n\nexport function isEmpty(path: VectorPath): boolean {\n return path.every((subpath) => subpath.anchors.length < 2);\n}\n\n/** The unit box's extent: the node's layout rect as a fraction of itself. A renderer scales by it; an editor projects a screen point into it. */\nexport const PATH_UNIT_EXTENT = 1;\n\nexport const PATH_UNIT_HALF = PATH_UNIT_EXTENT / 2;\n\n/** The box a path's coordinates are quoted against: the node's own frame, {@link PATH_UNIT_HALF} either side of centre. */\nexport const UNIT_PATH_BOX: Extents = {\n minX: -PATH_UNIT_HALF,\n minY: -PATH_UNIT_HALF,\n maxX: PATH_UNIT_HALF,\n maxY: PATH_UNIT_HALF,\n};\n\n/** Pulls the unit box back around the geometry, run on the way out of a path edit. The caller pairs it with the node's size and position (grow by `scaleX`/`scaleY`, move by `centerX`/`centerY`) so the drawing doesn't shift on screen. */\nexport function normalize(path: VectorPath): PathNormalization {\n const bounds = anchorBounds(path);\n if (!bounds) return { path, scaleX: 1, scaleY: 1, centerX: 0, centerY: 0 };\n return fitToBox(path, bounds);\n}\n\n/** Re-quotes a path against `box`; {@link normalize} is this with the geometry's own bounds. A dialog can instead *state* the frame (margin, off-centre). A degenerate axis (all points on a line) keeps scale 1 instead of dividing by zero. */\nexport function fitToBox(path: VectorPath, box: Extents): PathNormalization {\n const width = box.maxX - box.minX;\n const height = box.maxY - box.minY;\n const centerX = (box.minX + box.maxX) / 2;\n const centerY = (box.minY + box.maxY) / 2;\n const scaleX = width > 1e-9 ? width / PATH_UNIT_EXTENT : 1;\n const scaleY = height > 1e-9 ? height / PATH_UNIT_EXTENT : 1;\n\n return {\n path: map(path, (p) => ({\n x: (p.x - centerX) / scaleX,\n y: (p.y - centerY) / scaleY,\n })),\n scaleX,\n scaleY,\n centerX,\n centerY,\n };\n}\n\nexport function translate(path: VectorPath, delta: Vector2): VectorPath {\n return map(path, (p) => ({ x: p.x + delta.x, y: p.y + delta.y }));\n}\n\n/** A point on the segment between two anchors at `t`: where a click landed, and the preview of the anchor an insertion would create. */\nexport function pointOn(from: PathAnchor, to: PathAnchor, t: number): Vector2 {\n if (from.outHandle === null && to.inHandle === null) {\n return {\n x: from.point.x + (to.point.x - from.point.x) * t,\n y: from.point.y + (to.point.y - from.point.y) * t,\n };\n }\n const c1 = from.outHandle ?? from.point;\n const c2 = to.inHandle ?? to.point;\n return {\n x: cubicAxis(t, from.point.x, c1.x, c2.x, to.point.x),\n y: cubicAxis(t, from.point.y, c1.y, c2.y, to.point.y),\n };\n}\n\n/** Splits the segment at `t` into the three anchors that replace the pair (ends with shortened outer handles, new anchor carrying both halves of the tangent). De Casteljau keeps the curve identical, so insertion is invisible. */\nexport function split(\n from: PathAnchor, to: PathAnchor, t: number,\n): { from: PathAnchor; middle: PathAnchor; to: PathAnchor } {\n if (from.outHandle === null && to.inHandle === null) {\n return {\n from,\n middle: { point: pointOn(from, to, t), inHandle: null, outHandle: null },\n to,\n };\n }\n\n const { left, right } = splitCubicAt(\n from.point,\n from.outHandle ?? from.point,\n to.inHandle ?? to.point,\n to.point,\n t,\n );\n return {\n from: { ...from, outHandle: left.cp1 },\n middle: { point: left.to, inHandle: left.cp2, outHandle: right.cp1 },\n to: { ...to, inHandle: right.cp2 },\n };\n}\n"]}