framefields 2.13.1 → 2.14.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 (288) hide show
  1. package/dist/audio/index.d.mts +5 -5
  2. package/dist/audio/index.mjs +10 -10
  3. package/dist/{audio-C4B9p_yq.d.mts → audio-CdCuGK5d.d.mts} +3 -3
  4. package/dist/{audio-C4B9p_yq.d.mts.map → audio-CdCuGK5d.d.mts.map} +1 -1
  5. package/dist/{audio-DIvi6hTD.mjs → audio-DFwRbID_.mjs} +3 -3
  6. package/dist/{audio-DIvi6hTD.mjs.map → audio-DFwRbID_.mjs.map} +1 -1
  7. package/dist/cli/check-worker.mjs +43 -43
  8. package/dist/components/index.d.mts +13 -13
  9. package/dist/components/index.mjs +42 -42
  10. package/dist/{dist-DtPPPsZV.mjs → dist--Uu5bQ_6.mjs} +557 -212
  11. package/dist/dist--Uu5bQ_6.mjs.map +1 -0
  12. package/dist/{dist-CCrYOkcc.mjs → dist-B8Nby2CU.mjs} +2 -2
  13. package/dist/{dist-CCrYOkcc.mjs.map → dist-B8Nby2CU.mjs.map} +1 -1
  14. package/dist/effects/index.d.mts +5 -5
  15. package/dist/effects/index.mjs +34 -34
  16. package/dist/{effects-B-L3rLs6.mjs → effects-WMgv8ZaD.mjs} +2 -2
  17. package/dist/{effects-B-L3rLs6.mjs.map → effects-WMgv8ZaD.mjs.map} +1 -1
  18. package/dist/fonts/index.mjs +2 -2
  19. package/dist/{fonts-k5ll8NTE.mjs → fonts-OW3yAfO5.mjs} +2 -2
  20. package/dist/{fonts-k5ll8NTE.mjs.map → fonts-OW3yAfO5.mjs.map} +1 -1
  21. package/dist/{gpu-D2HT3KcE.mjs → gpu-R4T2Tndu.mjs} +2 -2
  22. package/dist/{gpu-D2HT3KcE.mjs.map → gpu-R4T2Tndu.mjs.map} +1 -1
  23. package/dist/{index-CtKUQ2VG.d.mts → index-9xte4JgL.d.mts} +109 -60
  24. package/dist/index-9xte4JgL.d.mts.map +1 -0
  25. package/dist/{index-BGlaws7-.d.mts → index-B0Vq8Bwf.d.mts} +3 -3
  26. package/dist/{index-BGlaws7-.d.mts.map → index-B0Vq8Bwf.d.mts.map} +1 -1
  27. package/dist/{index-BFTtXosj.d.mts → index-BVd6nXd5.d.mts} +2 -2
  28. package/dist/{index-BFTtXosj.d.mts.map → index-BVd6nXd5.d.mts.map} +1 -1
  29. package/dist/{index-CnZhBlob.d.mts → index-Bv7gxGK1.d.mts} +2 -2
  30. package/dist/{index-CnZhBlob.d.mts.map → index-Bv7gxGK1.d.mts.map} +1 -1
  31. package/dist/{index-a6JrbAK0.d.mts → index-C-V6CAhP.d.mts} +32 -2
  32. package/dist/index-C-V6CAhP.d.mts.map +1 -0
  33. package/dist/{index-DQ1U3HC3.d.mts → index-C7-p9zwU.d.mts} +3 -3
  34. package/dist/{index-DQ1U3HC3.d.mts.map → index-C7-p9zwU.d.mts.map} +1 -1
  35. package/dist/{index-rtCXNxGO.d.mts → index-CEKxvGY-.d.mts} +2 -2
  36. package/dist/{index-rtCXNxGO.d.mts.map → index-CEKxvGY-.d.mts.map} +1 -1
  37. package/dist/{index-C2yaponf.d.mts → index-CRaydvLi.d.mts} +28 -9
  38. package/dist/index-CRaydvLi.d.mts.map +1 -0
  39. package/dist/{index-DBh3WphX.d.mts → index-D1FqV1eu.d.mts} +2 -2
  40. package/dist/{index-DBh3WphX.d.mts.map → index-D1FqV1eu.d.mts.map} +1 -1
  41. package/dist/{index-ByhlTwxh.d.mts → index-DoP6EiHj.d.mts} +5 -5
  42. package/dist/{index-ByhlTwxh.d.mts.map → index-DoP6EiHj.d.mts.map} +1 -1
  43. package/dist/{index-B08eSpaI.d.mts → index-GA9_Z8Fn.d.mts} +2 -2
  44. package/dist/{index-B08eSpaI.d.mts.map → index-GA9_Z8Fn.d.mts.map} +1 -1
  45. package/dist/index.d.mts +14 -14
  46. package/dist/index.mjs +50 -50
  47. package/dist/preview/index.d.mts +5 -5
  48. package/dist/preview/index.mjs +10 -10
  49. package/dist/{preview-lHH8Tv4j.mjs → preview-D7BGmE1E.mjs} +3 -3
  50. package/dist/{preview-lHH8Tv4j.mjs.map → preview-D7BGmE1E.mjs.map} +1 -1
  51. package/dist/preview-engine/{chunk-XCPRRMMW.mjs → chunk-5DZTPUMH.mjs} +195 -89
  52. package/dist/preview-engine/chunk-GNDE3OXQ.mjs +5 -0
  53. package/dist/preview-engine/{chunk-N3XTDAL6.mjs → chunk-UPZURPJY.mjs} +31 -31
  54. package/dist/preview-engine/components.mjs +1 -1
  55. package/dist/preview-engine/framefields.mjs +1 -1
  56. package/dist/preview-engine/player.mjs +1 -1
  57. package/dist/preview-engine/renderers-DLJOA3BM.mjs +228 -0
  58. package/dist/{program-BfiB9ttP.mjs → program-tFKCWU2j.mjs} +96 -12
  59. package/dist/program-tFKCWU2j.mjs.map +1 -0
  60. package/dist/renderer/index.d.mts +4 -4
  61. package/dist/renderer/index.mjs +2 -2
  62. package/dist/{renderer-CU6WT5jW.mjs → renderer-03mYJLgX.mjs} +3 -3
  63. package/dist/{renderer-CU6WT5jW.mjs.map → renderer-03mYJLgX.mjs.map} +1 -1
  64. package/dist/{renderer-BmyFfvVA.mjs → renderer-0rveCDm-.mjs} +3 -3
  65. package/dist/{renderer-BmyFfvVA.mjs.map → renderer-0rveCDm-.mjs.map} +1 -1
  66. package/dist/{renderer-QbSrnPZU.mjs → renderer-2PjR3w-q.mjs} +3 -3
  67. package/dist/{renderer-QbSrnPZU.mjs.map → renderer-2PjR3w-q.mjs.map} +1 -1
  68. package/dist/{renderer-BZMh2io2.mjs → renderer-47y12Z37.mjs} +2 -2
  69. package/dist/{renderer-BZMh2io2.mjs.map → renderer-47y12Z37.mjs.map} +1 -1
  70. package/dist/renderer-6_bzbbXt.mjs +5 -0
  71. package/dist/renderer-8M-9G6F_.mjs +5 -0
  72. package/dist/{renderer-CHCRcCKw.mjs → renderer-B0yVUOPP.mjs} +2 -2
  73. package/dist/{renderer-CHCRcCKw.mjs.map → renderer-B0yVUOPP.mjs.map} +1 -1
  74. package/dist/renderer-B5OzKvF8.mjs +5 -0
  75. package/dist/{renderer-CldjJmRR.mjs → renderer-B7G1KohJ.mjs} +2 -2
  76. package/dist/renderer-BBCZ2qbE.mjs +5 -0
  77. package/dist/{renderer-Y1kjtOto.mjs → renderer-BBMtmxks.mjs} +3 -3
  78. package/dist/{renderer-Y1kjtOto.mjs.map → renderer-BBMtmxks.mjs.map} +1 -1
  79. package/dist/renderer-BChbxCux.mjs +5 -0
  80. package/dist/{renderer-CdXBRdFf.mjs → renderer-BDzn1AKF.mjs} +2 -2
  81. package/dist/{renderer-CdXBRdFf.mjs.map → renderer-BDzn1AKF.mjs.map} +1 -1
  82. package/dist/renderer-BGeMPr8C.mjs +5 -0
  83. package/dist/{renderer-CSu_vYPn.mjs → renderer-BGp0An5A.mjs} +3 -3
  84. package/dist/{renderer-CSu_vYPn.mjs.map → renderer-BGp0An5A.mjs.map} +1 -1
  85. package/dist/{renderer-BZX932Lj.mjs → renderer-BH7UCMPQ.mjs} +2 -2
  86. package/dist/{renderer-BZX932Lj.mjs.map → renderer-BH7UCMPQ.mjs.map} +1 -1
  87. package/dist/{renderer-fG8Jy8Rx.d.mts → renderer-BHYJlK6H.d.mts} +2 -2
  88. package/dist/{renderer-fG8Jy8Rx.d.mts.map → renderer-BHYJlK6H.d.mts.map} +1 -1
  89. package/dist/{renderer-D-mX1EVA.mjs → renderer-BJ8ea92W.mjs} +3 -3
  90. package/dist/{renderer-D-mX1EVA.mjs.map → renderer-BJ8ea92W.mjs.map} +1 -1
  91. package/dist/{renderer-B6bK9rXm.mjs → renderer-BOSZAdgF.mjs} +2 -2
  92. package/dist/{renderer-B6bK9rXm.mjs.map → renderer-BOSZAdgF.mjs.map} +1 -1
  93. package/dist/renderer-BPQ8Pkjb.mjs +5 -0
  94. package/dist/renderer-BTRpA3HD.mjs +5 -0
  95. package/dist/{renderer-Dv_iRIyx.mjs → renderer-BVIXKfbC.mjs} +121 -105
  96. package/dist/renderer-BVIXKfbC.mjs.map +1 -0
  97. package/dist/{renderer-D0xM67cK.mjs → renderer-BVU22lBS.mjs} +2 -2
  98. package/dist/{renderer-D0xM67cK.mjs.map → renderer-BVU22lBS.mjs.map} +1 -1
  99. package/dist/renderer-BVsECSn-.mjs +5 -0
  100. package/dist/{renderer-HKv5cBdp.mjs → renderer-BWSRryIA.mjs} +2 -2
  101. package/dist/{renderer-HKv5cBdp.mjs.map → renderer-BWSRryIA.mjs.map} +1 -1
  102. package/dist/{renderer-D0h1hTOo.mjs → renderer-BacY4nh8.mjs} +2 -2
  103. package/dist/{renderer-D0h1hTOo.mjs.map → renderer-BacY4nh8.mjs.map} +1 -1
  104. package/dist/{renderer-D_m6Qbsi.mjs → renderer-Baw6Utxi.mjs} +2 -2
  105. package/dist/{renderer-D_m6Qbsi.mjs.map → renderer-Baw6Utxi.mjs.map} +1 -1
  106. package/dist/{renderer-CQ4h8n7p.mjs → renderer-Bcu3UrI-.mjs} +3 -3
  107. package/dist/{renderer-CQ4h8n7p.mjs.map → renderer-Bcu3UrI-.mjs.map} +1 -1
  108. package/dist/{renderer-yNWYqvvq.mjs → renderer-BeNl_6EG.mjs} +2 -2
  109. package/dist/{renderer-yNWYqvvq.mjs.map → renderer-BeNl_6EG.mjs.map} +1 -1
  110. package/dist/{renderer-pn52dzZz.mjs → renderer-BfZNIiSv.mjs} +2 -2
  111. package/dist/{renderer-pn52dzZz.mjs.map → renderer-BfZNIiSv.mjs.map} +1 -1
  112. package/dist/renderer-Bgos68gc.mjs +6 -0
  113. package/dist/{renderer-C64_B8It.mjs → renderer-BjDddtw9.mjs} +2 -2
  114. package/dist/renderer-BjHOvoqO.mjs +5 -0
  115. package/dist/renderer-BjXMPPlV.mjs +5 -0
  116. package/dist/{renderer-C98XwEIr.mjs → renderer-BpVOk9ux.mjs} +2 -2
  117. package/dist/{renderer-C98XwEIr.mjs.map → renderer-BpVOk9ux.mjs.map} +1 -1
  118. package/dist/{renderer-7xQmXXMH.mjs → renderer-Bpm145BW.mjs} +3 -3
  119. package/dist/{renderer-7xQmXXMH.mjs.map → renderer-Bpm145BW.mjs.map} +1 -1
  120. package/dist/{renderer-_J9JcCMR.mjs → renderer-Brmbl12Y.mjs} +3 -3
  121. package/dist/{renderer-_J9JcCMR.mjs.map → renderer-Brmbl12Y.mjs.map} +1 -1
  122. package/dist/renderer-Byobxqkv.mjs +5 -0
  123. package/dist/{renderer-B3un4Pdi.mjs → renderer-C20efMI0.mjs} +3 -3
  124. package/dist/{renderer-B3un4Pdi.mjs.map → renderer-C20efMI0.mjs.map} +1 -1
  125. package/dist/{renderer-Cfx_FCSf.mjs → renderer-C5AoaymD.mjs} +3 -3
  126. package/dist/{renderer-Cfx_FCSf.mjs.map → renderer-C5AoaymD.mjs.map} +1 -1
  127. package/dist/{renderer-DWYmJSrl.mjs → renderer-CCxk-RJR.mjs} +2 -2
  128. package/dist/{renderer-DWYmJSrl.mjs.map → renderer-CCxk-RJR.mjs.map} +1 -1
  129. package/dist/{renderer-DhGZ41hQ.mjs → renderer-CKo7VR8x.mjs} +3 -3
  130. package/dist/{renderer-DhGZ41hQ.mjs.map → renderer-CKo7VR8x.mjs.map} +1 -1
  131. package/dist/renderer-CKrsg3EG.mjs +5 -0
  132. package/dist/{renderer-BIKkxw_Z.mjs → renderer-COgwYqev.mjs} +3 -3
  133. package/dist/{renderer-BIKkxw_Z.mjs.map → renderer-COgwYqev.mjs.map} +1 -1
  134. package/dist/{renderer-uzU6dsdR.mjs → renderer-CP108ABB.mjs} +2 -2
  135. package/dist/{renderer-uzU6dsdR.mjs.map → renderer-CP108ABB.mjs.map} +1 -1
  136. package/dist/{renderer-Cv9CKKWG.mjs → renderer-CP8wLzTU.mjs} +2 -2
  137. package/dist/{renderer-Cv9CKKWG.mjs.map → renderer-CP8wLzTU.mjs.map} +1 -1
  138. package/dist/{renderer-uER8kn7f.mjs → renderer-CT3zkfbf.mjs} +2 -2
  139. package/dist/{renderer-uER8kn7f.mjs.map → renderer-CT3zkfbf.mjs.map} +1 -1
  140. package/dist/{renderer-DNynPM6X.mjs → renderer-Ca1KjNCO.mjs} +2 -2
  141. package/dist/{renderer-DNynPM6X.mjs.map → renderer-Ca1KjNCO.mjs.map} +1 -1
  142. package/dist/renderer-Cj875NuH.mjs +5 -0
  143. package/dist/{renderer-BsrKj6Td.mjs → renderer-Cm0tsbQH.mjs} +2 -2
  144. package/dist/{renderer-BsrKj6Td.mjs.map → renderer-Cm0tsbQH.mjs.map} +1 -1
  145. package/dist/renderer-CnmzJoMv.mjs +5 -0
  146. package/dist/{renderer-Dm57W73p.mjs → renderer-Cqb7PGrI.mjs} +2 -2
  147. package/dist/{renderer-BTwuM9u-.mjs → renderer-CrxwW6VQ.mjs} +3 -3
  148. package/dist/{renderer-BTwuM9u-.mjs.map → renderer-CrxwW6VQ.mjs.map} +1 -1
  149. package/dist/renderer-CtklDaMg.mjs +5 -0
  150. package/dist/{renderer-TfeohPxt.mjs → renderer-Cw6_NL2i.mjs} +3 -3
  151. package/dist/{renderer-TfeohPxt.mjs.map → renderer-Cw6_NL2i.mjs.map} +1 -1
  152. package/dist/{renderer-B10HDC13.mjs → renderer-D-KHHWQD.mjs} +3 -3
  153. package/dist/{renderer-B10HDC13.mjs.map → renderer-D-KHHWQD.mjs.map} +1 -1
  154. package/dist/{renderer-CO9vE3sd.mjs → renderer-D-RhYvVl.mjs} +2 -2
  155. package/dist/{renderer-CO9vE3sd.mjs.map → renderer-D-RhYvVl.mjs.map} +1 -1
  156. package/dist/renderer-D1tK3in_.mjs +5 -0
  157. package/dist/{renderer-BEhZiOT4.mjs → renderer-D2wNFNRf.mjs} +2 -2
  158. package/dist/{renderer-BEhZiOT4.mjs.map → renderer-D2wNFNRf.mjs.map} +1 -1
  159. package/dist/renderer-D2yc9P61.mjs +5 -0
  160. package/dist/renderer-D4v-JvSr.mjs +5 -0
  161. package/dist/renderer-D7WRWDwB.mjs +5 -0
  162. package/dist/{renderer-DzON3wDZ.mjs → renderer-DA8YEo_d.mjs} +3 -3
  163. package/dist/{renderer-DzON3wDZ.mjs.map → renderer-DA8YEo_d.mjs.map} +1 -1
  164. package/dist/{renderer-DYlx7VHo.mjs → renderer-DEjo6dw_.mjs} +2 -2
  165. package/dist/{renderer-DYlx7VHo.mjs.map → renderer-DEjo6dw_.mjs.map} +1 -1
  166. package/dist/renderer-DGvA0tdB.mjs +5 -0
  167. package/dist/{renderer-B3_GddgJ.mjs → renderer-DIEeHiQA.mjs} +2 -2
  168. package/dist/{renderer-B3_GddgJ.mjs.map → renderer-DIEeHiQA.mjs.map} +1 -1
  169. package/dist/{renderer-C4hd6Cqi.mjs → renderer-DNxWOz8Q.mjs} +2 -2
  170. package/dist/{renderer-C4hd6Cqi.mjs.map → renderer-DNxWOz8Q.mjs.map} +1 -1
  171. package/dist/renderer-DO7v5Sdm.mjs +5 -0
  172. package/dist/renderer-DRVvt7-V.mjs +5 -0
  173. package/dist/{renderer-CkTehyRX.mjs → renderer-DVPgWHZw.mjs} +3 -3
  174. package/dist/{renderer-CkTehyRX.mjs.map → renderer-DVPgWHZw.mjs.map} +1 -1
  175. package/dist/{renderer-4nsuReW2.mjs → renderer-DWq9gYRw.mjs} +3 -3
  176. package/dist/{renderer-4nsuReW2.mjs.map → renderer-DWq9gYRw.mjs.map} +1 -1
  177. package/dist/renderer-DYMCd3jL.mjs +5 -0
  178. package/dist/{renderer-DvHi_wXE.mjs → renderer-D_j1WKMD.mjs} +3 -3
  179. package/dist/{renderer-DvHi_wXE.mjs.map → renderer-D_j1WKMD.mjs.map} +1 -1
  180. package/dist/{renderer-CRhEGqW4.mjs → renderer-DcAKDAnS.mjs} +3 -3
  181. package/dist/{renderer-CRhEGqW4.mjs.map → renderer-DcAKDAnS.mjs.map} +1 -1
  182. package/dist/{renderer-DtFZbE1j.mjs → renderer-Dgj46uEU.mjs} +2 -2
  183. package/dist/{renderer-B2IUPjhw.mjs → renderer-DhyMfG1v.mjs} +3 -3
  184. package/dist/{renderer-B2IUPjhw.mjs.map → renderer-DhyMfG1v.mjs.map} +1 -1
  185. package/dist/{renderer-BvBqTAtk.mjs → renderer-Dj2H5JPR.mjs} +3 -3
  186. package/dist/{renderer-BvBqTAtk.mjs.map → renderer-Dj2H5JPR.mjs.map} +1 -1
  187. package/dist/{renderer-CoC64eam.mjs → renderer-DkOuQi84.mjs} +3 -3
  188. package/dist/{renderer-CoC64eam.mjs.map → renderer-DkOuQi84.mjs.map} +1 -1
  189. package/dist/renderer-DmHKw-MM.mjs +5 -0
  190. package/dist/renderer-DoDsuZ6G.mjs +5 -0
  191. package/dist/{renderer-BhcTYhaP.mjs → renderer-Dr0tXA4k.mjs} +3 -3
  192. package/dist/{renderer-BhcTYhaP.mjs.map → renderer-Dr0tXA4k.mjs.map} +1 -1
  193. package/dist/{renderer-BrEeUw7T.mjs → renderer-DtMVitEF.mjs} +2 -2
  194. package/dist/{renderer-BrEeUw7T.mjs.map → renderer-DtMVitEF.mjs.map} +1 -1
  195. package/dist/{renderer-BGchUBW_.mjs → renderer-Dwwnx7Dk.mjs} +2 -2
  196. package/dist/{renderer-BGchUBW_.mjs.map → renderer-Dwwnx7Dk.mjs.map} +1 -1
  197. package/dist/{renderer-zLi2qFGT.mjs → renderer-DzLrvCB2.mjs} +2 -2
  198. package/dist/{renderer-zLi2qFGT.mjs.map → renderer-DzLrvCB2.mjs.map} +1 -1
  199. package/dist/renderer-EpgclS70.mjs +5 -0
  200. package/dist/{renderer-DCrKEVjb.mjs → renderer-FYOL5Za6.mjs} +3 -3
  201. package/dist/{renderer-DCrKEVjb.mjs.map → renderer-FYOL5Za6.mjs.map} +1 -1
  202. package/dist/renderer-GroKiYyK.mjs +5 -0
  203. package/dist/{renderer-DYeNNc_G.mjs → renderer-I0Hh9cLK.mjs} +3 -3
  204. package/dist/{renderer-DYeNNc_G.mjs.map → renderer-I0Hh9cLK.mjs.map} +1 -1
  205. package/dist/renderer-MQ5K_xIS.mjs +5 -0
  206. package/dist/{renderer-BEuXJY-C.mjs → renderer-NRMlYkX6.mjs} +3 -3
  207. package/dist/{renderer-BEuXJY-C.mjs.map → renderer-NRMlYkX6.mjs.map} +1 -1
  208. package/dist/{renderer-YONlI6W-.mjs → renderer-Nnmi8Gt6.mjs} +3 -3
  209. package/dist/{renderer-YONlI6W-.mjs.map → renderer-Nnmi8Gt6.mjs.map} +1 -1
  210. package/dist/renderer-U43SflML.mjs +5 -0
  211. package/dist/renderer-UqOmBgCv.mjs +5 -0
  212. package/dist/{renderer-DiZkZ0Pr.mjs → renderer-W1bVNVR6.mjs} +3 -3
  213. package/dist/{renderer-DiZkZ0Pr.mjs.map → renderer-W1bVNVR6.mjs.map} +1 -1
  214. package/dist/renderer-XLULgJM0.mjs +5 -0
  215. package/dist/{renderer-BOlHW3Mi.mjs → renderer-ZnrEfkYh.mjs} +2 -2
  216. package/dist/{renderer-BOlHW3Mi.mjs.map → renderer-ZnrEfkYh.mjs.map} +1 -1
  217. package/dist/{renderer-GIlQ9lZq.mjs → renderer-_pC-jB9O.mjs} +2 -2
  218. package/dist/{renderer-GIlQ9lZq.mjs.map → renderer-_pC-jB9O.mjs.map} +1 -1
  219. package/dist/{renderer-BM19iK8v.mjs → renderer-iMiYStcW.mjs} +2 -2
  220. package/dist/{renderer-BM19iK8v.mjs.map → renderer-iMiYStcW.mjs.map} +1 -1
  221. package/dist/{renderer-CO4NGvAh.mjs → renderer-jUKdkmG5.mjs} +69 -69
  222. package/dist/{renderer-CO4NGvAh.mjs.map → renderer-jUKdkmG5.mjs.map} +1 -1
  223. package/dist/{renderer-mDBoz0zT.mjs → renderer-k5d7JSbs.mjs} +3 -3
  224. package/dist/{renderer-mDBoz0zT.mjs.map → renderer-k5d7JSbs.mjs.map} +1 -1
  225. package/dist/renderer-lNjxY1GG.mjs +5 -0
  226. package/dist/{renderer-CC22Djgi.mjs → renderer-nHS3Sius.mjs} +3 -3
  227. package/dist/{renderer-CC22Djgi.mjs.map → renderer-nHS3Sius.mjs.map} +1 -1
  228. package/dist/{renderer-CXrnzihz.mjs → renderer-ngmYIIob.mjs} +3 -3
  229. package/dist/{renderer-CXrnzihz.mjs.map → renderer-ngmYIIob.mjs.map} +1 -1
  230. package/dist/{renderer-Bw0O--gW.mjs → renderer-raxwsiGI.mjs} +3 -3
  231. package/dist/{renderer-Bw0O--gW.mjs.map → renderer-raxwsiGI.mjs.map} +1 -1
  232. package/dist/renderer-ukufL7pl.mjs +5 -0
  233. package/dist/renderer-wb0NCKdF.mjs +5 -0
  234. package/dist/{renderer-Bw-_GZVw.mjs → renderer-zRq0j6Xy.mjs} +3 -3
  235. package/dist/{renderer-Bw-_GZVw.mjs.map → renderer-zRq0j6Xy.mjs.map} +1 -1
  236. package/dist/{renderers-CP8CFWDs-BufiCyn7.mjs → renderers-CP8CFWDs-CshljORp.mjs} +2 -2
  237. package/dist/{renderers-CP8CFWDs-BufiCyn7.mjs.map → renderers-CP8CFWDs-CshljORp.mjs.map} +1 -1
  238. package/dist/sam/index.d.mts +3 -3
  239. package/dist/signals/index.d.mts +5 -5
  240. package/dist/signals/index.mjs +4 -4
  241. package/dist/{src-DrP7fGJX.mjs → src-Dy4gnc6w.mjs} +13 -8
  242. package/dist/src-Dy4gnc6w.mjs.map +1 -0
  243. package/package.json +60 -60
  244. package/dist/dist-DtPPPsZV.mjs.map +0 -1
  245. package/dist/index-C2yaponf.d.mts.map +0 -1
  246. package/dist/index-CtKUQ2VG.d.mts.map +0 -1
  247. package/dist/index-a6JrbAK0.d.mts.map +0 -1
  248. package/dist/preview-engine/chunk-5ZS46EFB.mjs +0 -5
  249. package/dist/preview-engine/renderers-ZMMQ7S2A.mjs +0 -228
  250. package/dist/program-BfiB9ttP.mjs.map +0 -1
  251. package/dist/renderer-0rLmztAv.mjs +0 -5
  252. package/dist/renderer-B0pjOXFY.mjs +0 -5
  253. package/dist/renderer-B7J13reL.mjs +0 -5
  254. package/dist/renderer-BPGIKGgl.mjs +0 -5
  255. package/dist/renderer-Bv-Artj1.mjs +0 -5
  256. package/dist/renderer-BvLjbhcL.mjs +0 -5
  257. package/dist/renderer-By6awWaf.mjs +0 -5
  258. package/dist/renderer-C0rvsz7m.mjs +0 -5
  259. package/dist/renderer-CDgud_HB.mjs +0 -5
  260. package/dist/renderer-CDiRF3bG.mjs +0 -6
  261. package/dist/renderer-CIIEQd4B.mjs +0 -5
  262. package/dist/renderer-CJblwOA9.mjs +0 -5
  263. package/dist/renderer-CNMOXtXE.mjs +0 -5
  264. package/dist/renderer-COeSeNGg.mjs +0 -5
  265. package/dist/renderer-CUfElmtZ.mjs +0 -5
  266. package/dist/renderer-CYh2lFoJ.mjs +0 -5
  267. package/dist/renderer-CYtVZYMH.mjs +0 -5
  268. package/dist/renderer-CjxZlkjb.mjs +0 -5
  269. package/dist/renderer-Cpd6TvTC.mjs +0 -5
  270. package/dist/renderer-D3ziOPhX.mjs +0 -5
  271. package/dist/renderer-DL-phtL5.mjs +0 -5
  272. package/dist/renderer-DSnmYnHg.mjs +0 -5
  273. package/dist/renderer-DUGfsT-E.mjs +0 -5
  274. package/dist/renderer-DW5af9x1.mjs +0 -5
  275. package/dist/renderer-DYMrol1t.mjs +0 -5
  276. package/dist/renderer-DekeUHaz.mjs +0 -5
  277. package/dist/renderer-Dt5uyJdZ.mjs +0 -5
  278. package/dist/renderer-Dv_iRIyx.mjs.map +0 -1
  279. package/dist/renderer-DwLQAnaK.mjs +0 -5
  280. package/dist/renderer-IXQP2CWM.mjs +0 -5
  281. package/dist/renderer-K-Pkw63O.mjs +0 -5
  282. package/dist/renderer-MPw2KH9P.mjs +0 -5
  283. package/dist/renderer-RPu8RMav.mjs +0 -5
  284. package/dist/renderer-dCqxd5N2.mjs +0 -5
  285. package/dist/renderer-lhjmE-Fp.mjs +0 -5
  286. package/dist/renderer-u9cmBuvM.mjs +0 -5
  287. package/dist/renderer-vH12jcpz.mjs +0 -5
  288. package/dist/src-DrP7fGJX.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import "../chunk-DOL2i2sR.mjs";
2
- import "../dist-DtPPPsZV.mjs";
3
- import { t as FontManager } from "../fonts-k5ll8NTE.mjs";
2
+ import "../dist--Uu5bQ_6.mjs";
3
+ import { t as FontManager } from "../fonts-OW3yAfO5.mjs";
4
4
 
5
5
  export { FontManager };
@@ -1,4 +1,4 @@
1
- import { at as setRegisteredFontSource, m as SlugGeometry, p as SlugFontCache, tt as registerHeadlessFont } from "./dist-DtPPPsZV.mjs";
1
+ import { at as setRegisteredFontSource, m as SlugGeometry, p as SlugFontCache, tt as registerHeadlessFont } from "./dist--Uu5bQ_6.mjs";
2
2
  import path from "node:path";
3
3
  import * as fontkit from "fontkit";
4
4
  import fs from "node:fs/promises";
@@ -261,4 +261,4 @@ var FontManager = class FontManager {
261
261
 
262
262
  //#endregion
263
263
  export { FontManager as t };
264
- //# sourceMappingURL=fonts-k5ll8NTE.mjs.map
264
+ //# sourceMappingURL=fonts-OW3yAfO5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fonts-k5ll8NTE.mjs","names":[],"sources":["../src/fonts/manager.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n\tregisterHeadlessFont,\n\tSlugFontCache,\n\tSlugGeometry,\n\tsetRegisteredFontSource,\n} from \"@framefields/webgpu-renderers\";\nimport * as fontkit from \"fontkit\";\n\nexport interface RegisterFontOptions {\n\tfamily?: string;\n\tsource: string | Uint8Array;\n\tweight?: number | string;\n\tstyle?: \"normal\" | \"italic\" | \"oblique\";\n}\n\nexport interface RegisteredFont {\n\tfamily: string;\n\tsource: string | Uint8Array;\n\tfilePath?: string;\n\tformat: \"truetype\" | \"opentype\";\n\tpostscriptName?: string;\n\tunitsPerEm?: number;\n\tweight?: number | string;\n\tstyle?: string;\n}\n\ninterface ResolvedSource {\n\tbuffer: Uint8Array;\n\tfilePath?: string;\n}\n\nconst SFNT_TRUETYPE_1 = 0x00010000;\nconst SFNT_TRUETYPE_TRUE = 0x74727565; // 'true'\nconst SFNT_TRUETYPE_TYP1 = 0x74797031; // 'typ1'\nconst SFNT_OPENTYPE_CFF = 0x4f54544f; // 'OTTO'\nconst SFNT_COLLECTION = 0x74746366; // 'ttcf'\n\nfunction validateFontBinaryHeader(\n\tbytes: Uint8Array,\n\tsourceLabel: string,\n): \"truetype\" | \"opentype\" {\n\tif (bytes.length < 12) {\n\t\tthrow new Error(\n\t\t\t`Invalid font binary for \"${sourceLabel}\": File size (${bytes.length} bytes) is too small to be a valid TrueType or OpenType font.`,\n\t\t);\n\t}\n\n\tconst tag =\n\t\t((bytes[0] ?? 0) << 24) |\n\t\t((bytes[1] ?? 0) << 16) |\n\t\t((bytes[2] ?? 0) << 8) |\n\t\t(bytes[3] ?? 0);\n\n\tif (\n\t\ttag === SFNT_TRUETYPE_1 ||\n\t\ttag === SFNT_TRUETYPE_TRUE ||\n\t\ttag === SFNT_TRUETYPE_TYP1 ||\n\t\ttag === SFNT_COLLECTION\n\t) {\n\t\treturn \"truetype\";\n\t}\n\n\tif (tag === SFNT_OPENTYPE_CFF) {\n\t\treturn \"opentype\";\n\t}\n\n\tconst hexTag = (tag >>> 0).toString(16).padStart(8, \"0\");\n\tthrow new Error(\n\t\t`Invalid font format for \"${sourceLabel}\": Expected a valid TrueType (.ttf) or OpenType (.otf) font binary. Found header tag: 0x${hexTag}.`,\n\t);\n}\n\nasync function resolveSourceBuffer(\n\tsource: string | Uint8Array,\n): Promise<ResolvedSource> {\n\tif (source instanceof Uint8Array) {\n\t\treturn { buffer: source };\n\t}\n\n\tif (typeof source !== \"string\") {\n\t\tthrow new TypeError(\n\t\t\t`Font source must be a file path string or Uint8Array, received: ${typeof source}`,\n\t\t);\n\t}\n\n\tlet cleanPath = source;\n\tif (cleanPath.startsWith(\"http://\") || cleanPath.startsWith(\"https://\")) {\n\t\tconst res = await fetch(cleanPath);\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to download font from \"${cleanPath}\": HTTP ${res.status} ${res.statusText}`,\n\t\t\t);\n\t\t}\n\t\tconst arrayBuffer = await res.arrayBuffer();\n\t\treturn {\n\t\t\tbuffer: new Uint8Array(arrayBuffer),\n\t\t\tfilePath: cleanPath,\n\t\t};\n\t}\n\n\tif (cleanPath.startsWith(\"file://\")) {\n\t\ttry {\n\t\t\t// A URL path is percent-encoded (\"My%20Film\"); files aren't. On\n\t\t\t// Windows \"/C:/…\" loses its leading slash.\n\t\t\tcleanPath = decodeURIComponent(new URL(cleanPath).pathname).replace(\n\t\t\t\t/^\\/([A-Za-z]:)/,\n\t\t\t\t\"$1\",\n\t\t\t);\n\t\t} catch {\n\t\t\tcleanPath = cleanPath.replace(/^file:\\/\\//, \"\");\n\t\t}\n\t}\n\n\tconst candidates: string[] = [\n\t\tcleanPath,\n\t\tpath.resolve(process.cwd(), cleanPath),\n\t\tpath.resolve(process.cwd(), \"assets/fonts\", cleanPath),\n\t\tpath.resolve(process.cwd(), \"assets/fonts\", path.basename(cleanPath)),\n\t];\n\n\t// Upward traversal to locate fonts in parent monorepo roots\n\tlet currentDir = process.cwd();\n\tfor (let i = 0; i < 5; i++) {\n\t\tcandidates.push(path.resolve(currentDir, cleanPath));\n\t\tcandidates.push(\n\t\t\tpath.resolve(currentDir, \"assets/fonts\", path.basename(cleanPath)),\n\t\t);\n\t\tconst parent = path.dirname(currentDir);\n\t\tif (parent === currentDir) break;\n\t\tcurrentDir = parent;\n\t}\n\n\tlet resolvedPath: string | null = null;\n\tlet fileBuffer: Buffer | null = null;\n\n\tfor (const candidate of candidates) {\n\t\ttry {\n\t\t\tconst stat = await fs.stat(candidate);\n\t\t\tif (stat.isFile()) {\n\t\t\t\tresolvedPath = candidate;\n\t\t\t\tfileBuffer = await fs.readFile(candidate);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch {\n\t\t\t// Continue searching next candidate\n\t\t}\n\t}\n\n\tif (!resolvedPath || !fileBuffer) {\n\t\tthrow new Error(\n\t\t\t`Font file not found: \"${source}\". Checked candidate locations:\\n - ${candidates.join(\"\\n - \")}`,\n\t\t);\n\t}\n\n\treturn {\n\t\tbuffer: new Uint8Array(\n\t\t\tfileBuffer.buffer,\n\t\t\tfileBuffer.byteOffset,\n\t\t\tfileBuffer.byteLength,\n\t\t),\n\t\tfilePath: resolvedPath,\n\t};\n}\n\n/**\n * Central singleton manager for font registration, TTF validation, and compositor typography binding.\n */\nexport interface MeasureTextOptions {\n\tfontFamily: string;\n\tfontSize?: number;\n\tfontWeight?: string | number;\n\t/** Extra px between characters, as on `Layer.text`. */\n\tletterSpacing?: number;\n\t/** Multiplier of fontSize when < 10, else px. Default 1.2. */\n\tlineHeight?: number;\n\t/** Wrap width in px; omit for one line per `\\n`. */\n\twidth?: number;\n\talign?: \"left\" | \"center\" | \"right\";\n\t/** Paragraph base direction, as on `Layer.text`. Default \"auto\". */\n\tdirection?: \"ltr\" | \"rtl\" | \"auto\";\n}\n\nexport interface MeasuredGlyph {\n\tchar: string;\n\t/** Index into the string (code units), matching `text.slice`. */\n\tindex: number;\n\t/** Left edge of the glyph, relative to the text box. */\n\tx: number;\n\t/** Baseline-relative top of the line box. */\n\ty: number;\n\t/** Advance width in px. */\n\twidth: number;\n\tline: number;\n\t/** Part of a right-to-left run: reading continues to the left. */\n\trtl?: boolean;\n}\n\nexport interface TextMetrics {\n\twidth: number;\n\theight: number;\n\tlines: number;\n\t/** Line box height in px. */\n\tlineHeight: number;\n\tglyphs: MeasuredGlyph[];\n\t/**\n\t * X of a caret placed after `count` characters (0 = before the first),\n\t * relative to the text box. In right-to-left text the caret sits on the\n\t * left of the last character. Pair with a `.keys(\"text\", …)` reveal to make\n\t * a cursor follow typing exactly.\n\t */\n\tcaretX(count: number): number;\n\t/** Width of the first `count` characters (same as `caretX` on one line). */\n\twidthOf(count: number): number;\n}\n\nexport class FontManager {\n\tprivate static instance: FontManager | null = null;\n\tprivate readonly fonts = new Map<string, RegisteredFont>();\n\n\tprivate constructor() {}\n\n\t/**\n\t * Returns the singleton FontManager instance.\n\t */\n\tpublic static getInstance(): FontManager {\n\t\tif (!FontManager.instance) {\n\t\t\tFontManager.instance = new FontManager();\n\t\t}\n\t\treturn FontManager.instance;\n\t}\n\n\t/**\n\t * Registers a TrueType/OpenType font into the Framefields engine with validation.\n\t */\n\tpublic static async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\treturn FontManager.getInstance().register(optionsOrFamilyOrSource, source);\n\t}\n\n\t/**\n\t * Sets the color emoji font text draws emoji with, for the preview and the\n\t * export alike: a CBDT/CBLC bitmap font such as Noto Color Emoji, as a file\n\t * path, URL or bytes. framefields ships none; without one, exports draw\n\t * nothing for emoji.\n\t */\n\tpublic static async registerEmojiFont(\n\t\tsource: string | Uint8Array,\n\t): Promise<void> {\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(source);\n\t\tconst label =\n\t\t\tfilePath ?? (typeof source === \"string\" ? source : \"Uint8Array\");\n\t\tvalidateFontBinaryHeader(buffer, label);\n\t\tSlugFontCache.setEmojiFont(buffer, filePath);\n\t}\n\n\t/** Whether a color emoji font is registered (or set to load from a path / URL). */\n\tpublic static hasEmojiFont(): boolean {\n\t\treturn SlugFontCache.hasEmojiFont();\n\t}\n\n\t/**\n\t * Measures text with the real font, exactly as `Layer.text` lays it out:\n\t * box size, line count, per-glyph positions and caret offsets. Use it to\n\t * size containers, place cursors, underline a word or center by ink\n\t * instead of guessing advances. The family must be registered first.\n\t *\n\t * ```ts\n\t * const m = FontManager.measure(\"Hello\", { fontFamily: \"Inter\", fontSize: 60 });\n\t * m.width; m.caretX(3); m.glyphs[1].x\n\t * ```\n\t */\n\tpublic static measure(\n\t\ttext: string,\n\t\toptions: MeasureTextOptions,\n\t): TextMetrics {\n\t\tconst fontSize = options.fontSize ?? 48;\n\t\tconst font = SlugFontCache.getFont(\n\t\t\toptions.fontFamily,\n\t\t\toptions.fontWeight,\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tfontSize,\n\t\t);\n\t\tif (!font) {\n\t\t\tthrow new Error(\n\t\t\t\t`FontManager.measure: font \"${options.fontFamily}\" is not registered. ` +\n\t\t\t\t\t\"Call `await FontManager.register(...)` first.\",\n\t\t\t);\n\t\t}\n\t\tconst lineHeight =\n\t\t\toptions.lineHeight !== undefined && options.lineHeight < 10\n\t\t\t\t? options.lineHeight * fontSize\n\t\t\t\t: (options.lineHeight ?? fontSize * 1.2);\n\t\tconst letterSpacing = options.letterSpacing ?? 0;\n\t\tconst { width, height, layout } = SlugGeometry.measure(\n\t\t\ttext,\n\t\t\tfont,\n\t\t\tfontSize,\n\t\t\tletterSpacing,\n\t\t\tlineHeight,\n\t\t\toptions.width,\n\t\t\tundefined,\n\t\t\toptions.direction,\n\t\t);\n\t\tconst scale = fontSize / font.unitsPerEm;\n\t\t// One entry per cluster (a letter with its marks, or a ligature), in\n\t\t// reading order; textIndex maps it back to the string.\n\t\tconst glyphs: MeasuredGlyph[] = [];\n\t\tconst seen = new Set<number>();\n\t\tlet cursor = 0;\n\t\tfor (const g of layout.glyphs) {\n\t\t\tlet index = g.textIndex;\n\t\t\tif (index === undefined) {\n\t\t\t\tconst at = text.indexOf(g.char, cursor);\n\t\t\t\tindex = at >= 0 ? at : cursor;\n\t\t\t}\n\t\t\tif (seen.has(index)) continue;\n\t\t\tseen.add(index);\n\t\t\tcursor = index + g.char.length;\n\t\t\tconst advance =\n\t\t\t\tg.clusterAdvance ?? g.cp.advanceWidth * (g.fontScale ?? scale);\n\t\t\tglyphs.push({\n\t\t\t\tchar: g.char,\n\t\t\t\tindex,\n\t\t\t\tx: g.clusterX ?? g.x,\n\t\t\t\ty: g.y,\n\t\t\t\twidth: advance + letterSpacing,\n\t\t\t\tline: g.lineIndex,\n\t\t\t\t...(g.rtl && { rtl: true }),\n\t\t\t});\n\t\t}\n\t\tconst caretX = (count: number): number => {\n\t\t\tif (count <= 0 || glyphs.length === 0) {\n\t\t\t\tconst first = glyphs[0];\n\t\t\t\tif (!first) return 0;\n\t\t\t\treturn first.rtl ? first.x + first.width - letterSpacing : first.x;\n\t\t\t}\n\t\t\tconst before = glyphs.filter((g) => g.index < count);\n\t\t\tconst last = before[before.length - 1];\n\t\t\tif (!last) return 0;\n\t\t\treturn last.rtl ? last.x : last.x + last.width - letterSpacing;\n\t\t};\n\t\treturn {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tlines: layout.linesCount,\n\t\t\tlineHeight,\n\t\t\tglyphs,\n\t\t\tcaretX,\n\t\t\twidthOf: (count: number) => caretX(count) - (glyphs[0]?.x ?? 0),\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves registered font metadata by family name.\n\t */\n\tpublic static get(family: string): RegisteredFont | undefined {\n\t\treturn FontManager.getInstance().get(family);\n\t}\n\n\t/**\n\t * Checks if a font family has been registered.\n\t */\n\tpublic static has(family: string): boolean {\n\t\treturn FontManager.getInstance().has(family);\n\t}\n\n\t/**\n\t * Returns all currently registered fonts.\n\t */\n\tpublic static getAll(): RegisteredFont[] {\n\t\treturn FontManager.getInstance().getAll();\n\t}\n\n\t/**\n\t * Returns relative or absolute file paths of all registered fonts for composition spec serialization.\n\t */\n\tpublic static getRegisteredFontPaths(): string[] {\n\t\treturn FontManager.getInstance().getRegisteredFontPaths();\n\t}\n\n\t/**\n\t * Clears all registered fonts from the manager.\n\t */\n\tpublic static clear(): void {\n\t\tFontManager.getInstance().clear();\n\t}\n\n\t/**\n\t * Instance registration method with format validation and Slug WebGPU cache population.\n\t */\n\tpublic async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\tlet family: string | undefined;\n\t\tlet rawSource: string | Uint8Array;\n\t\tlet weight: number | string | undefined;\n\t\tlet style: \"normal\" | \"italic\" | \"oblique\" | undefined;\n\n\t\tif (\n\t\t\ttypeof optionsOrFamilyOrSource === \"object\" &&\n\t\t\toptionsOrFamilyOrSource !== null\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource.family;\n\t\t\trawSource = optionsOrFamilyOrSource.source;\n\t\t\tweight = optionsOrFamilyOrSource.weight;\n\t\t\tstyle = optionsOrFamilyOrSource.style;\n\t\t} else if (\n\t\t\ttypeof optionsOrFamilyOrSource === \"string\" &&\n\t\t\tsource !== undefined\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource;\n\t\t\trawSource = source;\n\t\t} else if (typeof optionsOrFamilyOrSource === \"string\") {\n\t\t\tfamily = undefined;\n\t\t\trawSource = optionsOrFamilyOrSource;\n\t\t} else {\n\t\t\tthrow new TypeError(\"Invalid arguments passed to FontManager.register\");\n\t\t}\n\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(rawSource);\n\t\tconst sourceLabel =\n\t\t\tfilePath ?? (typeof rawSource === \"string\" ? rawSource : \"Uint8Array\");\n\t\tconst format = validateFontBinaryHeader(buffer, sourceLabel);\n\n\t\tlet parsedFontkit: fontkit.Font;\n\t\ttry {\n\t\t\tconst parsed = fontkit.create(buffer as unknown as Buffer);\n\t\t\tif (\n\t\t\t\tparsed &&\n\t\t\t\t\"fonts\" in parsed &&\n\t\t\t\tArray.isArray(parsed.fonts) &&\n\t\t\t\tparsed.fonts.length > 0\n\t\t\t) {\n\t\t\t\tparsedFontkit = parsed.fonts[0] as fontkit.Font;\n\t\t\t} else {\n\t\t\t\tparsedFontkit = parsed as fontkit.Font;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to parse TrueType/OpenType font binary for \"${sourceLabel}\": ${msg}`,\n\t\t\t);\n\t\t}\n\n\t\tconst detectedFamily =\n\t\t\tparsedFontkit.familyName ||\n\t\t\tparsedFontkit.postscriptName ||\n\t\t\tpath.parse(sourceLabel).name;\n\t\tconst resolvedFamily = family?.trim() || detectedFamily;\n\n\t\tconst registered: RegisteredFont = {\n\t\t\tfamily: resolvedFamily,\n\t\t\tsource: rawSource,\n\t\t\tfilePath,\n\t\t\tformat,\n\t\t\tpostscriptName: parsedFontkit.postscriptName,\n\t\t\tunitsPerEm: parsedFontkit.unitsPerEm,\n\t\t\tweight,\n\t\t\tstyle,\n\t\t};\n\n\t\tthis.fonts.set(resolvedFamily, registered);\n\n\t\tsetRegisteredFontSource(resolvedFamily, filePath ?? rawSource);\n\t\t// Populate headless font registries\n\t\tif (filePath) {\n\t\t\tawait registerHeadlessFont(resolvedFamily, filePath);\n\t\t}\n\t\tSlugFontCache.setParsed(resolvedFamily, parsedFontkit);\n\n\t\treturn registered;\n\t}\n\n\tpublic get(family: string): RegisteredFont | undefined {\n\t\treturn this.fonts.get(family);\n\t}\n\n\tpublic has(family: string): boolean {\n\t\treturn this.fonts.has(family);\n\t}\n\n\tpublic getAll(): RegisteredFont[] {\n\t\treturn Array.from(this.fonts.values());\n\t}\n\n\tpublic getRegisteredFontPaths(): string[] {\n\t\tconst paths: string[] = [];\n\t\tfor (const font of this.fonts.values()) {\n\t\t\tif (font.filePath) {\n\t\t\t\tpaths.push(font.filePath);\n\t\t\t} else if (typeof font.source === \"string\") {\n\t\t\t\tpaths.push(font.source);\n\t\t\t}\n\t\t}\n\t\treturn paths;\n\t}\n\n\tpublic clear(): void {\n\t\tthis.fonts.clear();\n\t}\n}\n"],"mappings":";;;;;;AAiCA,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AAExB,SAAS,yBACR,OACA,aAC0B;AAC1B,KAAI,MAAM,SAAS,GAClB,OAAM,IAAI,MACT,4BAA4B,YAAY,gBAAgB,MAAM,OAAO,+DACrE;CAGF,MAAM,OACH,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,KACnB,MAAM,MAAM;AAEd,KACC,QAAQ,mBACR,QAAQ,sBACR,QAAQ,sBACR,QAAQ,gBAER,QAAO;AAGR,KAAI,QAAQ,kBACX,QAAO;CA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GACR,QAAQ;GACR;GACA;GACA,gBAAgB,cAAc;GAC9B,YAAY,cAAc;GAC1B;GACA;GACA;AAED,OAAK,MAAM,IAAI,gBAAgB,WAAW;AAE1C,0BAAwB,gBAAgB,YAAY,UAAU;AAE9D,MAAI,SACH,OAAM,qBAAqB,gBAAgB,SAAS;AAErD,gBAAc,UAAU,gBAAgB,cAAc;AAEtD,SAAO;;CAGR,AAAO,IAAI,QAA4C;AACtD,SAAO,KAAK,MAAM,IAAI,OAAO;;CAG9B,AAAO,IAAI,QAAyB;AACnC,SAAO,KAAK,MAAM,IAAI,OAAO;;CAG9B,AAAO,SAA2B;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,QAAQ,CAAC;;CAGvC,AAAO,yBAAmC;EACzC,MAAM,QAAkB,EAAE;AAC1B,OAAK,MAAM,QAAQ,KAAK,MAAM,QAAQ,CACrC,KAAI,KAAK,SACR,OAAM,KAAK,KAAK,SAAS;WACf,OAAO,KAAK,WAAW,SACjC,OAAM,KAAK,KAAK,OAAO;AAGzB,SAAO;;CAGR,AAAO,QAAc;AACpB,OAAK,MAAM,OAAO"}
1
+ {"version":3,"file":"fonts-OW3yAfO5.mjs","names":[],"sources":["../src/fonts/manager.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n\tregisterHeadlessFont,\n\tSlugFontCache,\n\tSlugGeometry,\n\tsetRegisteredFontSource,\n} from \"@framefields/webgpu-renderers\";\nimport * as fontkit from \"fontkit\";\n\nexport interface RegisterFontOptions {\n\tfamily?: string;\n\tsource: string | Uint8Array;\n\tweight?: number | string;\n\tstyle?: \"normal\" | \"italic\" | \"oblique\";\n}\n\nexport interface RegisteredFont {\n\tfamily: string;\n\tsource: string | Uint8Array;\n\tfilePath?: string;\n\tformat: \"truetype\" | \"opentype\";\n\tpostscriptName?: string;\n\tunitsPerEm?: number;\n\tweight?: number | string;\n\tstyle?: string;\n}\n\ninterface ResolvedSource {\n\tbuffer: Uint8Array;\n\tfilePath?: string;\n}\n\nconst SFNT_TRUETYPE_1 = 0x00010000;\nconst SFNT_TRUETYPE_TRUE = 0x74727565; // 'true'\nconst SFNT_TRUETYPE_TYP1 = 0x74797031; // 'typ1'\nconst SFNT_OPENTYPE_CFF = 0x4f54544f; // 'OTTO'\nconst SFNT_COLLECTION = 0x74746366; // 'ttcf'\n\nfunction validateFontBinaryHeader(\n\tbytes: Uint8Array,\n\tsourceLabel: string,\n): \"truetype\" | \"opentype\" {\n\tif (bytes.length < 12) {\n\t\tthrow new Error(\n\t\t\t`Invalid font binary for \"${sourceLabel}\": File size (${bytes.length} bytes) is too small to be a valid TrueType or OpenType font.`,\n\t\t);\n\t}\n\n\tconst tag =\n\t\t((bytes[0] ?? 0) << 24) |\n\t\t((bytes[1] ?? 0) << 16) |\n\t\t((bytes[2] ?? 0) << 8) |\n\t\t(bytes[3] ?? 0);\n\n\tif (\n\t\ttag === SFNT_TRUETYPE_1 ||\n\t\ttag === SFNT_TRUETYPE_TRUE ||\n\t\ttag === SFNT_TRUETYPE_TYP1 ||\n\t\ttag === SFNT_COLLECTION\n\t) {\n\t\treturn \"truetype\";\n\t}\n\n\tif (tag === SFNT_OPENTYPE_CFF) {\n\t\treturn \"opentype\";\n\t}\n\n\tconst hexTag = (tag >>> 0).toString(16).padStart(8, \"0\");\n\tthrow new Error(\n\t\t`Invalid font format for \"${sourceLabel}\": Expected a valid TrueType (.ttf) or OpenType (.otf) font binary. Found header tag: 0x${hexTag}.`,\n\t);\n}\n\nasync function resolveSourceBuffer(\n\tsource: string | Uint8Array,\n): Promise<ResolvedSource> {\n\tif (source instanceof Uint8Array) {\n\t\treturn { buffer: source };\n\t}\n\n\tif (typeof source !== \"string\") {\n\t\tthrow new TypeError(\n\t\t\t`Font source must be a file path string or Uint8Array, received: ${typeof source}`,\n\t\t);\n\t}\n\n\tlet cleanPath = source;\n\tif (cleanPath.startsWith(\"http://\") || cleanPath.startsWith(\"https://\")) {\n\t\tconst res = await fetch(cleanPath);\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to download font from \"${cleanPath}\": HTTP ${res.status} ${res.statusText}`,\n\t\t\t);\n\t\t}\n\t\tconst arrayBuffer = await res.arrayBuffer();\n\t\treturn {\n\t\t\tbuffer: new Uint8Array(arrayBuffer),\n\t\t\tfilePath: cleanPath,\n\t\t};\n\t}\n\n\tif (cleanPath.startsWith(\"file://\")) {\n\t\ttry {\n\t\t\t// A URL path is percent-encoded (\"My%20Film\"); files aren't. On\n\t\t\t// Windows \"/C:/…\" loses its leading slash.\n\t\t\tcleanPath = decodeURIComponent(new URL(cleanPath).pathname).replace(\n\t\t\t\t/^\\/([A-Za-z]:)/,\n\t\t\t\t\"$1\",\n\t\t\t);\n\t\t} catch {\n\t\t\tcleanPath = cleanPath.replace(/^file:\\/\\//, \"\");\n\t\t}\n\t}\n\n\tconst candidates: string[] = [\n\t\tcleanPath,\n\t\tpath.resolve(process.cwd(), cleanPath),\n\t\tpath.resolve(process.cwd(), \"assets/fonts\", cleanPath),\n\t\tpath.resolve(process.cwd(), \"assets/fonts\", path.basename(cleanPath)),\n\t];\n\n\t// Upward traversal to locate fonts in parent monorepo roots\n\tlet currentDir = process.cwd();\n\tfor (let i = 0; i < 5; i++) {\n\t\tcandidates.push(path.resolve(currentDir, cleanPath));\n\t\tcandidates.push(\n\t\t\tpath.resolve(currentDir, \"assets/fonts\", path.basename(cleanPath)),\n\t\t);\n\t\tconst parent = path.dirname(currentDir);\n\t\tif (parent === currentDir) break;\n\t\tcurrentDir = parent;\n\t}\n\n\tlet resolvedPath: string | null = null;\n\tlet fileBuffer: Buffer | null = null;\n\n\tfor (const candidate of candidates) {\n\t\ttry {\n\t\t\tconst stat = await fs.stat(candidate);\n\t\t\tif (stat.isFile()) {\n\t\t\t\tresolvedPath = candidate;\n\t\t\t\tfileBuffer = await fs.readFile(candidate);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch {\n\t\t\t// Continue searching next candidate\n\t\t}\n\t}\n\n\tif (!resolvedPath || !fileBuffer) {\n\t\tthrow new Error(\n\t\t\t`Font file not found: \"${source}\". Checked candidate locations:\\n - ${candidates.join(\"\\n - \")}`,\n\t\t);\n\t}\n\n\treturn {\n\t\tbuffer: new Uint8Array(\n\t\t\tfileBuffer.buffer,\n\t\t\tfileBuffer.byteOffset,\n\t\t\tfileBuffer.byteLength,\n\t\t),\n\t\tfilePath: resolvedPath,\n\t};\n}\n\n/**\n * Central singleton manager for font registration, TTF validation, and compositor typography binding.\n */\nexport interface MeasureTextOptions {\n\tfontFamily: string;\n\tfontSize?: number;\n\tfontWeight?: string | number;\n\t/** Extra px between characters, as on `Layer.text`. */\n\tletterSpacing?: number;\n\t/** Multiplier of fontSize when < 10, else px. Default 1.2. */\n\tlineHeight?: number;\n\t/** Wrap width in px; omit for one line per `\\n`. */\n\twidth?: number;\n\talign?: \"left\" | \"center\" | \"right\";\n\t/** Paragraph base direction, as on `Layer.text`. Default \"auto\". */\n\tdirection?: \"ltr\" | \"rtl\" | \"auto\";\n}\n\nexport interface MeasuredGlyph {\n\tchar: string;\n\t/** Index into the string (code units), matching `text.slice`. */\n\tindex: number;\n\t/** Left edge of the glyph, relative to the text box. */\n\tx: number;\n\t/** Baseline-relative top of the line box. */\n\ty: number;\n\t/** Advance width in px. */\n\twidth: number;\n\tline: number;\n\t/** Part of a right-to-left run: reading continues to the left. */\n\trtl?: boolean;\n}\n\nexport interface TextMetrics {\n\twidth: number;\n\theight: number;\n\tlines: number;\n\t/** Line box height in px. */\n\tlineHeight: number;\n\tglyphs: MeasuredGlyph[];\n\t/**\n\t * X of a caret placed after `count` characters (0 = before the first),\n\t * relative to the text box. In right-to-left text the caret sits on the\n\t * left of the last character. Pair with a `.keys(\"text\", …)` reveal to make\n\t * a cursor follow typing exactly.\n\t */\n\tcaretX(count: number): number;\n\t/** Width of the first `count` characters (same as `caretX` on one line). */\n\twidthOf(count: number): number;\n}\n\nexport class FontManager {\n\tprivate static instance: FontManager | null = null;\n\tprivate readonly fonts = new Map<string, RegisteredFont>();\n\n\tprivate constructor() {}\n\n\t/**\n\t * Returns the singleton FontManager instance.\n\t */\n\tpublic static getInstance(): FontManager {\n\t\tif (!FontManager.instance) {\n\t\t\tFontManager.instance = new FontManager();\n\t\t}\n\t\treturn FontManager.instance;\n\t}\n\n\t/**\n\t * Registers a TrueType/OpenType font into the Framefields engine with validation.\n\t */\n\tpublic static async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\treturn FontManager.getInstance().register(optionsOrFamilyOrSource, source);\n\t}\n\n\t/**\n\t * Sets the color emoji font text draws emoji with, for the preview and the\n\t * export alike: a CBDT/CBLC bitmap font such as Noto Color Emoji, as a file\n\t * path, URL or bytes. framefields ships none; without one, exports draw\n\t * nothing for emoji.\n\t */\n\tpublic static async registerEmojiFont(\n\t\tsource: string | Uint8Array,\n\t): Promise<void> {\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(source);\n\t\tconst label =\n\t\t\tfilePath ?? (typeof source === \"string\" ? source : \"Uint8Array\");\n\t\tvalidateFontBinaryHeader(buffer, label);\n\t\tSlugFontCache.setEmojiFont(buffer, filePath);\n\t}\n\n\t/** Whether a color emoji font is registered (or set to load from a path / URL). */\n\tpublic static hasEmojiFont(): boolean {\n\t\treturn SlugFontCache.hasEmojiFont();\n\t}\n\n\t/**\n\t * Measures text with the real font, exactly as `Layer.text` lays it out:\n\t * box size, line count, per-glyph positions and caret offsets. Use it to\n\t * size containers, place cursors, underline a word or center by ink\n\t * instead of guessing advances. The family must be registered first.\n\t *\n\t * ```ts\n\t * const m = FontManager.measure(\"Hello\", { fontFamily: \"Inter\", fontSize: 60 });\n\t * m.width; m.caretX(3); m.glyphs[1].x\n\t * ```\n\t */\n\tpublic static measure(\n\t\ttext: string,\n\t\toptions: MeasureTextOptions,\n\t): TextMetrics {\n\t\tconst fontSize = options.fontSize ?? 48;\n\t\tconst font = SlugFontCache.getFont(\n\t\t\toptions.fontFamily,\n\t\t\toptions.fontWeight,\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tfontSize,\n\t\t);\n\t\tif (!font) {\n\t\t\tthrow new Error(\n\t\t\t\t`FontManager.measure: font \"${options.fontFamily}\" is not registered. ` +\n\t\t\t\t\t\"Call `await FontManager.register(...)` first.\",\n\t\t\t);\n\t\t}\n\t\tconst lineHeight =\n\t\t\toptions.lineHeight !== undefined && options.lineHeight < 10\n\t\t\t\t? options.lineHeight * fontSize\n\t\t\t\t: (options.lineHeight ?? fontSize * 1.2);\n\t\tconst letterSpacing = options.letterSpacing ?? 0;\n\t\tconst { width, height, layout } = SlugGeometry.measure(\n\t\t\ttext,\n\t\t\tfont,\n\t\t\tfontSize,\n\t\t\tletterSpacing,\n\t\t\tlineHeight,\n\t\t\toptions.width,\n\t\t\tundefined,\n\t\t\toptions.direction,\n\t\t);\n\t\tconst scale = fontSize / font.unitsPerEm;\n\t\t// One entry per cluster (a letter with its marks, or a ligature), in\n\t\t// reading order; textIndex maps it back to the string.\n\t\tconst glyphs: MeasuredGlyph[] = [];\n\t\tconst seen = new Set<number>();\n\t\tlet cursor = 0;\n\t\tfor (const g of layout.glyphs) {\n\t\t\tlet index = g.textIndex;\n\t\t\tif (index === undefined) {\n\t\t\t\tconst at = text.indexOf(g.char, cursor);\n\t\t\t\tindex = at >= 0 ? at : cursor;\n\t\t\t}\n\t\t\tif (seen.has(index)) continue;\n\t\t\tseen.add(index);\n\t\t\tcursor = index + g.char.length;\n\t\t\tconst advance =\n\t\t\t\tg.clusterAdvance ?? g.cp.advanceWidth * (g.fontScale ?? scale);\n\t\t\tglyphs.push({\n\t\t\t\tchar: g.char,\n\t\t\t\tindex,\n\t\t\t\tx: g.clusterX ?? g.x,\n\t\t\t\ty: g.y,\n\t\t\t\twidth: advance + letterSpacing,\n\t\t\t\tline: g.lineIndex,\n\t\t\t\t...(g.rtl && { rtl: true }),\n\t\t\t});\n\t\t}\n\t\tconst caretX = (count: number): number => {\n\t\t\tif (count <= 0 || glyphs.length === 0) {\n\t\t\t\tconst first = glyphs[0];\n\t\t\t\tif (!first) return 0;\n\t\t\t\treturn first.rtl ? first.x + first.width - letterSpacing : first.x;\n\t\t\t}\n\t\t\tconst before = glyphs.filter((g) => g.index < count);\n\t\t\tconst last = before[before.length - 1];\n\t\t\tif (!last) return 0;\n\t\t\treturn last.rtl ? last.x : last.x + last.width - letterSpacing;\n\t\t};\n\t\treturn {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tlines: layout.linesCount,\n\t\t\tlineHeight,\n\t\t\tglyphs,\n\t\t\tcaretX,\n\t\t\twidthOf: (count: number) => caretX(count) - (glyphs[0]?.x ?? 0),\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves registered font metadata by family name.\n\t */\n\tpublic static get(family: string): RegisteredFont | undefined {\n\t\treturn FontManager.getInstance().get(family);\n\t}\n\n\t/**\n\t * Checks if a font family has been registered.\n\t */\n\tpublic static has(family: string): boolean {\n\t\treturn FontManager.getInstance().has(family);\n\t}\n\n\t/**\n\t * Returns all currently registered fonts.\n\t */\n\tpublic static getAll(): RegisteredFont[] {\n\t\treturn FontManager.getInstance().getAll();\n\t}\n\n\t/**\n\t * Returns relative or absolute file paths of all registered fonts for composition spec serialization.\n\t */\n\tpublic static getRegisteredFontPaths(): string[] {\n\t\treturn FontManager.getInstance().getRegisteredFontPaths();\n\t}\n\n\t/**\n\t * Clears all registered fonts from the manager.\n\t */\n\tpublic static clear(): void {\n\t\tFontManager.getInstance().clear();\n\t}\n\n\t/**\n\t * Instance registration method with format validation and Slug WebGPU cache population.\n\t */\n\tpublic async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\tlet family: string | undefined;\n\t\tlet rawSource: string | Uint8Array;\n\t\tlet weight: number | string | undefined;\n\t\tlet style: \"normal\" | \"italic\" | \"oblique\" | undefined;\n\n\t\tif (\n\t\t\ttypeof optionsOrFamilyOrSource === \"object\" &&\n\t\t\toptionsOrFamilyOrSource !== null\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource.family;\n\t\t\trawSource = optionsOrFamilyOrSource.source;\n\t\t\tweight = optionsOrFamilyOrSource.weight;\n\t\t\tstyle = optionsOrFamilyOrSource.style;\n\t\t} else if (\n\t\t\ttypeof optionsOrFamilyOrSource === \"string\" &&\n\t\t\tsource !== undefined\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource;\n\t\t\trawSource = source;\n\t\t} else if (typeof optionsOrFamilyOrSource === \"string\") {\n\t\t\tfamily = undefined;\n\t\t\trawSource = optionsOrFamilyOrSource;\n\t\t} else {\n\t\t\tthrow new TypeError(\"Invalid arguments passed to FontManager.register\");\n\t\t}\n\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(rawSource);\n\t\tconst sourceLabel =\n\t\t\tfilePath ?? (typeof rawSource === \"string\" ? rawSource : \"Uint8Array\");\n\t\tconst format = validateFontBinaryHeader(buffer, sourceLabel);\n\n\t\tlet parsedFontkit: fontkit.Font;\n\t\ttry {\n\t\t\tconst parsed = fontkit.create(buffer as unknown as Buffer);\n\t\t\tif (\n\t\t\t\tparsed &&\n\t\t\t\t\"fonts\" in parsed &&\n\t\t\t\tArray.isArray(parsed.fonts) &&\n\t\t\t\tparsed.fonts.length > 0\n\t\t\t) {\n\t\t\t\tparsedFontkit = parsed.fonts[0] as fontkit.Font;\n\t\t\t} else {\n\t\t\t\tparsedFontkit = parsed as fontkit.Font;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to parse TrueType/OpenType font binary for \"${sourceLabel}\": ${msg}`,\n\t\t\t);\n\t\t}\n\n\t\tconst detectedFamily =\n\t\t\tparsedFontkit.familyName ||\n\t\t\tparsedFontkit.postscriptName ||\n\t\t\tpath.parse(sourceLabel).name;\n\t\tconst resolvedFamily = family?.trim() || detectedFamily;\n\n\t\tconst registered: RegisteredFont = {\n\t\t\tfamily: resolvedFamily,\n\t\t\tsource: rawSource,\n\t\t\tfilePath,\n\t\t\tformat,\n\t\t\tpostscriptName: parsedFontkit.postscriptName,\n\t\t\tunitsPerEm: parsedFontkit.unitsPerEm,\n\t\t\tweight,\n\t\t\tstyle,\n\t\t};\n\n\t\tthis.fonts.set(resolvedFamily, registered);\n\n\t\tsetRegisteredFontSource(resolvedFamily, filePath ?? rawSource);\n\t\t// Populate headless font registries\n\t\tif (filePath) {\n\t\t\tawait registerHeadlessFont(resolvedFamily, filePath);\n\t\t}\n\t\tSlugFontCache.setParsed(resolvedFamily, parsedFontkit);\n\n\t\treturn registered;\n\t}\n\n\tpublic get(family: string): RegisteredFont | undefined {\n\t\treturn this.fonts.get(family);\n\t}\n\n\tpublic has(family: string): boolean {\n\t\treturn this.fonts.has(family);\n\t}\n\n\tpublic getAll(): RegisteredFont[] {\n\t\treturn Array.from(this.fonts.values());\n\t}\n\n\tpublic getRegisteredFontPaths(): string[] {\n\t\tconst paths: string[] = [];\n\t\tfor (const font of this.fonts.values()) {\n\t\t\tif (font.filePath) {\n\t\t\t\tpaths.push(font.filePath);\n\t\t\t} else if (typeof font.source === \"string\") {\n\t\t\t\tpaths.push(font.source);\n\t\t\t}\n\t\t}\n\t\treturn paths;\n\t}\n\n\tpublic clear(): void {\n\t\tthis.fonts.clear();\n\t}\n}\n"],"mappings":";;;;;;AAiCA,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AAExB,SAAS,yBACR,OACA,aAC0B;AAC1B,KAAI,MAAM,SAAS,GAClB,OAAM,IAAI,MACT,4BAA4B,YAAY,gBAAgB,MAAM,OAAO,+DACrE;CAGF,MAAM,OACH,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,KACnB,MAA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d,cAAc,kBACd,KAAK,MAAM,YAAY,CAAC;EACzB,MAAM,iBAAiB,QAAQ,MAAM,IAAI;EAEzC,MAAM,aAA6B;GAClC,QAAQ;GACR,QAAQ;GACR;GACA;GACA,gBAAgB,cAAc;GAC9B,YAAY,cAAc;GAC1B;GACA;GACA;AAED,OAAK,MAAM,IAAI,gBAAgB,WAAW;AAE1C,0BAAwB,gBAAgB,YAAY,UAAU;AAE9D,MAAI,SACH,OAAM,qBAAqB,gBAAgB,SAAS;AAErD,gBAAc,UAAU,gBAAgB,cAAc;AAEtD,SAAO;;CAGR,AAAO,IAAI,QAA4C;AACtD,SAAO,KAAK,MAAM,IAAI,OAAO;;CAG9B,AAAO,IAAI,QAAyB;AACnC,SAAO,KAAK,MAAM,IAAI,OAAO;;CAG9B,AAAO,SAA2B;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,QAAQ,CAAC;;CAGvC,AAAO,yBAAmC;EACzC,MAAM,QAAkB,EAAE;AAC1B,OAAK,MAAM,QAAQ,KAAK,MAAM,QAAQ,CACrC,KAAI,KAAK,SACR,OAAM,KAAK,KAAK,SAAS;WACf,OAAO,KAAK,WAAW,SACjC,OAAM,KAAK,KAAK,OAAO;AAGzB,SAAO;;CAGR,AAAO,QAAc;AACpB,OAAK,MAAM,OAAO"}
@@ -1,4 +1,4 @@
1
- import { Hn as signalRegistry } from "./dist-DtPPPsZV.mjs";
1
+ import { Hn as signalRegistry } from "./dist--Uu5bQ_6.mjs";
2
2
 
3
3
  //#region ../node-sdk/dist/gpu.mjs
4
4
  const TRANSPARENT = {
@@ -220,4 +220,4 @@ function drawFullscreenPass(encoder, target, pipeline, bindGroups) {
220
220
 
221
221
  //#endregion
222
222
  export { createFullscreenPipeline as a, drawTextureToTarget as c, pixelScale as d, signalTextureView as f, beginTargetPass as i, fragmentBindGroupLayout as l, texturesLayout as m, PREMULTIPLIED_BLEND as n, drawChildToTexture as o, signalTiming as p, STRAIGHT_ALPHA_BLEND as r, drawFullscreenPass as s, FULLSCREEN_QUAD_WGSL as t, perDevice as u };
223
- //# sourceMappingURL=gpu-D2HT3KcE.mjs.map
223
+ //# sourceMappingURL=gpu-R4T2Tndu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"gpu-D2HT3KcE.mjs","names":[],"sources":["../../node-sdk/dist/gpu.mjs"],"sourcesContent":["import { signalRegistry } from \"@framefields/webgpu-renderers\";\n\n//#region renderer/gpu.ts\nconst TRANSPARENT = {\n\tr: 0,\n\tg: 0,\n\tb: 0,\n\ta: 0\n};\n/**\n* Full-screen quad vertex stage: a 4-vertex triangle strip (draw(4)) that\n* hands `in.uv` (0,0 top-left → 1,1 bottom-right) to an `fs` reading `VSOut`.\n*/\nconst FULLSCREEN_QUAD_WGSL = `\nstruct VSOut {\n @builtin(position) pos : vec4<f32>,\n @location(0) uv : vec2<f32>,\n};\n\n@vertex fn vs(@builtin(vertex_index) vi: u32) -> VSOut {\n var pos = array<vec2<f32>, 4>(\n vec2<f32>(-1.0, 1.0),\n vec2<f32>(1.0, 1.0),\n vec2<f32>(-1.0, -1.0),\n vec2<f32>(1.0, -1.0)\n );\n var uv = array<vec2<f32>, 4>(\n vec2<f32>(0.0, 0.0),\n vec2<f32>(1.0, 0.0),\n vec2<f32>(0.0, 1.0),\n vec2<f32>(1.0, 1.0)\n );\n return VSOut(vec4<f32>(pos[vi], 0.0, 1.0), uv[vi]);\n}\n`;\n/** Premultiplied-alpha \"over\" blending. */\nconst PREMULTIPLIED_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** Straight-alpha color over a premultiplied-alpha accumulation. */\nconst STRAIGHT_ALPHA_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"src-alpha\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** A bind group layout whose entries are bound at 0, 1, 2… in order. */\nfunction fragmentBindGroupLayout(device, bindings, label) {\n\treturn device.createBindGroupLayout({\n\t\t...label && { label },\n\t\tentries: bindings.map((binding, index) => {\n\t\t\tif (binding === \"uniform\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tbuffer: { type: \"uniform\" }\n\t\t\t};\n\t\t\tif (binding === \"texture\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\ttexture: { sampleType: \"float\" }\n\t\t\t};\n\t\t\tif (binding === \"sampler\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tsampler: { type: \"filtering\" }\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\t...binding,\n\t\t\t\tbinding: index\n\t\t\t};\n\t\t})\n\t});\n}\n/** `count` float textures followed by one filtering sampler. */\nfunction texturesLayout(device, count) {\n\treturn fragmentBindGroupLayout(device, [...Array(count).fill(\"texture\"), \"sampler\"]);\n}\n/** Memoizes `create` per GPUDevice (resources can't cross devices). */\nfunction perDevice(create) {\n\tconst cache = /* @__PURE__ */ new WeakMap();\n\treturn (device) => {\n\t\tlet value = cache.get(device);\n\t\tif (value === void 0) {\n\t\t\tvalue = create(device);\n\t\t\tcache.set(device, value);\n\t\t}\n\t\treturn value;\n\t};\n}\n/** A triangle-strip pipeline drawing one full-screen quad (`draw(4)`). */\nfunction createFullscreenPipeline(device, options) {\n\tconst { module, format, blend } = options;\n\treturn device.createRenderPipeline({\n\t\t...options.label && { label: options.label },\n\t\tlayout: Array.isArray(options.layouts) ? device.createPipelineLayout({ bindGroupLayouts: options.layouts }) : options.layouts,\n\t\tvertex: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.vertexEntryPoint ?? \"vs\"\n\t\t},\n\t\tfragment: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.fragmentEntryPoint ?? \"fs\",\n\t\t\ttargets: [blend ? {\n\t\t\t\tformat,\n\t\t\t\tblend\n\t\t\t} : { format }]\n\t\t},\n\t\tprimitive: { topology: \"triangle-strip\" }\n\t});\n}\n/**\n* Renders `child` into a cleared temporary texture with an identity\n* transform and a full-size scissor, and returns that texture.\n*/\nasync function drawChildToTexture(args, child, options = {}) {\n\tconst { ctx, encoder, props } = args;\n\tconst width = options.width ?? args.targetWidth;\n\tconst height = options.height ?? args.targetHeight;\n\tconst texture = ctx.renderer.getTemporaryTexture(width, height, [\n\t\t...props.excludeTextures || [],\n\t\targs.targetTexture,\n\t\t...options.exclude ?? []\n\t]);\n\tconst view = texture.createView();\n\tctx.renderer.beginFrame(encoder, view, TRANSPARENT, width, height, \"clear\").end();\n\tctx.renderer.pushScissor({\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t});\n\tctx.renderer.pushIdentity();\n\tawait args.drawChild(child, options.props ?? {\n\t\t...props,\n\t\tvirtualMedia: child\n\t}, view, texture, width, height);\n\tctx.renderer.popTransform();\n\tctx.renderer.popScissor();\n\treturn {\n\t\ttexture,\n\t\tview\n\t};\n}\n/**\n* Opens a \"load\" pass on the node's target and makes it the node's current\n* pass (the caller hands it back to the compositor).\n*/\nfunction beginTargetPass(args, width = args.targetWidth, height = args.targetHeight) {\n\tconst pass = args.ctx.renderer.beginFrame(args.encoder, args.targetView, TRANSPARENT, width, height, \"load\");\n\targs.pass = pass;\n\treturn pass;\n}\n/**\n* Target pixels per layout pixel (`props.pixelScale`, 1 when unset). A\n* renderer multiplies its pixel-unit parameters by it and declares\n* `maxPixelScale`.\n*/\nfunction pixelScale(args) {\n\treturn args.props.pixelScale ?? 1;\n}\n/** Draws `texture` over the whole target at `opacity` (the node's output). */\nfunction drawTextureToTarget(args, texture, opacity = 1) {\n\tconst { targetWidth: width, targetHeight: height } = args;\n\targs.ctx.renderer.drawTexture(beginTargetPass(args), texture, {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t}, { opacity });\n}\n/** Clock a signal texture is evaluated at, in seconds. */\nfunction signalTiming(props, frame, fps, fallbackDurationSeconds = 0) {\n\tconst metadataDurationMs = props.virtualMedia?.metadata?.durationMs;\n\treturn {\n\t\telapsedSeconds: props.elapsedMs !== void 0 ? props.elapsedMs / 1e3 : frame / fps,\n\t\tdurationSeconds: metadataDurationMs ? metadataDurationMs / 1e3 : props.durationMs !== void 0 ? props.durationMs / 1e3 : fallbackDurationSeconds\n\t};\n}\n/**\n* The texture a bound parameter samples: its own GPU binding, the signal's\n* texture (cached under `sd.nodeId`, else `fallbackId`), or a 1×1 dummy.\n*/\nfunction signalTextureView(sc, param, fallbackId) {\n\tconst { args } = sc;\n\tif (param.gpuTextureView) return param.gpuTextureView;\n\tif (param.hasStaticSig && param.sd) return signalRegistry.getOrCreate2DTextureView(args.ctx.device, args.encoder, param.sd.nodeId ?? fallbackId, sc.elapsedSeconds, sc.durationSeconds, param.sd, sc.width, sc.height, args.props.renderId, sc.frame, sc.fps);\n\treturn signalRegistry.getDummy1x1TextureView(args.ctx.device);\n}\n/** Clears `target` to transparent and draws one full-screen quad into it. */\nfunction drawFullscreenPass(encoder, target, pipeline, bindGroups) {\n\tconst pass = encoder.beginRenderPass({ colorAttachments: [{\n\t\tview: target,\n\t\tloadOp: \"clear\",\n\t\tstoreOp: \"store\",\n\t\tclearValue: TRANSPARENT\n\t}] });\n\tpass.setPipeline(pipeline);\n\tbindGroups.forEach((group, index) => {\n\t\tpass.setBindGroup(index, group);\n\t});\n\tpass.draw(4);\n\tpass.end();\n}\n\n//#endregion\nexport { FULLSCREEN_QUAD_WGSL, PREMULTIPLIED_BLEND, STRAIGHT_ALPHA_BLEND, beginTargetPass, createFullscreenPipeline, drawChildToTexture, drawFullscreenPass, drawTextureToTarget, fragmentBindGroupLayout, perDevice, pixelScale, signalTextureView, signalTiming, texturesLayout };\n//# sourceMappingURL=gpu.mjs.map"],"mappings":";;;AAGA,MAAM,cAAc;CACnB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH;;;;;AAKD,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;AAuB7B,MAAM,sBAAsB;CAC3B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,MAAM,uBAAuB;CAC5B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,SAAS,wBAAwB,QAAQ,UAAU,OAAO;AACzD,QAAO,OAAO,sBAAsB;EACnC,GAAG,SAAS,EAAE,OAAO;EACrB,SAAS,SAAS,KAAK,SAAS,UAAU;AACzC,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,QAAQ,EAAE,MAAM,WAAW;IAC3B;AACD,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,SAAS,EAAE,YAAY,SAAS;IAChC;AACD,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,SAAS,EAAE,MAAM,aAAa;IAC9B;AACD,UAAO;IACN,YAAY,eAAe;IAC3B,GAAG;IACH,SAAS;IACT;IACA;EACF,CAAC;;;AAGH,SAAS,eAAe,QAAQ,OAAO;AACtC,QAAO,wBAAwB,QAAQ,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,UAAU,EAAE,UAAU,CAAC;;;AAGrF,SAAS,UAAU,QAAQ;CAC1B,MAAM,wBAAwB,IAAI,SAAS;AAC3C,SAAQ,WAAW;EAClB,IAAI,QAAQ,MAAM,IA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zD,MAAM;EACN,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,CAAC,EAAE,CAAC;AACL,MAAK,YAAY,SAAS;AAC1B,YAAW,SAAS,OAAO,UAAU;AACpC,OAAK,aAAa,OAAO,MAAM;GAC9B;AACF,MAAK,KAAK,EAAE;AACZ,MAAK,KAAK"}
1
+ {"version":3,"file":"gpu-R4T2Tndu.mjs","names":[],"sources":["../../node-sdk/dist/gpu.mjs"],"sourcesContent":["import { signalRegistry } from \"@framefields/webgpu-renderers\";\n\n//#region renderer/gpu.ts\nconst TRANSPARENT = {\n\tr: 0,\n\tg: 0,\n\tb: 0,\n\ta: 0\n};\n/**\n* Full-screen quad vertex stage: a 4-vertex triangle strip (draw(4)) that\n* hands `in.uv` (0,0 top-left → 1,1 bottom-right) to an `fs` reading `VSOut`.\n*/\nconst FULLSCREEN_QUAD_WGSL = `\nstruct VSOut {\n @builtin(position) pos : vec4<f32>,\n @location(0) uv : vec2<f32>,\n};\n\n@vertex fn vs(@builtin(vertex_index) vi: u32) -> VSOut {\n var pos = array<vec2<f32>, 4>(\n vec2<f32>(-1.0, 1.0),\n vec2<f32>(1.0, 1.0),\n vec2<f32>(-1.0, -1.0),\n vec2<f32>(1.0, -1.0)\n );\n var uv = array<vec2<f32>, 4>(\n vec2<f32>(0.0, 0.0),\n vec2<f32>(1.0, 0.0),\n vec2<f32>(0.0, 1.0),\n vec2<f32>(1.0, 1.0)\n );\n return VSOut(vec4<f32>(pos[vi], 0.0, 1.0), uv[vi]);\n}\n`;\n/** Premultiplied-alpha \"over\" blending. */\nconst PREMULTIPLIED_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** Straight-alpha color over a premultiplied-alpha accumulation. */\nconst STRAIGHT_ALPHA_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"src-alpha\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** A bind group layout whose entries are bound at 0, 1, 2… in order. */\nfunction fragmentBindGroupLayout(device, bindings, label) {\n\treturn device.createBindGroupLayout({\n\t\t...label && { label },\n\t\tentries: bindings.map((binding, index) => {\n\t\t\tif (binding === \"uniform\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tbuffer: { type: \"uniform\" }\n\t\t\t};\n\t\t\tif (binding === \"texture\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\ttexture: { sampleType: \"float\" }\n\t\t\t};\n\t\t\tif (binding === \"sampler\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tsampler: { type: \"filtering\" }\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\t...binding,\n\t\t\t\tbinding: index\n\t\t\t};\n\t\t})\n\t});\n}\n/** `count` float textures followed by one filtering sampler. */\nfunction texturesLayout(device, count) {\n\treturn fragmentBindGroupLayout(device, [...Array(count).fill(\"texture\"), \"sampler\"]);\n}\n/** Memoizes `create` per GPUDevice (resources can't cross devices). */\nfunction perDevice(create) {\n\tconst cache = /* @__PURE__ */ new WeakMap();\n\treturn (device) => {\n\t\tlet value = cache.get(device);\n\t\tif (value === void 0) {\n\t\t\tvalue = create(device);\n\t\t\tcache.set(device, value);\n\t\t}\n\t\treturn value;\n\t};\n}\n/** A triangle-strip pipeline drawing one full-screen quad (`draw(4)`). */\nfunction createFullscreenPipeline(device, options) {\n\tconst { module, format, blend } = options;\n\treturn device.createRenderPipeline({\n\t\t...options.label && { label: options.label },\n\t\tlayout: Array.isArray(options.layouts) ? device.createPipelineLayout({ bindGroupLayouts: options.layouts }) : options.layouts,\n\t\tvertex: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.vertexEntryPoint ?? \"vs\"\n\t\t},\n\t\tfragment: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.fragmentEntryPoint ?? \"fs\",\n\t\t\ttargets: [blend ? {\n\t\t\t\tformat,\n\t\t\t\tblend\n\t\t\t} : { format }]\n\t\t},\n\t\tprimitive: { topology: \"triangle-strip\" }\n\t});\n}\n/**\n* Renders `child` into a cleared temporary texture with an identity\n* transform and a full-size scissor, and returns that texture.\n*/\nasync function drawChildToTexture(args, child, options = {}) {\n\tconst { ctx, encoder, props } = args;\n\tconst width = options.width ?? args.targetWidth;\n\tconst height = options.height ?? args.targetHeight;\n\tconst texture = ctx.renderer.getTemporaryTexture(width, height, [\n\t\t...props.excludeTextures || [],\n\t\targs.targetTexture,\n\t\t...options.exclude ?? []\n\t]);\n\tconst view = texture.createView();\n\tctx.renderer.beginFrame(encoder, view, TRANSPARENT, width, height, \"clear\").end();\n\tctx.renderer.pushScissor({\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t});\n\tctx.renderer.pushIdentity();\n\tawait args.drawChild(child, options.props ?? {\n\t\t...props,\n\t\tvirtualMedia: child\n\t}, view, texture, width, height);\n\tctx.renderer.popTransform();\n\tctx.renderer.popScissor();\n\treturn {\n\t\ttexture,\n\t\tview\n\t};\n}\n/**\n* Opens a \"load\" pass on the node's target and makes it the node's current\n* pass (the caller hands it back to the compositor).\n*/\nfunction beginTargetPass(args, width = args.targetWidth, height = args.targetHeight) {\n\tconst pass = args.ctx.renderer.beginFrame(args.encoder, args.targetView, TRANSPARENT, width, height, \"load\");\n\targs.pass = pass;\n\treturn pass;\n}\n/**\n* Target pixels per layout pixel (`props.pixelScale`, 1 when unset). A\n* renderer multiplies its pixel-unit parameters by it and declares\n* `maxPixelScale`.\n*/\nfunction pixelScale(args) {\n\treturn args.props.pixelScale ?? 1;\n}\n/** Draws `texture` over the whole target at `opacity` (the node's output). */\nfunction drawTextureToTarget(args, texture, opacity = 1) {\n\tconst { targetWidth: width, targetHeight: height } = args;\n\targs.ctx.renderer.drawTexture(beginTargetPass(args), texture, {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t}, { opacity });\n}\n/** Clock a signal texture is evaluated at, in seconds. */\nfunction signalTiming(props, frame, fps, fallbackDurationSeconds = 0) {\n\tconst metadataDurationMs = props.virtualMedia?.metadata?.durationMs;\n\treturn {\n\t\telapsedSeconds: props.elapsedMs !== void 0 ? props.elapsedMs / 1e3 : frame / fps,\n\t\tdurationSeconds: metadataDurationMs ? metadataDurationMs / 1e3 : props.durationMs !== void 0 ? props.durationMs / 1e3 : fallbackDurationSeconds\n\t};\n}\n/**\n* The texture a bound parameter samples: its own GPU binding, the signal's\n* texture (cached under `sd.nodeId`, else `fallbackId`), or a 1×1 dummy.\n*/\nfunction signalTextureView(sc, param, fallbackId) {\n\tconst { args } = sc;\n\tif (param.gpuTextureView) return param.gpuTextureView;\n\tif (param.hasStaticSig && param.sd) return signalRegistry.getOrCreate2DTextureView(args.ctx.device, args.encoder, param.sd.nodeId ?? fallbackId, sc.elapsedSeconds, sc.durationSeconds, param.sd, sc.width, sc.height, args.props.renderId, sc.frame, sc.fps);\n\treturn signalRegistry.getDummy1x1TextureView(args.ctx.device);\n}\n/** Clears `target` to transparent and draws one full-screen quad into it. */\nfunction drawFullscreenPass(encoder, target, pipeline, bindGroups) {\n\tconst pass = encoder.beginRenderPass({ colorAttachments: [{\n\t\tview: target,\n\t\tloadOp: \"clear\",\n\t\tstoreOp: \"store\",\n\t\tclearValue: TRANSPARENT\n\t}] });\n\tpass.setPipeline(pipeline);\n\tbindGroups.forEach((group, index) => {\n\t\tpass.setBindGroup(index, group);\n\t});\n\tpass.draw(4);\n\tpass.end();\n}\n\n//#endregion\nexport { FULLSCREEN_QUAD_WGSL, PREMULTIPLIED_BLEND, STRAIGHT_ALPHA_BLEND, beginTargetPass, createFullscreenPipeline, drawChildToTexture, drawFullscreenPass, drawTextureToTarget, fragmentBindGroupLayout, perDevice, pixelScale, signalTextureView, signalTiming, texturesLayout };\n//# sourceMappingURL=gpu.mjs.map"],"mappings":";;;AAGA,MAAM,cAAc;CACnB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH;;;;;AAKD,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;AAuB7B,MAAM,sBAAsB;CAC3B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,MAAM,uBAAuB;CAC5B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,SAAS,wBAAwB,QAAQ,UAAU,OAAO;AACzD,QAAO,OAAO,sBAAsB;EACnC,GAAG,SAAS,EAAE,OAAO;EACrB,SAAS,SAAS,KAAK,SAAS,UAAU;AACzC,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,QAAQ,EAAE,MAAM,WAAW;IAC3B;AACD,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,SAAS,EAAE,YAAY,SAAS;IAChC;AACD,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,SAAS,EAAE,MAAM,aAAa;IAC9B;AACD,UAAO;IACN,YAAY,eAAe;IAC3B,GAAG;IACH,SAAS;IACT;IACA;EACF,CAAC;;;AAGH,SAAS,eAAe,QAAQ,OAAO;AACtC,QAAO,wBAAwB,QAAQ,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,UAAU,EAAE,UAAU,CAAC;;;AAGrF,SAAS,UAAU,QAAQ;CAC1B,MAA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,UAAU,YAAY;CAClE,MAAM,OAAO,QAAQ,gBAAgB,EAAE,kBAAkB,CAAC;EACzD,MAAM;EACN,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,CAAC,EAAE,CAAC;AACL,MAAK,YAAY,SAAS;AAC1B,YAAW,SAAS,OAAO,UAAU;AACpC,OAAK,aAAa,OAAO,MAAM;GAC9B;AACF,MAAK,KAAK,EAAE;AACZ,MAAK,KAAK"}
@@ -1,10 +1,10 @@
1
- import { $ as FrameSignal, $t as NormalRelightingOptions, I as Effect$1, M as DeflickerOptions, Mt as MediaTimeSignalRemap, O as DataType, Pt as MeshAudioDeformConfig, Tt as MediaSourceInput, Z as FrameContext, dn as ProgrammaticSignal, gn as ResolvedMediaTimeRemap, hn as RenderDiagnostic, kt as MediaTimeRemapInput, mr as VisionTask, qn as TextSpan, ur as VirtualMediaData, vt as MediaMetadata, xn as Signal, z as EffectDomain } from "./index-a6JrbAK0.mjs";
2
- import { A as PolyhedronGeometryOptions, F as RoundedBoxGeometryOptions, G as TorusGeometryOptions, H as SlugFontCache, K as TubeGeometryOptions, Nn as TypewriterAnimator, P as RingGeometryOptions, R as ShardGeometryOptions, Rr as Path3D, Vt as KineticMarqueeConfig, W as SphereGeometryOptions, _ as ExtrudeShapeGeometryOptions, b as LatheGeometryOptions, ft as AdvancedTextAnimator, h as CylinderGeometryOptions, k as Points3DGeometryOptions, m as CapsuleGeometryOptions, q as TubePathSpec, ut as AETextAnimator, x as Line3DGeometryOptions, yn as TextPathOptions } from "./index-C2yaponf.mjs";
1
+ import { $ as FrameSignal, $n as ToonShading, At as MediaTimeRemapInput, Et as MediaSourceInput, Ft as MeshAudioDeformConfig, I as Effect$1, Jn as TextSpan, M as DeflickerOptions, Nt as MediaTimeSignalRemap, O as DataType, Sn as Signal, Z as FrameContext, _n as ResolvedMediaTimeRemap, en as NormalRelightingOptions, fn as ProgrammaticSignal, fr as VirtualMediaData, gn as RenderDiagnostic, gr as VisionTask, it as GeometryOutlineOptions, yt as MediaMetadata, z as EffectDomain } from "./index-C-V6CAhP.mjs";
2
+ import { A as PolyhedronGeometryOptions, F as RoundedBoxGeometryOptions, G as TorusGeometryOptions, H as SlugFontCache, K as TubeGeometryOptions, Nn as TypewriterAnimator, P as RingGeometryOptions, R as ShardGeometryOptions, Rr as Path3D, Vt as KineticMarqueeConfig, W as SphereGeometryOptions, _ as ExtrudeShapeGeometryOptions, b as LatheGeometryOptions, ft as AdvancedTextAnimator, h as CylinderGeometryOptions, k as Points3DGeometryOptions, m as CapsuleGeometryOptions, q as TubePathSpec, ut as AETextAnimator, x as Line3DGeometryOptions, yn as TextPathOptions } from "./index-CRaydvLi.mjs";
3
3
  import { i as RegisterFontOptions } from "./index-C5sgRLlG.mjs";
4
- import { F as VisionNode, J as TensorPipeline, O as VisionAnalysisReport, a as ClipPose, c as InstanceMask, g as ObjectTrackSignals, k as VisionBundle, l as LandmarkCoordinateSignals, o as ClipSubjectSource, r as COCO17_KEYPOINT_NAMES, s as DepthMap, u as MaskTrackSignals, v as PinToLandmarkOptions, y as PinToObjectOptions } from "./index-DBh3WphX.mjs";
5
- import { S as Sam3Options, p as Sam2Options } from "./index-rtCXNxGO.mjs";
6
- import { $n as ResizerScalerProps, $t as FlipProps, An as Paint, At as CameraParallax3DProps, B as PBRGlass, Bn as Pixelate, Bt as ContourProps, C as GradientMapProps, Cn as MeshWarp, Ct as AudioParametricEq, D as HalftoneScreen, Dn as NoiseGeneratorProps, Dt as CRT, En as NoiseGenerator, Et as AudioReverbProps, F as LevelsProps, Fn as Painterly, Ft as ColorBalance, G as SSAOProps, Gn as ProceduralVFXProps, Gt as DatamoshProps, H as Relight3D, Hn as Posterize, I as Modulate, In as PainterlyProps, It as ColorBalanceProps, J as SelectiveColorProps, Jn as RefineEdge, Jt as Dither, K as SelectiveColor, Kn as RGBSplit, Kt as DisplacementMap, L as ModulateProps, Ln as PatchHeal, Lt as ColorKey, M as HighPassProps, Mt as ChannelMergerProps, Nt as ChannelSplitter, O as HalftoneScreenProps, On as OpArt, Ot as CRTProps, P as Levels, Pt as ChannelSplitterProps, Q as TileOffset, Qn as ResizerScaler, Qt as Flip, R as MotionBlur, Rt as ColorKeyProps, S as GradientMap, Sn as MaskMathProps, St as AudioNoiseGateProps, Tn as MeshWarpProps, Tt as AudioReverb, U as Relight3DProps, Un as PosterizeProps, Ut as CornerPinProps, V as PBRGlassProps, Vn as PixelateProps, Vt as CornerPin, W as SSAO, Wn as ProceduralVFX, Wt as Datamosh, X as ShadowsHighlightsProps, Xn as RefractionCaustics3D, Xt as ExtractLUT, Y as ShadowsHighlights, Yn as RefineEdgeProps, Yt as DitherProps, Z as TemporalDeflicker, Zn as RefractionCaustics3DProps, Zt as ExtractLUTProps, _t as AudioDelay, a as ApplyLUTProps, an as KaleidoscopeProps, ar as Toon, b as FilmGrain, bn as LiquifyProps, bt as AudioFadeProps, c as Crop, cn as KenBurnsProps, cr as TrailsProps, dr as EffectProp, dt as Blur, en as Gooey, er as Rotate, et as TileOffsetProps, f as CurvesProps, ft as BlurProps, g as DepthOfFieldProps, gn as LayerStyleProps, gt as AudioCompressorProps, h as DepthOfField, ht as AudioCompressor, i as ApplyLUT, in as Kaleidoscope, it as VisionProps, j as HighPass, jn as PaintProps, jt as ChannelMerger, kn as OpArtProps, kt as CameraParallax3D, l as CropProps, ln as LayerStyle, lr as Vignette, m as DeflickerProps, mt as AsciiProps, n as AnyEffect, nn as Iridescence, nr as StereoPanning, nt as UnsharpMaskProps, on as KenBurns, or as ToonProps, p as CustomEffect, pt as Ascii, qn as RGBSplitProps, qt as DisplacementMapProps, r as AnyVisualEffect, rn as IridescenceProps, rr as StereoPanningProps, rt as Vision, sr as Trails, t as AnyAudioEffect, tn as GooeyProps, tr as RotateProps, tt as UnsharpMask, u as Curves, ur as VignetteProps, vn as Liquify, vt as AudioDelayProps, wt as AudioParametricEqProps, x as FilmGrainProps, xn as MaskMath, xt as AudioNoiseGate, yt as AudioFade, z as MotionBlurProps, zn as PatchHealProps, zt as Contour } from "./index-ByhlTwxh.mjs";
7
- import { _ as RenderProgress, b as VideoQaOptions, f as HeadlessMediaRenderer, t as FrameGridOptions, x as VideoQaReport } from "./index-DQ1U3HC3.mjs";
4
+ import { F as VisionNode, J as TensorPipeline, O as VisionAnalysisReport, a as ClipPose, c as InstanceMask, g as ObjectTrackSignals, k as VisionBundle, l as LandmarkCoordinateSignals, o as ClipSubjectSource, r as COCO17_KEYPOINT_NAMES, s as DepthMap, u as MaskTrackSignals, v as PinToLandmarkOptions, y as PinToObjectOptions } from "./index-D1FqV1eu.mjs";
5
+ import { S as Sam3Options, p as Sam2Options } from "./index-CEKxvGY-.mjs";
6
+ import { $n as ResizerScalerProps, $t as FlipProps, An as Paint, At as CameraParallax3DProps, B as PBRGlass, Bn as Pixelate, Bt as ContourProps, C as GradientMapProps, Cn as MeshWarp, Ct as AudioParametricEq, D as HalftoneScreen, Dn as NoiseGeneratorProps, Dt as CRT, En as NoiseGenerator, Et as AudioReverbProps, F as LevelsProps, Fn as Painterly, Ft as ColorBalance, G as SSAOProps, Gn as ProceduralVFXProps, Gt as DatamoshProps, H as Relight3D, Hn as Posterize, I as Modulate, In as PainterlyProps, It as ColorBalanceProps, J as SelectiveColorProps, Jn as RefineEdge, Jt as Dither, K as SelectiveColor, Kn as RGBSplit, Kt as DisplacementMap, L as ModulateProps, Ln as PatchHeal, Lt as ColorKey, M as HighPassProps, Mt as ChannelMergerProps, Nt as ChannelSplitter, O as HalftoneScreenProps, On as OpArt, Ot as CRTProps, P as Levels, Pt as ChannelSplitterProps, Q as TileOffset, Qn as ResizerScaler, Qt as Flip, R as MotionBlur, Rt as ColorKeyProps, S as GradientMap, Sn as MaskMathProps, St as AudioNoiseGateProps, Tn as MeshWarpProps, Tt as AudioReverb, U as Relight3DProps, Un as PosterizeProps, Ut as CornerPinProps, V as PBRGlassProps, Vn as PixelateProps, Vt as CornerPin, W as SSAO, Wn as ProceduralVFX, Wt as Datamosh, X as ShadowsHighlightsProps, Xn as RefractionCaustics3D, Xt as ExtractLUT, Y as ShadowsHighlights, Yn as RefineEdgeProps, Yt as DitherProps, Z as TemporalDeflicker, Zn as RefractionCaustics3DProps, Zt as ExtractLUTProps, _t as AudioDelay, a as ApplyLUTProps, an as KaleidoscopeProps, ar as Toon, b as FilmGrain, bn as LiquifyProps, bt as AudioFadeProps, c as Crop, cn as KenBurnsProps, cr as TrailsProps, dr as EffectProp, dt as Blur, en as Gooey, er as Rotate, et as TileOffsetProps, f as CurvesProps, ft as BlurProps, g as DepthOfFieldProps, gn as LayerStyleProps, gt as AudioCompressorProps, h as DepthOfField, ht as AudioCompressor, i as ApplyLUT, in as Kaleidoscope, it as VisionProps, j as HighPass, jn as PaintProps, jt as ChannelMerger, kn as OpArtProps, kt as CameraParallax3D, l as CropProps, ln as LayerStyle, lr as Vignette, m as DeflickerProps, mt as AsciiProps, n as AnyEffect, nn as Iridescence, nr as StereoPanning, nt as UnsharpMaskProps, on as KenBurns, or as ToonProps, p as CustomEffect, pt as Ascii, qn as RGBSplitProps, qt as DisplacementMapProps, r as AnyVisualEffect, rn as IridescenceProps, rr as StereoPanningProps, rt as Vision, sr as Trails, t as AnyAudioEffect, tn as GooeyProps, tr as RotateProps, tt as UnsharpMask, u as Curves, ur as VignetteProps, vn as Liquify, vt as AudioDelayProps, wt as AudioParametricEqProps, x as FilmGrainProps, xn as MaskMath, xt as AudioNoiseGate, yt as AudioFade, z as MotionBlurProps, zn as PatchHealProps, zt as Contour } from "./index-DoP6EiHj.mjs";
7
+ import { _ as RenderProgress, b as VideoQaOptions, f as HeadlessMediaRenderer, t as FrameGridOptions, x as VideoQaReport } from "./index-C7-p9zwU.mjs";
8
8
  import { z, z as z$2 } from "zod";
9
9
  import { Yoga } from "yoga-layout/load";
10
10
 
@@ -37,38 +37,38 @@ type ProgramEffect = Effect$1<object, string, EffectDomain> | EffectSpec | (Reco
37
37
  declare const AnimatablePropSchema: z.ZodEnum<{
38
38
  x: "x";
39
39
  y: "y";
40
- width: "width";
41
- height: "height";
42
- rotation: "rotation";
43
40
  scale: "scale";
41
+ rotation: "rotation";
44
42
  opacity: "opacity";
45
- trimStart: "trimStart";
46
- trimEnd: "trimEnd";
47
- text: "text";
48
- fontSize: "fontSize";
49
- fill: "fill";
50
- letterSpacing: "letterSpacing";
51
- padding: "padding";
52
- strokeWidth: "strokeWidth";
53
- borderColor: "borderColor";
54
- borderWidth: "borderWidth";
43
+ width: "width";
44
+ height: "height";
55
45
  volume: "volume";
56
- color: "color";
57
- offset: "offset";
58
46
  hidden: "hidden";
59
47
  muted: "muted";
60
48
  gap: "gap";
49
+ padding: "padding";
61
50
  borderRadius: "borderRadius";
51
+ fontSize: "fontSize";
52
+ text: "text";
53
+ fill: "fill";
54
+ color: "color";
55
+ letterSpacing: "letterSpacing";
62
56
  d: "d";
57
+ trimStart: "trimStart";
58
+ trimEnd: "trimEnd";
63
59
  trimOffset: "trimOffset";
60
+ strokeWidth: "strokeWidth";
64
61
  strokeDashOffset: "strokeDashOffset";
65
62
  cornerRadius: "cornerRadius";
66
63
  starInnerRadiusRatio: "starInnerRadiusRatio";
67
64
  fillColor: "fillColor";
68
65
  strokeColor: "strokeColor";
66
+ borderColor: "borderColor";
67
+ borderWidth: "borderWidth";
69
68
  motionBlurShutter: "motionBlurShutter";
70
69
  rangeStart: "rangeStart";
71
70
  rangeEnd: "rangeEnd";
71
+ offset: "offset";
72
72
  animatorRangeStart: "animatorRangeStart";
73
73
  animatorRangeEnd: "animatorRangeEnd";
74
74
  animatorOffset: "animatorOffset";
@@ -178,7 +178,6 @@ declare const MaterialTypeSchema: z.ZodEnum<{
178
178
  type MaterialType = z.infer<typeof MaterialTypeSchema>;
179
179
  declare const EaseRefSchema: z.ZodObject<{
180
180
  name: z.ZodEnum<{
181
- bounce: "bounce";
182
181
  none: "none";
183
182
  power1: "power1";
184
183
  power2: "power2";
@@ -188,6 +187,7 @@ declare const EaseRefSchema: z.ZodObject<{
188
187
  expo: "expo";
189
188
  back: "back";
190
189
  elastic: "elastic";
190
+ bounce: "bounce";
191
191
  spring: "spring";
192
192
  cubic: "cubic";
193
193
  hold: "hold";
@@ -206,7 +206,6 @@ declare const KeyframeSchema: z.ZodObject<{
206
206
  value: z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString]>;
207
207
  ease: z.ZodOptional<z.ZodObject<{
208
208
  name: z.ZodEnum<{
209
- bounce: "bounce";
210
209
  none: "none";
211
210
  power1: "power1";
212
211
  power2: "power2";
@@ -216,6 +215,7 @@ declare const KeyframeSchema: z.ZodObject<{
216
215
  expo: "expo";
217
216
  back: "back";
218
217
  elastic: "elastic";
218
+ bounce: "bounce";
219
219
  spring: "spring";
220
220
  cubic: "cubic";
221
221
  hold: "hold";
@@ -239,6 +239,16 @@ declare const KeyframeSchema: z.ZodObject<{
239
239
  }, z.core.$strip>>;
240
240
  }, z.core.$strict>;
241
241
  type Keyframe = z.infer<typeof KeyframeSchema>;
242
+ /**
243
+ * Which clock a signal track reads: the composition's (default), as audio
244
+ * analysis and shared signals need, or its layer's own, from the layer's
245
+ * start frame, as keyframes do: motion authored for one scene of a sequence.
246
+ */
247
+ declare const SignalClockSchema: z.ZodEnum<{
248
+ composition: "composition";
249
+ layer: "layer";
250
+ }>;
251
+ type SignalClock = z.infer<typeof SignalClockSchema>;
242
252
  declare const RawTrackSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
243
253
  type: z.ZodLiteral<"keyframe">;
244
254
  }, z.core.$strip>, z.ZodObject<{
@@ -263,6 +273,10 @@ declare const RawTrackSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
263
273
  accumulateThreshold: z.ZodOptional<z.ZodNumber>;
264
274
  debounceFrames: z.ZodOptional<z.ZodNumber>;
265
275
  channel: z.ZodOptional<z.ZodString>;
276
+ clock: z.ZodOptional<z.ZodEnum<{
277
+ composition: "composition";
278
+ layer: "layer";
279
+ }>>;
266
280
  }, z.core.$strip>, z.ZodObject<{
267
281
  type: z.ZodLiteral<"wiggle">;
268
282
  frequency: z.ZodDefault<z.ZodNumber>;
@@ -281,38 +295,38 @@ declare const AnimationTrackSchema: z.ZodObject<{
281
295
  prop: z.ZodEnum<{
282
296
  x: "x";
283
297
  y: "y";
284
- width: "width";
285
- height: "height";
286
- rotation: "rotation";
287
298
  scale: "scale";
299
+ rotation: "rotation";
288
300
  opacity: "opacity";
289
- trimStart: "trimStart";
290
- trimEnd: "trimEnd";
291
- text: "text";
292
- fontSize: "fontSize";
293
- fill: "fill";
294
- letterSpacing: "letterSpacing";
295
- padding: "padding";
296
- strokeWidth: "strokeWidth";
297
- borderColor: "borderColor";
298
- borderWidth: "borderWidth";
301
+ width: "width";
302
+ height: "height";
299
303
  volume: "volume";
300
- color: "color";
301
- offset: "offset";
302
304
  hidden: "hidden";
303
305
  muted: "muted";
304
306
  gap: "gap";
307
+ padding: "padding";
305
308
  borderRadius: "borderRadius";
309
+ fontSize: "fontSize";
310
+ text: "text";
311
+ fill: "fill";
312
+ color: "color";
313
+ letterSpacing: "letterSpacing";
306
314
  d: "d";
315
+ trimStart: "trimStart";
316
+ trimEnd: "trimEnd";
307
317
  trimOffset: "trimOffset";
318
+ strokeWidth: "strokeWidth";
308
319
  strokeDashOffset: "strokeDashOffset";
309
320
  cornerRadius: "cornerRadius";
310
321
  starInnerRadiusRatio: "starInnerRadiusRatio";
311
322
  fillColor: "fillColor";
312
323
  strokeColor: "strokeColor";
324
+ borderColor: "borderColor";
325
+ borderWidth: "borderWidth";
313
326
  motionBlurShutter: "motionBlurShutter";
314
327
  rangeStart: "rangeStart";
315
328
  rangeEnd: "rangeEnd";
329
+ offset: "offset";
316
330
  animatorRangeStart: "animatorRangeStart";
317
331
  animatorRangeEnd: "animatorRangeEnd";
318
332
  animatorOffset: "animatorOffset";
@@ -397,6 +411,10 @@ declare const AnimationTrackSchema: z.ZodObject<{
397
411
  accumulateThreshold: z.ZodOptional<z.ZodNumber>;
398
412
  debounceFrames: z.ZodOptional<z.ZodNumber>;
399
413
  channel: z.ZodOptional<z.ZodString>;
414
+ clock: z.ZodOptional<z.ZodEnum<{
415
+ composition: "composition";
416
+ layer: "layer";
417
+ }>>;
400
418
  }, z.core.$strip>, z.ZodObject<{
401
419
  type: z.ZodLiteral<"wiggle">;
402
420
  frequency: z.ZodDefault<z.ZodNumber>;
@@ -415,7 +433,6 @@ declare const AnimationTrackSchema: z.ZodObject<{
415
433
  value: z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString]>;
416
434
  ease: z.ZodOptional<z.ZodObject<{
417
435
  name: z.ZodEnum<{
418
- bounce: "bounce";
419
436
  none: "none";
420
437
  power1: "power1";
421
438
  power2: "power2";
@@ -425,6 +442,7 @@ declare const AnimationTrackSchema: z.ZodObject<{
425
442
  expo: "expo";
426
443
  back: "back";
427
444
  elastic: "elastic";
445
+ bounce: "bounce";
428
446
  spring: "spring";
429
447
  cubic: "cubic";
430
448
  hold: "hold";
@@ -461,38 +479,38 @@ declare const LayerAnimationSchema: z.ZodObject<{
461
479
  prop: z.ZodEnum<{
462
480
  x: "x";
463
481
  y: "y";
464
- width: "width";
465
- height: "height";
466
- rotation: "rotation";
467
482
  scale: "scale";
483
+ rotation: "rotation";
468
484
  opacity: "opacity";
469
- trimStart: "trimStart";
470
- trimEnd: "trimEnd";
471
- text: "text";
472
- fontSize: "fontSize";
473
- fill: "fill";
474
- letterSpacing: "letterSpacing";
475
- padding: "padding";
476
- strokeWidth: "strokeWidth";
477
- borderColor: "borderColor";
478
- borderWidth: "borderWidth";
485
+ width: "width";
486
+ height: "height";
479
487
  volume: "volume";
480
- color: "color";
481
- offset: "offset";
482
488
  hidden: "hidden";
483
489
  muted: "muted";
484
490
  gap: "gap";
491
+ padding: "padding";
485
492
  borderRadius: "borderRadius";
493
+ fontSize: "fontSize";
494
+ text: "text";
495
+ fill: "fill";
496
+ color: "color";
497
+ letterSpacing: "letterSpacing";
486
498
  d: "d";
499
+ trimStart: "trimStart";
500
+ trimEnd: "trimEnd";
487
501
  trimOffset: "trimOffset";
502
+ strokeWidth: "strokeWidth";
488
503
  strokeDashOffset: "strokeDashOffset";
489
504
  cornerRadius: "cornerRadius";
490
505
  starInnerRadiusRatio: "starInnerRadiusRatio";
491
506
  fillColor: "fillColor";
492
507
  strokeColor: "strokeColor";
508
+ borderColor: "borderColor";
509
+ borderWidth: "borderWidth";
493
510
  motionBlurShutter: "motionBlurShutter";
494
511
  rangeStart: "rangeStart";
495
512
  rangeEnd: "rangeEnd";
513
+ offset: "offset";
496
514
  animatorRangeStart: "animatorRangeStart";
497
515
  animatorRangeEnd: "animatorRangeEnd";
498
516
  animatorOffset: "animatorOffset";
@@ -577,6 +595,10 @@ declare const LayerAnimationSchema: z.ZodObject<{
577
595
  accumulateThreshold: z.ZodOptional<z.ZodNumber>;
578
596
  debounceFrames: z.ZodOptional<z.ZodNumber>;
579
597
  channel: z.ZodOptional<z.ZodString>;
598
+ clock: z.ZodOptional<z.ZodEnum<{
599
+ composition: "composition";
600
+ layer: "layer";
601
+ }>>;
580
602
  }, z.core.$strip>, z.ZodObject<{
581
603
  type: z.ZodLiteral<"wiggle">;
582
604
  frequency: z.ZodDefault<z.ZodNumber>;
@@ -595,7 +617,6 @@ declare const LayerAnimationSchema: z.ZodObject<{
595
617
  value: z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean, z.ZodString]>;
596
618
  ease: z.ZodOptional<z.ZodObject<{
597
619
  name: z.ZodEnum<{
598
- bounce: "bounce";
599
620
  none: "none";
600
621
  power1: "power1";
601
622
  power2: "power2";
@@ -605,6 +626,7 @@ declare const LayerAnimationSchema: z.ZodObject<{
605
626
  expo: "expo";
606
627
  back: "back";
607
628
  elastic: "elastic";
629
+ bounce: "bounce";
608
630
  spring: "spring";
609
631
  cubic: "cubic";
610
632
  hold: "hold";
@@ -637,6 +659,8 @@ type BaseLayerAnimationSpec = z.infer<typeof LayerAnimationSchema>;
637
659
  type LayerAnimationSpec<TProp extends AnimatableProp = AnimatableProp> = Omit<BaseLayerAnimationSpec, "tracks"> & {
638
660
  tracks: AnimationTrack<TProp>[];
639
661
  };
662
+ declare const ToonShadingSchema: z.ZodType<ToonShading>;
663
+ declare const GeometryOutlineOptionsSchema: z.ZodType<GeometryOutlineOptions>;
640
664
  interface CompositionNodeBase {
641
665
  id: string;
642
666
  inputHandleId?: string;
@@ -686,6 +710,8 @@ interface CompositionNodeBase {
686
710
  emissive?: string;
687
711
  emissiveIntensity?: number;
688
712
  castShadow?: boolean;
713
+ toon?: ToonShading;
714
+ outline?: boolean;
689
715
  matte?: {
690
716
  node: unknown;
691
717
  mode?: MatteMode;
@@ -1079,6 +1105,8 @@ interface LightNode {
1079
1105
  toneMapping?: ToneMapping;
1080
1106
  fog?: EnvironmentFog;
1081
1107
  floor?: EnvironmentFloor;
1108
+ /** Optional depth/normal outlines, before depth of field and bloom. */
1109
+ outlines?: boolean | GeometryOutlineOptions;
1082
1110
  /** Glow around emissive surfaces and hot highlights: `true` or settings. */
1083
1111
  bloom?: boolean | BloomConfig;
1084
1112
  startFrame?: number;
@@ -1314,6 +1342,13 @@ interface SignalTrackOptions {
1314
1342
  mode?: "continuous" | "accumulate";
1315
1343
  threshold?: number;
1316
1344
  debounceFrames?: number;
1345
+ /**
1346
+ * `"composition"` (default) samples the signal at the composition frame,
1347
+ * as audio analysis and shared signals need. `"layer"` samples it at the
1348
+ * layer's own frame, counted from its start like keyframes: for motion
1349
+ * authored per scene, which then plays right inside `Layer.sequence`.
1350
+ */
1351
+ clock?: SignalClock;
1317
1352
  }
1318
1353
  interface ColorSignalOptions {
1319
1354
  colorA: string;
@@ -1897,8 +1932,18 @@ interface CompositorToProgramOptions {
1897
1932
  resolveMediaSignal?: MediaSignalResolver;
1898
1933
  }
1899
1934
  type MediaSignalResolver = (binding: MediaTimeSignalRemap, layer: MediaSignalLayer) => ResolvedMediaTimeRemap;
1935
+ /**
1936
+ * A container holding a camera and the layers it films is a 3D scene of its
1937
+ * own: its camera, lights and environment see only its layers. It needs a
1938
+ * fixed size to render at. A container holding only a camera (and lights) is
1939
+ * a shot in a camera cut list over the shared world, and stays one.
1940
+ */
1941
+
1900
1942
  declare function compositorToProgram(config: CompositorProgramConfig, options: CompositorToProgramOptions): VirtualMediaData;
1901
- /** Recursively gather every node op from a render tree (in order). */
1943
+ /**
1944
+ * Recursively gather every node op from a render tree (in order), stopping at
1945
+ * nested scene compositions: their layers belong to their own render.
1946
+ */
1902
1947
  declare function collectNodeOps(nodes: VirtualMediaData[]): VirtualMediaData[];
1903
1948
  //#endregion
1904
1949
  //#region src/program/validate.d.ts
@@ -5067,6 +5112,10 @@ interface Swarm3DOptions extends Surface3DOptions {
5067
5112
  //#region src/shapes3d.d.ts
5068
5113
  /** Physically based surface options every 3D builder accepts. */
5069
5114
  interface Surface3DOptions {
5115
+ /** Art-directed lighting for material: "toon". */
5116
+ toon?: ToonShading;
5117
+ /** Opt out of the scene's geometry outlines while retaining depth occlusion. */
5118
+ outline?: boolean;
5070
5119
  /** Light the surface gives off: a CSS color added on top of lighting. */
5071
5120
  emissive?: string;
5072
5121
  /** Emissive multiplier; above 1 glows past white and blooms. Default 1. */
@@ -6202,7 +6251,7 @@ declare const Physics: {
6202
6251
  };
6203
6252
  //#endregion
6204
6253
  //#region src/styles.d.ts
6205
- type Look = Effect$1<object>[];
6254
+ type Look = AnyVisualEffect[];
6206
6255
  declare const Styles: {
6207
6256
  /** 8-bit game: PICO-8 palette, chunky pixels, light dithering. */
6208
6257
  pixelArt: (o?: {
@@ -6843,7 +6892,7 @@ declare const Layer: {
6843
6892
  off: (src: string, options?: Partial<Model3DNode>) => AnimatableNode<Model3DNode>;
6844
6893
  };
6845
6894
  /** World settings for `Layer.environment` (see `LightNode` for every field). */
6846
- type EnvironmentOptions = Partial<Pick<LightNode, "id" | "preset" | "top" | "horizon" | "bottom" | "intensity" | "softboxes" | "rotation" | "exposure" | "toneMapping" | "fog" | "floor" | "bloom" | "startFrame" | "durationFrames">>;
6895
+ type EnvironmentOptions = Partial<Pick<LightNode, "id" | "preset" | "top" | "horizon" | "bottom" | "intensity" | "softboxes" | "rotation" | "exposure" | "toneMapping" | "fog" | "floor" | "outlines" | "bloom" | "startFrame" | "durationFrames">>;
6847
6896
  declare const Light: {
6848
6897
  /**
6849
6898
  * The scene's world: a procedural studio environment that lights and
@@ -6954,5 +7003,5 @@ type ComponentNode<C extends Cues = Cues> = AnimatableNode<BoxNode> & ComponentE
6954
7003
  */
6955
7004
  declare function bindComponent<S$1 extends z.ZodRawShape, C extends Cues, E extends object = object>(definition: ComponentDefinition<S$1, C, E>): (props: z.input<z.ZodObject<S$1>> & BaseProps) => ComponentNode<C> & E;
6956
7005
  //#endregion
6957
- export { mapBlendModeToSkia as $, withDefaults as $a, exitAnimation as $i, Animatable as $n, Model3DNode as $o, ResolvedTarget as $r, World3DOptions as $t, Physics as A, springKeys as Aa, basePropsSchema as Ai, bold as An, EnvironmentFogSchema as Ao, GlyphProps as Ar, compositorToProgram as As, Points3DOptions as At, World2DOptions as B, targetSchema as Ba, cover as Bi, sub as Bn, LayoutNodeSchema as Bo, MediaOptions as Br, Sphere3DOptions as Bt, TrackEditing as C, rng as Ca, arcPath as Ci, ChartSlice as Cn, CompositorProgramConfig as Co, FontNeed as Cr, ToneMapping as Cs, Icosphere3DOptions as Ct, section as D, scheduleExpression as Da, bakeFunction as Di, MarkOptions as Dn, EnvironmentFloor as Do, FrameWindow as Dr, applyStaggerToChildren as Ds, Layer3D as Dt, editTrackedRegion as E, scaleFrames as Ea, audioLevelsSchema as Ei, DEFAULT_CHART_COLORS as En, EaseRef as Eo, FrameValue as Er, WiggleOptions as Es, Lathe3DOptions as Et, PhysicsRect as F, staggerRanks as Fa, boxPath as Fi, normalizeTextSpans as Fn, FromToOptions as Fo, KeyBook as Fr, evaluateAnimationAtFrame as Fs, Ring3DOptions as Ft, InterpolateOptions as G, toPathData as Ga, drawOnKeys as Gi, FRAMEFIELDS_AI_PROXY_URL as Gn, MaterialType as Go, MotionSize as Gr, Swarm3DOptions as Gt, LightingRig as H, themeFrames as Ha, defineMeta as Hi, Ai as Hn, LightNodeSchema as Ho, MotionOptions as Hr, Text3DOptions as Ht, PhysicsRopeOptions as I, stepExpression as Ia, catmullRom as Ii, parseMarkup as In, Keyframe as Io, LayerStyleConfig as Ir, evaluateTrackAtFrame as Is, RoundedBox3DOptions as It, TextMeasureResult as J, transparent as Ja, elevationStyle as Ji, RunOptions as Jn, MatteModeSchema as Jo, ProjectDefaults as Jr, PhysicsBody3D as Jt, SpringConfig as K, toSeconds as Ka, ease$1 as Ki, QueueStatus as Kn, MaterialTypeSchema as Ko, ParticleOptions as Kr, Body3DOptions as Kt, PhysicsSpringOptions as L, supersede as La, chain as Li, rich as Ln, KeyframeTuple as Lo, MOTION_PRESETS as Lr, hoistMattes as Ls, Shape3DContainer as Lt, FieldSample2D as M, springTrack as Ma, bind as Mi, color as Mn, EnvironmentPresetSchema as Mo, GrainOptions as Mr, computeLayout as Ms, Primitive3DNodeOptions as Mt, PhysicsBody2D as N, squigglePath as Na, boilKeys as Ni, italic as Nn, FlexNode as No, HandOptions as Nr, computeLayoutSync as Ns, Prism3DOptions as Nt, StyleName as O, smoothRelease as Oa, bakeSamples as Oi, TextSpanItem as On, EnvironmentFloorSchema as Oo, GlyphAnimator as Or, calculateSequenceTimeline as Os, Line3DOptions as Ot, PhysicsGroundOptions as P, staggerOffsets as Pa, boundsOf as Pi, mark as Pn, FlexNodeSchema as Po, Host as Pr, computeStaggerDelay as Ps, Pyramid3DOptions as Pt, interpolate as Q, withAlpha as Qa, evaluateGlyphExpression as Qi, Anchor as Qn, Model3DAnimatableProp as Qo, ResolvedMotion as Qr, PhysicsWorld3D as Qt, PhysicsWallsOptions as R, surfaceFill as Ra, constantExpression as Ri, size as Rn, LayerAnimation as Ro, MeasureFn as Rr, lintComposition as Rs, Shard3DOptions as Rt, SubjectSandwichOptions as S, resolveTarget as Sa, anchorPoint as Si, ChartSeries as Sn, ColorStopSchema as So, ExtrudedTextOptions as Sr, TextSpanSchema as Ss, Grid3DOptions as St, blurRegion as T, safeArea as Ta, ascending as Ti, ChartX as Tn, CompositorToProgramOptions as To, FrameContextLike as Tr, TrackSource as Ts, Instances3DOptions as Tt, LightingRigOptions as U, themes as Ua, defineTheme as Ui, AiConfig as Un, LightType as Uo, MotionPreset as Ur, Torus3DOptions as Ut, Lighting as V, textLayout as Va, defineComponent as Vi, sup as Vn, LightNode as Vo, Metrics$1 as Vr, Surface3DOptions as Vt, Easing as W, toFrames as Wa, dist as Wi, ApiError as Wn, LightTypeSchema as Wo, MotionPresetName as Wr, Tube3DOptions as Wt, bezier as X, valueAt as Xa, enterAnimation as Xi, ai as Xn, MediaNode as Xo, PulseOptions as Xr, PhysicsRope3DOptions as Xt, TextMeasureStyle as Y, typingFrames as Ya, ellipsePath as Yi, ValidationError as Yn, MediaAnimatableProp as Yo, PropsOf as Yr, PhysicsBox3D as Yt, computeStrokeRect as Z, windowExpression as Za, evaluateEase as Zi, AnalyzeOptions as Zn, MediaNodeSchema as Zo, Rect as Zr, PhysicsSpring3DOptions as Zt, RenderVideoResult as _, quantize as _a, UnitSchedule as _i, ChartAxisOptions as _n, CarrierHandoffConfig as _o, CuesOf as _r, TextAnimator as _s, CubeFaceConfig as _t, AnimatableNode as a, holdFirstKeys as aa, StaggerOrder as ai, PhysicsDriver as an, AnimationTrack as ao, BakeOptions as ar, SceneTransitionType as as, requiresIsolation as at, SmartFramingOptions as b, resampleBands as ba, after as bi, ChartOptions as bn, ColorSignalOptions as bo, Elevation as br, TextNodeSchema as bs, ExtrudeShape3DOptions as bt, CompositionOptions as c, last as ca, TargetContext as ci, ParticleBlend as cn, BloomConfigSchema as co, BuildContext as cr, SequenceOptions as cs, SceneSequenceOptions as ct, EnvironmentOptions as d, lineShift as da, Theme as di, ClipVision as dn, CameraAnimation as do, ComponentDefaults as dr, ShapeNode as ds, Transition as dt, findRange as ea, Rgba as ei, Particles as en, within as eo, AnimatableMethods as er, Model3DNodeSchema as es, measureSpring as et, Layer as f, luminance as fa, ThemeInput as fi, ClipVisionOptions as fn, CameraDoF as fo, ComponentDefinition as fr, ShapeNodeSchema as fs, TransitionDirection as ft, RenderVideoOptions as g, pulseKeys as ga, UNIT_INDEX as gi, ChartAnimationOptions as gn, CameraShake as go, Cues as gr, TextAnimatableProp as gs, Cube3DOptions as gt, NodeCapability as h, parseColor as ha, TrackedObjectLike as hi, PoseKeypointName as hn, CameraNodeSchema as ho, Cue as hr, SpringOptions as hs, Carousel3DOptions as ht, analyzeAudio as i, hashString as ia, Spring as ii, PhysicsCollision as in, AnimatablePropsFor as io, AudioLevels as ir, SceneOptions as is, preloadFont as it, Body2DOptions as j, springSettleFrames as ja, beats as ji, code as jn, EnvironmentPreset as jo, GlyphUnit as jr, computeCarrierContinuity as js, Polyhedron3DOptions as jt, Styles as k, springAt as ka, bandEdges as ki, accent as kn, EnvironmentFog as ko, GlyphBox as kr, collectNodeOps as ks, Plane3DOptions as kt, EditableObjectTrack as l, lerp2 as la, TargetNode as li, ParticleBounds as ln, BoxNode as lo, BuildResult as lr, SequenceTimelineResult as ls, SequenceEntry as lt, Media as m, offsetCues as ma, Track as mi, PersonTrack as mn, CameraNode as mo, ComponentMeta as mr, SizeSpec as ms, Capsule3DOptions as mt, bindComponent as n, glyphAnimator as na, SAFE_INSETS as ni, BodyCommonOptions as nn, wordRanges as no, ArrowCurve as nr, SceneDefinition as ns, measureTextAsync as nt, CompatibleEffect as o, inkOn as oa, SyntaxKind as oi, PhysicsWorldOptions as on, BlockNode as oo, BakedKey as or, SceneTransitionTypeSchema as os, spring as ot, Light as p, mix as pa, ThemeName as pi, PersonPlacement as pn, CameraLens as po, ComponentExtras as pr, SignalTrackOptions as ps, TransitionSpec as pt, StrokeRect as q, transformPathData as qa, elevate as qi, Result as qn, MatteMode as qo, Placement as qr, FieldSample3D as qt, z$2 as r, hashRng as ra, SafeInsets as ri, PhysicsBakeOptions as rn, AnimatableProp as ro, ArrowGeometry as rr, SceneDefinitionSchema as rs, preloadCompositionFonts as rt, Composition as s, isLight as sa, Target as si, EmitterShape as sn, BloomConfig as so, BaseProps as sr, Sequence as ss, springCalculation as st, ComponentNode as t, frameSpan as ta, Rng as ti, ParticlesOptions as tn, wobblePoints as to, ArcPath as tr, Scene as ts, measureText as tt, Effect as u, linePath as ua, TextLayout as ui, ParticleShape as un, BoxNodeSchema as uo, CanvasSize as ur, ShapeAnimatableProp as us, SequenceNode as ut, SectionNode as v, rangeRects as va, Vec2$1 as vi, ChartCandle as vn, CarrierHandoffConfigSchema as vo, CutoutOptions as vr, TextAnimatorSchema as vs, CubeFaceInput as vt, TrackedRegionOptions as w, round as wa, arrowPaths as wi, ChartType as wn, CompositorProgramSchema as wo, FontRole as wr, ToneMappingSchema as ws, InstanceTransform3D as wt, SubjectOutlineOptions as x, resolveMotion as xa, analyzeChannels as xi, ChartPadding as xn, ColorStop as xo, ElevationLevel as xr, TextSpanMarkSchema as xs, ExtrudedText3DOptions as xt, SectionOptions as y, rendererChars as ya, WordRange as yi, ChartDatum as yn, CarrierState as yo, EaseFn as yr, TextNode as ys, Cylinder3DOptions as yt, PhysicsWorld2D as z, targetPoint as za, contrastRatio as zi, span as zn, LayoutNode as zo, MeasureOptions as zr, mergeAnimationTracks as zs, SolidShape3DNode as zt };
6958
- //# sourceMappingURL=index-CtKUQ2VG.d.mts.map
7006
+ export { mapBlendModeToSkia as $, withDefaults as $a, exitAnimation as $i, Animatable as $n, Model3DAnimatableProp as $o, ResolvedTarget as $r, World3DOptions as $t, Physics as A, springKeys as Aa, basePropsSchema as Ai, bold as An, EnvironmentFogSchema as Ao, GlyphProps as Ar, calculateSequenceTimeline as As, Points3DOptions as At, World2DOptions as B, targetSchema as Ba, cover as Bi, sub as Bn, LayoutNode as Bo, MediaOptions as Br, lintComposition as Bs, Sphere3DOptions as Bt, TrackEditing as C, rng as Ca, arcPath as Ci, ChartSlice as Cn, CompositorProgramConfig as Co, FontNeed as Cr, TextSpanSchema as Cs, Icosphere3DOptions as Ct, section as D, scheduleExpression as Da, bakeFunction as Di, MarkOptions as Dn, EnvironmentFloor as Do, FrameWindow as Dr, TrackSource as Ds, Layer3D as Dt, editTrackedRegion as E, scaleFrames as Ea, audioLevelsSchema as Ei, DEFAULT_CHART_COLORS as En, EaseRef as Eo, FrameValue as Er, ToonShadingSchema as Es, Lathe3DOptions as Et, PhysicsRect as F, staggerRanks as Fa, boxPath as Fi, normalizeTextSpans as Fn, FromToOptions as Fo, KeyBook as Fr, computeLayoutSync as Fs, Ring3DOptions as Ft, InterpolateOptions as G, toPathData as Ga, drawOnKeys as Gi, FRAMEFIELDS_AI_PROXY_URL as Gn, LightTypeSchema as Go, MotionSize as Gr, Swarm3DOptions as Gt, LightingRig as H, themeFrames as Ha, defineMeta as Hi, Ai as Hn, LightNode as Ho, MotionOptions as Hr, Text3DOptions as Ht, PhysicsRopeOptions as I, stepExpression as Ia, catmullRom as Ii, parseMarkup as In, GeometryOutlineOptionsSchema as Io, LayerStyleConfig as Ir, computeStaggerDelay as Is, RoundedBox3DOptions as It, TextMeasureResult as J, transparent as Ja, elevationStyle as Ji, RunOptions as Jn, MatteMode as Jo, ProjectDefaults as Jr, PhysicsBody3D as Jt, SpringConfig as K, toSeconds as Ka, ease$1 as Ki, QueueStatus as Kn, MaterialType as Ko, ParticleOptions as Kr, Body3DOptions as Kt, PhysicsSpringOptions as L, supersede as La, chain as Li, rich as Ln, Keyframe as Lo, MOTION_PRESETS as Lr, evaluateAnimationAtFrame as Ls, Shape3DContainer as Lt, FieldSample2D as M, springTrack as Ma, bind as Mi, color as Mn, EnvironmentPresetSchema as Mo, GrainOptions as Mr, compositorToProgram as Ms, Primitive3DNodeOptions as Mt, PhysicsBody2D as N, squigglePath as Na, boilKeys as Ni, italic as Nn, FlexNode as No, HandOptions as Nr, computeCarrierContinuity as Ns, Prism3DOptions as Nt, StyleName as O, smoothRelease as Oa, bakeSamples as Oi, TextSpanItem as On, EnvironmentFloorSchema as Oo, GlyphAnimator as Or, WiggleOptions as Os, Line3DOptions as Ot, PhysicsGroundOptions as P, staggerOffsets as Pa, boundsOf as Pi, mark as Pn, FlexNodeSchema as Po, Host as Pr, computeLayout as Ps, Pyramid3DOptions as Pt, interpolate as Q, withAlpha as Qa, evaluateGlyphExpression as Qi, Anchor as Qn, MediaNodeSchema as Qo, ResolvedMotion as Qr, PhysicsWorld3D as Qt, PhysicsWallsOptions as R, surfaceFill as Ra, constantExpression as Ri, size as Rn, KeyframeTuple as Ro, MeasureFn as Rr, evaluateTrackAtFrame as Rs, Shard3DOptions as Rt, SubjectSandwichOptions as S, resolveTarget as Sa, anchorPoint as Si, ChartSeries as Sn, ColorStopSchema as So, ExtrudedTextOptions as Sr, TextSpanMarkSchema as Ss, Grid3DOptions as St, blurRegion as T, safeArea as Ta, ascending as Ti, ChartX as Tn, CompositorToProgramOptions as To, FrameContextLike as Tr, ToneMappingSchema as Ts, Instances3DOptions as Tt, LightingRigOptions as U, themes as Ua, defineTheme as Ui, AiConfig as Un, LightNodeSchema as Uo, MotionPreset as Ur, Torus3DOptions as Ut, Lighting as V, textLayout as Va, defineComponent as Vi, sup as Vn, LayoutNodeSchema as Vo, Metrics$1 as Vr, mergeAnimationTracks as Vs, Surface3DOptions as Vt, Easing as W, toFrames as Wa, dist as Wi, ApiError as Wn, LightType as Wo, MotionPresetName as Wr, Tube3DOptions as Wt, bezier as X, valueAt as Xa, enterAnimation as Xi, ai as Xn, MediaAnimatableProp as Xo, PulseOptions as Xr, PhysicsRope3DOptions as Xt, TextMeasureStyle as Y, typingFrames as Ya, ellipsePath as Yi, ValidationError as Yn, MatteModeSchema as Yo, PropsOf as Yr, PhysicsBox3D as Yt, computeStrokeRect as Z, windowExpression as Za, evaluateEase as Zi, AnalyzeOptions as Zn, MediaNode as Zo, Rect as Zr, PhysicsSpring3DOptions as Zt, RenderVideoResult as _, quantize as _a, UnitSchedule as _i, ChartAxisOptions as _n, CarrierHandoffConfig as _o, CuesOf as _r, TextAnimatableProp as _s, CubeFaceConfig as _t, AnimatableNode as a, holdFirstKeys as aa, StaggerOrder as ai, PhysicsDriver as an, AnimationTrack as ao, BakeOptions as ar, SceneOptions as as, requiresIsolation as at, SmartFramingOptions as b, resampleBands as ba, after as bi, ChartOptions as bn, ColorSignalOptions as bo, Elevation as br, TextNode as bs, ExtrudeShape3DOptions as bt, CompositionOptions as c, last as ca, TargetContext as ci, ParticleBlend as cn, BloomConfigSchema as co, BuildContext as cr, Sequence as cs, SceneSequenceOptions as ct, EnvironmentOptions as d, lineShift as da, Theme as di, ClipVision as dn, CameraAnimation as do, ComponentDefaults as dr, ShapeAnimatableProp as ds, Transition as dt, findRange as ea, Rgba as ei, Particles as en, within as eo, AnimatableMethods as er, Model3DNode as es, measureSpring as et, Layer as f, luminance as fa, ThemeInput as fi, ClipVisionOptions as fn, CameraDoF as fo, ComponentDefinition as fr, ShapeNode as fs, TransitionDirection as ft, RenderVideoOptions as g, pulseKeys as ga, UNIT_INDEX as gi, ChartAnimationOptions as gn, CameraShake as go, Cues as gr, SpringOptions as gs, Cube3DOptions as gt, NodeCapability as h, parseColor as ha, TrackedObjectLike as hi, PoseKeypointName as hn, CameraNodeSchema as ho, Cue as hr, SizeSpec as hs, Carousel3DOptions as ht, analyzeAudio as i, hashString as ia, Spring as ii, PhysicsCollision as in, AnimatablePropsFor as io, AudioLevels as ir, SceneDefinitionSchema as is, preloadFont as it, Body2DOptions as j, springSettleFrames as ja, beats as ji, code as jn, EnvironmentPreset as jo, GlyphUnit as jr, collectNodeOps as js, Polyhedron3DOptions as jt, Styles as k, springAt as ka, bandEdges as ki, accent as kn, EnvironmentFog as ko, GlyphBox as kr, applyStaggerToChildren as ks, Plane3DOptions as kt, EditableObjectTrack as l, lerp2 as la, TargetNode as li, ParticleBounds as ln, BoxNode as lo, BuildResult as lr, SequenceOptions as ls, SequenceEntry as lt, Media as m, offsetCues as ma, Track as mi, PersonTrack as mn, CameraNode as mo, ComponentMeta as mr, SignalTrackOptions as ms, Capsule3DOptions as mt, bindComponent as n, glyphAnimator as na, SAFE_INSETS as ni, BodyCommonOptions as nn, wordRanges as no, ArrowCurve as nr, Scene as ns, measureTextAsync as nt, CompatibleEffect as o, inkOn as oa, SyntaxKind as oi, PhysicsWorldOptions as on, BlockNode as oo, BakedKey as or, SceneTransitionType as os, spring as ot, Light as p, mix as pa, ThemeName as pi, PersonPlacement as pn, CameraLens as po, ComponentExtras as pr, ShapeNodeSchema as ps, TransitionSpec as pt, StrokeRect as q, transformPathData as qa, elevate as qi, Result as qn, MaterialTypeSchema as qo, Placement as qr, FieldSample3D as qt, z$2 as r, hashRng as ra, SafeInsets as ri, PhysicsBakeOptions as rn, AnimatableProp as ro, ArrowGeometry as rr, SceneDefinition as rs, preloadCompositionFonts as rt, Composition as s, isLight as sa, Target as si, EmitterShape as sn, BloomConfig as so, BaseProps as sr, SceneTransitionTypeSchema as ss, springCalculation as st, ComponentNode as t, frameSpan as ta, Rng as ti, ParticlesOptions as tn, wobblePoints as to, ArcPath as tr, Model3DNodeSchema as ts, measureText as tt, Effect as u, linePath as ua, TextLayout as ui, ParticleShape as un, BoxNodeSchema as uo, CanvasSize as ur, SequenceTimelineResult as us, SequenceNode as ut, SectionNode as v, rangeRects as va, Vec2$1 as vi, ChartCandle as vn, CarrierHandoffConfigSchema as vo, CutoutOptions as vr, TextAnimator as vs, CubeFaceInput as vt, TrackedRegionOptions as w, round as wa, arrowPaths as wi, ChartType as wn, CompositorProgramSchema as wo, FontRole as wr, ToneMapping as ws, InstanceTransform3D as wt, SubjectOutlineOptions as x, resolveMotion as xa, analyzeChannels as xi, ChartPadding as xn, ColorStop as xo, ElevationLevel as xr, TextNodeSchema as xs, ExtrudedText3DOptions as xt, SectionOptions as y, rendererChars as ya, WordRange as yi, ChartDatum as yn, CarrierState as yo, EaseFn as yr, TextAnimatorSchema as ys, Cylinder3DOptions as yt, PhysicsWorld2D as z, targetPoint as za, contrastRatio as zi, span as zn, LayerAnimation as zo, MeasureOptions as zr, hoistMattes as zs, SolidShape3DNode as zt };
7007
+ //# sourceMappingURL=index-9xte4JgL.d.mts.map