@motionscript/core 0.1.0 → 0.1.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1062) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/assets/asset-index.d.ts +1 -8
  3. package/dist/assets/asset-index.d.ts.map +1 -1
  4. package/dist/assets/asset-index.js +1 -8
  5. package/dist/assets/asset-index.js.map +1 -1
  6. package/dist/assets/catalog.d.ts +10 -72
  7. package/dist/assets/catalog.d.ts.map +1 -1
  8. package/dist/assets/catalog.js +3 -29
  9. package/dist/assets/catalog.js.map +1 -1
  10. package/dist/assets/errors.d.ts +8 -20
  11. package/dist/assets/errors.d.ts.map +1 -1
  12. package/dist/assets/errors.js +8 -20
  13. package/dist/assets/errors.js.map +1 -1
  14. package/dist/assets/index.d.ts.map +1 -1
  15. package/dist/assets/index.js.map +1 -1
  16. package/dist/assets/manager.d.ts +9 -51
  17. package/dist/assets/manager.d.ts.map +1 -1
  18. package/dist/assets/manager.js +13 -78
  19. package/dist/assets/manager.js.map +1 -1
  20. package/dist/assets/record.d.ts +2 -18
  21. package/dist/assets/record.d.ts.map +1 -1
  22. package/dist/assets/record.js.map +1 -1
  23. package/dist/assets/scope.d.ts +3 -18
  24. package/dist/assets/scope.d.ts.map +1 -1
  25. package/dist/assets/scope.js +2 -11
  26. package/dist/assets/scope.js.map +1 -1
  27. package/dist/attributes/audio/effects/chain.d.ts +2 -12
  28. package/dist/attributes/audio/effects/chain.d.ts.map +1 -1
  29. package/dist/attributes/audio/effects/chain.js +1 -7
  30. package/dist/attributes/audio/effects/chain.js.map +1 -1
  31. package/dist/attributes/audio/effects/registry.d.ts +3 -18
  32. package/dist/attributes/audio/effects/registry.d.ts.map +1 -1
  33. package/dist/attributes/audio/effects/registry.js +4 -23
  34. package/dist/attributes/audio/effects/registry.js.map +1 -1
  35. package/dist/attributes/audio/ramp.d.ts +5 -38
  36. package/dist/attributes/audio/ramp.d.ts.map +1 -1
  37. package/dist/attributes/audio/ramp.js +3 -28
  38. package/dist/attributes/audio/ramp.js.map +1 -1
  39. package/dist/attributes/audio/request.d.ts +10 -80
  40. package/dist/attributes/audio/request.d.ts.map +1 -1
  41. package/dist/attributes/audio/request.js +1 -4
  42. package/dist/attributes/audio/request.js.map +1 -1
  43. package/dist/attributes/audio/schedule.d.ts +2 -12
  44. package/dist/attributes/audio/schedule.d.ts.map +1 -1
  45. package/dist/attributes/audio/schedule.js +2 -11
  46. package/dist/attributes/audio/schedule.js.map +1 -1
  47. package/dist/attributes/audio/sound.d.ts +2 -26
  48. package/dist/attributes/audio/sound.d.ts.map +1 -1
  49. package/dist/attributes/audio/sound.js +1 -9
  50. package/dist/attributes/audio/sound.js.map +1 -1
  51. package/dist/attributes/audio/transition.d.ts +1 -8
  52. package/dist/attributes/audio/transition.d.ts.map +1 -1
  53. package/dist/attributes/audio/transition.js.map +1 -1
  54. package/dist/attributes/layout/alignment.d.ts +6 -38
  55. package/dist/attributes/layout/alignment.d.ts.map +1 -1
  56. package/dist/attributes/layout/alignment.js.map +1 -1
  57. package/dist/attributes/layout/insets.d.ts +2 -27
  58. package/dist/attributes/layout/insets.d.ts.map +1 -1
  59. package/dist/attributes/layout/insets.js.map +1 -1
  60. package/dist/attributes/layout/matrix2d.d.ts +29 -114
  61. package/dist/attributes/layout/matrix2d.d.ts.map +1 -1
  62. package/dist/attributes/layout/matrix2d.js +26 -110
  63. package/dist/attributes/layout/matrix2d.js.map +1 -1
  64. package/dist/attributes/layout/size.d.ts +3 -25
  65. package/dist/attributes/layout/size.d.ts.map +1 -1
  66. package/dist/attributes/layout/size.js +2 -18
  67. package/dist/attributes/layout/size.js.map +1 -1
  68. package/dist/attributes/layout/space3d.d.ts +16 -79
  69. package/dist/attributes/layout/space3d.d.ts.map +1 -1
  70. package/dist/attributes/layout/space3d.js +17 -81
  71. package/dist/attributes/layout/space3d.js.map +1 -1
  72. package/dist/attributes/layout/transform3d.d.ts +2 -23
  73. package/dist/attributes/layout/transform3d.d.ts.map +1 -1
  74. package/dist/attributes/layout/transform3d.js +1 -7
  75. package/dist/attributes/layout/transform3d.js.map +1 -1
  76. package/dist/attributes/layout/world-transform.d.ts +2 -16
  77. package/dist/attributes/layout/world-transform.d.ts.map +1 -1
  78. package/dist/attributes/layout/world-transform.js.map +1 -1
  79. package/dist/attributes/properties/decorator.d.ts +13 -73
  80. package/dist/attributes/properties/decorator.d.ts.map +1 -1
  81. package/dist/attributes/properties/decorator.js +9 -40
  82. package/dist/attributes/properties/decorator.js.map +1 -1
  83. package/dist/attributes/properties/typed.d.ts +6 -45
  84. package/dist/attributes/properties/typed.d.ts.map +1 -1
  85. package/dist/attributes/properties/typed.js +6 -37
  86. package/dist/attributes/properties/typed.js.map +1 -1
  87. package/dist/attributes/render3d/orbit.d.ts +11 -83
  88. package/dist/attributes/render3d/orbit.d.ts.map +1 -1
  89. package/dist/attributes/render3d/orbit.js +10 -73
  90. package/dist/attributes/render3d/orbit.js.map +1 -1
  91. package/dist/attributes/shape/corners/corner-radius.d.ts +1 -6
  92. package/dist/attributes/shape/corners/corner-radius.d.ts.map +1 -1
  93. package/dist/attributes/shape/corners/corner-radius.js.map +1 -1
  94. package/dist/attributes/shape/corners/corner-style.d.ts +4 -25
  95. package/dist/attributes/shape/corners/corner-style.d.ts.map +1 -1
  96. package/dist/attributes/shape/corners/corner-style.js +2 -12
  97. package/dist/attributes/shape/corners/corner-style.js.map +1 -1
  98. package/dist/attributes/shape/corners/corners.d.ts +2 -21
  99. package/dist/attributes/shape/corners/corners.d.ts.map +1 -1
  100. package/dist/attributes/shape/corners/corners.js +2 -12
  101. package/dist/attributes/shape/corners/corners.js.map +1 -1
  102. package/dist/attributes/shape/effects/backdrop.d.ts +2 -18
  103. package/dist/attributes/shape/effects/backdrop.d.ts.map +1 -1
  104. package/dist/attributes/shape/effects/backdrop.js +3 -26
  105. package/dist/attributes/shape/effects/backdrop.js.map +1 -1
  106. package/dist/attributes/shape/effects/chain.d.ts +36 -328
  107. package/dist/attributes/shape/effects/chain.d.ts.map +1 -1
  108. package/dist/attributes/shape/effects/chain.js +24 -242
  109. package/dist/attributes/shape/effects/chain.js.map +1 -1
  110. package/dist/attributes/shape/effects/effect-data.d.ts +19 -127
  111. package/dist/attributes/shape/effects/effect-data.d.ts.map +1 -1
  112. package/dist/attributes/shape/effects/effect-data.js +6 -33
  113. package/dist/attributes/shape/effects/effect-data.js.map +1 -1
  114. package/dist/attributes/shape/effects/implementations/ascii.d.ts +6 -26
  115. package/dist/attributes/shape/effects/implementations/ascii.d.ts.map +1 -1
  116. package/dist/attributes/shape/effects/implementations/ascii.js +0 -3
  117. package/dist/attributes/shape/effects/implementations/ascii.js.map +1 -1
  118. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts +2 -21
  119. package/dist/attributes/shape/effects/implementations/bit-crush.d.ts.map +1 -1
  120. package/dist/attributes/shape/effects/implementations/bit-crush.js +0 -1
  121. package/dist/attributes/shape/effects/implementations/bit-crush.js.map +1 -1
  122. package/dist/attributes/shape/effects/implementations/block-displace.d.ts +1 -14
  123. package/dist/attributes/shape/effects/implementations/block-displace.d.ts.map +1 -1
  124. package/dist/attributes/shape/effects/implementations/block-displace.js +0 -1
  125. package/dist/attributes/shape/effects/implementations/block-displace.js.map +1 -1
  126. package/dist/attributes/shape/effects/implementations/bloom.d.ts +0 -1
  127. package/dist/attributes/shape/effects/implementations/bloom.d.ts.map +1 -1
  128. package/dist/attributes/shape/effects/implementations/bloom.js +0 -1
  129. package/dist/attributes/shape/effects/implementations/bloom.js.map +1 -1
  130. package/dist/attributes/shape/effects/implementations/blur.d.ts +0 -1
  131. package/dist/attributes/shape/effects/implementations/blur.d.ts.map +1 -1
  132. package/dist/attributes/shape/effects/implementations/blur.js +0 -1
  133. package/dist/attributes/shape/effects/implementations/blur.js.map +1 -1
  134. package/dist/attributes/shape/effects/implementations/bulge.d.ts +0 -1
  135. package/dist/attributes/shape/effects/implementations/bulge.d.ts.map +1 -1
  136. package/dist/attributes/shape/effects/implementations/bulge.js +0 -1
  137. package/dist/attributes/shape/effects/implementations/bulge.js.map +1 -1
  138. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts +0 -1
  139. package/dist/attributes/shape/effects/implementations/chromatic-aberration.d.ts.map +1 -1
  140. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js +0 -1
  141. package/dist/attributes/shape/effects/implementations/chromatic-aberration.js.map +1 -1
  142. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts +1 -12
  143. package/dist/attributes/shape/effects/implementations/color-adjustment.d.ts.map +1 -1
  144. package/dist/attributes/shape/effects/implementations/color-adjustment.js +0 -1
  145. package/dist/attributes/shape/effects/implementations/color-adjustment.js.map +1 -1
  146. package/dist/attributes/shape/effects/implementations/curves.d.ts +1 -11
  147. package/dist/attributes/shape/effects/implementations/curves.d.ts.map +1 -1
  148. package/dist/attributes/shape/effects/implementations/curves.js +1 -6
  149. package/dist/attributes/shape/effects/implementations/curves.js.map +1 -1
  150. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts +0 -1
  151. package/dist/attributes/shape/effects/implementations/directional-blur.d.ts.map +1 -1
  152. package/dist/attributes/shape/effects/implementations/directional-blur.js +0 -1
  153. package/dist/attributes/shape/effects/implementations/directional-blur.js.map +1 -1
  154. package/dist/attributes/shape/effects/implementations/dither.d.ts +4 -35
  155. package/dist/attributes/shape/effects/implementations/dither.d.ts.map +1 -1
  156. package/dist/attributes/shape/effects/implementations/dither.js +1 -7
  157. package/dist/attributes/shape/effects/implementations/dither.js.map +1 -1
  158. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts +1 -22
  159. package/dist/attributes/shape/effects/implementations/drop-shadow.d.ts.map +1 -1
  160. package/dist/attributes/shape/effects/implementations/drop-shadow.js +0 -1
  161. package/dist/attributes/shape/effects/implementations/drop-shadow.js.map +1 -1
  162. package/dist/attributes/shape/effects/implementations/duotone.d.ts +1 -9
  163. package/dist/attributes/shape/effects/implementations/duotone.d.ts.map +1 -1
  164. package/dist/attributes/shape/effects/implementations/duotone.js +0 -1
  165. package/dist/attributes/shape/effects/implementations/duotone.js.map +1 -1
  166. package/dist/attributes/shape/effects/implementations/edges.d.ts +2 -15
  167. package/dist/attributes/shape/effects/implementations/edges.d.ts.map +1 -1
  168. package/dist/attributes/shape/effects/implementations/edges.js +0 -1
  169. package/dist/attributes/shape/effects/implementations/edges.js.map +1 -1
  170. package/dist/attributes/shape/effects/implementations/glass.d.ts +1 -14
  171. package/dist/attributes/shape/effects/implementations/glass.d.ts.map +1 -1
  172. package/dist/attributes/shape/effects/implementations/glass.js +0 -1
  173. package/dist/attributes/shape/effects/implementations/glass.js.map +1 -1
  174. package/dist/attributes/shape/effects/implementations/glow.d.ts +7 -47
  175. package/dist/attributes/shape/effects/implementations/glow.d.ts.map +1 -1
  176. package/dist/attributes/shape/effects/implementations/glow.js +1 -9
  177. package/dist/attributes/shape/effects/implementations/glow.js.map +1 -1
  178. package/dist/attributes/shape/effects/implementations/grain.d.ts +1 -14
  179. package/dist/attributes/shape/effects/implementations/grain.d.ts.map +1 -1
  180. package/dist/attributes/shape/effects/implementations/grain.js +0 -1
  181. package/dist/attributes/shape/effects/implementations/grain.js.map +1 -1
  182. package/dist/attributes/shape/effects/implementations/grayscale.d.ts +0 -1
  183. package/dist/attributes/shape/effects/implementations/grayscale.d.ts.map +1 -1
  184. package/dist/attributes/shape/effects/implementations/grayscale.js +0 -1
  185. package/dist/attributes/shape/effects/implementations/grayscale.js.map +1 -1
  186. package/dist/attributes/shape/effects/implementations/halftone.d.ts +5 -29
  187. package/dist/attributes/shape/effects/implementations/halftone.d.ts.map +1 -1
  188. package/dist/attributes/shape/effects/implementations/halftone.js +0 -1
  189. package/dist/attributes/shape/effects/implementations/halftone.js.map +1 -1
  190. package/dist/attributes/shape/effects/implementations/invert.d.ts +3 -12
  191. package/dist/attributes/shape/effects/implementations/invert.d.ts.map +1 -1
  192. package/dist/attributes/shape/effects/implementations/invert.js +0 -1
  193. package/dist/attributes/shape/effects/implementations/invert.js.map +1 -1
  194. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts +2 -19
  195. package/dist/attributes/shape/effects/implementations/kaleidoscope.d.ts.map +1 -1
  196. package/dist/attributes/shape/effects/implementations/kaleidoscope.js +1 -5
  197. package/dist/attributes/shape/effects/implementations/kaleidoscope.js.map +1 -1
  198. package/dist/attributes/shape/effects/implementations/lut.d.ts +11 -36
  199. package/dist/attributes/shape/effects/implementations/lut.d.ts.map +1 -1
  200. package/dist/attributes/shape/effects/implementations/lut.js +2 -8
  201. package/dist/attributes/shape/effects/implementations/lut.js.map +1 -1
  202. package/dist/attributes/shape/effects/implementations/magnify.d.ts +0 -1
  203. package/dist/attributes/shape/effects/implementations/magnify.d.ts.map +1 -1
  204. package/dist/attributes/shape/effects/implementations/magnify.js +0 -1
  205. package/dist/attributes/shape/effects/implementations/magnify.js.map +1 -1
  206. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts +3 -17
  207. package/dist/attributes/shape/effects/implementations/motion-blur.d.ts.map +1 -1
  208. package/dist/attributes/shape/effects/implementations/motion-blur.js +2 -11
  209. package/dist/attributes/shape/effects/implementations/motion-blur.js.map +1 -1
  210. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts +1 -12
  211. package/dist/attributes/shape/effects/implementations/oil-paint.d.ts.map +1 -1
  212. package/dist/attributes/shape/effects/implementations/oil-paint.js +0 -1
  213. package/dist/attributes/shape/effects/implementations/oil-paint.js.map +1 -1
  214. package/dist/attributes/shape/effects/implementations/outline.d.ts +2 -14
  215. package/dist/attributes/shape/effects/implementations/outline.d.ts.map +1 -1
  216. package/dist/attributes/shape/effects/implementations/outline.js +0 -1
  217. package/dist/attributes/shape/effects/implementations/outline.js.map +1 -1
  218. package/dist/attributes/shape/effects/implementations/pixelate.d.ts +1 -15
  219. package/dist/attributes/shape/effects/implementations/pixelate.d.ts.map +1 -1
  220. package/dist/attributes/shape/effects/implementations/pixelate.js +0 -1
  221. package/dist/attributes/shape/effects/implementations/pixelate.js.map +1 -1
  222. package/dist/attributes/shape/effects/implementations/posterize.d.ts +1 -10
  223. package/dist/attributes/shape/effects/implementations/posterize.d.ts.map +1 -1
  224. package/dist/attributes/shape/effects/implementations/posterize.js +0 -1
  225. package/dist/attributes/shape/effects/implementations/posterize.js.map +1 -1
  226. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts +3 -26
  227. package/dist/attributes/shape/effects/implementations/progressive-blur.d.ts.map +1 -1
  228. package/dist/attributes/shape/effects/implementations/progressive-blur.js +1 -2
  229. package/dist/attributes/shape/effects/implementations/progressive-blur.js.map +1 -1
  230. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts +2 -16
  231. package/dist/attributes/shape/effects/implementations/radial-blur.d.ts.map +1 -1
  232. package/dist/attributes/shape/effects/implementations/radial-blur.js +0 -1
  233. package/dist/attributes/shape/effects/implementations/radial-blur.js.map +1 -1
  234. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts +1 -13
  235. package/dist/attributes/shape/effects/implementations/rgb-shift.d.ts.map +1 -1
  236. package/dist/attributes/shape/effects/implementations/rgb-shift.js +0 -1
  237. package/dist/attributes/shape/effects/implementations/rgb-shift.js.map +1 -1
  238. package/dist/attributes/shape/effects/implementations/scanlines.d.ts +1 -8
  239. package/dist/attributes/shape/effects/implementations/scanlines.d.ts.map +1 -1
  240. package/dist/attributes/shape/effects/implementations/scanlines.js +0 -1
  241. package/dist/attributes/shape/effects/implementations/scanlines.js.map +1 -1
  242. package/dist/attributes/shape/effects/implementations/scatter.d.ts +0 -1
  243. package/dist/attributes/shape/effects/implementations/scatter.d.ts.map +1 -1
  244. package/dist/attributes/shape/effects/implementations/scatter.js +0 -1
  245. package/dist/attributes/shape/effects/implementations/scatter.js.map +1 -1
  246. package/dist/attributes/shape/effects/implementations/shader.d.ts +10 -53
  247. package/dist/attributes/shape/effects/implementations/shader.d.ts.map +1 -1
  248. package/dist/attributes/shape/effects/implementations/shader.js +2 -9
  249. package/dist/attributes/shape/effects/implementations/shader.js.map +1 -1
  250. package/dist/attributes/shape/effects/implementations/sharpen.d.ts +1 -12
  251. package/dist/attributes/shape/effects/implementations/sharpen.d.ts.map +1 -1
  252. package/dist/attributes/shape/effects/implementations/sharpen.js +0 -1
  253. package/dist/attributes/shape/effects/implementations/sharpen.js.map +1 -1
  254. package/dist/attributes/shape/effects/implementations/streak.d.ts +1 -8
  255. package/dist/attributes/shape/effects/implementations/streak.d.ts.map +1 -1
  256. package/dist/attributes/shape/effects/implementations/streak.js +0 -1
  257. package/dist/attributes/shape/effects/implementations/streak.js.map +1 -1
  258. package/dist/attributes/shape/effects/implementations/threshold.d.ts +1 -9
  259. package/dist/attributes/shape/effects/implementations/threshold.d.ts.map +1 -1
  260. package/dist/attributes/shape/effects/implementations/threshold.js +0 -1
  261. package/dist/attributes/shape/effects/implementations/threshold.js.map +1 -1
  262. package/dist/attributes/shape/effects/implementations/twirl.d.ts +1 -13
  263. package/dist/attributes/shape/effects/implementations/twirl.d.ts.map +1 -1
  264. package/dist/attributes/shape/effects/implementations/twirl.js +0 -1
  265. package/dist/attributes/shape/effects/implementations/twirl.js.map +1 -1
  266. package/dist/attributes/shape/effects/implementations/vignette.d.ts +1 -9
  267. package/dist/attributes/shape/effects/implementations/vignette.d.ts.map +1 -1
  268. package/dist/attributes/shape/effects/implementations/vignette.js +0 -1
  269. package/dist/attributes/shape/effects/implementations/vignette.js.map +1 -1
  270. package/dist/attributes/shape/effects/implementations/vintage.d.ts +0 -1
  271. package/dist/attributes/shape/effects/implementations/vintage.d.ts.map +1 -1
  272. package/dist/attributes/shape/effects/implementations/vintage.js +0 -1
  273. package/dist/attributes/shape/effects/implementations/vintage.js.map +1 -1
  274. package/dist/attributes/shape/effects/implementations/wave.d.ts +3 -24
  275. package/dist/attributes/shape/effects/implementations/wave.d.ts.map +1 -1
  276. package/dist/attributes/shape/effects/implementations/wave.js +1 -5
  277. package/dist/attributes/shape/effects/implementations/wave.js.map +1 -1
  278. package/dist/attributes/shape/effects/registry.d.ts +6 -41
  279. package/dist/attributes/shape/effects/registry.d.ts.map +1 -1
  280. package/dist/attributes/shape/effects/registry.js +7 -45
  281. package/dist/attributes/shape/effects/registry.js.map +1 -1
  282. package/dist/attributes/shape/effects/spec.d.ts +6 -30
  283. package/dist/attributes/shape/effects/spec.d.ts.map +1 -1
  284. package/dist/attributes/shape/effects/spec.js +3 -9
  285. package/dist/attributes/shape/effects/spec.js.map +1 -1
  286. package/dist/attributes/shape/fill/blend.d.ts +1 -17
  287. package/dist/attributes/shape/fill/blend.d.ts.map +1 -1
  288. package/dist/attributes/shape/fill/blend.js +2 -15
  289. package/dist/attributes/shape/fill/blend.js.map +1 -1
  290. package/dist/attributes/shape/fill/chain.d.ts +17 -125
  291. package/dist/attributes/shape/fill/chain.d.ts.map +1 -1
  292. package/dist/attributes/shape/fill/chain.js +22 -109
  293. package/dist/attributes/shape/fill/chain.js.map +1 -1
  294. package/dist/attributes/shape/fill/coerce.d.ts +10 -35
  295. package/dist/attributes/shape/fill/coerce.d.ts.map +1 -1
  296. package/dist/attributes/shape/fill/coerce.js +12 -47
  297. package/dist/attributes/shape/fill/coerce.js.map +1 -1
  298. package/dist/attributes/shape/fill/color/parser.d.ts +10 -44
  299. package/dist/attributes/shape/fill/color/parser.d.ts.map +1 -1
  300. package/dist/attributes/shape/fill/color/parser.js +15 -91
  301. package/dist/attributes/shape/fill/color/parser.js.map +1 -1
  302. package/dist/attributes/shape/fill/gradient-stops.d.ts +1 -8
  303. package/dist/attributes/shape/fill/gradient-stops.d.ts.map +1 -1
  304. package/dist/attributes/shape/fill/gradient-stops.js +2 -13
  305. package/dist/attributes/shape/fill/gradient-stops.js.map +1 -1
  306. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts +2 -24
  307. package/dist/attributes/shape/fill/implementations/canvas3d.d.ts.map +1 -1
  308. package/dist/attributes/shape/fill/implementations/canvas3d.js +2 -9
  309. package/dist/attributes/shape/fill/implementations/canvas3d.js.map +1 -1
  310. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts +1 -14
  311. package/dist/attributes/shape/fill/implementations/dot-grid.d.ts.map +1 -1
  312. package/dist/attributes/shape/fill/implementations/dot-grid.js.map +1 -1
  313. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts +5 -28
  314. package/dist/attributes/shape/fill/implementations/fractal-noise.d.ts.map +1 -1
  315. package/dist/attributes/shape/fill/implementations/fractal-noise.js +0 -1
  316. package/dist/attributes/shape/fill/implementations/fractal-noise.js.map +1 -1
  317. package/dist/attributes/shape/fill/implementations/grid.d.ts +8 -21
  318. package/dist/attributes/shape/fill/implementations/grid.d.ts.map +1 -1
  319. package/dist/attributes/shape/fill/implementations/grid.js +2 -8
  320. package/dist/attributes/shape/fill/implementations/grid.js.map +1 -1
  321. package/dist/attributes/shape/fill/implementations/image.d.ts +13 -79
  322. package/dist/attributes/shape/fill/implementations/image.d.ts.map +1 -1
  323. package/dist/attributes/shape/fill/implementations/image.js +6 -23
  324. package/dist/attributes/shape/fill/implementations/image.js.map +1 -1
  325. package/dist/attributes/shape/fill/implementations/noise.d.ts +2 -15
  326. package/dist/attributes/shape/fill/implementations/noise.d.ts.map +1 -1
  327. package/dist/attributes/shape/fill/implementations/noise.js.map +1 -1
  328. package/dist/attributes/shape/fill/implementations/shader.d.ts +11 -45
  329. package/dist/attributes/shape/fill/implementations/shader.d.ts.map +1 -1
  330. package/dist/attributes/shape/fill/implementations/shader.js +5 -17
  331. package/dist/attributes/shape/fill/implementations/shader.js.map +1 -1
  332. package/dist/attributes/shape/fill/implementations/video.d.ts +12 -64
  333. package/dist/attributes/shape/fill/implementations/video.d.ts.map +1 -1
  334. package/dist/attributes/shape/fill/implementations/video.js +12 -50
  335. package/dist/attributes/shape/fill/implementations/video.js.map +1 -1
  336. package/dist/attributes/shape/fill/lerp.d.ts +2 -13
  337. package/dist/attributes/shape/fill/lerp.d.ts.map +1 -1
  338. package/dist/attributes/shape/fill/lerp.js +2 -9
  339. package/dist/attributes/shape/fill/lerp.js.map +1 -1
  340. package/dist/attributes/shape/fill/media-preset.d.ts +8 -49
  341. package/dist/attributes/shape/fill/media-preset.d.ts.map +1 -1
  342. package/dist/attributes/shape/fill/media-preset.js +8 -35
  343. package/dist/attributes/shape/fill/media-preset.js.map +1 -1
  344. package/dist/attributes/shape/fill/registry.d.ts +2 -26
  345. package/dist/attributes/shape/fill/registry.d.ts.map +1 -1
  346. package/dist/attributes/shape/fill/registry.js +5 -40
  347. package/dist/attributes/shape/fill/registry.js.map +1 -1
  348. package/dist/attributes/shape/fill/union.d.ts +6 -30
  349. package/dist/attributes/shape/fill/union.d.ts.map +1 -1
  350. package/dist/attributes/shape/fill/union.js +1 -9
  351. package/dist/attributes/shape/fill/union.js.map +1 -1
  352. package/dist/attributes/shape/filters/chain.d.ts +15 -168
  353. package/dist/attributes/shape/filters/chain.d.ts.map +1 -1
  354. package/dist/attributes/shape/filters/chain.js +8 -132
  355. package/dist/attributes/shape/filters/chain.js.map +1 -1
  356. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts +1 -7
  357. package/dist/attributes/shape/filters/implementations/color-matrix.d.ts.map +1 -1
  358. package/dist/attributes/shape/filters/implementations/color-matrix.js.map +1 -1
  359. package/dist/attributes/shape/filters/implementations/curves.d.ts +1 -7
  360. package/dist/attributes/shape/filters/implementations/curves.d.ts.map +1 -1
  361. package/dist/attributes/shape/filters/implementations/curves.js.map +1 -1
  362. package/dist/attributes/shape/filters/implementations/echo.d.ts +1 -11
  363. package/dist/attributes/shape/filters/implementations/echo.d.ts.map +1 -1
  364. package/dist/attributes/shape/filters/implementations/echo.js.map +1 -1
  365. package/dist/attributes/shape/filters/index.d.ts +1 -6
  366. package/dist/attributes/shape/filters/index.d.ts.map +1 -1
  367. package/dist/attributes/shape/filters/index.js +0 -2
  368. package/dist/attributes/shape/filters/index.js.map +1 -1
  369. package/dist/attributes/shape/filters/registry.d.ts +5 -35
  370. package/dist/attributes/shape/filters/registry.d.ts.map +1 -1
  371. package/dist/attributes/shape/filters/registry.js +7 -50
  372. package/dist/attributes/shape/filters/registry.js.map +1 -1
  373. package/dist/attributes/shape/filters/union.d.ts +10 -51
  374. package/dist/attributes/shape/filters/union.d.ts.map +1 -1
  375. package/dist/attributes/shape/filters/union.js.map +1 -1
  376. package/dist/attributes/shape/path/anchors.d.ts +18 -106
  377. package/dist/attributes/shape/path/anchors.d.ts.map +1 -1
  378. package/dist/attributes/shape/path/anchors.js +15 -124
  379. package/dist/attributes/shape/path/anchors.js.map +1 -1
  380. package/dist/attributes/shape/path/bezier.d.ts +6 -54
  381. package/dist/attributes/shape/path/bezier.d.ts.map +1 -1
  382. package/dist/attributes/shape/path/bezier.js +10 -98
  383. package/dist/attributes/shape/path/bezier.js.map +1 -1
  384. package/dist/attributes/shape/path/index.d.ts +1 -11
  385. package/dist/attributes/shape/path/index.d.ts.map +1 -1
  386. package/dist/attributes/shape/path/index.js +1 -11
  387. package/dist/attributes/shape/path/index.js.map +1 -1
  388. package/dist/attributes/shape/path/measure.d.ts +5 -41
  389. package/dist/attributes/shape/path/measure.d.ts.map +1 -1
  390. package/dist/attributes/shape/path/measure.js +8 -57
  391. package/dist/attributes/shape/path/measure.js.map +1 -1
  392. package/dist/attributes/shape/path/morph.d.ts +4 -41
  393. package/dist/attributes/shape/path/morph.d.ts.map +1 -1
  394. package/dist/attributes/shape/path/morph.js +17 -117
  395. package/dist/attributes/shape/path/morph.js.map +1 -1
  396. package/dist/attributes/shape/path/ops.d.ts +5 -19
  397. package/dist/attributes/shape/path/ops.d.ts.map +1 -1
  398. package/dist/attributes/shape/path/ops.js.map +1 -1
  399. package/dist/attributes/shape/path/types.d.ts +10 -67
  400. package/dist/attributes/shape/path/types.d.ts.map +1 -1
  401. package/dist/attributes/shape/path/types.js +0 -1
  402. package/dist/attributes/shape/path/types.js.map +1 -1
  403. package/dist/attributes/shape/path/walk.d.ts +9 -63
  404. package/dist/attributes/shape/path/walk.d.ts.map +1 -1
  405. package/dist/attributes/shape/path/walk.js +21 -100
  406. package/dist/attributes/shape/path/walk.js.map +1 -1
  407. package/dist/attributes/shape/shaders/language.d.ts +2 -14
  408. package/dist/attributes/shape/shaders/language.d.ts.map +1 -1
  409. package/dist/attributes/shape/shaders/language.js +1 -8
  410. package/dist/attributes/shape/shaders/language.js.map +1 -1
  411. package/dist/attributes/shape/shaders/pack.d.ts +13 -78
  412. package/dist/attributes/shape/shaders/pack.d.ts.map +1 -1
  413. package/dist/attributes/shape/shaders/pack.js +1 -10
  414. package/dist/attributes/shape/shaders/pack.js.map +1 -1
  415. package/dist/attributes/shape/shaders/resolve.d.ts +1 -11
  416. package/dist/attributes/shape/shaders/resolve.d.ts.map +1 -1
  417. package/dist/attributes/shape/shaders/resolve.js +3 -28
  418. package/dist/attributes/shape/shaders/resolve.js.map +1 -1
  419. package/dist/attributes/shape/shaders/uniforms.d.ts +3 -24
  420. package/dist/attributes/shape/shaders/uniforms.d.ts.map +1 -1
  421. package/dist/attributes/shape/shaders/uniforms.js +0 -0
  422. package/dist/attributes/shape/shaders/uniforms.js.map +1 -1
  423. package/dist/attributes/shape/shadow/shadow.d.ts +3 -20
  424. package/dist/attributes/shape/shadow/shadow.d.ts.map +1 -1
  425. package/dist/attributes/shape/shadow/shadow.js +0 -3
  426. package/dist/attributes/shape/shadow/shadow.js.map +1 -1
  427. package/dist/attributes/shape/stroke/stroke.d.ts +9 -58
  428. package/dist/attributes/shape/stroke/stroke.d.ts.map +1 -1
  429. package/dist/attributes/shape/stroke/stroke.js +0 -6
  430. package/dist/attributes/shape/stroke/stroke.js.map +1 -1
  431. package/dist/attributes/shared/operators.d.ts +1 -8
  432. package/dist/attributes/shared/operators.d.ts.map +1 -1
  433. package/dist/attributes/shared/operators.js.map +1 -1
  434. package/dist/attributes/text/index.d.ts +1 -11
  435. package/dist/attributes/text/index.d.ts.map +1 -1
  436. package/dist/attributes/text/index.js +1 -11
  437. package/dist/attributes/text/index.js.map +1 -1
  438. package/dist/attributes/text/ops.d.ts +4 -30
  439. package/dist/attributes/text/ops.d.ts.map +1 -1
  440. package/dist/attributes/text/ops.js +7 -23
  441. package/dist/attributes/text/ops.js.map +1 -1
  442. package/dist/attributes/text/types.d.ts +5 -28
  443. package/dist/attributes/text/types.d.ts.map +1 -1
  444. package/dist/attributes/text/types.js.map +1 -1
  445. package/dist/browser/chunks/chunk-3ZIUZZC7.js +13 -0
  446. package/dist/browser/chunks/chunk-3ZIUZZC7.js.map +7 -0
  447. package/dist/browser/chunks/{chunk-CCGVIR4F.js → chunk-5TDMGUXQ.js} +3 -3
  448. package/dist/browser/chunks/chunk-5TDMGUXQ.js.map +7 -0
  449. package/dist/browser/chunks/chunk-7YOYMMXK.js +6 -0
  450. package/dist/browser/chunks/chunk-7YOYMMXK.js.map +7 -0
  451. package/dist/browser/chunks/{chunk-4BDLFEOC.js → chunk-GEJEQQER.js} +1 -1
  452. package/dist/browser/chunks/chunk-GEJEQQER.js.map +7 -0
  453. package/dist/browser/component.js +1 -1
  454. package/dist/browser/experimental.js +1 -1
  455. package/dist/browser/index.js +1 -1
  456. package/dist/browser/index.js.map +4 -4
  457. package/dist/browser/manifest.json +1 -1
  458. package/dist/browser/sdk.js +1 -1
  459. package/dist/component.d.ts +3 -10
  460. package/dist/component.d.ts.map +1 -1
  461. package/dist/component.js +3 -10
  462. package/dist/component.js.map +1 -1
  463. package/dist/components/builtins/geometry/geometry.d.ts +15 -62
  464. package/dist/components/builtins/geometry/geometry.d.ts.map +1 -1
  465. package/dist/components/builtins/geometry/geometry.js.map +1 -1
  466. package/dist/components/builtins/geometry/shape-outline.d.ts +12 -61
  467. package/dist/components/builtins/geometry/shape-outline.d.ts.map +1 -1
  468. package/dist/components/builtins/geometry/shape-outline.js +29 -168
  469. package/dist/components/builtins/geometry/shape-outline.js.map +1 -1
  470. package/dist/components/builtins/layout/layout.d.ts +1 -14
  471. package/dist/components/builtins/layout/layout.d.ts.map +1 -1
  472. package/dist/components/builtins/layout/layout.js.map +1 -1
  473. package/dist/components/builtins/media/media.d.ts +11 -51
  474. package/dist/components/builtins/media/media.d.ts.map +1 -1
  475. package/dist/components/builtins/media/media.js +3 -7
  476. package/dist/components/builtins/media/media.js.map +1 -1
  477. package/dist/components/builtins/text/number-format.d.ts +14 -47
  478. package/dist/components/builtins/text/number-format.d.ts.map +1 -1
  479. package/dist/components/builtins/text/number-format.js +19 -69
  480. package/dist/components/builtins/text/number-format.js.map +1 -1
  481. package/dist/components/builtins/text/number-pattern.d.ts +3 -37
  482. package/dist/components/builtins/text/number-pattern.d.ts.map +1 -1
  483. package/dist/components/builtins/text/number-pattern.js +6 -48
  484. package/dist/components/builtins/text/number-pattern.js.map +1 -1
  485. package/dist/components/builtins/text/text-defaults.d.ts +7 -25
  486. package/dist/components/builtins/text/text-defaults.d.ts.map +1 -1
  487. package/dist/components/builtins/text/text-defaults.js +7 -25
  488. package/dist/components/builtins/text/text-defaults.js.map +1 -1
  489. package/dist/components/builtins/text/text-layout.d.ts +2 -11
  490. package/dist/components/builtins/text/text-layout.d.ts.map +1 -1
  491. package/dist/components/builtins/text/text-layout.js +7 -22
  492. package/dist/components/builtins/text/text-layout.js.map +1 -1
  493. package/dist/components/builtins/text/text.d.ts +8 -46
  494. package/dist/components/builtins/text/text.d.ts.map +1 -1
  495. package/dist/components/builtins/text/text.js.map +1 -1
  496. package/dist/components/builtins/three/canvas3d.d.ts +6 -51
  497. package/dist/components/builtins/three/canvas3d.d.ts.map +1 -1
  498. package/dist/components/builtins/three/canvas3d.js.map +1 -1
  499. package/dist/components/builtins/three/grid-geometry3d.d.ts +3 -39
  500. package/dist/components/builtins/three/grid-geometry3d.d.ts.map +1 -1
  501. package/dist/components/builtins/three/grid-geometry3d.js +8 -46
  502. package/dist/components/builtins/three/grid-geometry3d.js.map +1 -1
  503. package/dist/components/builtins/three/three.d.ts +22 -117
  504. package/dist/components/builtins/three/three.d.ts.map +1 -1
  505. package/dist/components/builtins/three/three.js +5 -17
  506. package/dist/components/builtins/three/three.js.map +1 -1
  507. package/dist/components/factory/api.d.ts.map +1 -1
  508. package/dist/components/factory/api.js.map +1 -1
  509. package/dist/components/factory/views.d.ts.map +1 -1
  510. package/dist/components/factory/views.js +0 -2
  511. package/dist/components/factory/views.js.map +1 -1
  512. package/dist/components/trees/2d/group-bounds.d.ts +12 -41
  513. package/dist/components/trees/2d/group-bounds.d.ts.map +1 -1
  514. package/dist/components/trees/2d/group-bounds.js +3 -22
  515. package/dist/components/trees/2d/group-bounds.js.map +1 -1
  516. package/dist/components/trees/2d/node-lifecycle.d.ts +8 -36
  517. package/dist/components/trees/2d/node-lifecycle.d.ts.map +1 -1
  518. package/dist/components/trees/2d/node-lifecycle.js +35 -127
  519. package/dist/components/trees/2d/node-lifecycle.js.map +1 -1
  520. package/dist/components/trees/2d/node-motion.d.ts +4 -36
  521. package/dist/components/trees/2d/node-motion.d.ts.map +1 -1
  522. package/dist/components/trees/2d/node-motion.js +3 -31
  523. package/dist/components/trees/2d/node-motion.js.map +1 -1
  524. package/dist/components/trees/2d/node-render.d.ts +3 -20
  525. package/dist/components/trees/2d/node-render.d.ts.map +1 -1
  526. package/dist/components/trees/2d/node-render.js +4 -23
  527. package/dist/components/trees/2d/node-render.js.map +1 -1
  528. package/dist/components/trees/2d/node-space.d.ts +4 -23
  529. package/dist/components/trees/2d/node-space.d.ts.map +1 -1
  530. package/dist/components/trees/2d/node-space.js +3 -17
  531. package/dist/components/trees/2d/node-space.js.map +1 -1
  532. package/dist/components/trees/2d/node-transform.d.ts +4 -33
  533. package/dist/components/trees/2d/node-transform.d.ts.map +1 -1
  534. package/dist/components/trees/2d/node-transform.js +4 -33
  535. package/dist/components/trees/2d/node-transform.js.map +1 -1
  536. package/dist/components/trees/2d/node2d.d.ts +112 -622
  537. package/dist/components/trees/2d/node2d.d.ts.map +1 -1
  538. package/dist/components/trees/2d/node2d.js +131 -605
  539. package/dist/components/trees/2d/node2d.js.map +1 -1
  540. package/dist/components/trees/audio/node-audio.d.ts +17 -65
  541. package/dist/components/trees/audio/node-audio.d.ts.map +1 -1
  542. package/dist/components/trees/audio/node-audio.js +18 -68
  543. package/dist/components/trees/audio/node-audio.js.map +1 -1
  544. package/dist/components/trees/node/node-editor-state.d.ts +5 -45
  545. package/dist/components/trees/node/node-editor-state.d.ts.map +1 -1
  546. package/dist/components/trees/node/node-editor-state.js +1 -13
  547. package/dist/components/trees/node/node-editor-state.js.map +1 -1
  548. package/dist/components/trees/node/node-reactive.d.ts +6 -53
  549. package/dist/components/trees/node/node-reactive.d.ts.map +1 -1
  550. package/dist/components/trees/node/node-reactive.js +4 -33
  551. package/dist/components/trees/node/node-reactive.js.map +1 -1
  552. package/dist/components/trees/node/node-time.d.ts +2 -15
  553. package/dist/components/trees/node/node-time.d.ts.map +1 -1
  554. package/dist/components/trees/node/node-time.js.map +1 -1
  555. package/dist/components/trees/node/node-walk.d.ts +7 -32
  556. package/dist/components/trees/node/node-walk.d.ts.map +1 -1
  557. package/dist/components/trees/node/node-walk.js +7 -32
  558. package/dist/components/trees/node/node-walk.js.map +1 -1
  559. package/dist/components/trees/node/node.d.ts +43 -248
  560. package/dist/components/trees/node/node.d.ts.map +1 -1
  561. package/dist/components/trees/node/node.js +51 -229
  562. package/dist/components/trees/node/node.js.map +1 -1
  563. package/dist/components/trees/root/canvas2d-node.d.ts +7 -60
  564. package/dist/components/trees/root/canvas2d-node.d.ts.map +1 -1
  565. package/dist/components/trees/root/canvas2d-node.js +7 -47
  566. package/dist/components/trees/root/canvas2d-node.js.map +1 -1
  567. package/dist/components/trees/three/node3d.d.ts +24 -112
  568. package/dist/components/trees/three/node3d.d.ts.map +1 -1
  569. package/dist/components/trees/three/node3d.js +22 -104
  570. package/dist/components/trees/three/node3d.js.map +1 -1
  571. package/dist/document/audio.d.ts +9 -21
  572. package/dist/document/audio.d.ts.map +1 -1
  573. package/dist/document/audio.js +13 -28
  574. package/dist/document/audio.js.map +1 -1
  575. package/dist/document/builtins.d.ts +3 -9
  576. package/dist/document/builtins.d.ts.map +1 -1
  577. package/dist/document/builtins.js +43 -89
  578. package/dist/document/builtins.js.map +1 -1
  579. package/dist/document/command-traits.d.ts +14 -37
  580. package/dist/document/command-traits.d.ts.map +1 -1
  581. package/dist/document/command-traits.js +22 -39
  582. package/dist/document/command-traits.js.map +1 -1
  583. package/dist/document/deny-globals.d.ts +9 -43
  584. package/dist/document/deny-globals.d.ts.map +1 -1
  585. package/dist/document/deny-globals.js +18 -58
  586. package/dist/document/deny-globals.js.map +1 -1
  587. package/dist/document/diff.d.ts +6 -16
  588. package/dist/document/diff.d.ts.map +1 -1
  589. package/dist/document/diff.js +5 -11
  590. package/dist/document/diff.js.map +1 -1
  591. package/dist/document/doc-index.d.ts +5 -13
  592. package/dist/document/doc-index.d.ts.map +1 -1
  593. package/dist/document/doc-index.js +0 -2
  594. package/dist/document/doc-index.js.map +1 -1
  595. package/dist/document/expression/compile.d.ts +2 -2
  596. package/dist/document/expression/compile.d.ts.map +1 -1
  597. package/dist/document/expression/compile.js +8 -18
  598. package/dist/document/expression/compile.js.map +1 -1
  599. package/dist/document/expression/index.d.ts +11 -41
  600. package/dist/document/expression/index.d.ts.map +1 -1
  601. package/dist/document/expression/index.js +11 -41
  602. package/dist/document/expression/index.js.map +1 -1
  603. package/dist/document/expression/ops.d.ts +3 -12
  604. package/dist/document/expression/ops.d.ts.map +1 -1
  605. package/dist/document/expression/ops.js +4 -20
  606. package/dist/document/expression/ops.js.map +1 -1
  607. package/dist/document/expression/parse.d.ts +4 -14
  608. package/dist/document/expression/parse.d.ts.map +1 -1
  609. package/dist/document/expression/parse.js +34 -55
  610. package/dist/document/expression/parse.js.map +1 -1
  611. package/dist/document/expression/refs.d.ts +2 -8
  612. package/dist/document/expression/refs.d.ts.map +1 -1
  613. package/dist/document/expression/refs.js +2 -6
  614. package/dist/document/expression/refs.js.map +1 -1
  615. package/dist/document/expression/types.d.ts +18 -63
  616. package/dist/document/expression/types.d.ts.map +1 -1
  617. package/dist/document/expression/types.js +4 -15
  618. package/dist/document/expression/types.js.map +1 -1
  619. package/dist/document/expression/walk.d.ts +6 -20
  620. package/dist/document/expression/walk.d.ts.map +1 -1
  621. package/dist/document/expression/walk.js +18 -44
  622. package/dist/document/expression/walk.js.map +1 -1
  623. package/dist/document/index.js +2 -3
  624. package/dist/document/index.js.map +1 -1
  625. package/dist/document/migrate.d.ts +7 -22
  626. package/dist/document/migrate.d.ts.map +1 -1
  627. package/dist/document/migrate.js +44 -15
  628. package/dist/document/migrate.js.map +1 -1
  629. package/dist/document/missing-node.d.ts +4 -11
  630. package/dist/document/missing-node.d.ts.map +1 -1
  631. package/dist/document/missing-node.js +2 -5
  632. package/dist/document/missing-node.js.map +1 -1
  633. package/dist/document/node-decorator.d.ts +12 -53
  634. package/dist/document/node-decorator.d.ts.map +1 -1
  635. package/dist/document/node-decorator.js +16 -57
  636. package/dist/document/node-decorator.js.map +1 -1
  637. package/dist/document/node-descriptor.d.ts +25 -62
  638. package/dist/document/node-descriptor.d.ts.map +1 -1
  639. package/dist/document/node-descriptor.js.map +1 -1
  640. package/dist/document/placement.d.ts +18 -41
  641. package/dist/document/placement.d.ts.map +1 -1
  642. package/dist/document/placement.js +4 -11
  643. package/dist/document/placement.js.map +1 -1
  644. package/dist/document/project.d.ts +19 -52
  645. package/dist/document/project.d.ts.map +1 -1
  646. package/dist/document/project.js +2 -6
  647. package/dist/document/project.js.map +1 -1
  648. package/dist/document/prop-evolution.d.ts +10 -20
  649. package/dist/document/prop-evolution.d.ts.map +1 -1
  650. package/dist/document/prop-evolution.js +3 -7
  651. package/dist/document/prop-evolution.js.map +1 -1
  652. package/dist/document/registry.d.ts +80 -318
  653. package/dist/document/registry.d.ts.map +1 -1
  654. package/dist/document/registry.js +43 -147
  655. package/dist/document/registry.js.map +1 -1
  656. package/dist/document/settled-index.d.ts +11 -23
  657. package/dist/document/settled-index.d.ts.map +1 -1
  658. package/dist/document/settled-index.js +15 -34
  659. package/dist/document/settled-index.js.map +1 -1
  660. package/dist/document/timeline-patch.d.ts +6 -15
  661. package/dist/document/timeline-patch.d.ts.map +1 -1
  662. package/dist/document/timeline-patch.js +12 -21
  663. package/dist/document/timeline-patch.js.map +1 -1
  664. package/dist/document/timeline.d.ts +56 -263
  665. package/dist/document/timeline.d.ts.map +1 -1
  666. package/dist/document/timeline.js +71 -275
  667. package/dist/document/timeline.js.map +1 -1
  668. package/dist/document/types.d.ts +90 -264
  669. package/dist/document/types.d.ts.map +1 -1
  670. package/dist/document/types.js +13 -30
  671. package/dist/document/types.js.map +1 -1
  672. package/dist/document/validate.d.ts +10 -40
  673. package/dist/document/validate.d.ts.map +1 -1
  674. package/dist/document/validate.js +72 -137
  675. package/dist/document/validate.js.map +1 -1
  676. package/dist/document/vocabulary.d.ts +4 -7
  677. package/dist/document/vocabulary.d.ts.map +1 -1
  678. package/dist/document/vocabulary.js +0 -1
  679. package/dist/document/vocabulary.js.map +1 -1
  680. package/dist/index.d.ts +0 -1
  681. package/dist/index.d.ts.map +1 -1
  682. package/dist/index.js +0 -1
  683. package/dist/index.js.map +1 -1
  684. package/dist/layout/bounds.d.ts +1 -11
  685. package/dist/layout/bounds.d.ts.map +1 -1
  686. package/dist/layout/bounds.js.map +1 -1
  687. package/dist/layout/flex.d.ts +6 -20
  688. package/dist/layout/flex.d.ts.map +1 -1
  689. package/dist/layout/flex.js +7 -28
  690. package/dist/layout/flex.js.map +1 -1
  691. package/dist/layout/ops.d.ts +2 -11
  692. package/dist/layout/ops.d.ts.map +1 -1
  693. package/dist/layout/ops.js +2 -22
  694. package/dist/layout/ops.js.map +1 -1
  695. package/dist/layout/types.d.ts +11 -55
  696. package/dist/layout/types.d.ts.map +1 -1
  697. package/dist/layout/types.js.map +1 -1
  698. package/dist/platform/audio-sink.d.ts +7 -43
  699. package/dist/platform/audio-sink.d.ts.map +1 -1
  700. package/dist/platform/audio-sink.js +4 -29
  701. package/dist/platform/audio-sink.js.map +1 -1
  702. package/dist/platform/exporter.d.ts +5 -31
  703. package/dist/platform/exporter.d.ts.map +1 -1
  704. package/dist/platform/exporter.js.map +1 -1
  705. package/dist/platform/stepped-clock.d.ts +1 -16
  706. package/dist/platform/stepped-clock.d.ts.map +1 -1
  707. package/dist/platform/stepped-clock.js +1 -16
  708. package/dist/platform/stepped-clock.js.map +1 -1
  709. package/dist/platform/storage-adapter.d.ts +8 -68
  710. package/dist/platform/storage-adapter.d.ts.map +1 -1
  711. package/dist/platform/storage-adapter.js +8 -60
  712. package/dist/platform/storage-adapter.js.map +1 -1
  713. package/dist/platform/ticker.d.ts +11 -45
  714. package/dist/platform/ticker.d.ts.map +1 -1
  715. package/dist/platform/ticker.js +10 -37
  716. package/dist/platform/ticker.js.map +1 -1
  717. package/dist/project/config.d.ts +4 -14
  718. package/dist/project/config.d.ts.map +1 -1
  719. package/dist/project/config.js.map +1 -1
  720. package/dist/project/tree.d.ts +6 -35
  721. package/dist/project/tree.d.ts.map +1 -1
  722. package/dist/project/tree.js +1 -8
  723. package/dist/project/tree.js.map +1 -1
  724. package/dist/props/host.d.ts +2 -13
  725. package/dist/props/host.d.ts.map +1 -1
  726. package/dist/props/host.js.map +1 -1
  727. package/dist/props/layout.d.ts +1 -12
  728. package/dist/props/layout.d.ts.map +1 -1
  729. package/dist/props/layout.js +1 -12
  730. package/dist/props/layout.js.map +1 -1
  731. package/dist/props/observer.d.ts +1 -7
  732. package/dist/props/observer.d.ts.map +1 -1
  733. package/dist/props/observer.js.map +1 -1
  734. package/dist/props/slot.d.ts +6 -19
  735. package/dist/props/slot.d.ts.map +1 -1
  736. package/dist/props/slot.js +5 -14
  737. package/dist/props/slot.js.map +1 -1
  738. package/dist/render/canvas-render-context2d.d.ts +8 -68
  739. package/dist/render/canvas-render-context2d.d.ts.map +1 -1
  740. package/dist/render/canvas-render-context2d.js +8 -69
  741. package/dist/render/canvas-render-context2d.js.map +1 -1
  742. package/dist/render/clip-contains.d.ts +2 -16
  743. package/dist/render/clip-contains.d.ts.map +1 -1
  744. package/dist/render/clip-contains.js +21 -82
  745. package/dist/render/clip-contains.js.map +1 -1
  746. package/dist/render/clip.d.ts +7 -25
  747. package/dist/render/clip.d.ts.map +1 -1
  748. package/dist/render/clip.js +5 -17
  749. package/dist/render/clip.js.map +1 -1
  750. package/dist/render/descriptors/ellipse.d.ts.map +1 -1
  751. package/dist/render/descriptors/ellipse.js +0 -1
  752. package/dist/render/descriptors/ellipse.js.map +1 -1
  753. package/dist/render/descriptors/line.d.ts.map +1 -1
  754. package/dist/render/descriptors/line.js +0 -1
  755. package/dist/render/descriptors/line.js.map +1 -1
  756. package/dist/render/descriptors/path-builder.d.ts +4 -32
  757. package/dist/render/descriptors/path-builder.d.ts.map +1 -1
  758. package/dist/render/descriptors/path-builder.js +3 -25
  759. package/dist/render/descriptors/path-builder.js.map +1 -1
  760. package/dist/render/descriptors/path.d.ts +1 -11
  761. package/dist/render/descriptors/path.d.ts.map +1 -1
  762. package/dist/render/descriptors/path.js +0 -1
  763. package/dist/render/descriptors/path.js.map +1 -1
  764. package/dist/render/descriptors/polygon.d.ts.map +1 -1
  765. package/dist/render/descriptors/polygon.js +0 -1
  766. package/dist/render/descriptors/polygon.js.map +1 -1
  767. package/dist/render/descriptors/polygram.d.ts.map +1 -1
  768. package/dist/render/descriptors/polygram.js +0 -1
  769. package/dist/render/descriptors/polygram.js.map +1 -1
  770. package/dist/render/descriptors/rect.d.ts.map +1 -1
  771. package/dist/render/descriptors/rect.js +0 -1
  772. package/dist/render/descriptors/rect.js.map +1 -1
  773. package/dist/render/descriptors/richtext.d.ts.map +1 -1
  774. package/dist/render/descriptors/richtext.js +0 -1
  775. package/dist/render/descriptors/richtext.js.map +1 -1
  776. package/dist/render/descriptors/shape.d.ts +17 -77
  777. package/dist/render/descriptors/shape.d.ts.map +1 -1
  778. package/dist/render/descriptors/shape.js +13 -47
  779. package/dist/render/descriptors/shape.js.map +1 -1
  780. package/dist/render/descriptors/text.d.ts +15 -94
  781. package/dist/render/descriptors/text.d.ts.map +1 -1
  782. package/dist/render/descriptors/text.js +8 -50
  783. package/dist/render/descriptors/text.js.map +1 -1
  784. package/dist/render/descriptors/transform.d.ts +5 -16
  785. package/dist/render/descriptors/transform.d.ts.map +1 -1
  786. package/dist/render/descriptors/transform.js +1 -17
  787. package/dist/render/descriptors/transform.js.map +1 -1
  788. package/dist/render/graphics2d.d.ts +24 -116
  789. package/dist/render/graphics2d.d.ts.map +1 -1
  790. package/dist/render/graphics2d.js +23 -108
  791. package/dist/render/graphics2d.js.map +1 -1
  792. package/dist/render/measure-context.d.ts +5 -29
  793. package/dist/render/measure-context.d.ts.map +1 -1
  794. package/dist/render/measure-context.js.map +1 -1
  795. package/dist/render/null-render-context.d.ts +2 -20
  796. package/dist/render/null-render-context.d.ts.map +1 -1
  797. package/dist/render/null-render-context.js +2 -20
  798. package/dist/render/null-render-context.js.map +1 -1
  799. package/dist/render/render-context2d.d.ts +52 -208
  800. package/dist/render/render-context2d.d.ts.map +1 -1
  801. package/dist/render/render-context2d.js.map +1 -1
  802. package/dist/render/surface.d.ts +2 -19
  803. package/dist/render/surface.d.ts.map +1 -1
  804. package/dist/render/surface.js.map +1 -1
  805. package/dist/render/text-defaults.d.ts +1 -17
  806. package/dist/render/text-defaults.d.ts.map +1 -1
  807. package/dist/render/text-defaults.js +6 -40
  808. package/dist/render/text-defaults.js.map +1 -1
  809. package/dist/render/text-layout.d.ts +12 -55
  810. package/dist/render/text-layout.d.ts.map +1 -1
  811. package/dist/render/text-layout.js +2 -16
  812. package/dist/render/text-layout.js.map +1 -1
  813. package/dist/render3d/bounds3d.d.ts +10 -32
  814. package/dist/render3d/bounds3d.d.ts.map +1 -1
  815. package/dist/render3d/bounds3d.js +2 -12
  816. package/dist/render3d/bounds3d.js.map +1 -1
  817. package/dist/render3d/builders.d.ts +8 -35
  818. package/dist/render3d/builders.d.ts.map +1 -1
  819. package/dist/render3d/builders.js +8 -35
  820. package/dist/render3d/builders.js.map +1 -1
  821. package/dist/render3d/camera.d.ts +10 -57
  822. package/dist/render3d/camera.d.ts.map +1 -1
  823. package/dist/render3d/camera.js +4 -26
  824. package/dist/render3d/camera.js.map +1 -1
  825. package/dist/render3d/fill3d.d.ts +7 -45
  826. package/dist/render3d/fill3d.d.ts.map +1 -1
  827. package/dist/render3d/fill3d.js +15 -85
  828. package/dist/render3d/fill3d.js.map +1 -1
  829. package/dist/render3d/geometry.d.ts +18 -106
  830. package/dist/render3d/geometry.d.ts.map +1 -1
  831. package/dist/render3d/geometry.js +2 -20
  832. package/dist/render3d/geometry.js.map +1 -1
  833. package/dist/render3d/graphics3d.d.ts +29 -133
  834. package/dist/render3d/graphics3d.d.ts.map +1 -1
  835. package/dist/render3d/graphics3d.js +23 -110
  836. package/dist/render3d/graphics3d.js.map +1 -1
  837. package/dist/render3d/index.d.ts +1 -16
  838. package/dist/render3d/index.d.ts.map +1 -1
  839. package/dist/render3d/index.js +1 -16
  840. package/dist/render3d/index.js.map +1 -1
  841. package/dist/render3d/inert.d.ts.map +1 -1
  842. package/dist/render3d/inert.js +1 -14
  843. package/dist/render3d/inert.js.map +1 -1
  844. package/dist/render3d/light.d.ts +3 -26
  845. package/dist/render3d/light.d.ts.map +1 -1
  846. package/dist/render3d/light.js.map +1 -1
  847. package/dist/render3d/material.d.ts +13 -87
  848. package/dist/render3d/material.d.ts.map +1 -1
  849. package/dist/render3d/material.js +2 -16
  850. package/dist/render3d/material.js.map +1 -1
  851. package/dist/render3d/matrix4.d.ts +14 -68
  852. package/dist/render3d/matrix4.d.ts.map +1 -1
  853. package/dist/render3d/matrix4.js +11 -60
  854. package/dist/render3d/matrix4.js.map +1 -1
  855. package/dist/render3d/render-context3d.d.ts +13 -51
  856. package/dist/render3d/render-context3d.d.ts.map +1 -1
  857. package/dist/render3d/render-context3d.js +9 -21
  858. package/dist/render3d/render-context3d.js.map +1 -1
  859. package/dist/render3d/resources.d.ts +9 -53
  860. package/dist/render3d/resources.d.ts.map +1 -1
  861. package/dist/render3d/resources.js +8 -48
  862. package/dist/render3d/resources.js.map +1 -1
  863. package/dist/render3d/rounded-box.d.ts +7 -21
  864. package/dist/render3d/rounded-box.d.ts.map +1 -1
  865. package/dist/render3d/rounded-box.js +7 -46
  866. package/dist/render3d/rounded-box.js.map +1 -1
  867. package/dist/render3d/scene-settings.d.ts +20 -78
  868. package/dist/render3d/scene-settings.d.ts.map +1 -1
  869. package/dist/render3d/scene-settings.js.map +1 -1
  870. package/dist/render3d/scene3d.d.ts +11 -53
  871. package/dist/render3d/scene3d.d.ts.map +1 -1
  872. package/dist/render3d/scene3d.js +12 -59
  873. package/dist/render3d/scene3d.js.map +1 -1
  874. package/dist/render3d/segments.d.ts +2 -25
  875. package/dist/render3d/segments.d.ts.map +1 -1
  876. package/dist/render3d/segments.js +1 -11
  877. package/dist/render3d/segments.js.map +1 -1
  878. package/dist/render3d/texture.d.ts +25 -112
  879. package/dist/render3d/texture.d.ts.map +1 -1
  880. package/dist/render3d/texture.js +3 -27
  881. package/dist/render3d/texture.js.map +1 -1
  882. package/dist/render3d/tracking.d.ts +2 -19
  883. package/dist/render3d/tracking.d.ts.map +1 -1
  884. package/dist/render3d/tracking.js +2 -19
  885. package/dist/render3d/tracking.js.map +1 -1
  886. package/dist/render3d/transform.d.ts +14 -60
  887. package/dist/render3d/transform.d.ts.map +1 -1
  888. package/dist/render3d/transform.js +0 -2
  889. package/dist/render3d/transform.js.map +1 -1
  890. package/dist/render3d/vector3.d.ts +6 -48
  891. package/dist/render3d/vector3.d.ts.map +1 -1
  892. package/dist/render3d/vector3.js +4 -38
  893. package/dist/render3d/vector3.js.map +1 -1
  894. package/dist/render3d/walk.d.ts +3 -27
  895. package/dist/render3d/walk.d.ts.map +1 -1
  896. package/dist/render3d/walk.js +5 -33
  897. package/dist/render3d/walk.js.map +1 -1
  898. package/dist/runtime/asset-refine.d.ts +34 -20
  899. package/dist/runtime/asset-refine.d.ts.map +1 -1
  900. package/dist/runtime/asset-refine.js +127 -31
  901. package/dist/runtime/asset-refine.js.map +1 -1
  902. package/dist/runtime/asset-timeline.d.ts +14 -53
  903. package/dist/runtime/asset-timeline.d.ts.map +1 -1
  904. package/dist/runtime/asset-timeline.js +6 -27
  905. package/dist/runtime/asset-timeline.js.map +1 -1
  906. package/dist/runtime/asset-update.d.ts +7 -26
  907. package/dist/runtime/asset-update.d.ts.map +1 -1
  908. package/dist/runtime/asset-update.js +6 -18
  909. package/dist/runtime/asset-update.js.map +1 -1
  910. package/dist/runtime/audio-index.d.ts +0 -2
  911. package/dist/runtime/audio-index.d.ts.map +1 -1
  912. package/dist/runtime/audio-index.js +0 -2
  913. package/dist/runtime/audio-index.js.map +1 -1
  914. package/dist/runtime/builtin-context.d.ts +3 -9
  915. package/dist/runtime/builtin-context.d.ts.map +1 -1
  916. package/dist/runtime/builtin-context.js +3 -9
  917. package/dist/runtime/builtin-context.js.map +1 -1
  918. package/dist/runtime/clip-instance.d.ts +12 -39
  919. package/dist/runtime/clip-instance.d.ts.map +1 -1
  920. package/dist/runtime/clip-instance.js +21 -45
  921. package/dist/runtime/clip-instance.js.map +1 -1
  922. package/dist/runtime/clip-store.d.ts +26 -68
  923. package/dist/runtime/clip-store.d.ts.map +1 -1
  924. package/dist/runtime/clip-store.js +47 -81
  925. package/dist/runtime/clip-store.js.map +1 -1
  926. package/dist/runtime/engine.d.ts +31 -85
  927. package/dist/runtime/engine.d.ts.map +1 -1
  928. package/dist/runtime/engine.js +16 -49
  929. package/dist/runtime/engine.js.map +1 -1
  930. package/dist/runtime/frame-time.d.ts +4 -15
  931. package/dist/runtime/frame-time.d.ts.map +1 -1
  932. package/dist/runtime/frame-time.js +5 -12
  933. package/dist/runtime/frame-time.js.map +1 -1
  934. package/dist/runtime/index.d.ts +0 -1
  935. package/dist/runtime/index.d.ts.map +1 -1
  936. package/dist/runtime/index.js +0 -1
  937. package/dist/runtime/index.js.map +1 -1
  938. package/dist/runtime/node-picking.d.ts +59 -139
  939. package/dist/runtime/node-picking.d.ts.map +1 -1
  940. package/dist/runtime/node-picking.js +87 -157
  941. package/dist/runtime/node-picking.js.map +1 -1
  942. package/dist/runtime/node-picking3d.d.ts +39 -96
  943. package/dist/runtime/node-picking3d.d.ts.map +1 -1
  944. package/dist/runtime/node-picking3d.js +98 -141
  945. package/dist/runtime/node-picking3d.js.map +1 -1
  946. package/dist/runtime/placement.d.ts +8 -17
  947. package/dist/runtime/placement.d.ts.map +1 -1
  948. package/dist/runtime/placement.js +7 -16
  949. package/dist/runtime/placement.js.map +1 -1
  950. package/dist/runtime/playback-controller.d.ts +78 -207
  951. package/dist/runtime/playback-controller.d.ts.map +1 -1
  952. package/dist/runtime/playback-controller.js +111 -226
  953. package/dist/runtime/playback-controller.js.map +1 -1
  954. package/dist/runtime/playback.d.ts +6 -14
  955. package/dist/runtime/playback.d.ts.map +1 -1
  956. package/dist/runtime/playback.js +6 -14
  957. package/dist/runtime/playback.js.map +1 -1
  958. package/dist/runtime/project-assets.d.ts +6 -14
  959. package/dist/runtime/project-assets.d.ts.map +1 -1
  960. package/dist/runtime/project-assets.js +7 -16
  961. package/dist/runtime/project-assets.js.map +1 -1
  962. package/dist/runtime/session.d.ts +22 -45
  963. package/dist/runtime/session.d.ts.map +1 -1
  964. package/dist/runtime/session.js +26 -46
  965. package/dist/runtime/session.js.map +1 -1
  966. package/dist/runtime/settle.d.ts +4 -10
  967. package/dist/runtime/settle.d.ts.map +1 -1
  968. package/dist/runtime/settle.js +4 -10
  969. package/dist/runtime/settle.js.map +1 -1
  970. package/dist/runtime/state-evaluator.d.ts +15 -37
  971. package/dist/runtime/state-evaluator.d.ts.map +1 -1
  972. package/dist/runtime/state-evaluator.js +27 -44
  973. package/dist/runtime/state-evaluator.js.map +1 -1
  974. package/dist/runtime/text-geometry.d.ts +18 -47
  975. package/dist/runtime/text-geometry.d.ts.map +1 -1
  976. package/dist/runtime/text-geometry.js +13 -27
  977. package/dist/runtime/text-geometry.js.map +1 -1
  978. package/dist/sdk/index.d.ts +1 -7
  979. package/dist/sdk/index.d.ts.map +1 -1
  980. package/dist/sdk/index.js +30 -138
  981. package/dist/sdk/index.js.map +1 -1
  982. package/dist/tween/command-decorator.d.ts +6 -26
  983. package/dist/tween/command-decorator.d.ts.map +1 -1
  984. package/dist/tween/command-decorator.js +1 -6
  985. package/dist/tween/command-decorator.js.map +1 -1
  986. package/dist/tween/command.d.ts +6 -53
  987. package/dist/tween/command.d.ts.map +1 -1
  988. package/dist/tween/command.js +5 -40
  989. package/dist/tween/command.js.map +1 -1
  990. package/dist/tween/ease/curve.d.ts +2 -17
  991. package/dist/tween/ease/curve.d.ts.map +1 -1
  992. package/dist/tween/ease/curve.js +1 -6
  993. package/dist/tween/ease/curve.js.map +1 -1
  994. package/dist/tween/ease/describe.d.ts +0 -11
  995. package/dist/tween/ease/describe.d.ts.map +1 -1
  996. package/dist/tween/ease/describe.js +0 -23
  997. package/dist/tween/ease/describe.js.map +1 -1
  998. package/dist/tween/ease/spec.d.ts +2 -18
  999. package/dist/tween/ease/spec.d.ts.map +1 -1
  1000. package/dist/tween/ease/spec.js.map +1 -1
  1001. package/dist/tween/inert.d.ts +1 -14
  1002. package/dist/tween/inert.d.ts.map +1 -1
  1003. package/dist/tween/inert.js +1 -14
  1004. package/dist/tween/inert.js.map +1 -1
  1005. package/dist/tween/lerp.d.ts +2 -26
  1006. package/dist/tween/lerp.d.ts.map +1 -1
  1007. package/dist/tween/lerp.js +2 -26
  1008. package/dist/tween/lerp.js.map +1 -1
  1009. package/dist/tween/loop.d.ts +9 -50
  1010. package/dist/tween/loop.d.ts.map +1 -1
  1011. package/dist/tween/loop.js +6 -31
  1012. package/dist/tween/loop.js.map +1 -1
  1013. package/dist/tween/prepare.d.ts +2 -30
  1014. package/dist/tween/prepare.d.ts.map +1 -1
  1015. package/dist/tween/prepare.js +2 -30
  1016. package/dist/tween/prepare.js.map +1 -1
  1017. package/dist/tween/stepper.d.ts +4 -25
  1018. package/dist/tween/stepper.d.ts.map +1 -1
  1019. package/dist/tween/stepper.js.map +1 -1
  1020. package/dist/tween/to-command.d.ts +1 -8
  1021. package/dist/tween/to-command.d.ts.map +1 -1
  1022. package/dist/tween/to-command.js +2 -25
  1023. package/dist/tween/to-command.js.map +1 -1
  1024. package/dist/util/context.d.ts +4 -29
  1025. package/dist/util/context.d.ts.map +1 -1
  1026. package/dist/util/context.js +3 -15
  1027. package/dist/util/context.js.map +1 -1
  1028. package/dist/util/csv.d.ts +4 -29
  1029. package/dist/util/csv.d.ts.map +1 -1
  1030. package/dist/util/csv.js +3 -22
  1031. package/dist/util/csv.js.map +1 -1
  1032. package/dist/util/metrics.d.ts +2 -26
  1033. package/dist/util/metrics.d.ts.map +1 -1
  1034. package/dist/util/metrics.js +2 -26
  1035. package/dist/util/metrics.js.map +1 -1
  1036. package/dist/util/random.d.ts +20 -87
  1037. package/dist/util/random.d.ts.map +1 -1
  1038. package/dist/util/random.js +20 -87
  1039. package/dist/util/random.js.map +1 -1
  1040. package/dist/util/reference.d.ts +6 -35
  1041. package/dist/util/reference.d.ts.map +1 -1
  1042. package/dist/util/reference.js +1 -4
  1043. package/dist/util/reference.js.map +1 -1
  1044. package/dist/util/scheduler.d.ts +6 -27
  1045. package/dist/util/scheduler.d.ts.map +1 -1
  1046. package/dist/util/scheduler.js +8 -35
  1047. package/dist/util/scheduler.js.map +1 -1
  1048. package/package.json +1 -1
  1049. package/dist/browser/chunks/chunk-4BDLFEOC.js.map +0 -7
  1050. package/dist/browser/chunks/chunk-CCGVIR4F.js.map +0 -7
  1051. package/dist/browser/chunks/chunk-N4WSN5WY.js +0 -13
  1052. package/dist/browser/chunks/chunk-N4WSN5WY.js.map +0 -7
  1053. package/dist/browser/chunks/chunk-WZSI3GSK.js +0 -6
  1054. package/dist/browser/chunks/chunk-WZSI3GSK.js.map +0 -7
  1055. package/dist/renamed-scene-names.d.ts +0 -17
  1056. package/dist/renamed-scene-names.d.ts.map +0 -1
  1057. package/dist/renamed-scene-names.js +0 -9
  1058. package/dist/renamed-scene-names.js.map +0 -1
  1059. package/dist/runtime/precompisition.d.ts +0 -24
  1060. package/dist/runtime/precompisition.d.ts.map +0 -1
  1061. package/dist/runtime/precompisition.js +0 -7
  1062. package/dist/runtime/precompisition.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ticker.d.ts","sourceRoot":"","sources":["../../src/platform/ticker.ts"],"names":[],"mappings":"AAAA,0JAA0J;AAC1J,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3D,8IAA8I;AAC9I,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAEnF;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,8BAAsB,MAAM;IACxB,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,YAAY,CAAa;IACjC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAK;IAEhC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,4CAA4C;IAC5C,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,2CAA2C;IAC3C,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAE,OAAc,GAAG,IAAI;IAOjE,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI5C,sFAAsF;IACtF,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAK3C,+GAA+G;cAC/F,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrC,wDAAwD;IACxD,KAAK,IAAI,IAAI;IAKb,gGAAgG;IA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AE,MAAM,EAAE,MAAM,GAAE,OAAc,GAAG,IAAI;IAOjE,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI5C,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAK3C,+GAA+G;cAC/F,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrC,KAAK,IAAI,IAAI;IAKb,gGAAgG;IAChG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAE9B,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,CAAM;IAC7C,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,CAAM;IAC7C,SAAS,CAAC,cAAc,EAAE,CAAC,MAAM,IAAI,CAAC,EAAE,CAAM;IAC9C,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,CAAM;IAE7C,6FAA6F;IAC7F,OAAO;IAOP,MAAM,CAAC,QAAQ,EAAE,YAAY;IAI7B,MAAM,CAAC,QAAQ,EAAE,YAAY;IAI7B,OAAO,CAAC,QAAQ,EAAE,MAAM,IAAI;IAI5B,MAAM,CAAC,QAAQ,EAAE,YAAY;CAGhC"}
@@ -1,23 +1,11 @@
1
1
  /**
2
- * Platform-agnostic base class for driving animation playback.
2
+ * Platform-agnostic base for driving playback. Subclasses implement the frame loop (rAF in the browser, a setInterval
3
+ * in Node) and call `setCurrentTime` / `tick`; `Ticker` owns the subscriber lists and shared playback state. Register
4
+ * listeners via `onTick` / `onPlay` / `onPause` / `onTime`, set `setDuration`, and `dispose` when done.
3
5
  *
4
- * Subclasses implement the actual frame loop (e.g. requestAnimationFrame in the
5
- * browser, a setInterval loop in Node) and call `setCurrentTime` / `tick` each
6
- * frame. `Ticker` owns the subscriber lists and the shared playback state
7
- * so that renderers and UI controls can coordinate without knowing about each
8
- * other.
9
- *
10
- * Lifecycle:
11
- * 1. Set total duration with `setDuration`.
12
- * 2. Register listeners via `onTick` / `onPlay` / `onPause` / `onTime`.
13
- * 3. Call `play`, `pause`, or `seek` to control playback.
14
- * 4. Call `dispose` when the clock is no longer needed to prevent leaks.
15
- *
16
- * `play`, `pause` and `seek` take effect before they return, so any order of them
17
- * in one turn leaves the clock where the last one put it. A time listener or tick
18
- * callback may `seek` (a host looping wraps to the start when it hears the end), and
19
- * a subclass must read the end of a run again afterwards. At the end of a run it
20
- * reports a final tick and pauses.
6
+ * `play`, `pause` and `seek` take effect before they return, so any order of them in one turn leaves the clock where
7
+ * the last one put it. A time listener or tick callback may `seek` (a host looping wraps to the start when it hears the
8
+ * end), so a subclass must read the end of a run again afterwards. At the end of a run it reports a final tick and pauses.
21
9
  */
22
10
  export class Ticker {
23
11
  _isPlaying = false;
@@ -26,11 +14,9 @@ export class Ticker {
26
14
  get isPlaying() {
27
15
  return this._isPlaying;
28
16
  }
29
- /** Current playhead position in seconds. */
30
17
  get currentTime() {
31
18
  return this._currentTime;
32
19
  }
33
- /** Total animation duration in seconds. */
34
20
  get duration() {
35
21
  return this._duration;
36
22
  }
@@ -38,21 +24,10 @@ export class Ticker {
38
24
  this._duration = duration;
39
25
  }
40
26
  /**
41
- * Updates the playhead and notifies time listeners. No-ops if the time hasn't
42
- * changed.
43
- *
44
- * `notify` exists because the two halves of that sentence want different
45
- * rates. The playhead itself has to be exact — `pause` and `play` anchor
46
- * their elapsed-time maths on it, so it is advanced on every frame of the
47
- * subclass's loop — while a *listener* is a host drawing a timecode or
48
- * seeking a renderer, and neither can do anything with a position that has
49
- * not reached the next frame yet.
50
- *
51
- * Passing `false` therefore keeps the clock exact and the subscribers quiet.
52
- * A subclass that knows its frame rate uses it to fire {@link onTime} once
53
- * per frame rather than once per animation frame; on a 144Hz display those
54
- * are not the same number, and the difference was landing on hosts as a React
55
- * render per refresh to drive a 60fps render.
27
+ * Updates the playhead and notifies time listeners; no-ops if the time hasn't changed. `notify: false` keeps the
28
+ * clock exact (`pause`/`play` anchor their elapsed-time maths on it, so it advances every loop frame) while keeping
29
+ * subscribers quiet: a subclass that knows its frame rate fires {@link onTime} once per frame, not per animation
30
+ * frame (on a 144Hz display that was a React render per refresh to drive a 60fps render).
56
31
  */
57
32
  setCurrentTime(t, notify = true) {
58
33
  if (this._currentTime === t)
@@ -66,7 +41,6 @@ export class Ticker {
66
41
  setPlaying(playing) {
67
42
  this._isPlaying = playing;
68
43
  }
69
- /** Starts playback at the given speed and direction, notifying all play listeners. */
70
44
  play(speed, reverse) {
71
45
  this._isPlaying = true;
72
46
  for (const cb of this.playCallbacks)
@@ -76,7 +50,6 @@ export class Ticker {
76
50
  async tick() {
77
51
  await Promise.all(this.tickCallbacks.map(c => c(this._currentTime)));
78
52
  }
79
- /** Pauses playback and notifies all pause listeners. */
80
53
  pause() {
81
54
  this._isPlaying = false;
82
55
  for (const cb of this.pauseCallbacks)
@@ -1 +1 @@
1
- {"version":3,"file":"ticker.js","sourceRoot":"","sources":["../../src/platform/ticker.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAgB,MAAM;IAChB,UAAU,GAAY,KAAK,CAAC;IAC5B,YAAY,GAAW,CAAC,CAAC;IACvB,SAAS,GAAW,CAAC,CAAC;IAEhC,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,4CAA4C;IAC5C,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,2CAA2C;IAC3C,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,WAAW,CAAC,QAAgB;QACxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACO,cAAc,CAAC,CAAS,EAAE,SAAkB,IAAI;QACtD,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC;YAAE,OAAO;QACpC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QAC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,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,QAAsB;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,CAAC,QAAoB;QACxB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,QAAsB;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;CACJ","sourcesContent":["/** Called every animation frame with the current playhead time (seconds). Must return a Promise so the clock can await all renderers before advancing. */\nexport type TickCallback = (time: number) => Promise<void>;\n\n/** Fired when playback starts. Receives the time at which playback began, the playback speed multiplier, and whether playback is reversed. */\nexport type PlayCallback = (time: number, speed: number, reverse: boolean) => void;\n\n/**\n * Fired when the playhead reaches a new frame.\n *\n * Once per frame, not once per animation frame — see\n * {@link Ticker.setCurrentTime}. A subclass advancing its clock faster than\n * the project's frame rate (which every rAF-driven one does on a high-refresh\n * display) keeps the extra positions to itself.\n */\nexport type TimeCallback = (time: number) => void;\n\n/**\n * Platform-agnostic base class for driving animation playback.\n *\n * Subclasses implement the actual frame loop (e.g. requestAnimationFrame in the\n * browser, a setInterval loop in Node) and call `setCurrentTime` / `tick` each\n * frame. `Ticker` owns the subscriber lists and the shared playback state\n * so that renderers and UI controls can coordinate without knowing about each\n * other.\n *\n * Lifecycle:\n * 1. Set total duration with `setDuration`.\n * 2. Register listeners via `onTick` / `onPlay` / `onPause` / `onTime`.\n * 3. Call `play`, `pause`, or `seek` to control playback.\n * 4. Call `dispose` when the clock is no longer needed to prevent leaks.\n *\n * `play`, `pause` and `seek` take effect before they return, so any order of them\n * in one turn leaves the clock where the last one put it. A time listener or tick\n * callback may `seek` (a host looping wraps to the start when it hears the end), and\n * a subclass must read the end of a run again afterwards. At the end of a run it\n * reports a final tick and pauses.\n */\nexport abstract class Ticker {\n private _isPlaying: boolean = false;\n private _currentTime: number = 0;\n protected _duration: number = 0;\n\n get isPlaying(): boolean {\n return this._isPlaying;\n }\n\n /** Current playhead position in seconds. */\n get currentTime(): number {\n return this._currentTime;\n }\n\n /** Total animation duration in seconds. */\n get duration(): number {\n return this._duration;\n }\n\n setDuration(duration: number): void {\n this._duration = duration;\n }\n\n /**\n * Updates the playhead and notifies time listeners. No-ops if the time hasn't\n * changed.\n *\n * `notify` exists because the two halves of that sentence want different\n * rates. The playhead itself has to be exact — `pause` and `play` anchor\n * their elapsed-time maths on it, so it is advanced on every frame of the\n * subclass's loop — while a *listener* is a host drawing a timecode or\n * seeking a renderer, and neither can do anything with a position that has\n * not reached the next frame yet.\n *\n * Passing `false` therefore keeps the clock exact and the subscribers quiet.\n * A subclass that knows its frame rate uses it to fire {@link onTime} once\n * per frame rather than once per animation frame; on a 144Hz display those\n * are not the same number, and the difference was landing on hosts as a React\n * render per refresh to drive a 60fps render.\n */\n protected setCurrentTime(t: number, notify: boolean = true): void {\n if (this._currentTime === t) return;\n this._currentTime = t;\n if (!notify) return;\n for (const cb of this.timeCallbacks) cb(t);\n }\n\n protected setPlaying(playing: boolean): void {\n this._isPlaying = playing;\n }\n\n /** Starts playback at the given speed and direction, notifying all play listeners. */\n play(speed: number, reverse: boolean): void {\n this._isPlaying = true;\n for (const cb of this.playCallbacks) cb(this._currentTime, speed, reverse);\n }\n\n /** Awaits all tick callbacks in parallel. Subclasses call this once per frame after updating `currentTime`. */\n protected async tick(): Promise<void> {\n await Promise.all(this.tickCallbacks.map(c => c(this._currentTime)));\n }\n\n /** Pauses playback and notifies all pause listeners. */\n pause(): void {\n this._isPlaying = false;\n for (const cb of this.pauseCallbacks) cb();\n }\n\n /** Moves the playhead to `t` (seconds). Subclasses decide whether this also triggers a tick. */\n abstract seek(t: number): void;\n\n protected tickCallbacks: TickCallback[] = [];\n protected playCallbacks: PlayCallback[] = [];\n protected pauseCallbacks: (() => void)[] = [];\n protected timeCallbacks: TimeCallback[] = [];\n\n /** Clears all registered callbacks. Call when tearing down a scene to avoid memory leaks. */\n dispose() {\n this.tickCallbacks.length = 0;\n this.playCallbacks.length = 0;\n this.pauseCallbacks.length = 0;\n this.timeCallbacks.length = 0;\n }\n\n onTick(callback: TickCallback) {\n this.tickCallbacks.push(callback);\n }\n\n onPlay(callback: PlayCallback) {\n this.playCallbacks.push(callback);\n }\n\n onPause(callback: () => void) {\n this.pauseCallbacks.push(callback);\n }\n\n onTime(callback: TimeCallback) {\n this.timeCallbacks.push(callback);\n }\n}\n"]}
1
+ {"version":3,"file":"ticker.js","sourceRoot":"","sources":["../../src/platform/ticker.ts"],"names":[],"mappings":"AASA;;;;;;;;GAQG;AACH,MAAM,OAAgB,MAAM;IAChB,UAAU,GAAY,KAAK,CAAC;IAC5B,YAAY,GAAW,CAAC,CAAC;IACvB,SAAS,GAAW,CAAC,CAAC;IAEhC,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,WAAW,CAAC,QAAgB;QACxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACO,cAAc,CAAC,CAAS,EAAE,SAAkB,IAAI;QACtD,IAAI,IAAI,CAAC,YAAY,KAAK,CAAC;YAAE,OAAO;QACpC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,aAAa;YAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAES,UAAU,CAAC,OAAgB;QACjC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;IAC9B,CAAC;IAED,IAAI,CAAC,KAAa,EAAE,OAAgB;QAChC,IAAI,CAAC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,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;CACJ","sourcesContent":["/** Called every animation frame with the current playhead time (seconds). Must return a Promise so the clock can await all renderers before advancing. */\nexport type TickCallback = (time: number) => Promise<void>;\n\n/** Fired when playback starts. Receives the time at which playback began, the playback speed multiplier, and whether playback is reversed. */\nexport type PlayCallback = (time: number, speed: number, reverse: boolean) => void;\n\n/** Fired when the playhead reaches a new frame: once per frame, not per animation frame (see {@link Ticker.setCurrentTime}), so a rAF-driven subclass on a high-refresh display keeps the extra positions to itself. */\nexport type TimeCallback = (time: number) => void;\n\n/**\n * Platform-agnostic base for driving playback. Subclasses implement the frame loop (rAF in the browser, a setInterval\n * in Node) and call `setCurrentTime` / `tick`; `Ticker` owns the subscriber lists and shared playback state. Register\n * listeners via `onTick` / `onPlay` / `onPause` / `onTime`, set `setDuration`, and `dispose` when done.\n *\n * `play`, `pause` and `seek` take effect before they return, so any order of them in one turn leaves the clock where\n * the last one put it. A time listener or tick callback may `seek` (a host looping wraps to the start when it hears the\n * end), so a subclass must read the end of a run again afterwards. At the end of a run it reports a final tick and pauses.\n */\nexport abstract class Ticker {\n private _isPlaying: boolean = false;\n private _currentTime: number = 0;\n protected _duration: number = 0;\n\n get isPlaying(): boolean {\n return this._isPlaying;\n }\n\n get currentTime(): number {\n return this._currentTime;\n }\n\n get duration(): number {\n return this._duration;\n }\n\n setDuration(duration: number): void {\n this._duration = duration;\n }\n\n /**\n * Updates the playhead and notifies time listeners; no-ops if the time hasn't changed. `notify: false` keeps the\n * clock exact (`pause`/`play` anchor their elapsed-time maths on it, so it advances every loop frame) while keeping\n * subscribers quiet: a subclass that knows its frame rate fires {@link onTime} once per frame, not per animation\n * frame (on a 144Hz display that was a React render per refresh to drive a 60fps render).\n */\n protected setCurrentTime(t: number, notify: boolean = true): void {\n if (this._currentTime === t) return;\n this._currentTime = t;\n if (!notify) return;\n for (const cb of this.timeCallbacks) cb(t);\n }\n\n protected setPlaying(playing: boolean): void {\n this._isPlaying = playing;\n }\n\n play(speed: number, reverse: boolean): void {\n this._isPlaying = true;\n for (const cb of this.playCallbacks) cb(this._currentTime, speed, reverse);\n }\n\n /** Awaits all tick callbacks in parallel. Subclasses call this once per frame after updating `currentTime`. */\n protected async tick(): Promise<void> {\n await Promise.all(this.tickCallbacks.map(c => c(this._currentTime)));\n }\n\n pause(): void {\n this._isPlaying = false;\n for (const cb of this.pauseCallbacks) cb();\n }\n\n /** Moves the playhead to `t` (seconds). Subclasses decide whether this also triggers a tick. */\n abstract seek(t: number): void;\n\n protected tickCallbacks: TickCallback[] = [];\n protected playCallbacks: PlayCallback[] = [];\n protected pauseCallbacks: (() => void)[] = [];\n protected timeCallbacks: TimeCallback[] = [];\n\n /** Clears all registered callbacks. Call when tearing down a scene to avoid memory leaks. */\n dispose() {\n this.tickCallbacks.length = 0;\n this.playCallbacks.length = 0;\n this.pauseCallbacks.length = 0;\n this.timeCallbacks.length = 0;\n }\n\n onTick(callback: TickCallback) {\n this.tickCallbacks.push(callback);\n }\n\n onPlay(callback: PlayCallback) {\n this.playCallbacks.push(callback);\n }\n\n onPause(callback: () => void) {\n this.pauseCallbacks.push(callback);\n }\n\n onTime(callback: TimeCallback) {\n this.timeCallbacks.push(callback);\n }\n}\n"]}
@@ -1,25 +1,15 @@
1
1
  import { Color } from "../attributes/shape/fill/color/parser.js";
2
2
  import type { TextStyle } from "../attributes/text/types.js";
3
- /** A color token: a resolvable {@link Color}, or a nested group of them. Groups
4
- * flatten to dash-joined names — `{ brand: { 500: … } }` → `brand-500`. */
3
+ /** A color token: a resolvable {@link Color}, or a nested group flattened to dash-joined names (`{ brand: { 500: … } }` → `brand-500`). */
5
4
  export type ColorToken = Color | ColorGroup;
6
5
  export interface ColorGroup {
7
6
  [key: string]: ColorToken;
8
7
  }
9
- /** Named color tokens, possibly nested into groups. Referenced by their
10
- * (flattened) name in any `fill`/`stroke` string. */
8
+ /** Named color tokens, possibly nested, referenced by flattened name in any `fill`/`stroke` string. */
11
9
  export type ColorTokens = Record<string, ColorToken>;
12
- /** A named text-style preset referenced by a `Text`/`RichText` `variant` prop.
13
- * Each field it sets supplies that style key to a variant'd node (unless the
14
- * author set it explicitly). Same shape as the `<DefaultTextStyle>` defaults. */
10
+ /** A named text-style preset for a `Text`/`RichText` `variant`: each field it sets supplies that style key unless the author set it. Same shape as `<DefaultTextStyle>` defaults. */
15
11
  export type TypographyPreset = TextStyle;
16
- /** Named typography presets, keyed by variant name (e.g. `header`, `body`).
17
- * The `default` key is reserved: if present, it's applied to every `Text`/
18
- * `RichText` as a project-wide base style — no `variant` prop or
19
- * `<DefaultTextStyle>` wrapper needed — for any style key a more specific
20
- * source (explicit prop, `variant`, inherited `<DefaultTextStyle>`) doesn't
21
- * set. Declared as an explicit property (rather than folded into the index
22
- * signature) so editors offer it in autocomplete. */
12
+ /** Typography presets keyed by variant name. `default` is reserved: applied to every `Text`/`RichText` as a project-wide base for any key a more specific source (explicit prop, `variant`, `<DefaultTextStyle>`) doesn't set. Declared explicitly (not folded into the index signature) so editors autocomplete it. */
23
13
  export type Typography = {
24
14
  default?: TypographyPreset;
25
15
  } & Record<string, TypographyPreset>;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/project/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;4EAC4E;AAC5E,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,UAAU,CAAC;AAC5C,MAAM,WAAW,UAAU;IAAG,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAAE;AAE1D;sDACsD;AACtD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD;;kFAEkF;AAClF,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEzC;;;;;;sDAMsD;AACtD,MAAM,MAAM,UAAU,GAAG;IAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE3F,sEAAsE;AACtE,MAAM,WAAW,KAAK;IAClB,yEAAyE;IACzE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/project/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,2IAA2I;AAC3I,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,UAAU,CAAC;AAC5C,MAAM,WAAW,UAAU;IAAG,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAAE;AAE1D,uGAAuG;AACvG,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,qLAAqL;AACrL,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEzC,wTAAwT;AACxT,MAAM,MAAM,UAAU,GAAG;IAAE,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE3F,sEAAsE;AACtE,MAAM,WAAW,KAAK;IAClB,yEAAyE;IACzE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/project/config.ts"],"names":[],"mappings":"","sourcesContent":["import { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { TextStyle } from \"@/attributes/text/types\";\n\n/** A color token: a resolvable {@link Color}, or a nested group of them. Groups\n * flatten to dash-joined names — `{ brand: { 500: … } }` → `brand-500`. */\nexport type ColorToken = Color | ColorGroup;\nexport interface ColorGroup { [key: string]: ColorToken; }\n\n/** Named color tokens, possibly nested into groups. Referenced by their\n * (flattened) name in any `fill`/`stroke` string. */\nexport type ColorTokens = Record<string, ColorToken>;\n\n/** A named text-style preset referenced by a `Text`/`RichText` `variant` prop.\n * Each field it sets supplies that style key to a variant'd node (unless the\n * author set it explicitly). Same shape as the `<DefaultTextStyle>` defaults. */\nexport type TypographyPreset = TextStyle;\n\n/** Named typography presets, keyed by variant name (e.g. `header`, `body`).\n * The `default` key is reserved: if present, it's applied to every `Text`/\n * `RichText` as a project-wide base style — no `variant` prop or\n * `<DefaultTextStyle>` wrapper needed — for any style key a more specific\n * source (explicit prop, `variant`, inherited `<DefaultTextStyle>`) doesn't\n * set. Declared as an explicit property (rather than folded into the index\n * signature) so editors offer it in autocomplete. */\nexport type Typography = { default?: TypographyPreset } & Record<string, TypographyPreset>;\n\n/** The visual design tokens — color tokens and typography presets. */\nexport interface Theme {\n /** Named color tokens (possibly grouped) for `fill`/`stroke` strings. */\n colors?: ColorTokens;\n /** Named text-style presets selected via a `Text`/`RichText` `variant`. */\n typography?: Typography;\n}\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/project/config.ts"],"names":[],"mappings":"","sourcesContent":["import { Color } from \"@/attributes/shape/fill/color/parser\";\nimport type { TextStyle } from \"@/attributes/text/types\";\n\n/** A color token: a resolvable {@link Color}, or a nested group flattened to dash-joined names (`{ brand: { 500: … } }` → `brand-500`). */\nexport type ColorToken = Color | ColorGroup;\nexport interface ColorGroup { [key: string]: ColorToken; }\n\n/** Named color tokens, possibly nested, referenced by flattened name in any `fill`/`stroke` string. */\nexport type ColorTokens = Record<string, ColorToken>;\n\n/** A named text-style preset for a `Text`/`RichText` `variant`: each field it sets supplies that style key unless the author set it. Same shape as `<DefaultTextStyle>` defaults. */\nexport type TypographyPreset = TextStyle;\n\n/** Typography presets keyed by variant name. `default` is reserved: applied to every `Text`/`RichText` as a project-wide base for any key a more specific source (explicit prop, `variant`, `<DefaultTextStyle>`) doesn't set. Declared explicitly (not folded into the index signature) so editors autocomplete it. */\nexport type Typography = { default?: TypographyPreset } & Record<string, TypographyPreset>;\n\n/** The visual design tokens — color tokens and typography presets. */\nexport interface Theme {\n /** Named color tokens (possibly grouped) for `fill`/`stroke` strings. */\n colors?: ColorTokens;\n /** Named text-style presets selected via a `Text`/`RichText` `variant`. */\n typography?: Typography;\n}\n"]}
@@ -1,28 +1,15 @@
1
- /**
2
- * Structural key for a node within its scene: the child-index path from the
3
- * scene root, joined with ".". The root is "". Not every node has an authored id
4
- * — the children a composite node builds for itself get a UUID apiece — so
5
- * lifespan tracking keys on this instead, which every node has. The build is
6
- * deterministic, so the same structural slot maps to the same path in both the
7
- * precomp pass and playback.
8
- */
1
+ /** Structural key for a node within its scene: the child-index path from the scene root joined with "." (root is ""). Not every node has an authored id (children a composite builds get a UUID), so lifespan tracking keys on this; the build is deterministic, so a slot has the same path in precomp and playback. */
9
2
  /** @internal */
10
3
  export declare function nodePath(parentPath: string, childIndex: number): string;
11
4
  /** @internal */
12
5
  export interface NodeState {
13
6
  id: string;
14
7
  type: string;
15
- /** Attribute overrides applied when this state is active. */
16
8
  properties: Record<string, any>;
17
9
  }
18
- /**
19
- * A single audio clip exposed by a node for timeline display. Times are in
20
- * clip seconds; `src` is the (fetchable) audio source path. Nodes that own
21
- * audio — e.g. a Scene with managed sounds — report one entry per play range.
22
- */
10
+ /** A single audio clip a node exposes for timeline display, in clip seconds; `src` is the fetchable source. */
23
11
  /** @internal */
24
12
  export interface WaveformInfo {
25
- /** Fetchable audio source path / URL. */
26
13
  src: string;
27
14
  /** Clip timestamp (seconds) when the clip starts. */
28
15
  startTime: number;
@@ -30,33 +17,17 @@ export interface WaveformInfo {
30
17
  endTime: number | null;
31
18
  }
32
19
  export interface TreeState {
33
- /**
34
- * The node's `NodeSpec.id` when it came from a document row, otherwise a
35
- * per-instance UUID — so it survives a rebuild for an authored node and
36
- * changes for one a composite built for itself. {@link path} is the key that
37
- * is stable for both.
38
- */
20
+ /** The node's `NodeSpec.id` for a document row, else a per-instance UUID (changes on rebuild for a composite-built node; {@link path} is stable for both). */
39
21
  id: string;
40
- /**
41
- * Structural path from the scene root (`""` for the root, `"0.2"` for the
42
- * third child of the first). Stable across rebuilds for every node, authored
43
- * or not, so a host can key selection, expansion, and overrides on it. It is
44
- * also what `getNodeBox` / `setNodeOverride` accept.
45
- */
22
+ /** Structural path from the scene root (`""` root, `"0.2"` third child of the first), stable across rebuilds for every node so a host can key selection and overrides on it; what `getNodeBox` / `setNodeOverride` accept. */
46
23
  path: string;
47
24
  type: string;
48
25
  meta?: Record<string, unknown>;
49
26
  /** Audio clips owned by this node, for waveform rendering in the timeline. */
50
27
  waveform?: WaveformInfo[];
51
- /**
52
- * Absolute timeline frame (across the whole video) at which this node first
53
- * appears. Undefined when its lifespan is unknown (e.g. no precomp data).
54
- */
28
+ /** Absolute timeline frame at which this node first appears; undefined when unknown (no precomp data). */
55
29
  startFrame?: number;
56
- /**
57
- * Absolute timeline frame at which this node was last present. Together with
58
- * startFrame this bounds the node's track bar to its true lifespan.
59
- */
30
+ /** Absolute timeline frame at which this node was last present; with startFrame bounds the track bar to its true lifespan. */
60
31
  endFrame?: number;
61
32
  children: TreeState[];
62
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/project/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,gBAAgB;AAChB,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,gBAAgB;AAChB,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAGnC;AA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X,8NAA8N;IAC9N,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8HAA8H;IAC9H,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACzB"}
@@ -1,11 +1,4 @@
1
- /**
2
- * Structural key for a node within its scene: the child-index path from the
3
- * scene root, joined with ".". The root is "". Not every node has an authored id
4
- * — the children a composite node builds for itself get a UUID apiece — so
5
- * lifespan tracking keys on this instead, which every node has. The build is
6
- * deterministic, so the same structural slot maps to the same path in both the
7
- * precomp pass and playback.
8
- */
1
+ /** Structural key for a node within its scene: the child-index path from the scene root joined with "." (root is ""). Not every node has an authored id (children a composite builds get a UUID), so lifespan tracking keys on this; the build is deterministic, so a slot has the same path in precomp and playback. */
9
2
  /** @internal */
10
3
  export function nodePath(parentPath, childIndex) {
11
4
  return parentPath === "" ? String(childIndex) : `${parentPath}.${childIndex}`;
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/project/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,gBAAgB;AAChB,MAAM,UAAU,QAAQ,CAAC,UAAkB,EAAE,UAAkB;IAC3D,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,UAAU,EAAE,CAAC;AAClF,CAAC","sourcesContent":["/**\n * Structural key for a node within its scene: the child-index path from the\n * scene root, joined with \".\". The root is \"\". Not every node has an authored id\n * — the children a composite node builds for itself get a UUID apiece — so\n * lifespan tracking keys on this instead, which every node has. The build is\n * deterministic, so the same structural slot maps to the same path in both the\n * precomp pass and playback.\n */\n/** @internal */\nexport function nodePath(parentPath: string, childIndex: number): string {\n return parentPath === \"\" ? String(childIndex) : `${parentPath}.${childIndex}`;\n}\n\n/** @internal */\nexport interface NodeState {\n id: string;\n type: string;\n /** Attribute overrides applied when this state is active. */\n properties: Record<string, any>;\n\n\n}\n\n/**\n * A single audio clip exposed by a node for timeline display. Times are in\n * clip seconds; `src` is the (fetchable) audio source path. Nodes that own\n * audio — e.g. a Scene with managed sounds — report one entry per play range.\n */\n/** @internal */\nexport interface WaveformInfo {\n /** Fetchable audio source path / URL. */\n src: string;\n /** Clip timestamp (seconds) when the clip starts. */\n startTime: number;\n /** Clip timestamp (seconds) when the clip ends, or null if open-ended. */\n endTime: number | null;\n}\n\nexport interface TreeState {\n /**\n * The node's `NodeSpec.id` when it came from a document row, otherwise a\n * per-instance UUID — so it survives a rebuild for an authored node and\n * changes for one a composite built for itself. {@link path} is the key that\n * is stable for both.\n */\n id: string;\n /**\n * Structural path from the scene root (`\"\"` for the root, `\"0.2\"` for the\n * third child of the first). Stable across rebuilds for every node, authored\n * or not, so a host can key selection, expansion, and overrides on it. It is\n * also what `getNodeBox` / `setNodeOverride` accept.\n */\n path: string;\n type: string;\n meta?: Record<string, unknown>;\n /** Audio clips owned by this node, for waveform rendering in the timeline. */\n waveform?: WaveformInfo[];\n /**\n * Absolute timeline frame (across the whole video) at which this node first\n * appears. Undefined when its lifespan is unknown (e.g. no precomp data).\n */\n startFrame?: number;\n /**\n * Absolute timeline frame at which this node was last present. Together with\n * startFrame this bounds the node's track bar to its true lifespan.\n */\n endFrame?: number;\n children: TreeState[];\n}"]}
1
+ {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../src/project/tree.ts"],"names":[],"mappings":"AAAA,yTAAyT;AACzT,gBAAgB;AAChB,MAAM,UAAU,QAAQ,CAAC,UAAkB,EAAE,UAAkB;IAC3D,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,UAAU,EAAE,CAAC;AAClF,CAAC","sourcesContent":["/** Structural key for a node within its scene: the child-index path from the scene root joined with \".\" (root is \"\"). Not every node has an authored id (children a composite builds get a UUID), so lifespan tracking keys on this; the build is deterministic, so a slot has the same path in precomp and playback. */\n/** @internal */\nexport function nodePath(parentPath: string, childIndex: number): string {\n return parentPath === \"\" ? String(childIndex) : `${parentPath}.${childIndex}`;\n}\n\n/** @internal */\nexport interface NodeState {\n id: string;\n type: string;\n properties: Record<string, any>;\n\n\n}\n\n/** A single audio clip a node exposes for timeline display, in clip seconds; `src` is the fetchable source. */\n/** @internal */\nexport interface WaveformInfo {\n src: string;\n /** Clip timestamp (seconds) when the clip starts. */\n startTime: number;\n /** Clip timestamp (seconds) when the clip ends, or null if open-ended. */\n endTime: number | null;\n}\n\nexport interface TreeState {\n /** The node's `NodeSpec.id` for a document row, else a per-instance UUID (changes on rebuild for a composite-built node; {@link path} is stable for both). */\n id: string;\n /** Structural path from the scene root (`\"\"` root, `\"0.2\"` third child of the first), stable across rebuilds for every node so a host can key selection and overrides on it; what `getNodeBox` / `setNodeOverride` accept. */\n path: string;\n type: string;\n meta?: Record<string, unknown>;\n /** Audio clips owned by this node, for waveform rendering in the timeline. */\n waveform?: WaveformInfo[];\n /** Absolute timeline frame at which this node first appears; undefined when unknown (no precomp data). */\n startFrame?: number;\n /** Absolute timeline frame at which this node was last present; with startFrame bounds the track bar to its true lifespan. */\n endFrame?: number;\n children: TreeState[];\n}"]}
@@ -2,17 +2,7 @@ import { PropLayout } from "./layout.js";
2
2
  import { PropSlot } from "./slot.js";
3
3
  /** @internal */
4
4
  export type TweenFn<T> = (from: T, to: T, t: number) => T;
5
- /**
6
- * The slots behind an object's `property`-declared fields, plus the per-field
7
- * metadata `set()` and `to()` route through.
8
- *
9
- * One object rather than three loose maps on the host, because the host is a
10
- * `Node` and every public field it carries is published API. Grouping them
11
- * means a node exposes one internal name instead of three, and gives the thing
12
- * a name a reader can look up.
13
- *
14
- * @internal
15
- */
5
+ /** The slots behind an object's `property`-declared fields plus the per-field metadata `set()` and `to()` route through. One object rather than three loose maps because every public field on the host (a `Node`) is published API. @internal */
16
6
  export interface PropCells {
17
7
  /** Field → its live slot. Present for every registered prop. */
18
8
  slots: Map<string, PropSlot<any>>;
@@ -27,8 +17,7 @@ export interface PropCells {
27
17
  }
28
18
  /** @internal */
29
19
  export interface PropHost {
30
- /** See {@link PropCells}. Absent until the first prop is registered, and
31
- * cleared by `dispose()`. */
20
+ /** See {@link PropCells}. Absent until the first prop is registered; cleared by `dispose()`. */
32
21
  __cells?: PropCells;
33
22
  }
34
23
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,gBAAgB;AAChB,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACtB,gEAAgE;IAChE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,2EAA2E;IAC3E,MAAM,EAAE,UAAU,CAAC;IACnB,+EAA+E;IAC/E,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC;IACpC,0EAA0E;IAC1E,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,mFAAmF;IACnF,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,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ACrB,gGAAgG;IAChG,OAAO,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,CAElF;AAED,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,CAGpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAqCtC,gBAAgB;AAChB,MAAM,UAAU,WAAW,CAAC,GAAa,EAAE,IAAY;IACnD,OAAO,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,WAAW,CAAC,GAAa;IACrC,mHAAmH;IACnH,OAAO,GAAG,CAAC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAW,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAC9J,CAAC","sourcesContent":["import { PropLayout } from \"./layout\";\nimport { PropSlot } from \"./slot\";\n\n/** @internal */\nexport type TweenFn<T> = (from: T, to: T, t: number) => T;\n\n/**\n * The slots behind an object's `property`-declared fields, plus the per-field\n * metadata `set()` and `to()` route through.\n *\n * One object rather than three loose maps on the host, because the host is a\n * `Node` and every public field it carries is published API. Grouping them\n * means a node exposes one internal name instead of three, and gives the thing\n * a name a reader can look up.\n *\n * @internal\n */\nexport interface PropCells {\n /** Field → its live slot. Present for every registered prop. */\n slots: Map<string, PropSlot<any>>;\n /** The host class's prop indices; {@link list} holds its slots by them. */\n layout: PropLayout;\n /** Field → its slot, by {@link layout} index: what the prop accessors read. */\n list: (PropSlot<any> | undefined)[];\n /** Field → how it interpolates, for props a numeric lerp cannot cover. */\n tweens?: Map<string, TweenFn<any>>;\n /** Field → external prop value to internal slot value, for fields that need it. */\n mappers?: Map<string, (ext: any, prev?: any) => any>;\n}\n\n/** @internal */\nexport interface PropHost {\n /** See {@link PropCells}. Absent until the first prop is registered, and\n * cleared by `dispose()`. */\n __cells?: PropCells;\n}\n\n/** @internal */\nexport function getPropSlot(obj: PropHost, name: string): PropSlot<any> | undefined {\n return obj.__cells?.slots.get(name);\n}\n\n/** The host's slots, created on first use. @internal */\nexport function ensureCells(obj: PropHost): PropCells {\n // Every field from the start, so all cells share one shape and the prop accessors' reads of them stay monomorphic.\n return obj.__cells ??= { slots: new Map(), layout: PropLayout.of(Object.getPrototypeOf(obj) as object), list: [], tweens: undefined, mappers: undefined };\n}\n"]}
1
+ {"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/props/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA0BtC,gBAAgB;AAChB,MAAM,UAAU,WAAW,CAAC,GAAa,EAAE,IAAY;IACnD,OAAO,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,WAAW,CAAC,GAAa;IACrC,mHAAmH;IACnH,OAAO,GAAG,CAAC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAW,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAC9J,CAAC","sourcesContent":["import { PropLayout } from \"./layout\";\nimport { PropSlot } from \"./slot\";\n\n/** @internal */\nexport type TweenFn<T> = (from: T, to: T, t: number) => T;\n\n/** The slots behind an object's `property`-declared fields plus the per-field metadata `set()` and `to()` route through. One object rather than three loose maps because every public field on the host (a `Node`) is published API. @internal */\nexport interface PropCells {\n /** Field → its live slot. Present for every registered prop. */\n slots: Map<string, PropSlot<any>>;\n /** The host class's prop indices; {@link list} holds its slots by them. */\n layout: PropLayout;\n /** Field → its slot, by {@link layout} index: what the prop accessors read. */\n list: (PropSlot<any> | undefined)[];\n /** Field → how it interpolates, for props a numeric lerp cannot cover. */\n tweens?: Map<string, TweenFn<any>>;\n /** Field → external prop value to internal slot value, for fields that need it. */\n mappers?: Map<string, (ext: any, prev?: any) => any>;\n}\n\n/** @internal */\nexport interface PropHost {\n /** See {@link PropCells}. Absent until the first prop is registered; cleared by `dispose()`. */\n __cells?: PropCells;\n}\n\n/** @internal */\nexport function getPropSlot(obj: PropHost, name: string): PropSlot<any> | undefined {\n return obj.__cells?.slots.get(name);\n}\n\n/** The host's slots, created on first use. @internal */\nexport function ensureCells(obj: PropHost): PropCells {\n // Every field from the start, so all cells share one shape and the prop accessors' reads of them stay monomorphic.\n return obj.__cells ??= { slots: new Map(), layout: PropLayout.of(Object.getPrototypeOf(obj) as object), list: [], tweens: undefined, mappers: undefined };\n}\n"]}
@@ -1,15 +1,4 @@
1
- /**
2
- * Where each prop of one node class sits in its instances' slot lists, and the
3
- * accessors that read it, defined once on the class's prototype.
4
- *
5
- * On the prototype rather than on each instance, so every node of a type shares
6
- * one hidden class and a prop read in layout or render stays monomorphic. The
7
- * accessors reach their slot by index: closures made at one site share their
8
- * feedback, so a lookup by name inside one would see every prop of every class.
9
- *
10
- * An instance that has not registered a field, or a prototype that already
11
- * defines one itself, reads and writes as if the accessor were not there.
12
- */
1
+ /** Where each prop of one node class sits in its instances' slot lists, and the accessors that read it, defined once on the class's prototype so every node of a type shares one hidden class and a prop read in layout or render stays monomorphic. Accessors reach their slot by index (closures made at one site share feedback, so a lookup by name would see every prop of every class). An instance that hasn't registered a field, or a prototype that already defines one, reads and writes as if the accessor were absent. */
13
2
  export declare class PropLayout {
14
3
  private readonly _proto;
15
4
  static of(proto: object): PropLayout;
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/props/layout.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IAmCC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAlC3C,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAMpC,iEAAiE;IACjE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI9B,oFAAoF;IACpF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAiB5B,wEAAwE;IACxE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAI5C,OAAO;IAIP,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C,OAAO,CAAC,OAAO;IAWf,OAAO,CAAC,OAAO;CAclB"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/props/layout.ts"],"names":[],"mappings":"AAUA,ugBAAugB;AACvgB,qBAAa,UAAU;IAmCC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAlC3C,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAMpC,iEAAiE;IACjE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI9B,oFAAoF;IACpF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAiB5B,wEAAwE;IACxE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAI5C,OAAO;IAIP,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C,OAAO,CAAC,OAAO;IAWf,OAAO,CAAC,OAAO;CAclB"}
@@ -1,16 +1,5 @@
1
1
  const LAYOUTS = new WeakMap();
2
- /**
3
- * Where each prop of one node class sits in its instances' slot lists, and the
4
- * accessors that read it, defined once on the class's prototype.
5
- *
6
- * On the prototype rather than on each instance, so every node of a type shares
7
- * one hidden class and a prop read in layout or render stays monomorphic. The
8
- * accessors reach their slot by index: closures made at one site share their
9
- * feedback, so a lookup by name inside one would see every prop of every class.
10
- *
11
- * An instance that has not registered a field, or a prototype that already
12
- * defines one itself, reads and writes as if the accessor were not there.
13
- */
2
+ /** Where each prop of one node class sits in its instances' slot lists, and the accessors that read it, defined once on the class's prototype so every node of a type shares one hidden class and a prop read in layout or render stays monomorphic. Accessors reach their slot by index (closures made at one site share feedback, so a lookup by name would see every prop of every class). An instance that hasn't registered a field, or a prototype that already defines one, reads and writes as if the accessor were absent. */
14
3
  export class PropLayout {
15
4
  _proto;
16
5
  static of(proto) {
@@ -1 +1 @@
1
- {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/props/layout.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,GAAG,IAAI,OAAO,EAAsB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,UAAU;IAmCkB;IAlCrC,MAAM,CAAC,EAAE,CAAC,KAAa;QACnB,IAAI,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,iEAAiE;IACjE,OAAO,CAAC,KAAa;QACjB,OAAO,IAAI,CAAC,MAAM,C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;iBAAM,CAAC;gBACJ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;YACxG,CAAC;QACL,CAAC,CAAC;IACN,CAAC;CACJ","sourcesContent":["import type { PropSlot } from \"./slot\";\n\n/** What a prop accessor reads its slots from and writes through. */\ninterface LaidOutHost {\n __cells?: { layout: PropLayout; list: readonly (PropSlot<unknown> | undefined)[] };\n _writeProp?(field: string, value: unknown): void;\n}\n\nconst LAYOUTS = new WeakMap<object, PropLayout>();\n\n/**\n * Where each prop of one node class sits in its instances' slot lists, and the\n * accessors that read it, defined once on the class's prototype.\n *\n * On the prototype rather than on each instance, so every node of a type shares\n * one hidden class and a prop read in layout or render stays monomorphic. The\n * accessors reach their slot by index: closures made at one site share their\n * feedback, so a lookup by name inside one would see every prop of every class.\n *\n * An instance that has not registered a field, or a prototype that already\n * defines one itself, reads and writes as if the accessor were not there.\n */\nexport class PropLayout {\n static of(proto: object): PropLayout {\n let layout = LAYOUTS.get(proto);\n if (!layout) LAYOUTS.set(proto, (layout = new PropLayout(proto)));\n return layout;\n }\n\n /** `field`'s index, or -1 when no instance has registered it. */\n indexOf(field: string): number {\n return this._index.get(field) ?? -1;\n }\n\n /** `field`'s index, given its accessor the first time any instance registers it. */\n place(field: string): number {\n let i = this._index.get(field);\n if (i !== undefined) return i;\n this._index.set(field, (i = this._index.size));\n if (Object.prototype.hasOwnProperty.call(this._proto, field)) {\n this._foreign.add(field);\n } else {\n Object.defineProperty(this._proto, field, {\n get: this._getter(i, field),\n set: this._setter(i, field),\n enumerable: true,\n configurable: true,\n });\n }\n return i;\n }\n\n /** Whether reading `field` on `host` reaches this layout's accessor. */\n serves(host: object, field: string): boolean {\n return !this._foreign.has(field) && !Object.prototype.hasOwnProperty.call(host, field);\n }\n\n private constructor(private readonly _proto: object) {\n this._parent = Object.getPrototypeOf(_proto) as object | null;\n }\n\n private readonly _parent: object | null;\n private readonly _index = new Map<string, number>();\n private readonly _foreign = new Set<string>();\n\n private _getter(i: number, field: string): (this: LaidOutHost) => unknown {\n const layout = this;\n const parent = this._parent;\n return function () {\n const cells = this.__cells;\n const slot = cells !== undefined && cells.layout === layout ? cells.list[i] : undefined;\n if (slot !== undefined) return slot.get();\n return parent === null ? undefined : Reflect.get(parent, field, this);\n };\n }\n\n private _setter(i: number, field: string): (this: LaidOutHost, value: unknown) => void {\n const layout = this;\n const parent = this._parent;\n return function (value) {\n const cells = this.__cells;\n if (cells !== undefined && cells.layout === layout && cells.list[i] !== undefined) {\n this._writeProp!(field, value);\n } else if (parent !== null) {\n Reflect.set(parent, field, value, this);\n } else {\n Object.defineProperty(this, field, { value, writable: true, enumerable: true, configurable: true });\n }\n };\n }\n}\n"]}
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/props/layout.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,GAAG,IAAI,OAAO,EAAsB,CAAC;AAElD,ugBAAugB;AACvgB,MAAM,OAAO,UAAU;IAmCkB;IAlCrC,MAAM,CAAC,EAAE,CAAC,KAAa;QACnB,IAAI,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM;YAAE,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,iEAAiE;IACjE,OAAO,CAAC,KAAa;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,oFAAoF;IACpF,KAAK,CAAC,KAAa;QACf,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC/B,IA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,CAAC,CAAC;IACN,CAAC;CACJ","sourcesContent":["import type { PropSlot } from \"./slot\";\n\n/** What a prop accessor reads its slots from and writes through. */\ninterface LaidOutHost {\n __cells?: { layout: PropLayout; list: readonly (PropSlot<unknown> | undefined)[] };\n _writeProp?(field: string, value: unknown): void;\n}\n\nconst LAYOUTS = new WeakMap<object, PropLayout>();\n\n/** Where each prop of one node class sits in its instances' slot lists, and the accessors that read it, defined once on the class's prototype so every node of a type shares one hidden class and a prop read in layout or render stays monomorphic. Accessors reach their slot by index (closures made at one site share feedback, so a lookup by name would see every prop of every class). An instance that hasn't registered a field, or a prototype that already defines one, reads and writes as if the accessor were absent. */\nexport class PropLayout {\n static of(proto: object): PropLayout {\n let layout = LAYOUTS.get(proto);\n if (!layout) LAYOUTS.set(proto, (layout = new PropLayout(proto)));\n return layout;\n }\n\n /** `field`'s index, or -1 when no instance has registered it. */\n indexOf(field: string): number {\n return this._index.get(field) ?? -1;\n }\n\n /** `field`'s index, given its accessor the first time any instance registers it. */\n place(field: string): number {\n let i = this._index.get(field);\n if (i !== undefined) return i;\n this._index.set(field, (i = this._index.size));\n if (Object.prototype.hasOwnProperty.call(this._proto, field)) {\n this._foreign.add(field);\n } else {\n Object.defineProperty(this._proto, field, {\n get: this._getter(i, field),\n set: this._setter(i, field),\n enumerable: true,\n configurable: true,\n });\n }\n return i;\n }\n\n /** Whether reading `field` on `host` reaches this layout's accessor. */\n serves(host: object, field: string): boolean {\n return !this._foreign.has(field) && !Object.prototype.hasOwnProperty.call(host, field);\n }\n\n private constructor(private readonly _proto: object) {\n this._parent = Object.getPrototypeOf(_proto) as object | null;\n }\n\n private readonly _parent: object | null;\n private readonly _index = new Map<string, number>();\n private readonly _foreign = new Set<string>();\n\n private _getter(i: number, field: string): (this: LaidOutHost) => unknown {\n const layout = this;\n const parent = this._parent;\n return function () {\n const cells = this.__cells;\n const slot = cells !== undefined && cells.layout === layout ? cells.list[i] : undefined;\n if (slot !== undefined) return slot.get();\n return parent === null ? undefined : Reflect.get(parent, field, this);\n };\n }\n\n private _setter(i: number, field: string): (this: LaidOutHost, value: unknown) => void {\n const layout = this;\n const parent = this._parent;\n return function (value) {\n const cells = this.__cells;\n if (cells !== undefined && cells.layout === layout && cells.list[i] !== undefined) {\n this._writeProp!(field, value);\n } else if (parent !== null) {\n Reflect.set(parent, field, value, this);\n } else {\n Object.defineProperty(this, field, { value, writable: true, enumerable: true, configurable: true });\n }\n };\n }\n}\n"]}
@@ -1,11 +1,5 @@
1
1
  import { type PropSlot } from "./slot.js";
2
- /**
3
- * What the slots touched inside {@link observeSlots} are reported to.
4
- *
5
- * Reads and writes are recorded rather than declared: a dependency is whatever a
6
- * computation actually touched, bindings included, so nothing has to annotate a
7
- * prop as mattering to anyone.
8
- */
2
+ /** What the slots touched inside {@link observeSlots} are reported to. Reads and writes are recorded rather than declared: a dependency is whatever a computation actually touched, bindings included, so nothing annotates a prop as mattering to anyone. */
9
3
  export interface SlotObserver {
10
4
  read(slot: PropSlot<unknown>): void;
11
5
  write(slot: PropSlot<unknown>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"observer.d.ts","sourceRoot":"","sources":["../../src/props/observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACpC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,8FAA8F;IAC9F,KAAK,CAAC,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC/C;AAED,6DAA6D;AAC7D,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAC1C,qEAAqE;AACrE,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,6EAA6E;AAC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;AACtE,CAAC","sourcesContent":["import { _setObserver, type PropSlot } from \"./slot\";\n\n/**\n * What the slots touched inside {@link observeSlots} are reported to.\n *\n * Reads and writes are recorded rather than declared: a dependency is whatever a\n * computation actually touched, bindings included, so nothing has to annotate a\n * prop as mattering to anyone.\n */\nexport interface SlotObserver {\n read(slot: PropSlot<unknown>): void;\n write(slot: PropSlot<unknown>): void;\n /** A node's clock was read — a result that depends on it is not a function of slots alone. */\n clock?(host: { readonly id: string }): void;\n}\n\n/** The {@link PropSlot._name} of `Node2D`'s laid-out box. */\nexport const LAYOUT_SLOT = \"layoutBounds\";\n/** A document variable's slot is named this plus the variable id. */\nexport const VAR_PREFIX = \"var:\";\n/** A timeline node's presence pseudo-slot is named this plus the node id. */\nexport const PRESENCE_PREFIX = \"presence:\";\n/** A node's child list and parent link, as a pseudo-slot on that node. */\nexport const STRUCTURE_SLOT = \"structure\";\n\n/** Run `fn` with every slot read and write reported to `observer`. An inner scope shadows an outer one. */\nexport function observeSlots<T>(observer: SlotObserver, fn: () => T): T {\n const previous = _setObserver(observer);\n try {\n return fn();\n } finally {\n _setObserver(previous);\n }\n}\n\n/** Run `fn` with nothing observing, inside a scope that is. */\nexport function unobserved<T>(fn: () => T): T {\n const previous = _setObserver(null);\n try {\n return fn();\n } finally {\n _setObserver(previous);\n }\n}\n\n/** `\"card.x\"` for a node's prop, the bare name for a hostless slot (`\"var:g\"`). */\nexport function slotLabel(slot: PropSlot<unknown>): string {\n return slot._host ? `${slot._host.id}.${slot._name}` : slot._name;\n}\n"]}
1
+ {"version":3,"file":"observer.js","sourceRoot":"","sources":["../../src/props/observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,QAAQ,CAAC;AAUrD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AACjC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAC3C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;AAE1C,2GAA2G;AAC3G,MAAM,UAAU,YAAY,CAAI,QAAsB,EAAE,EAAW;IAC/D,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,CAAC;QACD,OAAO,EAAE,EAAE,CAAC;IAChB,CAAC;YAAS,CAAC;QACP,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;AACL,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,UAAU,CAAI,EAAW;IACrC,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC;QACD,OAAO,EAAE,EAAE,CAAC;IAChB,CAAC;YAAS,CAAC;QACP,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;AACL,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,SAAS,CAAC,IAAuB;IAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;AACtE,CAAC","sourcesContent":["import { _setObserver, type PropSlot } from \"./slot\";\n\n/** What the slots touched inside {@link observeSlots} are reported to. Reads and writes are recorded rather than declared: a dependency is whatever a computation actually touched, bindings included, so nothing annotates a prop as mattering to anyone. */\nexport interface SlotObserver {\n read(slot: PropSlot<unknown>): void;\n write(slot: PropSlot<unknown>): void;\n /** A node's clock was read — a result that depends on it is not a function of slots alone. */\n clock?(host: { readonly id: string }): void;\n}\n\n/** The {@link PropSlot._name} of `Node2D`'s laid-out box. */\nexport const LAYOUT_SLOT = \"layoutBounds\";\n/** A document variable's slot is named this plus the variable id. */\nexport const VAR_PREFIX = \"var:\";\n/** A timeline node's presence pseudo-slot is named this plus the node id. */\nexport const PRESENCE_PREFIX = \"presence:\";\n/** A node's child list and parent link, as a pseudo-slot on that node. */\nexport const STRUCTURE_SLOT = \"structure\";\n\n/** Run `fn` with every slot read and write reported to `observer`. An inner scope shadows an outer one. */\nexport function observeSlots<T>(observer: SlotObserver, fn: () => T): T {\n const previous = _setObserver(observer);\n try {\n return fn();\n } finally {\n _setObserver(previous);\n }\n}\n\n/** Run `fn` with nothing observing, inside a scope that is. */\nexport function unobserved<T>(fn: () => T): T {\n const previous = _setObserver(null);\n try {\n return fn();\n } finally {\n _setObserver(previous);\n }\n}\n\n/** `\"card.x\"` for a node's prop, the bare name for a hostless slot (`\"var:g\"`). */\nexport function slotLabel(slot: PropSlot<unknown>): string {\n return slot._host ? `${slot._host.id}.${slot._name}` : slot._name;\n}\n"]}
@@ -1,9 +1,5 @@
1
1
  import type { SlotObserver } from "./observer.js";
2
- /**
3
- * A captured state of a {@link PropSlot}: the thunk it was bound to, or the
4
- * plain value it held. Produced by {@link PropSlot.snapshot} and consumed by
5
- * {@link PropSlot.restoreFrom}.
6
- */
2
+ /** A captured state of a {@link PropSlot} (the thunk it was bound to, or the plain value), from {@link PropSlot.snapshot} to {@link PropSlot.restoreFrom}. */
7
3
  /** @internal */
8
4
  export interface PropSnapshot<T> {
9
5
  value: T;
@@ -18,20 +14,11 @@ export declare let _observer: SlotObserver | null;
18
14
  /** @internal Only this module can reassign the binding. Returns the observer it replaced. */
19
15
  export declare function _setObserver(observer: SlotObserver | null): SlotObserver | null;
20
16
  /**
21
- * The storage behind one `property`: a plain value, or a thunk evaluated on
22
- * every read.
23
- *
24
- * There is no dependency graph and nothing to invalidate. A bound slot
25
- * recomputes when it is asked, which is what makes a document expression
26
- * (`"=4[g]+3"`), an author's `width={() => …}` and an alignment binding reading
27
- * a box written mid-layout all correct without anything declaring an edge. The
28
- * cache-and-invalidate version of this could only get the last one right by
29
- * observing the write, and paid for it everywhere: a `peek()`/`get()` split at
30
- * every write path, so a read taken inside whatever computation happened to be
31
- * running did not register an edge with no business existing.
32
- *
33
- * The bet is that recomputing is cheaper than tracking. Bindings here are
34
- * arithmetic over a handful of reads, and a frame's draw dwarfs all of them.
17
+ * The storage behind one `property`: a plain value, or a thunk evaluated on every read. There is no dependency graph and
18
+ * nothing to invalidate: a bound slot recomputes when asked, so a document expression (`"=4[g]+3"`), an author's
19
+ * `width={() => …}` and an alignment binding reading a box written mid-layout are all correct without declaring an
20
+ * edge. (A cache-and-invalidate version could only get the last one right by observing the write, and paid for it at
21
+ * every write path.) The bet is that recomputing is cheaper than tracking: bindings are arithmetic over a few reads.
35
22
  */
36
23
  export declare class PropSlot<T> {
37
24
  readonly _host: {
@@ -1 +1 @@
1
- {"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../src/props/slot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;GAIG;AACH,gBAAgB;AAChB,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC;IACT,qFAAqF;IACrF,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,IAAI,SAAS,EAAE,YAAY,GAAG,IAAW,CAAC;AAEjD,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,YAAY,GAAG,IAAI,CAI/E;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,QAAQ,CAAC,CAAC;IAQf,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM;IAR1B,OAAO,CAAC,MAAM,CAAI;IAClB,OAAO,CAAC,GAAG,CAA0B;IACrC,OAAO,CAAC,QAAQ,CAAS;IAEzB,iFAAiF;gBAE7E,OAAO,EAAE,CAAC,EACD,KAAK,GAAE;QAAE,Q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AQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAW,EAC5C,KAAK,GAAE,MAAW;IAK/B,GAAG,IAAI,CAAC;IAgBR,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAMnB,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,GAAG,IAAI;IAKvB,yDAAyD;IACzD,MAAM,IAAI,IAAI;IAOd,OAAO,IAAI,OAAO;IAIlB,QAAQ,IAAI,YAAY,CAAC,CAAC,CAAC;IAI3B,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI;IAKxC,mFAAmF;IACnF,OAAO,IAAI,IAAI;CAIlB"}
@@ -10,20 +10,11 @@ export function _setObserver(observer) {
10
10
  return previous;
11
11
  }
12
12
  /**
13
- * The storage behind one `property`: a plain value, or a thunk evaluated on
14
- * every read.
15
- *
16
- * There is no dependency graph and nothing to invalidate. A bound slot
17
- * recomputes when it is asked, which is what makes a document expression
18
- * (`"=4[g]+3"`), an author's `width={() => …}` and an alignment binding reading
19
- * a box written mid-layout all correct without anything declaring an edge. The
20
- * cache-and-invalidate version of this could only get the last one right by
21
- * observing the write, and paid for it everywhere: a `peek()`/`get()` split at
22
- * every write path, so a read taken inside whatever computation happened to be
23
- * running did not register an edge with no business existing.
24
- *
25
- * The bet is that recomputing is cheaper than tracking. Bindings here are
26
- * arithmetic over a handful of reads, and a frame's draw dwarfs all of them.
13
+ * The storage behind one `property`: a plain value, or a thunk evaluated on every read. There is no dependency graph and
14
+ * nothing to invalidate: a bound slot recomputes when asked, so a document expression (`"=4[g]+3"`), an author's
15
+ * `width={() => …}` and an alignment binding reading a box written mid-layout are all correct without declaring an
16
+ * edge. (A cache-and-invalidate version could only get the last one right by observing the write, and paid for it at
17
+ * every write path.) The bet is that recomputing is cheaper than tracking: bindings are arithmetic over a few reads.
27
18
  */
28
19
  export class PropSlot {
29
20
  _host;
@@ -1 +1 @@
1
- {"version":3,"file":"slot.js","source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QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,EAAW;QACZ,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAClB,CAAC;IAED,yDAAyD;IACzD,MAAM;QACF,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC;IAC7B,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACnF,CAAC;IAED,WAAW,CAAC,IAAqB;QAC7B,IAAI,IAAI,CAAC,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;YAC3B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,mFAAmF;IACnF,OAAO;QACH,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,SAAyB,CAAC;IAC5C,CAAC;CACJ","sourcesContent":["import type { SlotObserver } from \"./observer\";\n\n/**\n * A captured state of a {@link PropSlot}: the thunk it was bound to, or the\n * plain value it held. Produced by {@link PropSlot.snapshot} and consumed by\n * {@link PropSlot.restoreFrom}.\n */\n/** @internal */\nexport interface PropSnapshot<T> {\n value: T;\n /** Present only for a bound slot; restoring one re-binds rather than freezing it. */\n fn?: () => T;\n}\n\n/**\n * @internal The observer every slot reports to, or `null` — which is every frame of\n * playback, so the hot path pays one null check. Installed by `observeSlots`.\n */\nexport let _observer: SlotObserver | null = null;\n\n/** @internal Only this module can reassign the binding. Returns the observer it replaced. */\nexport function _setObserver(observer: SlotObserver | null): SlotObserver | null {\n const previous = _observer;\n _observer = observer;\n return previous;\n}\n\n/**\n * The storage behind one `property`: a plain value, or a thunk evaluated on\n * every read.\n *\n * There is no dependency graph and nothing to invalidate. A bound slot\n * recomputes when it is asked, which is what makes a document expression\n * (`\"=4[g]+3\"`), an author's `width={() => …}` and an alignment binding reading\n * a box written mid-layout all correct without anything declaring an edge. The\n * cache-and-invalidate version of this could only get the last one right by\n * observing the write, and paid for it everywhere: a `peek()`/`get()` split at\n * every write path, so a read taken inside whatever computation happened to be\n * running did not register an edge with no business existing.\n *\n * The bet is that recomputing is cheaper than tracking. Bindings here are\n * arithmetic over a handful of reads, and a frame's draw dwarfs all of them.\n */\nexport class PropSlot<T> {\n private _value: T;\n private _fn: (() => T) | null = null;\n private _running = false;\n\n /** `_host` and `_name` only label the slot for an observer — see `slotLabel`. */\n constructor(\n initial: T,\n readonly _host: { readonly id: string } | null = null,\n readonly _name: string = \"\",\n ) {\n this._value = initial;\n }\n\n get(): T {\n // Before the re-entrancy check, so a binding's own reads are recorded\n // under whatever read it.\n if (_observer !== null) _observer.read(this);\n // A binding that reads its own slot re-enters here mid-evaluation —\n // `bind(() => mapper(ext(), slot.get()))` is how a mapper is handed the\n // previous value. It gets the last settled one instead of recursing.\n if (!this._fn || this._running) return this._value;\n this._running = true;\n try {\n return (this._value = this._fn());\n } finally {\n this._running = false;\n }\n }\n\n set(value: T): void {\n if (_observer !== null) _observer.write(this);\n this._fn = null;\n this._value = value;\n }\n\n bind(fn: () => T): void {\n if (_observer !== null) _observer.write(this);\n this._fn = fn;\n }\n\n /** Freeze a bound slot at what it currently computes. */\n unbind(): void {\n if (!this._fn) return;\n if (_observer !== null) _observer.write(this);\n this._value = this.get();\n this._fn = null;\n }\n\n isBound(): boolean {\n return this._fn !== null;\n }\n\n snapshot(): PropSnapshot<T> {\n return this._fn ? { value: this.get(), fn: this._fn } : { value: this._value };\n }\n\n restoreFrom(snap: PropSnapshot<T>): void {\n if (snap.fn) this.bind(snap.fn);\n else this.set(snap.value);\n }\n\n /** Releases the bound closure and the value slot. The slot is inert after this. */\n dispose(): void {\n this._fn = null;\n this._value = undefined as unknown as T;\n }\n}\n"]}
1
+ {"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/props/slot.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,CAAC,IAAI,SAAS,GAAwB,IAAI,CAAC;AAEjD,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,QAA6B;IACtD,MAAM,QAAQ,GAAG,SAAS,CAAC;IAC3B,SAAS,GAAG,QAAQ,CAAC;IACrB,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,OAAO,QAAQ;IAQJ;IACA;IARL,MAAM,CAAI;IACV,GAAG,GAAqB,IAAI,CAAC;IAC7B,QAAQ,GAAG,KAAK,CAAC;IAEzB,iFAAiF;IACjF,YACI,OAAU,EACD,QAAwC,IAAI,EAC5C,QAAgB,EAAE;QADlB,UAAK,GAAL,KAAK,CAAuC;QAC5C,UAAK,GAAL,KAAK,CAAa;QAE3B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,GAAG;QACC,sEAAsE;QACtE,0BAA0B;QAC1B,IAAI,SAAS,KAAK,IAAI;YAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,oEAAoE;QACpE,wEAAwE;QACxE,qEAAqE;QACrE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC,M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I,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;YAC3B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,mFAAmF;IACnF,OAAO;QACH,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,SAAyB,CAAC;IAC5C,CAAC;CACJ","sourcesContent":["import type { SlotObserver } from \"./observer\";\n\n/** A captured state of a {@link PropSlot} (the thunk it was bound to, or the plain value), from {@link PropSlot.snapshot} to {@link PropSlot.restoreFrom}. */\n/** @internal */\nexport interface PropSnapshot<T> {\n value: T;\n /** Present only for a bound slot; restoring one re-binds rather than freezing it. */\n fn?: () => T;\n}\n\n/**\n * @internal The observer every slot reports to, or `null` — which is every frame of\n * playback, so the hot path pays one null check. Installed by `observeSlots`.\n */\nexport let _observer: SlotObserver | null = null;\n\n/** @internal Only this module can reassign the binding. Returns the observer it replaced. */\nexport function _setObserver(observer: SlotObserver | null): SlotObserver | null {\n const previous = _observer;\n _observer = observer;\n return previous;\n}\n\n/**\n * The storage behind one `property`: a plain value, or a thunk evaluated on every read. There is no dependency graph and\n * nothing to invalidate: a bound slot recomputes when asked, so a document expression (`\"=4[g]+3\"`), an author's\n * `width={() => …}` and an alignment binding reading a box written mid-layout are all correct without declaring an\n * edge. (A cache-and-invalidate version could only get the last one right by observing the write, and paid for it at\n * every write path.) The bet is that recomputing is cheaper than tracking: bindings are arithmetic over a few reads.\n */\nexport class PropSlot<T> {\n private _value: T;\n private _fn: (() => T) | null = null;\n private _running = false;\n\n /** `_host` and `_name` only label the slot for an observer — see `slotLabel`. */\n constructor(\n initial: T,\n readonly _host: { readonly id: string } | null = null,\n readonly _name: string = \"\",\n ) {\n this._value = initial;\n }\n\n get(): T {\n // Before the re-entrancy check, so a binding's own reads are recorded\n // under whatever read it.\n if (_observer !== null) _observer.read(this);\n // A binding that reads its own slot re-enters here mid-evaluation —\n // `bind(() => mapper(ext(), slot.get()))` is how a mapper is handed the\n // previous value. It gets the last settled one instead of recursing.\n if (!this._fn || this._running) return this._value;\n this._running = true;\n try {\n return (this._value = this._fn());\n } finally {\n this._running = false;\n }\n }\n\n set(value: T): void {\n if (_observer !== null) _observer.write(this);\n this._fn = null;\n this._value = value;\n }\n\n bind(fn: () => T): void {\n if (_observer !== null) _observer.write(this);\n this._fn = fn;\n }\n\n /** Freeze a bound slot at what it currently computes. */\n unbind(): void {\n if (!this._fn) return;\n if (_observer !== null) _observer.write(this);\n this._value = this.get();\n this._fn = null;\n }\n\n isBound(): boolean {\n return this._fn !== null;\n }\n\n snapshot(): PropSnapshot<T> {\n return this._fn ? { value: this.get(), fn: this._fn } : { value: this._value };\n }\n\n restoreFrom(snap: PropSnapshot<T>): void {\n if (snap.fn) this.bind(snap.fn);\n else this.set(snap.value);\n }\n\n /** Releases the bound closure and the value slot. The slot is inert after this. */\n dispose(): void {\n this._fn = null;\n this._value = undefined as unknown as T;\n }\n}\n"]}