framefields 2.0.8 → 2.0.9

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 (310) hide show
  1. package/dist/audio/index.d.mts +4 -4
  2. package/dist/audio/index.mjs +10 -10
  3. package/dist/{audio-a6pY05g2.d.mts → audio-BxA0sL9z.d.mts} +3 -3
  4. package/dist/{audio-a6pY05g2.d.mts.map → audio-BxA0sL9z.d.mts.map} +1 -1
  5. package/dist/{audio--hi7MiZt.mjs → audio-Dev4NGPa.mjs} +3 -3
  6. package/dist/{audio--hi7MiZt.mjs.map → audio-Dev4NGPa.mjs.map} +1 -1
  7. package/dist/{client-C74hb7fy.mjs → client-CwRhflHE.mjs} +1 -1
  8. package/dist/{client-C74hb7fy.mjs.map → client-CwRhflHE.mjs.map} +1 -1
  9. package/dist/{dist-ZVlYkuR4.mjs → dist-CoSg-CWr.mjs} +17 -8
  10. package/dist/dist-CoSg-CWr.mjs.map +1 -0
  11. package/dist/{dist-BQFap0wr.mjs → dist-DgfykO99.mjs} +53 -5
  12. package/dist/dist-DgfykO99.mjs.map +1 -0
  13. package/dist/{dist-cjs-qEJrwjGk.mjs → dist-cjs--lfMLs3U.mjs} +4 -4
  14. package/dist/{dist-cjs-qEJrwjGk.mjs.map → dist-cjs--lfMLs3U.mjs.map} +1 -1
  15. package/dist/{dist-cjs-x5cwlqA5.mjs → dist-cjs--pxyGFw2.mjs} +1 -1
  16. package/dist/{dist-cjs-x5cwlqA5.mjs.map → dist-cjs--pxyGFw2.mjs.map} +1 -1
  17. package/dist/dist-cjs-3pon9kTt.mjs +6 -0
  18. package/dist/{dist-cjs-Dzs5P3K0.mjs → dist-cjs-BDpO-TH_.mjs} +1 -1
  19. package/dist/{dist-cjs-Dzs5P3K0.mjs.map → dist-cjs-BDpO-TH_.mjs.map} +1 -1
  20. package/dist/{dist-cjs-lYvO8aDo.mjs → dist-cjs-BiKQozdJ.mjs} +3 -3
  21. package/dist/{dist-cjs-lYvO8aDo.mjs.map → dist-cjs-BiKQozdJ.mjs.map} +1 -1
  22. package/dist/{dist-cjs-BUwe2XhR.mjs → dist-cjs-BmyyWYWv.mjs} +2 -2
  23. package/dist/{dist-cjs-BUwe2XhR.mjs.map → dist-cjs-BmyyWYWv.mjs.map} +1 -1
  24. package/dist/{dist-cjs-DgxjcvBN.mjs → dist-cjs-CND_ghfH.mjs} +1 -1
  25. package/dist/{dist-cjs-DgxjcvBN.mjs.map → dist-cjs-CND_ghfH.mjs.map} +1 -1
  26. package/dist/{dist-cjs-BWgoUCXJ.mjs → dist-cjs-CQwmMllY.mjs} +6 -6
  27. package/dist/{dist-cjs-BWgoUCXJ.mjs.map → dist-cjs-CQwmMllY.mjs.map} +1 -1
  28. package/dist/{dist-cjs-B5EVqDFp.mjs → dist-cjs-CgFzrgj8.mjs} +1 -1
  29. package/dist/{dist-cjs-B5EVqDFp.mjs.map → dist-cjs-CgFzrgj8.mjs.map} +1 -1
  30. package/dist/{dist-cjs-ECMuIF57.mjs → dist-cjs-CsU2sZoX.mjs} +4 -4
  31. package/dist/{dist-cjs-ECMuIF57.mjs.map → dist-cjs-CsU2sZoX.mjs.map} +1 -1
  32. package/dist/{dist-cjs-BKmGCgtm.mjs → dist-cjs-DJ8fcQEe.mjs} +11 -11
  33. package/dist/{dist-cjs-BKmGCgtm.mjs.map → dist-cjs-DJ8fcQEe.mjs.map} +1 -1
  34. package/dist/{dist-cjs-D7kEM-Mj.mjs → dist-cjs-DT2jJlcK.mjs} +5 -5
  35. package/dist/{dist-cjs-D7kEM-Mj.mjs.map → dist-cjs-DT2jJlcK.mjs.map} +1 -1
  36. package/dist/{dist-cjs-BUc0_kg-.mjs → dist-cjs-DjzmP0-x.mjs} +13 -13
  37. package/dist/{dist-cjs-BUc0_kg-.mjs.map → dist-cjs-DjzmP0-x.mjs.map} +1 -1
  38. package/dist/{dist-cjs-BGJkdexX.mjs → dist-cjs-DzjrlfbE.mjs} +14 -14
  39. package/dist/{dist-cjs-BGJkdexX.mjs.map → dist-cjs-DzjrlfbE.mjs.map} +1 -1
  40. package/dist/{dist-cjs-Df7144zM.mjs → dist-cjs-M-8QOgS_.mjs} +2 -2
  41. package/dist/{dist-cjs-Df7144zM.mjs.map → dist-cjs-M-8QOgS_.mjs.map} +1 -1
  42. package/dist/{dist-cjs-DFUmy89O.mjs → dist-cjs-TsA8LFXC.mjs} +3 -3
  43. package/dist/{dist-cjs-DFUmy89O.mjs.map → dist-cjs-TsA8LFXC.mjs.map} +1 -1
  44. package/dist/{dist-cjs-DsMdld8l.mjs → dist-cjs-agQl9T8M.mjs} +6 -6
  45. package/dist/{dist-cjs-DsMdld8l.mjs.map → dist-cjs-agQl9T8M.mjs.map} +1 -1
  46. package/dist/effects/index.d.mts +5 -5
  47. package/dist/effects/index.mjs +27 -26
  48. package/dist/{effects-axfL_C3a.mjs → effects-hxRwxjyC.mjs} +27 -3
  49. package/dist/effects-hxRwxjyC.mjs.map +1 -0
  50. package/dist/{event-streams-D-APZ7Ke.mjs → event-streams-BaNGaLxh.mjs} +2 -2
  51. package/dist/{event-streams-D-APZ7Ke.mjs.map → event-streams-BaNGaLxh.mjs.map} +1 -1
  52. package/dist/fonts/index.d.mts +1 -1
  53. package/dist/fonts/index.mjs +1 -1
  54. package/dist/{fonts-Cy26mbrO.mjs → fonts-BznIea-I.mjs} +2 -2
  55. package/dist/{fonts-Cy26mbrO.mjs.map → fonts-BznIea-I.mjs.map} +1 -1
  56. package/dist/{index-BJUS4Nx6.d.mts → index-BXNNJVs8.d.mts} +2 -2
  57. package/dist/{index-BJUS4Nx6.d.mts.map → index-BXNNJVs8.d.mts.map} +1 -1
  58. package/dist/{index-CbzEM_o6.d.mts → index-CQcdKyxF.d.mts} +1 -1
  59. package/dist/{index-CbzEM_o6.d.mts.map → index-CQcdKyxF.d.mts.map} +1 -1
  60. package/dist/{index-BJx_Qxc_.d.mts → index-CvDVpaKn.d.mts} +69 -27
  61. package/dist/index-CvDVpaKn.d.mts.map +1 -0
  62. package/dist/{index-WIPHLy5m.d.mts → index-D1zaOwEU.d.mts} +1 -1
  63. package/dist/index-D1zaOwEU.d.mts.map +1 -0
  64. package/dist/{index-CZChQhXZ.d.mts → index-J9CIK_nu.d.mts} +4 -2
  65. package/dist/index-J9CIK_nu.d.mts.map +1 -0
  66. package/dist/{index-Bi2nRZ_g.d.mts → index-fo4E7A6C.d.mts} +3 -3
  67. package/dist/{index-Bi2nRZ_g.d.mts.map → index-fo4E7A6C.d.mts.map} +1 -1
  68. package/dist/{index-BLbUQolI.d.mts → index-oodg5k9K.d.mts} +3 -3
  69. package/dist/{index-BLbUQolI.d.mts.map → index-oodg5k9K.d.mts.map} +1 -1
  70. package/dist/index.d.mts +11 -10
  71. package/dist/index.d.mts.map +1 -1
  72. package/dist/index.mjs +43 -42
  73. package/dist/index.mjs.map +1 -1
  74. package/dist/{package-C58KmGKw.mjs → package-XpCRbTOA.mjs} +1 -1
  75. package/dist/{package-C58KmGKw.mjs.map → package-XpCRbTOA.mjs.map} +1 -1
  76. package/dist/preview/index.d.mts +2 -2
  77. package/dist/preview/index.mjs +11 -11
  78. package/dist/{preview-BUPB38Kk.mjs → preview-DZTbEON9.mjs} +2 -2
  79. package/dist/{preview-BUPB38Kk.mjs.map → preview-DZTbEON9.mjs.map} +1 -1
  80. package/dist/preview-engine/audio.mjs +1 -1
  81. package/dist/preview-engine/{chunk-3ROJ7JVY.mjs → chunk-25IW7NYO.mjs} +1 -1
  82. package/dist/preview-engine/chunk-36YGYLKD.mjs +58 -0
  83. package/dist/preview-engine/chunk-4VOHF3FF.mjs +1 -0
  84. package/dist/preview-engine/{chunk-TNZENER3.mjs → chunk-7DIAFPQP.mjs} +2 -2
  85. package/dist/preview-engine/{chunk-CXFEQ5PM.mjs → chunk-7O24H4YT.mjs} +2 -2
  86. package/dist/preview-engine/{chunk-BE3CEVJB.mjs → chunk-AUFSM5KI.mjs} +2 -2
  87. package/dist/preview-engine/chunk-AW7HNZKR.mjs +98 -0
  88. package/dist/preview-engine/chunk-BHFI3Y4T.mjs +1 -0
  89. package/dist/preview-engine/chunk-DLXQDDIN.mjs +46 -0
  90. package/dist/preview-engine/chunk-EJGLUZMW.mjs +1 -0
  91. package/dist/preview-engine/{chunk-XSMK5E2V.mjs → chunk-JAOXXYXG.mjs} +2 -2
  92. package/dist/preview-engine/{chunk-PO4VAAQC.mjs → chunk-K52S5DJX.mjs} +1 -1
  93. package/dist/preview-engine/{chunk-IGFT3XLN.mjs → chunk-MDDF2GCF.mjs} +2 -2
  94. package/dist/preview-engine/{chunk-JNEVSC4I.mjs → chunk-OF75EHTX.mjs} +1 -1
  95. package/dist/preview-engine/{chunk-POPVFC5P.mjs → chunk-S4CSX6K5.mjs} +10 -10
  96. package/dist/preview-engine/chunk-SNYAHQ25.mjs +186 -0
  97. package/dist/preview-engine/{chunk-MC7TZZLD.mjs → chunk-T6COGNOW.mjs} +2 -2
  98. package/dist/preview-engine/chunk-VVLM6LZ3.mjs +1 -0
  99. package/dist/preview-engine/chunk-XUM42I4R.mjs +1 -0
  100. package/dist/preview-engine/chunk-ZDCA6NVT.mjs +82 -0
  101. package/dist/preview-engine/effects.mjs +1 -1
  102. package/dist/preview-engine/framefields.mjs +13 -13
  103. package/dist/preview-engine/player.mjs +5 -5
  104. package/dist/preview-engine/{renderers-Q2ZDD5K2.mjs → renderers-2US2NIUG.mjs} +2 -2
  105. package/dist/preview-engine/{renderers-54AQK6RF.mjs → renderers-32PIFHPS.mjs} +1 -1
  106. package/dist/preview-engine/{renderers-O6HOYIPS.mjs → renderers-76PQY2SO.mjs} +1 -1
  107. package/dist/preview-engine/{renderers-PXGLEFZO.mjs → renderers-CI2GXWLP.mjs} +1 -1
  108. package/dist/preview-engine/{renderers-GC7EGB5Z.mjs → renderers-CRKRWR2Y.mjs} +1 -1
  109. package/dist/preview-engine/{renderers-47UITXLZ.mjs → renderers-EE2GFG7J.mjs} +1 -1
  110. package/dist/preview-engine/{renderers-E3JYRLSD.mjs → renderers-GJSUN5HU.mjs} +1 -1
  111. package/dist/preview-engine/{renderers-KCP4TFHG.mjs → renderers-IHKORHMT.mjs} +1 -1
  112. package/dist/preview-engine/renderers-LTNTQLWE.mjs +248 -0
  113. package/dist/preview-engine/{renderers-OBMTU3QY.mjs → renderers-NQUDQEHY.mjs} +1 -1
  114. package/dist/preview-engine/{renderers-QECJP22T.mjs → renderers-NSY2SDIE.mjs} +1 -1
  115. package/dist/preview-engine/{renderers-KS4HPV6Q.mjs → renderers-PWLWOZY4.mjs} +1 -1
  116. package/dist/preview-engine/{renderers-TUYQLKHJ.mjs → renderers-W5CVDJVH.mjs} +1 -1
  117. package/dist/preview-engine/{renderers-N5UPJY73.mjs → renderers-WLLJFZTF.mjs} +1 -1
  118. package/dist/preview-engine/renderers-WN4SYFCU.mjs +1 -0
  119. package/dist/preview-engine/{renderers-TG62LZTF.mjs → renderers-XFBSGTHU.mjs} +1 -1
  120. package/dist/preview-engine/signals.mjs +1 -1
  121. package/dist/{program-Jt07Tx1J.mjs → program-C797QMRL.mjs} +2 -2
  122. package/dist/{program-Jt07Tx1J.mjs.map → program-C797QMRL.mjs.map} +1 -1
  123. package/dist/renderer/index.d.mts +2 -2
  124. package/dist/renderer/index.mjs +3 -3
  125. package/dist/{renderer-BkOXe6o6.mjs → renderer--vY6O19V.mjs} +2 -2
  126. package/dist/{renderer-BkOXe6o6.mjs.map → renderer--vY6O19V.mjs.map} +1 -1
  127. package/dist/{renderer-Bal8734U.d.mts → renderer-2NQWaZd7.d.mts} +2 -2
  128. package/dist/{renderer-Bal8734U.d.mts.map → renderer-2NQWaZd7.d.mts.map} +1 -1
  129. package/dist/renderer-3uTfN95I.mjs +3 -0
  130. package/dist/{renderer-D49-PYDo.mjs → renderer-5jfDUKd4.mjs} +2 -2
  131. package/dist/{renderer-D49-PYDo.mjs.map → renderer-5jfDUKd4.mjs.map} +1 -1
  132. package/dist/{renderer-C5RhNQdr.mjs → renderer-6PqlYQjC.mjs} +10 -9
  133. package/dist/{renderer-C5RhNQdr.mjs.map → renderer-6PqlYQjC.mjs.map} +1 -1
  134. package/dist/{renderer-CceiI6P7.mjs → renderer-9QCHY8Kh.mjs} +18 -4
  135. package/dist/renderer-9QCHY8Kh.mjs.map +1 -0
  136. package/dist/{renderer-o4wOvjEC.mjs → renderer-B1UeU7lX.mjs} +21 -18
  137. package/dist/renderer-B1UeU7lX.mjs.map +1 -0
  138. package/dist/{renderer-DDd3cjaz.mjs → renderer-B4ecTNR7.mjs} +18 -11
  139. package/dist/renderer-B4ecTNR7.mjs.map +1 -0
  140. package/dist/renderer-B5GslTP-.mjs +3 -0
  141. package/dist/{renderer-DXyaswab.mjs → renderer-B8gTyU3w.mjs} +18 -17
  142. package/dist/renderer-B8gTyU3w.mjs.map +1 -0
  143. package/dist/{renderer-CIQYTiT9.mjs → renderer-BE4Ns0nw.mjs} +2 -2
  144. package/dist/{renderer-CIQYTiT9.mjs.map → renderer-BE4Ns0nw.mjs.map} +1 -1
  145. package/dist/{renderer-BDLnExoP.mjs → renderer-BM05sB8m.mjs} +8 -7
  146. package/dist/renderer-BM05sB8m.mjs.map +1 -0
  147. package/dist/{renderer-DxBUppHf.mjs → renderer-BTYncYDf.mjs} +74 -63
  148. package/dist/{renderer-DxBUppHf.mjs.map → renderer-BTYncYDf.mjs.map} +1 -1
  149. package/dist/renderer-BUIWeIKQ.mjs +3 -0
  150. package/dist/{renderer-0uccAKQe.mjs → renderer-BXaK02qA.mjs} +2 -2
  151. package/dist/{renderer-0uccAKQe.mjs.map → renderer-BXaK02qA.mjs.map} +1 -1
  152. package/dist/renderer-B_LfC88A.mjs +3 -0
  153. package/dist/renderer-B_zmicsE.mjs +3 -0
  154. package/dist/{renderer-DrgNyCSx.mjs → renderer-BcPpcKDI.mjs} +2 -2
  155. package/dist/{renderer-DrgNyCSx.mjs.map → renderer-BcPpcKDI.mjs.map} +1 -1
  156. package/dist/{renderer-C-Bv9nVB.mjs → renderer-BgqjWI7K.mjs} +2 -2
  157. package/dist/{renderer-C-Bv9nVB.mjs.map → renderer-BgqjWI7K.mjs.map} +1 -1
  158. package/dist/{renderer-BPbNLPcz.mjs → renderer-BpJgfBQ8.mjs} +2 -2
  159. package/dist/{renderer-BPbNLPcz.mjs.map → renderer-BpJgfBQ8.mjs.map} +1 -1
  160. package/dist/renderer-BtNxtXkR.mjs +3 -0
  161. package/dist/{renderer-D5xelwpw.mjs → renderer-BwmZUkvd.mjs} +2 -2
  162. package/dist/{renderer-D5xelwpw.mjs.map → renderer-BwmZUkvd.mjs.map} +1 -1
  163. package/dist/{renderer-DIfk6m2O.mjs → renderer-C-PfbkPu.mjs} +2 -2
  164. package/dist/{renderer-DIfk6m2O.mjs.map → renderer-C-PfbkPu.mjs.map} +1 -1
  165. package/dist/renderer-C-sZSHtf.mjs +3 -0
  166. package/dist/renderer-C1zifktw.mjs +3 -0
  167. package/dist/{renderer-U0LJuM9D.mjs → renderer-C2gnWTQZ.mjs} +2 -2
  168. package/dist/{renderer-U0LJuM9D.mjs.map → renderer-C2gnWTQZ.mjs.map} +1 -1
  169. package/dist/{renderer-BdSHGzHj.mjs → renderer-CB8hMQgm.mjs} +1 -1
  170. package/dist/renderer-CCt2XTSM.mjs +3 -0
  171. package/dist/{renderer-BjROyv5F.mjs → renderer-CKJb_Lky.mjs} +2 -2
  172. package/dist/{renderer-BjROyv5F.mjs.map → renderer-CKJb_Lky.mjs.map} +1 -1
  173. package/dist/renderer-CMXcaArD.mjs +3 -0
  174. package/dist/{renderer-CIMjMFGm.mjs → renderer-CV8diddR.mjs} +2 -2
  175. package/dist/{renderer-CIMjMFGm.mjs.map → renderer-CV8diddR.mjs.map} +1 -1
  176. package/dist/renderer-CW9D5zCP.mjs +3 -0
  177. package/dist/{renderer-Dgg6pQGI.mjs → renderer-CckJJHbM.mjs} +2 -2
  178. package/dist/{renderer-Dgg6pQGI.mjs.map → renderer-CckJJHbM.mjs.map} +1 -1
  179. package/dist/{renderer-DFKsLrUs.mjs → renderer-CepMDQ06.mjs} +1 -1
  180. package/dist/{renderer-DFKsLrUs.mjs.map → renderer-CepMDQ06.mjs.map} +1 -1
  181. package/dist/renderer-CjY77sB_.mjs +3 -0
  182. package/dist/{renderer-DVQp5fLG.mjs → renderer-CpUbDJAV.mjs} +5 -4
  183. package/dist/{renderer-DVQp5fLG.mjs.map → renderer-CpUbDJAV.mjs.map} +1 -1
  184. package/dist/{renderer-zwxwjWqa.mjs → renderer-CrVAvP92.mjs} +2 -2
  185. package/dist/{renderer-zwxwjWqa.mjs.map → renderer-CrVAvP92.mjs.map} +1 -1
  186. package/dist/{renderer-CboM4tba.mjs → renderer-CuqhAB4i.mjs} +11 -5
  187. package/dist/renderer-CuqhAB4i.mjs.map +1 -0
  188. package/dist/{renderer-CmIySXSN.mjs → renderer-CxQ5v4fJ.mjs} +11 -5
  189. package/dist/renderer-CxQ5v4fJ.mjs.map +1 -0
  190. package/dist/renderer-D1R7vBUl.mjs +3 -0
  191. package/dist/{renderer-DabG62XS.mjs → renderer-D2XD4QYk.mjs} +1 -1
  192. package/dist/{renderer-DabG62XS.mjs.map → renderer-D2XD4QYk.mjs.map} +1 -1
  193. package/dist/{renderer-Bv-ljXHc.mjs → renderer-D3uNI10l.mjs} +2 -2
  194. package/dist/{renderer-Bv-ljXHc.mjs.map → renderer-D3uNI10l.mjs.map} +1 -1
  195. package/dist/renderer-D5yawxtJ.mjs +3 -0
  196. package/dist/{renderer-Bq3Geqe3.mjs → renderer-D6Gi_h4K.mjs} +1 -1
  197. package/dist/{renderer-DjI45OYC.mjs → renderer-D7zvPHKn.mjs} +1 -1
  198. package/dist/{renderer-DjI45OYC.mjs.map → renderer-D7zvPHKn.mjs.map} +1 -1
  199. package/dist/renderer-D9NnIx7o.mjs +3 -0
  200. package/dist/{renderer-D5GsF1LT.mjs → renderer-DAFyJ4dv.mjs} +2 -2
  201. package/dist/{renderer-D5GsF1LT.mjs.map → renderer-DAFyJ4dv.mjs.map} +1 -1
  202. package/dist/renderer-DC8jr1Ay.mjs +3 -0
  203. package/dist/{renderer-CXJxK7HP.mjs → renderer-DCK73tcD.mjs} +17 -4
  204. package/dist/renderer-DCK73tcD.mjs.map +1 -0
  205. package/dist/renderer-DCv-Abvn.mjs +4 -0
  206. package/dist/{renderer-B80s47yo.mjs → renderer-DEJwPRkR.mjs} +1 -1
  207. package/dist/{renderer-B80s47yo.mjs.map → renderer-DEJwPRkR.mjs.map} +1 -1
  208. package/dist/renderer-DPLFhzaV.mjs +3 -0
  209. package/dist/{renderer-B6Q5e9CU.mjs → renderer-DPpgBTlK.mjs} +2 -2
  210. package/dist/{renderer-B6Q5e9CU.mjs.map → renderer-DPpgBTlK.mjs.map} +1 -1
  211. package/dist/{renderer-DP-xNaYX.mjs → renderer-DRpE3ZW4.mjs} +2 -2
  212. package/dist/{renderer-DP-xNaYX.mjs.map → renderer-DRpE3ZW4.mjs.map} +1 -1
  213. package/dist/renderer-DVsF2FDr.mjs +3 -0
  214. package/dist/{renderer-VPK8JnSw.mjs → renderer-DX38J6mK.mjs} +7 -6
  215. package/dist/{renderer-VPK8JnSw.mjs.map → renderer-DX38J6mK.mjs.map} +1 -1
  216. package/dist/{renderer-CIvaRnP_.mjs → renderer-D_1oDOCP.mjs} +1 -1
  217. package/dist/{renderer-CIvaRnP_.mjs.map → renderer-D_1oDOCP.mjs.map} +1 -1
  218. package/dist/renderer-DetDm3ep.mjs +3 -0
  219. package/dist/{renderer-BENX0vRC.mjs → renderer-DgSO5OO0.mjs} +1 -1
  220. package/dist/renderer-DhMhJh_G.mjs +3 -0
  221. package/dist/renderer-DhQld4Qt.mjs +3 -0
  222. package/dist/renderer-Dn3rc3ah.mjs +3 -0
  223. package/dist/{renderer-DP948J9X.mjs → renderer-Dn8v2o9L.mjs} +18 -4
  224. package/dist/renderer-Dn8v2o9L.mjs.map +1 -0
  225. package/dist/{renderer-BQZniXw0.mjs → renderer-DnF3aXPX.mjs} +2 -2
  226. package/dist/{renderer-BQZniXw0.mjs.map → renderer-DnF3aXPX.mjs.map} +1 -1
  227. package/dist/renderer-Dw9LxE2f.mjs +3 -0
  228. package/dist/{renderer-CXZe0lfI.mjs → renderer-EmG34sT2.mjs} +2 -2
  229. package/dist/{renderer-CXZe0lfI.mjs.map → renderer-EmG34sT2.mjs.map} +1 -1
  230. package/dist/renderer-HvrQZw5E.mjs +3 -0
  231. package/dist/renderer-QdJE56ts.mjs +3 -0
  232. package/dist/{renderer-h-HOoLwD.mjs → renderer-_bygZSKk.mjs} +1 -1
  233. package/dist/{renderer-h-HOoLwD.mjs.map → renderer-_bygZSKk.mjs.map} +1 -1
  234. package/dist/{renderer-BD6Jkc8j.mjs → renderer-b6sZN90h.mjs} +4 -3
  235. package/dist/{renderer-BD6Jkc8j.mjs.map → renderer-b6sZN90h.mjs.map} +1 -1
  236. package/dist/renderer-d5-F_48R.mjs +3 -0
  237. package/dist/renderer-euGyUN2O.mjs +3 -0
  238. package/dist/{renderer-Bu0xOP_v.mjs → renderer-gT0ADXMW.mjs} +2 -2
  239. package/dist/{renderer-Bu0xOP_v.mjs.map → renderer-gT0ADXMW.mjs.map} +1 -1
  240. package/dist/{renderer-DbaSgadp.mjs → renderer-lq4n1hSS.mjs} +2 -2
  241. package/dist/{renderer-DbaSgadp.mjs.map → renderer-lq4n1hSS.mjs.map} +1 -1
  242. package/dist/renderer-p3SmBFP9.mjs +3 -0
  243. package/dist/renderer-xp_J0ln7.mjs +263 -0
  244. package/dist/renderer-xp_J0ln7.mjs.map +1 -0
  245. package/dist/{renderer-BTFPC3UJ.mjs → renderer-zvtpCnqy.mjs} +1 -1
  246. package/dist/{renderers-CP8CFWDs-BQBjaV9O.mjs → renderers-CP8CFWDs-Ciap7y_j.mjs} +2 -2
  247. package/dist/{renderers-CP8CFWDs-BQBjaV9O.mjs.map → renderers-CP8CFWDs-Ciap7y_j.mjs.map} +1 -1
  248. package/dist/signals/index.d.mts +5 -5
  249. package/dist/signals/index.mjs +4 -4
  250. package/dist/{signin-CZj4Oc5s.mjs → signin-Db08vl-g.mjs} +9 -9
  251. package/dist/{signin-CZj4Oc5s.mjs.map → signin-Db08vl-g.mjs.map} +1 -1
  252. package/dist/{sso-oidc-C0_31ThY.mjs → sso-oidc-CpLz_lIu.mjs} +9 -9
  253. package/dist/{sso-oidc-C0_31ThY.mjs.map → sso-oidc-CpLz_lIu.mjs.map} +1 -1
  254. package/dist/{sts-DD4ggEXC.mjs → sts-BQefGuml.mjs} +2 -2
  255. package/dist/{sts-nXw8RDJI.mjs → sts-Dgl0kH-t.mjs} +9 -9
  256. package/dist/{sts-nXw8RDJI.mjs.map → sts-Dgl0kH-t.mjs.map} +1 -1
  257. package/package.json +55 -54
  258. package/dist/dist-BQFap0wr.mjs.map +0 -1
  259. package/dist/dist-ZVlYkuR4.mjs.map +0 -1
  260. package/dist/dist-cjs-CmZEMtO6.mjs +0 -6
  261. package/dist/effects-axfL_C3a.mjs.map +0 -1
  262. package/dist/index-BJx_Qxc_.d.mts.map +0 -1
  263. package/dist/index-CZChQhXZ.d.mts.map +0 -1
  264. package/dist/index-WIPHLy5m.d.mts.map +0 -1
  265. package/dist/preview-engine/chunk-2XXICKQV.mjs +0 -82
  266. package/dist/preview-engine/chunk-66NVL4BN.mjs +0 -58
  267. package/dist/preview-engine/chunk-7MJVROKR.mjs +0 -98
  268. package/dist/preview-engine/chunk-7NVDTELW.mjs +0 -1
  269. package/dist/preview-engine/chunk-DMWSTYFF.mjs +0 -1
  270. package/dist/preview-engine/chunk-FKZ4XXPE.mjs +0 -1
  271. package/dist/preview-engine/chunk-JQ4WY6BZ.mjs +0 -186
  272. package/dist/preview-engine/chunk-S3P3MJYU.mjs +0 -1
  273. package/dist/preview-engine/renderers-MZBR3MSR.mjs +0 -248
  274. package/dist/renderer-1mNREW16.mjs +0 -3
  275. package/dist/renderer-4tKI3p9c.mjs +0 -3
  276. package/dist/renderer-B3XeKN-e.mjs +0 -3
  277. package/dist/renderer-B7_6SHd8.mjs +0 -3
  278. package/dist/renderer-BDLnExoP.mjs.map +0 -1
  279. package/dist/renderer-BENF6Wts.mjs +0 -3
  280. package/dist/renderer-BMovYRoR.mjs +0 -3
  281. package/dist/renderer-BPiLdwI1.mjs +0 -3
  282. package/dist/renderer-BdyMrzUX.mjs +0 -3
  283. package/dist/renderer-BfpdekRn.mjs +0 -3
  284. package/dist/renderer-BfvBHHNr.mjs +0 -3
  285. package/dist/renderer-BtdnLjKZ.mjs +0 -3
  286. package/dist/renderer-C0q5UUY7.mjs +0 -3
  287. package/dist/renderer-CXJxK7HP.mjs.map +0 -1
  288. package/dist/renderer-CboM4tba.mjs.map +0 -1
  289. package/dist/renderer-CceiI6P7.mjs.map +0 -1
  290. package/dist/renderer-Cg-rJgwM.mjs +0 -3
  291. package/dist/renderer-CkgQArsi.mjs +0 -3
  292. package/dist/renderer-CmIySXSN.mjs.map +0 -1
  293. package/dist/renderer-CnO9KcmP.mjs +0 -3
  294. package/dist/renderer-Cnp5JCwi.mjs +0 -3
  295. package/dist/renderer-CwiCQzjW.mjs +0 -4
  296. package/dist/renderer-D2LCMZ0l.mjs +0 -3
  297. package/dist/renderer-D6bWQtr-.mjs +0 -3
  298. package/dist/renderer-DBGy4qIh.mjs +0 -3
  299. package/dist/renderer-DBRnvHBV.mjs +0 -3
  300. package/dist/renderer-DDd3cjaz.mjs.map +0 -1
  301. package/dist/renderer-DJgrcu3v.mjs +0 -3
  302. package/dist/renderer-DP948J9X.mjs.map +0 -1
  303. package/dist/renderer-DTpBOlDA.mjs +0 -3
  304. package/dist/renderer-DWwIX4Mr.mjs +0 -3
  305. package/dist/renderer-DXyaswab.mjs.map +0 -1
  306. package/dist/renderer-DfnacE0H.mjs +0 -3
  307. package/dist/renderer-RA8pee2T.mjs +0 -3
  308. package/dist/renderer-eH4u4-2c.mjs +0 -3
  309. package/dist/renderer-eWOqFUz9.mjs +0 -3
  310. package/dist/renderer-o4wOvjEC.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"event-streams-D-APZ7Ke.mjs","names":["toUtf8","fromUtf8"],"sources":["../../../node_modules/.pnpm/@smithy+core@3.23.12/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js","../../../node_modules/.pnpm/@smithy+core@3.23.12/node_modules/@smithy/core/dist-es/submodules/event-streams/index.js"],"sourcesContent":["import { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const [key, value] of Object.entries(firstEvent.value)) {\n initialResponseContainer[key] = value;\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n","export * from \"./EventStreamSerde\";\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;CACa,mBAAb,MAA8B;EAC1B;EACA;EACA;EACA;EACA;EACA,YAAY,EAAE,YAAY,YAAY,cAAc,cAAc,sBAAuB;AACrF,QAAK,aAAa;AAClB,QAAK,aAAa;AAClB,QAAK,eAAe;AACpB,QAAK,eAAe;AACpB,QAAK,qBAAqB;;EAE9B,MAAM,qBAAqB,EAAE,aAAa,eAAe,kBAAmB;GACxE,MAAM,aAAa,KAAK;GACxB,MAAM,oBAAoB,cAAc,sBAAsB;GAC9D,MAAM,cAAc,cAAc,gBAAgB,kBAAkB;GACpE,MAAM,aAAa,KAAK;GACxB,MAAM,qBAAqB,KAAK;GAChC,MAAM,uBAAuB,OAAO,uBAAuB;GAC3D,MAAM,sBAAsB,EACxB,QAAQ,OAAO,iBAAiB;AAC5B,QAAI,gBAAgB;KAChB,MAAM,UAAU;MACZ,eAAe;OAAE,MAAM;OAAU,OAAO;OAAmB;MAC3D,iBAAiB;OAAE,MAAM;OAAU,OAAO;OAAS;MACnD,iBAAiB;OAAE,MAAM;OAAU,OAAO;OAAoB;MACjE;AACD,gBAAW,MAAM,eAAe,eAAe;KAC/C,MAAM,OAAO,WAAW,OAAO;AAC/B,WAAM;OACD,uBAAuB;MACxB;MACA;MACH;;AAEL,eAAW,MAAM,QAAQ,YACrB,OAAM;MAGjB;AACD,UAAO,WAAW,UAAU,sB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version":3,"file":"event-streams-BaNGaLxh.mjs","names":["toUtf8","fromUtf8"],"sources":["../../../node_modules/.pnpm/@smithy+core@3.23.12/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js","../../../node_modules/.pnpm/@smithy+core@3.23.12/node_modules/@smithy/core/dist-es/submodules/event-streams/index.js"],"sourcesContent":["import { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const [key, value] of Object.entries(firstEvent.value)) {\n initialResponseContainer[key] = value;\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n","export * from \"./EventStreamSerde\";\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;CACa,mBAAb,MAA8B;EAC1B;EACA;EACA;EACA;EACA;EACA,YAAY,EAAE,YAAY,YAAY,cAAc,cAAc,sBAAuB;AACrF,QAAK,aAAa;AAClB,QAAK,aAAa;AAClB,QAAK,eAAe;AACpB,QAAK,eAAe;AACpB,QAAK,qBAAqB;;EAE9B,MAAM,qBAAqB,EAAE,aAAa,eAAe,kBAAmB;GACxE,MAAM,aAAa,KAAK;GACxB,MAAM,oBAAoB,cAAc,sBAAsB;GAC9D,MAAM,cAAc,cAAc,gBAAgB,kBAAkB;GACpE,MAAM,aAAa,KAAK;GACxB,MAAM,qBAAqB,KAAK;GAChC,MAAM,uBAAuB,OAAO,uBAAuB;GAC3D,MAAM,sBAAsB,EACxB,QAAQ,OAAO,iBAAiB;AAC5B,QAAI,gBAAgB;KAChB,MAAM,UAAU;MACZ,eAAe;OAAE,MAAM;OAAU,OAAO;OAAmB;MAC3D,iBAAiB;OAAE,MAAM;OAAU,OAAO;OAAS;MACnD,iBAAiB;OAAE,MAAM;OAAU,OAAO;OAAoB;MACjE;AACD,gBAAW,MAAM,eAAe,eAAe;KAC/C,MAAM,OAAO,WAAW,OAAO;AAC/B,WAAM;OACD,uBAAuB;MACxB;MACA;MACH;;AAEL,eAAW,MA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eC,0BAAU,qBAAqB,GAClE;IAGF;IACA;IACA;IACH"}
@@ -1,2 +1,2 @@
1
- import { n as RegisterFontOptions, r as RegisteredFont, t as FontManager } from "../index-CbzEM_o6.mjs";
1
+ import { n as RegisterFontOptions, r as RegisteredFont, t as FontManager } from "../index-CQcdKyxF.mjs";
2
2
  export { FontManager, RegisterFontOptions, RegisteredFont };
@@ -1,3 +1,3 @@
1
- import { t as FontManager } from "../fonts-Cy26mbrO.mjs";
1
+ import { t as FontManager } from "../fonts-BznIea-I.mjs";
2
2
 
3
3
  export { FontManager };
@@ -1,4 +1,4 @@
1
- import { $ as registerHeadlessFont, y as SlugFontCache } from "./dist-BQFap0wr.mjs";
1
+ import { et as registerHeadlessFont, y as SlugFontCache } from "./dist-DgfykO99.mjs";
2
2
  import * as fontkit from "fontkit";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs/promises";
@@ -196,4 +196,4 @@ var FontManager = class FontManager {
196
196
 
197
197
  //#endregion
198
198
  export { FontManager as t };
199
- //# sourceMappingURL=fonts-Cy26mbrO.mjs.map
199
+ //# sourceMappingURL=fonts-BznIea-I.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fonts-Cy26mbrO.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} 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\tcleanPath = new URL(cleanPath).pathname;\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 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/**\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\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\")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,MACT,sDAAsD,YAAY,KAAK,MACvE;;EAGF,MAAM,iBACL,cAAc,cACd,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;AAG1C,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-BznIea-I.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} 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\tcleanPath = new URL(cleanPath).pathname;\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 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/**\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\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":";;;;;;AA+BA,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;CAGR,MAAM,UAAU,QAAQ,GAAG,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI;AACxD,OAAM,IAAI,MACT,4BAA4B,YAAY,0FAA0F,OAAO,GACzI;;AAGF,eAAe,oBACd,QAC0B;AAC1B,KAAI,kBAAkB,WACrB,QAAO,EAAE,QAAQ,QAAQ;AAG1B,KAAI,OAAO,WAAW,SACrB,OAAM,IAAI,UACT,mEAAmE,OAAO,SAC1E;CAGF,IAAI,YAAY;AAChB,KAAI,UAAU,WAAW,UAAU,IAAI,UAAU,WAAW,WAAW,EAAE;EACxE,MAAM,MAAM,MAAM,MAAM,UAAU;AAClC,MAAI,CAAC,IAAI,GACR,OAAM,IAAI,MACT,iCAAiC,UAAU,UAAU,IAAI,OAAO,GAAG,IAAI,aACvE;EAEF,MAAM,cAAc,MAAM,IAAI,aAAa;AAC3C,SAAO;GACN,QAAQ,IAAI,WAAW,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gB,OAAO,MAAM;OAE7B,iBAAgB;WAET,KAAK;GACb,MAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;AAC5D,SAAM,IAAI,MACT,sDAAsD,YAAY,KAAK,MACvE;;EAGF,MAAM,iBACL,cAAc,cACd,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;AAG1C,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 { wr as VirtualMediaData } from "./index-WIPHLy5m.mjs";
1
+ import { wr as VirtualMediaData } from "./index-D1zaOwEU.mjs";
2
2
  import { VideoSampleSource } from "mediabunny";
3
3
  import { VideoFrame } from "@napi-rs/webcodecs";
4
4
 
@@ -313,4 +313,4 @@ type FrameGridRenderable = {
313
313
  declare function renderFrameGrid(target: FrameGridRenderable, options?: FrameGridOptions): Promise<Buffer>;
314
314
  //#endregion
315
315
  export { renderFrameGrid as a, HeadlessMediaRenderer as c, QaSegment as d, VideoQaOptions as f, renderSemaphore as g, formatQaReport as h, computeGridLayout as i, HeadlessWebGPURenderer as l, VideoQaStats as m, FrameGridRenderable as n, resolveSamplePoints as o, VideoQaReport as p, FrameSamplePoint as r, AudioQaStats as s, FrameGridOptions as t, QaIssue as u };
316
- //# sourceMappingURL=index-BJUS4Nx6.d.mts.map
316
+ //# sourceMappingURL=index-BXNNJVs8.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BJUS4Nx6.d.mts","names":["VideoColorPrimaries","VideoFrame","VideoMatrixCoefficients","VideoTransferCharacteristics","RenderDiagnostic","VirtualMediaData","VideoSampleSource","preloadFonts","GPUDevice","Promise","StagingSlotStatus","VideoColorSpaceConfig","DmaStagingRingOptions","GPUTextureFormat","StagingSlotInfo","DmaStagingRing","GPUCommandEncoder","GPUTexture","Uint8Array","findNodesDir","discoverAndRegisterNodeRenderers","VideoQaOptions","QaSegment","QaIssue","VideoQaStats","AudioQaStats","VideoQaReport","FrameInspector","analyzeAudio","Float32Array","integratedLoudness","buildQaReport","formatQaReport","WorkerInput","WorkerMessage","Array","RenderSemaphore","renderSemaphore","HeadlessWebGPURenderer","Buffer","HeadlessMediaRenderer","NODE_KINDS","NodeKind","NodeRendererExports","NodeManifest","NodeManifestError","Error","parseNodeManifest","loadNodeManifests","ZeroCopyWebCodecsPipelineOptions","WebCodecsPipelineStats","ZeroCopyWebCodecsPipeline"],"sources":["../../renderer/dist/index.d.mts","../src/renderer/framegrid.ts"],"sourcesContent":["import { VideoColorPrimaries, VideoFrame, VideoMatrixCoefficients, VideoTransferCharacteristics } from \"@napi-rs/webcodecs\";\nimport { RenderDiagnostic, VirtualMediaData } from \"@framefields/core\";\nimport { VideoSampleSource } from \"mediabunny\";\n\n//#region src/asset-preloader.d.ts\n\n/**\n * Preloads only the fonts (and emoji) a VirtualMediaData tree's text uses, so\n * typography renders correctly on Node.js without loading its media. Shared\n * with the browser preview; emoji need a font set with\n * `FontManager.registerEmojiFont()`.\n */\ndeclare function preloadFonts(media: VirtualMediaData, device?: GPUDevice | null): Promise<void>;\n//#endregion\n//#region src/dma-staging-ring.d.ts\ntype StagingSlotStatus = \"idle\" | \"rendering\" | \"mapping\" | \"mapped\";\ninterface VideoColorSpaceConfig {\n readonly primaries?: VideoColorPrimaries;\n readonly transfer?: VideoTransferCharacteristics;\n readonly matrix?: VideoMatrixCoefficients;\n readonly fullRange?: boolean;\n}\ninterface DmaStagingRingOptions {\n readonly width: number;\n readonly height: number;\n readonly capacity?: number;\n readonly format?: GPUTextureFormat;\n}\ninterface StagingSlotInfo {\n readonly index: number;\n readonly status: StagingSlotStatus;\n readonly inFlightFrame: number | null;\n}\n/**\n * Pipelined Asynchronous DMA Staging Ring for WebGPU.\n *\n * Implements double-buffered (or N-buffered) GPU staging buffers to overlap\n * GPU render passes with asynchronous DMA host transfers and WebCodecs hardware encoding.\n * Eliminates GPU stalls by allowing Frame i+1 to execute on the GPU while Frame i\n * is asynchronously mapped and consumed by the hardware video encoder.\n */\ndeclare class DmaStagingRing {\n readonly width: number;\n readonly height: number;\n readonly capacity: number;\n readonly bytesPerRow: number;\n readonly unpaddedBytesPerRow: number;\n readonly bufferSize: number;\n readonly format: GPUTextureFormat;\n readonly device: GPUDevice;\n private readonly slots;\n private isDestroyed;\n constructor(device: GPUDevice, options: DmaStagingRingOptions);\n /**\n * Prepares the staging buffer slot for writing by ensuring any prior mapping\n * from a previous cycle has been completed and unmapped.\n */\n prepareSlot(frameIndex: number): Promise<void>;\n /**\n * Records a GPU-to-buffer DMA copy command into the provided command encoder.\n */\n stageTexture(encoder: GPUCommandEncoder, texture: GPUTexture, frameIndex: number): void;\n /**\n * Initiates asynchronous DMA mapping on the slot for the specified frame.\n * Must be called immediately after submitting the command encoder to the device queue.\n */\n scheduleMap(frameIndex: number): Promise<void>;\n /**\n * Awaits asynchronous mapping and extracts pixels into a tightly packed Uint8Array.\n * The slot remains in the \"mapped\" state until releaseFrame() is called.\n */\n readFramePixels(frameIndex: number): Promise<Uint8Array>;\n /**\n * Awaits asynchronous mapping, extracts pixels, and immediately unmaps the staging buffer,\n * returning the slot to \"idle\" state so it can be reused immediately.\n */\n readAndReleaseFrame(frameIndex: number): Promise<Uint8Array>;\n /**\n * Directly reads the mapped staging buffer into a WebCodecs VideoFrame,\n * bypassing redundant intermediate JS allocations when row pitches align,\n * and immediately unmaps the buffer.\n */\n readFrameToVideoFrame(frameIndex: number, timestampUs: number, colorSpace?: VideoColorSpaceConfig, /** Sees the tightly packed RGBA pixels while they are mapped; must not keep them. */\n inspect?: (rgba: Uint8Array) => void): Promise<VideoFrame>;\n /**\n * Unmaps the staging buffer for the specified frame and marks the slot idle.\n */\n releaseFrame(frameIndex: number): void;\n /**\n * Returns current status info for each slot in the ring.\n */\n getSlotInfos(): readonly StagingSlotInfo[];\n /**\n * Destroys all staging buffers and releases resources.\n */\n destroy(): void;\n private checkDestroyed;\n}\n//#endregion\n//#region src/dynamic-node-discovery.d.ts\n/** Locates the workspace `nodes/` directory by climbing up from this file. */\ndeclare function findNodesDir(startDir?: string): string | null;\n/**\n * Registers the built-in node renderers, then any extra nodes found in the\n * directory named by `FRAMEFIELDS_NODES_DIR` (local node development). A node in\n * that directory overrides the built-in renderer for the same op.\n */\ndeclare function discoverAndRegisterNodeRenderers(): Promise<void>;\n//#endregion\n//#region src/video-qa.d.ts\n/**\n * Quality checks run on a video while it renders: frames are measured as\n * they are read back for the encoder and audio as it is mixed, so the report\n * describes exactly what was encoded without decoding the file again.\n */\ninterface VideoQaOptions {\n /** Luma (0-1) at or below which a pixel counts as black. Default 0.1. */\n readonly blackPixelThreshold?: number;\n /** Share of black pixels that makes a frame black. Default 0.98. */\n readonly blackFrameRatio?: number;\n /** Shortest run of black frames reported. Default 0.5 s. */\n readonly minBlackSec?: number;\n /** Shortest run of unchanging frames reported. Default 2 s. */\n readonly minFrozenSec?: number;\n /** Level (dBFS, 100 ms windows) below which audio counts as silent. Default -60. */\n readonly silenceDbfs?: number;\n /** Shortest silent stretch reported. Default 2 s. */\n readonly minSilenceSec?: number;\n /** Integrated loudness to hit, e.g. -14 for most streaming platforms. Unchecked when unset. */\n readonly targetLufs?: number;\n /** Allowed distance from `targetLufs`, in LU. Default 1. */\n readonly lufsTolerance?: number;\n}\ninterface QaSegment {\n readonly startSec: number;\n readonly endSec: number;\n}\ninterface QaIssue {\n readonly severity: \"error\" | \"warning\" | \"info\";\n /** Stable machine-readable kind, e.g. \"black_frames\", \"audio_clipping\" */\n readonly code: string;\n readonly message: string;\n readonly startSec?: number;\n readonly endSec?: number;\n readonly layerId?: string;\n}\ninterface VideoQaStats {\n readonly expectedFrames: number;\n readonly encodedFrames: number;\n readonly fps: number;\n readonly width: number;\n readonly height: number;\n /** Average luma over the whole video, 0-1 */\n readonly meanLuma: number;\n readonly blackSegments: readonly QaSegment[];\n readonly frozenSegments: readonly QaSegment[];\n}\ninterface AudioQaStats {\n readonly sampleRate: number;\n readonly channels: number;\n readonly durationSec: number;\n /** Highest sample, dBFS (sample peak, not true peak) */\n readonly peakDbfs: number;\n /** Mean level over the whole track, dBFS */\n readonly rmsDbfs: number;\n /** ITU-R BS.1770 integrated loudness; null when the track is silent */\n readonly integratedLufs: number | null;\n /** Samples at or beyond full scale */\n readonly clippedSamples: number;\n readonly silentSegments: readonly QaSegment[];\n}\ninterface VideoQaReport {\n /** No errors or warnings (info issues do not fail a render) */\n readonly passed: boolean;\n readonly video?: VideoQaStats;\n readonly audio?: AudioQaStats;\n readonly issues: readonly QaIssue[];\n}\n/** Measures frames handed to it in order, as RGBA bytes. */\ndeclare class FrameInspector {\n private readonly blackLuma;\n private readonly blackRatio;\n private readonly black;\n private readonly sameAsPrevious;\n private lumaSum;\n private previous;\n constructor(options?: VideoQaOptions);\n get frameCount(): number;\n inspect(rgba: Uint8Array, width: number, height: number): void;\n stats(expectedFrames: number, encodedFrames: number, fps: number, width: number, height: number, options?: VideoQaOptions): VideoQaStats;\n}\n/** Measures a mixed audio track (one Float32Array per channel). */\ndeclare function analyzeAudio(channels: readonly Float32Array[], sampleRate: number, options?: VideoQaOptions): AudioQaStats;\n/**\n * ITU-R BS.1770-4 integrated loudness (LUFS): K-weighted mean square in\n * 400 ms blocks with 75% overlap, gated at -70 LUFS and then at 10 LU below\n * the mean of what passed. Channels weigh 1 (stereo and mono layouts).\n */\ndeclare function integratedLoudness(channels: readonly Float32Array[], sampleRate: number): number | null;\n/** Turn measurements and document diagnostics into a report with issues. */\ndeclare function buildQaReport(parts: {\n video?: VideoQaStats;\n audio?: AudioQaStats;\n diagnostics?: readonly RenderDiagnostic[];\n options?: VideoQaOptions;\n}): VideoQaReport;\n/** A short human- and agent-readable summary of a report. */\ndeclare function formatQaReport(report: VideoQaReport): string;\n//#endregion\n//#region src/headless-webgpu-renderer.d.ts\ninterface WorkerInput {\n virtualMedia: VirtualMediaData;\n width: number;\n height: number;\n fps: number;\n startFrame: number;\n endFrame: number;\n renderId: string;\n outputFormat: \"png\" | \"pixels\";\n workerIndex: number;\n}\ntype WorkerMessage = {\n type: \"frame\";\n renderId: string;\n frameIndex: number;\n pixels: Uint8Array;\n} | {\n type: \"png\";\n renderId: string;\n data: Uint8Array;\n} | {\n type: \"done\";\n renderId: string;\n} | {\n type: \"lut\";\n renderId: string;\n raw: {\n points: Array<[number, number, number]>;\n size: number;\n type: \"1D\" | \"3D\";\n };\n} | {\n type: \"error\";\n renderId?: string;\n error: string;\n};\ndeclare class RenderSemaphore {\n private _running;\n private readonly _max;\n private readonly _queue;\n constructor(max: number);\n acquire(timeoutMs?: number): Promise<void>;\n release(): void;\n get stats(): {\n active: number;\n queued: number;\n max: number;\n };\n}\ndeclare const renderSemaphore: RenderSemaphore;\ndeclare class HeadlessWebGPURenderer {\n private static isInitialized;\n private static initPromise;\n private static initFailureCount;\n private static readonly MAX_INIT_FAILURES;\n private static nextRetryAt;\n static initialize(): Promise<void>;\n renderImage(virtualMedia: VirtualMediaData, frame?: number, fps?: number, options?: {\n renderId?: string;\n /** \"rgba\" skips PNG encoding and returns width*height*4 raw pixels. */\n format?: \"png\" | \"rgba\";\n }): Promise<Buffer>;\n /**\n * Renders a single frame to a PNG buffer at a specified timestamp in milliseconds or frame index.\n */\n renderFrame(source: VirtualMediaData | {\n toVirtualMedia(): VirtualMediaData;\n }, options?: {\n atMs?: number;\n frame?: number;\n fps?: number;\n /** Reuse compiled state across calls; see `renderImage`. */\n renderId?: string;\n /** \"rgba\" returns raw width*height*4 pixels instead of a PNG. */\n format?: \"png\" | \"rgba\";\n }): Promise<Buffer>;\n /**\n * Mixes the composition's full audio timeline (clips, effects, synthesized\n * tracks) to stereo PCM, exactly as `renderVideo` muxes it.\n */\n renderAudio(virtualMedia: VirtualMediaData, options?: {\n fps?: number;\n sampleRate?: number;\n }): Promise<{\n channels: Float32Array[];\n sampleRate: number;\n }>;\n renderLut(virtualMedia: VirtualMediaData, frame?: number, fps?: number): Promise<Buffer>;\n private resolveMediaDuration;\n renderVideo(virtualMedia: VirtualMediaData, options?: {\n codec?: string;\n audioCodec?: string;\n quality?: string;\n concurrency?: number;\n /**\n * Depth of the DMA staging ring (default 2, clamped 2–8). A deeper\n * ring overlaps more encoder latency at the cost of VRAM\n * (~8.3MB/slot at 1080p RGBA). Also settable via\n * `FRAMEFIELDS_RING_CAPACITY`.\n */\n ringCapacity?: number;\n /**\n * Measure the output while it renders (black and frozen frames,\n * dropped frames, loudness, clipping, silence, document warnings)\n * and return the findings as `qa`. `true` uses default thresholds.\n */\n qa?: boolean | VideoQaOptions;\n }): Promise<{\n filePath: string;\n cleanup: () => Promise<void>;\n qa?: VideoQaReport;\n }>;\n}\ndeclare const HeadlessMediaRenderer: typeof HeadlessWebGPURenderer;\ntype HeadlessMediaRenderer = HeadlessWebGPURenderer;\n//#endregion\n//#region src/node-manifest.d.ts\n/**\n * The `framefields` block of a node package's `package.json`.\n *\n * This is the single declaration of a node's op: renderer discovery, the\n * effects generator (`scripts/generate-effects.ts`) and the skill catalog all\n * read it from here. There is deliberately no fallback that derives an op from\n * the package name. See `spec/sync-node.md` §5.1.\n */\ndeclare const NODE_KINDS: readonly [\"effect\", \"audio\", \"source\", \"signal\", \"utility\"];\ntype NodeKind = (typeof NODE_KINDS)[number];\ninterface NodeRendererExports {\n development?: string;\n import?: string;\n default?: string;\n}\ninterface NodeManifest {\n /** Directory name under `nodes/`, e.g. `node-apply-lut`. */\n dir: string;\n /** Absolute path of the node package. */\n path: string;\n /** npm package name, e.g. `@framefields/node-lut`. */\n packageName: string;\n /** Canonical op literal used in the operation AST and the renderer registry. */\n type: string;\n kind: NodeKind;\n /** Legacy ops that resolve to the same renderer. */\n aliases: readonly string[];\n /** Named zod schema export of `src/shared/config.ts`. */\n schema?: string;\n /** Authoring class name. Defaults to `type`. */\n className?: string;\n /** Key on `Effect.*`. Defaults to `className` with a lower-cased first letter. */\n factory?: string;\n /** A hand-written subclass exists under `effects/custom/`. */\n custom: boolean;\n /** `false` when the package opts out of discovery. */\n enabled: boolean;\n rendererExports?: NodeRendererExports;\n}\ndeclare class NodeManifestError extends Error {\n readonly problems: readonly string[];\n constructor(problems: readonly string[]);\n}\n/**\n * Validates one parsed `package.json`. Returns the manifest, or the list of\n * problems that make it unusable. Never throws.\n */\ndeclare function parseNodeManifest(pkg: unknown, dir: string, nodePath?: string): {\n manifest?: NodeManifest;\n problems: string[];\n};\n/**\n * Reads every `nodes/node-*` package and returns its manifest, sorted by\n * directory name. Throws a single {@link NodeManifestError} listing every\n * problem: a missing or malformed block, or an op/alias claimed twice.\n */\ndeclare function loadNodeManifests(nodesDir: string): NodeManifest[];\n//#endregion\n//#region src/zero-copy-webcodecs-pipeline.d.ts\ninterface ZeroCopyWebCodecsPipelineOptions {\n readonly width: number;\n readonly height: number;\n readonly fps: number;\n readonly videoSource: VideoSampleSource;\n readonly ringCapacity?: number;\n readonly colorSpace?: VideoColorSpaceConfig;\n readonly directCanvasSource?: unknown;\n /**\n * Called with each frame's RGBA pixels, in frame order, just before it is\n * encoded (staging-ring path only). The buffer is reused: read, don't keep.\n */\n readonly onFrame?: (rgba: Uint8Array, frameIndex: number) => void;\n}\ninterface WebCodecsPipelineStats {\n readonly totalFramesEnqueued: number;\n readonly totalFramesEncoded: number;\n readonly averageGpuSubmitTimeMs: number;\n readonly averageEncodeTimeMs: number;\n readonly averageCycleTimeMs: number;\n readonly maxCycleTimeMs: number;\n readonly minCycleTimeMs: number;\n readonly throughputFps: number;\n readonly ringCapacity: number;\n readonly isDirectZeroCopy: boolean;\n}\n/**\n * High-performance hardware video encoding pipeline integrating WebGPU textures with WebCodecs.\n *\n * Provides:\n * 1. Direct hardware acceleration when running with WebCodecs / OffscreenCanvas.\n * 2. Pipelined asynchronous double-buffered DMA staging ring for headless Node.js (Dawn native),\n * allowing GPU Frame i+1 rendering to overlap concurrently with Frame i hardware encoding.\n */\ndeclare class ZeroCopyWebCodecsPipeline {\n readonly width: number;\n readonly height: number;\n readonly fps: number;\n readonly ringCapacity: number;\n private readonly device;\n private readonly videoSource;\n private readonly stagingRing;\n private readonly colorSpace?;\n private readonly directCanvasSource?;\n private readonly onFrame?;\n private readonly inFlightFrames;\n private readonly cycleStartTimes;\n private totalFramesEnqueued;\n private totalFramesEncoded;\n private totalGpuSubmitTimeMs;\n private totalEncodeTimeMs;\n private totalCycleTimeMs;\n private maxCycleTimeMs;\n private minCycleTimeMs;\n private pipelineStartTime;\n constructor(device: GPUDevice, options: ZeroCopyWebCodecsPipelineOptions);\n /**\n * Returns true if direct zero-copy from an OffscreenCanvas or texture is active.\n */\n canDirectZeroCopy(): boolean;\n /**\n * Enqueues a rendered GPU texture frame into the pipeline.\n *\n * Uses double-buffered DMA staging: if the staging ring has reached capacity,\n * the oldest in-flight frame is asynchronously consumed and added to the video encoder\n * before staging the new frame, guaranteeing constant bounded VRAM usage and zero GPU stalls.\n */\n enqueueFrame(frameIndex: number, targetTexture: GPUTexture, encoder: GPUCommandEncoder): Promise<void>;\n /**\n * Drains all remaining in-flight frames in the pipeline, ensuring every enqueued\n * frame has been encoded and added to the video sample source.\n */\n drain(): Promise<void>;\n /**\n * Returns runtime throughput, latency, and pipeline statistics.\n */\n getStats(): WebCodecsPipelineStats;\n /**\n * Destroys the pipeline and releases all staging buffers.\n */\n destroy(): void;\n private consumeAndEncode;\n}\n//#endregion\nexport { AudioQaStats, DmaStagingRing, DmaStagingRingOptions, FrameInspector, HeadlessMediaRenderer, HeadlessWebGPURenderer, NODE_KINDS, NodeKind, NodeManifest, NodeManifestError, NodeRendererExports, QaIssue, QaSegment, StagingSlotInfo, StagingSlotStatus, VideoColorSpaceConfig, VideoQaOptions, VideoQaReport, VideoQaStats, WebCodecsPipelineStats, WorkerInput, WorkerMessage, ZeroCopyWebCodecsPipeline, ZeroCopyWebCodecsPipelineOptions, analyzeAudio, buildQaReport, discoverAndRegisterNodeRenderers, findNodesDir, formatQaReport, integratedLoudness, loadNodeManifests, parseNodeManifest, preloadFonts, renderSemaphore };\n//# sourceMappingURL=index.d.mts.map"],"mappings":";;;;;;;;;;;;;UAmHUqB,cAAAA;;;;;;;;;;;;;;;;;;UAkBAC,SAAAA;;;;UAIAC,OAAAA;;;;;;;;;UASAC,YAAAA;;;;;;;;mCAQyBF;oCACCA;;UAE1BG,YAAAA;;;;;;;;;;;;oCAY0BH;;UAE1BI,aAAAA;;;mBAGSF;mBACAC;4BACSF;;;;;iBA+BXS,cAAAA,SAAuBN;;;;cAuC1BU,eAAAA;;;;;+BAKiB3B;;;;;;;;cAQjB4B,iBAAiBD;cACjBE,sBAAAA;;;;;;uBAMS7B;4BACKJ;;;;MAItBI,QAAQ8B;;;;sBAIQlC;sBACAA;;;;;;;;;MAShBI,QAAQ8B;;;;;4BAKclC;;;MAGtBI;cACQoB;;;0BAGYxB,iDAAiDI,QAAQ8B;;4BAEvDlC;;;;;;;;;;;;;;;;;mBAiBTgB;MACbZ;;mBAEaA;SACViB;;;cAGKc,8BAA8BF;KACvCE,qBAAAA,GAAwBF;;;;;;;;;;;;;UC/TZ,gBAAA;;;ADsG2C;AA0BlDhB,UC3HO,gBAAA,CD2HE;EAITC;AAAO;AAkB4B;EAgBnCG,UAAAA,CAAAA,EAAAA,MAAa;EAGJF;;;EAEgB,QAAA,CAAA,EAAA,MAAA;EA+BlBQ;AA8BA;AAcqB;EASxBM,UAAAA,CAAAA,EAAAA,MAAAA;EAMS7B;;;EAKjBA,MAAAA,CAAAA,EAAAA,MAAAA,EAAAA;EAIgBJ;;;EAUhBI,OAAAA,CAAAA,EAAAA,MAAAA;EAKsBJ;;;EAOFA,KAAAA,CAAAA,EAAAA,MAAAA;EAAyDkC;;;EAmBhElB,MAAAA,CAAAA,EAAAA,MAAAA;EAGAZ;;;EAFN,OAAA,CAAA,EAAA,MAAA,EAAA;EAMC+B;AAAoD;;;;AC9TlE;AAKA;EA0HgB,OAAA,CAAA,EAAA,MAAA;EAsGA;AAiFhB;;;EAOa,SAAA,CAAA,EAAA,MAAA;EAAR;;AAWL;EACS,UAAA,CAAA,EAAA,MAAA;EACC;;;EACA,GAAA,CAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAlNE;;;;;iBAMI,mBAAA,UACN;WAGI;;;;;;iBAkGE,iBAAA,mDAGN;;;;;;;;;;;KA8EE,mBAAA;oBACO;;;;;eAKN;MACR,QAAQ;;;;;;;;;;iBAWS,eAAA,SACb,+BACC,mBACP,QAAQ"}
1
+ {"version":3,"file":"index-BXNNJVs8.d.mts","names":["VideoColorPrimaries","VideoFrame","VideoMatrixCoefficients","VideoTransferCharacteristics","RenderDiagnostic","VirtualMediaData","VideoSampleSource","preloadFonts","GPUDevice","Promise","StagingSlotStatus","VideoColorSpaceConfig","DmaStagingRingOptions","GPUTextureFormat","StagingSlotInfo","DmaStagingRing","GPUCommandEncoder","GPUTexture","Uint8Array","findNodesDir","discoverAndRegisterNodeRenderers","VideoQaOptions","QaSegment","QaIssue","VideoQaStats","AudioQaStats","VideoQaReport","FrameInspector","analyzeAudio","Float32Array","integratedLoudness","buildQaReport","formatQaReport","WorkerInput","WorkerMessage","Array","RenderSemaphore","renderSemaphore","HeadlessWebGPURenderer","Buffer","HeadlessMediaRenderer","NODE_KINDS","NodeKind","NodeRendererExports","NodeManifest","NodeManifestError","Error","parseNodeManifest","loadNodeManifests","ZeroCopyWebCodecsPipelineOptions","WebCodecsPipelineStats","ZeroCopyWebCodecsPipeline"],"sources":["../../renderer/dist/index.d.mts","../src/renderer/framegrid.ts"],"sourcesContent":["import { VideoColorPrimaries, VideoFrame, VideoMatrixCoefficients, VideoTransferCharacteristics } from \"@napi-rs/webcodecs\";\nimport { RenderDiagnostic, VirtualMediaData } from \"@framefields/core\";\nimport { VideoSampleSource } from \"mediabunny\";\n\n//#region src/asset-preloader.d.ts\n\n/**\n * Preloads only the fonts (and emoji) a VirtualMediaData tree's text uses, so\n * typography renders correctly on Node.js without loading its media. Shared\n * with the browser preview; emoji need a font set with\n * `FontManager.registerEmojiFont()`.\n */\ndeclare function preloadFonts(media: VirtualMediaData, device?: GPUDevice | null): Promise<void>;\n//#endregion\n//#region src/dma-staging-ring.d.ts\ntype StagingSlotStatus = \"idle\" | \"rendering\" | \"mapping\" | \"mapped\";\ninterface VideoColorSpaceConfig {\n readonly primaries?: VideoColorPrimaries;\n readonly transfer?: VideoTransferCharacteristics;\n readonly matrix?: VideoMatrixCoefficients;\n readonly fullRange?: boolean;\n}\ninterface DmaStagingRingOptions {\n readonly width: number;\n readonly height: number;\n readonly capacity?: number;\n readonly format?: GPUTextureFormat;\n}\ninterface StagingSlotInfo {\n readonly index: number;\n readonly status: StagingSlotStatus;\n readonly inFlightFrame: number | null;\n}\n/**\n * Pipelined Asynchronous DMA Staging Ring for WebGPU.\n *\n * Implements double-buffered (or N-buffered) GPU staging buffers to overlap\n * GPU render passes with asynchronous DMA host transfers and WebCodecs hardware encoding.\n * Eliminates GPU stalls by allowing Frame i+1 to execute on the GPU while Frame i\n * is asynchronously mapped and consumed by the hardware video encoder.\n */\ndeclare class DmaStagingRing {\n readonly width: number;\n readonly height: number;\n readonly capacity: number;\n readonly bytesPerRow: number;\n readonly unpaddedBytesPerRow: number;\n readonly bufferSize: number;\n readonly format: GPUTextureFormat;\n readonly device: GPUDevice;\n private readonly slots;\n private isDestroyed;\n constructor(device: GPUDevice, options: DmaStagingRingOptions);\n /**\n * Prepares the staging buffer slot for writing by ensuring any prior mapping\n * from a previous cycle has been completed and unmapped.\n */\n prepareSlot(frameIndex: number): Promise<void>;\n /**\n * Records a GPU-to-buffer DMA copy command into the provided command encoder.\n */\n stageTexture(encoder: GPUCommandEncoder, texture: GPUTexture, frameIndex: number): void;\n /**\n * Initiates asynchronous DMA mapping on the slot for the specified frame.\n * Must be called immediately after submitting the command encoder to the device queue.\n */\n scheduleMap(frameIndex: number): Promise<void>;\n /**\n * Awaits asynchronous mapping and extracts pixels into a tightly packed Uint8Array.\n * The slot remains in the \"mapped\" state until releaseFrame() is called.\n */\n readFramePixels(frameIndex: number): Promise<Uint8Array>;\n /**\n * Awaits asynchronous mapping, extracts pixels, and immediately unmaps the staging buffer,\n * returning the slot to \"idle\" state so it can be reused immediately.\n */\n readAndReleaseFrame(frameIndex: number): Promise<Uint8Array>;\n /**\n * Directly reads the mapped staging buffer into a WebCodecs VideoFrame,\n * bypassing redundant intermediate JS allocations when row pitches align,\n * and immediately unmaps the buffer.\n */\n readFrameToVideoFrame(frameIndex: number, timestampUs: number, colorSpace?: VideoColorSpaceConfig, /** Sees the tightly packed RGBA pixels while they are mapped; must not keep them. */\n inspect?: (rgba: Uint8Array) => void): Promise<VideoFrame>;\n /**\n * Unmaps the staging buffer for the specified frame and marks the slot idle.\n */\n releaseFrame(frameIndex: number): void;\n /**\n * Returns current status info for each slot in the ring.\n */\n getSlotInfos(): readonly StagingSlotInfo[];\n /**\n * Destroys all staging buffers and releases resources.\n */\n destroy(): void;\n private checkDestroyed;\n}\n//#endregion\n//#region src/dynamic-node-discovery.d.ts\n/** Locates the workspace `nodes/` directory by climbing up from this file. */\ndeclare function findNodesDir(startDir?: string): string | null;\n/**\n * Registers the built-in node renderers, then any extra nodes found in the\n * directory named by `FRAMEFIELDS_NODES_DIR` (local node development). A node in\n * that directory overrides the built-in renderer for the same op.\n */\ndeclare function discoverAndRegisterNodeRenderers(): Promise<void>;\n//#endregion\n//#region src/video-qa.d.ts\n/**\n * Quality checks run on a video while it renders: frames are measured as\n * they are read back for the encoder and audio as it is mixed, so the report\n * describes exactly what was encoded without decoding the file again.\n */\ninterface VideoQaOptions {\n /** Luma (0-1) at or below which a pixel counts as black. Default 0.1. */\n readonly blackPixelThreshold?: number;\n /** Share of black pixels that makes a frame black. Default 0.98. */\n readonly blackFrameRatio?: number;\n /** Shortest run of black frames reported. Default 0.5 s. */\n readonly minBlackSec?: number;\n /** Shortest run of unchanging frames reported. Default 2 s. */\n readonly minFrozenSec?: number;\n /** Level (dBFS, 100 ms windows) below which audio counts as silent. Default -60. */\n readonly silenceDbfs?: number;\n /** Shortest silent stretch reported. Default 2 s. */\n readonly minSilenceSec?: number;\n /** Integrated loudness to hit, e.g. -14 for most streaming platforms. Unchecked when unset. */\n readonly targetLufs?: number;\n /** Allowed distance from `targetLufs`, in LU. Default 1. */\n readonly lufsTolerance?: number;\n}\ninterface QaSegment {\n readonly startSec: number;\n readonly endSec: number;\n}\ninterface QaIssue {\n readonly severity: \"error\" | \"warning\" | \"info\";\n /** Stable machine-readable kind, e.g. \"black_frames\", \"audio_clipping\" */\n readonly code: string;\n readonly message: string;\n readonly startSec?: number;\n readonly endSec?: number;\n readonly layerId?: string;\n}\ninterface VideoQaStats {\n readonly expectedFrames: number;\n readonly encodedFrames: number;\n readonly fps: number;\n readonly width: number;\n readonly height: number;\n /** Average luma over the whole video, 0-1 */\n readonly meanLuma: number;\n readonly blackSegments: readonly QaSegment[];\n readonly frozenSegments: readonly QaSegment[];\n}\ninterface AudioQaStats {\n readonly sampleRate: number;\n readonly channels: number;\n readonly durationSec: number;\n /** Highest sample, dBFS (sample peak, not true peak) */\n readonly peakDbfs: number;\n /** Mean level over the whole track, dBFS */\n readonly rmsDbfs: number;\n /** ITU-R BS.1770 integrated loudness; null when the track is silent */\n readonly integratedLufs: number | null;\n /** Samples at or beyond full scale */\n readonly clippedSamples: number;\n readonly silentSegments: readonly QaSegment[];\n}\ninterface VideoQaReport {\n /** No errors or warnings (info issues do not fail a render) */\n readonly passed: boolean;\n readonly video?: VideoQaStats;\n readonly audio?: AudioQaStats;\n readonly issues: readonly QaIssue[];\n}\n/** Measures frames handed to it in order, as RGBA bytes. */\ndeclare class FrameInspector {\n private readonly blackLuma;\n private readonly blackRatio;\n private readonly black;\n private readonly sameAsPrevious;\n private lumaSum;\n private previous;\n constructor(options?: VideoQaOptions);\n get frameCount(): number;\n inspect(rgba: Uint8Array, width: number, height: number): void;\n stats(expectedFrames: number, encodedFrames: number, fps: number, width: number, height: number, options?: VideoQaOptions): VideoQaStats;\n}\n/** Measures a mixed audio track (one Float32Array per channel). */\ndeclare function analyzeAudio(channels: readonly Float32Array[], sampleRate: number, options?: VideoQaOptions): AudioQaStats;\n/**\n * ITU-R BS.1770-4 integrated loudness (LUFS): K-weighted mean square in\n * 400 ms blocks with 75% overlap, gated at -70 LUFS and then at 10 LU below\n * the mean of what passed. Channels weigh 1 (stereo and mono layouts).\n */\ndeclare function integratedLoudness(channels: readonly Float32Array[], sampleRate: number): number | null;\n/** Turn measurements and document diagnostics into a report with issues. */\ndeclare function buildQaReport(parts: {\n video?: VideoQaStats;\n audio?: AudioQaStats;\n diagnostics?: readonly RenderDiagnostic[];\n options?: VideoQaOptions;\n}): VideoQaReport;\n/** A short human- and agent-readable summary of a report. */\ndeclare function formatQaReport(report: VideoQaReport): string;\n//#endregion\n//#region src/headless-webgpu-renderer.d.ts\ninterface WorkerInput {\n virtualMedia: VirtualMediaData;\n width: number;\n height: number;\n fps: number;\n startFrame: number;\n endFrame: number;\n renderId: string;\n outputFormat: \"png\" | \"pixels\";\n workerIndex: number;\n}\ntype WorkerMessage = {\n type: \"frame\";\n renderId: string;\n frameIndex: number;\n pixels: Uint8Array;\n} | {\n type: \"png\";\n renderId: string;\n data: Uint8Array;\n} | {\n type: \"done\";\n renderId: string;\n} | {\n type: \"lut\";\n renderId: string;\n raw: {\n points: Array<[number, number, number]>;\n size: number;\n type: \"1D\" | \"3D\";\n };\n} | {\n type: \"error\";\n renderId?: string;\n error: string;\n};\ndeclare class RenderSemaphore {\n private _running;\n private readonly _max;\n private readonly _queue;\n constructor(max: number);\n acquire(timeoutMs?: number): Promise<void>;\n release(): void;\n get stats(): {\n active: number;\n queued: number;\n max: number;\n };\n}\ndeclare const renderSemaphore: RenderSemaphore;\ndeclare class HeadlessWebGPURenderer {\n private static isInitialized;\n private static initPromise;\n private static initFailureCount;\n private static readonly MAX_INIT_FAILURES;\n private static nextRetryAt;\n static initialize(): Promise<void>;\n renderImage(virtualMedia: VirtualMediaData, frame?: number, fps?: number, options?: {\n renderId?: string;\n /** \"rgba\" skips PNG encoding and returns width*height*4 raw pixels. */\n format?: \"png\" | \"rgba\";\n }): Promise<Buffer>;\n /**\n * Renders a single frame to a PNG buffer at a specified timestamp in milliseconds or frame index.\n */\n renderFrame(source: VirtualMediaData | {\n toVirtualMedia(): VirtualMediaData;\n }, options?: {\n atMs?: number;\n frame?: number;\n fps?: number;\n /** Reuse compiled state across calls; see `renderImage`. */\n renderId?: string;\n /** \"rgba\" returns raw width*height*4 pixels instead of a PNG. */\n format?: \"png\" | \"rgba\";\n }): Promise<Buffer>;\n /**\n * Mixes the composition's full audio timeline (clips, effects, synthesized\n * tracks) to stereo PCM, exactly as `renderVideo` muxes it.\n */\n renderAudio(virtualMedia: VirtualMediaData, options?: {\n fps?: number;\n sampleRate?: number;\n }): Promise<{\n channels: Float32Array[];\n sampleRate: number;\n }>;\n renderLut(virtualMedia: VirtualMediaData, frame?: number, fps?: number): Promise<Buffer>;\n private resolveMediaDuration;\n renderVideo(virtualMedia: VirtualMediaData, options?: {\n codec?: string;\n audioCodec?: string;\n quality?: string;\n concurrency?: number;\n /**\n * Depth of the DMA staging ring (default 2, clamped 2–8). A deeper\n * ring overlaps more encoder latency at the cost of VRAM\n * (~8.3MB/slot at 1080p RGBA). Also settable via\n * `FRAMEFIELDS_RING_CAPACITY`.\n */\n ringCapacity?: number;\n /**\n * Measure the output while it renders (black and frozen frames,\n * dropped frames, loudness, clipping, silence, document warnings)\n * and return the findings as `qa`. `true` uses default thresholds.\n */\n qa?: boolean | VideoQaOptions;\n }): Promise<{\n filePath: string;\n cleanup: () => Promise<void>;\n qa?: VideoQaReport;\n }>;\n}\ndeclare const HeadlessMediaRenderer: typeof HeadlessWebGPURenderer;\ntype HeadlessMediaRenderer = HeadlessWebGPURenderer;\n//#endregion\n//#region src/node-manifest.d.ts\n/**\n * The `framefields` block of a node package's `package.json`.\n *\n * This is the single declaration of a node's op: renderer discovery, the\n * effects generator (`scripts/generate-effects.ts`) and the skill catalog all\n * read it from here. There is deliberately no fallback that derives an op from\n * the package name. See `spec/sync-node.md` §5.1.\n */\ndeclare const NODE_KINDS: readonly [\"effect\", \"audio\", \"source\", \"signal\", \"utility\"];\ntype NodeKind = (typeof NODE_KINDS)[number];\ninterface NodeRendererExports {\n development?: string;\n import?: string;\n default?: string;\n}\ninterface NodeManifest {\n /** Directory name under `nodes/`, e.g. `node-apply-lut`. */\n dir: string;\n /** Absolute path of the node package. */\n path: string;\n /** npm package name, e.g. `@framefields/node-lut`. */\n packageName: string;\n /** Canonical op literal used in the operation AST and the renderer registry. */\n type: string;\n kind: NodeKind;\n /** Legacy ops that resolve to the same renderer. */\n aliases: readonly string[];\n /** Named zod schema export of `src/shared/config.ts`. */\n schema?: string;\n /** Authoring class name. Defaults to `type`. */\n className?: string;\n /** Key on `Effect.*`. Defaults to `className` with a lower-cased first letter. */\n factory?: string;\n /** A hand-written subclass exists under `effects/custom/`. */\n custom: boolean;\n /** `false` when the package opts out of discovery. */\n enabled: boolean;\n rendererExports?: NodeRendererExports;\n}\ndeclare class NodeManifestError extends Error {\n readonly problems: readonly string[];\n constructor(problems: readonly string[]);\n}\n/**\n * Validates one parsed `package.json`. Returns the manifest, or the list of\n * problems that make it unusable. Never throws.\n */\ndeclare function parseNodeManifest(pkg: unknown, dir: string, nodePath?: string): {\n manifest?: NodeManifest;\n problems: string[];\n};\n/**\n * Reads every `nodes/node-*` package and returns its manifest, sorted by\n * directory name. Throws a single {@link NodeManifestError} listing every\n * problem: a missing or malformed block, or an op/alias claimed twice.\n */\ndeclare function loadNodeManifests(nodesDir: string): NodeManifest[];\n//#endregion\n//#region src/zero-copy-webcodecs-pipeline.d.ts\ninterface ZeroCopyWebCodecsPipelineOptions {\n readonly width: number;\n readonly height: number;\n readonly fps: number;\n readonly videoSource: VideoSampleSource;\n readonly ringCapacity?: number;\n readonly colorSpace?: VideoColorSpaceConfig;\n readonly directCanvasSource?: unknown;\n /**\n * Called with each frame's RGBA pixels, in frame order, just before it is\n * encoded (staging-ring path only). The buffer is reused: read, don't keep.\n */\n readonly onFrame?: (rgba: Uint8Array, frameIndex: number) => void;\n}\ninterface WebCodecsPipelineStats {\n readonly totalFramesEnqueued: number;\n readonly totalFramesEncoded: number;\n readonly averageGpuSubmitTimeMs: number;\n readonly averageEncodeTimeMs: number;\n readonly averageCycleTimeMs: number;\n readonly maxCycleTimeMs: number;\n readonly minCycleTimeMs: number;\n readonly throughputFps: number;\n readonly ringCapacity: number;\n readonly isDirectZeroCopy: boolean;\n}\n/**\n * High-performance hardware video encoding pipeline integrating WebGPU textures with WebCodecs.\n *\n * Provides:\n * 1. Direct hardware acceleration when running with WebCodecs / OffscreenCanvas.\n * 2. Pipelined asynchronous double-buffered DMA staging ring for headless Node.js (Dawn native),\n * allowing GPU Frame i+1 rendering to overlap concurrently with Frame i hardware encoding.\n */\ndeclare class ZeroCopyWebCodecsPipeline {\n readonly width: number;\n readonly height: number;\n readonly fps: number;\n readonly ringCapacity: number;\n private readonly device;\n private readonly videoSource;\n private readonly stagingRing;\n private readonly colorSpace?;\n private readonly directCanvasSource?;\n private readonly onFrame?;\n private readonly inFlightFrames;\n private readonly cycleStartTimes;\n private totalFramesEnqueued;\n private totalFramesEncoded;\n private totalGpuSubmitTimeMs;\n private totalEncodeTimeMs;\n private totalCycleTimeMs;\n private maxCycleTimeMs;\n private minCycleTimeMs;\n private pipelineStartTime;\n constructor(device: GPUDevice, options: ZeroCopyWebCodecsPipelineOptions);\n /**\n * Returns true if direct zero-copy from an OffscreenCanvas or texture is active.\n */\n canDirectZeroCopy(): boolean;\n /**\n * Enqueues a rendered GPU texture frame into the pipeline.\n *\n * Uses double-buffered DMA staging: if the staging ring has reached capacity,\n * the oldest in-flight frame is asynchronously consumed and added to the video encoder\n * before staging the new frame, guaranteeing constant bounded VRAM usage and zero GPU stalls.\n */\n enqueueFrame(frameIndex: number, targetTexture: GPUTexture, encoder: GPUCommandEncoder): Promise<void>;\n /**\n * Drains all remaining in-flight frames in the pipeline, ensuring every enqueued\n * frame has been encoded and added to the video sample source.\n */\n drain(): Promise<void>;\n /**\n * Returns runtime throughput, latency, and pipeline statistics.\n */\n getStats(): WebCodecsPipelineStats;\n /**\n * Destroys the pipeline and releases all staging buffers.\n */\n destroy(): void;\n private consumeAndEncode;\n}\n//#endregion\nexport { AudioQaStats, DmaStagingRing, DmaStagingRingOptions, FrameInspector, HeadlessMediaRenderer, HeadlessWebGPURenderer, NODE_KINDS, NodeKind, NodeManifest, NodeManifestError, NodeRendererExports, QaIssue, QaSegment, StagingSlotInfo, StagingSlotStatus, VideoColorSpaceConfig, VideoQaOptions, VideoQaReport, VideoQaStats, WebCodecsPipelineStats, WorkerInput, WorkerMessage, ZeroCopyWebCodecsPipeline, ZeroCopyWebCodecsPipelineOptions, analyzeAudio, buildQaReport, discoverAndRegisterNodeRenderers, findNodesDir, formatQaReport, integratedLoudness, loadNodeManifests, parseNodeManifest, preloadFonts, renderSemaphore };\n//# sourceMappingURL=index.d.mts.map"],"mappings":";;;;;;;;;;;;;UAmHUqB,cAAAA;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;aAlNE;;;;;iBAMI,mBAAA,UACN;WAGI;;;;;;iBAkGE,iBAAA,mDAGN;;;;;;;;;;;KA8EE,mBAAA;oBACO;;;;;eAKN;MACR,QAAQ;;;;;;;;;;iBAWS,eAAA,SACb,+BACC,mBACP,QAAQ"}
@@ -69,4 +69,4 @@ declare class FontManager {
69
69
  }
70
70
  //#endregion
71
71
  export { RegisterFontOptions as n, RegisteredFont as r, FontManager as t };
72
- //# sourceMappingURL=index-CbzEM_o6.d.mts.map
72
+ //# sourceMappingURL=index-CQcdKyxF.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CbzEM_o6.d.mts","names":[],"sources":["../src/fonts/manager.ts"],"sourcesContent":[],"mappings":";UAQiB,mBAAA;EAAA,MAAA,CAAA,EAAA,MAAA;EAOA,MAAA,EAAA,MAAA,GALC,UAKa;EAmJlB,MAAA,CAAA,EAAA,MAAW,GAAA,MAAA;EASM,KAAA,CAAA,EAAA,QAAA,GAAA,QAAA,GAAA,SAAA;;AAYV,UAxKH,cAAA,CAwKG;EACR,MAAA,EAAA,MAAA;EAAR,MAAA,EAAA,MAAA,GAvKc,UAuKd;EAWe,QAAA,CAAA,EAAA,MAAA;EACf,MAAA,EAAA,UAAA,GAAA,UAAA;EAWgC,cAAA,CAAA,EAAA,MAAA;EAcX,UAAA,CAAA,EAAA,MAAA;EAsBE,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EACP,KAAA,CAAA,EAAA,MAAA;;;;;AAyFY,cA3KnB,WAAA,CA2KmB;;;;;;;wBAlKF;;;;2CAWH,gDACP,aAChB,QAAQ;;;;;;;4CAWO,aACf;;;;8BAWgC;;;;;;;;mBAcX;;;;;;;;;;;;oCAsBE,gDACP,aAChB,QAAQ;uBAgFiB;;YAQX"}
1
+ {"version":3,"file":"index-CQcdKyxF.d.mts","names":[],"sources":["../src/fonts/manager.ts"],"sourcesContent":[],"mappings":";UAQiB,mBAAA;EAAA,MAAA,CAAA,EAAA,MAAA;EAOA,MAAA,EAAA,MAAA,GALC,UAKa;EAmJlB,MAAA,CAAA,EAAA,MAAW,GAAA,MAAA;EASM,KAAA,CAAA,EAAA,QAAA,GAAA,QAAA,GAAA,SAAA;;AAYV,UAxKH,cAAA,CAwKG;EACR,MAAA,EAAA,MAAA;EAAR,MAAA,EAAA,MAAA,GAvKc,UAuKd;EAWe,QAAA,CAAA,EAAA,MAAA;EACf,MAAA,EAAA,UAAA,GAAA,UAAA;EAWgC,cAAA,CAAA,EAAA,MAAA;EAcX,UAAA,CAAA,EAAA,MAAA;EAsBE,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EACP,KAAA,CAAA,EAAA,MAAA;;;;;AAyFY,cA3KnB,WAAA,CA2KmB;;;;;;;wBAlKF;;;;2CAWH,gDACP,aAChB,QAAQ;;;;;;;4CAWO,aACf;;;;8BAWgC;;;;;;;;mBAcX;;;;;;;;;;;;oCAsBE,gDACP,aAChB,QAAQ;uBAgFiB;;YAQX"}
@@ -1,34 +1,34 @@
1
- import { An as ProgrammaticSignal, Cn as NormalizedLandmarkList, Ct as DeflickerOptions, Dr as VisionNodeSpec, Er as VisionConfig, Et as Effect, Nn as SegmentationOptions, Nt as FaceLandmarksOptions, Or as VisionTask, Ot as EffectConfigValue, Rt as FrameContext, Tn as OpticalFlowOptions, Tt as DetectedObject, Zt as Landmark3D, ct as CannyOptions, dr as TrackedObject, er as TensorData, ir as TensorPipelineConfig, kn as PoseSkeletonOptions, kr as VisionVariant, pt as ControlNetConditioningOutputs, rr as TensorNode, wn as ObjectBoundingBox, wt as DepthNormalsOptions } from "./index-WIPHLy5m.mjs";
2
- import { n as NodeRendererPlugin, r as WebGPUNodeRenderer } from "./index-CZChQhXZ.mjs";
3
- import { n as AudioSignalOptions, r as ExtractedAudioSignalsBundle } from "./audio-a6pY05g2.mjs";
1
+ import { An as ProgrammaticSignal, Cn as NormalizedLandmarkList, Ct as DeflickerOptions, Dr as VisionNodeSpec, Er as VisionConfig, Et as Effect, Nn as SegmentationOptions, Nt as FaceLandmarksOptions, Or as VisionTask, Ot as EffectConfigValue, Rt as FrameContext, Tn as OpticalFlowOptions, Tt as DetectedObject, Zt as Landmark3D, ct as CannyOptions, dr as TrackedObject, er as TensorData, ir as TensorPipelineConfig, kn as PoseSkeletonOptions, kr as VisionVariant, pt as ControlNetConditioningOutputs, rr as TensorNode, wn as ObjectBoundingBox, wt as DepthNormalsOptions } from "./index-D1zaOwEU.mjs";
2
+ import { n as NodeRendererPlugin, r as WebGPUNodeRenderer } from "./index-J9CIK_nu.mjs";
3
+ import { n as AudioSignalOptions, r as ExtractedAudioSignalsBundle } from "./audio-BxA0sL9z.mjs";
4
4
 
5
5
  //#region ../../nodes/node-blur/dist/renderer.d.mts
6
6
  //#region src/renderers/index.d.ts
7
- declare const _default$29: Readonly<NodeRendererPlugin>;
7
+ declare const _default$30: Readonly<NodeRendererPlugin>;
8
8
  //#endregion
9
9
 
10
10
  //#endregion
11
11
  //#region ../../nodes/node-color-balance/dist/index-DtnEFgTT.d.mts
12
12
  //#endregion
13
13
  //#region src/renderers/index.d.ts
14
- declare const _default$28: {
14
+ declare const _default$29: {
15
15
  WebGPURenderer: WebGPUNodeRenderer;
16
16
  };
17
17
  //#endregion
18
18
  //#endregion
19
19
  //#region ../../nodes/node-colorkey/dist/renderer.d.mts
20
20
  //#region src/renderers/index.d.ts
21
- declare const _default$27: Readonly<NodeRendererPlugin>;
21
+ declare const _default$28: Readonly<NodeRendererPlugin>;
22
22
  //#endregion
23
23
  //#endregion
24
24
  //#region ../../nodes/node-corner-pin/dist/renderer.d.mts
25
25
  //#region src/renderers/index.d.ts
26
- declare const _default$26: Readonly<NodeRendererPlugin>;
26
+ declare const _default$27: Readonly<NodeRendererPlugin>;
27
27
  //#endregion
28
28
  //#endregion
29
29
  //#region ../../nodes/node-crop/dist/renderer.d.mts
30
30
  //#region src/renderers/index.d.ts
31
- declare const _default$25: Readonly<NodeRendererPlugin>;
31
+ declare const _default$26: Readonly<NodeRendererPlugin>;
32
32
  //#endregion
33
33
  //#endregion
34
34
  //#region ../../nodes/node-curves/dist/renderer.d.mts
@@ -38,103 +38,108 @@ declare const rendererNode: Readonly<NodeRendererPlugin>;
38
38
  //#endregion
39
39
  //#region ../../nodes/node-deflicker/dist/renderer.d.mts
40
40
  //#region src/renderers/index.d.ts
41
- declare const _default$24: Readonly<NodeRendererPlugin>;
41
+ declare const _default$25: Readonly<NodeRendererPlugin>;
42
42
  //#endregion
43
43
  //#endregion
44
44
  //#region ../../nodes/node-displacement-map/dist/renderer.d.mts
45
45
  //#region src/renderers/index.d.ts
46
- declare const _default$23: Readonly<NodeRendererPlugin>;
46
+ declare const _default$24: Readonly<NodeRendererPlugin>;
47
47
  //#endregion
48
48
  //#endregion
49
49
  //#region ../../nodes/node-film-grain/dist/renderer.d.mts
50
50
  //#region src/renderers/index.d.ts
51
- declare const _default$22: Readonly<NodeRendererPlugin>;
51
+ declare const _default$23: Readonly<NodeRendererPlugin>;
52
52
  //#endregion
53
53
  //#endregion
54
54
  //#region ../../nodes/node-flip/dist/renderer.d.mts
55
55
  //#region src/renderers/index.d.ts
56
- declare const _default$21: Readonly<NodeRendererPlugin>;
56
+ declare const _default$22: Readonly<NodeRendererPlugin>;
57
57
  //#endregion
58
58
 
59
59
  //#endregion
60
60
  //#region ../../nodes/node-gradient-map/dist/index-CwsP0R_D.d.mts
61
61
  //#endregion
62
62
  //#region src/renderers/index.d.ts
63
- declare const _default$20: {
63
+ declare const _default$21: {
64
64
  WebGPURenderer: WebGPUNodeRenderer;
65
65
  };
66
66
  //#endregion
67
67
  //#endregion
68
68
  //#region ../../nodes/node-halftone-screen/dist/renderer.d.mts
69
69
  //#region src/renderers/index.d.ts
70
- declare const _default$19: Readonly<NodeRendererPlugin>;
70
+ declare const _default$20: Readonly<NodeRendererPlugin>;
71
71
  //#endregion
72
72
  //#endregion
73
73
  //#region ../../nodes/node-high-pass/dist/renderer.d.mts
74
74
  //#region src/renderers/index.d.ts
75
- declare const _default$18: Readonly<NodeRendererPlugin>;
75
+ declare const _default$19: Readonly<NodeRendererPlugin>;
76
76
  //#endregion
77
77
  //#endregion
78
78
  //#region ../../nodes/node-kenburns/dist/renderer.d.mts
79
79
  //#region src/renderers/index.d.ts
80
- declare const _default$17: Readonly<NodeRendererPlugin>;
80
+ declare const _default$18: Readonly<NodeRendererPlugin>;
81
81
  //#endregion
82
82
  //#endregion
83
83
  //#region ../../nodes/node-layer-style/dist/renderer.d.mts
84
84
  //#region src/renderers/index.d.ts
85
- declare const _default$16: Readonly<NodeRendererPlugin>;
85
+ declare const _default$17: Readonly<NodeRendererPlugin>;
86
86
  //#endregion
87
87
  //#endregion
88
88
  //#region ../../nodes/node-levels/dist/renderer.d.mts
89
89
  //#region src/renderers/index.d.ts
90
- declare const _default$15: Readonly<NodeRendererPlugin>;
90
+ declare const _default$16: Readonly<NodeRendererPlugin>;
91
91
  //#endregion
92
92
 
93
93
  //#endregion
94
94
  //#region ../../nodes/node-liquify/dist/index-nLEHoail.d.mts
95
95
  //#endregion
96
96
  //#region src/renderers/index.d.ts
97
- declare const _default$14: Readonly<NodeRendererPlugin>;
97
+ declare const _default$15: Readonly<NodeRendererPlugin>;
98
98
  //#endregion
99
99
  //#endregion
100
100
  //#region ../../nodes/node-apply-lut/dist/renderer.d.mts
101
101
  //#region src/renderers/index.d.ts
102
- declare const _default$13: Readonly<NodeRendererPlugin>;
102
+ declare const _default$14: Readonly<NodeRendererPlugin>;
103
103
  //#endregion
104
104
 
105
105
  //#endregion
106
106
  //#region ../../nodes/node-mask-math/dist/index-DaeM7Wai.d.mts
107
107
  //#endregion
108
108
  //#region src/renderers/index.d.ts
109
- declare const _default$12: Readonly<NodeRendererPlugin>;
109
+ declare const _default$13: Readonly<NodeRendererPlugin>;
110
110
  //#endregion
111
111
  //#endregion
112
112
  //#region ../../nodes/node-mesh-warp/dist/renderer.d.mts
113
113
  //#region src/renderers/index.d.ts
114
- declare const _default$11: Readonly<NodeRendererPlugin>;
114
+ declare const _default$12: Readonly<NodeRendererPlugin>;
115
115
  //#endregion
116
116
  //#endregion
117
117
  //#region ../../nodes/node-paint/dist/renderer.d.mts
118
118
  //#region src/renderers/index.d.ts
119
- declare const _default$10: Readonly<NodeRendererPlugin>;
119
+ declare const _default$11: Readonly<NodeRendererPlugin>;
120
120
  //#endregion
121
121
 
122
122
  //#endregion
123
123
  //#region ../../nodes/node-patch-heal/dist/index-CD55q9I2.d.mts
124
124
  //#endregion
125
125
  //#region src/renderers/index.d.ts
126
- declare const _default$9: Readonly<NodeRendererPlugin>;
126
+ declare const _default$10: Readonly<NodeRendererPlugin>;
127
127
  //#endregion
128
128
  //#endregion
129
129
  //#region ../../nodes/node-refine-edge/dist/index-DaeM7Wai.d.mts
130
130
  //#endregion
131
131
  //#region src/renderers/index.d.ts
132
- declare const _default$8: Readonly<NodeRendererPlugin>;
132
+ declare const _default$9: Readonly<NodeRendererPlugin>;
133
133
  //#endregion
134
134
  //#endregion
135
135
  //#region ../../nodes/node-refraction-caustics/dist/index-UMBw6e-q.d.mts
136
136
  //#endregion
137
137
  //#region src/renderers/index.d.ts
138
+ declare const _default$8: Readonly<NodeRendererPlugin>;
139
+ //#endregion
140
+ //#endregion
141
+ //#region ../../nodes/node-rotate/dist/renderer.d.mts
142
+ //#region src/renderers/index.d.ts
138
143
  declare const _default$7: Readonly<NodeRendererPlugin>;
139
144
  //#endregion
140
145
  //#endregion
@@ -3000,6 +3005,32 @@ declare class ResizerScaler extends Effect<ResizerScalerProps> {
3000
3005
  anchorY: "top" | "center" | "bottom";
3001
3006
  constructor(config?: ResizerScalerProps);
3002
3007
  }
3008
+ interface RotateProps {
3009
+ /**
3010
+ * Rotation in degrees about the frame center, clockwise. Any value; 90 / 180 / 270 fix footage shot sideways or upside down.
3011
+ * Accepts a signal.
3012
+ * @default 90
3013
+ */
3014
+ angle?: EffectProp<number>;
3015
+ /**
3016
+ * How the rotated source sits in the output: cover fills it (cropping the overhang), contain shows all of it (transparent margins), fill keeps the unrotated source stretched to the output and only turns it.
3017
+ * @default "cover"
3018
+ */
3019
+ fit?: "cover" | "contain" | "fill";
3020
+ /**
3021
+ * Extra zoom applied after the fit (1 = exactly fitted).
3022
+ * Range 0.01 to 20. Accepts a signal.
3023
+ * @default 1
3024
+ */
3025
+ scale?: EffectProp<number>;
3026
+ }
3027
+ declare class Rotate extends Effect<RotateProps> {
3028
+ readonly op = "Rotate";
3029
+ angle: number;
3030
+ fit: "cover" | "contain" | "fill";
3031
+ scale: number;
3032
+ constructor(config?: RotateProps);
3033
+ }
3003
3034
  interface StereoPanningProps {
3004
3035
  /**
3005
3036
  * Stereo panning value: -1 (full left) to 1 (full right), 0 is center. Can be modulated by a static number or dynamic signal.
@@ -3937,6 +3968,16 @@ declare const effectMeta: {
3937
3968
  readonly enum: readonly ["top", "center", "bottom"];
3938
3969
  };
3939
3970
  };
3971
+ readonly Rotate: {
3972
+ readonly angle: {};
3973
+ readonly fit: {
3974
+ readonly enum: readonly ["cover", "contain", "fill"];
3975
+ };
3976
+ readonly scale: {
3977
+ readonly min: 0.01;
3978
+ readonly max: 20;
3979
+ };
3980
+ };
3940
3981
  readonly StereoPanning: {
3941
3982
  readonly pan: {
3942
3983
  readonly min: -1;
@@ -4002,6 +4043,7 @@ declare const effectFactories: {
4002
4043
  readonly refineEdge: (config?: RefineEdgeProps) => RefineEdge;
4003
4044
  readonly refractionCaustics3D: (config?: RefractionCaustics3DProps) => RefractionCaustics3D;
4004
4045
  readonly resizerScaler: (config?: ResizerScalerProps) => ResizerScaler;
4046
+ readonly rotate: (config?: RotateProps) => Rotate;
4005
4047
  readonly stereoPanning: (config?: StereoPanningProps) => StereoPanning;
4006
4048
  readonly vignette: (config?: VignetteProps) => Vignette;
4007
4049
  };
@@ -4498,5 +4540,5 @@ declare class Modulate extends Effect<ModulateProps> {
4498
4540
  constructor(config?: ModulateProps);
4499
4541
  }
4500
4542
  //#endregion
4501
- export { Blur as $, DepthNormalsComputePipeline as $n, NoiseGeneratorProps as $t, MotionBlur as A, ObjectBoundingBoxSignals as An, _default$24 as Ar, Flip as At, SelectiveColorProps as B, SegmentationResult as Bn, LayerStyleInnerShadow as Bt, HighPass as C, COCO17_KEYPOINT_NAMES as Cn, _default$17 as Cr, CornerPin as Ct, LevelsProps as D, MaskTrackSignals as Dn, _default$21 as Dr, DisplacementMapProps as Dt, Levels as E, LandmarkCoordinateSignals as En, _default$20 as Er, DisplacementMap as Et, Relight3DProps as F, PinToLandmarkOptions as Fn, _default$28 as Fr, LayerStyle as Ft, TileOffsetEdgeMode as G, VisionBundle as Gn, LiquifyOperationsItem as Gt, ShadowsHighlightsProps as H, SpatialLandmarkTransformer as Hn, LayerStyleProps as Ht, SSAO as I, PinToObjectOptions as In, _default$29 as Ir, LayerStyleBevelEmboss as It, UnsharpMaskProps as J, analyzeSequence as Jn, MaskMathProps as Jt, TileOffsetProps as K, VisionNode as Kn, LiquifyProps as Kt, SSAOProps as L, PoseLandmarkSignals as Ln, LayerStyleColorOverlay as Lt, PBRGlass as M, ObjectKinematicsSignals as Mn, _default$25 as Mr, KenBurns as Mt, PBRGlassProps as N, ObjectTrackSignals as Nn, _default$26 as Nr, KenBurnsKeyframesItem as Nt, Modulate as O, ObjectAnchorName as On, _default$22 as Or, ExtractLUT as Ot, Relight3D as P, PersonMatte as Pn, _default$27 as Pr, KenBurnsProps as Pt, effectMeta as Q, ControlNetMultiplexer as Qn, NoiseGenerator as Qt, SelectiveColor as R, PoseResult as Rn, LayerStyleDropShadow as Rt, HalftoneScreenProps as S, COCO17_KEYPOINTS as Sn, _default$16 as Sr, ColorKeyProps as St, LevelChannel as T, InstanceMask as Tn, _default$19 as Tr, CornerPinProps as Tt, TemporalDeflicker as U, TemporalObjectTracker as Un, LayerStyleStroke as Ut, ShadowsHighlights as V, SegmentationTexturePool as Vn, LayerStyleOuterGlow as Vt, TileOffset as W, VisionAnalysisReport as Wn, Liquify as Wt, VisionProps as X, pinNodeToObject as Xn, MeshWarpPointsItem as Xt, Vision as Y, pinNodeToLandmark as Yn, MeshWarp as Yt, effectFactories as Z, CannyComputePipeline as Zn, MeshWarpProps as Zt, GradientMapProps as _, StereoPanningProps as _n, _default$11 as _r, ChannelSplitter as _t, Crop as a, PatchHeal as an, EffectProp as ar, AudioFade as at, HalftoneMode as b, VignetteProps as bn, _default$14 as br, ColorBalanceProps as bt, CurvesChannelPoint as c, ProceduralVFX as cn, _default$2 as cr, AudioNoiseGateProps as ct, DeflickerProps as d, RefineEdgeProps as dn, _default$5 as dr, AudioReverb as dt, Paint as en, OpticalFlowComputePipeline as er, BlurProps as et, DepthOfField as f, RefractionCaustics3D as fn, _default$6 as fr, AudioReverbProps as ft, GradientMap as g, StereoPanning as gn, _default$10 as gr, ChannelMergerProps as gt, FilmGrainProps as h, ResizerScalerProps as hn, _default$9 as hr, ChannelMerger as ht, AudioSignalExtractorProps as i, PaintStrokesItemOption3 as in, TensorViewExport as ir, AudioDelayProps as it, MotionBlurProps as j, ObjectCollectionSignals as jn, rendererNode as jr, FlipProps as jt, ModulateProps as k, ObjectAnchorsSignals as kn, _default$23 as kr, ExtractLUTProps as kt, CurvesProps as l, ProceduralVFXProps as ln, _default$3 as lr, AudioParametricEq as lt, FilmGrain as m, ResizerScaler as mn, _default$8 as mr, CameraParallax3DProps as mt, ApplyLUTProps as n, PaintStrokesItemOption1 as nn, TensorPipeline as nr, AudioCompressorProps as nt, CropProps as o, PatchHealPatchesItem as on, _default as or, AudioFadeProps as ot, DepthOfFieldProps as p, RefractionCaustics3DProps as pn, _default$7 as pr, CameraParallax3D as pt, UnsharpMask as q, VisionRunner as qn, MaskMath as qt, AudioSignalExtractor as r, PaintStrokesItemOption2 as rn, TensorSource as rr, AudioDelay as rt, Curves as s, PatchHealProps as sn, _default$1 as sr, AudioNoiseGate as st, ApplyLUT as t, PaintProps as tn, TemporalDeflickerPipeline as tr, AudioCompressor as tt, CustomEffect as u, RefineEdge as un, _default$4 as ur, AudioParametricEqProps as ut, GradientMapStop as v, TonalShift as vn, _default$12 as vr, ChannelSplitterProps as vt, HighPassProps as w, COCO_CLASSES as wn, _default$18 as wr, CornerPinPointsItem as wt, HalftoneScreen as x, COCO17_BONES as xn, _default$15 as xr, ColorKey as xt, HalftoneDotShape as y, Vignette as yn, _default$13 as yr, ColorBalance as yt, SelectiveColorAdjustment as z, PoseSkeletonRenderer as zn, LayerStyleInnerGlow as zt };
4502
- //# sourceMappingURL=index-BJx_Qxc_.d.mts.map
4543
+ export { Blur as $, CannyComputePipeline as $n, NoiseGeneratorProps as $t, MotionBlur as A, ObjectAnchorName as An, _default$22 as Ar, Flip as At, SelectiveColorProps as B, PoseResult as Bn, LayerStyleInnerShadow as Bt, HighPass as C, COCO17_BONES as Cn, _default$15 as Cr, CornerPin as Ct, LevelsProps as D, InstanceMask as Dn, _default$19 as Dr, DisplacementMapProps as Dt, Levels as E, COCO_CLASSES as En, _default$18 as Er, DisplacementMap as Et, Relight3DProps as F, ObjectTrackSignals as Fn, _default$26 as Fr, LayerStyle as Ft, TileOffsetEdgeMode as G, TemporalObjectTracker as Gn, LiquifyOperationsItem as Gt, ShadowsHighlightsProps as H, SegmentationResult as Hn, LayerStyleProps as Ht, SSAO as I, PersonMatte as In, _default$27 as Ir, LayerStyleBevelEmboss as It, UnsharpMaskProps as J, VisionNode as Jn, MaskMathProps as Jt, TileOffsetProps as K, VisionAnalysisReport as Kn, LiquifyProps as Kt, SSAOProps as L, PinToLandmarkOptions as Ln, _default$28 as Lr, LayerStyleColorOverlay as Lt, PBRGlass as M, ObjectBoundingBoxSignals as Mn, _default$24 as Mr, KenBurns as Mt, PBRGlassProps as N, ObjectCollectionSignals as Nn, _default$25 as Nr, KenBurnsKeyframesItem as Nt, Modulate as O, LandmarkCoordinateSignals as On, _default$20 as Or, ExtractLUT as Ot, Relight3D as P, ObjectKinematicsSignals as Pn, rendererNode as Pr, KenBurnsProps as Pt, effectMeta as Q, pinNodeToObject as Qn, NoiseGenerator as Qt, SelectiveColor as R, PinToObjectOptions as Rn, _default$29 as Rr, LayerStyleDropShadow as Rt, HalftoneScreenProps as S, VignetteProps as Sn, _default$14 as Sr, ColorKeyProps as St, LevelChannel as T, COCO17_KEYPOINT_NAMES as Tn, _default$17 as Tr, CornerPinProps as Tt, TemporalDeflicker as U, SegmentationTexturePool as Un, LayerStyleStroke as Ut, ShadowsHighlights as V, PoseSkeletonRenderer as Vn, LayerStyleOuterGlow as Vt, TileOffset as W, SpatialLandmarkTransformer as Wn, Liquify as Wt, VisionProps as X, analyzeSequence as Xn, MeshWarpPointsItem as Xt, Vision as Y, VisionRunner as Yn, MeshWarp as Yt, effectFactories as Z, pinNodeToLandmark as Zn, MeshWarpProps as Zt, GradientMapProps as _, RotateProps as _n, _default$9 as _r, ChannelSplitter as _t, Crop as a, PatchHeal as an, TensorSource as ar, AudioFade as at, HalftoneMode as b, TonalShift as bn, _default$12 as br, ColorBalanceProps as bt, CurvesChannelPoint as c, ProceduralVFX as cn, _default as cr, AudioNoiseGateProps as ct, DeflickerProps as d, RefineEdgeProps as dn, _default$3 as dr, AudioReverb as dt, Paint as en, ControlNetMultiplexer as er, BlurProps as et, DepthOfField as f, RefractionCaustics3D as fn, _default$4 as fr, AudioReverbProps as ft, GradientMap as g, Rotate as gn, _default$8 as gr, ChannelMergerProps as gt, FilmGrainProps as h, ResizerScalerProps as hn, _default$7 as hr, ChannelMerger as ht, AudioSignalExtractorProps as i, PaintStrokesItemOption3 as in, TensorPipeline as ir, AudioDelayProps as it, MotionBlurProps as j, ObjectAnchorsSignals as jn, _default$23 as jr, FlipProps as jt, ModulateProps as k, MaskTrackSignals as kn, _default$21 as kr, ExtractLUTProps as kt, CurvesProps as l, ProceduralVFXProps as ln, _default$1 as lr, AudioParametricEq as lt, FilmGrain as m, ResizerScaler as mn, _default$6 as mr, CameraParallax3DProps as mt, ApplyLUTProps as n, PaintStrokesItemOption1 as nn, OpticalFlowComputePipeline as nr, AudioCompressorProps as nt, CropProps as o, PatchHealPatchesItem as on, TensorViewExport as or, AudioFadeProps as ot, DepthOfFieldProps as p, RefractionCaustics3DProps as pn, _default$5 as pr, CameraParallax3D as pt, UnsharpMask as q, VisionBundle as qn, MaskMath as qt, AudioSignalExtractor as r, PaintStrokesItemOption2 as rn, TemporalDeflickerPipeline as rr, AudioDelay as rt, Curves as s, PatchHealProps as sn, EffectProp as sr, AudioNoiseGate as st, ApplyLUT as t, PaintProps as tn, DepthNormalsComputePipeline as tr, AudioCompressor as tt, CustomEffect as u, RefineEdge as un, _default$2 as ur, AudioParametricEqProps as ut, GradientMapStop as v, StereoPanning as vn, _default$10 as vr, ChannelSplitterProps as vt, HighPassProps as w, COCO17_KEYPOINTS as wn, _default$16 as wr, CornerPinPointsItem as wt, HalftoneScreen as x, Vignette as xn, _default$13 as xr, ColorKey as xt, HalftoneDotShape as y, StereoPanningProps as yn, _default$11 as yr, ColorBalance as yt, SelectiveColorAdjustment as z, PoseLandmarkSignals as zn, _default$30 as zr, LayerStyleInnerGlow as zt };
4544
+ //# sourceMappingURL=index-CvDVpaKn.d.mts.map