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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1064) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/assets/asset-index.d.ts +1 -8
  3. package/dist/assets/asset-index.d.ts.map +1 -1
  4. package/dist/assets/asset-index.js +1 -8
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +10 -72
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +3 -29
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts +8 -20
  11. package/dist/assets/errors.d.ts.map +1 -1
  12. package/dist/assets/errors.js +8 -20
  13. package/dist/assets/errors.js.map +1 -1
  14. package/dist/assets/index.d.ts.map +1 -1
  15. package/dist/assets/index.js.map +1 -1
  16. package/dist/assets/manager.d.ts +9 -51
  17. package/dist/assets/manager.d.ts.map +1 -1
  18. package/dist/assets/manager.js +13 -78
  19. package/dist/assets/manager.js.map +1 -1
  20. package/dist/assets/record.d.ts +2 -18
  21. package/dist/assets/record.d.ts.map +1 -1
  22. package/dist/assets/record.js.map +1 -1
  23. package/dist/assets/scope.d.ts +3 -18
  24. package/dist/assets/scope.d.ts.map +1 -1
  25. package/dist/assets/scope.js +2 -11
  26. package/dist/assets/scope.js.map +1 -1
  27. package/dist/attributes/audio/effects/chain.d.ts +2 -12
  28. package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
  29. package/dist/attributes/audio/effects/chain.js +1 -7
  30. package/dist/attributes/audio/effects/chain.js.map +1 -1
  31. package/dist/attributes/audio/effects/registry.d.ts +3 -18
  32. package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
  33. package/dist/attributes/audio/effects/registry.js +4 -23
  34. package/dist/attributes/audio/effects/registry.js.map +1 -1
  35. package/dist/attributes/audio/ramp.d.ts +5 -38
  36. package/dist/attributes/audio/ramp.d.ts.map +1 -1
  37. package/dist/attributes/audio/ramp.js +3 -28
  38. package/dist/attributes/audio/ramp.js.map +1 -1
  39. package/dist/attributes/audio/request.d.ts +10 -80
  40. package/dist/attributes/audio/request.d.ts.map +1 -1
  41. package/dist/attributes/audio/request.js +1 -4
  42. package/dist/attributes/audio/request.js.map +1 -1
  43. package/dist/attributes/audio/schedule.d.ts +2 -12
  44. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  45. package/dist/attributes/audio/schedule.js +2 -11
  46. package/dist/attributes/audio/schedule.js.map +1 -1
  47. package/dist/attributes/audio/sound.d.ts +2 -26
  48. package/dist/attributes/audio/sound.d.ts.map +1 -1
  49. package/dist/attributes/audio/sound.js +1 -9
  50. package/dist/attributes/audio/sound.js.map +1 -1
  51. package/dist/attributes/audio/transition.d.ts +1 -8
  52. package/dist/attributes/audio/transition.d.ts.map +1 -1
  53. package/dist/attributes/audio/transition.js.map +1 -1
  54. package/dist/attributes/layout/alignment.d.ts +6 -38
  55. package/dist/attributes/layout/alignment.d.ts.map +1 -1
  56. package/dist/attributes/layout/alignment.js.map +1 -1
  57. package/dist/attributes/layout/insets.d.ts +2 -27
  58. package/dist/attributes/layout/insets.d.ts.map +1 -1
  59. package/dist/attributes/layout/insets.js.map +1 -1
  60. package/dist/attributes/layout/matrix2d.d.ts +29 -114
  61. package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
  62. package/dist/attributes/layout/matrix2d.js +26 -110
  63. package/dist/attributes/layout/matrix2d.js.map +1 -1
  64. package/dist/attributes/layout/size.d.ts +3 -25
  65. package/dist/attributes/layout/size.d.ts.map +1 -1
  66. package/dist/attributes/layout/size.js +2 -18
  67. package/dist/attributes/layout/size.js.map +1 -1
  68. package/dist/attributes/layout/space3d.d.ts +16 -79
  69. package/dist/attributes/layout/space3d.d.ts.map +1 -1
  70. package/dist/attributes/layout/space3d.js +17 -81
  71. package/dist/attributes/layout/space3d.js.map +1 -1
  72. package/dist/attributes/layout/transform3d.d.ts +2 -23
  73. package/dist/attributes/layout/transform3d.d.ts.map +1 -1
  74. package/dist/attributes/layout/transform3d.js +1 -7
  75. package/dist/attributes/layout/transform3d.js.map +1 -1
  76. package/dist/attributes/layout/world-transform.d.ts +2 -16
  77. package/dist/attributes/layout/world-transform.d.ts.map +1 -1
  78. package/dist/attributes/layout/world-transform.js.map +1 -1
  79. package/dist/attributes/properties/decorator.d.ts +13 -73
  80. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  81. package/dist/attributes/properties/decorator.js +9 -40
  82. package/dist/attributes/properties/decorator.js.map +1 -1
  83. package/dist/attributes/properties/typed.d.ts +6 -45
  84. package/dist/attributes/properties/typed.d.ts.map +1 -1
  85. package/dist/attributes/properties/typed.js +6 -37
  86. package/dist/attributes/properties/typed.js.map +1 -1
  87. package/dist/attributes/render3d/orbit.d.ts +11 -83
  88. package/dist/attributes/render3d/orbit.d.ts.map +1 -1
  89. package/dist/attributes/render3d/orbit.js +10 -73
  90. package/dist/attributes/render3d/orbit.js.map +1 -1
  91. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
  92. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  94. package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
  95. package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
  96. package/dist/attributes/shape/corners/corner-style.js +2 -12
  97. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  98. package/dist/attributes/shape/corners/corners.d.ts +2 -21
  99. package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js +2 -12
  101. package/dist/attributes/shape/corners/corners.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
  103. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  104. package/dist/attributes/shape/effects/backdrop.js +3 -26
  105. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  106. package/dist/attributes/shape/effects/chain.d.ts +36 -328
  107. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  108. package/dist/attributes/shape/effects/chain.js +24 -242
  109. package/dist/attributes/shape/effects/chain.js.map +1 -1
  110. package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
  111. package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
  112. package/dist/attributes/shape/effects/effect-data.js +6 -33
  113. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  114. package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
  115. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
  117. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
  119. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
  121. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
  123. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
  125. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
  127. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  128. package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
  129. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
  131. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/blur.js +0 -1
  133. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
  135. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  136. package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
  137. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  138. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
  139. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  140. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
  141. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  142. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
  143. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  144. package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
  145. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  146. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
  147. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  148. package/dist/attributes/shape/effects/implementations/curves.js +1 -6
  149. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  150. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
  151. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  152. package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
  153. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  154. package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
  155. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  156. package/dist/attributes/shape/effects/implementations/dither.js +1 -7
  157. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  158. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
  159. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  160. package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
  161. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  162. package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
  163. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  164. package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
  165. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  166. package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
  167. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  168. package/dist/attributes/shape/effects/implementations/edges.js +0 -1
  169. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  170. package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
  171. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  172. package/dist/attributes/shape/effects/implementations/glass.js +0 -1
  173. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  174. package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
  175. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  176. package/dist/attributes/shape/effects/implementations/glow.js +1 -9
  177. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  178. package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
  179. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  180. package/dist/attributes/shape/effects/implementations/grain.js +0 -1
  181. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  182. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
  183. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  184. package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
  185. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  186. package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
  187. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  188. package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
  189. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  190. package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
  191. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  192. package/dist/attributes/shape/effects/implementations/invert.js +0 -1
  193. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  194. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
  195. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  196. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
  197. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  198. package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
  199. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  200. package/dist/attributes/shape/effects/implementations/lut.js +2 -8
  201. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  202. package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
  203. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  204. package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
  205. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  206. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
  207. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  208. package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
  209. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  210. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
  211. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  212. package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
  213. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  214. package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
  215. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  216. package/dist/attributes/shape/effects/implementations/outline.js +0 -1
  217. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  218. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
  219. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  220. package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
  221. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  222. package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
  223. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  224. package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
  225. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  226. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
  227. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  228. package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
  229. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  230. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
  231. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  232. package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
  233. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  234. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
  235. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  236. package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
  237. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  238. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
  239. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  240. package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
  241. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  242. package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
  243. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  244. package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
  245. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  246. package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
  247. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  248. package/dist/attributes/shape/effects/implementations/shader.js +2 -9
  249. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  250. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
  251. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  252. package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
  253. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  254. package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
  255. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  256. package/dist/attributes/shape/effects/implementations/streak.js +0 -1
  257. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  258. package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
  259. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  260. package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
  261. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  262. package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
  263. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  264. package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
  265. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  266. package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
  267. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  268. package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
  269. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  270. package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
  271. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  272. package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
  273. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  274. package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
  275. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  276. package/dist/attributes/shape/effects/implementations/wave.js +1 -5
  277. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  278. package/dist/attributes/shape/effects/registry.d.ts +6 -41
  279. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  280. package/dist/attributes/shape/effects/registry.js +7 -45
  281. package/dist/attributes/shape/effects/registry.js.map +1 -1
  282. package/dist/attributes/shape/effects/spec.d.ts +6 -30
  283. package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
  284. package/dist/attributes/shape/effects/spec.js +3 -9
  285. package/dist/attributes/shape/effects/spec.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.d.ts +1 -17
  287. package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
  288. package/dist/attributes/shape/fill/blend.js +2 -15
  289. package/dist/attributes/shape/fill/blend.js.map +1 -1
  290. package/dist/attributes/shape/fill/chain.d.ts +17 -125
  291. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  292. package/dist/attributes/shape/fill/chain.js +22 -109
  293. package/dist/attributes/shape/fill/chain.js.map +1 -1
  294. package/dist/attributes/shape/fill/coerce.d.ts +10 -35
  295. package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
  296. package/dist/attributes/shape/fill/coerce.js +12 -47
  297. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  298. package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
  299. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  300. package/dist/attributes/shape/fill/color/parser.js +35 -96
  301. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  302. package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
  303. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
  304. package/dist/attributes/shape/fill/gradient-stops.js +2 -13
  305. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  306. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
  307. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
  308. package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
  309. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
  311. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
  312. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  313. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
  314. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  315. package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
  316. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  317. package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
  318. package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
  319. package/dist/attributes/shape/fill/implementations/grid.js +2 -8
  320. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  321. package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
  322. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  323. package/dist/attributes/shape/fill/implementations/image.js +6 -23
  324. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  325. package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
  326. package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
  327. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  328. package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
  329. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  330. package/dist/attributes/shape/fill/implementations/shader.js +5 -17
  331. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  332. package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
  333. package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
  334. package/dist/attributes/shape/fill/implementations/video.js +12 -50
  335. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  336. package/dist/attributes/shape/fill/lerp.d.ts +2 -13
  337. package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
  338. package/dist/attributes/shape/fill/lerp.js +2 -9
  339. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  340. package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
  341. package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
  342. package/dist/attributes/shape/fill/media-preset.js +8 -35
  343. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  344. package/dist/attributes/shape/fill/registry.d.ts +2 -26
  345. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  346. package/dist/attributes/shape/fill/registry.js +5 -40
  347. package/dist/attributes/shape/fill/registry.js.map +1 -1
  348. package/dist/attributes/shape/fill/union.d.ts +6 -30
  349. package/dist/attributes/shape/fill/union.d.ts.map +1 -1
  350. package/dist/attributes/shape/fill/union.js +1 -9
  351. package/dist/attributes/shape/fill/union.js.map +1 -1
  352. package/dist/attributes/shape/filters/chain.d.ts +15 -168
  353. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  354. package/dist/attributes/shape/filters/chain.js +8 -132
  355. package/dist/attributes/shape/filters/chain.js.map +1 -1
  356. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
  357. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  358. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  359. package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
  360. package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
  361. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  362. package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
  363. package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
  364. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  365. package/dist/attributes/shape/filters/index.d.ts +1 -6
  366. package/dist/attributes/shape/filters/index.d.ts.map +1 -1
  367. package/dist/attributes/shape/filters/index.js +0 -2
  368. package/dist/attributes/shape/filters/index.js.map +1 -1
  369. package/dist/attributes/shape/filters/registry.d.ts +5 -35
  370. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  371. package/dist/attributes/shape/filters/registry.js +7 -50
  372. package/dist/attributes/shape/filters/registry.js.map +1 -1
  373. package/dist/attributes/shape/filters/union.d.ts +10 -51
  374. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  375. package/dist/attributes/shape/filters/union.js.map +1 -1
  376. package/dist/attributes/shape/path/anchors.d.ts +18 -106
  377. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  378. package/dist/attributes/shape/path/anchors.js +15 -124
  379. package/dist/attributes/shape/path/anchors.js.map +1 -1
  380. package/dist/attributes/shape/path/bezier.d.ts +6 -54
  381. package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
  382. package/dist/attributes/shape/path/bezier.js +10 -98
  383. package/dist/attributes/shape/path/bezier.js.map +1 -1
  384. package/dist/attributes/shape/path/index.d.ts +1 -11
  385. package/dist/attributes/shape/path/index.d.ts.map +1 -1
  386. package/dist/attributes/shape/path/index.js +1 -11
  387. package/dist/attributes/shape/path/index.js.map +1 -1
  388. package/dist/attributes/shape/path/measure.d.ts +5 -41
  389. package/dist/attributes/shape/path/measure.d.ts.map +1 -1
  390. package/dist/attributes/shape/path/measure.js +8 -57
  391. package/dist/attributes/shape/path/measure.js.map +1 -1
  392. package/dist/attributes/shape/path/morph.d.ts +4 -41
  393. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  394. package/dist/attributes/shape/path/morph.js +17 -117
  395. package/dist/attributes/shape/path/morph.js.map +1 -1
  396. package/dist/attributes/shape/path/ops.d.ts +5 -19
  397. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  398. package/dist/attributes/shape/path/ops.js.map +1 -1
  399. package/dist/attributes/shape/path/types.d.ts +10 -67
  400. package/dist/attributes/shape/path/types.d.ts.map +1 -1
  401. package/dist/attributes/shape/path/types.js +0 -1
  402. package/dist/attributes/shape/path/types.js.map +1 -1
  403. package/dist/attributes/shape/path/walk.d.ts +9 -63
  404. package/dist/attributes/shape/path/walk.d.ts.map +1 -1
  405. package/dist/attributes/shape/path/walk.js +21 -100
  406. package/dist/attributes/shape/path/walk.js.map +1 -1
  407. package/dist/attributes/shape/shaders/language.d.ts +2 -14
  408. package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
  409. package/dist/attributes/shape/shaders/language.js +1 -8
  410. package/dist/attributes/shape/shaders/language.js.map +1 -1
  411. package/dist/attributes/shape/shaders/pack.d.ts +13 -78
  412. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  413. package/dist/attributes/shape/shaders/pack.js +1 -10
  414. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  415. package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
  416. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  417. package/dist/attributes/shape/shaders/resolve.js +3 -28
  418. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  419. package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
  420. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
  421. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  422. package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
  423. package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
  424. package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
  425. package/dist/attributes/shape/shadow/shadow.js +0 -3
  426. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  427. package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
  428. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  429. package/dist/attributes/shape/stroke/stroke.js +0 -6
  430. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  431. package/dist/attributes/shared/operators.d.ts +1 -8
  432. package/dist/attributes/shared/operators.d.ts.map +1 -1
  433. package/dist/attributes/shared/operators.js.map +1 -1
  434. package/dist/attributes/text/index.d.ts +1 -11
  435. package/dist/attributes/text/index.d.ts.map +1 -1
  436. package/dist/attributes/text/index.js +1 -11
  437. package/dist/attributes/text/index.js.map +1 -1
  438. package/dist/attributes/text/ops.d.ts +4 -30
  439. package/dist/attributes/text/ops.d.ts.map +1 -1
  440. package/dist/attributes/text/ops.js +7 -23
  441. package/dist/attributes/text/ops.js.map +1 -1
  442. package/dist/attributes/text/types.d.ts +5 -28
  443. package/dist/attributes/text/types.d.ts.map +1 -1
  444. package/dist/attributes/text/types.js.map +1 -1
  445. package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
  446. package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
  447. package/dist/browser/chunks/chunk-5TDMGUXQ.js +3 -0
  448. package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
  449. package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
  450. package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
  451. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  452. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/views.d.ts.map +1 -1
  510. package/dist/components/factory/views.js +41 -3
  511. package/dist/components/factory/views.js.map +1 -1
  512. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  513. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  514. package/dist/components/trees/2d/group-bounds.js +3 -22
  515. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  516. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  517. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  518. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  519. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  520. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  521. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  522. package/dist/components/trees/2d/node-motion.js +3 -31
  523. package/dist/components/trees/2d/node-motion.js.map +1 -1
  524. package/dist/components/trees/2d/node-render.d.ts +3 -20
  525. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-render.js +4 -23
  527. package/dist/components/trees/2d/node-render.js.map +1 -1
  528. package/dist/components/trees/2d/node-space.d.ts +4 -23
  529. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-space.js +3 -17
  531. package/dist/components/trees/2d/node-space.js.map +1 -1
  532. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  533. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-transform.js +4 -33
  535. package/dist/components/trees/2d/node-transform.js.map +1 -1
  536. package/dist/components/trees/2d/node2d.d.ts +112 -622
  537. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node2d.js +131 -605
  539. package/dist/components/trees/2d/node2d.js.map +1 -1
  540. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  541. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  542. package/dist/components/trees/audio/node-audio.js +18 -68
  543. package/dist/components/trees/audio/node-audio.js.map +1 -1
  544. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  545. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  546. package/dist/components/trees/node/node-editor-state.js +1 -13
  547. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  548. package/dist/components/trees/node/node-reactive.d.ts +6 -54
  549. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  550. package/dist/components/trees/node/node-reactive.js +13 -39
  551. package/dist/components/trees/node/node-reactive.js.map +1 -1
  552. package/dist/components/trees/node/node-time.d.ts +2 -15
  553. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-time.js.map +1 -1
  555. package/dist/components/trees/node/node-walk.d.ts +7 -32
  556. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  557. package/dist/components/trees/node/node-walk.js +7 -32
  558. package/dist/components/trees/node/node-walk.js.map +1 -1
  559. package/dist/components/trees/node/node.d.ts +43 -248
  560. package/dist/components/trees/node/node.d.ts.map +1 -1
  561. package/dist/components/trees/node/node.js +51 -229
  562. package/dist/components/trees/node/node.js.map +1 -1
  563. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  564. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  565. package/dist/components/trees/root/canvas2d-node.js +7 -47
  566. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  567. package/dist/components/trees/three/node3d.d.ts +24 -112
  568. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  569. package/dist/components/trees/three/node3d.js +22 -104
  570. package/dist/components/trees/three/node3d.js.map +1 -1
  571. package/dist/document/audio.d.ts +9 -21
  572. package/dist/document/audio.d.ts.map +1 -1
  573. package/dist/document/audio.js +13 -28
  574. package/dist/document/audio.js.map +1 -1
  575. package/dist/document/builtins.d.ts +3 -9
  576. package/dist/document/builtins.d.ts.map +1 -1
  577. package/dist/document/builtins.js +43 -89
  578. package/dist/document/builtins.js.map +1 -1
  579. package/dist/document/command-traits.d.ts +15 -30
  580. package/dist/document/command-traits.d.ts.map +1 -1
  581. package/dist/document/command-traits.js +31 -31
  582. package/dist/document/command-traits.js.map +1 -1
  583. package/dist/document/deny-globals.d.ts +9 -43
  584. package/dist/document/deny-globals.d.ts.map +1 -1
  585. package/dist/document/deny-globals.js +18 -58
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/diff.d.ts +6 -16
  588. package/dist/document/diff.d.ts.map +1 -1
  589. package/dist/document/diff.js +5 -11
  590. package/dist/document/diff.js.map +1 -1
  591. package/dist/document/doc-index.d.ts +5 -13
  592. package/dist/document/doc-index.d.ts.map +1 -1
  593. package/dist/document/doc-index.js +0 -2
  594. package/dist/document/doc-index.js.map +1 -1
  595. package/dist/document/expression/compile.d.ts +2 -2
  596. package/dist/document/expression/compile.d.ts.map +1 -1
  597. package/dist/document/expression/compile.js +8 -18
  598. package/dist/document/expression/compile.js.map +1 -1
  599. package/dist/document/expression/index.d.ts +11 -41
  600. package/dist/document/expression/index.d.ts.map +1 -1
  601. package/dist/document/expression/index.js +11 -41
  602. package/dist/document/expression/index.js.map +1 -1
  603. package/dist/document/expression/ops.d.ts +3 -12
  604. package/dist/document/expression/ops.d.ts.map +1 -1
  605. package/dist/document/expression/ops.js +4 -20
  606. package/dist/document/expression/ops.js.map +1 -1
  607. package/dist/document/expression/parse.d.ts +4 -14
  608. package/dist/document/expression/parse.d.ts.map +1 -1
  609. package/dist/document/expression/parse.js +34 -55
  610. package/dist/document/expression/parse.js.map +1 -1
  611. package/dist/document/expression/refs.d.ts +2 -8
  612. package/dist/document/expression/refs.d.ts.map +1 -1
  613. package/dist/document/expression/refs.js +2 -6
  614. package/dist/document/expression/refs.js.map +1 -1
  615. package/dist/document/expression/types.d.ts +18 -63
  616. package/dist/document/expression/types.d.ts.map +1 -1
  617. package/dist/document/expression/types.js +4 -15
  618. package/dist/document/expression/types.js.map +1 -1
  619. package/dist/document/expression/walk.d.ts +6 -20
  620. package/dist/document/expression/walk.d.ts.map +1 -1
  621. package/dist/document/expression/walk.js +18 -44
  622. package/dist/document/expression/walk.js.map +1 -1
  623. package/dist/document/index.js +2 -3
  624. package/dist/document/index.js.map +1 -1
  625. package/dist/document/migrate.d.ts +7 -22
  626. package/dist/document/migrate.d.ts.map +1 -1
  627. package/dist/document/migrate.js +44 -15
  628. package/dist/document/migrate.js.map +1 -1
  629. package/dist/document/missing-node.d.ts +4 -11
  630. package/dist/document/missing-node.d.ts.map +1 -1
  631. package/dist/document/missing-node.js +2 -5
  632. package/dist/document/missing-node.js.map +1 -1
  633. package/dist/document/node-decorator.d.ts +12 -53
  634. package/dist/document/node-decorator.d.ts.map +1 -1
  635. package/dist/document/node-decorator.js +16 -57
  636. package/dist/document/node-decorator.js.map +1 -1
  637. package/dist/document/node-descriptor.d.ts +25 -62
  638. package/dist/document/node-descriptor.d.ts.map +1 -1
  639. package/dist/document/node-descriptor.js.map +1 -1
  640. package/dist/document/placement.d.ts +18 -41
  641. package/dist/document/placement.d.ts.map +1 -1
  642. package/dist/document/placement.js +4 -11
  643. package/dist/document/placement.js.map +1 -1
  644. package/dist/document/project.d.ts +19 -52
  645. package/dist/document/project.d.ts.map +1 -1
  646. package/dist/document/project.js +2 -6
  647. package/dist/document/project.js.map +1 -1
  648. package/dist/document/prop-evolution.d.ts +10 -20
  649. package/dist/document/prop-evolution.d.ts.map +1 -1
  650. package/dist/document/prop-evolution.js +3 -7
  651. package/dist/document/prop-evolution.js.map +1 -1
  652. package/dist/document/registry.d.ts +80 -318
  653. package/dist/document/registry.d.ts.map +1 -1
  654. package/dist/document/registry.js +43 -147
  655. package/dist/document/registry.js.map +1 -1
  656. package/dist/document/settled-index.d.ts +12 -18
  657. package/dist/document/settled-index.d.ts.map +1 -1
  658. package/dist/document/settled-index.js +29 -31
  659. package/dist/document/settled-index.js.map +1 -1
  660. package/dist/document/timeline-patch.d.ts +6 -15
  661. package/dist/document/timeline-patch.d.ts.map +1 -1
  662. package/dist/document/timeline-patch.js +12 -21
  663. package/dist/document/timeline-patch.js.map +1 -1
  664. package/dist/document/timeline.d.ts +56 -263
  665. package/dist/document/timeline.d.ts.map +1 -1
  666. package/dist/document/timeline.js +97 -281
  667. package/dist/document/timeline.js.map +1 -1
  668. package/dist/document/types.d.ts +90 -264
  669. package/dist/document/types.d.ts.map +1 -1
  670. package/dist/document/types.js +13 -30
  671. package/dist/document/types.js.map +1 -1
  672. package/dist/document/validate.d.ts +10 -40
  673. package/dist/document/validate.d.ts.map +1 -1
  674. package/dist/document/validate.js +72 -137
  675. package/dist/document/validate.js.map +1 -1
  676. package/dist/document/vocabulary.d.ts +4 -7
  677. package/dist/document/vocabulary.d.ts.map +1 -1
  678. package/dist/document/vocabulary.js +0 -1
  679. package/dist/document/vocabulary.js.map +1 -1
  680. package/dist/index.d.ts +0 -1
  681. package/dist/index.d.ts.map +1 -1
  682. package/dist/index.js +0 -1
  683. package/dist/index.js.map +1 -1
  684. package/dist/layout/bounds.d.ts +1 -11
  685. package/dist/layout/bounds.d.ts.map +1 -1
  686. package/dist/layout/bounds.js.map +1 -1
  687. package/dist/layout/flex.d.ts +6 -20
  688. package/dist/layout/flex.d.ts.map +1 -1
  689. package/dist/layout/flex.js +7 -28
  690. package/dist/layout/flex.js.map +1 -1
  691. package/dist/layout/ops.d.ts +2 -11
  692. package/dist/layout/ops.d.ts.map +1 -1
  693. package/dist/layout/ops.js +2 -22
  694. package/dist/layout/ops.js.map +1 -1
  695. package/dist/layout/types.d.ts +11 -55
  696. package/dist/layout/types.d.ts.map +1 -1
  697. package/dist/layout/types.js.map +1 -1
  698. package/dist/platform/audio-sink.d.ts +7 -43
  699. package/dist/platform/audio-sink.d.ts.map +1 -1
  700. package/dist/platform/audio-sink.js +4 -29
  701. package/dist/platform/audio-sink.js.map +1 -1
  702. package/dist/platform/exporter.d.ts +5 -31
  703. package/dist/platform/exporter.d.ts.map +1 -1
  704. package/dist/platform/exporter.js.map +1 -1
  705. package/dist/platform/stepped-clock.d.ts +1 -16
  706. package/dist/platform/stepped-clock.d.ts.map +1 -1
  707. package/dist/platform/stepped-clock.js +1 -16
  708. package/dist/platform/stepped-clock.js.map +1 -1
  709. package/dist/platform/storage-adapter.d.ts +8 -68
  710. package/dist/platform/storage-adapter.d.ts.map +1 -1
  711. package/dist/platform/storage-adapter.js +8 -60
  712. package/dist/platform/storage-adapter.js.map +1 -1
  713. package/dist/platform/ticker.d.ts +11 -45
  714. package/dist/platform/ticker.d.ts.map +1 -1
  715. package/dist/platform/ticker.js +10 -37
  716. package/dist/platform/ticker.js.map +1 -1
  717. package/dist/project/config.d.ts +4 -14
  718. package/dist/project/config.d.ts.map +1 -1
  719. package/dist/project/config.js.map +1 -1
  720. package/dist/project/tree.d.ts +6 -35
  721. package/dist/project/tree.d.ts.map +1 -1
  722. package/dist/project/tree.js +1 -8
  723. package/dist/project/tree.js.map +1 -1
  724. package/dist/props/host.d.ts +7 -13
  725. package/dist/props/host.d.ts.map +1 -1
  726. package/dist/props/host.js +3 -1
  727. package/dist/props/host.js.map +1 -1
  728. package/dist/props/layout.d.ts +18 -0
  729. package/dist/props/layout.d.ts.map +1 -0
  730. package/dist/props/layout.js +73 -0
  731. package/dist/props/layout.js.map +1 -0
  732. package/dist/props/observer.d.ts +1 -7
  733. package/dist/props/observer.d.ts.map +1 -1
  734. package/dist/props/observer.js.map +1 -1
  735. package/dist/props/slot.d.ts +6 -19
  736. package/dist/props/slot.d.ts.map +1 -1
  737. package/dist/props/slot.js +5 -14
  738. package/dist/props/slot.js.map +1 -1
  739. package/dist/render/canvas-render-context2d.d.ts +8 -68
  740. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  741. package/dist/render/canvas-render-context2d.js +8 -69
  742. package/dist/render/canvas-render-context2d.js.map +1 -1
  743. package/dist/render/clip-contains.d.ts +2 -16
  744. package/dist/render/clip-contains.d.ts.map +1 -1
  745. package/dist/render/clip-contains.js +21 -82
  746. package/dist/render/clip-contains.js.map +1 -1
  747. package/dist/render/clip.d.ts +7 -25
  748. package/dist/render/clip.d.ts.map +1 -1
  749. package/dist/render/clip.js +5 -17
  750. package/dist/render/clip.js.map +1 -1
  751. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  752. package/dist/render/descriptors/ellipse.js +0 -1
  753. package/dist/render/descriptors/ellipse.js.map +1 -1
  754. package/dist/render/descriptors/line.d.ts.map +1 -1
  755. package/dist/render/descriptors/line.js +0 -1
  756. package/dist/render/descriptors/line.js.map +1 -1
  757. package/dist/render/descriptors/path-builder.d.ts +4 -32
  758. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  759. package/dist/render/descriptors/path-builder.js +3 -25
  760. package/dist/render/descriptors/path-builder.js.map +1 -1
  761. package/dist/render/descriptors/path.d.ts +1 -11
  762. package/dist/render/descriptors/path.d.ts.map +1 -1
  763. package/dist/render/descriptors/path.js +0 -1
  764. package/dist/render/descriptors/path.js.map +1 -1
  765. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  766. package/dist/render/descriptors/polygon.js +0 -1
  767. package/dist/render/descriptors/polygon.js.map +1 -1
  768. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  769. package/dist/render/descriptors/polygram.js +0 -1
  770. package/dist/render/descriptors/polygram.js.map +1 -1
  771. package/dist/render/descriptors/rect.d.ts.map +1 -1
  772. package/dist/render/descriptors/rect.js +0 -1
  773. package/dist/render/descriptors/rect.js.map +1 -1
  774. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  775. package/dist/render/descriptors/richtext.js +0 -1
  776. package/dist/render/descriptors/richtext.js.map +1 -1
  777. package/dist/render/descriptors/shape.d.ts +17 -77
  778. package/dist/render/descriptors/shape.d.ts.map +1 -1
  779. package/dist/render/descriptors/shape.js +13 -47
  780. package/dist/render/descriptors/shape.js.map +1 -1
  781. package/dist/render/descriptors/text.d.ts +15 -94
  782. package/dist/render/descriptors/text.d.ts.map +1 -1
  783. package/dist/render/descriptors/text.js +8 -50
  784. package/dist/render/descriptors/text.js.map +1 -1
  785. package/dist/render/descriptors/transform.d.ts +5 -16
  786. package/dist/render/descriptors/transform.d.ts.map +1 -1
  787. package/dist/render/descriptors/transform.js +1 -17
  788. package/dist/render/descriptors/transform.js.map +1 -1
  789. package/dist/render/graphics2d.d.ts +24 -116
  790. package/dist/render/graphics2d.d.ts.map +1 -1
  791. package/dist/render/graphics2d.js +23 -108
  792. package/dist/render/graphics2d.js.map +1 -1
  793. package/dist/render/measure-context.d.ts +5 -29
  794. package/dist/render/measure-context.d.ts.map +1 -1
  795. package/dist/render/measure-context.js.map +1 -1
  796. package/dist/render/null-render-context.d.ts +2 -20
  797. package/dist/render/null-render-context.d.ts.map +1 -1
  798. package/dist/render/null-render-context.js +2 -20
  799. package/dist/render/null-render-context.js.map +1 -1
  800. package/dist/render/render-context2d.d.ts +52 -208
  801. package/dist/render/render-context2d.d.ts.map +1 -1
  802. package/dist/render/render-context2d.js.map +1 -1
  803. package/dist/render/surface.d.ts +2 -19
  804. package/dist/render/surface.d.ts.map +1 -1
  805. package/dist/render/surface.js.map +1 -1
  806. package/dist/render/text-defaults.d.ts +1 -17
  807. package/dist/render/text-defaults.d.ts.map +1 -1
  808. package/dist/render/text-defaults.js +6 -40
  809. package/dist/render/text-defaults.js.map +1 -1
  810. package/dist/render/text-layout.d.ts +12 -55
  811. package/dist/render/text-layout.d.ts.map +1 -1
  812. package/dist/render/text-layout.js +2 -16
  813. package/dist/render/text-layout.js.map +1 -1
  814. package/dist/render3d/bounds3d.d.ts +10 -32
  815. package/dist/render3d/bounds3d.d.ts.map +1 -1
  816. package/dist/render3d/bounds3d.js +2 -12
  817. package/dist/render3d/bounds3d.js.map +1 -1
  818. package/dist/render3d/builders.d.ts +8 -35
  819. package/dist/render3d/builders.d.ts.map +1 -1
  820. package/dist/render3d/builders.js +8 -35
  821. package/dist/render3d/builders.js.map +1 -1
  822. package/dist/render3d/camera.d.ts +10 -57
  823. package/dist/render3d/camera.d.ts.map +1 -1
  824. package/dist/render3d/camera.js +4 -26
  825. package/dist/render3d/camera.js.map +1 -1
  826. package/dist/render3d/fill3d.d.ts +7 -45
  827. package/dist/render3d/fill3d.d.ts.map +1 -1
  828. package/dist/render3d/fill3d.js +15 -85
  829. package/dist/render3d/fill3d.js.map +1 -1
  830. package/dist/render3d/geometry.d.ts +18 -106
  831. package/dist/render3d/geometry.d.ts.map +1 -1
  832. package/dist/render3d/geometry.js +2 -20
  833. package/dist/render3d/geometry.js.map +1 -1
  834. package/dist/render3d/graphics3d.d.ts +29 -133
  835. package/dist/render3d/graphics3d.d.ts.map +1 -1
  836. package/dist/render3d/graphics3d.js +23 -110
  837. package/dist/render3d/graphics3d.js.map +1 -1
  838. package/dist/render3d/index.d.ts +1 -16
  839. package/dist/render3d/index.d.ts.map +1 -1
  840. package/dist/render3d/index.js +1 -16
  841. package/dist/render3d/index.js.map +1 -1
  842. package/dist/render3d/inert.d.ts.map +1 -1
  843. package/dist/render3d/inert.js +1 -14
  844. package/dist/render3d/inert.js.map +1 -1
  845. package/dist/render3d/light.d.ts +3 -26
  846. package/dist/render3d/light.d.ts.map +1 -1
  847. package/dist/render3d/light.js.map +1 -1
  848. package/dist/render3d/material.d.ts +13 -87
  849. package/dist/render3d/material.d.ts.map +1 -1
  850. package/dist/render3d/material.js +2 -16
  851. package/dist/render3d/material.js.map +1 -1
  852. package/dist/render3d/matrix4.d.ts +14 -68
  853. package/dist/render3d/matrix4.d.ts.map +1 -1
  854. package/dist/render3d/matrix4.js +11 -60
  855. package/dist/render3d/matrix4.js.map +1 -1
  856. package/dist/render3d/render-context3d.d.ts +13 -51
  857. package/dist/render3d/render-context3d.d.ts.map +1 -1
  858. package/dist/render3d/render-context3d.js +9 -21
  859. package/dist/render3d/render-context3d.js.map +1 -1
  860. package/dist/render3d/resources.d.ts +9 -53
  861. package/dist/render3d/resources.d.ts.map +1 -1
  862. package/dist/render3d/resources.js +8 -48
  863. package/dist/render3d/resources.js.map +1 -1
  864. package/dist/render3d/rounded-box.d.ts +7 -21
  865. package/dist/render3d/rounded-box.d.ts.map +1 -1
  866. package/dist/render3d/rounded-box.js +7 -46
  867. package/dist/render3d/rounded-box.js.map +1 -1
  868. package/dist/render3d/scene-settings.d.ts +20 -78
  869. package/dist/render3d/scene-settings.d.ts.map +1 -1
  870. package/dist/render3d/scene-settings.js.map +1 -1
  871. package/dist/render3d/scene3d.d.ts +11 -53
  872. package/dist/render3d/scene3d.d.ts.map +1 -1
  873. package/dist/render3d/scene3d.js +12 -59
  874. package/dist/render3d/scene3d.js.map +1 -1
  875. package/dist/render3d/segments.d.ts +2 -25
  876. package/dist/render3d/segments.d.ts.map +1 -1
  877. package/dist/render3d/segments.js +1 -11
  878. package/dist/render3d/segments.js.map +1 -1
  879. package/dist/render3d/texture.d.ts +25 -112
  880. package/dist/render3d/texture.d.ts.map +1 -1
  881. package/dist/render3d/texture.js +3 -27
  882. package/dist/render3d/texture.js.map +1 -1
  883. package/dist/render3d/tracking.d.ts +2 -19
  884. package/dist/render3d/tracking.d.ts.map +1 -1
  885. package/dist/render3d/tracking.js +2 -19
  886. package/dist/render3d/tracking.js.map +1 -1
  887. package/dist/render3d/transform.d.ts +14 -60
  888. package/dist/render3d/transform.d.ts.map +1 -1
  889. package/dist/render3d/transform.js +0 -2
  890. package/dist/render3d/transform.js.map +1 -1
  891. package/dist/render3d/vector3.d.ts +6 -48
  892. package/dist/render3d/vector3.d.ts.map +1 -1
  893. package/dist/render3d/vector3.js +4 -38
  894. package/dist/render3d/vector3.js.map +1 -1
  895. package/dist/render3d/walk.d.ts +3 -27
  896. package/dist/render3d/walk.d.ts.map +1 -1
  897. package/dist/render3d/walk.js +5 -33
  898. package/dist/render3d/walk.js.map +1 -1
  899. package/dist/runtime/asset-refine.d.ts +34 -20
  900. package/dist/runtime/asset-refine.d.ts.map +1 -1
  901. package/dist/runtime/asset-refine.js +127 -31
  902. package/dist/runtime/asset-refine.js.map +1 -1
  903. package/dist/runtime/asset-timeline.d.ts +14 -53
  904. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  905. package/dist/runtime/asset-timeline.js +6 -27
  906. package/dist/runtime/asset-timeline.js.map +1 -1
  907. package/dist/runtime/asset-update.d.ts +7 -26
  908. package/dist/runtime/asset-update.d.ts.map +1 -1
  909. package/dist/runtime/asset-update.js +6 -18
  910. package/dist/runtime/asset-update.js.map +1 -1
  911. package/dist/runtime/audio-index.d.ts +0 -2
  912. package/dist/runtime/audio-index.d.ts.map +1 -1
  913. package/dist/runtime/audio-index.js +0 -2
  914. package/dist/runtime/audio-index.js.map +1 -1
  915. package/dist/runtime/builtin-context.d.ts +3 -9
  916. package/dist/runtime/builtin-context.d.ts.map +1 -1
  917. package/dist/runtime/builtin-context.js +3 -9
  918. package/dist/runtime/builtin-context.js.map +1 -1
  919. package/dist/runtime/clip-instance.d.ts +12 -39
  920. package/dist/runtime/clip-instance.d.ts.map +1 -1
  921. package/dist/runtime/clip-instance.js +21 -45
  922. package/dist/runtime/clip-instance.js.map +1 -1
  923. package/dist/runtime/clip-store.d.ts +26 -68
  924. package/dist/runtime/clip-store.d.ts.map +1 -1
  925. package/dist/runtime/clip-store.js +47 -81
  926. package/dist/runtime/clip-store.js.map +1 -1
  927. package/dist/runtime/engine.d.ts +31 -85
  928. package/dist/runtime/engine.d.ts.map +1 -1
  929. package/dist/runtime/engine.js +16 -49
  930. package/dist/runtime/engine.js.map +1 -1
  931. package/dist/runtime/frame-time.d.ts +4 -15
  932. package/dist/runtime/frame-time.d.ts.map +1 -1
  933. package/dist/runtime/frame-time.js +5 -12
  934. package/dist/runtime/frame-time.js.map +1 -1
  935. package/dist/runtime/index.d.ts +0 -1
  936. package/dist/runtime/index.d.ts.map +1 -1
  937. package/dist/runtime/index.js +0 -1
  938. package/dist/runtime/index.js.map +1 -1
  939. package/dist/runtime/node-picking.d.ts +59 -139
  940. package/dist/runtime/node-picking.d.ts.map +1 -1
  941. package/dist/runtime/node-picking.js +87 -157
  942. package/dist/runtime/node-picking.js.map +1 -1
  943. package/dist/runtime/node-picking3d.d.ts +39 -96
  944. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  945. package/dist/runtime/node-picking3d.js +98 -141
  946. package/dist/runtime/node-picking3d.js.map +1 -1
  947. package/dist/runtime/placement.d.ts +8 -17
  948. package/dist/runtime/placement.d.ts.map +1 -1
  949. package/dist/runtime/placement.js +7 -16
  950. package/dist/runtime/placement.js.map +1 -1
  951. package/dist/runtime/playback-controller.d.ts +78 -207
  952. package/dist/runtime/playback-controller.d.ts.map +1 -1
  953. package/dist/runtime/playback-controller.js +111 -226
  954. package/dist/runtime/playback-controller.js.map +1 -1
  955. package/dist/runtime/playback.d.ts +6 -14
  956. package/dist/runtime/playback.d.ts.map +1 -1
  957. package/dist/runtime/playback.js +6 -14
  958. package/dist/runtime/playback.js.map +1 -1
  959. package/dist/runtime/project-assets.d.ts +6 -14
  960. package/dist/runtime/project-assets.d.ts.map +1 -1
  961. package/dist/runtime/project-assets.js +7 -16
  962. package/dist/runtime/project-assets.js.map +1 -1
  963. package/dist/runtime/session.d.ts +22 -45
  964. package/dist/runtime/session.d.ts.map +1 -1
  965. package/dist/runtime/session.js +26 -46
  966. package/dist/runtime/session.js.map +1 -1
  967. package/dist/runtime/settle.d.ts +4 -10
  968. package/dist/runtime/settle.d.ts.map +1 -1
  969. package/dist/runtime/settle.js +4 -10
  970. package/dist/runtime/settle.js.map +1 -1
  971. package/dist/runtime/state-evaluator.d.ts +15 -37
  972. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  973. package/dist/runtime/state-evaluator.js +27 -44
  974. package/dist/runtime/state-evaluator.js.map +1 -1
  975. package/dist/runtime/text-geometry.d.ts +18 -47
  976. package/dist/runtime/text-geometry.d.ts.map +1 -1
  977. package/dist/runtime/text-geometry.js +13 -27
  978. package/dist/runtime/text-geometry.js.map +1 -1
  979. package/dist/sdk/index.d.ts +1 -7
  980. package/dist/sdk/index.d.ts.map +1 -1
  981. package/dist/sdk/index.js +30 -138
  982. package/dist/sdk/index.js.map +1 -1
  983. package/dist/tween/command-decorator.d.ts +6 -26
  984. package/dist/tween/command-decorator.d.ts.map +1 -1
  985. package/dist/tween/command-decorator.js +1 -6
  986. package/dist/tween/command-decorator.js.map +1 -1
  987. package/dist/tween/command.d.ts +6 -53
  988. package/dist/tween/command.d.ts.map +1 -1
  989. package/dist/tween/command.js +5 -40
  990. package/dist/tween/command.js.map +1 -1
  991. package/dist/tween/ease/curve.d.ts +2 -17
  992. package/dist/tween/ease/curve.d.ts.map +1 -1
  993. package/dist/tween/ease/curve.js +1 -6
  994. package/dist/tween/ease/curve.js.map +1 -1
  995. package/dist/tween/ease/describe.d.ts +0 -11
  996. package/dist/tween/ease/describe.d.ts.map +1 -1
  997. package/dist/tween/ease/describe.js +0 -23
  998. package/dist/tween/ease/describe.js.map +1 -1
  999. package/dist/tween/ease/spec.d.ts +2 -18
  1000. package/dist/tween/ease/spec.d.ts.map +1 -1
  1001. package/dist/tween/ease/spec.js.map +1 -1
  1002. package/dist/tween/inert.d.ts +1 -14
  1003. package/dist/tween/inert.d.ts.map +1 -1
  1004. package/dist/tween/inert.js +1 -14
  1005. package/dist/tween/inert.js.map +1 -1
  1006. package/dist/tween/lerp.d.ts +2 -26
  1007. package/dist/tween/lerp.d.ts.map +1 -1
  1008. package/dist/tween/lerp.js +2 -26
  1009. package/dist/tween/lerp.js.map +1 -1
  1010. package/dist/tween/loop.d.ts +9 -50
  1011. package/dist/tween/loop.d.ts.map +1 -1
  1012. package/dist/tween/loop.js +6 -31
  1013. package/dist/tween/loop.js.map +1 -1
  1014. package/dist/tween/prepare.d.ts +2 -30
  1015. package/dist/tween/prepare.d.ts.map +1 -1
  1016. package/dist/tween/prepare.js +2 -30
  1017. package/dist/tween/prepare.js.map +1 -1
  1018. package/dist/tween/stepper.d.ts +4 -25
  1019. package/dist/tween/stepper.d.ts.map +1 -1
  1020. package/dist/tween/stepper.js.map +1 -1
  1021. package/dist/tween/to-command.d.ts +1 -8
  1022. package/dist/tween/to-command.d.ts.map +1 -1
  1023. package/dist/tween/to-command.js +2 -25
  1024. package/dist/tween/to-command.js.map +1 -1
  1025. package/dist/util/context.d.ts +4 -29
  1026. package/dist/util/context.d.ts.map +1 -1
  1027. package/dist/util/context.js +3 -15
  1028. package/dist/util/context.js.map +1 -1
  1029. package/dist/util/csv.d.ts +4 -29
  1030. package/dist/util/csv.d.ts.map +1 -1
  1031. package/dist/util/csv.js +3 -22
  1032. package/dist/util/csv.js.map +1 -1
  1033. package/dist/util/metrics.d.ts +2 -26
  1034. package/dist/util/metrics.d.ts.map +1 -1
  1035. package/dist/util/metrics.js +2 -26
  1036. package/dist/util/metrics.js.map +1 -1
  1037. package/dist/util/random.d.ts +20 -87
  1038. package/dist/util/random.d.ts.map +1 -1
  1039. package/dist/util/random.js +20 -87
  1040. package/dist/util/random.js.map +1 -1
  1041. package/dist/util/reference.d.ts +6 -35
  1042. package/dist/util/reference.d.ts.map +1 -1
  1043. package/dist/util/reference.js +1 -4
  1044. package/dist/util/reference.js.map +1 -1
  1045. package/dist/util/scheduler.d.ts +6 -27
  1046. package/dist/util/scheduler.d.ts.map +1 -1
  1047. package/dist/util/scheduler.js +8 -35
  1048. package/dist/util/scheduler.js.map +1 -1
  1049. package/package.json +1 -1
  1050. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1051. package/dist/browser/chunks/chunk-7DB6BI27.js +0 -6
  1052. package/dist/browser/chunks/chunk-7DB6BI27.js.map +0 -7
  1053. package/dist/browser/chunks/chunk-IX53IFBD.js +0 -13
  1054. package/dist/browser/chunks/chunk-IX53IFBD.js.map +0 -7
  1055. package/dist/browser/chunks/chunk-Q55UPA3E.js +0 -3
  1056. package/dist/browser/chunks/chunk-Q55UPA3E.js.map +0 -7
  1057. package/dist/renamed-scene-names.d.ts +0 -17
  1058. package/dist/renamed-scene-names.d.ts.map +0 -1
  1059. package/dist/renamed-scene-names.js +0 -9
  1060. package/dist/renamed-scene-names.js.map +0 -1
  1061. package/dist/runtime/precompisition.d.ts +0 -24
  1062. package/dist/runtime/precompisition.d.ts.map +0 -1
  1063. package/dist/runtime/precompisition.js +0 -7
  1064. package/dist/runtime/precompisition.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"morph.js","sourceRoot":"","sources":["../../../../src/attributes/shape/path/morph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAW,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG5E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,MAAM,CAAC,CAA8B;IACjD,MAAM,GAAG,GAAmB,EAAE,CAAC;IAC/B,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,qEAAqE;QACrE,uEAAuE;QACvE,sEAAsE;QACtE,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACjC,yEAAyE;QACzE,uEAAuE;QACvE,GAAG,CAAC,IAAI,CAAC;YACL,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YAClG,MAAM,EAAE,OAAO,CAAC,MAAM;SACzB,CAA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command only works when they happen to share\n * the same command structure; in general one path is a triangle and the other a\n * star with a different number of points, different command types, a different\n * start point, and the opposite winding. Naively pairing commands produces\n * kinks, self-intersections, and points that fly across the canvas.\n *\n * This module reshapes both paths into a common, directly-interpolatable form —\n * the same approach GSAP's MorphSVGPlugin uses:\n *\n * 1. {@link cubics} converts each path into a list of {@link CubicSubpath}s.\n * Every drawing command (L/H/V/Q/A/Z-close) is rewritten as a cubic Bézier, so\n * a subpath becomes a uniform chain of cubics described purely by anchor and\n * control points.\n * 2. {@link plan} pairs the two paths' subpaths (padding the shorter side\n * with degenerate, collapsed subpaths so every subpath has a partner),\n * equalizes the number of cubics in each pair by subdividing the coarser\n * subpath along its perimeter, and — for closed rings — rotates and optionally\n * reverses one ring so the two start at the same place and wind the same way.\n * 3. {@link lerpPathData} samples that aligned correspondence at a given `t`,\n * interpolating every control point with {@link lerpVector2}.\n *\n * The result is a {@link PathCommand} list (one `M` + N `C`s per subpath) that the\n * existing renderer draws unchanged.\n */\nimport { Vector2, lerpVector2 } from \"@/attributes/layout/vector2\";\nimport { PathCommand, PathData } from \"@/render/descriptors/path\";\nimport { distance, cubicPoint } from \"./bezier\";\nimport { commands, contourSegments, contours, segmentCubics } from \"./walk\";\nimport type { Cubic, CubicSubpath, MorphPlan } from \"./types\";\n\n/**\n * A path as cubic subpaths — one of the two boundaries where geometry is\n * deliberately flattened to a single curve type.\n *\n * A morph has to pair segments up and interpolate them, which needs both sides\n * speaking one language, so an arc becomes cubics here (and only here, and in\n * the anchor model). This used to carry the sixth copy of the pen walk; the one\n * thing it got wrong that the shared walk does not is `Z`, which it marked\n * without closing the run — so `M0 0 L10 0 Z L20 0` came back as one subpath\n * where SVG says two.\n */\nexport function cubics(d: PathData | null | undefined): CubicSubpath[] {\n const out: CubicSubpath[] = [];\n for (const contour of contours(d)) {\n // A lone `M` has nothing to interpolate: it draws nothing and has no\n // first anchor to seed a partner from, so it is not a subpath here. It\n // stays in `contours`, where it still occupies a point of the bounds.\n const chain = contourSegments(contour).flatMap(segmentCubics);\n if (chain.length === 0) continue;\n // `contours` is memoized and shared, so hand out copies of its points: a\n // caller moving an anchor of the result must not move the cached path.\n out.push({\n cubics: chain.map((c) => ({ p0: { ...c.p0 }, c1: { ...c.c1 }, c2: { ...c.c2 }, p1: { ...c.p1 } })),\n closed: contour.closed,\n });\n }\n return out;\n}\n\n/** First anchor of a subpath (the implicit `M` target). */\nfunction startPoint(cubics: Cubic[]): Vector2 {\n return cubics[0].p0;\n}\n\n/** Approximate length of a cubic by flattening — cheap, used only for weighting. */\nfunction cubicLength(c: Cubic, steps = 8): number {\n let len = 0;\n let prev = c.p0;\n for (let i = 1; i <= steps; i++) {\n const p = cubicPoint(c.p0, c.c1, c.c2, c.p1, i / steps);\n len += distance(prev, p);\n prev = p;\n }\n return len;\n}\n\n/** Centroid of a subpath's anchor points — used to pair subpaths by proximity. */\nfunction centroid(cubics: Cubic[]): Vector2 {\n let x = 0, y = 0;\n for (const c of cubics) { x += c.p0.x; y += c.p0.y; }\n return { x: x / cubics.length, y: y / cubics.length };\n}\n\n// --- Subdivision: grow a subpath to a target number of cubics ---------------\n\n/** Split one cubic at parameter `t` into two cubics tracing the same curve (De Casteljau). */\nfunction splitCubic(c: Cubic, t: number): [Cubic, Cubic] {\n const a = lerpVector2(c.p0, c.c1, t);\n const b = lerpVector2(c.c1, c.c2, t);\n const d = lerpVector2(c.c2, c.p1, t);\n const e = lerpVector2(a, b, t);\n const f = lerpVector2(b, d, t);\n const g = lerpVector2(e, f, t);\n return [\n { p0: c.p0, c1: a, c2: e, p1: g },\n { p0: g, c1: f, c2: d, p1: c.p1 },\n ];\n}\n\n/**\n * Subdivide `cubics` until it has exactly `target` cubics (target ≥ current).\n * Splits are spread across the longest segments first so the added anchor points\n * land roughly evenly along the perimeter — the key to a smooth morph, since each\n * added point becomes a correspondence point with the other shape.\n */\nfunction subdivideTo(cubics: Cubic[], target: number): Cubic[] {\n let work = cubics.slice();\n while (work.length < target) {\n // Find the longest cubic and split it in half.\n let longest = 0;\n let maxLen = -1;\n for (let i = 0; i < work.length; i++) {\n const len = cubicLength(work[i]);\n if (len > maxLen) { maxLen = len; longest = i; }\n }\n const [left, right] = splitCubic(work[longest], 0.5);\n work.splice(longest, 1, left, right);\n }\n return work;\n}\n\n// --- Ring alignment: rotate + reverse a closed subpath ----------------------\n\n/** Reverse a chain of cubics so it traces the same shape in the opposite direction. */\nfunction reverseCubics(cubics: Cubic[]): Cubic[] {\n const out: Cubic[] = [];\n for (let i = cubics.length - 1; i >= 0; i--) {\n const c = cubics[i];\n out.push({ p0: c.p1, c1: c.c2, c2: c.c1, p1: c.p0 });\n }\n return out;\n}\n\n/** Rotate a closed ring so it begins at cubic index `offset` (wraps around). */\nfunction rotateCubics(cubics: Cubic[], offset: number): Cubic[] {\n if (offset === 0) return cubics.slice();\n return cubics.slice(offset).concat(cubics.slice(0, offset));\n}\n\n/** Sum of squared distances between paired anchor points — the alignment cost. */\nfunction anchorCost(a: Cubic[], b: Cubic[]): number {\n let cost = 0;\n for (let i = 0; i < a.length; i++) {\n const dx = a[i].p0.x - b[i].p0.x;\n const dy = a[i].p0.y - b[i].p0.y;\n cost += dx * dx + dy * dy;\n }\n return cost;\n}\n\n/**\n * Align a closed `to` ring against a fixed `from` ring (same cubic count). Tries\n * every rotation offset, in both winding directions, and keeps whichever pairs the\n * anchor points with the least total travel. This is what lets two shapes whose\n * points are listed in any order — or that wind in opposite directions — morph\n * without spinning or folding through themselves.\n */\nfunction alignClosedRing(from: Cubic[], to: Cubic[]): Cubic[] {\n const n = from.length;\n let best = to;\n let bestCost = Infinity;\n\n for (const candidate of [to, reverseCubics(to)]) {\n for (let offset = 0; offset < n; offset++) {\n const rotated = rotateCubics(candidate, offset);\n const cost = anchorCost(from, rotated);\n if (cost < bestCost) {\n bestCost = cost;\n best = rotated;\n }\n }\n }\n return best;\n}\n\n/**\n * For an open subpath, only the winding can be flipped (rotation would change the\n * shape). Pick the direction whose endpoints best match the `from` subpath.\n */\nfunction alignOpenSubpath(from: Cubic[], to: Cubic[]): Cubic[] {\n const reversed = reverseCubics(to);\n return anchorCost(from, to) <= anchorCost(from, reversed) ? to : reversed;\n}\n\n// --- Degenerate subpaths (for count mismatches) -----------------------------\n\n/**\n * A subpath collapsed onto a single point `at`, with `count` zero-length cubics.\n * Pairing a real subpath with one of these makes it grow out of / shrink into a\n * point, which is how added or removed subpaths animate.\n */\nfunction degenerateSubpath(at: Vector2, count: number): Cubic[] {\n const cubics: Cubic[] = [];\n for (let i = 0; i < count; i++) {\n cubics.push({ p0: { ...at }, c1: { ...at }, c2: { ...at }, p1: { ...at } });\n }\n return cubics;\n}\n\n// --- Subpath pairing --------------------------------------------------------\n\n/**\n * Greedily pair `from` subpaths with the nearest unused `to` subpath (by centroid),\n * so morphing maps each shape onto its closest counterpart rather than by list\n * order. Leftover subpaths on either side are paired with a degenerate partner\n * collapsed at their own centroid, so they grow/shrink in place.\n */\nfunction pairSubpaths(\n fromSubs: CubicSubpath[],\n toSubs: CubicSubpath[],\n): Array<{ from: CubicSubpath; to: CubicSubpath }> {\n const pairs: Array<{ from: CubicSubpath; to: CubicSubpath }> = [];\n const toUsed = new Array(toSubs.length).fill(false);\n\n for (const f of fromSubs) {\n const fc = centroid(f.cubics);\n let bestIdx = -1;\n let bestDist = Infinity;\n for (let j = 0; j < toSubs.length; j++) {\n if (toUsed[j]) continue;\n const d = distance(fc, centroid(toSubs[j].cubics));\n if (d < bestDist) { bestDist = d; bestIdx = j; }\n }\n if (bestIdx >= 0) {\n toUsed[bestIdx] = true;\n pairs.push({ from: f, to: toSubs[bestIdx] });\n } else {\n // No `to` subpath left → collapse to this subpath's own centroid.\n pairs.push({\n from: f,\n to: { cubics: degenerateSubpath(fc, f.cubics.length), closed: f.closed },\n });\n }\n }\n\n // Any unused `to` subpaths grow out of their own centroid.\n for (let j = 0; j < toSubs.length; j++) {\n if (toUsed[j]) continue;\n const t = toSubs[j];\n const tc = centroid(t.cubics);\n pairs.push({\n from: { cubics: degenerateSubpath(tc, t.cubics.length), closed: t.closed },\n to: t,\n });\n }\n\n return pairs;\n}\n\n// --- Building the morph plan ------------------------------------------------\n\n/**\n * Build a reusable {@link MorphPlan} aligning `from` to `to`. All the expensive\n * work — converting to cubics, pairing subpaths, equalizing counts, and rotating\n * rings — happens here once; {@link sample} then samples it cheaply per frame.\n */\nexport function plan(from: PathCommand[], to: PathCommand[]): MorphPlan {\n const fromSubs = cubics(from);\n const toSubs = cubics(to);\n\n // Both empty → nothing to morph.\n if (fromSubs.length === 0 && toSubs.length === 0) {\n return { pairs: [] };\n }\n\n // One side empty → collapse/grow the other against a point at its start.\n if (fromSubs.length === 0) {\n const seed = startPoint(toSubs[0].cubics);\n fromSubs.push({ cubics: degenerateSubpath(seed, 1), closed: toSubs[0].closed });\n }\n if (toSubs.length === 0) {\n const seed = startPoint(fromSubs[0].cubics);\n toSubs.push({ cubics: degenerateSubpath(seed, 1), closed: fromSubs[0].closed });\n }\n\n const subPairs = pairSubpaths(fromSubs, toSubs);\n\n const pairs = subPairs.map(({ from: f, to: t }) => {\n // Equalize cubic counts by subdividing the coarser side.\n const count = Math.max(f.cubics.length, t.cubics.length);\n const fromCubics = subdivideTo(f.cubics, count);\n let toCubics = subdivideTo(t.cubics, count);\n\n // Align the `to` side to the `from` side so points correspond and travel\n // the shortest path. Closed rings can rotate + reverse; open paths only\n // reverse (rotating an open path would tear it).\n const bothClosed = f.closed && t.closed;\n toCubics = bothClosed\n ? alignClosedRing(fromCubics, toCubics)\n : alignOpenSubpath(fromCubics, toCubics);\n\n return { from: fromCubics, to: toCubics, closed: bothClosed };\n });\n\n return { pairs };\n}\n\n// --- Sampling ---------------------------------------------------------------\n\n/** Interpolate a single cubic's four points. */\nfunction lerpCubic(from: Cubic, to: Cubic, t: number): Cubic {\n return {\n p0: lerpVector2(from.p0, to.p0, t),\n c1: lerpVector2(from.c1, to.c1, t),\n c2: lerpVector2(from.c2, to.c2, t),\n p1: lerpVector2(from.p1, to.p1, t),\n };\n}\n\n/**\n * Sample a {@link MorphPlan} at progress `t` (0 → `from`, 1 → `to`), producing a\n * fresh {@link PathCommand} list: one `M`, one `C` per cubic, and a trailing `Z`\n * for closed subpaths.\n *\n * Closed subpaths emit `Z` rather than a final line back to the start. The ring's\n * last cubic already lands on its first anchor, so `Z` adds no length; what it does\n * is tell the renderer the contour is closed, which is what makes the stroke join\n * cleanly at the seam instead of drawing two unjoined end caps there.\n */\nexport function sample(plan: MorphPlan, t: number): PathCommand[] {\n const out: PathCommand[] = [];\n for (const pair of plan.pairs) {\n const n = pair.from.length;\n if (n === 0) continue;\n const first = lerpCubic(pair.from[0], pair.to[0], t);\n out.push({ type: \"M\", x: first.p0.x, y: first.p0.y });\n out.push({ type: \"C\", x1: first.c1.x, y1: first.c1.y, x2: first.c2.x, y2: first.c2.y, x: first.p1.x, y: first.p1.y });\n for (let i = 1; i < n; i++) {\n const c = lerpCubic(pair.from[i], pair.to[i], t);\n out.push({ type: \"C\", x1: c.c1.x, y1: c.c1.y, x2: c.c2.x, y2: c.c2.y, x: c.p1.x, y: c.p1.y });\n }\n if (pair.closed) out.push({ type: \"Z\" });\n }\n return out;\n}\n\n// --- Public tween entry point ----------------------------------------------\n\n/**\n * The morph plan is built from a `(from, to)` pair, which is constant for the\n * duration of one tween while `t` sweeps 0→1. {@link lerp} is invoked once\n * per frame with that same pair, so we cache the most recent plan to avoid\n * rebuilding it (subdivision + ring alignment is the costly part) every frame.\n * A one-entry cache is enough: tweens run one at a time per property and call us\n * with monotonically advancing `t` against fixed endpoints.\n */\nlet cachedPlan: { from: PathData; to: PathData; plan: MorphPlan } | null = null;\n\nfunction planFor(from: PathData, to: PathData): MorphPlan {\n if (cachedPlan && cachedPlan.from === from && cachedPlan.to === to) {\n return cachedPlan.plan;\n }\n const built = plan(commands(from), commands(to));\n cachedPlan = { from, to, plan: built };\n return built;\n}\n\n/**\n * Smoothly interpolate between two path shapes — the {@link PathData} tween used\n * by `Path`'s animatable `d` property and usable directly as a `LerpFunction`.\n *\n * `from`/`to` may be SVG `d` strings or {@link PathCommand} arrays and need not\n * share structure, command count, subpath count, point order, or winding — the\n * shapes are reconciled into a common cubic correspondence first (see the module\n * overview). At `t = 0` and `t = 1` the endpoints are returned verbatim so the\n * start and end frames are pixel-exact; in between, a morphed command list is\n * produced.\n *\n * @param from Source path (the shape at `t = 0`).\n * @param to Target path (the shape at `t = 1`).\n * @param t Progress in `[0, 1]`.\n */\nexport function lerp(from: PathData, to: PathData, t: number): PathData {\n if (t <= 0) return from;\n if (t >= 1) return to;\n return sample(planFor(from, to), t);\n}\n"]}
1
+ {"version":3,"file":"morph.js","sourceRoot":"","sources":["../../../../src/attributes/shape/path/morph.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAW,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG5E,qLAAqL;AACrL,MAAM,UAAU,MAAM,CAAC,CAA8B;IACjD,MAAM,GAAG,GAAmB,EAAE,CAAC;IAC/B,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,qEAAqE;QACrE,uEAAuE;QACvE,sEAAsE;QACtE,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACjC,yEAAyE;QACzE,uEAAuE;QACvE,GAAG,CAAC,IAAI,CAAC;YACL,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG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AE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClG,CAAC;QACD,IAAI,IAAI,CAAC,MAAM;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,iMAAiM;AACjM,IAAI,UAAU,GAA6D,IAAI,CAAC;AAEhF,SAAS,OAAO,CAAC,IAAc,EAAE,EAAY;IACzC,IAAI,UAAU,IAAI,UAAU,CAAC,IAAI,KAAK,IAAI,IAAI,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QACjE,OAAO,UAAU,CAAC,IAAI,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACjD,UAAU,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACvC,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,yRAAyR;AACzR,MAAM,UAAU,IAAI,CAAC,IAAc,EAAE,EAAY,EAAE,CAAS;IACxD,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACtB,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACxC,CAAC","sourcesContent":["/**\n * Path morphing: interpolation between two arbitrary path shapes (the GSAP MorphSVGPlugin approach). Commands can't be\n * lerped pairwise (different counts, types, start points, winding), so both paths are reshaped into a common form:\n * 1. {@link cubics} rewrites each path as {@link CubicSubpath}s (every drawing command becomes a cubic Bézier).\n * 2. {@link plan} pairs subpaths (padding the shorter side with collapsed ones), equalizes cubic counts by\n * subdividing the coarser along its perimeter, and rotates/reverses closed rings to start and wind together.\n * 3. {@link lerpPathData} samples that correspondence at `t`, lerping every control point.\n * The result is a {@link PathCommand} list (one `M` + N `C`s per subpath) the renderer draws unchanged.\n */\nimport { Vector2, lerpVector2 } from \"@/attributes/layout/vector2\";\nimport { PathCommand, PathData } from \"@/render/descriptors/path\";\nimport { distance, cubicPoint } from \"./bezier\";\nimport { commands, contourSegments, contours, segmentCubics } from \"./walk\";\nimport type { Cubic, CubicSubpath, MorphPlan } from \"./types\";\n\n/** A path as cubic subpaths: one of the two boundaries where geometry is deliberately flattened to a single curve type (an arc becomes cubics here and in the anchor model only). */\nexport function cubics(d: PathData | null | undefined): CubicSubpath[] {\n const out: CubicSubpath[] = [];\n for (const contour of contours(d)) {\n // A lone `M` has nothing to interpolate: it draws nothing and has no\n // first anchor to seed a partner from, so it is not a subpath here. It\n // stays in `contours`, where it still occupies a point of the bounds.\n const chain = contourSegments(contour).flatMap(segmentCubics);\n if (chain.length === 0) continue;\n // `contours` is memoized and shared, so hand out copies of its points: a\n // caller moving an anchor of the result must not move the cached path.\n out.push({\n cubics: chain.map((c) => ({ p0: { ...c.p0 }, c1: { ...c.c1 }, c2: { ...c.c2 }, p1: { ...c.p1 } })),\n closed: contour.closed,\n });\n }\n return out;\n}\n\nfunction startPoint(cubics: Cubic[]): Vector2 {\n return cubics[0].p0;\n}\n\n/** Approximate length of a cubic by flattening — cheap, used only for weighting. */\nfunction cubicLength(c: Cubic, steps = 8): number {\n let len = 0;\n let prev = c.p0;\n for (let i = 1; i <= steps; i++) {\n const p = cubicPoint(c.p0, c.c1, c.c2, c.p1, i / steps);\n len += distance(prev, p);\n prev = p;\n }\n return len;\n}\n\n/** Centroid of a subpath's anchor points — used to pair subpaths by proximity. */\nfunction centroid(cubics: Cubic[]): Vector2 {\n let x = 0, y = 0;\n for (const c of cubics) { x += c.p0.x; y += c.p0.y; }\n return { x: x / cubics.length, y: y / cubics.length };\n}\n\nfunction splitCubic(c: Cubic, t: number): [Cubic, Cubic] {\n const a = lerpVector2(c.p0, c.c1, t);\n const b = lerpVector2(c.c1, c.c2, t);\n const d = lerpVector2(c.c2, c.p1, t);\n const e = lerpVector2(a, b, t);\n const f = lerpVector2(b, d, t);\n const g = lerpVector2(e, f, t);\n return [\n { p0: c.p0, c1: a, c2: e, p1: g },\n { p0: g, c1: f, c2: d, p1: c.p1 },\n ];\n}\n\n/** Subdivides until it has exactly `target` cubics (>= current), splitting the longest segments first so added anchors land evenly along the perimeter; each becomes a correspondence point with the other shape. */\nfunction subdivideTo(cubics: Cubic[], target: number): Cubic[] {\n let work = cubics.slice();\n while (work.length < target) {\n let longest = 0;\n let maxLen = -1;\n for (let i = 0; i < work.length; i++) {\n const len = cubicLength(work[i]);\n if (len > maxLen) { maxLen = len; longest = i; }\n }\n const [left, right] = splitCubic(work[longest], 0.5);\n work.splice(longest, 1, left, right);\n }\n return work;\n}\n\nfunction reverseCubics(cubics: Cubic[]): Cubic[] {\n const out: Cubic[] = [];\n for (let i = cubics.length - 1; i >= 0; i--) {\n const c = cubics[i];\n out.push({ p0: c.p1, c1: c.c2, c2: c.c1, p1: c.p0 });\n }\n return out;\n}\n\nfunction rotateCubics(cubics: Cubic[], offset: number): Cubic[] {\n if (offset === 0) return cubics.slice();\n return cubics.slice(offset).concat(cubics.slice(0, offset));\n}\n\n/** Sum of squared distances between paired anchor points — the alignment cost. */\nfunction anchorCost(a: Cubic[], b: Cubic[]): number {\n let cost = 0;\n for (let i = 0; i < a.length; i++) {\n const dx = a[i].p0.x - b[i].p0.x;\n const dy = a[i].p0.y - b[i].p0.y;\n cost += dx * dx + dy * dy;\n }\n return cost;\n}\n\n/** Aligns a closed `to` ring against a fixed `from` ring (same cubic count): tries every rotation offset in both windings and keeps the one with least total anchor travel, so any point order or winding morphs without spinning or folding. */\nfunction alignClosedRing(from: Cubic[], to: Cubic[]): Cubic[] {\n const n = from.length;\n let best = to;\n let bestCost = Infinity;\n\n for (const candidate of [to, reverseCubics(to)]) {\n for (let offset = 0; offset < n; offset++) {\n const rotated = rotateCubics(candidate, offset);\n const cost = anchorCost(from, rotated);\n if (cost < bestCost) {\n bestCost = cost;\n best = rotated;\n }\n }\n }\n return best;\n}\n\n/** For an open subpath only the winding can flip (rotating would change the shape): picks the direction whose endpoints best match `from`. */\nfunction alignOpenSubpath(from: Cubic[], to: Cubic[]): Cubic[] {\n const reversed = reverseCubics(to);\n return anchorCost(from, to) <= anchorCost(from, reversed) ? to : reversed;\n}\n\n/** A subpath collapsed onto point `at` with `count` zero-length cubics: pairing a real subpath with one makes it grow out of / shrink into a point (added or removed subpaths). */\nfunction degenerateSubpath(at: Vector2, count: number): Cubic[] {\n const cubics: Cubic[] = [];\n for (let i = 0; i < count; i++) {\n cubics.push({ p0: { ...at }, c1: { ...at }, c2: { ...at }, p1: { ...at } });\n }\n return cubics;\n}\n\n/** Greedily pairs `from` subpaths with the nearest unused `to` subpath (by centroid), not by list order. Leftovers on either side pair with a degenerate partner at their own centroid and grow/shrink in place. */\nfunction pairSubpaths(\n fromSubs: CubicSubpath[],\n toSubs: CubicSubpath[],\n): Array<{ from: CubicSubpath; to: CubicSubpath }> {\n const pairs: Array<{ from: CubicSubpath; to: CubicSubpath }> = [];\n const toUsed = new Array(toSubs.length).fill(false);\n\n for (const f of fromSubs) {\n const fc = centroid(f.cubics);\n let bestIdx = -1;\n let bestDist = Infinity;\n for (let j = 0; j < toSubs.length; j++) {\n if (toUsed[j]) continue;\n const d = distance(fc, centroid(toSubs[j].cubics));\n if (d < bestDist) { bestDist = d; bestIdx = j; }\n }\n if (bestIdx >= 0) {\n toUsed[bestIdx] = true;\n pairs.push({ from: f, to: toSubs[bestIdx] });\n } else {\n // No `to` subpath left → collapse to this subpath's own centroid.\n pairs.push({\n from: f,\n to: { cubics: degenerateSubpath(fc, f.cubics.length), closed: f.closed },\n });\n }\n }\n\n // Any unused `to` subpaths grow out of their own centroid.\n for (let j = 0; j < toSubs.length; j++) {\n if (toUsed[j]) continue;\n const t = toSubs[j];\n const tc = centroid(t.cubics);\n pairs.push({\n from: { cubics: degenerateSubpath(tc, t.cubics.length), closed: t.closed },\n to: t,\n });\n }\n\n return pairs;\n}\n\n/** Builds a reusable {@link MorphPlan}. All the expensive work (cubics, pairing, equalizing, ring alignment) happens once here; {@link sample} is cheap per frame. */\nexport function plan(from: PathCommand[], to: PathCommand[]): MorphPlan {\n const fromSubs = cubics(from);\n const toSubs = cubics(to);\n\n if (fromSubs.length === 0 && toSubs.length === 0) {\n return { pairs: [] };\n }\n\n // One side empty → collapse/grow the other against a point at its start.\n if (fromSubs.length === 0) {\n const seed = startPoint(toSubs[0].cubics);\n fromSubs.push({ cubics: degenerateSubpath(seed, 1), closed: toSubs[0].closed });\n }\n if (toSubs.length === 0) {\n const seed = startPoint(fromSubs[0].cubics);\n toSubs.push({ cubics: degenerateSubpath(seed, 1), closed: fromSubs[0].closed });\n }\n\n const subPairs = pairSubpaths(fromSubs, toSubs);\n\n const pairs = subPairs.map(({ from: f, to: t }) => {\n const count = Math.max(f.cubics.length, t.cubics.length);\n const fromCubics = subdivideTo(f.cubics, count);\n let toCubics = subdivideTo(t.cubics, count);\n\n // Align the `to` side to the `from` side so points correspond and travel\n // the shortest path. Closed rings can rotate + reverse; open paths only\n // reverse (rotating an open path would tear it).\n const bothClosed = f.closed && t.closed;\n toCubics = bothClosed\n ? alignClosedRing(fromCubics, toCubics)\n : alignOpenSubpath(fromCubics, toCubics);\n\n return { from: fromCubics, to: toCubics, closed: bothClosed };\n });\n\n return { pairs };\n}\n\nfunction lerpCubic(from: Cubic, to: Cubic, t: number): Cubic {\n return {\n p0: lerpVector2(from.p0, to.p0, t),\n c1: lerpVector2(from.c1, to.c1, t),\n c2: lerpVector2(from.c2, to.c2, t),\n p1: lerpVector2(from.p1, to.p1, t),\n };\n}\n\n/** Samples a {@link MorphPlan} at progress `t` into a fresh {@link PathCommand} list. Closed subpaths end with `Z` rather than a line back to the start: the last cubic already lands on the first anchor, and `Z` makes the stroke join cleanly at the seam instead of two unjoined caps. */\nexport function sample(plan: MorphPlan, t: number): PathCommand[] {\n const out: PathCommand[] = [];\n for (const pair of plan.pairs) {\n const n = pair.from.length;\n if (n === 0) continue;\n const first = lerpCubic(pair.from[0], pair.to[0], t);\n out.push({ type: \"M\", x: first.p0.x, y: first.p0.y });\n out.push({ type: \"C\", x1: first.c1.x, y1: first.c1.y, x2: first.c2.x, y2: first.c2.y, x: first.p1.x, y: first.p1.y });\n for (let i = 1; i < n; i++) {\n const c = lerpCubic(pair.from[i], pair.to[i], t);\n out.push({ type: \"C\", x1: c.c1.x, y1: c.c1.y, x2: c.c2.x, y2: c.c2.y, x: c.p1.x, y: c.p1.y });\n }\n if (pair.closed) out.push({ type: \"Z\" });\n }\n return out;\n}\n\n/** One-entry plan cache: a tween holds its `(from, to)` pair fixed while `t` sweeps 0→1 and {@link lerp} runs per frame, so rebuilding (subdivision + ring alignment) every frame is avoided. */\nlet cachedPlan: { from: PathData; to: PathData; plan: MorphPlan } | null = null;\n\nfunction planFor(from: PathData, to: PathData): MorphPlan {\n if (cachedPlan && cachedPlan.from === from && cachedPlan.to === to) {\n return cachedPlan.plan;\n }\n const built = plan(commands(from), commands(to));\n cachedPlan = { from, to, plan: built };\n return built;\n}\n\n/** The {@link PathData} tween used by `Path`'s animatable `d` (usable as a `LerpFunction`). Endpoints need not share structure; they are reconciled into a cubic correspondence. At `t = 0` and `1` the endpoints are returned verbatim so the first and last frames are pixel-exact. */\nexport function lerp(from: PathData, to: PathData, t: number): PathData {\n if (t <= 0) return from;\n if (t >= 1) return to;\n return sample(planFor(from, to), t);\n}\n"]}
@@ -1,16 +1,7 @@
1
1
  /**
2
- * Every path-geometry operation, on one object.
3
- *
4
- * `pathOps` was already the path attribute's `resolve`/`lerp` pair; it now
5
- * carries the rest, which is the repo's existing shape for an attribute whose
6
- * operations go past interpolation — `insetsOps` is `AttributeOps & InsetsOps`,
7
- * `alignmentOps` is `AttributeOps & AlignmentOps`, `cornerRadiusOps` the same.
8
- * Every `Types.path` entry is untouched by the addition.
9
- *
10
- * Behind it is **one** pen walk. There were seven — one each in `bounds`,
11
- * `length`, `dash`, `sampler`, `subpath`, `morph` and the editor's vector model
12
- * — and they disagreed about where `Z` leaves the cursor, which control point an
13
- * `S`/`T` reflects, and what an arc is. The pipeline is now:
2
+ * Every path-geometry operation on one object, the repo's shape for an attribute whose operations go past
3
+ * interpolation (like `insetsOps`, `alignmentOps`). Each method is the module function of the same name. Behind it is
4
+ * **one** pen walk:
14
5
  *
15
6
  * PathData ── commands ──▶ PathCommand[] ── contours ──▶ PathContour[]
16
7
  * │
@@ -18,19 +9,14 @@
18
9
  * cubics ── morph ◀──────────┤
19
10
  * anchors ── editing ◀────────┘
20
11
  *
21
- * `cubics` and `anchors` are the only two places geometry is flattened to a
22
- * single curve type, because a morph needs one segment kind to pair up and
23
- * nobody can drag an arc's handles. Everything that measures keeps the arc.
24
- *
25
- * Each method is the module function of the same name, so a call site and its
26
- * implementation are one grep apart.
12
+ * `cubics` and `anchors` are the only places geometry is flattened to one curve type (a morph needs one segment kind
13
+ * to pair up; nobody can drag an arc's handles). Everything that measures keeps the arc.
27
14
  */
28
15
  import { PathCommand, PathData } from "../../../render/descriptors/path.js";
29
16
  import type { AttributeOps } from "../../../attributes/shared/operators.js";
30
17
  import type { Vector2 } from "../../../attributes/layout/vector2.js";
31
18
  import type { Extents } from "../../../layout/bounds.js";
32
19
  import { PathContour, CubicSubpath, VectorPath, PathSampler, MorphPlan, PathNormalization, PathAnchor } from "./types.js";
33
- /** The path attribute's operations beyond `resolve`/`lerp`. */
34
20
  export interface PathOps {
35
21
  /** Parse. A `PathCommand[]` passes through by reference; nullish gives `[]`. */
36
22
  commands(d: PathData | null | undefined): PathCommand[];
@@ -1 +1 @@
1
- {"version":3,"file":"ops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EN,WAAW;IACX,cAAc;IACd,YAAY;IACZ,GAAG;IACH,SAAS;IACT,MAAM;IACN,OAAO;IAEP,SAAS;IACT,QAAQ;IACR,OAAO;IACP,KAAK;CACR,CAAC","sourcesContent":["/**\n * Every path-geometry operation, on one object.\n *\n * `pathOps` was already the path attribute's `resolve`/`lerp` pair; it now\n * carries the rest, which is the repo's existing shape for an attribute whose\n * operations go past interpolation — `insetsOps` is `AttributeOps & InsetsOps`,\n * `alignmentOps` is `AttributeOps & AlignmentOps`, `cornerRadiusOps` the same.\n * Every `Types.path` entry is untouched by the addition.\n *\n * Behind it is **one** pen walk. There were seven — one each in `bounds`,\n * `length`, `dash`, `sampler`, `subpath`, `morph` and the editor's vector model\n * — and they disagreed about where `Z` leaves the cursor, which control point an\n * `S`/`T` reflects, and what an arc is. The pipeline is now:\n *\n * PathData ── commands ──▶ PathCommand[] ── contours ──▶ PathContour[]\n * │\n * bounds · size · length · sampler · dash · trim ◀─────┤\n * cubics ── morph ◀──────────┤\n * anchors ── editing ◀────────┘\n *\n * `cubics` and `anchors` are the only two places geometry is flattened to a\n * single curve type, because a morph needs one segment kind to pair up and\n * nobody can drag an arc's handles. Everything that measures keeps the arc.\n *\n * Each method is the module function of the same name, so a call site and its\n * implementation are one grep apart.\n */\nimport { PathCommand, PathData } from \"@/render/descriptors/path\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\n\nimport { bounds, commands, contours, size } from \"./walk\";\nimport { dash, dashScale, length, sampler, trim } from \"./measure\";\nimport { cubics, lerp, plan, sample } from \"./morph\";\nimport {\n anchorBounds, anchorCommands, anchors, endFit, fitToBox, fromAnchors,\n isEmpty, map, normalize, pointOn, split, translate,\n} from \"./anchors\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { Extents } from \"@/layout/bounds\";\nimport { PathContour, CubicSubpath, VectorPath, PathSampler, MorphPlan, PathNormalization, PathAnchor } from \"./types\";\n\n\n/** The path attribute's operations beyond `resolve`/`lerp`. */\nexport interface PathOps {\n // ── Reading ────────────────────────────────────────────────────────────\n /** Parse. A `PathCommand[]` passes through by reference; nullish gives `[]`. */\n commands(d: PathData | null | undefined): PathCommand[];\n /** The normal form: absolute, shorthands expanded, grouped into contours. */\n contours(d: PathData | null | undefined): PathContour[];\n /** All-cubic form. Lossy for arcs — one of the two flattening boundaries. */\n cubics(d: PathData | null | undefined): CubicSubpath[];\n /** The editable anchor model. Lossy for arcs — the other boundary. */\n anchors(d: PathData | null | undefined): VectorPath;\n\n // ── Measuring ──────────────────────────────────────────────────────────\n /** Tight box: each segment's own extrema, not its control hull. */\n bounds(d: PathData | null | undefined): Extents | null;\n /** {@link bounds} as a size; `0 x 0` for an empty path. */\n size(d: PathData | null | undefined): { width: number; height: number };\n /** Total arc length. An arc is measured along the arc, not across its chord. */\n length(d: PathData | null | undefined): number;\n /** Point and unit tangent at a distance along the path. */\n sampler(d: PathData): PathSampler;\n\n // ── Rewriting ──────────────────────────────────────────────────────────\n /** The portion between two arc-length fractions. Works on strings. */\n trim(d: PathData, start: number, end: number): PathData;\n /** Only the \"on\" runs of a dash pattern, fit as the renderer fits it, as a `d` string. */\n dash(d: PathData | null | undefined, pattern: number[], offset?: number): string;\n /** How far a pattern is stretched to fit one contour of a path — see `dash`. */\n dashScale(pattern: number[], contour: { length: number; closed: boolean }, total: number): number | null;\n\n // ── Morphing ───────────────────────────────────────────────────────────\n /** A reusable correspondence between two paths. Expensive; `lerp` caches one. */\n plan(from: PathCommand[], to: PathCommand[]): MorphPlan;\n /** Sample a plan at `t`. Cheap. */\n sample(plan: MorphPlan, t: number): PathCommand[];\n\n // ── The anchor model ───────────────────────────────────────────────────\n /** Anchors back to a `d` string. Emits only `M`/`L`/`C`/`Z`. */\n fromAnchors(path: VectorPath): string;\n /** Anchors to commands, with a transform folded into the same pass. */\n anchorCommands(path: VectorPath, transform?: (p: Vector2) => Vector2): PathCommand[];\n /** Tight box of an anchor path. */\n anchorBounds(path: VectorPath): Extents | null;\n /** Every point and handle mapped. */\n map(path: VectorPath, fn: (p: Vector2) => Vector2): VectorPath;\n translate(path: VectorPath, delta: Vector2): VectorPath;\n /** The turn-and-scale about `start` carrying `end` onto `to` — a `map` fn. */\n endFit(start: Vector2, end: Vector2, to: Vector2): (p: Vector2) => Vector2;\n isEmpty(path: VectorPath): boolean;\n\n // ── The unit box ───────────────────────────────────────────────────────\n /** Re-quote against the geometry's own bounds. */\n normalize(path: VectorPath): PathNormalization;\n /** Re-quote against a stated box — the general form of {@link PathOps.normalize}. */\n fitToBox(path: VectorPath, box: Extents): PathNormalization;\n /** A point on the segment between two anchors, for hit-testing an insert. */\n pointOn(from: PathAnchor, to: PathAnchor, t: number): Vector2;\n /** De Casteljau split, so inserting an anchor does not move the curve. */\n split(from: PathAnchor, to: PathAnchor, t: number): { from: PathAnchor; middle: PathAnchor; to: PathAnchor };\n}\n\n\nexport const pathOps: AttributeOps<PathData, PathData> & PathOps = {\n // An SVG path string or command list needs no normalization.\n resolve: (value) => value,\n lerp,\n\n commands,\n contours,\n cubics,\n anchors,\n\n bounds,\n size,\n length,\n sampler,\n\n trim,\n dash,\n dashScale,\n\n plan,\n sample,\n\n fromAnchors,\n anchorCommands,\n anchorBounds,\n map,\n translate,\n endFit,\n isEmpty,\n\n normalize,\n fitToBox,\n pointOn,\n split,\n};\n"]}
1
+ {"version":3,"file":"ops.js","sourceRoot":"","sources":["../../../../src/attributes/shape/path/ops.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EACH,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EACpE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,GACrD,MAAM,WAAW,CAAC;AA6DnB,MAAM,CAAC,MAAM,OAAO,GAA+C;IAC/D,6DAA6D;IAC7D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;IACzB,IAAI;IAEJ,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IAEP,MAAM;IACN,IAAI;IACJ,MAAM;IACN,OAAO;IAEP,IAAI;IACJ,IAAI;IACJ,SAAS;IAET,IAAI;IACJ,MAAM;IAEN,WAAW;IACX,cAAc;IACd,YAAY;IACZ,GAAG;IACH,SAAS;IACT,MAAM;IACN,OAAO;IAEP,SAAS;IACT,QAAQ;IACR,OAAO;IACP,KAAK;CACR,CAAC","sourcesContent":["/**\n * Every path-geometry operation on one object, the repo's shape for an attribute whose operations go past\n * interpolation (like `insetsOps`, `alignmentOps`). Each method is the module function of the same name. Behind it is\n * **one** pen walk:\n *\n * PathData ── commands ──▶ PathCommand[] ── contours ──▶ PathContour[]\n * │\n * bounds · size · length · sampler · dash · trim ◀─────┤\n * cubics ── morph ◀──────────┤\n * anchors ── editing ◀────────┘\n *\n * `cubics` and `anchors` are the only places geometry is flattened to one curve type (a morph needs one segment kind\n * to pair up; nobody can drag an arc's handles). Everything that measures keeps the arc.\n */\nimport { PathCommand, PathData } from \"@/render/descriptors/path\";\nimport type { AttributeOps } from \"@/attributes/shared/operators\";\n\nimport { bounds, commands, contours, size } from \"./walk\";\nimport { dash, dashScale, length, sampler, trim } from \"./measure\";\nimport { cubics, lerp, plan, sample } from \"./morph\";\nimport {\n anchorBounds, anchorCommands, anchors, endFit, fitToBox, fromAnchors,\n isEmpty, map, normalize, pointOn, split, translate,\n} from \"./anchors\";\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\nimport type { Extents } from \"@/layout/bounds\";\nimport { PathContour, CubicSubpath, VectorPath, PathSampler, MorphPlan, PathNormalization, PathAnchor } from \"./types\";\n\n\nexport interface PathOps {\n /** Parse. A `PathCommand[]` passes through by reference; nullish gives `[]`. */\n commands(d: PathData | null | undefined): PathCommand[];\n /** The normal form: absolute, shorthands expanded, grouped into contours. */\n contours(d: PathData | null | undefined): PathContour[];\n /** All-cubic form. Lossy for arcs — one of the two flattening boundaries. */\n cubics(d: PathData | null | undefined): CubicSubpath[];\n /** The editable anchor model. Lossy for arcs — the other boundary. */\n anchors(d: PathData | null | undefined): VectorPath;\n\n /** Tight box: each segment's own extrema, not its control hull. */\n bounds(d: PathData | null | undefined): Extents | null;\n /** {@link bounds} as a size; `0 x 0` for an empty path. */\n size(d: PathData | null | undefined): { width: number; height: number };\n /** Total arc length. An arc is measured along the arc, not across its chord. */\n length(d: PathData | null | undefined): number;\n /** Point and unit tangent at a distance along the path. */\n sampler(d: PathData): PathSampler;\n\n /** The portion between two arc-length fractions. Works on strings. */\n trim(d: PathData, start: number, end: number): PathData;\n /** Only the \"on\" runs of a dash pattern, fit as the renderer fits it, as a `d` string. */\n dash(d: PathData | null | undefined, pattern: number[], offset?: number): string;\n /** How far a pattern is stretched to fit one contour of a path — see `dash`. */\n dashScale(pattern: number[], contour: { length: number; closed: boolean }, total: number): number | null;\n\n /** A reusable correspondence between two paths. Expensive; `lerp` caches one. */\n plan(from: PathCommand[], to: PathCommand[]): MorphPlan;\n /** Sample a plan at `t`. Cheap. */\n sample(plan: MorphPlan, t: number): PathCommand[];\n\n /** Anchors back to a `d` string. Emits only `M`/`L`/`C`/`Z`. */\n fromAnchors(path: VectorPath): string;\n /** Anchors to commands, with a transform folded into the same pass. */\n anchorCommands(path: VectorPath, transform?: (p: Vector2) => Vector2): PathCommand[];\n /** Tight box of an anchor path. */\n anchorBounds(path: VectorPath): Extents | null;\n /** Every point and handle mapped. */\n map(path: VectorPath, fn: (p: Vector2) => Vector2): VectorPath;\n translate(path: VectorPath, delta: Vector2): VectorPath;\n /** The turn-and-scale about `start` carrying `end` onto `to` — a `map` fn. */\n endFit(start: Vector2, end: Vector2, to: Vector2): (p: Vector2) => Vector2;\n isEmpty(path: VectorPath): boolean;\n\n /** Re-quote against the geometry's own bounds. */\n normalize(path: VectorPath): PathNormalization;\n /** Re-quote against a stated box — the general form of {@link PathOps.normalize}. */\n fitToBox(path: VectorPath, box: Extents): PathNormalization;\n /** A point on the segment between two anchors, for hit-testing an insert. */\n pointOn(from: PathAnchor, to: PathAnchor, t: number): Vector2;\n /** De Casteljau split, so inserting an anchor does not move the curve. */\n split(from: PathAnchor, to: PathAnchor, t: number): { from: PathAnchor; middle: PathAnchor; to: PathAnchor };\n}\n\n\nexport const pathOps: AttributeOps<PathData, PathData> & PathOps = {\n // An SVG path string or command list needs no normalization.\n resolve: (value) => value,\n lerp,\n\n commands,\n contours,\n cubics,\n anchors,\n\n bounds,\n size,\n length,\n sampler,\n\n trim,\n dash,\n dashScale,\n\n plan,\n sample,\n\n fromAnchors,\n anchorCommands,\n anchorBounds,\n map,\n translate,\n endFit,\n isEmpty,\n\n normalize,\n fitToBox,\n pointOn,\n split,\n};\n"]}
@@ -1,25 +1,18 @@
1
1
  /**
2
- * Every type the path module names, in one place.
3
- *
4
- * The vocabulary is small and it is worth seeing all of it at once, because the
5
- * whole module is four representations and the conversions between them:
2
+ * The path module's types: four representations and the conversions between them.
6
3
  *
7
4
  * PathData ─▶ PathCommand[] ─▶ PathContour[] ─┬─▶ CubicSubpath[] (morph)
8
5
  * a string as written the normal └─▶ VectorPath (editing)
9
6
  * or commands form
10
7
  */
11
8
  import type { Vector2 } from "../../../attributes/layout/vector2.js";
12
- /**
13
- * A single cubic Bézier: start anchor `p0`, controls `c1`/`c2`, end anchor `p1`.
14
- * The end anchor of one cubic is the start of the next within a subpath.
15
- */
9
+ /** A cubic Bézier; the end anchor of one is the start of the next within a subpath. */
16
10
  export interface Cubic {
17
11
  p0: Vector2;
18
12
  c1: Vector2;
19
13
  c2: Vector2;
20
14
  p1: Vector2;
21
15
  }
22
- /** An SVG `A` command re-expressed as the ellipse arc it names. */
23
16
  export interface ArcParams {
24
17
  cx: number;
25
18
  cy: number;
@@ -32,19 +25,7 @@ export interface ArcParams {
32
25
  theta1: number;
33
26
  dtheta: number;
34
27
  }
35
- /**
36
- * One piece of a contour, keeping its own kind.
37
- *
38
- * Normalizing everything to cubics would be simpler by one dimension and wrong
39
- * in a way that shows on screen: an arc is not a cubic, so `length`, `sampler`,
40
- * `dash` and `trim` would all inherit an approximation only *morph* and the
41
- * anchor model actually need.
42
- *
43
- * Plain data, not a bundle of closures: `contours` runs inside `measure()` on
44
- * every layout pass, and arc-length parameterization is the expensive part of
45
- * path geometry. Nothing here samples a curve — `Extents` come from
46
- * closed-form extrema, and arc length is a separate, lazy table.
47
- */
28
+ /** One piece of a contour, keeping its own kind: normalizing to cubics would make `length`, `sampler`, `dash` and `trim` inherit an approximation only morph and the anchor model need. Plain data, not closures: `contours` runs inside `measure()` on every layout pass, so nothing here samples a curve (extents are closed-form, arc length a separate lazy table). */
48
29
  export type PathSegment = {
49
30
  kind: "line";
50
31
  from: Vector2;
@@ -70,21 +51,10 @@ export type PathSegment = {
70
51
  largeArc: 0 | 1;
71
52
  sweep: 0 | 1;
72
53
  };
73
- /**
74
- * One connected run — everything between an `M` and the next one.
75
- *
76
- * `start` is carried separately because a contour can legitimately have no
77
- * segments: a lone `M` is a real thing to write, it occupies a point that bounds
78
- * must account for, and the anchor model round-trips it as a single anchor.
79
- *
80
- * The closing edge of a `closed` contour is **not** in `segments` — `closed`
81
- * carries it. Storing it would mean a zero-length segment whenever the geometry
82
- * already ends where it started, which is most of the time.
83
- */
54
+ /** One connected run (an `M` to the next). `start` is separate because a contour may have no segments: a lone `M` occupies a point bounds must account for. The closing edge of a `closed` contour is **not** in `segments` (it would be a zero-length segment whenever the geometry already ends where it started). */
84
55
  export interface PathContour {
85
56
  start: Vector2;
86
57
  segments: PathSegment[];
87
- /** Whether the run ended with a `Z`. */
88
58
  closed: boolean;
89
59
  }
90
60
  export interface SegmentMetric {
@@ -105,7 +75,6 @@ export interface PathMetric {
105
75
  contours: ContourMetric[];
106
76
  length: number;
107
77
  }
108
- /** A point on the path with the unit tangent direction there. */
109
78
  export interface PathFrame {
110
79
  x: number;
111
80
  y: number;
@@ -114,20 +83,12 @@ export interface PathFrame {
114
83
  ty: number;
115
84
  }
116
85
  export interface PathSampler {
117
- /** Total arc length across all contours. */
118
86
  readonly length: number;
119
- /**
120
- * Point and unit tangent at arc-length distance `d` from the path start.
121
- * `d` is clamped to `[0, length]`. Returns `null` only for a degenerate
122
- * (zero-length) path. Keeps an internal cursor so repeated calls with
123
- * non-decreasing `d` are amortized O(1).
124
- */
87
+ /** Point and unit tangent at arc-length `d` (clamped to `[0, length]`), `null` only for a zero-length path. Keeps an internal cursor, so calls with non-decreasing `d` are amortized O(1). */
125
88
  frameAt(d: number): PathFrame | null;
126
89
  }
127
- /** A connected run of cubics (one `M` followed by curves), optionally closed. */
128
90
  export interface CubicSubpath {
129
91
  cubics: Cubic[];
130
- /** True for subpaths that ended with a `Z` — eligible for rotation/reversal. */
131
92
  closed: boolean;
132
93
  }
133
94
  /** A correspondence between two paths, pre-aligned so it can be sampled at any `t`. */
@@ -136,30 +97,15 @@ export interface MorphPlan {
136
97
  pairs: Array<{
137
98
  from: Cubic[];
138
99
  to: Cubic[];
139
- /**
140
- * Whether the sampled subpath should be closed with a `Z`. A pair is
141
- * closed when both sides were closed rings — a closed shape morphing to
142
- * another closed shape stays closed, so the stroke forms a proper join
143
- * at the seam instead of leaving two unconnected free ends.
144
- */
100
+ /** A pair is closed when both sides were closed rings, so the stroke joins at the seam instead of leaving two free ends. */
145
101
  closed: boolean;
146
102
  }>;
147
103
  }
148
104
  /**
149
- * One anchor on a subpath, with the two control points that shape the segments
150
- * meeting at it.
151
- *
152
- * Handles are **absolute** points in the same space as {@link PathAnchor.point},
153
- * not offsets from it. That is what an SVG cubic stores, so serializing is a
154
- * copy rather than an addition, and it is the space a canvas editor drags them
155
- * in — an offset model would convert twice per pointer event for no gain.
156
- *
157
- * `null` means "no handle on this side", which draws as a straight segment. A
158
- * corner point has both null; a smooth point has both, mirrored through the
159
- * anchor; an asymmetric point has both, pointing opposite ways at different
160
- * lengths. The model does not record which of the three a point *is* — that is
161
- * derived from the handles, so a file cannot claim to be smooth while holding
162
- * handles that aren't.
105
+ * One anchor with the two control points of the segments meeting at it. Handles are **absolute** points in the same
106
+ * space as {@link PathAnchor.point} (what an SVG cubic stores and the canvas editor drags), not offsets. `null` means
107
+ * no handle on that side (a straight segment). Corner, smooth and asymmetric are not recorded; they derive from the
108
+ * handles, so a file cannot claim to be smooth while holding handles that aren't.
163
109
  */
164
110
  export interface PathAnchor {
165
111
  point: Vector2;
@@ -168,13 +114,10 @@ export interface PathAnchor {
168
114
  /** Control point for the segment **leaving** it. */
169
115
  outHandle: Vector2 | null;
170
116
  }
171
- /** A single contiguous run of anchors — one `M …` in the `d` string. */
172
117
  export interface PathSubpath {
173
118
  anchors: PathAnchor[];
174
- /** Whether the last anchor joins back to the first (`Z`). */
175
119
  closed: boolean;
176
120
  }
177
- /** A whole path: zero or more subpaths. */
178
121
  export type VectorPath = PathSubpath[];
179
122
  /** Scale and offset applied on each axis, as `pathOps.normalize` reports it. */
180
123
  export interface PathNormalization {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/path/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAQ3D;;;GAGG;AACH,MAAM,WAAW,KAAK;IAClB,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;CACf;AAED,mEAAmE;AACnE,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,sFAAsF;IACtF,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CAAC;IACxB,8LAA8L;IAC9L,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACnB;AAED,uFAAuF;AACvF,MAAM,WAAW,SAAS;IACtB,4EAA4E;IAC5E,KAAK,EAAE,KAAK,CAAC;QACT,IAAI,EAAE,KAAK,EAAE,CAAC;QACd,EAAE,EAAE,KAAK,EAAE,CAAC;QACZ,4HAA4H;QAC5H,MAAM,EAAE,OAAO,CAAC;KACnB,CAAC,CAAC;CACN;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,iEAAiE;IACjE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,oDAAoD;IACpD,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC;AAEvC,gFAAgF;AAChF,MAAM,WAAW,iBAAiB;IAC9B,iEAAiE;IACjE,IAAI,EAAE,UAAU,CAAC;IACjB,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB"}
@@ -1,3 +1,2 @@
1
1
  export {};
2
- // ── The operation surface ──────────────────────────────────────────────────
3
2
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/attributes/shape/path/types.ts"],"names":[],"mappings":";AA0MA,8EAA8E","sourcesContent":["/**\n * Every type the path module names, in one place.\n *\n * The vocabulary is small and it is worth seeing all of it at once, because the\n * whole module is four representations and the conversions between them:\n *\n * PathData ─▶ PathCommand[] ─▶ PathContour[] ─┬─▶ CubicSubpath[] (morph)\n * a string as written the normal └─▶ VectorPath (editing)\n * or commands form\n */\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\n\n// ── Geometry ───────────────────────────────────────────────────────────────\n\n// `Extents` — the `{ minX, minY, maxX, maxY }` box — is `@/layout/bounds`'s,\n// not a second copy. A path's bounding box and a node's are the same idea, and\n// the two were already the same four fields under two names.\n\n/**\n * A single cubic Bézier: start anchor `p0`, controls `c1`/`c2`, end anchor `p1`.\n * The end anchor of one cubic is the start of the next within a subpath.\n */\nexport interface Cubic {\n p0: Vector2;\n c1: Vector2;\n c2: Vector2;\n p1: Vector2;\n}\n\n/** An SVG `A` command re-expressed as the ellipse arc it names. */\nexport interface ArcParams {\n cx: number;\n cy: number;\n /** Radii after the spec's \"scale up until the endpoints are reachable\" correction. */\n rx: number;\n ry: number;\n /** x-axis rotation, in **radians** (the command carries degrees). */\n phi: number;\n /** Start angle, and the signed sweep from it — `sweep`/`largeArc` already folded in. */\n theta1: number;\n dtheta: number;\n}\n\n// ── The normal form ────────────────────────────────────────────────────────\n\n/**\n * One piece of a contour, keeping its own kind.\n *\n * Normalizing everything to cubics would be simpler by one dimension and wrong\n * in a way that shows on screen: an arc is not a cubic, so `length`, `sampler`,\n * `dash` and `trim` would all inherit an approximation only *morph* and the\n * anchor model actually need.\n *\n * Plain data, not a bundle of closures: `contours` runs inside `measure()` on\n * every layout pass, and arc-length parameterization is the expensive part of\n * path geometry. Nothing here samples a curve — `Extents` come from\n * closed-form extrema, and arc length is a separate, lazy table.\n */\nexport type PathSegment =\n | { kind: \"line\"; from: Vector2; to: Vector2 }\n | { kind: \"quad\"; from: Vector2; c: Vector2; to: Vector2 }\n | { kind: \"cubic\"; from: Vector2; c1: Vector2; c2: Vector2; to: Vector2 }\n | {\n kind: \"arc\"; from: Vector2; to: Vector2;\n rx: number; ry: number; rotation: number; largeArc: 0 | 1; sweep: 0 | 1;\n };\n\n/**\n * One connected run — everything between an `M` and the next one.\n *\n * `start` is carried separately because a contour can legitimately have no\n * segments: a lone `M` is a real thing to write, it occupies a point that bounds\n * must account for, and the anchor model round-trips it as a single anchor.\n *\n * The closing edge of a `closed` contour is **not** in `segments` — `closed`\n * carries it. Storing it would mean a zero-length segment whenever the geometry\n * already ends where it started, which is most of the time.\n */\nexport interface PathContour {\n start: Vector2;\n segments: PathSegment[];\n /** Whether the run ended with a `Z`. */\n closed: boolean;\n}\n\n// ── Arc-length measurement ─────────────────────────────────────────────────\n\nexport interface SegmentMetric {\n segment: PathSegment;\n /** The flattened polyline, `from` first and `to` last. */\n points: Vector2[];\n /** Length along the polyline at each point; the last entry is `length`. */\n cumulative: number[];\n length: number;\n}\n\nexport interface ContourMetric {\n contour: PathContour;\n /** Every segment, the closed contour's implied join included. */\n metrics: SegmentMetric[];\n length: number;\n}\n\nexport interface PathMetric {\n contours: ContourMetric[];\n length: number;\n}\n\n/** A point on the path with the unit tangent direction there. */\nexport interface PathFrame {\n x: number;\n y: number;\n /** Unit tangent (direction of travel along the path). */\n tx: number;\n ty: number;\n}\n\nexport interface PathSampler {\n /** Total arc length across all contours. */\n readonly length: number;\n /**\n * Point and unit tangent at arc-length distance `d` from the path start.\n * `d` is clamped to `[0, length]`. Returns `null` only for a degenerate\n * (zero-length) path. Keeps an internal cursor so repeated calls with\n * non-decreasing `d` are amortized O(1).\n */\n frameAt(d: number): PathFrame | null;\n}\n\n// ── Morphing ───────────────────────────────────────────────────────────────\n\n/** A connected run of cubics (one `M` followed by curves), optionally closed. */\nexport interface CubicSubpath {\n cubics: Cubic[];\n /** True for subpaths that ended with a `Z` — eligible for rotation/reversal. */\n closed: boolean;\n}\n\n/** A correspondence between two paths, pre-aligned so it can be sampled at any `t`. */\nexport interface MorphPlan {\n /** Subpath pairs; each pair has the same number of cubics on both sides. */\n pairs: Array<{\n from: Cubic[];\n to: Cubic[];\n /**\n * Whether the sampled subpath should be closed with a `Z`. A pair is\n * closed when both sides were closed rings — a closed shape morphing to\n * another closed shape stays closed, so the stroke forms a proper join\n * at the seam instead of leaving two unconnected free ends.\n */\n closed: boolean;\n }>;\n}\n\n// ── The editable anchor model ──────────────────────────────────────────────\n\n/**\n * One anchor on a subpath, with the two control points that shape the segments\n * meeting at it.\n *\n * Handles are **absolute** points in the same space as {@link PathAnchor.point},\n * not offsets from it. That is what an SVG cubic stores, so serializing is a\n * copy rather than an addition, and it is the space a canvas editor drags them\n * in — an offset model would convert twice per pointer event for no gain.\n *\n * `null` means \"no handle on this side\", which draws as a straight segment. A\n * corner point has both null; a smooth point has both, mirrored through the\n * anchor; an asymmetric point has both, pointing opposite ways at different\n * lengths. The model does not record which of the three a point *is* — that is\n * derived from the handles, so a file cannot claim to be smooth while holding\n * handles that aren't.\n */\nexport interface PathAnchor {\n point: Vector2;\n /** Control point for the segment **arriving** at this anchor. */\n inHandle: Vector2 | null;\n /** Control point for the segment **leaving** it. */\n outHandle: Vector2 | null;\n}\n\n/** A single contiguous run of anchors — one `M …` in the `d` string. */\nexport interface PathSubpath {\n anchors: PathAnchor[];\n /** Whether the last anchor joins back to the first (`Z`). */\n closed: boolean;\n}\n\n/** A whole path: zero or more subpaths. */\nexport type VectorPath = PathSubpath[];\n\n/** Scale and offset applied on each axis, as `pathOps.normalize` reports it. */\nexport interface PathNormalization {\n /** The path, remapped so its bounds are exactly the unit box. */\n path: VectorPath;\n /** How much wider the geometry became, as a multiple of the old box. */\n scaleX: number;\n scaleY: number;\n /** Where the old geometry's centre sat, in the *old* unit space. */\n centerX: number;\n centerY: number;\n}\n\n// ── The operation surface ──────────────────────────────────────────────────\n\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/attributes/shape/path/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The path module's types: four representations and the conversions between them.\n *\n * PathData ─▶ PathCommand[] ─▶ PathContour[] ─┬─▶ CubicSubpath[] (morph)\n * a string as written the normal └─▶ VectorPath (editing)\n * or commands form\n */\nimport type { Vector2 } from \"@/attributes/layout/vector2\";\n\n// `Extents` is `@/layout/bounds`'s: a path's bounding box and a node's are the same idea.\n\n/** A cubic Bézier; the end anchor of one is the start of the next within a subpath. */\nexport interface Cubic {\n p0: Vector2;\n c1: Vector2;\n c2: Vector2;\n p1: Vector2;\n}\n\nexport interface ArcParams {\n cx: number;\n cy: number;\n /** Radii after the spec's \"scale up until the endpoints are reachable\" correction. */\n rx: number;\n ry: number;\n /** x-axis rotation, in **radians** (the command carries degrees). */\n phi: number;\n /** Start angle, and the signed sweep from it — `sweep`/`largeArc` already folded in. */\n theta1: number;\n dtheta: number;\n}\n\n/** One piece of a contour, keeping its own kind: normalizing to cubics would make `length`, `sampler`, `dash` and `trim` inherit an approximation only morph and the anchor model need. Plain data, not closures: `contours` runs inside `measure()` on every layout pass, so nothing here samples a curve (extents are closed-form, arc length a separate lazy table). */\nexport type PathSegment =\n | { kind: \"line\"; from: Vector2; to: Vector2 }\n | { kind: \"quad\"; from: Vector2; c: Vector2; to: Vector2 }\n | { kind: \"cubic\"; from: Vector2; c1: Vector2; c2: Vector2; to: Vector2 }\n | {\n kind: \"arc\"; from: Vector2; to: Vector2;\n rx: number; ry: number; rotation: number; largeArc: 0 | 1; sweep: 0 | 1;\n };\n\n/** One connected run (an `M` to the next). `start` is separate because a contour may have no segments: a lone `M` occupies a point bounds must account for. The closing edge of a `closed` contour is **not** in `segments` (it would be a zero-length segment whenever the geometry already ends where it started). */\nexport interface PathContour {\n start: Vector2;\n segments: PathSegment[];\n closed: boolean;\n}\n\nexport interface SegmentMetric {\n segment: PathSegment;\n /** The flattened polyline, `from` first and `to` last. */\n points: Vector2[];\n /** Length along the polyline at each point; the last entry is `length`. */\n cumulative: number[];\n length: number;\n}\n\nexport interface ContourMetric {\n contour: PathContour;\n /** Every segment, the closed contour's implied join included. */\n metrics: SegmentMetric[];\n length: number;\n}\n\nexport interface PathMetric {\n contours: ContourMetric[];\n length: number;\n}\n\nexport interface PathFrame {\n x: number;\n y: number;\n /** Unit tangent (direction of travel along the path). */\n tx: number;\n ty: number;\n}\n\nexport interface PathSampler {\n readonly length: number;\n /** Point and unit tangent at arc-length `d` (clamped to `[0, length]`), `null` only for a zero-length path. Keeps an internal cursor, so calls with non-decreasing `d` are amortized O(1). */\n frameAt(d: number): PathFrame | null;\n}\n\nexport interface CubicSubpath {\n cubics: Cubic[];\n closed: boolean;\n}\n\n/** A correspondence between two paths, pre-aligned so it can be sampled at any `t`. */\nexport interface MorphPlan {\n /** Subpath pairs; each pair has the same number of cubics on both sides. */\n pairs: Array<{\n from: Cubic[];\n to: Cubic[];\n /** A pair is closed when both sides were closed rings, so the stroke joins at the seam instead of leaving two free ends. */\n closed: boolean;\n }>;\n}\n\n/**\n * One anchor with the two control points of the segments meeting at it. Handles are **absolute** points in the same\n * space as {@link PathAnchor.point} (what an SVG cubic stores and the canvas editor drags), not offsets. `null` means\n * no handle on that side (a straight segment). Corner, smooth and asymmetric are not recorded; they derive from the\n * handles, so a file cannot claim to be smooth while holding handles that aren't.\n */\nexport interface PathAnchor {\n point: Vector2;\n /** Control point for the segment **arriving** at this anchor. */\n inHandle: Vector2 | null;\n /** Control point for the segment **leaving** it. */\n outHandle: Vector2 | null;\n}\n\nexport interface PathSubpath {\n anchors: PathAnchor[];\n closed: boolean;\n}\n\nexport type VectorPath = PathSubpath[];\n\n/** Scale and offset applied on each axis, as `pathOps.normalize` reports it. */\nexport interface PathNormalization {\n /** The path, remapped so its bounds are exactly the unit box. */\n path: VectorPath;\n /** How much wider the geometry became, as a multiple of the old box. */\n scaleX: number;\n scaleY: number;\n /** Where the old geometry's centre sat, in the *old* unit space. */\n centerX: number;\n centerY: number;\n}\n\n\n"]}
@@ -1,17 +1,7 @@
1
1
  /**
2
- * From a `d` string to the normal form: the scanner, the parser, the one pen
3
- * walk, and everything that reads a {@link PathSegment} once it exists.
4
- *
5
- * There were **seven** pen walks — one each in `bounds`, `length`, `dash`,
6
- * `sampler`, `subpath`, `morph` and the editor's vector model — and they
7
- * disagreed. Four forgot that `Z` returns the cursor to the contour's start, so
8
- * a relative command after a close resolved against the wrong point. Three kept
9
- * a single slot for the control point an `S`/`T` reflects, so a `T` following a
10
- * `C` reflected a cubic's control as if it were a quadratic's. One handled arcs
11
- * exactly, one as a subdivided chord, one as a single chord, one by dropping
12
- * them, and one by aborting the parse.
13
- *
14
- * Everything downstream takes {@link PathContour}s from here.
2
+ * From a `d` string to the normal form: the scanner, the parser, the one pen walk, and everything that reads a
3
+ * {@link PathSegment}. Everything downstream takes {@link PathContour}s from here, so the pen rules (`Z` returns the
4
+ * cursor to the contour start, `S`/`T` reflect from separate cubic and quadratic slots, arcs are exact) live once.
15
5
  */
16
6
  import { Vector2 } from "../../../attributes/layout/vector2.js";
17
7
  import { PathCommand, PathData } from "../../../render/descriptors/path.js";
@@ -20,73 +10,29 @@ import type { ArcParams, Cubic, PathContour, PathSegment } from "./types.js";
20
10
  export declare function lineSegment(from: Vector2, to: Vector2): PathSegment;
21
11
  export declare function quadSegment(from: Vector2, c: Vector2, to: Vector2): PathSegment;
22
12
  export declare function cubicSegment(from: Vector2, c1: Vector2, c2: Vector2, to: Vector2): PathSegment;
23
- /**
24
- * An arc, or the line it degenerates to.
25
- *
26
- * A zero radius or coincident endpoints make the endpoint→center conversion
27
- * divide by zero, and the SVG spec says both draw as a straight line — so the
28
- * substitution happens here rather than in each of the four places that would
29
- * otherwise have to guard.
30
- */
13
+ /** An arc, or the line it degenerates to: a zero radius or coincident endpoints make the endpoint->center conversion divide by zero, and SVG says both draw as a straight line. */
31
14
  export declare function arcSegment(from: Vector2, to: Vector2, rx: number, ry: number, rotation: number, largeArc: 0 | 1, sweep: 0 | 1): PathSegment;
32
15
  /** The ellipse an arc segment names. Cheap, but not free — hoist it in a loop. */
33
16
  export declare function segmentArc(segment: PathSegment & {
34
17
  kind: "arc";
35
18
  }): ArcParams;
36
- /** The point at parameter `t` (0..1). */
37
19
  export declare function segmentPointAt(segment: PathSegment, t: number): Vector2;
38
- /**
39
- * The segment's tight box — its own extrema, solved, not its control hull.
40
- *
41
- * Closed form on every kind, so this stays cheap enough for `measure()`. The
42
- * control hull can sit a long way outside the curve: `size` used it
43
- * and a hugging `Path` was correspondingly too big, while an arc — whose hull it
44
- * had no way to compute at all — was measured across its chord and came back
45
- * flat on one axis.
46
- */
20
+ /** The segment's tight box (its own extrema, solved, not its control hull, which can sit far outside the curve); closed form on every kind so it stays cheap enough for `measure()`. */
47
21
  export declare function segmentBounds(segment: PathSegment): Extents;
48
22
  /** The segment as cubics. Exact for every kind but `arc`. */
49
23
  export declare function segmentCubics(segment: PathSegment): Cubic[];
50
- /**
51
- * The sub-range `t0..t1` as commands, with no leading move.
52
- *
53
- * A sub-range of an arc is still an arc, so it stays one rather than being
54
- * refitted — the old trim approximated it with cubics through sampled points
55
- * using a *tangent* formula, which was wrong on top of being lossy.
56
- */
24
+ /** The sub-range `t0..t1` as commands, no leading move. A sub-range of an arc stays an arc rather than being refitted with cubics. */
57
25
  export declare function segmentSplit(segment: PathSegment, t0: number, t1: number): PathCommand[];
58
- /**
59
- * The closing line of a closed contour, when it has any length.
60
- *
61
- * Every walk this replaced synthesized this the same way, so one synthesis
62
- * reproduces all of them.
63
- */
26
+ /** The closing line of a closed contour, when it has any length. */
64
27
  export declare function closingSegment(contour: PathContour): PathSegment | null;
65
- /** Every segment of a contour, the implied closing line included. */
66
28
  export declare function contourSegments(contour: PathContour): PathSegment[];
67
29
  /** The union of every segment's box, or `null` when there is no geometry at all. */
68
30
  export declare function contourBounds(contours: PathContour[]): Extents | null;
69
- /** Straight-line distance between a segment's endpoints — its chord. */
70
- export declare function segmentChord(segment: PathSegment): number;
71
- /**
72
- * Parses a `d` string into commands, **as written** — relative stays relative,
73
- * shorthands stay short, arcs stay arcs.
74
- *
75
- * Normalizing here would throw away the one thing a caller might still want the
76
- * original for (round-tripping a stored string), and {@link contours} resolves
77
- * all of it one step later anyway.
78
- */
31
+ /** Parses a `d` string into commands **as written** (relative stays relative, shorthands stay short, arcs stay arcs) so a stored string round-trips; {@link contours} resolves it later. */
79
32
  export declare function parseCommands(d: string): PathCommand[];
80
33
  /** Coerce loose {@link PathData} into commands. Nullish is an empty path, not a throw. */
81
34
  export declare function commands(d: PathData | null | undefined): PathCommand[];
82
- /**
83
- * Resolves commands into absolute contours of typed segments.
84
- *
85
- * The three things every previous walk had to get right, in one place: relative
86
- * commands resolve against the pen, `Z` returns the pen to the contour's start,
87
- * and `S`/`T` reflect from **separate** cubic and quadratic slots, each cleared
88
- * by a command of the other kind.
89
- */
35
+ /** Resolves commands into absolute contours of typed segments: relative commands resolve against the pen, `Z` returns the pen to the contour start, and `S`/`T` reflect from **separate** cubic and quadratic slots, each cleared by a command of the other kind. */
90
36
  export declare function contours(d: PathData | null | undefined): PathContour[];
91
37
  /** {@link contours} without the memo — the walk itself. */
92
38
  export declare function walkCommands(list: PathCommand[]): PathContour[];
@@ -1 +1 @@
1
- {"version":3,"file":"walk.d.ts","sourceRoot":"","sources":["../../../../src/attributes/shape/path/walk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAMlE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAwH1E,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,GAAG,WAAW,CAEnE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,GAAG,WAAW,CAE/E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,EAA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