framefields 2.5.1 → 2.5.3
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.
- package/dist/audio/index.d.mts +4 -4
- package/dist/audio/index.mjs +10 -10
- package/dist/{audio-C1A4N3Wh.d.mts → audio-2ew5y0Bl.d.mts} +3 -3
- package/dist/{audio-C1A4N3Wh.d.mts.map → audio-2ew5y0Bl.d.mts.map} +1 -1
- package/dist/{audio-CZwVENqB.mjs → audio-DrUskzwZ.mjs} +4 -4
- package/dist/{audio-CZwVENqB.mjs.map → audio-DrUskzwZ.mjs.map} +1 -1
- package/dist/components/index.d.mts +10 -10
- package/dist/components/index.mjs +44 -44
- package/dist/{dist-CQZ5_60A.mjs → dist-BPOi5xb_.mjs} +2 -2
- package/dist/{dist-CQZ5_60A.mjs.map → dist-BPOi5xb_.mjs.map} +1 -1
- package/dist/{dist-DBWkkSvJ.mjs → dist-Bf0H4lp1.mjs} +66 -28
- package/dist/dist-Bf0H4lp1.mjs.map +1 -0
- package/dist/{dist-DFeF-ygz.mjs → dist-D021IFfp.mjs} +3 -1
- package/dist/{dist-DFeF-ygz.mjs.map → dist-D021IFfp.mjs.map} +1 -1
- package/dist/{dist-DHQVWaV2.mjs → dist-DG65RDhc.mjs} +3 -3
- package/dist/{dist-DHQVWaV2.mjs.map → dist-DG65RDhc.mjs.map} +1 -1
- package/dist/effects/index.d.mts +4 -4
- package/dist/effects/index.mjs +35 -35
- package/dist/{effects-DZvq-nWT.mjs → effects-Z-brb-n7.mjs} +3 -3
- package/dist/{effects-DZvq-nWT.mjs.map → effects-Z-brb-n7.mjs.map} +1 -1
- package/dist/fonts/index.mjs +2 -2
- package/dist/{fonts-DcsxFpyU.mjs → fonts-DqYgk_1a.mjs} +2 -2
- package/dist/{fonts-DcsxFpyU.mjs.map → fonts-DqYgk_1a.mjs.map} +1 -1
- package/dist/{gpu-Dq_uI_00.mjs → gpu-CevnCkZC.mjs} +2 -2
- package/dist/{gpu-Dq_uI_00.mjs.map → gpu-CevnCkZC.mjs.map} +1 -1
- package/dist/{index-C2f4Hm-p.d.mts → index-COQTaniR.d.mts} +2 -2
- package/dist/{index-C2f4Hm-p.d.mts.map → index-COQTaniR.d.mts.map} +1 -1
- package/dist/{index-fymoeGNW.d.mts → index-CZK6CFLy.d.mts} +22 -19
- package/dist/index-CZK6CFLy.d.mts.map +1 -0
- package/dist/{index-BpdVOlsV.d.mts → index-CfMylY3O.d.mts} +3 -3
- package/dist/{index-BpdVOlsV.d.mts.map → index-CfMylY3O.d.mts.map} +1 -1
- package/dist/{index-DNKM3to5.d.mts → index-D1C735Wp.d.mts} +3 -3
- package/dist/{index-DNKM3to5.d.mts.map → index-D1C735Wp.d.mts.map} +1 -1
- package/dist/{index-D6-lH1Mx.d.mts → index-DSGFMpwL.d.mts} +4 -4
- package/dist/{index-D6-lH1Mx.d.mts.map → index-DSGFMpwL.d.mts.map} +1 -1
- package/dist/{index-B-KVpJMb.d.mts → index-KqW22NHL.d.mts} +2 -2
- package/dist/{index-B-KVpJMb.d.mts.map → index-KqW22NHL.d.mts.map} +1 -1
- package/dist/{index-DKssQ_wn.d.mts → index-tCKz9Tku.d.mts} +231 -233
- package/dist/index-tCKz9Tku.d.mts.map +1 -0
- package/dist/index.d.mts +11 -11
- package/dist/index.mjs +52 -52
- package/dist/preview/index.d.mts +3 -3
- package/dist/preview/index.mjs +10 -10
- package/dist/{preview-CYI4i4m3.mjs → preview-DVw2jLDh.mjs} +2 -2
- package/dist/{preview-CYI4i4m3.mjs.map → preview-DVw2jLDh.mjs.map} +1 -1
- package/dist/preview-engine/{chunk-3I6B3YPF.mjs → chunk-2WOCQNZX.mjs} +3 -3
- package/dist/preview-engine/{chunk-PDM3TJ45.mjs → chunk-45XGWIOY.mjs} +1 -1
- package/dist/preview-engine/{chunk-XUPZBI3Y.mjs → chunk-5FTCPTOX.mjs} +13 -7
- package/dist/preview-engine/{chunk-Z4TKEI3I.mjs → chunk-B555EGEU.mjs} +1 -1
- package/dist/preview-engine/{chunk-6GMEF2QB.mjs → chunk-FAEWI3LF.mjs} +1 -1
- package/dist/preview-engine/{chunk-W4HIVUUA.mjs → chunk-I3ZTDIVM.mjs} +1 -1
- package/dist/preview-engine/{chunk-CT2WFPYG.mjs → chunk-MCFYUKAJ.mjs} +8 -8
- package/dist/preview-engine/{chunk-AB5VITYM.mjs → chunk-PR37RCNO.mjs} +1 -1
- package/dist/preview-engine/{chunk-NAISBHLR.mjs → chunk-QP24X77K.mjs} +1 -1
- package/dist/preview-engine/chunk-SYP4AJMF.mjs +1 -0
- package/dist/preview-engine/{chunk-SNASF7OM.mjs → chunk-YSXMXD3F.mjs} +1 -1
- package/dist/preview-engine/components.mjs +1 -1
- package/dist/preview-engine/effects.mjs +1 -1
- package/dist/preview-engine/fonts.mjs +1 -1
- package/dist/preview-engine/framefields.mjs +1 -1
- package/dist/preview-engine/player.mjs +1 -1
- package/dist/preview-engine/renderers-BILNWTUC.mjs +228 -0
- package/dist/preview-engine/{renderers-HJ6NO5ZD.mjs → renderers-EJATUIUP.mjs} +1 -1
- package/dist/preview-engine/renderers-SKT7AGGE.mjs +1 -0
- package/dist/{program-BdPDtfVv.mjs → program-4mAVgg3c.mjs} +4 -4
- package/dist/{program-BdPDtfVv.mjs.map → program-4mAVgg3c.mjs.map} +1 -1
- package/dist/registry/captions.json +1 -1
- package/dist/registry/lower-third.json +1 -1
- package/dist/registry/meter.json +1 -1
- package/dist/renderer/index.d.mts +2 -2
- package/dist/renderer/index.mjs +2 -2
- package/dist/renderer-1ymN1FIT.mjs +5 -0
- package/dist/{renderer-VdTs-dqH.mjs → renderer-4P-DCjk2.mjs} +3 -3
- package/dist/{renderer-VdTs-dqH.mjs.map → renderer-4P-DCjk2.mjs.map} +1 -1
- package/dist/{renderer-B4blg067.mjs → renderer-5-9DPis6.mjs} +3 -3
- package/dist/{renderer-B4blg067.mjs.map → renderer-5-9DPis6.mjs.map} +1 -1
- package/dist/{renderer-COXKPofU.d.mts → renderer-92IAZzBU.d.mts} +2 -2
- package/dist/{renderer-COXKPofU.d.mts.map → renderer-92IAZzBU.d.mts.map} +1 -1
- package/dist/{renderer-o_JK4YfO.mjs → renderer-9gjn790a.mjs} +3 -3
- package/dist/{renderer-o_JK4YfO.mjs.map → renderer-9gjn790a.mjs.map} +1 -1
- package/dist/renderer-B-43EuKb.mjs +5 -0
- package/dist/renderer-B-v5ZboU.mjs +5 -0
- package/dist/{renderer-IMg0dK6K.mjs → renderer-B8PNlKEM.mjs} +3 -3
- package/dist/{renderer-IMg0dK6K.mjs.map → renderer-B8PNlKEM.mjs.map} +1 -1
- package/dist/{renderer-Db_wphHH.mjs → renderer-B9AZ6R1U.mjs} +64 -21
- package/dist/renderer-B9AZ6R1U.mjs.map +1 -0
- package/dist/{renderer-7DyjqxEj.mjs → renderer-B9iVE2GG.mjs} +3 -3
- package/dist/{renderer-7DyjqxEj.mjs.map → renderer-B9iVE2GG.mjs.map} +1 -1
- package/dist/{renderer-ChCUad83.mjs → renderer-B9m7xIPo.mjs} +3 -3
- package/dist/{renderer-ChCUad83.mjs.map → renderer-B9m7xIPo.mjs.map} +1 -1
- package/dist/{renderer-BAkPq8qo.mjs → renderer-B9yv3R1y.mjs} +2 -2
- package/dist/{renderer-BAkPq8qo.mjs.map → renderer-B9yv3R1y.mjs.map} +1 -1
- package/dist/{renderer-DuQMzR3v.mjs → renderer-BBA-iCi-.mjs} +8 -417
- package/dist/renderer-BBA-iCi-.mjs.map +1 -0
- package/dist/{renderer-l_U6kA8K.mjs → renderer-BIYJKdwA.mjs} +2 -2
- package/dist/{renderer-l_U6kA8K.mjs.map → renderer-BIYJKdwA.mjs.map} +1 -1
- package/dist/{renderer-DQuKNgIx.mjs → renderer-BIt-At3v.mjs} +4 -4
- package/dist/{renderer-DQuKNgIx.mjs.map → renderer-BIt-At3v.mjs.map} +1 -1
- package/dist/renderer-BKF8Sfbg.mjs +3 -0
- package/dist/{renderer-D2ru2Afi.mjs → renderer-BKayVZhL.mjs} +3 -3
- package/dist/{renderer-D2ru2Afi.mjs.map → renderer-BKayVZhL.mjs.map} +1 -1
- package/dist/renderer-BTB8ifgH.mjs +5 -0
- package/dist/{renderer-fH9SCJC2.mjs → renderer-BVtQzjgT.mjs} +2 -2
- package/dist/{renderer-fH9SCJC2.mjs.map → renderer-BVtQzjgT.mjs.map} +1 -1
- package/dist/{renderer-DBjV6C2u.mjs → renderer-BWqQxZNk.mjs} +2 -2
- package/dist/renderer-BYxzR6Hp.mjs +5 -0
- package/dist/renderer-BcGhO_Mw.mjs +5 -0
- package/dist/{renderer-DK34NH92.mjs → renderer-BcSSAzc4.mjs} +3 -3
- package/dist/{renderer-DK34NH92.mjs.map → renderer-BcSSAzc4.mjs.map} +1 -1
- package/dist/{renderer-BBTkfhL8.mjs → renderer-Bh0dwc8n.mjs} +3 -3
- package/dist/{renderer-BBTkfhL8.mjs.map → renderer-Bh0dwc8n.mjs.map} +1 -1
- package/dist/{renderer-CDX2f82b.mjs → renderer-BjxceNBj.mjs} +3 -3
- package/dist/{renderer-CDX2f82b.mjs.map → renderer-BjxceNBj.mjs.map} +1 -1
- package/dist/renderer-Bk3RgiFg.mjs +5 -0
- package/dist/{renderer-Bmj7AyJP.mjs → renderer-Bk7vVfTu.mjs} +3 -3
- package/dist/{renderer-Bmj7AyJP.mjs.map → renderer-Bk7vVfTu.mjs.map} +1 -1
- package/dist/{renderer-Ch7qwjH9.mjs → renderer-BmX2CmyO.mjs} +3 -3
- package/dist/{renderer-Ch7qwjH9.mjs.map → renderer-BmX2CmyO.mjs.map} +1 -1
- package/dist/{renderer-Bo1PY0zW.mjs → renderer-BpBhvMi1.mjs} +2 -2
- package/dist/{renderer-ZjSP5jw6.mjs → renderer-Bt_j2Zi6.mjs} +2 -2
- package/dist/{renderer-ZjSP5jw6.mjs.map → renderer-Bt_j2Zi6.mjs.map} +1 -1
- package/dist/renderer-BvItCxkw.mjs +5 -0
- package/dist/{renderer-Bw5YP2Db.mjs → renderer-BwRLXhxJ.mjs} +3 -3
- package/dist/{renderer-Bw5YP2Db.mjs.map → renderer-BwRLXhxJ.mjs.map} +1 -1
- package/dist/{renderer-CWSM0IGG.mjs → renderer-C0P8ZRiC.mjs} +2 -2
- package/dist/{renderer-CWSM0IGG.mjs.map → renderer-C0P8ZRiC.mjs.map} +1 -1
- package/dist/{renderer-Z39F9QK5.mjs → renderer-C1sFg34Y.mjs} +3 -3
- package/dist/{renderer-Z39F9QK5.mjs.map → renderer-C1sFg34Y.mjs.map} +1 -1
- package/dist/{renderer-BGNdwdCR.mjs → renderer-C4f_X1Qc.mjs} +3 -3
- package/dist/{renderer-BGNdwdCR.mjs.map → renderer-C4f_X1Qc.mjs.map} +1 -1
- package/dist/{renderer-DyMEAZIm.mjs → renderer-C4pS7aAI.mjs} +4 -4
- package/dist/{renderer-DyMEAZIm.mjs.map → renderer-C4pS7aAI.mjs.map} +1 -1
- package/dist/{renderer-BWa3CLK7.mjs → renderer-C5h2TSjH.mjs} +2 -2
- package/dist/{renderer-BWa3CLK7.mjs.map → renderer-C5h2TSjH.mjs.map} +1 -1
- package/dist/{renderer-BN_n6O6P.mjs → renderer-C7HIJcJK.mjs} +3 -3
- package/dist/{renderer-BN_n6O6P.mjs.map → renderer-C7HIJcJK.mjs.map} +1 -1
- package/dist/{renderer-G3px5ODP.mjs → renderer-C8-NmotX.mjs} +3 -3
- package/dist/{renderer-G3px5ODP.mjs.map → renderer-C8-NmotX.mjs.map} +1 -1
- package/dist/renderer-CCnfPHqk.mjs +5 -0
- package/dist/{renderer-Dx28wTi1.d.mts → renderer-CE9N4EEI.d.mts} +2 -2
- package/dist/{renderer-Dx28wTi1.d.mts.map → renderer-CE9N4EEI.d.mts.map} +1 -1
- package/dist/{renderer-CLO8QHWE.mjs → renderer-CGKKjJ5Q.mjs} +3 -3
- package/dist/{renderer-CLO8QHWE.mjs.map → renderer-CGKKjJ5Q.mjs.map} +1 -1
- package/dist/renderer-CIoWQNaA.mjs +5 -0
- package/dist/{renderer-2bipMLqz.mjs → renderer-CJ2-jEy7.mjs} +2 -2
- package/dist/{renderer-2bipMLqz.mjs.map → renderer-CJ2-jEy7.mjs.map} +1 -1
- package/dist/renderer-CMwQtIIq.mjs +5 -0
- package/dist/renderer-CN8kRB90.mjs +6 -0
- package/dist/renderer-CPKBDif1.mjs +5 -0
- package/dist/{renderer-Cj1giMd0.mjs → renderer-CPl1wOrj.mjs} +2 -2
- package/dist/{renderer-Cj1giMd0.mjs.map → renderer-CPl1wOrj.mjs.map} +1 -1
- package/dist/{renderer-BmoQJUJO.mjs → renderer-CT_3Fegr.mjs} +3 -3
- package/dist/{renderer-BmoQJUJO.mjs.map → renderer-CT_3Fegr.mjs.map} +1 -1
- package/dist/{renderer-BfrzKmRh.mjs → renderer-CTvPNRMH.mjs} +2 -2
- package/dist/{renderer-BfrzKmRh.mjs.map → renderer-CTvPNRMH.mjs.map} +1 -1
- package/dist/{renderer-DWaqF7-6.mjs → renderer-CWnhRMOq.mjs} +3 -3
- package/dist/{renderer-DWaqF7-6.mjs.map → renderer-CWnhRMOq.mjs.map} +1 -1
- package/dist/{renderer-BBTdHKH7.mjs → renderer-CXa6SWXy.mjs} +3 -3
- package/dist/{renderer-BBTdHKH7.mjs.map → renderer-CXa6SWXy.mjs.map} +1 -1
- package/dist/renderer-CamsHxEP.mjs +5 -0
- package/dist/{renderer-CMEqUhrW.mjs → renderer-Cb5uDZm0.mjs} +3 -3
- package/dist/{renderer-CMEqUhrW.mjs.map → renderer-Cb5uDZm0.mjs.map} +1 -1
- package/dist/renderer-CeQormOH.mjs +5 -0
- package/dist/renderer-Cex4eMtv.mjs +5 -0
- package/dist/{renderer-kP5Y282J.mjs → renderer-CgMnZYTM.mjs} +4 -4
- package/dist/{renderer-kP5Y282J.mjs.map → renderer-CgMnZYTM.mjs.map} +1 -1
- package/dist/{renderer-B5YYBBDq.mjs → renderer-CjcrhBB2.mjs} +2 -2
- package/dist/{renderer-B5YYBBDq.mjs.map → renderer-CjcrhBB2.mjs.map} +1 -1
- package/dist/{renderer-CXbXF7Dh.mjs → renderer-Cjw6lyaK.mjs} +3 -3
- package/dist/{renderer-CXbXF7Dh.mjs.map → renderer-Cjw6lyaK.mjs.map} +1 -1
- package/dist/renderer-CjyTrNlr.mjs +5 -0
- package/dist/{renderer-D6p8b6ql.mjs → renderer-CkJXq4bD.mjs} +3 -3
- package/dist/{renderer-D6p8b6ql.mjs.map → renderer-CkJXq4bD.mjs.map} +1 -1
- package/dist/renderer-Clv9TO6C.mjs +5 -0
- package/dist/{renderer-gjT5v76-.mjs → renderer-Cm9fEQsw.mjs} +2 -2
- package/dist/{renderer-gjT5v76-.mjs.map → renderer-Cm9fEQsw.mjs.map} +1 -1
- package/dist/{renderer-CJoa4H2G.mjs → renderer-CuwVuVKG.mjs} +2 -2
- package/dist/{renderer-CJoa4H2G.mjs.map → renderer-CuwVuVKG.mjs.map} +1 -1
- package/dist/{renderer-D5u3GVtD.mjs → renderer-CvYxxS_X.mjs} +71 -71
- package/dist/{renderer-D5u3GVtD.mjs.map → renderer-CvYxxS_X.mjs.map} +1 -1
- package/dist/{renderer-VxVi_0c7.mjs → renderer-CxOaqnho.mjs} +2 -2
- package/dist/{renderer-VxVi_0c7.mjs.map → renderer-CxOaqnho.mjs.map} +1 -1
- package/dist/{renderer-DkPDYtD3.mjs → renderer-CxkUI9s_.mjs} +3 -3
- package/dist/{renderer-DkPDYtD3.mjs.map → renderer-CxkUI9s_.mjs.map} +1 -1
- package/dist/{renderer-BYJS2lhn.mjs → renderer-Cz5SOnJr.mjs} +3 -3
- package/dist/{renderer-BYJS2lhn.mjs.map → renderer-Cz5SOnJr.mjs.map} +1 -1
- package/dist/{renderer-WVrUeiLZ.mjs → renderer-D-FwaV1R.mjs} +2 -2
- package/dist/{renderer-BWnFh7NO.mjs → renderer-D0iSbNza.mjs} +3 -3
- package/dist/{renderer-BWnFh7NO.mjs.map → renderer-D0iSbNza.mjs.map} +1 -1
- package/dist/{renderer-DHqicGgT.mjs → renderer-D22g6ION.mjs} +3 -3
- package/dist/{renderer-DHqicGgT.mjs.map → renderer-D22g6ION.mjs.map} +1 -1
- package/dist/renderer-D4LnJk-M.mjs +5 -0
- package/dist/renderer-D5OfQ8Ut.mjs +5 -0
- package/dist/renderer-DBYssktC.mjs +5 -0
- package/dist/renderer-DC-Aj3me.mjs +5 -0
- package/dist/renderer-DG97_Aoc.mjs +5 -0
- package/dist/{renderer-Cjs1OeBu.mjs → renderer-DPVEs5ME.mjs} +3 -3
- package/dist/{renderer-Cjs1OeBu.mjs.map → renderer-DPVEs5ME.mjs.map} +1 -1
- package/dist/{renderer-COtZ315B.mjs → renderer-DPzair18.mjs} +2 -2
- package/dist/renderer-DS4UGjcS.mjs +5 -0
- package/dist/{renderer-PLoGrFGz.mjs → renderer-DTXAa2pL.mjs} +3 -3
- package/dist/{renderer-PLoGrFGz.mjs.map → renderer-DTXAa2pL.mjs.map} +1 -1
- package/dist/{renderer-ChjkppUz.mjs → renderer-DYdll3xW.mjs} +3 -3
- package/dist/{renderer-ChjkppUz.mjs.map → renderer-DYdll3xW.mjs.map} +1 -1
- package/dist/{renderer-BhhweLr_.mjs → renderer-Datqywo_.mjs} +3 -3
- package/dist/{renderer-BhhweLr_.mjs.map → renderer-Datqywo_.mjs.map} +1 -1
- package/dist/renderer-DdG6ibtM.mjs +5 -0
- package/dist/{renderer-D0X7Eh-T.mjs → renderer-Ddg3dJmu.mjs} +3 -3
- package/dist/{renderer-D0X7Eh-T.mjs.map → renderer-Ddg3dJmu.mjs.map} +1 -1
- package/dist/{renderer-CmKdr2nA.mjs → renderer-De7gno9X.mjs} +3 -3
- package/dist/{renderer-CmKdr2nA.mjs.map → renderer-De7gno9X.mjs.map} +1 -1
- package/dist/renderer-DhZi4f3t.mjs +5 -0
- package/dist/{renderer-BJwOM1Dq.mjs → renderer-Dkt1oh9H.mjs} +3 -3
- package/dist/{renderer-BJwOM1Dq.mjs.map → renderer-Dkt1oh9H.mjs.map} +1 -1
- package/dist/{renderer-DqO9gBAi.mjs → renderer-DnT62IDK.mjs} +3 -3
- package/dist/{renderer-DqO9gBAi.mjs.map → renderer-DnT62IDK.mjs.map} +1 -1
- package/dist/{renderer-vwoyR8pW.mjs → renderer-Du8z4UrN.mjs} +2 -2
- package/dist/{renderer-vwoyR8pW.mjs.map → renderer-Du8z4UrN.mjs.map} +1 -1
- package/dist/{renderer-B8LXXvHi.mjs → renderer-MQPiZQXN.mjs} +3 -3
- package/dist/{renderer-B8LXXvHi.mjs.map → renderer-MQPiZQXN.mjs.map} +1 -1
- package/dist/renderer-MgLekf6d.mjs +5 -0
- package/dist/{renderer-FCqOfN6n.mjs → renderer-NL2IZShC.mjs} +3 -3
- package/dist/{renderer-FCqOfN6n.mjs.map → renderer-NL2IZShC.mjs.map} +1 -1
- package/dist/renderer-Qvs-1lWh.mjs +5 -0
- package/dist/{renderer-B31zMDE8.mjs → renderer-RiWi7y5C.mjs} +4 -4
- package/dist/{renderer-B31zMDE8.mjs.map → renderer-RiWi7y5C.mjs.map} +1 -1
- package/dist/{renderer-Fsdod0yZ.mjs → renderer-T2dd9a2L.mjs} +3 -3
- package/dist/{renderer-Fsdod0yZ.mjs.map → renderer-T2dd9a2L.mjs.map} +1 -1
- package/dist/{renderer-1VKN5j2C.mjs → renderer-Y5JmTL8J.mjs} +3 -3
- package/dist/{renderer-1VKN5j2C.mjs.map → renderer-Y5JmTL8J.mjs.map} +1 -1
- package/dist/{renderer-CdUf7ZDJ.mjs → renderer-_vcT__tW.mjs} +3 -3
- package/dist/{renderer-CdUf7ZDJ.mjs.map → renderer-_vcT__tW.mjs.map} +1 -1
- package/dist/renderer-bN7dOErt.mjs +5 -0
- package/dist/renderer-jWKVmReU.mjs +5 -0
- package/dist/{renderer-kkDfQ56G.mjs → renderer-khVVYoVF.mjs} +3 -3
- package/dist/{renderer-kkDfQ56G.mjs.map → renderer-khVVYoVF.mjs.map} +1 -1
- package/dist/renderer-lk-At57G.mjs +5 -0
- package/dist/renderer-qi8Slwfo.mjs +5 -0
- package/dist/renderer-qxOH4JH1.mjs +5 -0
- package/dist/renderer-t30NpmIl.mjs +5 -0
- package/dist/{renderer-Bo_d7h86.mjs → renderer-vc8t_z-y.mjs} +3 -3
- package/dist/{renderer-Bo_d7h86.mjs.map → renderer-vc8t_z-y.mjs.map} +1 -1
- package/dist/{renderer-0cHsK6xR.mjs → renderer-wEXBnlr1.mjs} +3 -3
- package/dist/{renderer-0cHsK6xR.mjs.map → renderer-wEXBnlr1.mjs.map} +1 -1
- package/dist/{renderer-CNs1vBUy.mjs → renderer-wIsJb2eO.mjs} +2 -2
- package/dist/{renderer-CNs1vBUy.mjs.map → renderer-wIsJb2eO.mjs.map} +1 -1
- package/dist/renderer-wKW4HWRx.mjs +5 -0
- package/dist/renderer-ydjPm8bp.mjs +5 -0
- package/dist/{renderer-DP41Fokp.mjs → renderer-zdpn1Hkk.mjs} +3 -3
- package/dist/{renderer-DP41Fokp.mjs.map → renderer-zdpn1Hkk.mjs.map} +1 -1
- package/dist/{renderers-CP8CFWDs-DiX2Y4Qp.mjs → renderers-CP8CFWDs-BbLkcJTN.mjs} +3 -3
- package/dist/{renderers-CP8CFWDs-DiX2Y4Qp.mjs.map → renderers-CP8CFWDs-BbLkcJTN.mjs.map} +1 -1
- package/dist/signals/index.d.mts +5 -5
- package/dist/signals/index.mjs +6 -6
- package/dist/{signals-Cf9mfNGE.mjs → signals-BrNF9l9s.mjs} +3 -3
- package/dist/{signals-Cf9mfNGE.mjs.map → signals-BrNF9l9s.mjs.map} +1 -1
- package/dist/{src-Ds9IAk5S.mjs → src-WAnxhDYD.mjs} +9 -9
- package/dist/{src-Ds9IAk5S.mjs.map → src-WAnxhDYD.mjs.map} +1 -1
- package/package.json +58 -58
- package/dist/dist-DBWkkSvJ.mjs.map +0 -1
- package/dist/index-DKssQ_wn.d.mts.map +0 -1
- package/dist/index-fymoeGNW.d.mts.map +0 -1
- package/dist/preview-engine/chunk-X6HUH6K4.mjs +0 -1
- package/dist/preview-engine/renderers-KSQM7EM5.mjs +0 -1
- package/dist/preview-engine/renderers-XLBHSQZJ.mjs +0 -228
- package/dist/renderer-B-D_VZg3.mjs +0 -5
- package/dist/renderer-B64dhpDX.mjs +0 -5
- package/dist/renderer-BA2Ko4H1.mjs +0 -3
- package/dist/renderer-BDL4jyrb.mjs +0 -5
- package/dist/renderer-BKCZGKkl.mjs +0 -5
- package/dist/renderer-BKs3jI7-.mjs +0 -5
- package/dist/renderer-BW74Zf-u.mjs +0 -5
- package/dist/renderer-BXuQN61O.mjs +0 -5
- package/dist/renderer-BY1pPvzx.mjs +0 -6
- package/dist/renderer-Bahthqvq.mjs +0 -5
- package/dist/renderer-BbaiQG8h.mjs +0 -5
- package/dist/renderer-BhHF-08y.mjs +0 -5
- package/dist/renderer-BnrMcw6C.mjs +0 -5
- package/dist/renderer-BsS61z5l.mjs +0 -5
- package/dist/renderer-Btuq2Eq8.mjs +0 -5
- package/dist/renderer-BxmsEl2x.mjs +0 -5
- package/dist/renderer-CGOyHdKs.mjs +0 -5
- package/dist/renderer-CJjmpmpu.mjs +0 -5
- package/dist/renderer-CQvDDAIu.mjs +0 -5
- package/dist/renderer-CYxigw7S.mjs +0 -5
- package/dist/renderer-CgDofO5z.mjs +0 -5
- package/dist/renderer-CgmQchab.mjs +0 -5
- package/dist/renderer-CjzrLwW_.mjs +0 -5
- package/dist/renderer-ClnYWADT.mjs +0 -5
- package/dist/renderer-CwAd71C6.mjs +0 -5
- package/dist/renderer-D3Z9t-xT.mjs +0 -5
- package/dist/renderer-DKH1oSlW.mjs +0 -5
- package/dist/renderer-DTkf_hwG.mjs +0 -5
- package/dist/renderer-DU0bmOS7.mjs +0 -5
- package/dist/renderer-D_vJHQt5.mjs +0 -5
- package/dist/renderer-Db_wphHH.mjs.map +0 -1
- package/dist/renderer-Dc5n0M6P.mjs +0 -5
- package/dist/renderer-Ddfn0Dha.mjs +0 -5
- package/dist/renderer-DeSoNQeG.mjs +0 -5
- package/dist/renderer-DuQMzR3v.mjs.map +0 -1
- package/dist/renderer-Dzca9Qba.mjs +0 -5
- package/dist/renderer-HRVvtc9c.mjs +0 -5
- package/dist/renderer-M3Qs4f1K.mjs +0 -5
- package/dist/renderer-NDHJt_Ae.mjs +0 -5
package/dist/fonts/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as registerHeadlessFont, m as SlugGeometry, p as SlugFontCache, tt as setRegisteredFontSource } from "./dist-
|
|
1
|
+
import { $ as registerHeadlessFont, m as SlugGeometry, p as SlugFontCache, tt as setRegisteredFontSource } from "./dist-Bf0H4lp1.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import * as fontkit from "fontkit";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
@@ -257,4 +257,4 @@ var FontManager = class FontManager {
|
|
|
257
257
|
|
|
258
258
|
//#endregion
|
|
259
259
|
export { FontManager as t };
|
|
260
|
-
//# sourceMappingURL=fonts-
|
|
260
|
+
//# sourceMappingURL=fonts-DqYgk_1a.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts-DcsxFpyU.mjs","names":[],"sources":["../src/fonts/manager.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n\tregisterHeadlessFont,\n\tSlugFontCache,\n\tSlugGeometry,\n\tsetRegisteredFontSource,\n} from \"@framefields/webgpu-renderers\";\nimport * as fontkit from \"fontkit\";\n\nexport interface RegisterFontOptions {\n\tfamily?: string;\n\tsource: string | Uint8Array;\n\tweight?: number | string;\n\tstyle?: \"normal\" | \"italic\" | \"oblique\";\n}\n\nexport interface RegisteredFont {\n\tfamily: string;\n\tsource: string | Uint8Array;\n\tfilePath?: string;\n\tformat: \"truetype\" | \"opentype\";\n\tpostscriptName?: string;\n\tunitsPerEm?: number;\n\tweight?: number | string;\n\tstyle?: string;\n}\n\ninterface ResolvedSource {\n\tbuffer: Uint8Array;\n\tfilePath?: string;\n}\n\nconst SFNT_TRUETYPE_1 = 0x00010000;\nconst SFNT_TRUETYPE_TRUE = 0x74727565; // 'true'\nconst SFNT_TRUETYPE_TYP1 = 0x74797031; // 'typ1'\nconst SFNT_OPENTYPE_CFF = 0x4f54544f; // 'OTTO'\nconst SFNT_COLLECTION = 0x74746366; // 'ttcf'\n\nfunction validateFontBinaryHeader(\n\tbytes: Uint8Array,\n\tsourceLabel: string,\n): \"truetype\" | \"opentype\" {\n\tif (bytes.length < 12) {\n\t\tthrow new Error(\n\t\t\t`Invalid font binary for \"${sourceLabel}\": File size (${bytes.length} bytes) is too small to be a valid TrueType or OpenType font.`,\n\t\t);\n\t}\n\n\tconst tag =\n\t\t((bytes[0] ?? 0) << 24) |\n\t\t((bytes[1] ?? 0) << 16) |\n\t\t((bytes[2] ?? 0) << 8) |\n\t\t(bytes[3] ?? 0);\n\n\tif (\n\t\ttag === SFNT_TRUETYPE_1 ||\n\t\ttag === SFNT_TRUETYPE_TRUE ||\n\t\ttag === SFNT_TRUETYPE_TYP1 ||\n\t\ttag === SFNT_COLLECTION\n\t) {\n\t\treturn \"truetype\";\n\t}\n\n\tif (tag === SFNT_OPENTYPE_CFF) {\n\t\treturn \"opentype\";\n\t}\n\n\tconst hexTag = (tag >>> 0).toString(16).padStart(8, \"0\");\n\tthrow new Error(\n\t\t`Invalid font format for \"${sourceLabel}\": Expected a valid TrueType (.ttf) or OpenType (.otf) font binary. Found header tag: 0x${hexTag}.`,\n\t);\n}\n\nasync function resolveSourceBuffer(\n\tsource: string | Uint8Array,\n): Promise<ResolvedSource> {\n\tif (source instanceof Uint8Array) {\n\t\treturn { buffer: source };\n\t}\n\n\tif (typeof source !== \"string\") {\n\t\tthrow new TypeError(\n\t\t\t`Font source must be a file path string or Uint8Array, received: ${typeof source}`,\n\t\t);\n\t}\n\n\tlet cleanPath = source;\n\tif (cleanPath.startsWith(\"http://\") || cleanPath.startsWith(\"https://\")) {\n\t\tconst res = await fetch(cleanPath);\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to download font from \"${cleanPath}\": HTTP ${res.status} ${res.statusText}`,\n\t\t\t);\n\t\t}\n\t\tconst arrayBuffer = await res.arrayBuffer();\n\t\treturn {\n\t\t\tbuffer: new Uint8Array(arrayBuffer),\n\t\t\tfilePath: cleanPath,\n\t\t};\n\t}\n\n\tif (cleanPath.startsWith(\"file://\")) {\n\t\ttry {\n\t\t\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 interface MeasureTextOptions {\n\tfontFamily: string;\n\tfontSize?: number;\n\tfontWeight?: string | number;\n\t/** Extra px between characters, as on `Layer.text`. */\n\tletterSpacing?: number;\n\t/** Multiplier of fontSize when < 10, else px. Default 1.2. */\n\tlineHeight?: number;\n\t/** Wrap width in px; omit for one line per `\\n`. */\n\twidth?: number;\n\talign?: \"left\" | \"center\" | \"right\";\n\t/** Paragraph base direction, as on `Layer.text`. Default \"auto\". */\n\tdirection?: \"ltr\" | \"rtl\" | \"auto\";\n}\n\nexport interface MeasuredGlyph {\n\tchar: string;\n\t/** Index into the string (code units), matching `text.slice`. */\n\tindex: number;\n\t/** Left edge of the glyph, relative to the text box. */\n\tx: number;\n\t/** Baseline-relative top of the line box. */\n\ty: number;\n\t/** Advance width in px. */\n\twidth: number;\n\tline: number;\n\t/** Part of a right-to-left run: reading continues to the left. */\n\trtl?: boolean;\n}\n\nexport interface TextMetrics {\n\twidth: number;\n\theight: number;\n\tlines: number;\n\t/** Line box height in px. */\n\tlineHeight: number;\n\tglyphs: MeasuredGlyph[];\n\t/**\n\t * X of a caret placed after `count` characters (0 = before the first),\n\t * relative to the text box. In right-to-left text the caret sits on the\n\t * left of the last character. Pair with a `.keys(\"text\", …)` reveal to make\n\t * a cursor follow typing exactly.\n\t */\n\tcaretX(count: number): number;\n\t/** Width of the first `count` characters (same as `caretX` on one line). */\n\twidthOf(count: number): number;\n}\n\nexport class FontManager {\n\tprivate static instance: FontManager | null = null;\n\tprivate readonly fonts = new Map<string, RegisteredFont>();\n\n\tprivate constructor() {}\n\n\t/**\n\t * Returns the singleton FontManager instance.\n\t */\n\tpublic static getInstance(): FontManager {\n\t\tif (!FontManager.instance) {\n\t\t\tFontManager.instance = new FontManager();\n\t\t}\n\t\treturn FontManager.instance;\n\t}\n\n\t/**\n\t * Registers a TrueType/OpenType font into the Framefields engine with validation.\n\t */\n\tpublic static async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\treturn FontManager.getInstance().register(optionsOrFamilyOrSource, source);\n\t}\n\n\t/**\n\t * Sets the color emoji font text draws emoji with, for the preview and the\n\t * export alike: a CBDT/CBLC bitmap font such as Noto Color Emoji, as a file\n\t * path, URL or bytes. framefields ships none; without one, exports draw\n\t * nothing for emoji.\n\t */\n\tpublic static async registerEmojiFont(\n\t\tsource: string | Uint8Array,\n\t): Promise<void> {\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(source);\n\t\tconst label =\n\t\t\tfilePath ?? (typeof source === \"string\" ? source : \"Uint8Array\");\n\t\tvalidateFontBinaryHeader(buffer, label);\n\t\tSlugFontCache.setEmojiFont(buffer, filePath);\n\t}\n\n\t/**\n\t * Measures text with the real font, exactly as `Layer.text` lays it out:\n\t * box size, line count, per-glyph positions and caret offsets. Use it to\n\t * size containers, place cursors, underline a word or center by ink\n\t * instead of guessing advances. The family must be registered first.\n\t *\n\t * ```ts\n\t * const m = FontManager.measure(\"Hello\", { fontFamily: \"Inter\", fontSize: 60 });\n\t * m.width; m.caretX(3); m.glyphs[1].x\n\t * ```\n\t */\n\tpublic static measure(\n\t\ttext: string,\n\t\toptions: MeasureTextOptions,\n\t): TextMetrics {\n\t\tconst fontSize = options.fontSize ?? 48;\n\t\tconst font = SlugFontCache.getFont(\n\t\t\toptions.fontFamily,\n\t\t\toptions.fontWeight,\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tfontSize,\n\t\t);\n\t\tif (!font) {\n\t\t\tthrow new Error(\n\t\t\t\t`FontManager.measure: font \"${options.fontFamily}\" is not registered. ` +\n\t\t\t\t\t\"Call `await FontManager.register(...)` first.\",\n\t\t\t);\n\t\t}\n\t\tconst lineHeight =\n\t\t\toptions.lineHeight !== undefined && options.lineHeight < 10\n\t\t\t\t? options.lineHeight * fontSize\n\t\t\t\t: (options.lineHeight ?? fontSize * 1.2);\n\t\tconst letterSpacing = options.letterSpacing ?? 0;\n\t\tconst { width, height, layout } = SlugGeometry.measure(\n\t\t\ttext,\n\t\t\tfont,\n\t\t\tfontSize,\n\t\t\tletterSpacing,\n\t\t\tlineHeight,\n\t\t\toptions.width,\n\t\t\tundefined,\n\t\t\toptions.direction,\n\t\t);\n\t\tconst scale = fontSize / font.unitsPerEm;\n\t\t// One entry per cluster (a letter with its marks, or a ligature), in\n\t\t// reading order; textIndex maps it back to the string.\n\t\tconst glyphs: MeasuredGlyph[] = [];\n\t\tconst seen = new Set<number>();\n\t\tlet cursor = 0;\n\t\tfor (const g of layout.glyphs) {\n\t\t\tlet index = g.textIndex;\n\t\t\tif (index === undefined) {\n\t\t\t\tconst at = text.indexOf(g.char, cursor);\n\t\t\t\tindex = at >= 0 ? at : cursor;\n\t\t\t}\n\t\t\tif (seen.has(index)) continue;\n\t\t\tseen.add(index);\n\t\t\tcursor = index + g.char.length;\n\t\t\tconst advance =\n\t\t\t\tg.clusterAdvance ?? g.cp.advanceWidth * (g.fontScale ?? scale);\n\t\t\tglyphs.push({\n\t\t\t\tchar: g.char,\n\t\t\t\tindex,\n\t\t\t\tx: g.clusterX ?? g.x,\n\t\t\t\ty: g.y,\n\t\t\t\twidth: advance + letterSpacing,\n\t\t\t\tline: g.lineIndex,\n\t\t\t\t...(g.rtl && { rtl: true }),\n\t\t\t});\n\t\t}\n\t\tconst caretX = (count: number): number => {\n\t\t\tif (count <= 0 || glyphs.length === 0) {\n\t\t\t\tconst first = glyphs[0];\n\t\t\t\tif (!first) return 0;\n\t\t\t\treturn first.rtl ? first.x + first.width - letterSpacing : first.x;\n\t\t\t}\n\t\t\tconst before = glyphs.filter((g) => g.index < count);\n\t\t\tconst last = before[before.length - 1];\n\t\t\tif (!last) return 0;\n\t\t\treturn last.rtl ? last.x : last.x + last.width - letterSpacing;\n\t\t};\n\t\treturn {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tlines: layout.linesCount,\n\t\t\tlineHeight,\n\t\t\tglyphs,\n\t\t\tcaretX,\n\t\t\twidthOf: (count: number) => caretX(count) - (glyphs[0]?.x ?? 0),\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves registered font metadata by family name.\n\t */\n\tpublic static get(family: string): RegisteredFont | undefined {\n\t\treturn FontManager.getInstance().get(family);\n\t}\n\n\t/**\n\t * Checks if a font family has been registered.\n\t */\n\tpublic static has(family: string): boolean {\n\t\treturn FontManager.getInstance().has(family);\n\t}\n\n\t/**\n\t * Returns all currently registered fonts.\n\t */\n\tpublic static getAll(): RegisteredFont[] {\n\t\treturn FontManager.getInstance().getAll();\n\t}\n\n\t/**\n\t * Returns relative or absolute file paths of all registered fonts for composition spec serialization.\n\t */\n\tpublic static getRegisteredFontPaths(): string[] {\n\t\treturn FontManager.getInstance().getRegisteredFontPaths();\n\t}\n\n\t/**\n\t * Clears all registered fonts from the manager.\n\t */\n\tpublic static clear(): void {\n\t\tFontManager.getInstance().clear();\n\t}\n\n\t/**\n\t * Instance registration method with format validation and Slug WebGPU cache population.\n\t */\n\tpublic async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\tlet family: string | undefined;\n\t\tlet rawSource: string | Uint8Array;\n\t\tlet weight: number | string | undefined;\n\t\tlet style: \"normal\" | \"italic\" | \"oblique\" | undefined;\n\n\t\tif (\n\t\t\ttypeof optionsOrFamilyOrSource === \"object\" &&\n\t\t\toptionsOrFamilyOrSource !== null\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource.family;\n\t\t\trawSource = optionsOrFamilyOrSource.source;\n\t\t\tweight = optionsOrFamilyOrSource.weight;\n\t\t\tstyle = optionsOrFamilyOrSource.style;\n\t\t} else if (\n\t\t\ttypeof optionsOrFamilyOrSource === \"string\" &&\n\t\t\tsource !== undefined\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource;\n\t\t\trawSource = source;\n\t\t} else if (typeof optionsOrFamilyOrSource === \"string\") {\n\t\t\tfamily = undefined;\n\t\t\trawSource = optionsOrFamilyOrSource;\n\t\t} else {\n\t\t\tthrow new TypeError(\"Invalid arguments passed to FontManager.register\");\n\t\t}\n\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(rawSource);\n\t\tconst sourceLabel =\n\t\t\tfilePath ?? (typeof rawSource === \"string\" ? rawSource : \"Uint8Array\");\n\t\tconst format = validateFontBinaryHeader(buffer, sourceLabel);\n\n\t\tlet parsedFontkit: fontkit.Font;\n\t\ttry {\n\t\t\tconst parsed = fontkit.create(buffer as unknown as Buffer);\n\t\t\tif (\n\t\t\t\tparsed &&\n\t\t\t\t\"fonts\" in parsed &&\n\t\t\t\tArray.isArray(parsed.fonts) &&\n\t\t\t\tparsed.fonts.length > 0\n\t\t\t) {\n\t\t\t\tparsedFontkit = parsed.fonts[0] as fontkit.Font;\n\t\t\t} else {\n\t\t\t\tparsedFontkit = parsed as fontkit.Font;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to parse TrueType/OpenType font binary for \"${sourceLabel}\": ${msg}`,\n\t\t\t);\n\t\t}\n\n\t\tconst detectedFamily =\n\t\t\tparsedFontkit.familyName ||\n\t\t\tparsedFontkit.postscriptName ||\n\t\t\tpath.parse(sourceLabel).name;\n\t\tconst resolvedFamily = family?.trim() || detectedFamily;\n\n\t\tconst registered: RegisteredFont = {\n\t\t\tfamily: resolvedFamily,\n\t\t\tsource: rawSource,\n\t\t\tfilePath,\n\t\t\tformat,\n\t\t\tpostscriptName: parsedFontkit.postscriptName,\n\t\t\tunitsPerEm: parsedFontkit.unitsPerEm,\n\t\t\tweight,\n\t\t\tstyle,\n\t\t};\n\n\t\tthis.fonts.set(resolvedFamily, registered);\n\n\t\tsetRegisteredFontSource(resolvedFamily, filePath ?? rawSource);\n\t\t// Populate headless font registries\n\t\tif (filePath) {\n\t\t\tawait registerHeadlessFont(resolvedFamily, filePath);\n\t\t}\n\t\tSlugFontCache.setParsed(resolvedFamily, parsedFontkit);\n\n\t\treturn registered;\n\t}\n\n\tpublic get(family: string): RegisteredFont | undefined {\n\t\treturn this.fonts.get(family);\n\t}\n\n\tpublic has(family: string): boolean {\n\t\treturn this.fonts.has(family);\n\t}\n\n\tpublic getAll(): RegisteredFont[] {\n\t\treturn Array.from(this.fonts.values());\n\t}\n\n\tpublic getRegisteredFontPaths(): string[] {\n\t\tconst paths: string[] = [];\n\t\tfor (const font of this.fonts.values()) {\n\t\t\tif (font.filePath) {\n\t\t\t\tpaths.push(font.filePath);\n\t\t\t} else if (typeof font.source === \"string\") {\n\t\t\t\tpaths.push(font.source);\n\t\t\t}\n\t\t}\n\t\treturn paths;\n\t}\n\n\tpublic clear(): void {\n\t\tthis.fonts.clear();\n\t}\n}\n"],"mappings":";;;;;;AAiCA,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AAExB,SAAS,yBACR,OACA,aAC0B;AAC1B,KAAI,MAAM,SAAS,GAClB,OAAM,IAAI,MACT,4BAA4B,YAAY,gBAAgB,MAAM,OAAO,+DACrE;CAGF,MAAM,OACH,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,KACnB,MAAM,MAAM;AAEd,KACC,QAAQ,mBACR,QAAQ,sBACR,QAAQ,sBACR,QAAQ,gBAER,QAAO;AAGR,KAAI,QAAQ,kBACX,QAAO;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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I,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-DqYgk_1a.mjs","names":[],"sources":["../src/fonts/manager.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n\tregisterHeadlessFont,\n\tSlugFontCache,\n\tSlugGeometry,\n\tsetRegisteredFontSource,\n} from \"@framefields/webgpu-renderers\";\nimport * as fontkit from \"fontkit\";\n\nexport interface RegisterFontOptions {\n\tfamily?: string;\n\tsource: string | Uint8Array;\n\tweight?: number | string;\n\tstyle?: \"normal\" | \"italic\" | \"oblique\";\n}\n\nexport interface RegisteredFont {\n\tfamily: string;\n\tsource: string | Uint8Array;\n\tfilePath?: string;\n\tformat: \"truetype\" | \"opentype\";\n\tpostscriptName?: string;\n\tunitsPerEm?: number;\n\tweight?: number | string;\n\tstyle?: string;\n}\n\ninterface ResolvedSource {\n\tbuffer: Uint8Array;\n\tfilePath?: string;\n}\n\nconst SFNT_TRUETYPE_1 = 0x00010000;\nconst SFNT_TRUETYPE_TRUE = 0x74727565; // 'true'\nconst SFNT_TRUETYPE_TYP1 = 0x74797031; // 'typ1'\nconst SFNT_OPENTYPE_CFF = 0x4f54544f; // 'OTTO'\nconst SFNT_COLLECTION = 0x74746366; // 'ttcf'\n\nfunction validateFontBinaryHeader(\n\tbytes: Uint8Array,\n\tsourceLabel: string,\n): \"truetype\" | \"opentype\" {\n\tif (bytes.length < 12) {\n\t\tthrow new Error(\n\t\t\t`Invalid font binary for \"${sourceLabel}\": File size (${bytes.length} bytes) is too small to be a valid TrueType or OpenType font.`,\n\t\t);\n\t}\n\n\tconst tag =\n\t\t((bytes[0] ?? 0) << 24) |\n\t\t((bytes[1] ?? 0) << 16) |\n\t\t((bytes[2] ?? 0) << 8) |\n\t\t(bytes[3] ?? 0);\n\n\tif (\n\t\ttag === SFNT_TRUETYPE_1 ||\n\t\ttag === SFNT_TRUETYPE_TRUE ||\n\t\ttag === SFNT_TRUETYPE_TYP1 ||\n\t\ttag === SFNT_COLLECTION\n\t) {\n\t\treturn \"truetype\";\n\t}\n\n\tif (tag === SFNT_OPENTYPE_CFF) {\n\t\treturn \"opentype\";\n\t}\n\n\tconst hexTag = (tag >>> 0).toString(16).padStart(8, \"0\");\n\tthrow new Error(\n\t\t`Invalid font format for \"${sourceLabel}\": Expected a valid TrueType (.ttf) or OpenType (.otf) font binary. Found header tag: 0x${hexTag}.`,\n\t);\n}\n\nasync function resolveSourceBuffer(\n\tsource: string | Uint8Array,\n): Promise<ResolvedSource> {\n\tif (source instanceof Uint8Array) {\n\t\treturn { buffer: source };\n\t}\n\n\tif (typeof source !== \"string\") {\n\t\tthrow new TypeError(\n\t\t\t`Font source must be a file path string or Uint8Array, received: ${typeof source}`,\n\t\t);\n\t}\n\n\tlet cleanPath = source;\n\tif (cleanPath.startsWith(\"http://\") || cleanPath.startsWith(\"https://\")) {\n\t\tconst res = await fetch(cleanPath);\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to download font from \"${cleanPath}\": HTTP ${res.status} ${res.statusText}`,\n\t\t\t);\n\t\t}\n\t\tconst arrayBuffer = await res.arrayBuffer();\n\t\treturn {\n\t\t\tbuffer: new Uint8Array(arrayBuffer),\n\t\t\tfilePath: cleanPath,\n\t\t};\n\t}\n\n\tif (cleanPath.startsWith(\"file://\")) {\n\t\ttry {\n\t\t\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 interface MeasureTextOptions {\n\tfontFamily: string;\n\tfontSize?: number;\n\tfontWeight?: string | number;\n\t/** Extra px between characters, as on `Layer.text`. */\n\tletterSpacing?: number;\n\t/** Multiplier of fontSize when < 10, else px. Default 1.2. */\n\tlineHeight?: number;\n\t/** Wrap width in px; omit for one line per `\\n`. */\n\twidth?: number;\n\talign?: \"left\" | \"center\" | \"right\";\n\t/** Paragraph base direction, as on `Layer.text`. Default \"auto\". */\n\tdirection?: \"ltr\" | \"rtl\" | \"auto\";\n}\n\nexport interface MeasuredGlyph {\n\tchar: string;\n\t/** Index into the string (code units), matching `text.slice`. */\n\tindex: number;\n\t/** Left edge of the glyph, relative to the text box. */\n\tx: number;\n\t/** Baseline-relative top of the line box. */\n\ty: number;\n\t/** Advance width in px. */\n\twidth: number;\n\tline: number;\n\t/** Part of a right-to-left run: reading continues to the left. */\n\trtl?: boolean;\n}\n\nexport interface TextMetrics {\n\twidth: number;\n\theight: number;\n\tlines: number;\n\t/** Line box height in px. */\n\tlineHeight: number;\n\tglyphs: MeasuredGlyph[];\n\t/**\n\t * X of a caret placed after `count` characters (0 = before the first),\n\t * relative to the text box. In right-to-left text the caret sits on the\n\t * left of the last character. Pair with a `.keys(\"text\", …)` reveal to make\n\t * a cursor follow typing exactly.\n\t */\n\tcaretX(count: number): number;\n\t/** Width of the first `count` characters (same as `caretX` on one line). */\n\twidthOf(count: number): number;\n}\n\nexport class FontManager {\n\tprivate static instance: FontManager | null = null;\n\tprivate readonly fonts = new Map<string, RegisteredFont>();\n\n\tprivate constructor() {}\n\n\t/**\n\t * Returns the singleton FontManager instance.\n\t */\n\tpublic static getInstance(): FontManager {\n\t\tif (!FontManager.instance) {\n\t\t\tFontManager.instance = new FontManager();\n\t\t}\n\t\treturn FontManager.instance;\n\t}\n\n\t/**\n\t * Registers a TrueType/OpenType font into the Framefields engine with validation.\n\t */\n\tpublic static async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\treturn FontManager.getInstance().register(optionsOrFamilyOrSource, source);\n\t}\n\n\t/**\n\t * Sets the color emoji font text draws emoji with, for the preview and the\n\t * export alike: a CBDT/CBLC bitmap font such as Noto Color Emoji, as a file\n\t * path, URL or bytes. framefields ships none; without one, exports draw\n\t * nothing for emoji.\n\t */\n\tpublic static async registerEmojiFont(\n\t\tsource: string | Uint8Array,\n\t): Promise<void> {\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(source);\n\t\tconst label =\n\t\t\tfilePath ?? (typeof source === \"string\" ? source : \"Uint8Array\");\n\t\tvalidateFontBinaryHeader(buffer, label);\n\t\tSlugFontCache.setEmojiFont(buffer, filePath);\n\t}\n\n\t/**\n\t * Measures text with the real font, exactly as `Layer.text` lays it out:\n\t * box size, line count, per-glyph positions and caret offsets. Use it to\n\t * size containers, place cursors, underline a word or center by ink\n\t * instead of guessing advances. The family must be registered first.\n\t *\n\t * ```ts\n\t * const m = FontManager.measure(\"Hello\", { fontFamily: \"Inter\", fontSize: 60 });\n\t * m.width; m.caretX(3); m.glyphs[1].x\n\t * ```\n\t */\n\tpublic static measure(\n\t\ttext: string,\n\t\toptions: MeasureTextOptions,\n\t): TextMetrics {\n\t\tconst fontSize = options.fontSize ?? 48;\n\t\tconst font = SlugFontCache.getFont(\n\t\t\toptions.fontFamily,\n\t\t\toptions.fontWeight,\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tfontSize,\n\t\t);\n\t\tif (!font) {\n\t\t\tthrow new Error(\n\t\t\t\t`FontManager.measure: font \"${options.fontFamily}\" is not registered. ` +\n\t\t\t\t\t\"Call `await FontManager.register(...)` first.\",\n\t\t\t);\n\t\t}\n\t\tconst lineHeight =\n\t\t\toptions.lineHeight !== undefined && options.lineHeight < 10\n\t\t\t\t? options.lineHeight * fontSize\n\t\t\t\t: (options.lineHeight ?? fontSize * 1.2);\n\t\tconst letterSpacing = options.letterSpacing ?? 0;\n\t\tconst { width, height, layout } = SlugGeometry.measure(\n\t\t\ttext,\n\t\t\tfont,\n\t\t\tfontSize,\n\t\t\tletterSpacing,\n\t\t\tlineHeight,\n\t\t\toptions.width,\n\t\t\tundefined,\n\t\t\toptions.direction,\n\t\t);\n\t\tconst scale = fontSize / font.unitsPerEm;\n\t\t// One entry per cluster (a letter with its marks, or a ligature), in\n\t\t// reading order; textIndex maps it back to the string.\n\t\tconst glyphs: MeasuredGlyph[] = [];\n\t\tconst seen = new Set<number>();\n\t\tlet cursor = 0;\n\t\tfor (const g of layout.glyphs) {\n\t\t\tlet index = g.textIndex;\n\t\t\tif (index === undefined) {\n\t\t\t\tconst at = text.indexOf(g.char, cursor);\n\t\t\t\tindex = at >= 0 ? at : cursor;\n\t\t\t}\n\t\t\tif (seen.has(index)) continue;\n\t\t\tseen.add(index);\n\t\t\tcursor = index + g.char.length;\n\t\t\tconst advance =\n\t\t\t\tg.clusterAdvance ?? g.cp.advanceWidth * (g.fontScale ?? scale);\n\t\t\tglyphs.push({\n\t\t\t\tchar: g.char,\n\t\t\t\tindex,\n\t\t\t\tx: g.clusterX ?? g.x,\n\t\t\t\ty: g.y,\n\t\t\t\twidth: advance + letterSpacing,\n\t\t\t\tline: g.lineIndex,\n\t\t\t\t...(g.rtl && { rtl: true }),\n\t\t\t});\n\t\t}\n\t\tconst caretX = (count: number): number => {\n\t\t\tif (count <= 0 || glyphs.length === 0) {\n\t\t\t\tconst first = glyphs[0];\n\t\t\t\tif (!first) return 0;\n\t\t\t\treturn first.rtl ? first.x + first.width - letterSpacing : first.x;\n\t\t\t}\n\t\t\tconst before = glyphs.filter((g) => g.index < count);\n\t\t\tconst last = before[before.length - 1];\n\t\t\tif (!last) return 0;\n\t\t\treturn last.rtl ? last.x : last.x + last.width - letterSpacing;\n\t\t};\n\t\treturn {\n\t\t\twidth,\n\t\t\theight,\n\t\t\tlines: layout.linesCount,\n\t\t\tlineHeight,\n\t\t\tglyphs,\n\t\t\tcaretX,\n\t\t\twidthOf: (count: number) => caretX(count) - (glyphs[0]?.x ?? 0),\n\t\t};\n\t}\n\n\t/**\n\t * Retrieves registered font metadata by family name.\n\t */\n\tpublic static get(family: string): RegisteredFont | undefined {\n\t\treturn FontManager.getInstance().get(family);\n\t}\n\n\t/**\n\t * Checks if a font family has been registered.\n\t */\n\tpublic static has(family: string): boolean {\n\t\treturn FontManager.getInstance().has(family);\n\t}\n\n\t/**\n\t * Returns all currently registered fonts.\n\t */\n\tpublic static getAll(): RegisteredFont[] {\n\t\treturn FontManager.getInstance().getAll();\n\t}\n\n\t/**\n\t * Returns relative or absolute file paths of all registered fonts for composition spec serialization.\n\t */\n\tpublic static getRegisteredFontPaths(): string[] {\n\t\treturn FontManager.getInstance().getRegisteredFontPaths();\n\t}\n\n\t/**\n\t * Clears all registered fonts from the manager.\n\t */\n\tpublic static clear(): void {\n\t\tFontManager.getInstance().clear();\n\t}\n\n\t/**\n\t * Instance registration method with format validation and Slug WebGPU cache population.\n\t */\n\tpublic async register(\n\t\toptionsOrFamilyOrSource: RegisterFontOptions | string,\n\t\tsource?: string | Uint8Array,\n\t): Promise<RegisteredFont> {\n\t\tlet family: string | undefined;\n\t\tlet rawSource: string | Uint8Array;\n\t\tlet weight: number | string | undefined;\n\t\tlet style: \"normal\" | \"italic\" | \"oblique\" | undefined;\n\n\t\tif (\n\t\t\ttypeof optionsOrFamilyOrSource === \"object\" &&\n\t\t\toptionsOrFamilyOrSource !== null\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource.family;\n\t\t\trawSource = optionsOrFamilyOrSource.source;\n\t\t\tweight = optionsOrFamilyOrSource.weight;\n\t\t\tstyle = optionsOrFamilyOrSource.style;\n\t\t} else if (\n\t\t\ttypeof optionsOrFamilyOrSource === \"string\" &&\n\t\t\tsource !== undefined\n\t\t) {\n\t\t\tfamily = optionsOrFamilyOrSource;\n\t\t\trawSource = source;\n\t\t} else if (typeof optionsOrFamilyOrSource === \"string\") {\n\t\t\tfamily = undefined;\n\t\t\trawSource = optionsOrFamilyOrSource;\n\t\t} else {\n\t\t\tthrow new TypeError(\"Invalid arguments passed to FontManager.register\");\n\t\t}\n\n\t\tconst { buffer, filePath } = await resolveSourceBuffer(rawSource);\n\t\tconst sourceLabel =\n\t\t\tfilePath ?? (typeof rawSource === \"string\" ? rawSource : \"Uint8Array\");\n\t\tconst format = validateFontBinaryHeader(buffer, sourceLabel);\n\n\t\tlet parsedFontkit: fontkit.Font;\n\t\ttry {\n\t\t\tconst parsed = fontkit.create(buffer as unknown as Buffer);\n\t\t\tif (\n\t\t\t\tparsed &&\n\t\t\t\t\"fonts\" in parsed &&\n\t\t\t\tArray.isArray(parsed.fonts) &&\n\t\t\t\tparsed.fonts.length > 0\n\t\t\t) {\n\t\t\t\tparsedFontkit = parsed.fonts[0] as fontkit.Font;\n\t\t\t} else {\n\t\t\t\tparsedFontkit = parsed as fontkit.Font;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to parse TrueType/OpenType font binary for \"${sourceLabel}\": ${msg}`,\n\t\t\t);\n\t\t}\n\n\t\tconst detectedFamily =\n\t\t\tparsedFontkit.familyName ||\n\t\t\tparsedFontkit.postscriptName ||\n\t\t\tpath.parse(sourceLabel).name;\n\t\tconst resolvedFamily = family?.trim() || detectedFamily;\n\n\t\tconst registered: RegisteredFont = {\n\t\t\tfamily: resolvedFamily,\n\t\t\tsource: rawSource,\n\t\t\tfilePath,\n\t\t\tformat,\n\t\t\tpostscriptName: parsedFontkit.postscriptName,\n\t\t\tunitsPerEm: parsedFontkit.unitsPerEm,\n\t\t\tweight,\n\t\t\tstyle,\n\t\t};\n\n\t\tthis.fonts.set(resolvedFamily, registered);\n\n\t\tsetRegisteredFontSource(resolvedFamily, filePath ?? rawSource);\n\t\t// Populate headless font registries\n\t\tif (filePath) {\n\t\t\tawait registerHeadlessFont(resolvedFamily, filePath);\n\t\t}\n\t\tSlugFontCache.setParsed(resolvedFamily, parsedFontkit);\n\n\t\treturn registered;\n\t}\n\n\tpublic get(family: string): RegisteredFont | undefined {\n\t\treturn this.fonts.get(family);\n\t}\n\n\tpublic has(family: string): boolean {\n\t\treturn this.fonts.has(family);\n\t}\n\n\tpublic getAll(): RegisteredFont[] {\n\t\treturn Array.from(this.fonts.values());\n\t}\n\n\tpublic getRegisteredFontPaths(): string[] {\n\t\tconst paths: string[] = [];\n\t\tfor (const font of this.fonts.values()) {\n\t\t\tif (font.filePath) {\n\t\t\t\tpaths.push(font.filePath);\n\t\t\t} else if (typeof font.source === \"string\") {\n\t\t\t\tpaths.push(font.source);\n\t\t\t}\n\t\t}\n\t\treturn paths;\n\t}\n\n\tpublic clear(): void {\n\t\tthis.fonts.clear();\n\t}\n}\n"],"mappings":";;;;;;AAiCA,MAAM,kBAAkB;AACxB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AAExB,SAAS,yBACR,OACA,aAC0B;AAC1B,KAAI,MAAM,SAAS,GAClB,OAAM,IAAI,MACT,4BAA4B,YAAY,gBAAgB,MAAM,OAAO,+DACrE;CAGF,MAAM,OACH,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,MAClB,MAAM,MAAM,MAAM,KACnB,MAAM,MAAM;AAEd,KACC,QAAQ,mBACR,QAAQ,sBACR,QAAQ,sBACR,QAAQ,gBAER,QAAO;AAGR,KAAI,QAAQ,kBACX,QAAO;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,C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AE;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 { Fn as signalRegistry } from "./dist-
|
|
1
|
+
import { Fn as signalRegistry } from "./dist-Bf0H4lp1.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../node-sdk/dist/gpu.mjs
|
|
4
4
|
const TRANSPARENT = {
|
|
@@ -212,4 +212,4 @@ function drawFullscreenPass(encoder, target, pipeline, bindGroups) {
|
|
|
212
212
|
|
|
213
213
|
//#endregion
|
|
214
214
|
export { createFullscreenPipeline as a, drawTextureToTarget as c, signalTextureView as d, signalTiming as f, beginTargetPass as i, fragmentBindGroupLayout as l, PREMULTIPLIED_BLEND as n, drawChildToTexture as o, texturesLayout as p, STRAIGHT_ALPHA_BLEND as r, drawFullscreenPass as s, FULLSCREEN_QUAD_WGSL as t, perDevice as u };
|
|
215
|
-
//# sourceMappingURL=gpu-
|
|
215
|
+
//# sourceMappingURL=gpu-CevnCkZC.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpu-Dq_uI_00.mjs","names":[],"sources":["../../node-sdk/dist/gpu.mjs"],"sourcesContent":["import { signalRegistry } from \"@framefields/webgpu-renderers\";\n\n//#region renderer/gpu.ts\nconst TRANSPARENT = {\n\tr: 0,\n\tg: 0,\n\tb: 0,\n\ta: 0\n};\n/**\n* Full-screen quad vertex stage: a 4-vertex triangle strip (draw(4)) that\n* hands `in.uv` (0,0 top-left → 1,1 bottom-right) to an `fs` reading `VSOut`.\n*/\nconst FULLSCREEN_QUAD_WGSL = `\nstruct VSOut {\n @builtin(position) pos : vec4<f32>,\n @location(0) uv : vec2<f32>,\n};\n\n@vertex fn vs(@builtin(vertex_index) vi: u32) -> VSOut {\n var pos = array<vec2<f32>, 4>(\n vec2<f32>(-1.0, 1.0),\n vec2<f32>(1.0, 1.0),\n vec2<f32>(-1.0, -1.0),\n vec2<f32>(1.0, -1.0)\n );\n var uv = array<vec2<f32>, 4>(\n vec2<f32>(0.0, 0.0),\n vec2<f32>(1.0, 0.0),\n vec2<f32>(0.0, 1.0),\n vec2<f32>(1.0, 1.0)\n );\n return VSOut(vec4<f32>(pos[vi], 0.0, 1.0), uv[vi]);\n}\n`;\n/** Premultiplied-alpha \"over\" blending. */\nconst PREMULTIPLIED_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** Straight-alpha color over a premultiplied-alpha accumulation. */\nconst STRAIGHT_ALPHA_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"src-alpha\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** A bind group layout whose entries are bound at 0, 1, 2… in order. */\nfunction fragmentBindGroupLayout(device, bindings, label) {\n\treturn device.createBindGroupLayout({\n\t\t...label && { label },\n\t\tentries: bindings.map((binding, index) => {\n\t\t\tif (binding === \"uniform\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tbuffer: { type: \"uniform\" }\n\t\t\t};\n\t\t\tif (binding === \"texture\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\ttexture: { sampleType: \"float\" }\n\t\t\t};\n\t\t\tif (binding === \"sampler\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tsampler: { type: \"filtering\" }\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\t...binding,\n\t\t\t\tbinding: index\n\t\t\t};\n\t\t})\n\t});\n}\n/** `count` float textures followed by one filtering sampler. */\nfunction texturesLayout(device, count) {\n\treturn fragmentBindGroupLayout(device, [...Array(count).fill(\"texture\"), \"sampler\"]);\n}\n/** Memoizes `create` per GPUDevice (resources can't cross devices). */\nfunction perDevice(create) {\n\tconst cache = /* @__PURE__ */ new WeakMap();\n\treturn (device) => {\n\t\tlet value = cache.get(device);\n\t\tif (value === void 0) {\n\t\t\tvalue = create(device);\n\t\t\tcache.set(device, value);\n\t\t}\n\t\treturn value;\n\t};\n}\n/** A triangle-strip pipeline drawing one full-screen quad (`draw(4)`). */\nfunction createFullscreenPipeline(device, options) {\n\tconst { module, format, blend } = options;\n\treturn device.createRenderPipeline({\n\t\t...options.label && { label: options.label },\n\t\tlayout: Array.isArray(options.layouts) ? device.createPipelineLayout({ bindGroupLayouts: options.layouts }) : options.layouts,\n\t\tvertex: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.vertexEntryPoint ?? \"vs\"\n\t\t},\n\t\tfragment: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.fragmentEntryPoint ?? \"fs\",\n\t\t\ttargets: [blend ? {\n\t\t\t\tformat,\n\t\t\t\tblend\n\t\t\t} : { format }]\n\t\t},\n\t\tprimitive: { topology: \"triangle-strip\" }\n\t});\n}\n/**\n* Renders `child` into a cleared temporary texture with an identity\n* transform and a full-size scissor, and returns that texture.\n*/\nasync function drawChildToTexture(args, child, options = {}) {\n\tconst { ctx, encoder, props } = args;\n\tconst width = options.width ?? args.targetWidth;\n\tconst height = options.height ?? args.targetHeight;\n\tconst texture = ctx.renderer.getTemporaryTexture(width, height, [\n\t\t...props.excludeTextures || [],\n\t\targs.targetTexture,\n\t\t...options.exclude ?? []\n\t]);\n\tconst view = texture.createView();\n\tctx.renderer.beginFrame(encoder, view, TRANSPARENT, width, height, \"clear\").end();\n\tctx.renderer.pushScissor({\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t});\n\tctx.renderer.pushIdentity();\n\tawait args.drawChild(child, options.props ?? {\n\t\t...props,\n\t\tvirtualMedia: child\n\t}, view, texture, width, height);\n\tctx.renderer.popTransform();\n\tctx.renderer.popScissor();\n\treturn {\n\t\ttexture,\n\t\tview\n\t};\n}\n/**\n* Opens a \"load\" pass on the node's target and makes it the node's current\n* pass (the caller hands it back to the compositor).\n*/\nfunction beginTargetPass(args, width = args.targetWidth, height = args.targetHeight) {\n\tconst pass = args.ctx.renderer.beginFrame(args.encoder, args.targetView, TRANSPARENT, width, height, \"load\");\n\targs.pass = pass;\n\treturn pass;\n}\n/** Draws `texture` over the whole target at `opacity` (the node's output). */\nfunction drawTextureToTarget(args, texture, opacity = 1) {\n\tconst { targetWidth: width, targetHeight: height } = args;\n\targs.ctx.renderer.drawTexture(beginTargetPass(args), texture, {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t}, { opacity });\n}\n/** Clock a signal texture is evaluated at, in seconds. */\nfunction signalTiming(props, frame, fps, fallbackDurationSeconds = 0) {\n\tconst metadataDurationMs = props.virtualMedia?.metadata?.durationMs;\n\treturn {\n\t\telapsedSeconds: props.elapsedMs !== void 0 ? props.elapsedMs / 1e3 : frame / fps,\n\t\tdurationSeconds: metadataDurationMs ? metadataDurationMs / 1e3 : props.durationMs !== void 0 ? props.durationMs / 1e3 : fallbackDurationSeconds\n\t};\n}\n/**\n* The texture a bound parameter samples: its own GPU binding, the signal's\n* texture (cached under `sd.nodeId`, else `fallbackId`), or a 1×1 dummy.\n*/\nfunction signalTextureView(sc, param, fallbackId) {\n\tconst { args } = sc;\n\tif (param.gpuTextureView) return param.gpuTextureView;\n\tif (param.hasStaticSig && param.sd) return signalRegistry.getOrCreate2DTextureView(args.ctx.device, args.encoder, param.sd.nodeId ?? fallbackId, sc.elapsedSeconds, sc.durationSeconds, param.sd, sc.width, sc.height, args.props.renderId, sc.frame, sc.fps);\n\treturn signalRegistry.getDummy1x1TextureView(args.ctx.device);\n}\n/** Clears `target` to transparent and draws one full-screen quad into it. */\nfunction drawFullscreenPass(encoder, target, pipeline, bindGroups) {\n\tconst pass = encoder.beginRenderPass({ colorAttachments: [{\n\t\tview: target,\n\t\tloadOp: \"clear\",\n\t\tstoreOp: \"store\",\n\t\tclearValue: TRANSPARENT\n\t}] });\n\tpass.setPipeline(pipeline);\n\tbindGroups.forEach((group, index) => {\n\t\tpass.setBindGroup(index, group);\n\t});\n\tpass.draw(4);\n\tpass.end();\n}\n\n//#endregion\nexport { FULLSCREEN_QUAD_WGSL, PREMULTIPLIED_BLEND, STRAIGHT_ALPHA_BLEND, beginTargetPass, createFullscreenPipeline, drawChildToTexture, drawFullscreenPass, drawTextureToTarget, fragmentBindGroupLayout, perDevice, signalTextureView, signalTiming, texturesLayout };\n//# sourceMappingURL=gpu.mjs.map"],"mappings":";;;AAGA,MAAM,cAAc;CACnB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH;;;;;AAKD,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;AAuB7B,MAAM,sBAAsB;CAC3B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,MAAM,uBAAuB;CAC5B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,SAAS,wBAAwB,QAAQ,UAAU,OAAO;AACzD,QAAO,OAAO,sBAAsB;EACnC,GAAG,SAAS,EAAE,OAAO;EACrB,SAAS,SAAS,KAAK,SAAS,UAAU;AACzC,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAA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;AAMF,SAAS,kBAAkB,IAAI,OAAO,YAAY;CACjD,MAAM,EAAE,SAAS;AACjB,KAAI,MAAM,eAAgB,QAAO,MAAM;AACvC,KAAI,MAAM,gBAAgB,MAAM,GAAI,QAAO,eAAe,yBAAyB,KAAK,IAAI,QAAQ,KAAK,SAAS,MAAM,GAAG,UAAU,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,MAAM,IAAI,GAAG,OAAO,GAAG,QAAQ,KAAK,MAAM,UAAU,GAAG,OAAO,GAAG,IAAI;AAC7P,QAAO,eAAe,uBAAuB,KAAK,IAAI,OAAO;;;AAG9D,SAAS,mBAAmB,SAAS,QAAQ,UAAU,YAAY;CAClE,MAAM,OAAO,QAAQ,gBAAgB,EAAE,kBAAkB,CAAC;EACzD,MAAM;EACN,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,CAAC,EAAE,CAAC;AACL,MAAK,YAAY,SAAS;AAC1B,YAAW,SAAS,OAAO,UAAU;AACpC,OAAK,aAAa,OAAO,MAAM;GAC9B;AACF,MAAK,KAAK,EAAE;AACZ,MAAK,KAAK"}
|
|
1
|
+
{"version":3,"file":"gpu-CevnCkZC.mjs","names":[],"sources":["../../node-sdk/dist/gpu.mjs"],"sourcesContent":["import { signalRegistry } from \"@framefields/webgpu-renderers\";\n\n//#region renderer/gpu.ts\nconst TRANSPARENT = {\n\tr: 0,\n\tg: 0,\n\tb: 0,\n\ta: 0\n};\n/**\n* Full-screen quad vertex stage: a 4-vertex triangle strip (draw(4)) that\n* hands `in.uv` (0,0 top-left → 1,1 bottom-right) to an `fs` reading `VSOut`.\n*/\nconst FULLSCREEN_QUAD_WGSL = `\nstruct VSOut {\n @builtin(position) pos : vec4<f32>,\n @location(0) uv : vec2<f32>,\n};\n\n@vertex fn vs(@builtin(vertex_index) vi: u32) -> VSOut {\n var pos = array<vec2<f32>, 4>(\n vec2<f32>(-1.0, 1.0),\n vec2<f32>(1.0, 1.0),\n vec2<f32>(-1.0, -1.0),\n vec2<f32>(1.0, -1.0)\n );\n var uv = array<vec2<f32>, 4>(\n vec2<f32>(0.0, 0.0),\n vec2<f32>(1.0, 0.0),\n vec2<f32>(0.0, 1.0),\n vec2<f32>(1.0, 1.0)\n );\n return VSOut(vec4<f32>(pos[vi], 0.0, 1.0), uv[vi]);\n}\n`;\n/** Premultiplied-alpha \"over\" blending. */\nconst PREMULTIPLIED_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** Straight-alpha color over a premultiplied-alpha accumulation. */\nconst STRAIGHT_ALPHA_BLEND = {\n\tcolor: {\n\t\tsrcFactor: \"src-alpha\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t},\n\talpha: {\n\t\tsrcFactor: \"one\",\n\t\tdstFactor: \"one-minus-src-alpha\",\n\t\toperation: \"add\"\n\t}\n};\n/** A bind group layout whose entries are bound at 0, 1, 2… in order. */\nfunction fragmentBindGroupLayout(device, bindings, label) {\n\treturn device.createBindGroupLayout({\n\t\t...label && { label },\n\t\tentries: bindings.map((binding, index) => {\n\t\t\tif (binding === \"uniform\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tbuffer: { type: \"uniform\" }\n\t\t\t};\n\t\t\tif (binding === \"texture\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\ttexture: { sampleType: \"float\" }\n\t\t\t};\n\t\t\tif (binding === \"sampler\") return {\n\t\t\t\tbinding: index,\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\tsampler: { type: \"filtering\" }\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tvisibility: GPUShaderStage.FRAGMENT,\n\t\t\t\t...binding,\n\t\t\t\tbinding: index\n\t\t\t};\n\t\t})\n\t});\n}\n/** `count` float textures followed by one filtering sampler. */\nfunction texturesLayout(device, count) {\n\treturn fragmentBindGroupLayout(device, [...Array(count).fill(\"texture\"), \"sampler\"]);\n}\n/** Memoizes `create` per GPUDevice (resources can't cross devices). */\nfunction perDevice(create) {\n\tconst cache = /* @__PURE__ */ new WeakMap();\n\treturn (device) => {\n\t\tlet value = cache.get(device);\n\t\tif (value === void 0) {\n\t\t\tvalue = create(device);\n\t\t\tcache.set(device, value);\n\t\t}\n\t\treturn value;\n\t};\n}\n/** A triangle-strip pipeline drawing one full-screen quad (`draw(4)`). */\nfunction createFullscreenPipeline(device, options) {\n\tconst { module, format, blend } = options;\n\treturn device.createRenderPipeline({\n\t\t...options.label && { label: options.label },\n\t\tlayout: Array.isArray(options.layouts) ? device.createPipelineLayout({ bindGroupLayouts: options.layouts }) : options.layouts,\n\t\tvertex: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.vertexEntryPoint ?? \"vs\"\n\t\t},\n\t\tfragment: {\n\t\t\tmodule,\n\t\t\tentryPoint: options.fragmentEntryPoint ?? \"fs\",\n\t\t\ttargets: [blend ? {\n\t\t\t\tformat,\n\t\t\t\tblend\n\t\t\t} : { format }]\n\t\t},\n\t\tprimitive: { topology: \"triangle-strip\" }\n\t});\n}\n/**\n* Renders `child` into a cleared temporary texture with an identity\n* transform and a full-size scissor, and returns that texture.\n*/\nasync function drawChildToTexture(args, child, options = {}) {\n\tconst { ctx, encoder, props } = args;\n\tconst width = options.width ?? args.targetWidth;\n\tconst height = options.height ?? args.targetHeight;\n\tconst texture = ctx.renderer.getTemporaryTexture(width, height, [\n\t\t...props.excludeTextures || [],\n\t\targs.targetTexture,\n\t\t...options.exclude ?? []\n\t]);\n\tconst view = texture.createView();\n\tctx.renderer.beginFrame(encoder, view, TRANSPARENT, width, height, \"clear\").end();\n\tctx.renderer.pushScissor({\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t});\n\tctx.renderer.pushIdentity();\n\tawait args.drawChild(child, options.props ?? {\n\t\t...props,\n\t\tvirtualMedia: child\n\t}, view, texture, width, height);\n\tctx.renderer.popTransform();\n\tctx.renderer.popScissor();\n\treturn {\n\t\ttexture,\n\t\tview\n\t};\n}\n/**\n* Opens a \"load\" pass on the node's target and makes it the node's current\n* pass (the caller hands it back to the compositor).\n*/\nfunction beginTargetPass(args, width = args.targetWidth, height = args.targetHeight) {\n\tconst pass = args.ctx.renderer.beginFrame(args.encoder, args.targetView, TRANSPARENT, width, height, \"load\");\n\targs.pass = pass;\n\treturn pass;\n}\n/** Draws `texture` over the whole target at `opacity` (the node's output). */\nfunction drawTextureToTarget(args, texture, opacity = 1) {\n\tconst { targetWidth: width, targetHeight: height } = args;\n\targs.ctx.renderer.drawTexture(beginTargetPass(args), texture, {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth,\n\t\theight\n\t}, { opacity });\n}\n/** Clock a signal texture is evaluated at, in seconds. */\nfunction signalTiming(props, frame, fps, fallbackDurationSeconds = 0) {\n\tconst metadataDurationMs = props.virtualMedia?.metadata?.durationMs;\n\treturn {\n\t\telapsedSeconds: props.elapsedMs !== void 0 ? props.elapsedMs / 1e3 : frame / fps,\n\t\tdurationSeconds: metadataDurationMs ? metadataDurationMs / 1e3 : props.durationMs !== void 0 ? props.durationMs / 1e3 : fallbackDurationSeconds\n\t};\n}\n/**\n* The texture a bound parameter samples: its own GPU binding, the signal's\n* texture (cached under `sd.nodeId`, else `fallbackId`), or a 1×1 dummy.\n*/\nfunction signalTextureView(sc, param, fallbackId) {\n\tconst { args } = sc;\n\tif (param.gpuTextureView) return param.gpuTextureView;\n\tif (param.hasStaticSig && param.sd) return signalRegistry.getOrCreate2DTextureView(args.ctx.device, args.encoder, param.sd.nodeId ?? fallbackId, sc.elapsedSeconds, sc.durationSeconds, param.sd, sc.width, sc.height, args.props.renderId, sc.frame, sc.fps);\n\treturn signalRegistry.getDummy1x1TextureView(args.ctx.device);\n}\n/** Clears `target` to transparent and draws one full-screen quad into it. */\nfunction drawFullscreenPass(encoder, target, pipeline, bindGroups) {\n\tconst pass = encoder.beginRenderPass({ colorAttachments: [{\n\t\tview: target,\n\t\tloadOp: \"clear\",\n\t\tstoreOp: \"store\",\n\t\tclearValue: TRANSPARENT\n\t}] });\n\tpass.setPipeline(pipeline);\n\tbindGroups.forEach((group, index) => {\n\t\tpass.setBindGroup(index, group);\n\t});\n\tpass.draw(4);\n\tpass.end();\n}\n\n//#endregion\nexport { FULLSCREEN_QUAD_WGSL, PREMULTIPLIED_BLEND, STRAIGHT_ALPHA_BLEND, beginTargetPass, createFullscreenPipeline, drawChildToTexture, drawFullscreenPass, drawTextureToTarget, fragmentBindGroupLayout, perDevice, signalTextureView, signalTiming, texturesLayout };\n//# sourceMappingURL=gpu.mjs.map"],"mappings":";;;AAGA,MAAM,cAAc;CACnB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH;;;;;AAKD,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;AAuB7B,MAAM,sBAAsB;CAC3B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,MAAM,uBAAuB;CAC5B,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACX;CACD;;AAED,SAAS,wBAAwB,QAAQ,UAAU,OAAO;AACzD,QAAO,OAAO,sBAAsB;EACnC,GAAG,SAAS,EAAE,OAAO;EACrB,SAAS,SAAS,KAAK,SAAS,UAAU;AACzC,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,QAAQ,EAAE,MAAM,WAAW;IAC3B;AACD,OAAI,YAAY,UAAW,QAAO;IACjC,SAAS;IACT,YAAY,eAAe;IAC3B,SAAS,EAAE,YAAY,SAAS;IA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GAAI,QAAO,eAAe,yBAAyB,KAAK,IAAI,QAAQ,KAAK,SAAS,MAAM,GAAG,UAAU,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,MAAM,IAAI,GAAG,OAAO,GAAG,QAAQ,KAAK,MAAM,UAAU,GAAG,OAAO,GAAG,IAAI;AAC7P,QAAO,eAAe,uBAAuB,KAAK,IAAI,OAAO;;;AAG9D,SAAS,mBAAmB,SAAS,QAAQ,UAAU,YAAY;CAClE,MAAM,OAAO,QAAQ,gBAAgB,EAAE,kBAAkB,CAAC;EACzD,MAAM;EACN,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,CAAC,EAAE,CAAC;AACL,MAAK,YAAY,SAAS;AAC1B,YAAW,SAAS,OAAO,UAAU;AACpC,OAAK,aAAa,OAAO,MAAM;GAC9B;AACF,MAAK,KAAK,EAAE;AACZ,MAAK,KAAK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as HeadlessMediaRenderer } from "./index-
|
|
1
|
+
import { c as HeadlessMediaRenderer } from "./index-KqW22NHL.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/preview/index.d.ts
|
|
4
4
|
/** Where the composition comes from: the module that builds it. */
|
|
@@ -86,4 +86,4 @@ interface PreviewSession {
|
|
|
86
86
|
declare function startPreview(source: PreviewSource, options?: PreviewOptions): Promise<PreviewSession>;
|
|
87
87
|
//#endregion
|
|
88
88
|
export { startPreview as a, PreviewSource as i, PreviewOptions as n, PreviewSession as r, PreviewCloseReason as t };
|
|
89
|
-
//# sourceMappingURL=index-
|
|
89
|
+
//# sourceMappingURL=index-COQTaniR.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-COQTaniR.d.mts","names":[],"sources":["../src/preview/index.ts"],"sourcesContent":[],"mappings":";;;;UAqBiB,aAAA;EAAA;EAqBA,KAAA,EAAA,MAAA,GAnBA,GAmBc;EAoDnB;AAQZ;;;EAIS,MAAA,CAAA,EAAA,MAAA;;AAoCa,UApGL,cAAA,CAoGiB;EACzB;;;;;;;;;;;;;;;;;;;aAjFG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCA,kBAAA;;;;UAQK,cAAA;;WAEP;;UAED,QAAQ;;;;;;;;;;;;;iBAoCK,YAAA,SACb,yBACC,iBACP,QAAQ"}
|
|
@@ -2050,15 +2050,18 @@ interface ParsedGradientStop {
|
|
|
2050
2050
|
/** Straight sRGB 0..1. */
|
|
2051
2051
|
color: Rgba;
|
|
2052
2052
|
}
|
|
2053
|
+
type RadialExtent = "closest-side" | "closest-corner" | "farthest-side" | "farthest-corner";
|
|
2053
2054
|
interface ParsedGradient {
|
|
2054
2055
|
type: GradientType;
|
|
2055
2056
|
/** Linear: CSS angle in degrees (0 = to top, 90 = to right, 180 = to bottom). */
|
|
2056
2057
|
angle: number;
|
|
2057
2058
|
/** Radial / conic center as a fraction of the box (0.5, 0.5 = middle). */
|
|
2058
2059
|
center: [number, number];
|
|
2059
|
-
/** Radial: circle or ellipse sized
|
|
2060
|
+
/** Radial: circle or ellipse, sized by `extent` unless `radius` gives px radii. */
|
|
2060
2061
|
shape: "circle" | "ellipse";
|
|
2061
2062
|
radius?: [number, number];
|
|
2063
|
+
/** Radial size keyword (CSS): where the last stop lands. Default farthest-corner. */
|
|
2064
|
+
extent?: RadialExtent;
|
|
2062
2065
|
/** Conic: start angle in degrees (0 = top, clockwise). */
|
|
2063
2066
|
from: number;
|
|
2064
2067
|
stops: ParsedGradientStop[];
|
|
@@ -2609,15 +2612,15 @@ declare const AnchorGroupingSchema: z.ZodEnum<{
|
|
|
2609
2612
|
}>;
|
|
2610
2613
|
type AnchorGrouping = z.infer<typeof AnchorGroupingSchema>;
|
|
2611
2614
|
declare const AnchorPresetSchema: z.ZodEnum<{
|
|
2612
|
-
|
|
2615
|
+
custom: "custom";
|
|
2613
2616
|
baseline: "baseline";
|
|
2617
|
+
center: "center";
|
|
2614
2618
|
bottom_left: "bottom_left";
|
|
2615
2619
|
bottom_center: "bottom_center";
|
|
2616
2620
|
bottom_right: "bottom_right";
|
|
2617
2621
|
top_left: "top_left";
|
|
2618
2622
|
top_center: "top_center";
|
|
2619
2623
|
top_right: "top_right";
|
|
2620
|
-
custom: "custom";
|
|
2621
2624
|
}>;
|
|
2622
2625
|
type AnchorPreset = z.infer<typeof AnchorPresetSchema>;
|
|
2623
2626
|
declare const TextAnchorConfigSchema: z.ZodObject<{
|
|
@@ -2628,15 +2631,15 @@ declare const TextAnchorConfigSchema: z.ZodObject<{
|
|
|
2628
2631
|
all: "all";
|
|
2629
2632
|
}>>;
|
|
2630
2633
|
preset: z.ZodDefault<z.ZodEnum<{
|
|
2631
|
-
|
|
2634
|
+
custom: "custom";
|
|
2632
2635
|
baseline: "baseline";
|
|
2636
|
+
center: "center";
|
|
2633
2637
|
bottom_left: "bottom_left";
|
|
2634
2638
|
bottom_center: "bottom_center";
|
|
2635
2639
|
bottom_right: "bottom_right";
|
|
2636
2640
|
top_left: "top_left";
|
|
2637
2641
|
top_center: "top_center";
|
|
2638
2642
|
top_right: "top_right";
|
|
2639
|
-
custom: "custom";
|
|
2640
2643
|
}>>;
|
|
2641
2644
|
anchorX: z.ZodDefault<z.ZodNumber>;
|
|
2642
2645
|
anchorY: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2806,9 +2809,9 @@ declare const AudioSpectrumTypographySchema: z.ZodObject<{
|
|
|
2806
2809
|
maxFreqHz: z.ZodDefault<z.ZodNumber>;
|
|
2807
2810
|
scaleAxis: z.ZodDefault<z.ZodEnum<{
|
|
2808
2811
|
y: "y";
|
|
2809
|
-
scaleY: "scaleY";
|
|
2810
|
-
scaleX: "scaleX";
|
|
2811
2812
|
scale: "scale";
|
|
2813
|
+
scaleX: "scaleX";
|
|
2814
|
+
scaleY: "scaleY";
|
|
2812
2815
|
}>>;
|
|
2813
2816
|
minScale: z.ZodDefault<z.ZodNumber>;
|
|
2814
2817
|
maxScale: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2873,15 +2876,15 @@ declare const ExtendedGlyphPropertiesSchema: z.ZodObject<{
|
|
|
2873
2876
|
all: "all";
|
|
2874
2877
|
}>>;
|
|
2875
2878
|
preset: z.ZodDefault<z.ZodEnum<{
|
|
2876
|
-
|
|
2879
|
+
custom: "custom";
|
|
2877
2880
|
baseline: "baseline";
|
|
2881
|
+
center: "center";
|
|
2878
2882
|
bottom_left: "bottom_left";
|
|
2879
2883
|
bottom_center: "bottom_center";
|
|
2880
2884
|
bottom_right: "bottom_right";
|
|
2881
2885
|
top_left: "top_left";
|
|
2882
2886
|
top_center: "top_center";
|
|
2883
2887
|
top_right: "top_right";
|
|
2884
|
-
custom: "custom";
|
|
2885
2888
|
}>>;
|
|
2886
2889
|
anchorX: z.ZodDefault<z.ZodNumber>;
|
|
2887
2890
|
anchorY: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2939,9 +2942,9 @@ declare const ExtendedGlyphPropertiesSchema: z.ZodObject<{
|
|
|
2939
2942
|
maxFreqHz: z.ZodDefault<z.ZodNumber>;
|
|
2940
2943
|
scaleAxis: z.ZodDefault<z.ZodEnum<{
|
|
2941
2944
|
y: "y";
|
|
2942
|
-
scaleY: "scaleY";
|
|
2943
|
-
scaleX: "scaleX";
|
|
2944
2945
|
scale: "scale";
|
|
2946
|
+
scaleX: "scaleX";
|
|
2947
|
+
scaleY: "scaleY";
|
|
2945
2948
|
}>>;
|
|
2946
2949
|
minScale: z.ZodDefault<z.ZodNumber>;
|
|
2947
2950
|
maxScale: z.ZodDefault<z.ZodNumber>;
|
|
@@ -3000,15 +3003,15 @@ declare const AdvancedTextAnimatorSchema: z.ZodObject<{
|
|
|
3000
3003
|
all: "all";
|
|
3001
3004
|
}>>;
|
|
3002
3005
|
preset: z.ZodDefault<z.ZodEnum<{
|
|
3003
|
-
|
|
3006
|
+
custom: "custom";
|
|
3004
3007
|
baseline: "baseline";
|
|
3008
|
+
center: "center";
|
|
3005
3009
|
bottom_left: "bottom_left";
|
|
3006
3010
|
bottom_center: "bottom_center";
|
|
3007
3011
|
bottom_right: "bottom_right";
|
|
3008
3012
|
top_left: "top_left";
|
|
3009
3013
|
top_center: "top_center";
|
|
3010
3014
|
top_right: "top_right";
|
|
3011
|
-
custom: "custom";
|
|
3012
3015
|
}>>;
|
|
3013
3016
|
anchorX: z.ZodDefault<z.ZodNumber>;
|
|
3014
3017
|
anchorY: z.ZodDefault<z.ZodNumber>;
|
|
@@ -3066,9 +3069,9 @@ declare const AdvancedTextAnimatorSchema: z.ZodObject<{
|
|
|
3066
3069
|
maxFreqHz: z.ZodDefault<z.ZodNumber>;
|
|
3067
3070
|
scaleAxis: z.ZodDefault<z.ZodEnum<{
|
|
3068
3071
|
y: "y";
|
|
3069
|
-
scaleY: "scaleY";
|
|
3070
|
-
scaleX: "scaleX";
|
|
3071
3072
|
scale: "scale";
|
|
3073
|
+
scaleX: "scaleX";
|
|
3074
|
+
scaleY: "scaleY";
|
|
3072
3075
|
}>>;
|
|
3073
3076
|
minScale: z.ZodDefault<z.ZodNumber>;
|
|
3074
3077
|
maxScale: z.ZodDefault<z.ZodNumber>;
|
|
@@ -3266,8 +3269,8 @@ declare const TextPathOptionsSchema: z.ZodObject<{
|
|
|
3266
3269
|
forceAlignment: z.ZodDefault<z.ZodBoolean>;
|
|
3267
3270
|
loop: z.ZodDefault<z.ZodBoolean>;
|
|
3268
3271
|
baselineOffset: z.ZodDefault<z.ZodEnum<{
|
|
3269
|
-
center: "center";
|
|
3270
3272
|
baseline: "baseline";
|
|
3273
|
+
center: "center";
|
|
3271
3274
|
ascender: "ascender";
|
|
3272
3275
|
descender: "descender";
|
|
3273
3276
|
}>>;
|
|
@@ -3783,8 +3786,8 @@ declare const EnhancedTextNodeSchema: z.ZodObject<{
|
|
|
3783
3786
|
forceAlignment: z.ZodDefault<z.ZodBoolean>;
|
|
3784
3787
|
loop: z.ZodDefault<z.ZodBoolean>;
|
|
3785
3788
|
baselineOffset: z.ZodDefault<z.ZodEnum<{
|
|
3786
|
-
center: "center";
|
|
3787
3789
|
baseline: "baseline";
|
|
3790
|
+
center: "center";
|
|
3788
3791
|
ascender: "ascender";
|
|
3789
3792
|
descender: "descender";
|
|
3790
3793
|
}>>;
|
|
@@ -6053,5 +6056,5 @@ declare global {
|
|
|
6053
6056
|
var __GATEWAI_DELAYS__: Set<number>;
|
|
6054
6057
|
}
|
|
6055
6058
|
//#endregion
|
|
6056
|
-
export { AdvancedTextAnimatorSchema as $, SineSignalOptions as $a, MediaSourceInput as $i, samplePathChainGeometry as $n, frameSignal as $o, DATA_TYPE_EXTENSIONS as $r, TextCursorConfig as $t, SlugFontCache as A, Pixels as Aa, GateSignalOptions as Ai, buildPathLUT as An, VisionConfig as Ao, resolveEnvironment as Ar, radians as As, LongShadowConfig as At, loadModel3D as B, SignalBuilderConfig as Ba, JsonArray as Bi, evaluateMarqueeOffset as Bn, computed as Bo, BaseVideoLayerPropsSchema as Br, seconds as Bs, SelectorShape as Bt, Renderer3D as C, ObjectBoundingBox as Ca, FileData as Ci, VariableFontAxesSchema as Cn, VideoLayerTypeSchema as Co, Path3DPoint as Cr, normalized as Cs, GlyphAnchorGroupingSchema as Ct, SignalRegistry as D, OutputItemSchema as Da, FrameIndex as Di, VolumetricFormationConfigSchema as Dn, VideoTimingPropsSchema as Do, Vec3 as Dr, pixels as Ds, KineticMarqueeConfigSchema as Dt, ShadowPipeline as E, OutputItem as Ea, FrameContext as Ei, VolumetricFormationConfig as En, VideoTextPropsSchema as Eo, ShadowUniformInfo as Er, parseCssGradient as Es, KineticMarqueeConfig as Et, describeGpu as F, RenderDiagnostic as Fa, GradientType as Fi, distanceToCurveParameter as Fn, XYPosition as Fo, AudioExtractorSignalData as Fr, resolveNumber as Fs, PathChainLUTEntry as Ft, parseOBJ as G, SignalDataSchema as Ga, MAX_GRADIENT_STOPS as Gi, evaluateVolumetricFormation as Gn, degrees as Go, CannyOptions as Gr, stampResult as Gs, SkewPropertiesSchema as Gt, lutStore as H, SignalChannelMetaSchema as Ha, JsonValue as Hi, evaluateSkewMatrix as Hn, createOutputItemSchema as Ho, CAPTION_LAYER_DEFAULTS as Hr, signal as Hs, SelectorUnits as Ht, ensureDevice as I, Rgba as Ia, HandleId as Ii, ellipseToCubicBeziers as In, appendOperation as Io, AudioExtractorSignalDataSchema as Ir, resolveParam as Is, SelectorBasedOn as It, textureCache as J, SignalMathData as Ja, MediaMetadataSchema as Ji, getScramblePool as Jn, findSourceAsset as Jo, ConfigHandle as Jr, updateClockSignals as Js, SpringPhysics as Jt, shaderStore as K, SignalGateData as Ka, MIME_TYPES as Ki, generateArcLengthLUT as Kn, deserializeSignalData as Ko, Color$1 as Kr, takeRenderDiagnostics as Ks, Spatial3DProperties as Kt, initHeadlessWebGPU as L, Seconds as La, HandleLabel as Li, evaluateCubicBezier as Ln, assertNever as Lo, BaseMediaOperationProps as Lr, resolveString as Ls, SelectorBasedOnSchema as Lt, SphereGeometryOptions as M, ProgrammaticSignal as Ma, GeneratorSignalDataSchema as Mi, computeLineLeadingDisplacement as Mn, VisionTask as Mo, AnimationTypeSchema as Mr, reportRenderDiagnostic as Ms, ParticleDissolveConfig as Mt, WebGPUAudioProcessor as N, ProgrammaticSignalOptions as Na, GlobalCompositeOperation as Ni, computeRangeSelectorWeight as Nn, VisionVariant as No, AnyOutputUnion as Nr, resolveBoolean as Ns, ParticleDissolveConfigSchema as Nt, SignalRegistryResource as O, ParsedGradient as Oa, FrameSignal as Oi, VolumetricFormationMode as On, VirtualMediaData as Oo, Vector3Math as Or, programmaticSignal as Os, LineSpacingDynamics as Ot, buildWGSLSignalFn as P, Radians as Pa, Gradient as Pi, deterministicWigglyNoise as Pn, WritableSignal as Po, AnyOutputUnionSchema as Pr, resolveMediaMimeType as Ps, PathChainLUT as Pt, AdvancedTextAnimatorBuilder as Q, SignalValue as Qa, MediaSourceDescriptor as Qi, sampleCurveGeometry as Qn, frameArraySignal as Qo, ControlNetConditioningOutputs as Qr, TextAnimatorBuilder as Qt, inputStore as R, SegmentationOptions as Ra, HandleType as Ri, evaluateCubicBezierDerivative as Rn, checkNodeResultCache as Ro, BaseMediaOperationPropsSchema as Rr, rgbToOklab as Rs, SelectorMode as Rt, Renderer2D as S, NormalizedLandmarkList as Sa, FileAssetSchema as Si, VariableFontAxes as Sn, VideoLayerType as So, Path3D as Sr, normalizeColorStops as Ss, GlyphAnchorGrouping as St, SSAOPipeline as T, Output$1 as Ta, Fps as Ti, Vec2Schema as Tn, VideoStylePropsSchema as To, ResolvedEnvironment as Tr, parseCssColor as Ts, GlyphAnchorPointSchema as Tt, parseFBX as U, SignalContext as Ua, JsonValueSchema as Ui, evaluateSpringProgress as Un, createVirtualMedia as Uo, COMPOSITE_OPERATIONS as Ur, signalBuilder as Us, SelectorUnitsSchema as Ut, loadOBJ as V, SignalChannelMeta as Va, JsonObject as Vi, evaluateSelectorCombination as Vn, cosineSignal as Vo, Brand as Vr, serializeSignalData as Vs, SelectorShapeSchema as Vt, parseMTL as W, SignalData as Wa, Landmark3D as Wi, evaluateTypewriterState as Wn, dataTypeColors as Wo, COMPOSITOR_DEFAULTS as Wr, sineSignal as Ws, SkewProperties as Wt, AETextAnimatorSchema as X, SignalStats as Xa, MediaOperationSchema as Xi, parseSvgPathToCubicBeziers as Xn, fps as Xo, ConfigSchemaRegistry as Xr, TextAnchorConfig as Xt, AETextAnimator as Y, SignalMathDataSchema as Ya, MediaOperation as Yi, getShuffledOrder as Yn, formatHex as Yo, ConfigHandleSchema as Yr, SpringPhysicsSchema as Yt, AdvancedTextAnimator as Z, SignalStatsSchema as Za, MediaService as Zi, sampleAudioSpectrumScale as Zn, frame as Zo, ConnectedInput as Zr, TextAnchorConfigSchema as Zt, Mesh3DData as _, NodeValidationFn as _a, ExportResultSchema as _i, TextWigglySelectorSchema as _n, TransitionSchema as _o, LightKind as _r, isVirtualMediaData as _s, ExpressionEvaluationContext as _t, AudioMeshDeformPipeline as a, MultiOutputGeneric as aa, DataTypeEnum as ai, TextPathOptionsSchema as an, TensorData as ao, CatmullRomOptions as ar, getMediaType as as, AnimatableGlyphPropsSchema as at, NodeAnimationTrack3D as b, NormalRelightingOptions as ba, FaceLandmarksOptions as bi, TypingCadence as bn, VideoAnimation as bo, Mat4 as br, ms as bs, ExtendedGlyphProperties as bt, BlendMode as c, NodeInputConnection as ca, DeflickerOptions as ci, TextRangeSelector as cn, TensorNode as co, Environment3DFog as cr, handleId as cs, AudioSpectrumTypographySchema as ct, EffectPipeline as d, NodeOperation as da, DetectedObject as di, TextScrambleConfigSchema as dn, TextSpan as do, FrustumPlanes as dr, isCssGradient as ds, CubicBezierSegment as dt, MediaSourceSchema as ea, DEFAULT_DURATION_MS as ei, TextCursorConfigSchema as en, SingleOutputGeneric as eo, waveToCubicBeziers as er, generateId as es, AnchorGrouping as et, GlassPipeline as f, NodeProcessorContext as fa, Effect as fi, TextSelector as fn, TextSpanMark as fo, GPULightData as fr, isEqual as fs, CubicBezierSegmentSchema as ft, Material3D as g, NodeRunFunction as ga, ExportResult as gi, TextWigglySelector as gn, TrackedObject as go, Light3DOptions as gr, isValueSignal as gs, EnhancedTextNodeSchema as gt, MasterAudioEntry as h, NodeResultSchema as ha, EffectDomain as hi, TextSignalSelectorSchema as hn, TimelineTransformSchema as ho, Light3D as hr, isSignal as hs, EnhancedTextNode as ht, AudioLatentTrackCache as i, ModerationUnrefundableError as ia, DataType as ii, TextPathOptions as in, TEXT_LAYER_DEFAULTS as io, CameraShakeOptions as ir, getLeafMediaType as is, AnimatableGlyphProps as it, SlugPipeline as j, PoseSkeletonOptions as ja, GeneratorSignalData as ji, computeAnchorPivotOffset as jn, VisionNodeSpec as jo, AnimationType as jr, registerSignalDependency as js, LongShadowConfigSchema as jt, Skeleton3D as k, ParsedGradientStop as ka, GPUTextureBinding as ki, VolumetricFormationModeSchema as kn, VirtualMediaDataSchema as ko, parseColorToRgb as kr, progressSignal as ks, LineSpacingDynamicsSchema as kt, Bone3D as l, NodeMetadata as la, Degrees as li, TextRangeSelectorSchema as ln, TensorPipelineConfig as lo, Environment3DOptions as lr, handleLabel as ls, ChromaticGlitchConfig as lt, LoadModelOptions as m, NodeResult as ma, EffectConfigValue as mi, TextSignalSelector as mn, TimelineTransform as mo, LIGHT_UNIFORM_SIZE_BYTES as mr, isNormalized as ms, DynamicStrokePropertiesSchema as mt, AudioLatentData as n, Milliseconds as na, DEFAULT_MEDIA_DIMENSION as ni, TextCursorStyleSchema as nn, SourceOperationSchema as no, Camera3D as nr, getFileDataMetadata as ns, AnchorPreset as nt, AudioSignalComputeConfig as o, MultiOutputGenericSchema as oa, DataTypeVal as oi, TextPathSource as on, TensorDimensions as oo, CirclePathOptions as or, getRenderFingerprint as os, ArcLengthLUTEntry as ot, GpuAdapterDescription as p, NodeProcessorParams as pa, EffectConfig as pi, TextSelectorSchema as pn, TimelineSegmentSchema as po, HelixOptions as pr, isFrameIndex as ps, DynamicStrokeProperties as pt, signalRegistry as q, SignalGateDataSchema as qa, MediaMetadata as qi, generatePathSegments as qn, extractSvgDimensions as qo, ColorStopLike as qr, timeSignal as qs, Spatial3DPropertiesSchema as qt, AudioLatentEngine as r, ModerationError as ra, DataForType as ri, TextPathBuilder as rn, StorageService as ro, Camera3DPose as rr, getFingerprint as rs, AnchorPresetSchema as rt, AudioSignalComputePipeline as s, NodeId as sa, DataTypes as si, TextPathSourceSchema as sn, TensorFormat as so, ENVIRONMENT_PRESETS as sr, gradientStopsToOklab as ss, AudioSpectrumTypography as st, AnimationClip3D as t, MeshAudioDeformConfig as ta, DEFAULT_FPS as ti, TextCursorStyle as tn, SingleOutputGenericSchema as to, BezierSegment3D as tr, getActiveMediaMetadata as ts, AnchorGroupingSchema as tt, CylinderGeometryOptions as u, NodeMetadataSchema as ua, DepthNormalsOptions as ui, TextScrambleConfig as un, TextOperationSchema as uo, FrustumPlane as ur, hasOnlySingleSource as us, ChromaticGlitchConfigSchema as ut, Model3DData as v, NodeVisualConfig as va, ExtendedLayer as vi, TypewriterAnimator as vn, TransitionType as vo, LightsUniformData as vr, limitGradientStops as vs, ExpressionSelector as vt, RoundedBoxGeometryOptions as w, OpticalFlowOptions as wa, FileDataSchema as wi, Vec2 as wn, VideoSpatialPropsSchema as wo, Path3DSample as wr, oklabToRgb as ws, GlyphAnchorPoint as wt, RenderContextValue as x, Normalized as xa, FileAsset as xi, TypingCadenceSchema as xn, VideoAnimationSchema as xo, Matrix4Math as xr, nodeId as xs, ExtendedGlyphPropertiesSchema as xt, MotionBlurPipeline as y, NodeVisualConfigSchema as ya, ExtendedLayerSchema as yi, TypewriterAnimatorSchema as yn, TransitionTypeSchema as yo, MAX_LIGHTS as yr, mixColors as ys, ExpressionSelectorSchema as yt, loadFBX as z, Signal as za, HandleTypeVal as zi, evaluateExpressionSelector as zn, computeVideoCropRenderProps as zo, BaseVideoLayerProps as zr, sampleColorStops as zs, SelectorModeSchema as zt };
|
|
6057
|
-
//# sourceMappingURL=index-
|
|
6059
|
+
export { AdvancedTextAnimatorSchema as $, SignalValue as $a, MediaSourceInput as $i, samplePathChainGeometry as $n, frameArraySignal as $o, DATA_TYPE_EXTENSIONS as $r, TextCursorConfig as $t, SlugFontCache as A, Pixels as Aa, GateSignalOptions as Ai, buildPathLUT as An, VirtualMediaDataSchema as Ao, resolveEnvironment as Ar, progressSignal as As, LongShadowConfig as At, loadModel3D as B, Signal as Ba, JsonArray as Bi, evaluateMarqueeOffset as Bn, computeVideoCropRenderProps as Bo, BaseVideoLayerPropsSchema as Br, sampleColorStops as Bs, SelectorShape as Bt, Renderer3D as C, ObjectBoundingBox as Ca, FileData as Ci, VariableFontAxesSchema as Cn, VideoLayerType as Co, Path3DPoint as Cr, normalizeColorStops as Cs, GlyphAnchorGroupingSchema as Ct, SignalRegistry as D, OutputItemSchema as Da, FrameIndex as Di, VolumetricFormationConfigSchema as Dn, VideoTextPropsSchema as Do, Vec3 as Dr, parseCssGradient as Ds, KineticMarqueeConfigSchema as Dt, ShadowPipeline as E, OutputItem as Ea, FrameContext as Ei, VolumetricFormationConfig as En, VideoStylePropsSchema as Eo, ShadowUniformInfo as Er, parseCssColor as Es, KineticMarqueeConfig as Et, describeGpu as F, Radians as Fa, GradientType as Fi, distanceToCurveParameter as Fn, WritableSignal as Fo, AudioExtractorSignalData as Fr, resolveMediaMimeType as Fs, PathChainLUTEntry as Ft, parseOBJ as G, SignalData as Ga, MAX_GRADIENT_STOPS as Gi, evaluateVolumetricFormation as Gn, dataTypeColors as Go, CannyOptions as Gr, sineSignal as Gs, SkewPropertiesSchema as Gt, lutStore as H, SignalChannelMeta as Ha, JsonValue as Hi, evaluateSkewMatrix as Hn, cosineSignal as Ho, CAPTION_LAYER_DEFAULTS as Hr, serializeSignalData as Hs, SelectorUnits as Ht, ensureDevice as I, RenderDiagnostic as Ia, HandleId as Ii, ellipseToCubicBeziers as In, XYPosition as Io, AudioExtractorSignalDataSchema as Ir, resolveNumber as Is, SelectorBasedOn as It, textureCache as J, SignalGateDataSchema as Ja, MediaMetadataSchema as Ji, getScramblePool as Jn, extractSvgDimensions as Jo, ConfigHandle as Jr, timeSignal as Js, SpringPhysics as Jt, shaderStore as K, SignalDataSchema as Ka, MIME_TYPES as Ki, generateArcLengthLUT as Kn, degrees as Ko, Color$1 as Kr, stampResult as Ks, Spatial3DProperties as Kt, initHeadlessWebGPU as L, Rgba as La, HandleLabel as Li, evaluateCubicBezier as Ln, appendOperation as Lo, BaseMediaOperationProps as Lr, resolveParam as Ls, SelectorBasedOnSchema as Lt, SphereGeometryOptions as M, ProgrammaticSignal as Ma, GeneratorSignalDataSchema as Mi, computeLineLeadingDisplacement as Mn, VisionNodeSpec as Mo, AnimationTypeSchema as Mr, registerSignalDependency as Ms, ParticleDissolveConfig as Mt, WebGPUAudioProcessor as N, ProgrammaticSignalOptions as Na, GlobalCompositeOperation as Ni, computeRangeSelectorWeight as Nn, VisionTask as No, AnyOutputUnion as Nr, reportRenderDiagnostic as Ns, ParticleDissolveConfigSchema as Nt, SignalRegistryResource as O, ParsedGradient as Oa, FrameSignal as Oi, VolumetricFormationMode as On, VideoTimingPropsSchema as Oo, Vector3Math as Or, pixels as Os, LineSpacingDynamics as Ot, buildWGSLSignalFn as P, RadialExtent as Pa, Gradient as Pi, deterministicWigglyNoise as Pn, VisionVariant as Po, AnyOutputUnionSchema as Pr, resolveBoolean as Ps, PathChainLUT as Pt, AdvancedTextAnimatorBuilder as Q, SignalStatsSchema as Qa, MediaSourceDescriptor as Qi, sampleCurveGeometry as Qn, frame as Qo, ControlNetConditioningOutputs as Qr, TextAnimatorBuilder as Qt, inputStore as R, Seconds as Ra, HandleType as Ri, evaluateCubicBezierDerivative as Rn, assertNever as Ro, BaseMediaOperationPropsSchema as Rr, resolveString as Rs, SelectorMode as Rt, Renderer2D as S, NormalizedLandmarkList as Sa, FileAssetSchema as Si, VariableFontAxes as Sn, VideoAnimationSchema as So, Path3D as Sr, nodeId as Ss, GlyphAnchorGrouping as St, SSAOPipeline as T, Output$1 as Ta, Fps as Ti, Vec2Schema as Tn, VideoSpatialPropsSchema as To, ResolvedEnvironment as Tr, oklabToRgb as Ts, GlyphAnchorPointSchema as Tt, parseFBX as U, SignalChannelMetaSchema as Ua, JsonValueSchema as Ui, evaluateSpringProgress as Un, createOutputItemSchema as Uo, COMPOSITE_OPERATIONS as Ur, signal as Us, SelectorUnitsSchema as Ut, loadOBJ as V, SignalBuilderConfig as Va, JsonObject as Vi, evaluateSelectorCombination as Vn, computed as Vo, Brand as Vr, seconds as Vs, SelectorShapeSchema as Vt, parseMTL as W, SignalContext as Wa, Landmark3D as Wi, evaluateTypewriterState as Wn, createVirtualMedia as Wo, COMPOSITOR_DEFAULTS as Wr, signalBuilder as Ws, SkewProperties as Wt, AETextAnimatorSchema as X, SignalMathDataSchema as Xa, MediaOperationSchema as Xi, parseSvgPathToCubicBeziers as Xn, formatHex as Xo, ConfigSchemaRegistry as Xr, TextAnchorConfig as Xt, AETextAnimator as Y, SignalMathData as Ya, MediaOperation as Yi, getShuffledOrder as Yn, findSourceAsset as Yo, ConfigHandleSchema as Yr, updateClockSignals as Ys, SpringPhysicsSchema as Yt, AdvancedTextAnimator as Z, SignalStats as Za, MediaService as Zi, sampleAudioSpectrumScale as Zn, fps as Zo, ConnectedInput as Zr, TextAnchorConfigSchema as Zt, Mesh3DData as _, NodeValidationFn as _a, ExportResultSchema as _i, TextWigglySelectorSchema as _n, TrackedObject as _o, LightKind as _r, isValueSignal as _s, ExpressionEvaluationContext as _t, AudioMeshDeformPipeline as a, MultiOutputGeneric as aa, DataTypeEnum as ai, TextPathOptionsSchema as an, TEXT_LAYER_DEFAULTS as ao, CatmullRomOptions as ar, getLeafMediaType as as, AnimatableGlyphPropsSchema as at, NodeAnimationTrack3D as b, NormalRelightingOptions as ba, FaceLandmarksOptions as bi, TypingCadence as bn, TransitionTypeSchema as bo, Mat4 as br, mixColors as bs, ExtendedGlyphProperties as bt, BlendMode as c, NodeInputConnection as ca, DeflickerOptions as ci, TextRangeSelector as cn, TensorFormat as co, Environment3DFog as cr, gradientStopsToOklab as cs, AudioSpectrumTypographySchema as ct, EffectPipeline as d, NodeOperation as da, DetectedObject as di, TextScrambleConfigSchema as dn, TextOperationSchema as do, FrustumPlanes as dr, hasOnlySingleSource as ds, CubicBezierSegment as dt, MediaSourceSchema as ea, DEFAULT_DURATION_MS as ei, TextCursorConfigSchema as en, SineSignalOptions as eo, waveToCubicBeziers as er, frameSignal as es, AnchorGrouping as et, GlassPipeline as f, NodeProcessorContext as fa, Effect as fi, TextSelector as fn, TextSpan as fo, GPULightData as fr, isCssGradient as fs, CubicBezierSegmentSchema as ft, Material3D as g, NodeRunFunction as ga, ExportResult as gi, TextWigglySelector as gn, TimelineTransformSchema as go, Light3DOptions as gr, isSignal as gs, EnhancedTextNodeSchema as gt, MasterAudioEntry as h, NodeResultSchema as ha, EffectDomain as hi, TextSignalSelectorSchema as hn, TimelineTransform as ho, Light3D as hr, isNormalized as hs, EnhancedTextNode as ht, AudioLatentTrackCache as i, ModerationUnrefundableError as ia, DataType as ii, TextPathOptions as in, StorageService as io, CameraShakeOptions as ir, getFingerprint as is, AnimatableGlyphProps as it, SlugPipeline as j, PoseSkeletonOptions as ja, GeneratorSignalData as ji, computeAnchorPivotOffset as jn, VisionConfig as jo, AnimationType as jr, radians as js, LongShadowConfigSchema as jt, Skeleton3D as k, ParsedGradientStop as ka, GPUTextureBinding as ki, VolumetricFormationModeSchema as kn, VirtualMediaData as ko, parseColorToRgb as kr, programmaticSignal as ks, LineSpacingDynamicsSchema as kt, Bone3D as l, NodeMetadata as la, Degrees as li, TextRangeSelectorSchema as ln, TensorNode as lo, Environment3DOptions as lr, handleId as ls, ChromaticGlitchConfig as lt, LoadModelOptions as m, NodeResult as ma, EffectConfigValue as mi, TextSignalSelector as mn, TimelineSegmentSchema as mo, LIGHT_UNIFORM_SIZE_BYTES as mr, isFrameIndex as ms, DynamicStrokePropertiesSchema as mt, AudioLatentData as n, Milliseconds as na, DEFAULT_MEDIA_DIMENSION as ni, TextCursorStyleSchema as nn, SingleOutputGenericSchema as no, Camera3D as nr, getActiveMediaMetadata as ns, AnchorPreset as nt, AudioSignalComputeConfig as o, MultiOutputGenericSchema as oa, DataTypeVal as oi, TextPathSource as on, TensorData as oo, CirclePathOptions as or, getMediaType as os, ArcLengthLUTEntry as ot, GpuAdapterDescription as p, NodeProcessorParams as pa, EffectConfig as pi, TextSelectorSchema as pn, TextSpanMark as po, HelixOptions as pr, isEqual as ps, DynamicStrokeProperties as pt, signalRegistry as q, SignalGateData as qa, MediaMetadata as qi, generatePathSegments as qn, deserializeSignalData as qo, ColorStopLike as qr, takeRenderDiagnostics as qs, Spatial3DPropertiesSchema as qt, AudioLatentEngine as r, ModerationError as ra, DataForType as ri, TextPathBuilder as rn, SourceOperationSchema as ro, Camera3DPose as rr, getFileDataMetadata as rs, AnchorPresetSchema as rt, AudioSignalComputePipeline as s, NodeId as sa, DataTypes as si, TextPathSourceSchema as sn, TensorDimensions as so, ENVIRONMENT_PRESETS as sr, getRenderFingerprint as ss, AudioSpectrumTypography as st, AnimationClip3D as t, MeshAudioDeformConfig as ta, DEFAULT_FPS as ti, TextCursorStyle as tn, SingleOutputGeneric as to, BezierSegment3D as tr, generateId as ts, AnchorGroupingSchema as tt, CylinderGeometryOptions as u, NodeMetadataSchema as ua, DepthNormalsOptions as ui, TextScrambleConfig as un, TensorPipelineConfig as uo, FrustumPlane as ur, handleLabel as us, ChromaticGlitchConfigSchema as ut, Model3DData as v, NodeVisualConfig as va, ExtendedLayer as vi, TypewriterAnimator as vn, TransitionSchema as vo, LightsUniformData as vr, isVirtualMediaData as vs, ExpressionSelector as vt, RoundedBoxGeometryOptions as w, OpticalFlowOptions as wa, FileDataSchema as wi, Vec2 as wn, VideoLayerTypeSchema as wo, Path3DSample as wr, normalized as ws, GlyphAnchorPoint as wt, RenderContextValue as x, Normalized as xa, FileAsset as xi, TypingCadenceSchema as xn, VideoAnimation as xo, Matrix4Math as xr, ms as xs, ExtendedGlyphPropertiesSchema as xt, MotionBlurPipeline as y, NodeVisualConfigSchema as ya, ExtendedLayerSchema as yi, TypewriterAnimatorSchema as yn, TransitionType as yo, MAX_LIGHTS as yr, limitGradientStops as ys, ExpressionSelectorSchema as yt, loadFBX as z, SegmentationOptions as za, HandleTypeVal as zi, evaluateExpressionSelector as zn, checkNodeResultCache as zo, BaseVideoLayerProps as zr, rgbToOklab as zs, SelectorModeSchema as zt };
|
|
6060
|
+
//# sourceMappingURL=index-CZK6CFLy.d.mts.map
|