@motionscript/core 0.1.0-alpha.6 → 0.1.0-alpha.8

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 (804) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/NOTICE +15 -14
  3. package/README.md +5 -7
  4. package/dist/assets/errors.js +4 -5
  5. package/dist/assets/errors.js.map +1 -1
  6. package/dist/assets/manager.d.ts.map +1 -1
  7. package/dist/assets/manager.js +7 -5
  8. package/dist/assets/manager.js.map +1 -1
  9. package/dist/assets/scope.d.ts +1 -1
  10. package/dist/assets/scope.d.ts.map +1 -1
  11. package/dist/assets/scope.js +1 -1
  12. package/dist/assets/scope.js.map +1 -1
  13. package/dist/attributes/audio/effects/chain.d.ts +73 -0
  14. package/dist/attributes/audio/effects/chain.d.ts.map +1 -0
  15. package/dist/attributes/audio/effects/chain.js +67 -0
  16. package/dist/attributes/audio/effects/chain.js.map +1 -0
  17. package/dist/attributes/audio/effects/implementations/echo.d.ts +14 -0
  18. package/dist/attributes/audio/effects/implementations/echo.d.ts.map +1 -0
  19. package/dist/attributes/audio/effects/implementations/echo.js +11 -0
  20. package/dist/attributes/audio/effects/implementations/echo.js.map +1 -0
  21. package/dist/attributes/audio/effects/implementations/gain.d.ts +10 -0
  22. package/dist/attributes/audio/effects/implementations/gain.d.ts.map +1 -0
  23. package/dist/attributes/audio/effects/implementations/gain.js +6 -0
  24. package/dist/attributes/audio/effects/implementations/gain.js.map +1 -0
  25. package/dist/attributes/audio/effects/implementations/highpass.d.ts +12 -0
  26. package/dist/attributes/audio/effects/implementations/highpass.d.ts.map +1 -0
  27. package/dist/attributes/audio/effects/implementations/highpass.js +10 -0
  28. package/dist/attributes/audio/effects/implementations/highpass.js.map +1 -0
  29. package/dist/attributes/audio/effects/implementations/lowpass.d.ts +12 -0
  30. package/dist/attributes/audio/effects/implementations/lowpass.d.ts.map +1 -0
  31. package/dist/attributes/audio/effects/implementations/lowpass.js +10 -0
  32. package/dist/attributes/audio/effects/implementations/lowpass.js.map +1 -0
  33. package/dist/attributes/audio/effects/implementations/tremolo.d.ts +12 -0
  34. package/dist/attributes/audio/effects/implementations/tremolo.d.ts.map +1 -0
  35. package/dist/attributes/audio/effects/implementations/tremolo.js +10 -0
  36. package/dist/attributes/audio/effects/implementations/tremolo.js.map +1 -0
  37. package/dist/attributes/audio/effects/index.d.ts +12 -0
  38. package/dist/attributes/audio/effects/index.d.ts.map +1 -0
  39. package/dist/attributes/audio/effects/index.js +4 -0
  40. package/dist/attributes/audio/effects/index.js.map +1 -0
  41. package/dist/attributes/audio/effects/registry.d.ts +36 -0
  42. package/dist/attributes/audio/effects/registry.d.ts.map +1 -0
  43. package/dist/attributes/audio/effects/registry.js +80 -0
  44. package/dist/attributes/audio/effects/registry.js.map +1 -0
  45. package/dist/attributes/audio/effects/union.d.ts +14 -0
  46. package/dist/attributes/audio/effects/union.d.ts.map +1 -0
  47. package/dist/attributes/audio/effects/union.js +24 -0
  48. package/dist/attributes/audio/effects/union.js.map +1 -0
  49. package/dist/attributes/audio/ramp.d.ts +103 -0
  50. package/dist/attributes/audio/ramp.d.ts.map +1 -0
  51. package/dist/attributes/audio/ramp.js +246 -0
  52. package/dist/attributes/audio/ramp.js.map +1 -0
  53. package/dist/attributes/audio/request.d.ts +24 -13
  54. package/dist/attributes/audio/request.d.ts.map +1 -1
  55. package/dist/attributes/audio/request.js +4 -3
  56. package/dist/attributes/audio/request.js.map +1 -1
  57. package/dist/attributes/audio/schedule.d.ts +24 -31
  58. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  59. package/dist/attributes/audio/schedule.js +42 -28
  60. package/dist/attributes/audio/schedule.js.map +1 -1
  61. package/dist/attributes/audio/sound.d.ts +15 -12
  62. package/dist/attributes/audio/sound.d.ts.map +1 -1
  63. package/dist/attributes/audio/sound.js +8 -10
  64. package/dist/attributes/audio/sound.js.map +1 -1
  65. package/dist/attributes/audio/transition.d.ts +33 -0
  66. package/dist/attributes/audio/transition.d.ts.map +1 -0
  67. package/dist/attributes/audio/transition.js +48 -0
  68. package/dist/attributes/audio/transition.js.map +1 -0
  69. package/dist/attributes/index.d.ts +7 -8
  70. package/dist/attributes/index.d.ts.map +1 -1
  71. package/dist/attributes/index.js +6 -9
  72. package/dist/attributes/index.js.map +1 -1
  73. package/dist/attributes/layout/insets.d.ts +1 -1
  74. package/dist/attributes/layout/insets.js.map +1 -1
  75. package/dist/attributes/layout/matrix2d.d.ts +2 -2
  76. package/dist/attributes/layout/matrix2d.js.map +1 -1
  77. package/dist/attributes/layout/size.d.ts +1 -1
  78. package/dist/attributes/layout/size.js +1 -1
  79. package/dist/attributes/layout/size.js.map +1 -1
  80. package/dist/attributes/layout/space3d.js +1 -1
  81. package/dist/attributes/layout/space3d.js.map +1 -1
  82. package/dist/attributes/properties/decorator.d.ts +44 -11
  83. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  84. package/dist/attributes/properties/decorator.js +37 -9
  85. package/dist/attributes/properties/decorator.js.map +1 -1
  86. package/dist/attributes/properties/inputs.d.ts +1 -1
  87. package/dist/attributes/properties/inputs.js +1 -1
  88. package/dist/attributes/properties/inputs.js.map +1 -1
  89. package/dist/attributes/properties/typed.d.ts +24 -145
  90. package/dist/attributes/properties/typed.d.ts.map +1 -1
  91. package/dist/attributes/properties/typed.js +16 -112
  92. package/dist/attributes/properties/typed.js.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.d.ts +2 -3
  94. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  95. package/dist/attributes/shape/corners/corner-radius.js +2 -3
  96. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  97. package/dist/attributes/shape/effects/chain.d.ts +96 -409
  98. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  99. package/dist/attributes/shape/effects/chain.js +93 -283
  100. package/dist/attributes/shape/effects/chain.js.map +1 -1
  101. package/dist/attributes/shape/effects/effect-data.d.ts +1 -1
  102. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  103. package/dist/attributes/shape/effects/implementations/ascii.d.ts +45 -13
  104. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  105. package/dist/attributes/shape/effects/implementations/ascii.js +29 -23
  106. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  107. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +32 -7
  108. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  109. package/dist/attributes/shape/effects/implementations/bit-crush.js +17 -15
  110. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  111. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +46 -10
  112. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  113. package/dist/attributes/shape/effects/implementations/block-displace.js +21 -19
  114. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  115. package/dist/attributes/shape/effects/implementations/bloom.d.ts +32 -7
  116. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  117. package/dist/attributes/shape/effects/implementations/bloom.js +17 -11
  118. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  119. package/dist/attributes/shape/effects/implementations/blur.d.ts +16 -3
  120. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  121. package/dist/attributes/shape/effects/implementations/blur.js +13 -5
  122. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  123. package/dist/attributes/shape/effects/implementations/bulge.d.ts +28 -9
  124. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  125. package/dist/attributes/shape/effects/implementations/bulge.js +15 -14
  126. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  127. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +21 -5
  128. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  129. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +15 -10
  130. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  131. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +96 -26
  132. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  133. package/dist/attributes/shape/effects/implementations/color-adjustment.js +29 -26
  134. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  135. package/dist/attributes/shape/effects/implementations/curves.d.ts +20 -6
  136. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  137. package/dist/attributes/shape/effects/implementations/curves.js +26 -23
  138. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  139. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +26 -5
  140. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  141. package/dist/attributes/shape/effects/implementations/directional-blur.js +15 -10
  142. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  143. package/dist/attributes/shape/effects/implementations/dither.d.ts +58 -11
  144. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  145. package/dist/attributes/shape/effects/implementations/dither.js +26 -20
  146. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  147. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +47 -15
  148. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  149. package/dist/attributes/shape/effects/implementations/drop-shadow.js +24 -29
  150. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  151. package/dist/attributes/shape/effects/implementations/duotone.d.ts +26 -7
  152. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  153. package/dist/attributes/shape/effects/implementations/duotone.js +17 -16
  154. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  155. package/dist/attributes/shape/effects/implementations/edges.d.ts +29 -7
  156. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  157. package/dist/attributes/shape/effects/implementations/edges.js +17 -14
  158. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  159. package/dist/attributes/shape/effects/implementations/glass.d.ts +76 -19
  160. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  161. package/dist/attributes/shape/effects/implementations/glass.js +28 -22
  162. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  163. package/dist/attributes/shape/effects/implementations/glow.d.ts +149 -42
  164. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  165. package/dist/attributes/shape/effects/implementations/glow.js +74 -72
  166. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  167. package/dist/attributes/shape/effects/implementations/grain.d.ts +43 -11
  168. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  169. package/dist/attributes/shape/effects/implementations/grain.js +21 -18
  170. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  171. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +17 -3
  172. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  173. package/dist/attributes/shape/effects/implementations/grayscale.js +13 -5
  174. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  175. package/dist/attributes/shape/effects/implementations/halftone.d.ts +40 -9
  176. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  177. package/dist/attributes/shape/effects/implementations/halftone.js +20 -16
  178. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  179. package/dist/attributes/shape/effects/implementations/invert.d.ts +23 -5
  180. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  181. package/dist/attributes/shape/effects/implementations/invert.js +15 -10
  182. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  183. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +57 -18
  184. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  185. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +25 -22
  186. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  187. package/dist/attributes/shape/effects/implementations/lut.d.ts +34 -7
  188. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  189. package/dist/attributes/shape/effects/implementations/lut.js +20 -16
  190. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  191. package/dist/attributes/shape/effects/implementations/magnify.d.ts +27 -9
  192. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  193. package/dist/attributes/shape/effects/implementations/magnify.js +17 -14
  194. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  195. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +54 -19
  196. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  197. package/dist/attributes/shape/effects/implementations/motion-blur.js +42 -20
  198. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  199. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +17 -3
  200. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  201. package/dist/attributes/shape/effects/implementations/oil-paint.js +13 -9
  202. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  203. package/dist/attributes/shape/effects/implementations/outline.d.ts +28 -8
  204. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  205. package/dist/attributes/shape/effects/implementations/outline.js +18 -17
  206. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  207. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +25 -6
  208. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  209. package/dist/attributes/shape/effects/implementations/pixelate.js +16 -14
  210. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  211. package/dist/attributes/shape/effects/implementations/posterize.d.ts +14 -3
  212. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  213. package/dist/attributes/shape/effects/implementations/posterize.js +13 -9
  214. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  215. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +91 -26
  216. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  217. package/dist/attributes/shape/effects/implementations/progressive-blur.js +27 -28
  218. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  219. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +49 -10
  220. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  221. package/dist/attributes/shape/effects/implementations/radial-blur.js +19 -20
  222. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  223. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +36 -6
  224. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  225. package/dist/attributes/shape/effects/implementations/rgb-shift.js +16 -15
  226. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  227. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +52 -11
  228. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  229. package/dist/attributes/shape/effects/implementations/scanlines.js +21 -18
  230. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  231. package/dist/attributes/shape/effects/implementations/scatter.d.ts +23 -9
  232. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  233. package/dist/attributes/shape/effects/implementations/scatter.js +15 -12
  234. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  235. package/dist/attributes/shape/effects/implementations/shader.d.ts +90 -34
  236. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  237. package/dist/attributes/shape/effects/implementations/shader.js +42 -26
  238. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  239. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +23 -5
  240. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  241. package/dist/attributes/shape/effects/implementations/sharpen.js +16 -11
  242. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  243. package/dist/attributes/shape/effects/implementations/streak.d.ts +40 -9
  244. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  245. package/dist/attributes/shape/effects/implementations/streak.js +19 -16
  246. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  247. package/dist/attributes/shape/effects/implementations/threshold.d.ts +24 -5
  248. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  249. package/dist/attributes/shape/effects/implementations/threshold.js +17 -11
  250. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  251. package/dist/attributes/shape/effects/implementations/twirl.d.ts +35 -8
  252. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  253. package/dist/attributes/shape/effects/implementations/twirl.js +17 -16
  254. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  255. package/dist/attributes/shape/effects/implementations/vignette.d.ts +37 -7
  256. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  257. package/dist/attributes/shape/effects/implementations/vignette.js +19 -18
  258. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  259. package/dist/attributes/shape/effects/implementations/vintage.d.ts +24 -5
  260. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  261. package/dist/attributes/shape/effects/implementations/vintage.js +15 -10
  262. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  263. package/dist/attributes/shape/effects/implementations/wave.d.ts +61 -14
  264. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  265. package/dist/attributes/shape/effects/implementations/wave.js +26 -23
  266. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  267. package/dist/attributes/shape/effects/index.d.ts +4 -2
  268. package/dist/attributes/shape/effects/index.d.ts.map +1 -1
  269. package/dist/attributes/shape/effects/index.js +1 -1
  270. package/dist/attributes/shape/effects/index.js.map +1 -1
  271. package/dist/attributes/shape/effects/registry.d.ts +11 -0
  272. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  273. package/dist/attributes/shape/effects/registry.js +113 -102
  274. package/dist/attributes/shape/effects/registry.js.map +1 -1
  275. package/dist/attributes/shape/effects/spec.d.ts +229 -0
  276. package/dist/attributes/shape/effects/spec.d.ts.map +1 -0
  277. package/dist/attributes/shape/effects/spec.js +178 -0
  278. package/dist/attributes/shape/effects/spec.js.map +1 -0
  279. package/dist/attributes/shape/fill/chain.d.ts +7 -9
  280. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  281. package/dist/attributes/shape/fill/chain.js +9 -11
  282. package/dist/attributes/shape/fill/chain.js.map +1 -1
  283. package/dist/attributes/shape/fill/color/parser.d.ts +1 -1
  284. package/dist/attributes/shape/fill/color/parser.js +1 -1
  285. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  286. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -2
  287. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  288. package/dist/attributes/shape/fill/implementations/shader.d.ts +28 -27
  289. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  290. package/dist/attributes/shape/fill/implementations/shader.js +20 -14
  291. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  292. package/dist/attributes/shape/fill/implementations/video.d.ts +1 -1
  293. package/dist/attributes/shape/fill/implementations/video.js +1 -1
  294. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  295. package/dist/attributes/shape/fill/index.d.ts +1 -1
  296. package/dist/attributes/shape/fill/index.d.ts.map +1 -1
  297. package/dist/attributes/shape/fill/index.js.map +1 -1
  298. package/dist/attributes/shape/fill/lerp.d.ts +1 -1
  299. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  300. package/dist/attributes/shape/fill/registry.d.ts +1 -2
  301. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  302. package/dist/attributes/shape/fill/registry.js +1 -2
  303. package/dist/attributes/shape/fill/registry.js.map +1 -1
  304. package/dist/attributes/shape/filters/chain.d.ts +3 -7
  305. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  306. package/dist/attributes/shape/filters/chain.js +2 -6
  307. package/dist/attributes/shape/filters/chain.js.map +1 -1
  308. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +2 -2
  309. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  310. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  311. package/dist/attributes/shape/filters/registry.d.ts +1 -1
  312. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  313. package/dist/attributes/shape/filters/registry.js +3 -3
  314. package/dist/attributes/shape/filters/registry.js.map +1 -1
  315. package/dist/attributes/shape/filters/union.d.ts +6 -6
  316. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  317. package/dist/attributes/shape/filters/union.js.map +1 -1
  318. package/dist/attributes/shape/path/ops.d.ts +1 -2
  319. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  320. package/dist/attributes/shape/path/ops.js.map +1 -1
  321. package/dist/attributes/shape/shaders/index.d.ts +2 -0
  322. package/dist/attributes/shape/shaders/index.d.ts.map +1 -1
  323. package/dist/attributes/shape/shaders/index.js +2 -0
  324. package/dist/attributes/shape/shaders/index.js.map +1 -1
  325. package/dist/attributes/shape/shaders/language.d.ts +26 -0
  326. package/dist/attributes/shape/shaders/language.d.ts.map +1 -0
  327. package/dist/attributes/shape/shaders/language.js +20 -0
  328. package/dist/attributes/shape/shaders/language.js.map +1 -0
  329. package/dist/attributes/shape/shaders/pack.d.ts +25 -11
  330. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  331. package/dist/attributes/shape/shaders/pack.js +9 -4
  332. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  333. package/dist/attributes/shape/shaders/resolve.d.ts +4 -5
  334. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  335. package/dist/attributes/shape/shaders/resolve.js +3 -6
  336. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  337. package/dist/attributes/shape/shaders/uniforms.d.ts +41 -0
  338. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -0
  339. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  340. package/dist/attributes/shape/shaders/uniforms.js.map +1 -0
  341. package/dist/attributes/shared/operators.d.ts +2 -2
  342. package/dist/attributes/shared/operators.js.map +1 -1
  343. package/dist/attributes/text/types.d.ts +2 -3
  344. package/dist/attributes/text/types.d.ts.map +1 -1
  345. package/dist/attributes/text/types.js.map +1 -1
  346. package/dist/browser/chunks/chunk-AOT33LMS.js +13 -0
  347. package/dist/browser/chunks/chunk-AOT33LMS.js.map +7 -0
  348. package/dist/browser/chunks/chunk-GKM6UZJR.js +6 -0
  349. package/dist/browser/chunks/chunk-GKM6UZJR.js.map +7 -0
  350. package/dist/browser/chunks/chunk-LKUYVFU3.js +2 -0
  351. package/dist/browser/chunks/{chunk-DHB4COFY.js.map → chunk-LKUYVFU3.js.map} +4 -4
  352. package/dist/browser/chunks/chunk-ZRPZPWZU.js +3 -0
  353. package/dist/browser/chunks/chunk-ZRPZPWZU.js.map +7 -0
  354. package/dist/browser/component.js +1 -1
  355. package/dist/browser/component.js.map +4 -4
  356. package/dist/browser/experimental.js +1 -1
  357. package/dist/browser/experimental.js.map +4 -4
  358. package/dist/browser/index.js +1 -1
  359. package/dist/browser/index.js.map +4 -4
  360. package/dist/browser/manifest.json +2 -4
  361. package/dist/browser/sdk.js +1 -1
  362. package/dist/component.d.ts +10 -18
  363. package/dist/component.d.ts.map +1 -1
  364. package/dist/component.js +10 -17
  365. package/dist/component.js.map +1 -1
  366. package/dist/components/builtins/audio/audio.d.ts +62 -0
  367. package/dist/components/builtins/audio/audio.d.ts.map +1 -0
  368. package/dist/components/builtins/audio/audio.js +38 -0
  369. package/dist/components/builtins/audio/audio.js.map +1 -0
  370. package/dist/components/builtins/geometry/composite.d.ts +93 -0
  371. package/dist/components/builtins/geometry/composite.d.ts.map +1 -0
  372. package/dist/components/builtins/geometry/composite.js +25 -0
  373. package/dist/components/builtins/geometry/composite.js.map +1 -0
  374. package/dist/components/builtins/geometry/geometry.d.ts +921 -0
  375. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -0
  376. package/dist/components/builtins/geometry/geometry.js +107 -0
  377. package/dist/components/builtins/geometry/geometry.js.map +1 -0
  378. package/dist/components/builtins/geometry/shape-outline.d.ts +93 -0
  379. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -0
  380. package/dist/components/builtins/geometry/shape-outline.js +470 -0
  381. package/dist/components/builtins/geometry/shape-outline.js.map +1 -0
  382. package/dist/components/builtins/layout/layout.d.ts +186 -0
  383. package/dist/components/builtins/layout/layout.d.ts.map +1 -0
  384. package/dist/components/builtins/layout/layout.js +84 -0
  385. package/dist/components/builtins/layout/layout.js.map +1 -0
  386. package/dist/components/builtins/media/media.d.ts +240 -0
  387. package/dist/components/builtins/media/media.d.ts.map +1 -0
  388. package/dist/components/builtins/media/media.js +143 -0
  389. package/dist/components/builtins/media/media.js.map +1 -0
  390. package/dist/components/builtins/providers/providers.d.ts +47 -0
  391. package/dist/components/builtins/providers/providers.d.ts.map +1 -0
  392. package/dist/components/builtins/providers/providers.js +30 -0
  393. package/dist/components/builtins/providers/providers.js.map +1 -0
  394. package/dist/components/builtins/text/number-format.d.ts +66 -0
  395. package/dist/components/builtins/text/number-format.d.ts.map +1 -0
  396. package/dist/components/builtins/text/number-format.js +227 -0
  397. package/dist/components/builtins/text/number-format.js.map +1 -0
  398. package/dist/components/builtins/text/number-pattern.d.ts +51 -0
  399. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -0
  400. package/dist/components/builtins/text/number-pattern.js +77 -0
  401. package/dist/components/builtins/text/number-pattern.js.map +1 -0
  402. package/dist/components/builtins/text/text-defaults.d.ts +32 -0
  403. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -0
  404. package/dist/components/builtins/text/text-defaults.js +37 -0
  405. package/dist/components/builtins/text/text-defaults.js.map +1 -0
  406. package/dist/components/builtins/text/text-layout.d.ts +82 -0
  407. package/dist/components/builtins/text/text-layout.d.ts.map +1 -0
  408. package/dist/components/builtins/text/text-layout.js +331 -0
  409. package/dist/components/builtins/text/text-layout.js.map +1 -0
  410. package/dist/components/builtins/text/text.d.ts +409 -0
  411. package/dist/components/builtins/text/text.d.ts.map +1 -0
  412. package/dist/components/builtins/text/text.js +116 -0
  413. package/dist/components/builtins/text/text.js.map +1 -0
  414. package/dist/components/builtins/three/canvas3d.d.ts +245 -0
  415. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -0
  416. package/dist/components/builtins/three/canvas3d.js +21 -0
  417. package/dist/components/builtins/three/canvas3d.js.map +1 -0
  418. package/dist/components/builtins/three/grid-geometry3d.d.ts +62 -0
  419. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -0
  420. package/dist/components/builtins/three/grid-geometry3d.js +114 -0
  421. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -0
  422. package/dist/components/builtins/three/three.d.ts +1889 -0
  423. package/dist/components/builtins/three/three.d.ts.map +1 -0
  424. package/dist/components/builtins/three/three.js +305 -0
  425. package/dist/components/builtins/three/three.js.map +1 -0
  426. package/dist/components/factory/api.d.ts +543 -0
  427. package/dist/components/factory/api.d.ts.map +1 -0
  428. package/dist/components/factory/api.js +4 -0
  429. package/dist/components/factory/api.js.map +1 -0
  430. package/dist/components/factory/clip-of.d.ts +5 -0
  431. package/dist/components/factory/clip-of.d.ts.map +1 -0
  432. package/dist/components/factory/clip-of.js +33 -0
  433. package/dist/components/factory/clip-of.js.map +1 -0
  434. package/dist/components/factory/commands-for.d.ts +19 -0
  435. package/dist/components/factory/commands-for.d.ts.map +1 -0
  436. package/dist/components/factory/commands-for.js +5 -0
  437. package/dist/components/factory/commands-for.js.map +1 -0
  438. package/dist/components/factory/component-audio.d.ts +9 -0
  439. package/dist/components/factory/component-audio.d.ts.map +1 -0
  440. package/dist/components/factory/component-audio.js +18 -0
  441. package/dist/components/factory/component-audio.js.map +1 -0
  442. package/dist/components/factory/component2d.d.ts +8 -0
  443. package/dist/components/factory/component2d.d.ts.map +1 -0
  444. package/dist/components/factory/component2d.js +240 -0
  445. package/dist/components/factory/component2d.js.map +1 -0
  446. package/dist/components/factory/component3d.d.ts +9 -0
  447. package/dist/components/factory/component3d.d.ts.map +1 -0
  448. package/dist/components/factory/component3d.js +107 -0
  449. package/dist/components/factory/component3d.js.map +1 -0
  450. package/dist/components/factory/factory.d.ts +66 -0
  451. package/dist/components/factory/factory.d.ts.map +1 -0
  452. package/dist/components/factory/factory.js +347 -0
  453. package/dist/components/factory/factory.js.map +1 -0
  454. package/dist/components/factory/timeline.d.ts +22 -0
  455. package/dist/components/factory/timeline.d.ts.map +1 -0
  456. package/dist/components/factory/timeline.js +128 -0
  457. package/dist/components/factory/timeline.js.map +1 -0
  458. package/dist/components/factory/type-def.d.ts +26 -0
  459. package/dist/components/factory/type-def.d.ts.map +1 -0
  460. package/dist/components/factory/type-def.js +16 -0
  461. package/dist/components/factory/type-def.js.map +1 -0
  462. package/dist/components/factory/types.d.ts +91 -0
  463. package/dist/components/factory/types.d.ts.map +1 -0
  464. package/dist/components/factory/types.js +88 -0
  465. package/dist/components/factory/types.js.map +1 -0
  466. package/dist/components/factory/views.d.ts +121 -0
  467. package/dist/components/factory/views.d.ts.map +1 -0
  468. package/dist/components/factory/views.js +413 -0
  469. package/dist/components/factory/views.js.map +1 -0
  470. package/dist/components/modules/aim.d.ts +30 -0
  471. package/dist/components/modules/aim.d.ts.map +1 -0
  472. package/dist/components/modules/aim.js +39 -0
  473. package/dist/components/modules/aim.js.map +1 -0
  474. package/dist/components/modules/corners.d.ts +13 -0
  475. package/dist/components/modules/corners.d.ts.map +1 -0
  476. package/dist/components/modules/corners.js +12 -0
  477. package/dist/components/modules/corners.js.map +1 -0
  478. package/dist/components/modules/flow.d.ts +26 -0
  479. package/dist/components/modules/flow.d.ts.map +1 -0
  480. package/dist/components/modules/flow.js +57 -0
  481. package/dist/components/modules/flow.js.map +1 -0
  482. package/dist/components/modules/material.d.ts +40 -0
  483. package/dist/components/modules/material.d.ts.map +1 -0
  484. package/dist/components/modules/material.js +75 -0
  485. package/dist/components/modules/material.js.map +1 -0
  486. package/dist/components/modules/paint.d.ts +71 -0
  487. package/dist/components/modules/paint.d.ts.map +1 -0
  488. package/dist/components/modules/paint.js +106 -0
  489. package/dist/components/modules/paint.js.map +1 -0
  490. package/dist/components/modules/shapes.d.ts +31 -0
  491. package/dist/components/modules/shapes.d.ts.map +1 -0
  492. package/dist/components/modules/shapes.js +43 -0
  493. package/dist/components/modules/shapes.js.map +1 -0
  494. package/dist/components/modules/text-layout.d.ts +26 -0
  495. package/dist/components/modules/text-layout.d.ts.map +1 -0
  496. package/dist/components/modules/text-layout.js +57 -0
  497. package/dist/components/modules/text-layout.js.map +1 -0
  498. package/dist/components/modules/text-style.d.ts +48 -0
  499. package/dist/components/modules/text-style.d.ts.map +1 -0
  500. package/dist/components/modules/text-style.js +63 -0
  501. package/dist/components/modules/text-style.js.map +1 -0
  502. package/dist/components/modules/three-entries.d.ts +23 -0
  503. package/dist/components/modules/three-entries.d.ts.map +1 -0
  504. package/dist/components/modules/three-entries.js +41 -0
  505. package/dist/components/modules/three-entries.js.map +1 -0
  506. package/dist/components/modules/view3d.d.ts +59 -0
  507. package/dist/components/modules/view3d.d.ts.map +1 -0
  508. package/dist/components/modules/view3d.js +171 -0
  509. package/dist/components/modules/view3d.js.map +1 -0
  510. package/dist/components/trees/2d/group-bounds.d.ts +56 -0
  511. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -0
  512. package/dist/components/trees/2d/group-bounds.js +87 -0
  513. package/dist/components/trees/2d/group-bounds.js.map +1 -0
  514. package/dist/components/trees/2d/node-lifecycle.d.ts +46 -0
  515. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -0
  516. package/dist/components/trees/2d/node-lifecycle.js +264 -0
  517. package/dist/components/trees/2d/node-lifecycle.js.map +1 -0
  518. package/dist/components/trees/2d/node-motion.d.ts +56 -0
  519. package/dist/components/trees/2d/node-motion.d.ts.map +1 -0
  520. package/dist/components/trees/2d/node-motion.js +86 -0
  521. package/dist/components/trees/2d/node-motion.js.map +1 -0
  522. package/dist/components/trees/2d/node-render.d.ts +36 -0
  523. package/dist/components/trees/2d/node-render.d.ts.map +1 -0
  524. package/dist/components/trees/2d/node-render.js +67 -0
  525. package/dist/components/trees/2d/node-render.js.map +1 -0
  526. package/dist/components/trees/2d/node-space.d.ts +63 -0
  527. package/dist/components/trees/2d/node-space.d.ts.map +1 -0
  528. package/dist/components/trees/2d/node-space.js +131 -0
  529. package/dist/components/trees/2d/node-space.js.map +1 -0
  530. package/dist/components/trees/2d/node-transform.d.ts +55 -0
  531. package/dist/components/trees/2d/node-transform.d.ts.map +1 -0
  532. package/dist/components/trees/2d/node-transform.js +73 -0
  533. package/dist/components/trees/2d/node-transform.js.map +1 -0
  534. package/dist/components/trees/2d/node2d.d.ts +1020 -0
  535. package/dist/components/trees/2d/node2d.d.ts.map +1 -0
  536. package/dist/components/trees/2d/node2d.js +1481 -0
  537. package/dist/components/trees/2d/node2d.js.map +1 -0
  538. package/dist/components/trees/audio/index.d.ts +2 -0
  539. package/dist/components/trees/audio/index.d.ts.map +1 -0
  540. package/dist/components/trees/audio/index.js +2 -0
  541. package/dist/components/trees/audio/index.js.map +1 -0
  542. package/dist/components/trees/audio/node-audio.d.ts +116 -0
  543. package/dist/components/trees/audio/node-audio.d.ts.map +1 -0
  544. package/dist/components/trees/audio/node-audio.js +171 -0
  545. package/dist/components/trees/audio/node-audio.js.map +1 -0
  546. package/dist/components/trees/index.d.ts +10 -0
  547. package/dist/components/trees/index.d.ts.map +1 -0
  548. package/dist/components/trees/index.js +14 -0
  549. package/dist/components/trees/index.js.map +1 -0
  550. package/dist/components/trees/node/node-editor-state.d.ts +53 -0
  551. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -0
  552. package/dist/components/trees/node/node-editor-state.js +23 -0
  553. package/dist/components/trees/node/node-editor-state.js.map +1 -0
  554. package/dist/components/trees/node/node-reactive.d.ts +89 -0
  555. package/dist/components/trees/node/node-reactive.d.ts.map +1 -0
  556. package/dist/components/trees/node/node-reactive.js +135 -0
  557. package/dist/components/trees/node/node-reactive.js.map +1 -0
  558. package/dist/components/trees/node/node-time.d.ts +39 -0
  559. package/dist/components/trees/node/node-time.d.ts.map +1 -0
  560. package/dist/components/trees/node/node-time.js +14 -0
  561. package/dist/components/trees/node/node-time.js.map +1 -0
  562. package/dist/components/trees/node/node-walk.d.ts +46 -0
  563. package/dist/components/trees/node/node-walk.d.ts.map +1 -0
  564. package/dist/components/trees/node/node-walk.js +74 -0
  565. package/dist/components/trees/node/node-walk.js.map +1 -0
  566. package/dist/components/trees/node/node.d.ts +401 -0
  567. package/dist/components/trees/node/node.d.ts.map +1 -0
  568. package/dist/components/trees/node/node.js +680 -0
  569. package/dist/components/trees/node/node.js.map +1 -0
  570. package/dist/components/trees/root/canvas2d-node.d.ts +163 -0
  571. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -0
  572. package/dist/components/trees/root/canvas2d-node.js +216 -0
  573. package/dist/components/trees/root/canvas2d-node.js.map +1 -0
  574. package/dist/components/trees/three/node3d.d.ts +222 -0
  575. package/dist/components/trees/three/node3d.d.ts.map +1 -0
  576. package/dist/components/trees/three/node3d.js +289 -0
  577. package/dist/components/trees/three/node3d.js.map +1 -0
  578. package/dist/document/builtins.js +13 -13
  579. package/dist/document/builtins.js.map +1 -1
  580. package/dist/document/command-traits.d.ts +14 -4
  581. package/dist/document/command-traits.d.ts.map +1 -1
  582. package/dist/document/command-traits.js +35 -7
  583. package/dist/document/command-traits.js.map +1 -1
  584. package/dist/document/deny-globals.d.ts +2 -2
  585. package/dist/document/deny-globals.js +2 -2
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/expression/index.d.ts +1 -1
  588. package/dist/document/expression/index.js +1 -1
  589. package/dist/document/expression/index.js.map +1 -1
  590. package/dist/document/expression/ops.js +1 -1
  591. package/dist/document/expression/ops.js.map +1 -1
  592. package/dist/document/index.d.ts +9 -2
  593. package/dist/document/index.d.ts.map +1 -1
  594. package/dist/document/index.js +5 -2
  595. package/dist/document/index.js.map +1 -1
  596. package/dist/document/migrate.d.ts +70 -0
  597. package/dist/document/migrate.d.ts.map +1 -0
  598. package/dist/document/migrate.js +202 -0
  599. package/dist/document/migrate.js.map +1 -0
  600. package/dist/document/missing-node.d.ts +27 -0
  601. package/dist/document/missing-node.d.ts.map +1 -0
  602. package/dist/document/missing-node.js +48 -0
  603. package/dist/document/missing-node.js.map +1 -0
  604. package/dist/document/node-decorator.d.ts +14 -10
  605. package/dist/document/node-decorator.d.ts.map +1 -1
  606. package/dist/document/node-decorator.js +14 -10
  607. package/dist/document/node-decorator.js.map +1 -1
  608. package/dist/document/node-descriptor.d.ts +7 -3
  609. package/dist/document/node-descriptor.d.ts.map +1 -1
  610. package/dist/document/node-descriptor.js.map +1 -1
  611. package/dist/document/placement.d.ts +2 -1
  612. package/dist/document/placement.d.ts.map +1 -1
  613. package/dist/document/placement.js.map +1 -1
  614. package/dist/document/project.d.ts +2 -0
  615. package/dist/document/project.d.ts.map +1 -1
  616. package/dist/document/project.js +1 -0
  617. package/dist/document/project.js.map +1 -1
  618. package/dist/document/prop-evolution.d.ts +51 -0
  619. package/dist/document/prop-evolution.d.ts.map +1 -0
  620. package/dist/document/prop-evolution.js +83 -0
  621. package/dist/document/prop-evolution.js.map +1 -0
  622. package/dist/document/registry.d.ts +39 -25
  623. package/dist/document/registry.d.ts.map +1 -1
  624. package/dist/document/registry.js +41 -21
  625. package/dist/document/registry.js.map +1 -1
  626. package/dist/document/settled-index.d.ts +2 -0
  627. package/dist/document/settled-index.d.ts.map +1 -1
  628. package/dist/document/settled-index.js +5 -5
  629. package/dist/document/settled-index.js.map +1 -1
  630. package/dist/document/timeline-patch.d.ts +4 -0
  631. package/dist/document/timeline-patch.d.ts.map +1 -1
  632. package/dist/document/timeline-patch.js +28 -3
  633. package/dist/document/timeline-patch.js.map +1 -1
  634. package/dist/document/timeline.d.ts +48 -4
  635. package/dist/document/timeline.d.ts.map +1 -1
  636. package/dist/document/timeline.js +174 -44
  637. package/dist/document/timeline.js.map +1 -1
  638. package/dist/document/types.d.ts +18 -32
  639. package/dist/document/types.d.ts.map +1 -1
  640. package/dist/document/types.js.map +1 -1
  641. package/dist/document/validate.d.ts +18 -6
  642. package/dist/document/validate.d.ts.map +1 -1
  643. package/dist/document/validate.js +158 -21
  644. package/dist/document/validate.js.map +1 -1
  645. package/dist/document/vocabulary.d.ts +28 -0
  646. package/dist/document/vocabulary.d.ts.map +1 -0
  647. package/dist/document/vocabulary.js +42 -0
  648. package/dist/document/vocabulary.js.map +1 -0
  649. package/dist/experimental.d.ts +79 -19
  650. package/dist/experimental.d.ts.map +1 -1
  651. package/dist/experimental.js +31 -17
  652. package/dist/experimental.js.map +1 -1
  653. package/dist/index.d.ts +10 -11
  654. package/dist/index.d.ts.map +1 -1
  655. package/dist/index.js +10 -11
  656. package/dist/index.js.map +1 -1
  657. package/dist/layout/types.d.ts +1 -1
  658. package/dist/layout/types.js.map +1 -1
  659. package/dist/platform/exporter.d.ts +13 -0
  660. package/dist/platform/exporter.d.ts.map +1 -1
  661. package/dist/platform/exporter.js.map +1 -1
  662. package/dist/props/host.d.ts +1 -1
  663. package/dist/props/host.js.map +1 -1
  664. package/dist/props/slot.d.ts +1 -1
  665. package/dist/props/slot.js +1 -1
  666. package/dist/props/slot.js.map +1 -1
  667. package/dist/renamed-scene-names.d.ts +1 -1
  668. package/dist/renamed-scene-names.d.ts.map +1 -1
  669. package/dist/renamed-scene-names.js +1 -1
  670. package/dist/renamed-scene-names.js.map +1 -1
  671. package/dist/render/canvas-render-context2d.d.ts +9 -0
  672. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  673. package/dist/render/canvas-render-context2d.js +10 -0
  674. package/dist/render/canvas-render-context2d.js.map +1 -1
  675. package/dist/render/clip-contains.js +1 -1
  676. package/dist/render/clip-contains.js.map +1 -1
  677. package/dist/render/clip.d.ts +1 -1
  678. package/dist/render/clip.js +1 -1
  679. package/dist/render/clip.js.map +1 -1
  680. package/dist/render/descriptors/rect.js.map +1 -1
  681. package/dist/render/descriptors/text.d.ts +13 -7
  682. package/dist/render/descriptors/text.d.ts.map +1 -1
  683. package/dist/render/descriptors/text.js +9 -3
  684. package/dist/render/descriptors/text.js.map +1 -1
  685. package/dist/render/index.d.ts +2 -0
  686. package/dist/render/index.d.ts.map +1 -1
  687. package/dist/render/index.js +1 -0
  688. package/dist/render/index.js.map +1 -1
  689. package/dist/render/render-context2d.d.ts +3 -3
  690. package/dist/render/render-context2d.js.map +1 -1
  691. package/dist/render/render-issue.d.ts +39 -0
  692. package/dist/render/render-issue.d.ts.map +1 -0
  693. package/dist/render/render-issue.js +29 -0
  694. package/dist/render/render-issue.js.map +1 -0
  695. package/dist/render/surface.d.ts +2 -2
  696. package/dist/render/surface.js.map +1 -1
  697. package/dist/render3d/builders.d.ts +1 -1
  698. package/dist/render3d/builders.js +1 -1
  699. package/dist/render3d/builders.js.map +1 -1
  700. package/dist/render3d/graphics3d.d.ts +13 -19
  701. package/dist/render3d/graphics3d.d.ts.map +1 -1
  702. package/dist/render3d/graphics3d.js +67 -24
  703. package/dist/render3d/graphics3d.js.map +1 -1
  704. package/dist/render3d/scene3d.d.ts +1 -1
  705. package/dist/render3d/scene3d.js +1 -1
  706. package/dist/render3d/scene3d.js.map +1 -1
  707. package/dist/render3d/texture.d.ts +2 -2
  708. package/dist/render3d/texture.d.ts.map +1 -1
  709. package/dist/render3d/texture.js.map +1 -1
  710. package/dist/render3d/vector3.d.ts +2 -2
  711. package/dist/render3d/vector3.js +2 -2
  712. package/dist/render3d/vector3.js.map +1 -1
  713. package/dist/runtime/asset-refine.d.ts +1 -1
  714. package/dist/runtime/asset-refine.d.ts.map +1 -1
  715. package/dist/runtime/asset-refine.js +3 -2
  716. package/dist/runtime/asset-refine.js.map +1 -1
  717. package/dist/runtime/asset-timeline.d.ts +10 -0
  718. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  719. package/dist/runtime/asset-timeline.js.map +1 -1
  720. package/dist/runtime/asset-update.d.ts.map +1 -1
  721. package/dist/runtime/asset-update.js +8 -1
  722. package/dist/runtime/asset-update.js.map +1 -1
  723. package/dist/runtime/audio-index.d.ts +0 -11
  724. package/dist/runtime/audio-index.d.ts.map +1 -1
  725. package/dist/runtime/audio-index.js +0 -25
  726. package/dist/runtime/audio-index.js.map +1 -1
  727. package/dist/runtime/clip-instance.d.ts +6 -4
  728. package/dist/runtime/clip-instance.d.ts.map +1 -1
  729. package/dist/runtime/clip-instance.js +8 -4
  730. package/dist/runtime/clip-instance.js.map +1 -1
  731. package/dist/runtime/clip-store.d.ts +2 -3
  732. package/dist/runtime/clip-store.d.ts.map +1 -1
  733. package/dist/runtime/clip-store.js +34 -37
  734. package/dist/runtime/clip-store.js.map +1 -1
  735. package/dist/runtime/engine.d.ts +8 -6
  736. package/dist/runtime/engine.d.ts.map +1 -1
  737. package/dist/runtime/engine.js +4 -3
  738. package/dist/runtime/engine.js.map +1 -1
  739. package/dist/runtime/node-picking.d.ts +2 -2
  740. package/dist/runtime/node-picking.d.ts.map +1 -1
  741. package/dist/runtime/node-picking.js +3 -3
  742. package/dist/runtime/node-picking.js.map +1 -1
  743. package/dist/runtime/node-picking3d.d.ts +2 -2
  744. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  745. package/dist/runtime/node-picking3d.js +1 -1
  746. package/dist/runtime/node-picking3d.js.map +1 -1
  747. package/dist/runtime/playback-controller.d.ts +2 -2
  748. package/dist/runtime/playback-controller.d.ts.map +1 -1
  749. package/dist/runtime/playback-controller.js +15 -5
  750. package/dist/runtime/playback-controller.js.map +1 -1
  751. package/dist/runtime/session.d.ts +7 -3
  752. package/dist/runtime/session.d.ts.map +1 -1
  753. package/dist/runtime/session.js +11 -4
  754. package/dist/runtime/session.js.map +1 -1
  755. package/dist/runtime/state-evaluator.d.ts +2 -2
  756. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  757. package/dist/runtime/state-evaluator.js.map +1 -1
  758. package/dist/runtime/text-geometry.d.ts +2 -2
  759. package/dist/runtime/text-geometry.d.ts.map +1 -1
  760. package/dist/runtime/text-geometry.js +4 -5
  761. package/dist/runtime/text-geometry.js.map +1 -1
  762. package/dist/sdk/index.d.ts +50 -44
  763. package/dist/sdk/index.d.ts.map +1 -1
  764. package/dist/sdk/index.js +35 -29
  765. package/dist/sdk/index.js.map +1 -1
  766. package/dist/tween/command-decorator.d.ts +14 -9
  767. package/dist/tween/command-decorator.d.ts.map +1 -1
  768. package/dist/tween/command-decorator.js +3 -2
  769. package/dist/tween/command-decorator.js.map +1 -1
  770. package/dist/tween/command.d.ts +1 -1
  771. package/dist/tween/command.js.map +1 -1
  772. package/dist/tween/ease/describe.d.ts +2 -0
  773. package/dist/tween/ease/describe.d.ts.map +1 -1
  774. package/dist/tween/ease/describe.js +4 -0
  775. package/dist/tween/ease/describe.js.map +1 -1
  776. package/dist/tween/ease/spec.d.ts +31 -0
  777. package/dist/tween/ease/spec.d.ts.map +1 -0
  778. package/dist/tween/ease/spec.js +51 -0
  779. package/dist/tween/ease/spec.js.map +1 -0
  780. package/dist/tween/index.d.ts +3 -1
  781. package/dist/tween/index.d.ts.map +1 -1
  782. package/dist/tween/index.js +2 -1
  783. package/dist/tween/index.js.map +1 -1
  784. package/dist/tween/loop.d.ts +1 -1
  785. package/dist/tween/loop.js +1 -1
  786. package/dist/tween/loop.js.map +1 -1
  787. package/dist/util/reference.d.ts +6 -6
  788. package/dist/util/reference.js.map +1 -1
  789. package/package.json +3 -11
  790. package/dist/browser/chunks/chunk-2RIYH36X.js +0 -3
  791. package/dist/browser/chunks/chunk-2RIYH36X.js.map +0 -7
  792. package/dist/browser/chunks/chunk-DDJN3QII.js +0 -15
  793. package/dist/browser/chunks/chunk-DDJN3QII.js.map +0 -7
  794. package/dist/browser/chunks/chunk-DHB4COFY.js +0 -2
  795. package/dist/browser/chunks/chunk-EJDPYDQI.js +0 -5
  796. package/dist/browser/chunks/chunk-EJDPYDQI.js.map +0 -7
  797. package/dist/browser/chunks/chunk-SFNJRPBV.js +0 -2
  798. package/dist/browser/chunks/chunk-SFNJRPBV.js.map +0 -7
  799. package/dist/browser/chunks/chunk-XAWE4EAK.js +0 -2
  800. package/dist/browser/chunks/chunk-XAWE4EAK.js.map +0 -7
  801. package/dist/browser/jsx-jsx-dev-runtime.js +0 -2
  802. package/dist/browser/jsx-jsx-dev-runtime.js.map +0 -7
  803. package/dist/browser/jsx-jsx-runtime.js +0 -2
  804. package/dist/browser/jsx-jsx-runtime.js.map +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"loop.js","sourceRoot":"","sources":["../../src/tween/loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA6BvC,qFAAqF;AACrF,MAAM,UAAU,UAAU,CAAC,IAAc;IACrC,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;AACpF,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,WAAW,CAAC,IAA0B;IAClD,OAAO,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAc,EAAE,QAAgB,EAAE,IAAI,GAAG,QAAQ;IACtE,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,QAAQ,CAAC;IACnC,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAc,EAAE,OAAe,EAAE,QAAgB;IACvE,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjE,4EAA4E;IAC5E,sEAAsE;IACtE,kCAAkC;IAClC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;IACvD,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAClC,QAAQ,IAAI,CAAC,SAAS,IAAI,QAAQ,EAAE,CAAC;QACjC,KAAK,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7B,KAAK,WAAW,CAAC,CAAC,OAAO,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACrD,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;AACL,CAAC","sourcesContent":["/**\r\n * Repetition, as data: how many times a command runs and which way each pass\r\n * goes.\r\n *\r\n * A loop is a **placement** property, the same kind of thing as `at` and\r\n * `duration` — it says when the command is running, never what it does. That is\r\n * why it lives out here rather than in any one command's args: the wrapper goes\r\n * *around* a built `Command`, so `to`, `fillTo`, `countTo` and a custom\r\n * `@command()` nobody has written yet all loop by the same code, with nothing to\r\n * forward and nothing to forget.\r\n *\r\n * And it stays seekable. A looped command is still a pure function of its own\r\n * normalized time — `at(t)` maps `t` onto a pass and asks the inner command for\r\n * that pass's frame — so scrubbing into the fourth repetition costs the same as\r\n * scrubbing into the first, which is the whole reason commands are values here.\r\n */\r\n\r\nimport { clamp01 } from \"@/util/clamp\";\r\n\r\n/**\r\n * Which way a pass runs.\r\n *\r\n * `alternate` is the reason this is three values rather than a boolean: a\r\n * bounce — out and back — is one command with two passes, not two commands whose\r\n * `at`s have to be kept in step by hand.\r\n */\r\nexport type LoopDirection = \"normal\" | \"reverse\" | \"alternate\";\r\n\r\n/**\r\n * How a command repeats. Absent on a command is \"runs once\".\r\n */\r\nexport interface LoopSpec {\r\n /** Absent is `\"normal\"`. */\r\n direction?: LoopDirection;\r\n /**\r\n * How many times to repeat **after** the first pass: `0` is no repeat (the\r\n * same as no loop at all), `3` plays four passes, and `null` repeats for as\r\n * long as there is clip left to fill.\r\n *\r\n * Repeats rather than total passes so that the value reads as what the word\r\n * says — \"repeat twice\" is `2` — and so that the no-op is `0` rather than a\r\n * `1` that looks like it should do something.\r\n */\r\n count: number | null;\r\n}\r\n\r\n/** Total passes: repeats plus the first one, or `Infinity` for an unlimited loop. */\r\nexport function loopPasses(loop: LoopSpec): number {\r\n return loop.count === null ? Infinity : Math.max(0, Math.floor(loop.count)) + 1;\r\n}\r\n\r\n/** Whether a loop changes anything: an unlimited one always does, a counted one only past zero. */\r\nexport function loopRepeats(loop: LoopSpec | undefined): loop is LoopSpec {\r\n return loop !== undefined && (loop.count === null || loop.count >= 1);\r\n}\r\n\r\n/**\r\n * Seconds a looped command occupies.\r\n *\r\n * `fill` is what an unlimited loop is given to cover — the clip's remaining time,\r\n * where a timeline places one. An unlimited loop does not *define* a length the\r\n * way a counted one does: a background that turns forever should fill the scene\r\n * it is in, not stretch it, so `documentDuration` counts one pass of it and this\r\n * stretches it to whatever that came to.\r\n */\r\nexport function loopSpan(loop: LoopSpec, duration: number, fill = duration): number {\r\n if (duration <= 0) return duration;\r\n if (loop.count === null) return Math.max(duration, fill);\r\n return duration * loopPasses(loop);\r\n}\r\n\r\n/**\r\n * Where in one pass `elapsed` lands, as normalized time for the inner command.\r\n *\r\n * Past the last pass of a counted loop it holds at that pass's end rather than\r\n * wrapping to the start — the same rule a finished command follows everywhere\r\n * else, and what keeps the value a loop leaves behind the value the next command\r\n * tweens from.\r\n */\r\nexport function loopPhase(loop: LoopSpec, elapsed: number, duration: number): number {\r\n if (duration <= 0) return 1;\r\n const passes = loopPasses(loop);\r\n const capped = Math.min(Math.max(elapsed, 0) / duration, passes);\r\n // `passes - 1` holds the final pass at its end instead of rolling over to a\r\n // pass that does not exist. `Infinity - 1` is still `Infinity`, so an\r\n // unlimited loop is never capped.\r\n const index = Math.min(Math.floor(capped), passes - 1);\r\n const t = clamp01(capped - index);\r\n switch (loop.direction ?? \"normal\") {\r\n case \"reverse\": return 1 - t;\r\n case \"alternate\": return index % 2 === 0 ? t : 1 - t;\r\n default: return t;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"loop.js","sourceRoot":"","sources":["../../src/tween/loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA6BvC,qFAAqF;AACrF,MAAM,UAAU,UAAU,CAAC,IAAc;IACrC,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;AACpF,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,WAAW,CAAC,IAA0B;IAClD,OAAO,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAc,EAAE,QAAgB,EAAE,IAAI,GAAG,QAAQ;IACtE,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,QAAQ,CAAC;IACnC,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAc,EAAE,OAAe,EAAE,QAAgB;IACvE,IAAI,QAAQ,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjE,4EAA4E;IAC5E,sEAAsE;IACtE,kCAAkC;IAClC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;IACvD,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAClC,QAAQ,IAAI,CAAC,SAAS,IAAI,QAAQ,EAAE,CAAC;QACjC,KAAK,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7B,KAAK,WAAW,CAAC,CAAC,OAAO,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACrD,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;AACL,CAAC","sourcesContent":["/**\r\n * Repetition, as data: how many times a command runs and which way each pass\r\n * goes.\r\n *\r\n * A loop is a **placement** property, the same kind of thing as `at` and\r\n * `duration` — it says when the command is running, never what it does. That is\r\n * why it lives out here rather than in any one command's args: the wrapper goes\r\n * *around* a built `Command`, so `to`, `fillTo`, `countTo` and a custom\r\n * `command()` nobody has written yet all loop by the same code, with nothing to\r\n * forward and nothing to forget.\r\n *\r\n * And it stays seekable. A looped command is still a pure function of its own\r\n * normalized time — `at(t)` maps `t` onto a pass and asks the inner command for\r\n * that pass's frame — so scrubbing into the fourth repetition costs the same as\r\n * scrubbing into the first, which is the whole reason commands are values here.\r\n */\r\n\r\nimport { clamp01 } from \"@/util/clamp\";\r\n\r\n/**\r\n * Which way a pass runs.\r\n *\r\n * `alternate` is the reason this is three values rather than a boolean: a\r\n * bounce — out and back — is one command with two passes, not two commands whose\r\n * `at`s have to be kept in step by hand.\r\n */\r\nexport type LoopDirection = \"normal\" | \"reverse\" | \"alternate\";\r\n\r\n/**\r\n * How a command repeats. Absent on a command is \"runs once\".\r\n */\r\nexport interface LoopSpec {\r\n /** Absent is `\"normal\"`. */\r\n direction?: LoopDirection;\r\n /**\r\n * How many times to repeat **after** the first pass: `0` is no repeat (the\r\n * same as no loop at all), `3` plays four passes, and `null` repeats for as\r\n * long as there is clip left to fill.\r\n *\r\n * Repeats rather than total passes so that the value reads as what the word\r\n * says — \"repeat twice\" is `2` — and so that the no-op is `0` rather than a\r\n * `1` that looks like it should do something.\r\n */\r\n count: number | null;\r\n}\r\n\r\n/** Total passes: repeats plus the first one, or `Infinity` for an unlimited loop. */\r\nexport function loopPasses(loop: LoopSpec): number {\r\n return loop.count === null ? Infinity : Math.max(0, Math.floor(loop.count)) + 1;\r\n}\r\n\r\n/** Whether a loop changes anything: an unlimited one always does, a counted one only past zero. */\r\nexport function loopRepeats(loop: LoopSpec | undefined): loop is LoopSpec {\r\n return loop !== undefined && (loop.count === null || loop.count >= 1);\r\n}\r\n\r\n/**\r\n * Seconds a looped command occupies.\r\n *\r\n * `fill` is what an unlimited loop is given to cover — the clip's remaining time,\r\n * where a timeline places one. An unlimited loop does not *define* a length the\r\n * way a counted one does: a background that turns forever should fill the scene\r\n * it is in, not stretch it, so `documentDuration` counts one pass of it and this\r\n * stretches it to whatever that came to.\r\n */\r\nexport function loopSpan(loop: LoopSpec, duration: number, fill = duration): number {\r\n if (duration <= 0) return duration;\r\n if (loop.count === null) return Math.max(duration, fill);\r\n return duration * loopPasses(loop);\r\n}\r\n\r\n/**\r\n * Where in one pass `elapsed` lands, as normalized time for the inner command.\r\n *\r\n * Past the last pass of a counted loop it holds at that pass's end rather than\r\n * wrapping to the start — the same rule a finished command follows everywhere\r\n * else, and what keeps the value a loop leaves behind the value the next command\r\n * tweens from.\r\n */\r\nexport function loopPhase(loop: LoopSpec, elapsed: number, duration: number): number {\r\n if (duration <= 0) return 1;\r\n const passes = loopPasses(loop);\r\n const capped = Math.min(Math.max(elapsed, 0) / duration, passes);\r\n // `passes - 1` holds the final pass at its end instead of rolling over to a\r\n // pass that does not exist. `Infinity - 1` is still `Infinity`, so an\r\n // unlimited loop is never capped.\r\n const index = Math.min(Math.floor(capped), passes - 1);\r\n const t = clamp01(capped - index);\r\n switch (loop.direction ?? \"normal\") {\r\n case \"reverse\": return 1 - t;\r\n case \"alternate\": return index % 2 === 0 ? t : 1 - t;\r\n default: return t;\r\n }\r\n}\r\n"]}
@@ -24,18 +24,18 @@ export interface Reference<T> {
24
24
  * This is the type a node's `ref` prop takes, and the widening is deliberate:
25
25
  * the framework only ever writes into a ref (`props.ref(this)` in the `Node2D`
26
26
  * constructor) and the author only ever reads, so handing a `Rect` to a
27
- * `Reference<ShapeNode>` is sound in both directions — the write stores a
27
+ * `Reference<Node2D>` is sound in both directions — the write stores a
28
28
  * subtype, the read yields the supertype the author asked for. That is what
29
29
  * lets one ref hold whichever shape a factory happened to build:
30
30
  *
31
- * ```tsx
32
- * const ref = createRef<ShapeNode>();
33
- * <Rect ref={ref} /> // ✔ Rect is a ShapeNode
34
- * <Ellipse ref={ref} /> // ✔ so is Ellipse
31
+ * ```ts
32
+ * const ref = createRef<Node2D>();
33
+ * Rect({ ref }); // ✔ Rect is a Node2D
34
+ * Ellipse({ ref }); // ✔ so is Ellipse
35
35
  * ```
36
36
  *
37
37
  * The opposite direction stays an error, because it is the unsound one: a
38
- * `Reference<Rect>` on a `<Text>` would be handed a `Text` at runtime while
38
+ * `Reference<Rect>` on a `Text` would be handed a `Text` at runtime while
39
39
  * still typing every read as a `Rect`.
40
40
  *
41
41
  * A plain setter function is accepted too, which makes React-style callback
@@ -1 +1 @@
1
- {"version":3,"file":"reference.js","sourceRoot":"","sources":["../../src/util/reference.ts"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,MAAM,UAAU,SAAS;IACrB,IAAI,OAAO,GAAa,IAAI,CAAC;IAI7B,SAAS,GAAG,CAAC,IAAe;QACxB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;aAAM,CAAC;YACJ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAClD,CAAC;YACD,OAAO,OAAO,CAAC;QACnB,CAAC;IACL,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["/**\r\n * A callable reference that acts as both getter and setter.\r\n * - `ref()` → returns the current value (throws if not yet assigned)\r\n * - `ref(value)` → sets the current value\r\n */\r\nexport interface Reference<T> {\r\n (): T;\r\n (node: T | null): void;\r\n /**\r\n * Phantom — never assigned at runtime, and never called. It exists so that\r\n * `T` appears in a *contravariant* position, which is what makes\r\n * {@link RefTarget} safe. The call signatures alone can't decide it: the\r\n * zero-arg getter `(): T` is assignable to any `(x) => void`, so a slot\r\n * typed as just the setter would silently accept a `Reference` of an\r\n * unrelated node type.\r\n * @internal\r\n */\r\n readonly __accepts?: (node: T) => void;\r\n}\r\n\r\n/**\r\n * A slot that can *receive* a `T` — a `Reference<T>`, or one declared as any\r\n * **supertype** of `T`.\r\n *\r\n * This is the type a node's `ref` prop takes, and the widening is deliberate:\r\n * the framework only ever writes into a ref (`props.ref(this)` in the `Node2D`\r\n * constructor) and the author only ever reads, so handing a `Rect` to a\r\n * `Reference<ShapeNode>` is sound in both directions — the write stores a\r\n * subtype, the read yields the supertype the author asked for. That is what\r\n * lets one ref hold whichever shape a factory happened to build:\r\n *\r\n * ```tsx\r\n * const ref = createRef<ShapeNode>();\r\n * <Rect ref={ref} /> // ✔ Rect is a ShapeNode\r\n * <Ellipse ref={ref} /> // ✔ so is Ellipse\r\n * ```\r\n *\r\n * The opposite direction stays an error, because it is the unsound one: a\r\n * `Reference<Rect>` on a `<Text>` would be handed a `Text` at runtime while\r\n * still typing every read as a `Rect`.\r\n *\r\n * A plain setter function is accepted too, which makes React-style callback\r\n * refs (`ref={n => …}`) work without a separate type.\r\n */\r\nexport type RefTarget<T> = {\r\n (node: T | null): void;\r\n readonly __accepts?: (node: T) => void;\r\n};\r\n\r\n/**\r\n * Creates a typed reference holder — analogous to React's `createRef`,\r\n * but expressed as a single overloaded function rather than a `{ current }` object.\r\n */\r\nexport function createRef<T>(): Reference<T> {\r\n let current: T | null = null;\r\n\r\n function ref(): T;\r\n function ref(node: T | null): void;\r\n function ref(node?: T | null): T | void {\r\n if (node !== undefined) {\r\n current = node;\r\n } else {\r\n if (current === null) {\r\n throw new Error(\"Reference not assigned yet\");\r\n }\r\n return current;\r\n }\r\n }\r\n\r\n return ref;\r\n}\r\n"]}
1
+ {"version":3,"file":"reference.js","sourceRoot":"","sources":["../../src/util/reference.ts"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,MAAM,UAAU,SAAS;IACrB,IAAI,OAAO,GAAa,IAAI,CAAC;IAI7B,SAAS,GAAG,CAAC,IAAe;QACxB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;aAAM,CAAC;YACJ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAClD,CAAC;YACD,OAAO,OAAO,CAAC;QACnB,CAAC;IACL,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC","sourcesContent":["/**\r\n * A callable reference that acts as both getter and setter.\r\n * - `ref()` → returns the current value (throws if not yet assigned)\r\n * - `ref(value)` → sets the current value\r\n */\r\nexport interface Reference<T> {\r\n (): T;\r\n (node: T | null): void;\r\n /**\r\n * Phantom — never assigned at runtime, and never called. It exists so that\r\n * `T` appears in a *contravariant* position, which is what makes\r\n * {@link RefTarget} safe. The call signatures alone can't decide it: the\r\n * zero-arg getter `(): T` is assignable to any `(x) => void`, so a slot\r\n * typed as just the setter would silently accept a `Reference` of an\r\n * unrelated node type.\r\n * @internal\r\n */\r\n readonly __accepts?: (node: T) => void;\r\n}\r\n\r\n/**\r\n * A slot that can *receive* a `T` — a `Reference<T>`, or one declared as any\r\n * **supertype** of `T`.\r\n *\r\n * This is the type a node's `ref` prop takes, and the widening is deliberate:\r\n * the framework only ever writes into a ref (`props.ref(this)` in the `Node2D`\r\n * constructor) and the author only ever reads, so handing a `Rect` to a\r\n * `Reference<Node2D>` is sound in both directions — the write stores a\r\n * subtype, the read yields the supertype the author asked for. That is what\r\n * lets one ref hold whichever shape a factory happened to build:\r\n *\r\n * ```ts\r\n * const ref = createRef<Node2D>();\r\n * Rect({ ref }); // ✔ Rect is a Node2D\r\n * Ellipse({ ref }); // ✔ so is Ellipse\r\n * ```\r\n *\r\n * The opposite direction stays an error, because it is the unsound one: a\r\n * `Reference<Rect>` on a `Text` would be handed a `Text` at runtime while\r\n * still typing every read as a `Rect`.\r\n *\r\n * A plain setter function is accepted too, which makes React-style callback\r\n * refs (`ref={n => …}`) work without a separate type.\r\n */\r\nexport type RefTarget<T> = {\r\n (node: T | null): void;\r\n readonly __accepts?: (node: T) => void;\r\n};\r\n\r\n/**\r\n * Creates a typed reference holder — analogous to React's `createRef`,\r\n * but expressed as a single overloaded function rather than a `{ current }` object.\r\n */\r\nexport function createRef<T>(): Reference<T> {\r\n let current: T | null = null;\r\n\r\n function ref(): T;\r\n function ref(node: T | null): void;\r\n function ref(node?: T | null): T | void {\r\n if (node !== undefined) {\r\n current = node;\r\n } else {\r\n if (current === null) {\r\n throw new Error(\"Reference not assigned yet\");\r\n }\r\n return current;\r\n }\r\n }\r\n\r\n return ref;\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@motionscript/core",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.8",
4
4
  "type": "module",
5
- "description": "Engine-agnostic animation library for Motion Script: scenes, nodes, props, tweens, layout, and the JSX runtime.",
5
+ "description": "Engine-agnostic animation library for Motion Script: scenes, nodes, props, tweens and layout.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/motionscript-dev/motionscript.git",
@@ -18,6 +18,7 @@
18
18
  "animation"
19
19
  ],
20
20
  "license": "Apache-2.0",
21
+ "author": "Motionscript",
21
22
  "publishConfig": {
22
23
  "access": "public"
23
24
  },
@@ -46,14 +47,6 @@
46
47
  "./sdk": {
47
48
  "types": "./dist/sdk/index.d.ts",
48
49
  "default": "./dist/sdk/index.js"
49
- },
50
- "./jsx/jsx-runtime": {
51
- "types": "./dist/jsx/jsx-runtime.d.ts",
52
- "default": "./dist/jsx/jsx-runtime.js"
53
- },
54
- "./jsx/jsx-dev-runtime": {
55
- "types": "./dist/jsx/jsx-dev-runtime.d.ts",
56
- "default": "./dist/jsx/jsx-dev-runtime.js"
57
50
  }
58
51
  },
59
52
  "devDependencies": {
@@ -72,7 +65,6 @@
72
65
  "dev": "concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc-alias -p tsconfig.build.json -w\"",
73
66
  "clean": "rimraf --glob dist .turbo *.tsbuildinfo",
74
67
  "test": "vitest",
75
- "bench": "vitest bench --run",
76
68
  "lint": "eslint .",
77
69
  "typecheck": "tsc -p tsconfig.json --noEmit"
78
70
  }
@@ -1,3 +0,0 @@
1
- function at(t,n,e){return t+(n-t)*e}function we(t,n,e){let o=t!==0?1/t:0,r=n!==0?1/n:0,c=o+(r-o)*e;return c!==0?1/c:0}function m(t,n,e){return{x:at(t.x,n.x,e),y:at(t.y,n.y,e)}}var Ae={resolve:t=>t,lerp:m};var Rt=new Map([["aliceblue",[.941,.973,1,1]],["antiquewhite",[.98,.922,.843,1]],["aqua",[0,1,1,1]],["aquamarine",[.498,1,.831,1]],["azure",[.941,1,1,1]],["beige",[.961,.961,.863,1]],["bisque",[1,.894,.769,1]],["black",[0,0,0,1]],["blanchedalmond",[1,.922,.804,1]],["blue",[0,0,1,1]],["blueviolet",[.541,.169,.886,1]],["brown",[.647,.165,.165,1]],["burlywood",[.871,.722,.529,1]],["cadetblue",[.373,.62,.627,1]],["chartreuse",[.498,1,0,1]],["chocolate",[.824,.412,.118,1]],["coral",[1,.498,.314,1]],["cornflowerblue",[.392,.584,.929,1]],["cornsilk",[1,.973,.863,1]],["crimson",[.863,.078,.235,1]],["cyan",[0,1,1,1]],["darkblue",[0,0,.545,1]],["darkcyan",[0,.545,.545,1]],["darkgoldenrod",[.722,.525,.043,1]],["darkgray",[.663,.663,.663,1]],["darkgreen",[0,.392,0,1]],["darkgrey",[.663,.663,.663,1]],["darkkhaki",[.741,.718,.42,1]],["darkmagenta",[.545,0,.545,1]],["darkolivegreen",[.333,.42,.184,1]],["darkorange",[1,.549,0,1]],["darkorchid",[.6,.196,.8,1]],["darkred",[.545,0,0,1]],["darksalmon",[.914,.588,.478,1]],["darkseagreen",[.561,.737,.561,1]],["darkslateblue",[.282,.239,.545,1]],["darkslategray",[.184,.31,.31,1]],["darkslategrey",[.184,.31,.31,1]],["darkturquoise",[0,.808,.82,1]],["darkviolet",[.58,0,.827,1]],["deeppink",[1,.078,.576,1]],["deepskyblue",[0,.749,1,1]],["dimgray",[.412,.412,.412,1]],["dimgrey",[.412,.412,.412,1]],["dodgerblue",[.118,.565,1,1]],["firebrick",[.698,.133,.133,1]],["floralwhite",[1,.98,.941,1]],["forestgreen",[.133,.545,.133,1]],["fuchsia",[1,0,1,1]],["gainsboro",[.863,.863,.863,1]],["ghostwhite",[.973,.973,1,1]],["gold",[1,.843,0,1]],["goldenrod",[.855,.647,.125,1]],["gray",[.502,.502,.502,1]],["green",[0,.502,0,1]],["greenyellow",[.678,1,.184,1]],["grey",[.502,.502,.502,1]],["honeydew",[.941,1,.941,1]],["hotpink",[1,.412,.706,1]],["indianred",[.804,.361,.361,1]],["indigo",[.294,0,.51,1]],["ivory",[1,1,.941,1]],["khaki",[.941,.902,.549,1]],["lavender",[.902,.902,.98,1]],["lavenderblush",[1,.941,.961,1]],["lawngreen",[.486,.988,0,1]],["lemonchiffon",[1,.98,.804,1]],["lightblue",[.678,.847,.902,1]],["lightcoral",[.941,.502,.502,1]],["lightcyan",[.878,1,1,1]],["lightgoldenrodyellow",[.98,.98,.824,1]],["lightgray",[.827,.827,.827,1]],["lightgreen",[.565,.933,.565,1]],["lightgrey",[.827,.827,.827,1]],["lightpink",[1,.714,.757,1]],["lightsalmon",[1,.627,.478,1]],["lightseagreen",[.125,.698,.667,1]],["lightskyblue",[.529,.808,.98,1]],["lightslategray",[.467,.533,.6,1]],["lightslategrey",[.467,.533,.6,1]],["lightsteelblue",[.69,.769,.871,1]],["lightyellow",[1,1,.878,1]],["lime",[0,1,0,1]],["limegreen",[.196,.804,.196,1]],["linen",[.98,.941,.902,1]],["magenta",[1,0,1,1]],["maroon",[.502,0,0,1]],["mediumaquamarine",[.4,.804,.667,1]],["mediumblue",[0,0,.804,1]],["mediumorchid",[.729,.333,.827,1]],["mediumpurple",[.576,.439,.859,1]],["mediumseagreen",[.235,.702,.443,1]],["mediumslateblue",[.482,.408,.933,1]],["mediumspringgreen",[0,.98,.604,1]],["mediumturquoise",[.282,.82,.8,1]],["mediumvioletred",[.78,.082,.522,1]],["midnightblue",[.098,.098,.439,1]],["mintcream",[.961,1,.98,1]],["mistyrose",[1,.894,.882,1]],["moccasin",[1,.894,.71,1]],["navajowhite",[1,.871,.678,1]],["navy",[0,0,.502,1]],["oldlace",[.992,.961,.902,1]],["olive",[.502,.502,0,1]],["olivedrab",[.42,.557,.137,1]],["orange",[1,.647,0,1]],["orangered",[1,.271,0,1]],["orchid",[.855,.439,.839,1]],["palegoldenrod",[.933,.91,.667,1]],["palegreen",[.596,.984,.596,1]],["paleturquoise",[.686,.933,.933,1]],["palevioletred",[.859,.439,.576,1]],["papayawhip",[1,.937,.835,1]],["peachpuff",[1,.855,.725,1]],["peru",[.804,.522,.247,1]],["pink",[1,.753,.796,1]],["plum",[.867,.627,.867,1]],["powderblue",[.69,.878,.902,1]],["purple",[.502,0,.502,1]],["rebeccapurple",[.4,.2,.6,1]],["red",[1,0,0,1]],["rosybrown",[.737,.561,.561,1]],["royalblue",[.255,.412,.882,1]],["saddlebrown",[.545,.271,.075,1]],["salmon",[.98,.502,.447,1]],["sandybrown",[.957,.643,.376,1]],["seagreen",[.18,.545,.341,1]],["seashell",[1,.961,.933,1]],["sienna",[.627,.322,.176,1]],["silver",[.753,.753,.753,1]],["skyblue",[.529,.808,.922,1]],["slateblue",[.416,.353,.804,1]],["slategray",[.439,.502,.565,1]],["slategrey",[.439,.502,.565,1]],["snow",[1,.98,.98,1]],["springgreen",[0,1,.498,1]],["steelblue",[.275,.51,.706,1]],["tan",[.824,.706,.549,1]],["teal",[0,.502,.502,1]],["thistle",[.847,.749,.847,1]],["tomato",[1,.388,.278,1]],["transparent",[0,0,0,0]],["turquoise",[.251,.878,.816,1]],["violet",[.933,.51,.933,1]],["wheat",[.961,.871,.702,1]],["white",[1,1,1,1]],["whitesmoke",[.961,.961,.961,1]],["yellow",[1,1,0,1]],["yellowgreen",[.604,.804,.196,1]]]);function lt(t){return t=Math.max(0,Math.min(1,t)),t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function Et(t,n,e,o){return[lt(t),lt(n),lt(e),o]}function Sn(t,n,e){return[3.2404542*t-1.5371385*n-.4985314*e,-.969266*t+1.8760108*n+.041556*e,.0556434*t-.2040259*n+1.0572252*e]}function N(t){let n=t.lastIndexOf("/"),e,o=t;n!==-1&&(e=t.slice(n+1).trim(),o=t.slice(0,n));let r=o.trim().split(/[\s,]+/).filter(Boolean);if(r.length===4&&e===void 0&&(e=r.pop()),r.length!==3)return null;let c=e===void 0?1:In(e);return Number.isFinite(c)?{tokens:r,alpha:c}:null}function In(t){return t.endsWith("%")?Number(t.slice(0,-1))/100:Number(t)}function _(t,n,e=1){return t.endsWith("%")?Number(t.slice(0,-1))/100*n:Number(t)/e}var Ln={deg:1,grad:.9,rad:180/Math.PI,turn:360};function ht(t){let n=t.match(/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(deg|grad|rad|turn)?$/);return n?Number(n[1])*Ln[n[2]??"deg"]:NaN}function v(t){return t.every(Number.isFinite)?t:null}var O=globalThis;O.__msThemeMap||(O.__msThemeMap=new Map);var pt=O.__msThemeMap;O.__msTypographyMap||(O.__msTypographyMap=new Map);var ft=O.__msTypographyMap;function qt(t,n,e){if(t)for(let[o,r]of Object.entries(t)){let c=n?`${n}-${o}`:o;if(r!=null&&!Array.isArray(r)&&typeof r=="object")qt(r,c,e);else{let s=r;e.set(c.toLowerCase(),Array.isArray(s)?s:xt(s))}}}function _e(t={}){let n=t??{};if(pt.clear(),ft.clear(),qt(n.colors,"",pt),n.typography)for(let[e,o]of Object.entries(n.typography))ft.set(e.toLowerCase(),o)}function Oe(t){return ft.get(t.toLowerCase())}function _n(t){return pt.get(t)??Rt.get(t)??null}function On(t){if(!t.startsWith("#"))return null;let n=t.slice(1);if(!/^[0-9a-f]+$/.test(n))return null;(n.length===3||n.length===4)&&(n=n.split("").map(o=>o+o).join(""));let e=parseInt(n,16);return n.length===6?[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255,1]:n.length===8?[(e>>>24)/255,(e>>16&255)/255,(e>>8&255)/255,(e&255)/255]:null}function Nn(t){let n=t.match(/^rgba?\s*\((.+)\)/);if(!n)return null;let e=N(n[1]);if(!e)return null;let[o,r,c]=e.tokens.map(s=>_(s,1,255));return v([o,r,c,e.alpha])}function vn(t){let n=t.match(/^hsla?\s*\((.+)\)/);if(!n)return null;let e=N(n[1]);if(!e)return null;let o=ht(e.tokens[0]),r=parseFloat(e.tokens[1])/100,c=parseFloat(e.tokens[2])/100,s=a=>((a+o/30)%12+12)%12,u=r*Math.min(c,1-c),i=a=>c-u*Math.max(-1,Math.min(s(a)-3,Math.min(9-s(a),1)));return v([i(0),i(8),i(4),e.alpha])}function Rn(t){let n=t.match(/^lab\s*\((.+)\)/);if(!n)return null;let e=N(n[1]);if(!e)return null;let o=parseFloat(e.tokens[0]),r=parseFloat(e.tokens[1]),c=parseFloat(e.tokens[2]);return v($t(o,r,c,e.alpha))}function En(t){let n=t.match(/^lch\s*\((.+)\)/);if(!n)return null;let e=N(n[1]);if(!e)return null;let o=parseFloat(e.tokens[0]),r=parseFloat(e.tokens[1]),c=ht(e.tokens[2])*(Math.PI/180);return v($t(o,r*Math.cos(c),r*Math.sin(c),e.alpha))}function qn(t){let n=t.match(/^oklab\s*\((.+)\)/);if(!n)return null;let e=N(n[1]);if(!e)return null;let[o,r,c]=[_(e.tokens[0],1),_(e.tokens[1],.4),_(e.tokens[2],.4)];return v(Yt(o,r,c,e.alpha))}function $n(t){let n=t.match(/^oklch\s*\((.+)\)/);if(!n)return null;let e=N(n[1]);if(!e)return null;let o=_(e.tokens[0],1),r=_(e.tokens[1],.4),c=ht(e.tokens[2])*(Math.PI/180);return v(Yt(o,r*Math.cos(c),r*Math.sin(c),e.alpha))}function $t(t,n,e,o){let s=(t+16)/116,u=n/500+s,i=s-e/200,a=(u**3>.008856?u**3:(116*u-16)/903.3)*.95047,p=t>903.3*.008856?((t+16)/116)**3:t/903.3,f=(i**3>.008856?i**3:(116*i-16)/903.3)*1.08883,[h,y,l]=Sn(a,p,f);return Et(h,y,l,o)}function Yt(t,n,e,o){let r=t+.3963377774*n+.2158037573*e,c=t-.1055613458*n-.0638541728*e,s=t-.0894841775*n-1.291485548*e,u=r**3,i=c**3,a=s**3;return Et(4.0767416621*u-3.3077115913*i+.2309699292*a,-1.2684380046*u+2.6097574011*i-.3413193965*a,-.0041960863*u-.7034186147*i+1.6956065236*a,o)}function Yn(t){if(t.includes("("))return{color:t,opacity:1};let n=t.match(/^(.*[^/])\/\s*([\d.]+)%?$/);if(!n)return{color:t,opacity:1};let e=parseFloat(n[2]);return Number.isFinite(e)?{color:n[1].trim(),opacity:Math.max(0,Math.min(1,e/100))}:{color:t,opacity:1}}function xt(t){let{color:n,opacity:e}=Yn(t.trim().toLowerCase()),o=_n(n)??On(n)??Nn(n)??vn(n)??Rn(n)??En(n)??qn(n)??$n(n)??(console.warn(`[Motion Engine] Unsupported color format: "${t}". Defaulting to black.`),[0,0,0,1]);return e!==1?[o[0],o[1],o[2],o[3]*e]:o}function T(t,n){let e=n.x-t.x,o=n.y-t.y;return Math.sqrt(e*e+o*o)}function L(t,n,e,o,r){let c=1-t;return c*c*c*n+3*c*c*t*e+3*c*t*t*o+t*t*t*r}function Xt(t,n,e,o){let r=1-t;return r*r*n+2*r*t*e+t*t*o}function j(t,n,e,o,r){return{x:L(r,t.x,n.x,e.x,o.x),y:L(r,t.y,n.y,e.y,o.y)}}function dt(t,n,e,o){return{x:Xt(o,t.x,n.x,e.x),y:Xt(o,t.y,n.y,e.y)}}function mt(t,n){return{p0:t,c1:m(t,n,1/3),c2:m(t,n,2/3),p1:n}}function K(t,n,e){return{p0:t,c1:{x:t.x+2/3*(n.x-t.x),y:t.y+2/3*(n.y-t.y)},c2:{x:e.x+2/3*(n.x-e.x),y:e.y+2/3*(n.y-e.y)},p1:e}}function z(t,n,e,o,r){let c=m(t,n,r),s=m(n,e,r),u=m(e,o,r),i=m(c,s,r),a=m(s,u,r),p=m(i,a,r);return{left:{from:t,cp1:c,cp2:i,to:p},right:{from:p,cp1:a,cp2:u,to:o}}}function jt(t,n,e,o,r,c){if(r===0)return z(t,n,e,o,c).left;let{right:s}=z(t,n,e,o,r),u=(c-r)/(1-r);return z(s.from,s.cp1,s.cp2,s.to,u).left}function yt(t,n,e,o){let r=m(t,n,o),c=m(n,e,o),s=m(r,c,o);return{left:{from:t,cp:r,to:s},right:{from:s,cp:c,to:e}}}function Ut(t,n,e,o,r){if(o===0)return yt(t,n,e,r).left;let{right:c}=yt(t,n,e,o),s=(r-o)/(1-o);return yt(c.from,c.cp,c.to,s).left}function E(t,n,e,o){let r=-t+3*n-3*e+o,c=2*(t-2*n+e),s=n-t,u=[],i=f=>{f>0&&f<1&&u.push(f)};if(Math.abs(r)<1e-12)return Math.abs(c)>1e-12&&i(-s/c),u;let a=c*c-4*r*s;if(a<0)return u;let p=Math.sqrt(a);return i((-c+p)/(2*r)),i((-c-p)/(2*r)),u}function gt(t,n,e){let o=t-2*n+e;if(Math.abs(o)<1e-12)return[];let r=(t-n)/o;return r>0&&r<1?[r]:[]}function Ft(t,n,e,o){let r=t*e+n*o,c=Math.sqrt(t*t+n*n)*Math.sqrt(e*e+o*o),s=Math.acos(Math.max(-1,Math.min(1,r/c)));return t*o-n*e<0&&(s=-s),s}function Vt(t,n,e,o,r,c,s){let u=r*Math.PI/180,i=Math.cos(u),a=Math.sin(u),p=(t.x-n.x)/2,f=(t.y-n.y)/2,h=i*p+a*f,y=-a*p+i*f,l=Math.abs(e),x=Math.abs(o),d=h*h/(l*l)+y*y/(x*x);if(d>1){let vt=Math.sqrt(d);l*=vt,x*=vt}let g=l*l,b=x*x,k=h*h,C=y*y,H=Math.max(0,(g*b-g*C-b*k)/(g*C+b*k)),X=c===s?-1:1,w=X*Math.sqrt(H)*(l*y/x),I=X*Math.sqrt(H)*-(x*h/l),ut=i*w-a*I+(t.x+n.x)/2,G=a*w+i*I+(t.y+n.y)/2,W=Ft(1,0,(h-w)/l,(y-I)/x),F=Ft((h-w)/l,(y-I)/x,(-h-w)/l,(-y-I)/x);return s===0&&F>0&&(F-=2*Math.PI),s===1&&F<0&&(F+=2*Math.PI),{cx:ut,cy:G,rx:l,ry:x,phi:u,theta1:W,dtheta:F}}function R(t,n){let e=Math.cos(t.phi),o=Math.sin(t.phi),r=Math.cos(n),c=Math.sin(n);return{x:e*t.rx*r-o*t.ry*c+t.cx,y:o*t.rx*r+e*t.ry*c+t.cy}}function zt(t,n){let e=Math.cos(t.phi),o=Math.sin(t.phi),r=Math.cos(n),c=Math.sin(n);return{x:-t.rx*e*c-t.ry*o*r,y:-t.rx*o*c+t.ry*e*r}}function J(t,n,e){let o=e-n;if(Math.abs(o)<1e-12)return[];let r=Math.max(1,Math.ceil(Math.abs(o)/(Math.PI/2))),c=o/r,s=4/3*Math.tan(c/4),u=[];for(let i=0;i<r;i++){let a=n+c*i,p=a+c,f=R(t,a),h=R(t,p),y=zt(t,a),l=zt(t,p);u.push({p0:f,c1:{x:f.x+s*y.x,y:f.y+s*y.y},c2:{x:h.x-s*l.x,y:h.y-s*l.y},p1:h})}return u}function Bt(t){let n=Math.cos(t.phi),e=Math.sin(t.phi),o=Math.atan2(-t.ry*e,t.rx*n),r=Math.atan2(t.ry*n,t.rx*e);return{x:[o,o+Math.PI],y:[r,r+Math.PI]}}function Qt(t,n){let e=Math.PI*2;return((t.dtheta>=0?n-t.theta1:t.theta1-n)%e+e)%e<=Math.abs(t.dtheta)+1e-9}var Xn="MmLlHhVvCcSsQqTtAaZz";function Fn(t){return t===" "||t===","||t===" "||t===`
2
- `||t==="\r"}function U(t){return t>="0"&&t<="9"}function zn(t){let n=0,e=()=>{for(;n<t.length&&Fn(t[n]);)n++};return{atEnd:()=>(e(),n>=t.length),takeLetter:()=>(e(),n<t.length&&Xn.includes(t[n])?t[n++]:null),hasNumber:()=>{if(e(),n>=t.length)return!1;let r=t[n];return U(r)||r==="."||r==="+"||r==="-"},takeNumber:()=>{e();let r=n;for((t[n]==="+"||t[n]==="-")&&n++;n<t.length&&U(t[n]);)n++;if(t[n]===".")for(n++;n<t.length&&U(t[n]);)n++;if(t[n]==="e"||t[n]==="E"){let s=n;if(n++,(t[n]==="+"||t[n]==="-")&&n++,n<t.length&&U(t[n]))for(;n<t.length&&U(t[n]);)n++;else n=s}if(n===r)return null;let c=Number(t.slice(r,n));return Number.isFinite(c)?c:(n=r,null)},takeFlag:()=>(e(),t[n]==="0"?(n++,0):t[n]==="1"?(n++,1):null)}}function B(t,n){return{kind:"line",from:t,to:n}}function Dt(t,n,e){return{kind:"quad",from:t,c:n,to:e}}function Zt(t,n,e,o){return{kind:"cubic",from:t,c1:n,c2:e,to:o}}function jn(t,n,e,o,r,c,s){return e===0||o===0||t.x===n.x&&t.y===n.y?B(t,n):{kind:"arc",from:t,to:n,rx:e,ry:o,rotation:r,largeArc:c,sweep:s}}function q(t){return Vt(t.from,t.to,t.rx,t.ry,t.rotation,t.largeArc,t.sweep)}function bt(t,n){switch(t.kind){case"line":return m(t.from,t.to,n);case"quad":return dt(t.from,t.c,t.to,n);case"cubic":return j(t.from,t.c1,t.c2,t.to,n);case"arc":{let e=q(t);return R(e,e.theta1+n*e.dtheta)}}}function tt(t){let n=1/0,e=1/0,o=-1/0,r=-1/0;for(let c of t)c.x<n&&(n=c.x),c.x>o&&(o=c.x),c.y<e&&(e=c.y),c.y>r&&(r=c.y);return{minX:n,minY:e,maxX:o,maxY:r}}function Un(t){switch(t.kind){case"line":return tt([t.from,t.to]);case"quad":{let n=e=>dt(t.from,t.c,t.to,e);return tt([t.from,t.to,...gt(t.from.x,t.c.x,t.to.x).map(n),...gt(t.from.y,t.c.y,t.to.y).map(n)])}case"cubic":{let n=e=>j(t.from,t.c1,t.c2,t.to,e);return tt([t.from,t.to,...E(t.from.x,t.c1.x,t.c2.x,t.to.x).map(n),...E(t.from.y,t.c1.y,t.c2.y,t.to.y).map(n)])}case"arc":{let n=q(t),e=[t.from,t.to],o=Bt(n);for(let r of[...o.x,...o.y])Qt(n,r)&&e.push(R(n,r));return tt(e)}}}function Gt(t){switch(t.kind){case"line":return[mt(t.from,t.to)];case"quad":return[K(t.from,t.c,t.to)];case"cubic":return[{p0:t.from,c1:t.c1,c2:t.c2,p1:t.to}];case"arc":{let n=q(t),e=J(n,n.theta1,n.theta1+n.dtheta);return e.length>0?e:[mt(t.from,t.to)]}}}function Wt(t,n,e){switch(t.kind){case"line":{let o=m(t.from,t.to,e);return[{type:"L",x:o.x,y:o.y}]}case"quad":{let o=Ut(t.from,t.c,t.to,n,e);return[{type:"Q",x1:o.cp.x,y1:o.cp.y,x:o.to.x,y:o.to.y}]}case"cubic":{let o=jt(t.from,t.c1,t.c2,t.to,n,e);return[{type:"C",x1:o.cp1.x,y1:o.cp1.y,x2:o.cp2.x,y2:o.cp2.y,x:o.to.x,y:o.to.y}]}case"arc":{let o=q(t),r=o.theta1+n*o.dtheta,c=o.theta1+e*o.dtheta,s=R(o,c);return[{type:"A",rx:o.rx,ry:o.ry,rotation:t.rotation,largeArc:Math.abs(c-r)>Math.PI?1:0,sweep:t.sweep,x:s.x,y:s.y}]}}}function Vn(t){if(!t.closed||t.segments.length===0)return null;let n=t.segments[t.segments.length-1].to;return Math.abs(n.x-t.start.x)<1e-9&&Math.abs(n.y-t.start.y)<1e-9?null:B(n,t.start)}function nt(t){let n=Vn(t);return n?[...t.segments,n]:t.segments}function Bn(t){let n=1/0,e=1/0,o=-1/0,r=-1/0,c=!1,s=u=>{c=!0,u.minX<n&&(n=u.minX),u.minY<e&&(e=u.minY),u.maxX>o&&(o=u.maxX),u.maxY>r&&(r=u.maxY)};for(let u of t){if(u.segments.length===0){s({minX:u.start.x,minY:u.start.y,maxX:u.start.x,maxY:u.start.y});continue}for(let i of u.segments)s(Un(i))}return c?{minX:n,minY:e,maxX:o,maxY:r}:null}function Qn(t){let n=zn(t),e=[],o=null;for(;!n.atEnd();){let r=n.takeLetter();if(r!==null)o=r;else{if(o===null)return e;if(o==="M")o="L";else if(o==="m")o="l";else if(o==="Z"||o==="z")return e}let c=o.toUpperCase(),s=o!==c;if(c==="Z"){e.push({type:"Z"});continue}let u=i=>{let a=[];for(let p=0;p<i;p++){let f=n.takeNumber();if(f===null)return null;a.push(f)}return a};switch(c){case"M":case"L":case"T":{let i=u(2);if(!i)return e;let a=c==="M"?"M":c==="L"?"L":"T";e.push({type:s?a.toLowerCase():a,x:i[0],y:i[1]});break}case"H":{let i=u(1);if(!i)return e;e.push({type:s?"h":"H",x:i[0]});break}case"V":{let i=u(1);if(!i)return e;e.push({type:s?"v":"V",y:i[0]});break}case"C":{let i=u(6);if(!i)return e;e.push({type:s?"c":"C",x1:i[0],y1:i[1],x2:i[2],y2:i[3],x:i[4],y:i[5]});break}case"S":case"Q":{let i=u(4);if(!i)return e;e.push(c==="S"?{type:s?"s":"S",x2:i[0],y2:i[1],x:i[2],y:i[3]}:{type:s?"q":"Q",x1:i[0],y1:i[1],x:i[2],y:i[3]});break}case"A":{let i=u(3);if(!i)return e;let a=n.takeFlag(),p=n.takeFlag();if(a===null||p===null)return e;let f=u(2);if(!f)return e;e.push({type:s?"a":"A",rx:i[0],ry:i[1],rotation:i[2],largeArc:a,sweep:p,x:f[0],y:f[1]});break}default:return e}if(!n.hasNumber()&&n.atEnd())break}return e}function $(t){return t==null?[]:typeof t=="string"?Qn(t):t}var V=new Map,Dn=32;function P(t){if(t==null)return[];let n=V.get(t);if(n)return n;let e=Zn($(t));return V.size>=Dn&&V.delete(V.keys().next().value),V.set(t,e),e}function Zn(t){let n=[],e=null,o={x:0,y:0},r={x:0,y:0},c=null,s=null,u=a=>{let p={start:a,segments:[],closed:!1};return n.push(p),r=a,p},i=a=>{e||(e=u(o)),e.segments.push(a)};for(let a of t){let p=a.type!==a.type.toUpperCase(),f=(l,x)=>p?{x:o.x+l,y:o.y+x}:{x:l,y:x},h=null,y=null;switch(a.type){case"M":case"m":{let l=f(a.x,a.y);e=u(l),o=l;break}case"L":case"l":{let l=f(a.x,a.y);i(B(o,l)),o=l;break}case"H":case"h":{let l={x:p?o.x+a.x:a.x,y:o.y};i(B(o,l)),o=l;break}case"V":case"v":{let l={x:o.x,y:p?o.y+a.y:a.y};i(B(o,l)),o=l;break}case"C":case"c":{let l=f(a.x1,a.y1),x=f(a.x2,a.y2),d=f(a.x,a.y);i(Zt(o,l,x,d)),o=d,h=x;break}case"S":case"s":{let l=c?{x:2*o.x-c.x,y:2*o.y-c.y}:o,x=f(a.x2,a.y2),d=f(a.x,a.y);i(Zt(o,l,x,d)),o=d,h=x;break}case"Q":case"q":{let l=f(a.x1,a.y1),x=f(a.x,a.y);i(Dt(o,l,x)),o=x,y=l;break}case"T":case"t":{let l=s?{x:2*o.x-s.x,y:2*o.y-s.y}:o,x=f(a.x,a.y);i(Dt(o,l,x)),o=x,y=l;break}case"A":case"a":{let l=f(a.x,a.y);i(jn(o,l,a.rx,a.ry,a.rotation,a.largeArc,a.sweep)),o=l;break}case"Z":case"z":{e&&(e.closed=!0,e=null),o=r;break}}c=h,s=y}return n}function Mt(t){return Bn(P(t))}function Kt(t){let n=Mt(t);return n?{width:n.maxX-n.minX,height:n.maxY-n.minY}:{width:0,height:0}}var Xe="";function Gn(t,n){return Math.abs(t.x-n.x)<1e-6&&Math.abs(t.y-n.y)<1e-6}function Wn(t){t.closed=!0;let{anchors:n}=t;if(n.length<2)return;let e=n[0],o=n[n.length-1];Gn(e.point,o.point)&&(e.inHandle=o.inHandle,n.pop())}var Q=t=>({x:t.x,y:t.y});function Kn(t){let n=[{point:Q(t.start),inHandle:null,outHandle:null}],e=r=>{n[n.length-1].outHandle=Q(r.c1),n.push({point:Q(r.p1),inHandle:Q(r.c2),outHandle:null})};for(let r of t.segments)switch(r.kind){case"line":n.push({point:Q(r.to),inHandle:null,outHandle:null});break;case"cubic":e({p0:r.from,c1:r.c1,c2:r.c2,p1:r.to});break;case"quad":e(K(r.from,r.c,r.to));break;case"arc":{let c=q(r);for(let s of J(c,c.theta1,c.theta1+c.dtheta))e(s);break}}let o={anchors:n,closed:!1};return t.closed&&Wn(o),o}function Jt(t){return P(t).map(Kn).filter(n=>n.anchors.length>0)}var Jn=5;function M(t){if(!Number.isFinite(t))return"0";let n=Number(t.toFixed(Jn));return String(n===0?0:n)}function kt(t,n){return t.outHandle===null&&n.inHandle===null?{line:!0,to:n.point}:{line:!1,c1:t.outHandle??t.point,c2:n.inHandle??n.point,to:n.point}}function tn(t){let n=[];for(let{anchors:e,closed:o}of t)if(e.length!==0){n.push(`M ${M(e[0].point.x)} ${M(e[0].point.y)}`);for(let r=1;r<e.length;r++){let c=kt(e[r-1],e[r]);n.push(c.line?`L ${M(c.to.x)} ${M(c.to.y)}`:`C ${M(c.c1.x)} ${M(c.c1.y)} ${M(c.c2.x)} ${M(c.c2.y)} ${M(c.to.x)} ${M(c.to.y)}`)}if(o){if(e.length>1){let r=kt(e[e.length-1],e[0]);r.line||n.push(`C ${M(r.c1.x)} ${M(r.c1.y)} ${M(r.c2.x)} ${M(r.c2.y)} ${M(r.to.x)} ${M(r.to.y)}`)}n.push("Z")}}return n.join(" ")}var te=t=>t;function nn(t,n=te){let e=[],o=(r,c)=>{let s=kt(r,c),u=n(s.to);if(s.line){e.push({type:"L",x:u.x,y:u.y});return}let i=n(s.c1),a=n(s.c2);e.push({type:"C",x1:i.x,y1:i.y,x2:a.x,y2:a.y,x:u.x,y:u.y})};for(let{anchors:r,closed:c}of t){if(r.length===0)continue;let s=n(r[0].point);e.push({type:"M",x:s.x,y:s.y});for(let u=1;u<r.length;u++)o(r[u-1],r[u]);if(c){if(r.length>1){let u=r[r.length-1],i=r[0];(u.outHandle!==null||i.inHandle!==null)&&o(u,i)}e.push({type:"Z"})}}return e}function Pt(t){let n=1/0,e=1/0,o=-1/0,r=-1/0,c=!1,s=i=>{c=!0,i<n&&(n=i),i>o&&(o=i)},u=i=>{c=!0,i<e&&(e=i),i>r&&(r=i)};for(let{anchors:i,closed:a}of t){for(let f of i)s(f.point.x),u(f.point.y);let p=a&&i.length>1?i.length:i.length-1;for(let f=0;f<p;f++){let h=i[f],y=i[(f+1)%i.length];if(h.outHandle===null&&y.inHandle===null)continue;let l=h.outHandle??h.point,x=y.inHandle??y.point;for(let d of E(h.point.x,l.x,x.x,y.point.x))s(L(d,h.point.x,l.x,x.x,y.point.x));for(let d of E(h.point.y,l.y,x.y,y.point.y))u(L(d,h.point.y,l.y,x.y,y.point.y))}}return c?{minX:n,minY:e,maxX:o,maxY:r}:null}function ot(t,n){return t.map(e=>({closed:e.closed,anchors:e.anchors.map(o=>({point:n(o.point),inHandle:o.inHandle?n(o.inHandle):null,outHandle:o.outHandle?n(o.outHandle):null}))}))}function en(t,n,e){let o=n.x-t.x,r=n.y-t.y,c=o*o+r*r;if(c<1e-12){let p=e.x-n.x,f=e.y-n.y;return h=>({x:h.x+p,y:h.y+f})}let s=e.x-t.x,u=e.y-t.y,i=(s*o+u*r)/c,a=(u*o-s*r)/c;return p=>{let f=p.x-t.x,h=p.y-t.y;return{x:t.x+i*f-a*h,y:t.y+a*f+i*h}}}function on(t){return t.every(n=>n.anchors.length<2)}var Ct=1,et=Ct/2,Fe={minX:-et,minY:-et,maxX:et,maxY:et};function rn(t){let n=Pt(t);return n?wt(t,n):{path:t,scaleX:1,scaleY:1,centerX:0,centerY:0}}function wt(t,n){let e=n.maxX-n.minX,o=n.maxY-n.minY,r=(n.minX+n.maxX)/2,c=(n.minY+n.maxY)/2,s=e>1e-9?e/Ct:1,u=o>1e-9?o/Ct:1;return{path:ot(t,i=>({x:(i.x-r)/s,y:(i.y-c)/u})),scaleX:s,scaleY:u,centerX:r,centerY:c}}function cn(t,n){return ot(t,e=>({x:e.x+n.x,y:e.y+n.y}))}function Tt(t,n,e){if(t.outHandle===null&&n.inHandle===null)return{x:t.point.x+(n.point.x-t.point.x)*e,y:t.point.y+(n.point.y-t.point.y)*e};let o=t.outHandle??t.point,r=n.inHandle??n.point;return{x:L(e,t.point.x,o.x,r.x,n.point.x),y:L(e,t.point.y,o.y,r.y,n.point.y)}}function sn(t,n,e){if(t.outHandle===null&&n.inHandle===null)return{from:t,middle:{point:Tt(t,n,e),inHandle:null,outHandle:null},to:n};let{left:o,right:r}=z(t.point,t.outHandle??t.point,n.inHandle??n.point,n.point,e);return{from:{...t,outHandle:o.cp1},middle:{point:o.to,inHandle:o.cp2,outHandle:r.cp1},to:{...n,inHandle:r.cp2}}}var un=50;function ne(t){if(t.kind==="line")return[t.from,t.to];let n=[t.from];for(let e=1;e<un;e++)n.push(bt(t,e/un));return n.push(t.to),n}function ee(t){let n=ne(t),e=[0],o=0;for(let r=1;r<n.length;r++)o+=T(n[r-1],n[r]),e.push(o);return{segment:t,points:n,cumulative:e,length:o}}function rt(t){let n=0;return{contours:t.map(o=>{let r=nt(o).map(ee),c=r.reduce((s,u)=>s+u.length,0);return n+=c,{contour:o,metrics:r,length:c}}),length:n}}function an(t,n){let{cumulative:e,length:o}=t;if(o<=0||n<=0)return 0;if(n>=o)return 1;let r=0,c=e.length-1;for(;r<c-1;){let a=r+c>>1;e[a]<=n?r=a:c=a}let s=e[c]-e[r],u=s>0?(n-e[r])/s:0,i=e.length-1;return(r+u)/i}function ln(t){return rt(P(t)).length}function pn(t){let n=rt(P(t)),e=[],o=[],r=0;for(let u of n.contours){let i=u.metrics[0]?.segment.from??u.contour.start;e.push(i),o.push(r);for(let a of u.metrics)for(let p=1;p<a.points.length;p++)r+=T(a.points[p-1],a.points[p]),e.push(a.points[p]),o.push(r)}let c=0;return{length:r,frameAt:u=>{if(r<=0||e.length<2)return null;let i=Math.max(0,Math.min(r,u));for(o[c]>i&&(c=0);c<e.length-2&&(o[c+1]<i||o[c+1]===o[c]);)c++;let a=e[c],p=e[c+1],f=o[c],h=o[c+1]-f,y=h>0?(i-f)/h:0,l=p.x-a.x,x=p.y-a.y,d=Math.hypot(l,x),g=d>0?l/d:1,b=d>0?x/d:0;return{x:a.x+l*y,y:a.y+x*y,tx:g,ty:b}}}}function oe(t){let e=[t.metrics[0]?.segment.from??t.contour.start];for(let o of t.metrics)for(let r=1;r<o.points.length;r++)e.push(o.points[r]);return e}function re(t,n,e,o){if(t.length<2)return"";let r=n.reduce((x,d)=>x+d,0),c=r*1e-4,s=r*1e-9,u=(e%r+r)%r,i=0,a=0;for(;a+n[i]<=u&&!(n[i]===0&&u-a<=s||(a+=n[i],i=(i+1)%n.length,i===0)););let p=[],f=n[i]-(u-a),h=i%2===0,y=!0,l=null;for(let x=1;x<t.length;x++){let d=t[x-1],g=t[x],b=g.x-d.x,k=g.y-d.y,C=T(d,g);if(C===0)continue;l={point:g,x:b/C,y:k/C};let H=0;for(;H<C;){let X=C-H;if(f>=X){if(h){if(y){let w=H/C;p.push(`M ${d.x+w*b} ${d.y+w*k}`),y=!1}p.push(`L ${g.x} ${g.y}`)}f-=X,H=C,f<=s&&(i=(i+1)%n.length,h=!h,f=n[i],h&&(y=!0))}else{let w=(H+f)/C,I=d.x+w*b,ut=d.y+w*k;if(h){if(y){let W=H/C;p.push(`M ${d.x+W*b} ${d.y+W*k}`),y=!1}let G=f>0?0:c/C;p.push(`L ${I+G*b} ${ut+G*k}`)}H+=f,i=(i+1)%n.length,h=!h,f=n[i],h&&(y=!0)}}}if(!o&&h&&f<=s&&l){let{point:x,x:d,y:g}=l;p.push(`M ${x.x} ${x.y} L ${x.x-d*c} ${x.y-g*c}`)}return p.join(" ")}function Ht(t,n,e){let o=t.reduce((r,c)=>r+c,0);if(o<=0||e<=0)return null;if(!n.closed&&n.length>0&&t.length%2===0){let r=t[t.length-1],c=Math.max(1,Math.round((n.length+r)/o))*o-r;if(c>0)return n.length/c}return e/(Math.max(1,Math.round(e/o))*o)}function fn(t,n,e=0){if(!n||n.length===0)return"";let o=rt(P(t)),r=[];for(let c of o.contours){let s=Ht(n,{length:c.length,closed:c.contour.closed},o.length);if(s===null)return"";let u=re(oe(c),n.map(i=>i*s),e*s,c.contour.closed);u&&r.push(u)}return r.join(" ")}function hn(t,n,e){if(n===0&&e===1)return t;let o=Math.max(0,Math.min(1,n)),r=Math.max(o,Math.min(1,e));if(o===0&&r===1)return t;if(o>=r)return[];let c=rt(P(t));if(c.length===0)return t;let s=o*c.length,u=r*c.length,i=[],a=0;for(let p of c.contours){let f=!0;for(let h of p.metrics){let{segment:y,length:l}=h,x=a+l;if(l===0||x<=s||a>=u){a=x;continue}let d=a<s?an(h,s-a):0,g=x>u?an(h,u-a):1;if(f){let b=bt(y,d);i.push({type:"M",x:b.x,y:b.y}),f=!1}i.push(...Wt(y,d,g)),a=x}}return i}function ct(t){let n=[];for(let e of P(t)){let o=nt(e).flatMap(Gt);o.length!==0&&n.push({cubics:o.map(r=>({p0:{...r.p0},c1:{...r.c1},c2:{...r.c2},p1:{...r.p1}})),closed:e.closed})}return n}function xn(t){return t[0].p0}function ce(t,n=8){let e=0,o=t.p0;for(let r=1;r<=n;r++){let c=j(t.p0,t.c1,t.c2,t.p1,r/n);e+=T(o,c),o=c}return e}function At(t){let n=0,e=0;for(let o of t)n+=o.p0.x,e+=o.p0.y;return{x:n/t.length,y:e/t.length}}function se(t,n){let e=m(t.p0,t.c1,n),o=m(t.c1,t.c2,n),r=m(t.c2,t.p1,n),c=m(e,o,n),s=m(o,r,n),u=m(c,s,n);return[{p0:t.p0,c1:e,c2:c,p1:u},{p0:u,c1:s,c2:r,p1:t.p1}]}function yn(t,n){let e=t.slice();for(;e.length<n;){let o=0,r=-1;for(let u=0;u<e.length;u++){let i=ce(e[u]);i>r&&(r=i,o=u)}let[c,s]=se(e[o],.5);e.splice(o,1,c,s)}return e}function mn(t){let n=[];for(let e=t.length-1;e>=0;e--){let o=t[e];n.push({p0:o.p1,c1:o.c2,c2:o.c1,p1:o.p0})}return n}function ie(t,n){return n===0?t.slice():t.slice(n).concat(t.slice(0,n))}function St(t,n){let e=0;for(let o=0;o<t.length;o++){let r=t[o].p0.x-n[o].p0.x,c=t[o].p0.y-n[o].p0.y;e+=r*r+c*c}return e}function ue(t,n){let e=t.length,o=n,r=1/0;for(let c of[n,mn(n)])for(let s=0;s<e;s++){let u=ie(c,s),i=St(t,u);i<r&&(r=i,o=u)}return o}function ae(t,n){let e=mn(n);return St(t,n)<=St(t,e)?n:e}function st(t,n){let e=[];for(let o=0;o<n;o++)e.push({p0:{...t},c1:{...t},c2:{...t},p1:{...t}});return e}function le(t,n){let e=[],o=new Array(n.length).fill(!1);for(let r of t){let c=At(r.cubics),s=-1,u=1/0;for(let i=0;i<n.length;i++){if(o[i])continue;let a=T(c,At(n[i].cubics));a<u&&(u=a,s=i)}s>=0?(o[s]=!0,e.push({from:r,to:n[s]})):e.push({from:r,to:{cubics:st(c,r.cubics.length),closed:r.closed}})}for(let r=0;r<n.length;r++){if(o[r])continue;let c=n[r],s=At(c.cubics);e.push({from:{cubics:st(s,c.cubics.length),closed:c.closed},to:c})}return e}function It(t,n){let e=ct(t),o=ct(n);if(e.length===0&&o.length===0)return{pairs:[]};if(e.length===0){let s=xn(o[0].cubics);e.push({cubics:st(s,1),closed:o[0].closed})}if(o.length===0){let s=xn(e[0].cubics);o.push({cubics:st(s,1),closed:e[0].closed})}return{pairs:le(e,o).map(({from:s,to:u})=>{let i=Math.max(s.cubics.length,u.cubics.length),a=yn(s.cubics,i),p=yn(u.cubics,i),f=s.closed&&u.closed;return p=f?ue(a,p):ae(a,p),{from:a,to:p,closed:f}})}}function dn(t,n,e){return{p0:m(t.p0,n.p0,e),c1:m(t.c1,n.c1,e),c2:m(t.c2,n.c2,e),p1:m(t.p1,n.p1,e)}}function Lt(t,n){let e=[];for(let o of t.pairs){let r=o.from.length;if(r===0)continue;let c=dn(o.from[0],o.to[0],n);e.push({type:"M",x:c.p0.x,y:c.p0.y}),e.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});for(let s=1;s<r;s++){let u=dn(o.from[s],o.to[s],n);e.push({type:"C",x1:u.c1.x,y1:u.c1.y,x2:u.c2.x,y2:u.c2.y,x:u.p1.x,y:u.p1.y})}o.closed&&e.push({type:"Z"})}return e}var D=null;function pe(t,n){if(D&&D.from===t&&D.to===n)return D.plan;let e=It($(t),$(n));return D={from:t,to:n,plan:e},e}function gn(t,n,e){return e<=0?t:e>=1?n:Lt(pe(t,n),e)}var bn={resolve:t=>t,lerp:gn,commands:$,contours:P,cubics:ct,anchors:Jt,bounds:Mt,size:Kt,length:ln,sampler:pn,trim:hn,dash:fn,dashScale:Ht,plan:It,sample:Lt,fromAnchors:tn,anchorCommands:nn,anchorBounds:Pt,map:ot,translate:cn,endFit:en,isEmpty:on,normalize:rn,fitToBox:wt,pointOn:Tt,split:sn};var fe=(t,n,e)=>Math.max(n,Math.min(t,e));function S(t){return fe(t,0,1)}function it(t){return t.count===null?1/0:Math.max(0,Math.floor(t.count))+1}function oo(t){return t!==void 0&&(t.count===null||t.count>=1)}function Mn(t,n,e=n){return n<=0?n:t.count===null?Math.max(n,e):n*it(t)}function kn(t,n,e){if(e<=0)return 1;let o=it(t),r=Math.min(Math.max(n,0)/e,o),c=Math.min(Math.floor(r),o-1),s=S(r-c);switch(t.direction??"normal"){case"reverse":return 1-s;case"alternate":return c%2===0?s:1-s;default:return s}}var Cn=Symbol("settles");function io(t){return t[Cn]=!0,t}function uo(t){return t[Cn]===!0}function ao(t){return typeof t?.at=="function"&&typeof t?.duration=="number"}function he(t,n,e,o){return _t(t,e,c=>n(o?o(S(c)):S(c)))}function lo(t,n,e){return he({set:()=>{}},r=>(n(r),{}),t,e)}function po(t,n,e){let o=t.duration;if(o<=0||it(n)<=1)return t;let r=Mn(n,o,e),c=s=>t.at(kn(n,S(s)*r,o));return{duration:r,at:c,_stepper(){let s=0;return{seek:u=>{s=u,c(u/r)},advance:u=>{s+=u;let i=s>=r;return c(i?1:s/r),i}}}}}function fo(t,...n){let e=n.reduce((o,r)=>o+r.duration,0);return _t(t,e,o=>{let r=o*e,c={},s=0;for(let u of n){if(r<s)break;let i=u.duration>0?(r-s)/u.duration:1;Object.assign(c,u.at(S(i))),s+=u.duration}return c})}function ho(t,...n){let e=n.reduce((o,r)=>Math.max(o,r.duration),0);return _t(t,e,o=>{let r=o*e,c={};for(let s of n){let u=s.duration>0?r/s.duration:1;Object.assign(c,s.at(S(u)))}return c})}function _t(t,n,e){let o=r=>n>0?r/n:1;return{duration:n,at(r){let c=e(r);return t.set(c),c},_stepper(){let r=0;return{seek:c=>{r=c,t.set(e(o(c)))},advance:c=>{r+=c;let s=r>=n;return t.set(e(s?1:o(r))),s}}}}}var xe={pentagon:{sides:5,turn:0},hexagon:{sides:6,turn:0},octagon:{sides:8,turn:Math.PI/8}},ye=.382,de=5;function me(t,n){let{width:e,height:o}=n;if(!(e>0)||!(o>0))return[];switch(t){case"rect":return[Me(e,o,n)];case"ellipse":return Ce(e,o,n);case"triangle":return[Y([{x:0,y:-o/2},{x:e/2,y:o/2},{x:-e/2,y:o/2}],n)];case"rightTriangle":return[Y([{x:-e/2,y:-o/2},{x:e/2,y:o/2},{x:-e/2,y:o/2}],n)];case"polygon":return[Y(Pn(Ot(n,5),0,e/2,o/2),n)];case"polygram":return[Y(wn(Ot(n,5),Nt(n.ratio??.5),e/2,o/2),n)];case"star":return[Y(Tn(wn(Ot(n,de),Nt(n.ratio??ye),1,1),e,o),n)];default:{let r=xe[t];return r?[Y(Tn(Pn(r.sides,r.turn,1,1),e,o),n)]:[]}}}function go(t,n){let{width:e,height:o}=n,r=me(t,n);return!(e>0)||!(o>0)?r:bn.map(r,c=>({x:c.x/e,y:c.y/o}))}function bo(t){return ge.has(t)}var ge=new Set(["rect","ellipse","polygon","polygram","triangle","rightTriangle","pentagon","hexagon","octagon","star"]);function A(t){return{point:t,inHandle:null,outHandle:null}}function Ot(t,n){return Math.max(3,Math.round(t.sides??n))}function Nt(t){return Math.max(0,Math.min(1,t))}function Pn(t,n,e,o){let r=2*Math.PI/t,c=[];for(let s=0;s<t;s++){let u=-Math.PI/2+n+s*r;c.push({x:e*Math.cos(u),y:o*Math.sin(u)})}return c}function wn(t,n,e,o){let r=Math.PI/t,c=[];for(let s=0;s<t*2;s++){let u=-Math.PI/2+s*r,i=s%2===0?1:n;c.push({x:e*i*Math.cos(u),y:o*i*Math.sin(u)})}return c}function Tn(t,n,e){if(t.length===0)return t;let o=1/0,r=1/0,c=-1/0,s=-1/0;for(let y of t)y.x<o&&(o=y.x),y.x>c&&(c=y.x),y.y<r&&(r=y.y),y.y>s&&(s=y.y);let u=c-o,i=s-r,a=u>1e-9?n/u:1,p=i>1e-9?e/i:1,f=(o+c)/2,h=(r+s)/2;return t.map(y=>({x:(y.x-f)*a,y:(y.y-h)*p}))}function An(t){let n=t/2;return Math.abs(n)<1e-6?0:4/3*Math.tan(t/4)/Math.tan(n)}function Y(t,n){let e=be(n.cornerRadius);if(t.length<3||e<=0)return{anchors:t.map(A),closed:!0};let o=n.cornerStyle??"rounded",r=[];for(let c=0;c<t.length;c++){let s=t[c],u=t[(c-1+t.length)%t.length],i=t[(c+1)%t.length],a=Hn(s,u),p=Hn(s,i);if(!a||!p){r.push(A(s));continue}let f=Math.max(-1,Math.min(1,a.x*p.x+a.y*p.y)),h=Math.acos(f);if(h<1e-6||Math.PI-h<1e-6){r.push(A(s));continue}let y=Math.min(e/Math.tan(h/2),T(s,u)/2,T(s,i)/2),l={x:s.x+a.x*y,y:s.y+a.y*y},x={x:s.x+p.x*y,y:s.y+p.y*y};if(o==="angled"){r.push(A(l),A(x));continue}let d=An(Math.PI-h);r.push({point:l,inHandle:null,outHandle:{x:l.x+(s.x-l.x)*d,y:l.y+(s.y-l.y)*d}},{point:x,inHandle:{x:x.x+(s.x-x.x)*d,y:x.y+(s.y-x.y)*d},outHandle:null})}return{anchors:r,closed:!0}}function Hn(t,n){let e=n.x-t.x,o=n.y-t.y,r=Math.hypot(e,o);return r<1e-9?null:{x:e/r,y:o/r}}function be(t){return t===void 0?0:typeof t=="number"?Math.max(0,t):Math.max(0,Math.min(t.topLeft,t.topRight,t.bottomLeft,t.bottomRight))}function Me(t,n,e){let o=ke(e.cornerRadius,t,n),r=e.cornerStyle??"rounded",c=t/2,s=n/2,u=An(Math.PI/2),i=[],a=(l,x,d,g)=>{if(g<=0){i.push(A(l));return}let b={x:l.x-x.x*g,y:l.y-x.y*g},k={x:l.x+d.x*g,y:l.y+d.y*g};if(r==="angled"){i.push(A(b),A(k));return}i.push({point:b,inHandle:null,outHandle:{x:b.x+(l.x-b.x)*u,y:b.y+(l.y-b.y)*u}},{point:k,inHandle:{x:k.x+(l.x-k.x)*u,y:k.y+(l.y-k.y)*u},outHandle:null})},p={x:1,y:0},f={x:0,y:1},h={x:-1,y:0},y={x:0,y:-1};return a({x:-c,y:-s},y,p,o.topLeft),a({x:c,y:-s},p,f,o.topRight),a({x:c,y:s},f,h,o.bottomRight),a({x:-c,y:s},h,y,o.bottomLeft),{anchors:i,closed:!0}}function ke(t,n,e){let o=t===void 0?{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0}:typeof t=="number"?{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t}:t,r=Math.min(n,e)/2;return{topLeft:Math.max(0,Math.min(o.topLeft,r)),topRight:Math.max(0,Math.min(o.topRight,r)),bottomLeft:Math.max(0,Math.min(o.bottomLeft,r)),bottomRight:Math.max(0,Math.min(o.bottomRight,r))}}function Ce(t,n,e){let o=t/2,r=n/2,c=Nt(e.ratio??0),s=Math.max(0,Math.min(360,e.sweep??360));if(s<=0)return[];let u=s>=360,i=((e.startAngle??0)-90)*(Math.PI/180),a=i+s*(Math.PI/180);if(u&&c<=0)return[{anchors:Z(o,r,i,a,!0),closed:!0}];if(u)return[{anchors:Z(o,r,i,a,!0),closed:!0},{anchors:Z(o*c,r*c,a,i,!0),closed:!0}];let p=Z(o,r,i,a,!1),f=c>0?Z(o*c,r*c,a,i,!1):[A({x:0,y:0})];return[{anchors:[...p,...f],closed:!0}]}function Z(t,n,e,o,r){let c=o-e,s=Math.max(1,Math.ceil(Math.abs(c)/(Math.PI/2))),u=c/s,i=4/3*Math.tan(u/4),a=[];for(let p=0;p<=s;p++){let f=e+u*p,h={x:t*Math.cos(f),y:n*Math.sin(f)},y={x:-t*Math.sin(f),y:n*Math.cos(f)},l={x:y.x*i,y:y.y*i};a.push({point:h,inHandle:p===0?null:{x:h.x-l.x,y:h.y-l.y},outHandle:p===s?null:{x:h.x+l.x,y:h.y+l.y}})}if(r&&a.length>1){let p=a.pop();a[0].inHandle=p.inHandle}return a}function Co(t){return typeof t=="string"?xt(t):t}function Po(t,n,e){return[t[0]+(n[0]-t[0])*e,t[1]+(n[1]-t[1])*e,t[2]+(n[2]-t[2])*e,t[3]+(n[3]-t[3])*e]}function wo(t,n,e){return!Number.isFinite(t)||!Number.isFinite(n)?e<1?t:n:t+(n-t)*e}function To(t,n,e){return Math.round(t+(n-t)*e)}function Pe(t,n,e){return e<1?t:n}var Ho=Pe;function Ao(t){return 90-t}function So({orbit:t,elevation:n,distance:e}){let o=t*(Math.PI/180),r=n*(Math.PI/180),c=Math.cos(r)*e;return{x:Math.cos(o)*c,y:Math.sin(r)*e,z:Math.sin(o)*c}}function Io(t){let n={};return t.orbit!==void 0&&(n.orbit=t.orbit),t.elevation!==void 0&&(n.elevation=t.elevation),t.zoom!==void 0&&(n.zoom=t.zoom),n}export{at as a,we as b,m as c,Ae as d,_e as e,Oe as f,xt as g,Xe as h,Ct as i,et as j,Fe as k,bn as l,fe as m,S as n,it as o,oo as p,Mn as q,kn as r,io as s,uo as t,ao as u,he as v,lo as w,po as x,fo as y,ho as z,ye as A,de as B,me as C,go as D,bo as E,Co as F,Po as G,wo as H,To as I,Pe as J,Ho as K,Ao as L,So as M,Io as N};
3
- //# sourceMappingURL=chunk-2RIYH36X.js.map