hyperframes 0.9.33 → 0.9.34
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/bin/hyperframes.mjs +10 -0
- package/dist/{add-GDXM36YQ.js → add-NBOJ2UA3.js} +16 -15
- package/dist/{agentPromptGenerator-KPNDH2EI.js → agentPromptGenerator-3JOLQXTX.js} +10 -10
- package/dist/{animatedGifPrep-SAKETEZ2.js → animatedGifPrep-VI5CFYCR.js} +9 -9
- package/dist/api.js +38 -38
- package/dist/{appHistory-WZIHFCPK.js → appHistory-535MKSWI.js} +2 -2
- package/dist/{asset-KOJC72AQ.js → asset-NYULKN5A.js} +2 -2
- package/dist/{assetCataloger-Q4ZFUI6G.js → assetCataloger-AWJMEMX7.js} +11 -11
- package/dist/{audio-XZBBXKQC.js → audio-QN5YYFOA.js} +19 -19
- package/dist/{auth-X45YSZGE.js → auth-LHUBRGIH.js} +2 -2
- package/dist/{autoUpdate-77XWQ564.js → autoUpdate-5M3JGEFS.js} +2 -2
- package/dist/{avatars-D3D22TI2.js → avatars-DAB2KILV.js} +13 -13
- package/dist/{backgroundChecks-2L2RWFJ3.js → backgroundChecks-3NQOCEDM.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-O7J47H2Z.js → batchRender-EPRIJZVT.js} +4 -4
- package/dist/{beats-6RVVU56H.js → beats-ZCPQEIFG.js} +11 -11
- package/dist/{benchmark-D5JRNAVQ.js → benchmark-7OVOBGQX.js} +9 -9
- package/dist/{billing-WT4DGZII.js → billing-7K6S23FP.js} +14 -14
- package/dist/{browser-2OR737P4.js → browser-CP76THCA.js} +8 -7
- package/dist/{bundleWithLocalizedFonts-VBET4RVR.js → bundleWithLocalizedFonts-MRCRI676.js} +1 -1
- package/dist/{capture-B34FTO6G.js → capture-B4B72PIK.js} +4 -4
- package/dist/{capture-23X2CK56.js → capture-VAE27MNW.js} +21 -21
- package/dist/{captureCompositionFrame-TPZKEVKN.js → captureCompositionFrame-YAOQTG6R.js} +16 -16
- package/dist/{captureFile-Y2ZMB7HK.js → captureFile-P4BDKVJH.js} +2 -2
- package/dist/{catalog-ACHSYU5Z.js → catalog-TUZGNHN6.js} +16 -15
- package/dist/{catch-up-FGANS2BB.js → catch-up-GMUF3JXI.js} +9 -9
- package/dist/{check-DXK4L5WP.js → check-CHCV573Z.js} +46 -46
- package/dist/{checkAudio-4ISYJED3.js → checkAudio-JJZN37WT.js} +13 -13
- package/dist/{checkBrowser-5ECMULMP.js → checkBrowser-SK7GFN7U.js} +39 -39
- package/dist/{chunk-L6BFXQ6S.js → chunk-2HDVXVUA.js} +3 -3
- package/dist/{chunk-76KUCQXD.js → chunk-2JXJQ3ZQ.js} +2 -2
- package/dist/{chunk-A4VXOJZO.js → chunk-2JZU6DYH.js} +3 -3
- package/dist/{chunk-4US5QCXR.js → chunk-2OP5HU5S.js} +62 -25
- package/dist/{chunk-KRWPTZBY.js → chunk-3FQYFVWA.js} +99 -25
- package/dist/{chunk-4CHGNFCS.js → chunk-3K4THQHY.js} +4 -4
- package/dist/{chunk-BBL6STGK.js → chunk-3P4OYIBA.js} +2 -2
- package/dist/{chunk-2KYLVWLO.js → chunk-3XJ42WUG.js} +1 -1
- package/dist/{chunk-ERJBWDPM.js → chunk-45IPAGED.js} +6 -6
- package/dist/{chunk-XUDJ5XSQ.js → chunk-4MVWA7NJ.js} +6 -6
- package/dist/{chunk-SWPI27QV.js → chunk-4TQS6ZSL.js} +7 -7
- package/dist/{chunk-OD7PLYYX.js → chunk-4WXLBRT5.js} +31 -22
- package/dist/{chunk-KIAY63AB.js → chunk-4Y4VYZRO.js} +3 -3
- package/dist/{chunk-5RVPI6QL.js → chunk-52CUHVEA.js} +3 -3
- package/dist/{chunk-2RBQLV6B.js → chunk-55I56MXF.js} +1 -1
- package/dist/{chunk-O5CNNVRY.js → chunk-5QPYUTV3.js} +8 -8
- package/dist/{chunk-GHLLC6LJ.js → chunk-5SXAEHZT.js} +2 -2
- package/dist/{chunk-77UB5EHM.js → chunk-5WK76INI.js} +1 -1
- package/dist/{chunk-23354HMA.js → chunk-5ZTB6QIJ.js} +3 -3
- package/dist/{chunk-ZIYXPDKY.js → chunk-65PFUPLX.js} +1 -1
- package/dist/{chunk-45ZQI734.js → chunk-6FP6HBG4.js} +2 -2
- package/dist/{chunk-MVIUSNPZ.js → chunk-6HG3XABE.js} +1 -1
- package/dist/{chunk-SUXEL7G4.js → chunk-6K5KVYOQ.js} +11 -11
- package/dist/{chunk-4DLYTSWQ.js → chunk-6OYPVALW.js} +1 -1
- package/dist/{chunk-G2XAFJ2B.js → chunk-74PKHC3W.js} +1 -1
- package/dist/{chunk-N6Y645MX.js → chunk-7C6K5WFB.js} +1 -1
- package/dist/{chunk-6QEEF5RR.js → chunk-7E5HPNMD.js} +1 -1
- package/dist/{chunk-CHJGVW5W.js → chunk-7YBRRU5W.js} +4 -11
- package/dist/{chunk-I3PA54IU.js → chunk-7YOJPNDT.js} +1 -1
- package/dist/{chunk-2I4DQZLQ.js → chunk-A2YCAF35.js} +23 -37
- package/dist/{chunk-EX533ULK.js → chunk-AG6L5CUE.js} +2 -2
- package/dist/{chunk-SVI2CJ6R.js → chunk-AOTAYP5E.js} +1 -1
- package/dist/{chunk-CNJLBAKM.js → chunk-ASORF7UJ.js} +2 -2
- package/dist/{chunk-MDBEAWP2.js → chunk-AUM475MS.js} +3 -3
- package/dist/{chunk-CDI3CCAU.js → chunk-BDFD3C3V.js} +7 -7
- package/dist/{chunk-YAS347ZS.js → chunk-BLII22FU.js} +1 -1
- package/dist/{chunk-ROXILOZ6.js → chunk-BX4GM3IV.js} +2 -2
- package/dist/{chunk-W2FSQBUR.js → chunk-BZPRG5N5.js} +14 -14
- package/dist/{chunk-YNFHZ4RI.js → chunk-C3TYMGWE.js} +3 -3
- package/dist/{chunk-UE2WSWNA.js → chunk-C62LSZVJ.js} +1 -1
- package/dist/{chunk-CKJDY6EK.js → chunk-DC7AOIHN.js} +1 -1
- package/dist/{chunk-GBIASKIH.js → chunk-DH34XRVW.js} +1 -1
- package/dist/{chunk-N2C7WJDG.js → chunk-DLBFLOEU.js} +1 -1
- package/dist/{chunk-HPKW6UVW.js → chunk-DTM7HGP4.js} +3 -3
- package/dist/{chunk-ADYMQM7T.js → chunk-E53F4CP6.js} +2 -2
- package/dist/{chunk-2LMCARA5.js → chunk-ECKXTBRB.js} +6 -4
- package/dist/{chunk-T3GSTIBS.js → chunk-EDQF36I7.js} +3 -3
- package/dist/{chunk-7LTXT7ME.js → chunk-EWBLIDHD.js} +2 -2
- package/dist/{chunk-BMDABBHG.js → chunk-FEWHHDFA.js} +5 -17
- package/dist/{chunk-SIGASWB7.js → chunk-FILLRGVO.js} +4 -4
- package/dist/{chunk-MDGNQWFN.js → chunk-FRY73NRV.js} +1 -1
- package/dist/{chunk-WYPRTHXQ.js → chunk-FS4XHCSU.js} +1 -1
- package/dist/{chunk-GOMTMQRT.js → chunk-G6ME77PU.js} +1 -1
- package/dist/{chunk-C2VZ7UPE.js → chunk-GJB5VR44.js} +15 -15
- package/dist/{chunk-JSVCF4A6.js → chunk-GXGGPZXD.js} +2 -2
- package/dist/{chunk-VQJLTYEK.js → chunk-H6323NVP.js} +2 -2
- package/dist/{chunk-Y5DOT5NQ.js → chunk-HYTD4CIO.js} +1 -1
- package/dist/{chunk-QWM3NY2E.js → chunk-I2GYLBJJ.js} +4 -4
- package/dist/{chunk-I35B5RWZ.js → chunk-IVMYWHFE.js} +3 -3
- package/dist/{chunk-YDG3OXH3.js → chunk-IX6BFRED.js} +1 -1
- package/dist/{chunk-RGYOCAHC.js → chunk-JJUVQYXL.js} +2 -2
- package/dist/{chunk-DMZER7D5.js → chunk-JQATOGQQ.js} +2 -2
- package/dist/{chunk-XQWWFIBR.js → chunk-JVDYIUFD.js} +2 -2
- package/dist/{chunk-HEXTAQYG.js → chunk-K4TEEYGN.js} +2 -2
- package/dist/{chunk-SOAQ3XXB.js → chunk-K5BPLZOP.js} +2 -2
- package/dist/{chunk-XSHJ37U3.js → chunk-K6EOKQ6J.js} +7 -7
- package/dist/{chunk-R45WFVRA.js → chunk-KCL77FXI.js} +1 -1
- package/dist/{chunk-PXDRW3QN.js → chunk-LB6VJTM4.js} +1 -1
- package/dist/{chunk-G55YEL2L.js → chunk-LCQT4S43.js} +233 -47
- package/dist/{chunk-N7C7U3ZR.js → chunk-M425BL2U.js} +22 -11
- package/dist/{chunk-MA35E5OY.js → chunk-NAKQS3EJ.js} +2 -2
- package/dist/{chunk-VZQXHYEI.js → chunk-NMMPHHN7.js} +3 -3
- package/dist/{chunk-RCB4SGTB.js → chunk-O2S5HR7Y.js} +49 -12
- package/dist/{chunk-XVVPEWNX.js → chunk-OKN7E77Z.js} +1 -1
- package/dist/{chunk-4WZU4FYS.js → chunk-PDE6XAIJ.js} +4 -4
- package/dist/{chunk-4FTJE22M.js → chunk-PNBWAA3E.js} +2 -2
- package/dist/{chunk-IYLGUQFR.js → chunk-PVHNBJCI.js} +3 -3
- package/dist/{chunk-NQFIMBXS.js → chunk-PWSTB75B.js} +2 -2
- package/dist/{chunk-YSHUIQ3I.js → chunk-PXWPBLEN.js} +1 -1
- package/dist/{chunk-IEEIPTDW.js → chunk-PYZVKGW5.js} +1 -1
- package/dist/{chunk-MP36L7OJ.js → chunk-Q2G4ERQU.js} +2 -2
- package/dist/{chunk-VKZSAAXZ.js → chunk-QDSALYDV.js} +4 -4
- package/dist/{chunk-XDRSEU2I.js → chunk-R3C62AP3.js} +4 -4
- package/dist/{chunk-U77L3ZQZ.js → chunk-RJJ5NVSQ.js} +1 -1
- package/dist/{chunk-WIMVXPYG.js → chunk-RSQTFDMS.js} +11 -11
- package/dist/{chunk-XFXCI4IP.js → chunk-RYJXT2AS.js} +2 -2
- package/dist/{chunk-DGC2RIQE.js → chunk-S3HTROSO.js} +3 -3
- package/dist/{chunk-O2T6ZTLN.js → chunk-SAIPA3QY.js} +1 -1
- package/dist/{chunk-CHM3QYLF.js → chunk-SDBFTY6V.js} +3 -3
- package/dist/{chunk-PNP2BO3U.js → chunk-SG4OW2HV.js} +2 -2
- package/dist/{chunk-W5PW26KE.js → chunk-T4YI2YLF.js} +1 -1
- package/dist/{chunk-2QTGQGYA.js → chunk-T7O62YTY.js} +1 -1
- package/dist/chunk-TDOJW7Z2.js +5053 -0
- package/dist/{chunk-EX7WPDFA.js → chunk-TGGYHFTP.js} +2 -2
- package/dist/{chunk-5GYTBKZA.js → chunk-TGK7LUEV.js} +2 -2
- package/dist/{chunk-YTUPQTXA.js → chunk-TLU5DPES.js} +7 -7
- package/dist/{chunk-6ZVUTYNB.js → chunk-TOLY2QK2.js} +5 -5
- package/dist/{chunk-JCJJCYCP.js → chunk-UFKWSLJ5.js} +9 -9
- package/dist/{chunk-AIC7T7CC.js → chunk-UGWY7PFQ.js} +2 -2
- package/dist/{chunk-REJ4NIBY.js → chunk-VJSKNQTM.js} +1 -1
- package/dist/{chunk-ETWXZQN5.js → chunk-VW35U2LJ.js} +2 -2
- package/dist/{chunk-JZIEZCQM.js → chunk-VZO3BUTW.js} +5 -12
- package/dist/{chunk-TFBPCJPG.js → chunk-W6AXNWGE.js} +1 -1
- package/dist/{chunk-ZOAANTVI.js → chunk-WC2XQ4NR.js} +1 -1
- package/dist/{chunk-WXOOAAT4.js → chunk-WLB2D2OJ.js} +36 -4
- package/dist/{chunk-3J32XVJ6.js → chunk-WWT32C2M.js} +3 -3
- package/dist/{chunk-HMB3IAVP.js → chunk-XEUTASNL.js} +2 -2
- package/dist/{chunk-6RV2QY4K.js → chunk-YCXNWQ3B.js} +23 -23
- package/dist/{chunk-FRH3CPW5.js → chunk-YMTLKSXO.js} +1 -1
- package/dist/{chunk-B66UZ2YK.js → chunk-Z222HDGC.js} +6 -6
- package/dist/{chunk-DDDSTRHU.js → chunk-Z3ZLN5VR.js} +4 -4
- package/dist/{chunk-2TBW7UOF.js → chunk-Z64I7KJZ.js} +203 -115
- package/dist/{chunk-7UUUV4PN.js → chunk-ZWLFWYHR.js} +1 -1
- package/dist/{clean-3IN64RHM.js → clean-N7RLS5LN.js} +24 -24
- package/dist/cli.js +64 -64
- package/dist/{cloud-SVYXHFEG.js → cloud-4PO7BA26.js} +2 -2
- package/dist/{cloud-LBUZBUP6.js → cloud-W3DHH6EB.js} +4 -4
- package/dist/{cloudrun-PZOF2QGL.js → cloudrun-YIAPIPOG.js} +6 -6
- package/dist/{compare-UOJ3LXQQ.js → compare-GCWIIUGY.js} +38 -38
- package/dist/{compiler-5ZDHBKBQ.js → compiler-L3BJI43E.js} +5 -5
- package/dist/{component-EVIPLTTJ.js → component-C4VYDMZ4.js} +3 -3
- package/dist/{compositions-R4GG5FBO.js → compositions-5P4BZQJA.js} +13 -13
- package/dist/{contactSheet-HZMP42FZ.js → contactSheet-ROMTQQ6Y.js} +3 -3
- package/dist/{curve-LR3PSRW3.js → curve-IMXKUBAO.js} +13 -13
- package/dist/{cuts-DHCOBAFT.js → cuts-PRBLX5HH.js} +14 -14
- package/dist/{delete-MMGGU3QP.js → delete-QYWDRFO3.js} +4 -4
- package/dist/{deploy-SKIGUTM2.js → deploy-DGEPSTOJ.js} +2 -2
- package/dist/{describeProject-L7HNTBPV.js → describeProject-WS4TR7VF.js} +10 -10
- package/dist/{destroy-5HSMMDH7.js → destroy-2KSDD4KU.js} +2 -2
- package/dist/{deterministicFonts-2ZPRAI3C.js → deterministicFonts-D3HTAAN2.js} +3 -3
- package/dist/{diff-KR7VKPYL.js → diff-AAWRGZLX.js} +35 -35
- package/dist/{dist-3MFNUZSN.js → dist-DJQRHSKZ.js} +3 -3
- package/dist/{dist-HK3AZNNL.js → dist-GJSMSEEL.js} +18 -14
- package/dist/{dist-ZGYPFYOH.js → dist-V2TLDLQL.js} +3 -3
- package/dist/{doctor-G7VGNSA5.js → doctor-CARXZUFN.js} +16 -16
- package/dist/{energy-H7EEH6WO.js → energy-VMNGG2ND.js} +14 -14
- package/dist/{events-ASG27IXP.js → events-4XIJRQIJ.js} +16 -16
- package/dist/{events-5ATZCZTK.js → events-LOPLHMOT.js} +2 -2
- package/dist/{events-YD6N7OPQ.js → events-XX3DYSU4.js} +6 -6
- package/dist/{execute-OAS454OB.js → execute-U7JKJERV.js} +28 -28
- package/dist/{extract-645SENLA.js → extract-KYFUTYDD.js} +14 -14
- package/dist/{face-WRT5XH4I.js → face-VQGUHRQL.js} +15 -15
- package/dist/{feedback-3LKLR5MV.js → feedback-UPWYWOQ3.js} +12 -12
- package/dist/{ffmpeg-PXKIZL2X.js → ffmpeg-RUOPT3JH.js} +9 -9
- package/dist/{figma-RIEVJJBW.js → figma-TO57RICW.js} +3 -3
- package/dist/fontLocalizeCli.js +13 -13
- package/dist/{frames-OTB3J5W3.js → frames-4Y3X474I.js} +16 -16
- package/dist/{generate-IUKCZW2D.js → generate-BPID6U7D.js} +25 -25
- package/dist/{get-6WVQ7TBV.js → get-JIJ46VI5.js} +4 -4
- package/dist/{gpuPolicy-HXSVAEU4.js → gpuPolicy-5ZJNSR7D.js} +9 -9
- package/dist/{grade-compare-TCAYHDEF.js → grade-compare-YTBW7C65.js} +37 -37
- package/dist/{heifImagePrep-GXIMK4HK.js → heifImagePrep-OL7KF7SH.js} +10 -10
- package/dist/{help-RGOL5EJD.js → help-QPV26QI5.js} +1 -1
- package/dist/{history-XKPRGJGS.js → history-7UVGTZT3.js} +12 -12
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +61 -61
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-EYBBC42V.js → info-2VFXR7LJ.js} +15 -15
- package/dist/{init-F2FWPSMA.js → init-JZ7CJQJE.js} +32 -32
- package/dist/{ink-BWFERAAT.js → ink-SS7XOD7Y.js} +14 -14
- package/dist/{inspect-74N7L3BW.js → inspect-D5MBKDZZ.js} +37 -37
- package/dist/{installer-LOUR7G4R.js → installer-UNC4BAFO.js} +7 -7
- package/dist/{keyframes-WB5PTKFE.js → keyframes-7T2CVOM6.js} +9 -9
- package/dist/{lambda-JYCNXUKB.js → lambda-QVJFVSXL.js} +15 -15
- package/dist/{layout-P52EVR24.js → layout-5DF7VFWS.js} +37 -37
- package/dist/{lint-SL55KAS2.js → lint-EWJHJKAI.js} +11 -11
- package/dist/{lintProject-46WU53VC.js → lintProject-KBJU3L4C.js} +3 -3
- package/dist/{list-LN6CQH52.js → list-DDLH5ZG5.js} +4 -4
- package/dist/{localPage-L6OJU3UH.js → localPage-MHAXFUGI.js} +10 -10
- package/dist/{login-WTOAMDID.js → login-BJ4QUZT4.js} +4 -4
- package/dist/{look-O6ESLJRP.js → look-HNK2K33N.js} +14 -14
- package/dist/{manager-CMEZWENF.js → manager-FFLFDJZ6.js} +10 -10
- package/dist/{manager-IAXYSRG5.js → manager-VLO3FZC4.js} +2 -1
- package/dist/{measure-NEIXU53P.js → measure-SE346MGF.js} +11 -11
- package/dist/{media-treatment-6CAQG7MU.js → media-treatment-KYPDRIBT.js} +15 -15
- package/dist/{media-use-IXJFMKU7.js → media-use-OJZHSNTK.js} +15 -6
- package/dist/{models-TZALWUEY.js → models-KWSHPDZ5.js} +14 -14
- package/dist/{motionShot-OQYK6G6M.js → motionShot-HEROABIE.js} +20 -20
- package/dist/{normalize-audio-43PJLOBY.js → normalize-audio-ZD5W37ZO.js} +11 -11
- package/dist/{open-EOX6QY4M.js → open-7B6HT4EX.js} +17 -17
- package/dist/{parakeetRunner-STHAXQAF.js → parakeetRunner-5AKE7TBH.js} +17 -17
- package/dist/{pipeline-RRWZHFBQ.js → pipeline-UTVSWC4X.js} +12 -12
- package/dist/{plan-JWUSMF4W.js → plan-SQ63IXQC.js} +22 -22
- package/dist/{play-TUKTST32.js → play-NYBFE3GW.js} +27 -27
- package/dist/{preflight-L42JKT6F.js → preflight-T23WHZP3.js} +11 -11
- package/dist/{present-Z7HRDXPV.js → present-FX22552Q.js} +21 -21
- package/dist/{preview-HGTIRAV3.js → preview-ULBNMDXD.js} +57 -33
- package/dist/{probe-RXK44FY7.js → probe-62Z5C6VC.js} +14 -14
- package/dist/{producer-KJ2RZDJ3.js → producer-X3KFL4QM.js} +1 -1
- package/dist/{projectConfig-K36NTJXP.js → projectConfig-JQ4IDYTU.js} +10 -10
- package/dist/{publication-OZWLT6K6.js → publication-YNIJIR6O.js} +5 -5
- package/dist/{publish-CRUTXNYM.js → publish-7TIGC7RV.js} +17 -17
- package/dist/{remove-background-R37HZPCG.js → remove-background-F3BD6WXD.js} +13 -13
- package/dist/{render-SU2XTMJL.js → render-BL6CAORF.js} +6 -6
- package/dist/{render-ZHCPCISN.js → render-CDWBVWJP.js} +43 -43
- package/dist/{render-EZMKBT7V.js → render-EOQOD2TJ.js} +31 -31
- package/dist/{render-batch-YIUOEAAL.js → render-batch-PDY2PXUZ.js} +6 -6
- package/dist/renderSetupWorker.js +4 -4
- package/dist/{resolver-DLCKRKQR.js → resolver-VBAVCFEP.js} +7 -7
- package/dist/{reverse-4FAVXIER.js → reverse-3E6HUX5S.js} +1 -1
- package/dist/{run-H4GVEJVS.js → run-77Z3DLIP.js} +4 -4
- package/dist/{screenshotCapture-CQF5FYVI.js → screenshotCapture-XWWCRLGM.js} +12 -12
- package/dist/{service-XDQOULGD.js → service-LJZQKQT6.js} +13 -13
- package/dist/{share-CUCQALE7.js → share-2CNP22KN.js} +16 -16
- package/dist/{sherpa-WZNRQUVC.js → sherpa-NPTMMQHQ.js} +16 -16
- package/dist/sherpaWorker.js +2 -1
- package/dist/skills/hyperframes/references/plugin-installation.md +5 -2
- package/dist/skills/hyperframes/scripts/plugin-cli.mjs +20 -3
- package/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +61 -3
- package/dist/skills/hyperframes-cli/references/doctor-browser.md +1 -1
- package/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +6 -6
- package/dist/skills/media-use/audio/scripts/lib/tts.cleanup.test.mjs +12 -6
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +25 -6
- package/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +37 -12
- package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +54 -18
- package/dist/skills/media-use/references/audio.md +2 -0
- package/dist/skills/media-use/references/operations.md +2 -1
- package/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +22 -31
- package/dist/skills/media-use/scripts/lib/tts-local-provider.mjs +16 -11
- package/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +34 -78
- package/dist/skills/media-use/scripts/resolve-plugin.test.mjs +42 -18
- package/dist/skills/media-use/scripts/transcribe.test.mjs +60 -17
- package/dist/{skills-J52DBZAK.js → skills-7MQBUOOX.js} +9 -9
- package/dist/{skillsUpdateCheck-26DJHBTC.js → skillsUpdateCheck-JAUXRXRH.js} +3 -3
- package/dist/{snapshot-ZIRQFDA7.js → snapshot-D7DROQPF.js} +49 -49
- package/dist/{src-C3XYMTF4.js → src-26DWEOAT.js} +10 -8
- package/dist/{src-7BGBN6SS.js → src-LJIVCW6M.js} +12 -12
- package/dist/{start-QG2XNMYN.js → start-DF3U2VIG.js} +23 -23
- package/dist/{staticProjectServer-TWMEFK3T.js → staticProjectServer-NYH6MQHZ.js} +24 -24
- package/dist/{status-3UPA5WPI.js → status-5Q43GUYF.js} +17 -16
- package/dist/studio/assets/{codec-qz1-OXLj.js → codec-OdIlx7W3.js} +1 -1
- package/dist/studio/assets/{hyperframes-player-2eG1zFX5.js → hyperframes-player-XtPxZL3k.js} +1 -1
- package/dist/studio/assets/{index-DDmhnfrS.js → index-DTU1D-zj.js} +83 -83
- package/dist/studio/assets/{index-DUveJ_YP.js → index-DWZWPFkU.js} +1 -1
- package/dist/studio/assets/{pausedVideoDecoder-CoHTKUjM.js → pausedVideoDecoder-NVr8gRm5.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-Z42OO4JJ.js → studio-api-ZYCEQPX2.js} +18 -14
- package/dist/{studioServer-SMN3RMVL.js → studioServer-W4RX3B7S.js} +67 -65
- package/dist/{sync-ONTI2WSI.js → sync-LLH2GSSC.js} +14 -14
- package/dist/{synthesize-FR5KPBRP.js → synthesize-4A5ENXNO.js} +4 -3
- package/dist/{telemetry-RRXALB5D.js → telemetry-RIQIM2PH.js} +6 -6
- package/dist/{templates-BHFOSD6F.js → templates-4HVTWNKO.js} +14 -14
- package/dist/{timeline-Z5IHY5TN.js → timeline-ITIMTT27.js} +22 -22
- package/dist/{tokens-MZVEPARM.js → tokens-ABTBM6UA.js} +2 -2
- package/dist/{transcribe-5IZS4BGW.js → transcribe-6BA2MP2Y.js} +30 -30
- package/dist/{transcribe-M5N3YZZU.js → transcribe-6LDBHZCZ.js} +13 -13
- package/dist/{tts-ZE776B4I.js → tts-P77F523Z.js} +1 -1
- package/dist/{update-EVPWBIKY.js → update-ODXFCK36.js} +11 -11
- package/dist/{updateCheck-2UUEF6TC.js → updateCheck-E4U776B4.js} +2 -2
- package/dist/{upgrade-DK45FD4K.js → upgrade-LSHVYMLH.js} +4 -4
- package/dist/{urlDownloader-3MPHIDSA.js → urlDownloader-PWQ2LDLE.js} +8 -8
- package/dist/{validate-W27TQ367.js → validate-JHETNNBN.js} +29 -29
- package/dist/{video-TI372QGV.js → video-D2D5YCDU.js} +11 -11
- package/dist/{voices-FZV4PGT6.js → voices-34FMTOIX.js} +23 -23
- package/dist/warmCheck.js +46 -46
- package/package.json +1 -1
- package/dist/chunk-XDDBSGBD.js +0 -5049
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-I2GYLBJJ.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULT_TARGET_LUFS,
|
|
25
25
|
absoluteLoudnessPlan,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requestedProjectPath,
|
|
29
29
|
requiredFfmpeg,
|
|
30
30
|
resolveLocalAudioPath
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4MVWA7NJ.js";
|
|
32
32
|
import {
|
|
33
33
|
MEDIA_LINK_ATTR,
|
|
34
34
|
relinkSplitHalves
|
|
@@ -56,11 +56,11 @@ import {
|
|
|
56
56
|
scanProjectMedia,
|
|
57
57
|
shouldPrewarmProxy,
|
|
58
58
|
waitForProxy
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-K6EOKQ6J.js";
|
|
60
60
|
import {
|
|
61
61
|
probeAudioTrack,
|
|
62
62
|
probeMediaMetadata
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-ECKXTBRB.js";
|
|
64
64
|
import {
|
|
65
65
|
HistoryBusyError,
|
|
66
66
|
MAX_WINDOW_IDLE_MS,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
resolveProjectSignature,
|
|
76
76
|
serveWhileOpen,
|
|
77
77
|
settledFileTag
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-R3C62AP3.js";
|
|
79
79
|
import {
|
|
80
80
|
findTimelineScript,
|
|
81
81
|
parseGsapScriptAcorn
|
|
@@ -87,13 +87,16 @@ import {
|
|
|
87
87
|
isLinkFreeWithinProject,
|
|
88
88
|
isPrivateProjectFile,
|
|
89
89
|
isPrivateProjectPath,
|
|
90
|
+
isWritableProjectFile,
|
|
90
91
|
mkdirOwnedWithinProject,
|
|
91
92
|
pinWithinProject,
|
|
93
|
+
pinWritableWithinProject,
|
|
92
94
|
projectRelativePath,
|
|
93
95
|
realFilePath,
|
|
94
96
|
resolveWithinProject as resolveWithinProject2,
|
|
97
|
+
resolveWritableWithinProject,
|
|
95
98
|
walkDir
|
|
96
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-WLB2D2OJ.js";
|
|
97
100
|
import {
|
|
98
101
|
openRangeEnd,
|
|
99
102
|
parseEncoderOptions
|
|
@@ -115,13 +118,13 @@ import {
|
|
|
115
118
|
ensureHfIds,
|
|
116
119
|
stampHfIdsInPlace,
|
|
117
120
|
stripSdrPngColourTags
|
|
118
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-4Y4VYZRO.js";
|
|
119
122
|
import {
|
|
120
123
|
atomicTempPath,
|
|
121
124
|
createFileAtomically,
|
|
122
125
|
createStagingDir,
|
|
123
126
|
replaceFileAtomically
|
|
124
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-PYZVKGW5.js";
|
|
125
128
|
import {
|
|
126
129
|
GSAP_BASE_URL_META,
|
|
127
130
|
PREVIEW_PROXY_BOX_PARAM,
|
|
@@ -139,7 +142,7 @@ import {
|
|
|
139
142
|
normalizeGsapLocalRoot,
|
|
140
143
|
parseFps,
|
|
141
144
|
parsePreviewProxyBox
|
|
142
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-TGGYHFTP.js";
|
|
143
146
|
import {
|
|
144
147
|
AFTER_FONTS_SCRIPT_TYPE,
|
|
145
148
|
RUNTIME_BOOTSTRAP_ATTR,
|
|
@@ -154,7 +157,7 @@ import {
|
|
|
154
157
|
resolveRateSpec,
|
|
155
158
|
sourceTimeAt,
|
|
156
159
|
stripEmbeddedRuntimeScripts
|
|
157
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-TDOJW7Z2.js";
|
|
158
161
|
import {
|
|
159
162
|
ProjectRootMissingError,
|
|
160
163
|
folderGone,
|
|
@@ -170,8 +173,9 @@ import {
|
|
|
170
173
|
} from "./chunk-K2Z6OXEI.js";
|
|
171
174
|
import {
|
|
172
175
|
FFPROBE_PATH_ENV,
|
|
173
|
-
findFfBinary
|
|
174
|
-
|
|
176
|
+
findFfBinary,
|
|
177
|
+
requireFfBinary
|
|
178
|
+
} from "./chunk-3FQYFVWA.js";
|
|
175
179
|
import {
|
|
176
180
|
decodeCssEscapes,
|
|
177
181
|
decodeWellFormedEscapes,
|
|
@@ -190,7 +194,7 @@ import {
|
|
|
190
194
|
decodeAuthoredAttribute,
|
|
191
195
|
scanHtmlOpeningTags,
|
|
192
196
|
unrollComputedTimeline
|
|
193
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-M425BL2U.js";
|
|
194
198
|
import {
|
|
195
199
|
parseHTML
|
|
196
200
|
} from "./chunk-GWTIFRF5.js";
|
|
@@ -312,7 +316,7 @@ function sameOriginPost(headers) {
|
|
|
312
316
|
return originMatches(headers.origin, host, proto);
|
|
313
317
|
}
|
|
314
318
|
|
|
315
|
-
// ../studio-server/dist/chunk-
|
|
319
|
+
// ../studio-server/dist/chunk-7IAYX4WA.js
|
|
316
320
|
import { createHash } from "crypto";
|
|
317
321
|
import { closeSync, constants, fstatSync, openSync, readFileSync } from "fs";
|
|
318
322
|
import { dirname, join } from "path";
|
|
@@ -457,7 +461,7 @@ function clearElementScreenshotIsolation() {
|
|
|
457
461
|
page.__hfThumbnailFaded = [];
|
|
458
462
|
}
|
|
459
463
|
|
|
460
|
-
// ../studio-server/dist/chunk-
|
|
464
|
+
// ../studio-server/dist/chunk-NTBQ6ATA.js
|
|
461
465
|
import { resolve } from "path";
|
|
462
466
|
function isAutoProxyEnabled(adapter) {
|
|
463
467
|
return adapter.autoProxy !== false;
|
|
@@ -3859,6 +3863,7 @@ import { basename as basename3, dirname as dirname8, extname, join as join15, po
|
|
|
3859
3863
|
import { existsSync as existsSync11, readFileSync as readFileSync13 } from "fs";
|
|
3860
3864
|
import { homedir } from "os";
|
|
3861
3865
|
import { join as join16 } from "path";
|
|
3866
|
+
import { createHmac, randomBytes as randomBytes2, timingSafeEqual } from "crypto";
|
|
3862
3867
|
import { createHash as createHash7 } from "crypto";
|
|
3863
3868
|
import { readFileSync as readFileSync14, readdirSync as readdirSync5, rmSync as rmSync6 } from "fs";
|
|
3864
3869
|
import { join as join17 } from "path";
|
|
@@ -4514,9 +4519,10 @@ function computePeaks(floats, count) {
|
|
|
4514
4519
|
async function decodeAudioPeaks(audioPath) {
|
|
4515
4520
|
const track = await probeAudioTrack(audioPath);
|
|
4516
4521
|
if (!track) throw new Error("no audio stream");
|
|
4522
|
+
const ffmpeg = requireFfBinary("ffmpeg");
|
|
4517
4523
|
return new Promise((resolvePromise, reject) => {
|
|
4518
4524
|
const proc = spawn(
|
|
4519
|
-
|
|
4525
|
+
ffmpeg,
|
|
4520
4526
|
[
|
|
4521
4527
|
"-i",
|
|
4522
4528
|
audioPath,
|
|
@@ -4928,6 +4934,9 @@ async function resolveProjectPath(c, adapter, route, opts) {
|
|
|
4928
4934
|
}
|
|
4929
4935
|
return { error: c.json({ error: "forbidden", why: "outside_project" }, 403) };
|
|
4930
4936
|
}
|
|
4937
|
+
if (opts?.write && !isWritableProjectFile(project.dir, absPath)) {
|
|
4938
|
+
return { error: c.json({ error: "forbidden", why: "protected_path" }, 403) };
|
|
4939
|
+
}
|
|
4931
4940
|
if (opts?.mustExist && !existsSync4(absPath)) {
|
|
4932
4941
|
return { error: c.json({ error: "not found" }, 404) };
|
|
4933
4942
|
}
|
|
@@ -4937,7 +4946,7 @@ function resolveProjectFile(c, adapter, opts) {
|
|
|
4937
4946
|
return resolveProjectPath(c, adapter, "files", opts);
|
|
4938
4947
|
}
|
|
4939
4948
|
function resolveFileMutationContext(c, adapter, operation) {
|
|
4940
|
-
return resolveProjectPath(c, adapter, `file-mutations/${operation}`, { pin: true });
|
|
4949
|
+
return resolveProjectPath(c, adapter, `file-mutations/${operation}`, { pin: true, write: true });
|
|
4941
4950
|
}
|
|
4942
4951
|
function isOptionalInteger(value) {
|
|
4943
4952
|
return value === void 0 || Number.isInteger(value);
|
|
@@ -5017,7 +5026,7 @@ function foldAndCommitElementPatchBatches(projectDir, batches, writeFile, reques
|
|
|
5017
5026
|
const resolvedPaths = /* @__PURE__ */ new Set();
|
|
5018
5027
|
const prepared = [];
|
|
5019
5028
|
for (const batch of batches) {
|
|
5020
|
-
const absPath =
|
|
5029
|
+
const absPath = pinWritableWithinProject(projectDir, batch.sourceFile);
|
|
5021
5030
|
if (!absPath) return { error: "forbidden", sourceFile: batch.sourceFile };
|
|
5022
5031
|
if (resolvedPaths.has(absPath)) return { error: "duplicate", sourceFile: batch.sourceFile };
|
|
5023
5032
|
resolvedPaths.add(absPath);
|
|
@@ -5455,7 +5464,7 @@ function updateReferences(projectDir, oldPath, newPath, isDirectory) {
|
|
|
5455
5464
|
const rewrite = referenceRewriter(oldPath, newPath, isDirectory, projectPaths(projectDir));
|
|
5456
5465
|
let updatedCount = 0;
|
|
5457
5466
|
for (const file of textFiles) {
|
|
5458
|
-
if (!isSafePath(projectDir, file) ||
|
|
5467
|
+
if (!isSafePath(projectDir, file) || !isWritableProjectFile(projectDir, file)) continue;
|
|
5459
5468
|
const content = readableText(file);
|
|
5460
5469
|
if (content === null) continue;
|
|
5461
5470
|
const updated = rewrite(content, referenceSyntax(file));
|
|
@@ -5748,7 +5757,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5748
5757
|
let block = extractGsapScriptBlock(html);
|
|
5749
5758
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5750
5759
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5751
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5760
|
+
const { GSAP_CDN } = await import("./dist-V2TLDLQL.js");
|
|
5752
5761
|
const bootstrap = [
|
|
5753
5762
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5754
5763
|
"<script>",
|
|
@@ -6605,7 +6614,8 @@ async function processUploadedFiles(formData, targetDir, projectDir) {
|
|
|
6605
6614
|
finalName = `${base} (${n})${ext}`;
|
|
6606
6615
|
finalPath = resolve2(targetDir, finalName);
|
|
6607
6616
|
}
|
|
6608
|
-
if (!isSafePath(projectDir, finalPath) ||
|
|
6617
|
+
if (!isSafePath(projectDir, finalPath) || !isWritableProjectFile(projectDir, finalPath))
|
|
6618
|
+
continue;
|
|
6609
6619
|
const buffer = Buffer.from(await value.arrayBuffer());
|
|
6610
6620
|
const validation = validateUploadedMediaBuffer(finalName, buffer);
|
|
6611
6621
|
if (!validation.ok) {
|
|
@@ -6681,7 +6691,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
6681
6691
|
}
|
|
6682
6692
|
});
|
|
6683
6693
|
api.put("/projects/:id/files/*", async (c) => {
|
|
6684
|
-
const res = await resolveProjectFile(c, adapter, { pin: true });
|
|
6694
|
+
const res = await resolveProjectFile(c, adapter, { pin: true, write: true });
|
|
6685
6695
|
if ("error" in res) return res.error;
|
|
6686
6696
|
const body = Buffer.from(await c.req.arrayBuffer());
|
|
6687
6697
|
const expectedVersion = c.req.header("If-Match")?.trim() ?? null;
|
|
@@ -6782,7 +6792,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
6782
6792
|
});
|
|
6783
6793
|
});
|
|
6784
6794
|
api.post("/projects/:id/files/*", async (c) => {
|
|
6785
|
-
const res = await resolveProjectFile(c, adapter);
|
|
6795
|
+
const res = await resolveProjectFile(c, adapter, { write: true });
|
|
6786
6796
|
if ("error" in res) return res.error;
|
|
6787
6797
|
ensureDir(res.project.dir, res.absPath);
|
|
6788
6798
|
const body = Buffer.from(await c.req.arrayBuffer());
|
|
@@ -6797,7 +6807,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
6797
6807
|
return c.json({ ok: true, path: res.filePath }, 201);
|
|
6798
6808
|
});
|
|
6799
6809
|
api.delete("/projects/:id/files/*", async (c) => {
|
|
6800
|
-
const res = await resolveProjectFile(c, adapter, { mustExist: true });
|
|
6810
|
+
const res = await resolveProjectFile(c, adapter, { mustExist: true, write: true });
|
|
6801
6811
|
if ("error" in res) return res.error;
|
|
6802
6812
|
const stat2 = statSync3(res.absPath);
|
|
6803
6813
|
const backup = snapshotBeforeWrite(res.project.dir, res.absPath);
|
|
@@ -6934,7 +6944,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
6934
6944
|
const seen = /* @__PURE__ */ new Set();
|
|
6935
6945
|
const prepared = [];
|
|
6936
6946
|
for (const file of files) {
|
|
6937
|
-
const absPath =
|
|
6947
|
+
const absPath = pinWritableWithinProject(project.dir, file.path);
|
|
6938
6948
|
if (!absPath) return c.json({ error: `forbidden path: ${file.path}` }, 403);
|
|
6939
6949
|
if (seen.has(absPath)) return c.json({ error: `duplicate path: ${file.path}` }, 400);
|
|
6940
6950
|
seen.add(absPath);
|
|
@@ -7338,14 +7348,14 @@ function registerFileRoutes(api, adapter) {
|
|
|
7338
7348
|
return c.json({ exists: probeElementsInSource(content, body.targets) });
|
|
7339
7349
|
});
|
|
7340
7350
|
api.patch("/projects/:id/files/*", async (c) => {
|
|
7341
|
-
const res = await resolveProjectFile(c, adapter, { mustExist: true });
|
|
7351
|
+
const res = await resolveProjectFile(c, adapter, { mustExist: true, write: true });
|
|
7342
7352
|
if ("error" in res) return res.error;
|
|
7343
7353
|
const body = await c.req.json();
|
|
7344
7354
|
const newPath = body !== null && typeof body === "object" && "newPath" in body ? body.newPath : void 0;
|
|
7345
7355
|
if (typeof newPath !== "string" || !newPath || newPath.includes("\0") || /[\uD800-\uDFFF]/u.test(newPath)) {
|
|
7346
7356
|
return c.json({ error: "newPath required" }, 400);
|
|
7347
7357
|
}
|
|
7348
|
-
const newAbs =
|
|
7358
|
+
const newAbs = resolveWritableWithinProject(res.project.dir, newPath);
|
|
7349
7359
|
if (!newAbs) {
|
|
7350
7360
|
return c.json({ error: "forbidden" }, 403);
|
|
7351
7361
|
}
|
|
@@ -7370,7 +7380,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7370
7380
|
return c.json({ error: "not found" }, 404);
|
|
7371
7381
|
}
|
|
7372
7382
|
const copyPath = generateCopyPath(project.dir, body.path);
|
|
7373
|
-
const destAbs =
|
|
7383
|
+
const destAbs = resolveWritableWithinProject(project.dir, copyPath);
|
|
7374
7384
|
if (!destAbs) {
|
|
7375
7385
|
return c.json({ error: "forbidden" }, 403);
|
|
7376
7386
|
}
|
|
@@ -7396,7 +7406,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
7396
7406
|
if (!project) return c.json({ error: "not found" }, 404);
|
|
7397
7407
|
if (folderGone(project.dir)) return projectDirMissing(c);
|
|
7398
7408
|
const subDir = c.req.query("dir") ?? "";
|
|
7399
|
-
const targetDir = subDir ?
|
|
7409
|
+
const targetDir = subDir ? resolveWritableWithinProject(project.dir, subDir) : project.dir;
|
|
7400
7410
|
if (!targetDir) return c.json({ error: "forbidden" }, 403);
|
|
7401
7411
|
const formData = await c.req.formData();
|
|
7402
7412
|
mkdirWithinProject(project.dir, targetDir);
|
|
@@ -7441,7 +7451,8 @@ function registerFileRoutes(api, adapter) {
|
|
|
7441
7451
|
api.post("/projects/:id/gsap-mutations/*", async (c) => {
|
|
7442
7452
|
const res = await resolveProjectPath(c, adapter, "gsap-mutations", {
|
|
7443
7453
|
mustExist: true,
|
|
7444
|
-
pin: true
|
|
7454
|
+
pin: true,
|
|
7455
|
+
write: true
|
|
7445
7456
|
});
|
|
7446
7457
|
if ("error" in res) return res.error;
|
|
7447
7458
|
const body = await c.req.json().catch(() => null);
|
|
@@ -7453,7 +7464,8 @@ function registerFileRoutes(api, adapter) {
|
|
|
7453
7464
|
api.post("/projects/:id/gsap-mutations-batch/*", async (c) => {
|
|
7454
7465
|
const res = await resolveProjectPath(c, adapter, "gsap-mutations-batch", {
|
|
7455
7466
|
mustExist: true,
|
|
7456
|
-
pin: true
|
|
7467
|
+
pin: true,
|
|
7468
|
+
write: true
|
|
7457
7469
|
});
|
|
7458
7470
|
if ("error" in res) return res.error;
|
|
7459
7471
|
const body = await c.req.json().catch(() => null);
|
|
@@ -7469,7 +7481,8 @@ function registerFileRoutes(api, adapter) {
|
|
|
7469
7481
|
api.post("/projects/:id/gsap-mutation-rollback/*", async (c) => {
|
|
7470
7482
|
const res = await resolveProjectPath(c, adapter, "gsap-mutation-rollback", {
|
|
7471
7483
|
mustExist: true,
|
|
7472
|
-
pin: true
|
|
7484
|
+
pin: true,
|
|
7485
|
+
write: true
|
|
7473
7486
|
});
|
|
7474
7487
|
if ("error" in res) return res.error;
|
|
7475
7488
|
const body = await c.req.json().catch(() => null);
|
|
@@ -7666,6 +7679,25 @@ function lazyPreviewImages(html) {
|
|
|
7666
7679
|
parts.push(html.slice(from));
|
|
7667
7680
|
return parts.join("");
|
|
7668
7681
|
}
|
|
7682
|
+
var OTHER_HOST = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
7683
|
+
var isOtherHost = (el) => OTHER_HOST.test(el.getAttribute("src")?.trim() ?? "");
|
|
7684
|
+
var isProjectVideo = (video) => !video.hasAttribute("crossorigin") && !isOtherHost(video) && ![...video.querySelectorAll("source")].some(isOtherHost);
|
|
7685
|
+
function corsProjectVideos(html) {
|
|
7686
|
+
const tags = findStartTags(html, "video");
|
|
7687
|
+
if (tags.length === 0) return html;
|
|
7688
|
+
const videos = [...parseHTML(html).document.querySelectorAll("video")];
|
|
7689
|
+
if (tags.length !== videos.length) return html;
|
|
7690
|
+
const parts = [];
|
|
7691
|
+
let from = 0;
|
|
7692
|
+
videos.forEach((video, i) => {
|
|
7693
|
+
if (!isProjectVideo(video)) return;
|
|
7694
|
+
const at = (tags[i] ?? 0) + "<video".length;
|
|
7695
|
+
parts.push(html.slice(from, at), ' crossorigin="anonymous"');
|
|
7696
|
+
from = at;
|
|
7697
|
+
});
|
|
7698
|
+
parts.push(html.slice(from));
|
|
7699
|
+
return parts.join("");
|
|
7700
|
+
}
|
|
7669
7701
|
var PROJECT_SIGNATURE_META = "hyperframes-project-signature";
|
|
7670
7702
|
function escapeGsapUrl(url) {
|
|
7671
7703
|
return url.replace(/&/g, "&").replace(/"/g, """);
|
|
@@ -7850,7 +7882,7 @@ try{var url=e.filename&&new URL(e.filename,window.location.href);if(url&&url.ori
|
|
|
7850
7882
|
kinds.push({name:known[name]===1?name:"other",origin:!path?"unknown":path===runtime?"runtime":path.indexOf("/api/projects/")===0?"project":"studio"})});})();</script>`;
|
|
7851
7883
|
function injectStudioPreviewAugmentations(html, adapter, signature, projectDir, activeCompositionPath, options) {
|
|
7852
7884
|
const marked = options.capture ? injectTagsAtHeadStart(
|
|
7853
|
-
html,
|
|
7885
|
+
options.sandboxedCapture ? corsProjectVideos(html) : html,
|
|
7854
7886
|
`<meta name="${STUDIO_PREVIEW_MARK_META}" content="${STUDIO_PREVIEW_CAPTURE_MODE}">`
|
|
7855
7887
|
) : injectTagsAtHeadStart(
|
|
7856
7888
|
lazyPreviewImages(html),
|
|
@@ -7933,7 +7965,7 @@ function resolvePreviewGsapBaseUrl(adapter) {
|
|
|
7933
7965
|
}
|
|
7934
7966
|
return normalizeGsapLocalRoot(adapter.gsapLocalRoot);
|
|
7935
7967
|
}
|
|
7936
|
-
function registerPreviewRoutes(api, adapter) {
|
|
7968
|
+
function registerPreviewRoutes(api, adapter, { sandboxThumbnailCaptures = false } = {}) {
|
|
7937
7969
|
const gsapBaseUrl = resolvePreviewGsapBaseUrl(adapter);
|
|
7938
7970
|
const gsapEtagSalt = `:gsap:${createHash3("sha1").update(gsapBaseUrl).digest("hex").slice(0, 12)}`;
|
|
7939
7971
|
const previewCacheHeaders = (etag) => ({
|
|
@@ -7970,7 +8002,7 @@ function registerPreviewRoutes(api, adapter) {
|
|
|
7970
8002
|
signature,
|
|
7971
8003
|
project.dir,
|
|
7972
8004
|
mainCompositionPath,
|
|
7973
|
-
{ capture, gsapBaseUrl }
|
|
8005
|
+
{ capture, gsapBaseUrl, sandboxedCapture: sandboxThumbnailCaptures }
|
|
7974
8006
|
);
|
|
7975
8007
|
if (previewVariables) bundled = injectPreviewVariables(bundled, previewVariables);
|
|
7976
8008
|
bundled = await injectMediaCodecMap(
|
|
@@ -7999,7 +8031,7 @@ function registerPreviewRoutes(api, adapter) {
|
|
|
7999
8031
|
signature,
|
|
8000
8032
|
project.dir,
|
|
8001
8033
|
fallback.compositionPath,
|
|
8002
|
-
{ capture, gsapBaseUrl }
|
|
8034
|
+
{ capture, gsapBaseUrl, sandboxedCapture: sandboxThumbnailCaptures }
|
|
8003
8035
|
);
|
|
8004
8036
|
if (previewVariables) {
|
|
8005
8037
|
fallbackAugmented = injectPreviewVariables(fallbackAugmented, previewVariables);
|
|
@@ -8102,7 +8134,8 @@ ${etag}`;
|
|
|
8102
8134
|
html = ensureHfIds(await transformPreviewHtml(html, adapter, project, compPath));
|
|
8103
8135
|
html = injectStudioPreviewAugmentations(html, adapter, signature, project.dir, compPath, {
|
|
8104
8136
|
capture,
|
|
8105
|
-
gsapBaseUrl
|
|
8137
|
+
gsapBaseUrl,
|
|
8138
|
+
sandboxedCapture: sandboxThumbnailCaptures
|
|
8106
8139
|
});
|
|
8107
8140
|
if (previewVariables) html = injectPreviewVariables(html, previewVariables);
|
|
8108
8141
|
html = await injectMediaCodecMap(html, adapter, project.dir, compPath, mediaCodecProbeCache);
|
|
@@ -9313,7 +9346,7 @@ function registerFreezeFrameRoutes(api, adapter, extract = ffmpegExtractor, stil
|
|
|
9313
9346
|
}
|
|
9314
9347
|
const project = await adapter.resolveProject(c.req.param("id"));
|
|
9315
9348
|
if (!project) return c.json({ error: "not found" }, 404);
|
|
9316
|
-
const absPath =
|
|
9349
|
+
const absPath = pinWritableWithinProject(project.dir, body.path);
|
|
9317
9350
|
if (!absPath) return c.json({ error: `forbidden path: ${body.path}` }, 403);
|
|
9318
9351
|
const read = readExpected(absPath, body.expectedVersion);
|
|
9319
9352
|
if ("error" in read) return c.json({ error: `${read.error}: ${body.path}` }, read.status);
|
|
@@ -9457,9 +9490,10 @@ async function decodePeakMap(mediaPath) {
|
|
|
9457
9490
|
const track = await probeAudioTrack(mediaPath);
|
|
9458
9491
|
if (!track || track.channels < 1) throw new Error("no audio stream");
|
|
9459
9492
|
const { stream, channels } = track;
|
|
9493
|
+
const ffmpeg = requireFfBinary("ffmpeg");
|
|
9460
9494
|
return new Promise((resolvePromise, reject) => {
|
|
9461
9495
|
const proc = spawn2(
|
|
9462
|
-
|
|
9496
|
+
ffmpeg,
|
|
9463
9497
|
[
|
|
9464
9498
|
"-v",
|
|
9465
9499
|
"error",
|
|
@@ -9911,12 +9945,12 @@ function registerMediaRoutes(api, adapter, options = {}) {
|
|
|
9911
9945
|
if (requestedOutput && containsNullByte(requestedOutput)) {
|
|
9912
9946
|
return c.json({ error: "forbidden" }, 403);
|
|
9913
9947
|
}
|
|
9914
|
-
if (requestedOutput && !
|
|
9948
|
+
if (requestedOutput && !resolveWritableWithinProject(project.dir, requestedOutput)) {
|
|
9915
9949
|
return c.json({ error: "forbidden" }, 403);
|
|
9916
9950
|
}
|
|
9917
9951
|
const taken = outputsInFlight(mediaJobs);
|
|
9918
9952
|
const outputAssetPath = requestedOutput ? uniqueAssetPath(project.dir, requestedOutput, taken) : defaultOutputPath(project.dir, inputAssetPath, taken);
|
|
9919
|
-
const outputPath =
|
|
9953
|
+
const outputPath = pinWritableWithinProject(project.dir, outputAssetPath);
|
|
9920
9954
|
if (!outputPath) return c.json({ error: "forbidden" }, 403);
|
|
9921
9955
|
if (inputIsVideo && !VIDEO_OUTPUT_EXTENSIONS.has(extname(outputAssetPath).toLowerCase())) {
|
|
9922
9956
|
return c.json({ error: "video background removal output must be .webm or .mov" }, 400);
|
|
@@ -9932,7 +9966,7 @@ function registerMediaRoutes(api, adapter, options = {}) {
|
|
|
9932
9966
|
}
|
|
9933
9967
|
taken.add(outputAssetPath);
|
|
9934
9968
|
backgroundOutputAssetPath = defaultPlatePath(project.dir, inputAssetPath, taken);
|
|
9935
|
-
backgroundOutputPath =
|
|
9969
|
+
backgroundOutputPath = pinWritableWithinProject(project.dir, backgroundOutputAssetPath) ?? void 0;
|
|
9936
9970
|
if (!backgroundOutputPath) {
|
|
9937
9971
|
return c.json({ error: "forbidden" }, 403);
|
|
9938
9972
|
}
|
|
@@ -10215,6 +10249,64 @@ function previewErrorPage(status) {
|
|
|
10215
10249
|
const message = refusedPreviewMessage(status);
|
|
10216
10250
|
return `<!doctype html><meta charset="utf-8"><script>window.${STUDIO_PREVIEW_ERRORS}=[${JSON.stringify(message)}]</script><p>${message}</p>`;
|
|
10217
10251
|
}
|
|
10252
|
+
var GRANTED_LOADS = /* @__PURE__ */ new Map([
|
|
10253
|
+
["font", { path: /\.(woff2?|ttf|otf)$/i, type: /^font\// }],
|
|
10254
|
+
["script", { path: /\.m?js$/i, type: /^text\/javascript\b/ }]
|
|
10255
|
+
]);
|
|
10256
|
+
var TOKEN_SEGMENT = /^~([\w-]{43})$/;
|
|
10257
|
+
function opaqueFrameLoadGranted(load) {
|
|
10258
|
+
const grant = load.origin === "null" ? GRANTED_LOADS.get(load.dest ?? "") : void 0;
|
|
10259
|
+
if (!grant?.path.test(load.pathname)) return false;
|
|
10260
|
+
const keepsStoredContentType = load.status === 304;
|
|
10261
|
+
return keepsStoredContentType || grant.type.test(load.contentType ?? "");
|
|
10262
|
+
}
|
|
10263
|
+
function createFrameTokens() {
|
|
10264
|
+
const secret = randomBytes2(32);
|
|
10265
|
+
const tokenFor = (projectId) => createHmac("sha256", secret).update(projectId).digest("base64url");
|
|
10266
|
+
const matches = (projectId, token) => timingSafeEqual(Buffer.from(token), Buffer.from(tokenFor(projectId)));
|
|
10267
|
+
return { tokenFor, matches };
|
|
10268
|
+
}
|
|
10269
|
+
var previewBase = (projectId) => `/api/projects/${encodeURIComponent(projectId)}/preview/`;
|
|
10270
|
+
function tokenPathHeaders(c, res, pathname) {
|
|
10271
|
+
const headers = new Headers(res.headers);
|
|
10272
|
+
headers.set("Referrer-Policy", "no-referrer");
|
|
10273
|
+
const granted = opaqueFrameLoadGranted({
|
|
10274
|
+
origin: c.req.header("origin"),
|
|
10275
|
+
dest: c.req.header("sec-fetch-dest"),
|
|
10276
|
+
pathname,
|
|
10277
|
+
status: res.status,
|
|
10278
|
+
contentType: headers.get("content-type")
|
|
10279
|
+
});
|
|
10280
|
+
if (granted) {
|
|
10281
|
+
headers.set("Access-Control-Allow-Origin", "null");
|
|
10282
|
+
headers.set("X-Content-Type-Options", "nosniff");
|
|
10283
|
+
headers.append("Vary", "Origin");
|
|
10284
|
+
}
|
|
10285
|
+
return headers;
|
|
10286
|
+
}
|
|
10287
|
+
async function underToken(res, headers, projectId, token) {
|
|
10288
|
+
if (res.status !== 200 || !headers.get("content-type")?.startsWith("text/html"))
|
|
10289
|
+
return new Response(res.body, { status: res.status, headers });
|
|
10290
|
+
const base = previewBase(projectId);
|
|
10291
|
+
headers.delete("content-length");
|
|
10292
|
+
const html = (await res.text()).replaceAll(base, `${base}~${token}/`);
|
|
10293
|
+
return new Response(html, { status: res.status, headers });
|
|
10294
|
+
}
|
|
10295
|
+
function serveTokenPreviewPaths(api, tokens, resolveProjectId) {
|
|
10296
|
+
return async (c, next) => {
|
|
10297
|
+
const url = new URL(c.req.url);
|
|
10298
|
+
const segments = url.pathname.split("/");
|
|
10299
|
+
const token = TOKEN_SEGMENT.exec(segments[4] ?? "")?.[1];
|
|
10300
|
+
if (!token) return next();
|
|
10301
|
+
const projectId = await resolveProjectId(c.req.param("id") ?? "");
|
|
10302
|
+
if (!projectId || !tokens.matches(projectId, token)) return c.text("not found", 404);
|
|
10303
|
+
segments.splice(4, 1);
|
|
10304
|
+
url.pathname = segments.join("/");
|
|
10305
|
+
const req = new Request(url, { method: c.req.method, headers: c.req.raw.headers });
|
|
10306
|
+
const res = await api.fetch(req);
|
|
10307
|
+
return underToken(res, tokenPathHeaders(c, res, url.pathname), projectId, token);
|
|
10308
|
+
};
|
|
10309
|
+
}
|
|
10218
10310
|
async function answerRefusedFrameWithPage(c, next) {
|
|
10219
10311
|
await next();
|
|
10220
10312
|
if (c.req.header("sec-fetch-dest") !== "iframe" || c.res.status < 400) return;
|
|
@@ -10230,11 +10322,13 @@ var fromAnotherSite = (c) => {
|
|
|
10230
10322
|
const site = c.req.header("sec-fetch-site");
|
|
10231
10323
|
return site === "cross-site" || site === "same-site";
|
|
10232
10324
|
};
|
|
10233
|
-
|
|
10325
|
+
var isThumbnailCapture = (c) => c.req.query(PREVIEW_CAPTURE_PARAM) !== void 0;
|
|
10326
|
+
var sandboxPreviewForAnotherSiteOrCapture = (sandboxCaptures) => async (c, next) => {
|
|
10234
10327
|
await next();
|
|
10235
10328
|
c.header("Vary", "Sec-Fetch-Site", { append: true });
|
|
10236
|
-
if (fromAnotherSite(c)
|
|
10237
|
-
|
|
10329
|
+
if (fromAnotherSite(c) || sandboxCaptures && isThumbnailCapture(c))
|
|
10330
|
+
c.header("Content-Security-Policy", "sandbox allow-scripts");
|
|
10331
|
+
};
|
|
10238
10332
|
async function refuseThumbnailForAnotherSite(c, next) {
|
|
10239
10333
|
if (fromAnotherSite(c))
|
|
10240
10334
|
return c.json({ error: "forbidden: thumbnail requested by another site" }, 403);
|
|
@@ -10256,7 +10350,23 @@ function urlScheme(url) {
|
|
|
10256
10350
|
}
|
|
10257
10351
|
function createStudioApi(adapter, options = {}) {
|
|
10258
10352
|
const api = new Hono();
|
|
10259
|
-
|
|
10353
|
+
const sandboxThumbnailCaptures = options.sandboxThumbnailCaptures ?? false;
|
|
10354
|
+
const frameTokens = createFrameTokens();
|
|
10355
|
+
const resolveProjectId = (id) => Promise.resolve().then(() => adapter.resolveProject(id)).then(
|
|
10356
|
+
(project) => project?.id,
|
|
10357
|
+
() => void 0
|
|
10358
|
+
);
|
|
10359
|
+
api.use("/projects/:id/preview/*", serveTokenPreviewPaths(api, frameTokens, resolveProjectId));
|
|
10360
|
+
api.use(
|
|
10361
|
+
"/projects/:id/preview/*",
|
|
10362
|
+
sandboxPreviewForAnotherSiteOrCapture(sandboxThumbnailCaptures)
|
|
10363
|
+
);
|
|
10364
|
+
api.get("/projects/:id/frame-token", async (c) => {
|
|
10365
|
+
if (fromAnotherSite(c)) return c.json({ error: "forbidden: requested by another site" }, 403);
|
|
10366
|
+
const projectId = await resolveProjectId(c.req.param("id"));
|
|
10367
|
+
if (!projectId) return c.json({ error: "not found" }, 404);
|
|
10368
|
+
return c.json({ token: frameTokens.tokenFor(projectId) }, 200, { "Cache-Control": "no-store" });
|
|
10369
|
+
});
|
|
10260
10370
|
api.use("/projects/:id/thumbnail/*", refuseThumbnailForAnotherSite);
|
|
10261
10371
|
api.use(async function rejectCrossOriginWrites(c, next) {
|
|
10262
10372
|
if (c.req.method === "GET" || c.req.method === "HEAD" || c.req.method === "OPTIONS") {
|
|
@@ -10316,7 +10426,7 @@ function createStudioApi(adapter, options = {}) {
|
|
|
10316
10426
|
});
|
|
10317
10427
|
registerProjectRoutes(api, adapter);
|
|
10318
10428
|
registerFileRoutes(api, adapter);
|
|
10319
|
-
registerPreviewRoutes(api, adapter);
|
|
10429
|
+
registerPreviewRoutes(api, adapter, { sandboxThumbnailCaptures });
|
|
10320
10430
|
registerLintRoutes(api, adapter);
|
|
10321
10431
|
registerRenderRoutes(api, adapter);
|
|
10322
10432
|
registerThumbnailRoutes(api, adapter);
|
|
@@ -10408,6 +10518,80 @@ ${key}`).digest("hex").slice(0, 32)}.html`);
|
|
|
10408
10518
|
}
|
|
10409
10519
|
};
|
|
10410
10520
|
}
|
|
10521
|
+
var GRANTED_TYPES = /* @__PURE__ */ new Set(["Font", "Script", "Stylesheet", "Image", "Media", "Fetch", "XHR"]);
|
|
10522
|
+
var PROXY_PARAM = "hf-proxy";
|
|
10523
|
+
var VIDEO_FILE = /\.(mp4|webm|mov|mkv|avi|m4v|mxf|mts|m2ts)$/i;
|
|
10524
|
+
function capturePreviewPrefix(captureUrl) {
|
|
10525
|
+
let url;
|
|
10526
|
+
try {
|
|
10527
|
+
url = new URL(captureUrl);
|
|
10528
|
+
} catch {
|
|
10529
|
+
return null;
|
|
10530
|
+
}
|
|
10531
|
+
const path = /^\/api\/projects\/[^/]+\/preview(?=\/|$)/.exec(url.pathname)?.[0];
|
|
10532
|
+
return path ? `${url.origin}${path}/` : null;
|
|
10533
|
+
}
|
|
10534
|
+
var decodedSegment = (segment) => {
|
|
10535
|
+
try {
|
|
10536
|
+
return decodeURIComponent(segment);
|
|
10537
|
+
} catch {
|
|
10538
|
+
return ".";
|
|
10539
|
+
}
|
|
10540
|
+
};
|
|
10541
|
+
var isDotPath = (url, prefix) => url.pathname.slice(new URL(prefix).pathname.length).split("/").some((segment) => decodedSegment(segment).startsWith("."));
|
|
10542
|
+
function captureLoadGrant(load, captureUrl) {
|
|
10543
|
+
const prefix = capturePreviewPrefix(captureUrl);
|
|
10544
|
+
if (!prefix || !load.url.startsWith(prefix)) return null;
|
|
10545
|
+
const url = new URL(load.url);
|
|
10546
|
+
if (isDotPath(url, prefix) || !GRANTED_TYPES.has(load.resourceType)) return null;
|
|
10547
|
+
const proxyWait = (load.resourceType === "XHR" || load.resourceType === "Fetch") && url.searchParams.has(PROXY_PARAM) && VIDEO_FILE.test(url.pathname);
|
|
10548
|
+
if (load.method === "OPTIONS") return proxyWait ? "preflight" : null;
|
|
10549
|
+
return load.method === "GET" ? "read" : null;
|
|
10550
|
+
}
|
|
10551
|
+
var OPAQUE_CALLER = [
|
|
10552
|
+
{ name: "Access-Control-Allow-Origin", value: "null" },
|
|
10553
|
+
{ name: "X-Content-Type-Options", value: "nosniff" },
|
|
10554
|
+
{
|
|
10555
|
+
name: "Access-Control-Expose-Headers",
|
|
10556
|
+
value: `Retry-After, ${PREVIEW_PROXY_PROGRESS_HEADER}, Content-Range`
|
|
10557
|
+
}
|
|
10558
|
+
];
|
|
10559
|
+
var PREFLIGHT_ANSWER = [
|
|
10560
|
+
{ name: "Access-Control-Allow-Origin", value: "null" },
|
|
10561
|
+
{ name: "Access-Control-Allow-Methods", value: "GET" },
|
|
10562
|
+
{ name: "Access-Control-Allow-Headers", value: `Range, ${PREVIEW_PROXY_PRIORITY_HEADER}` }
|
|
10563
|
+
];
|
|
10564
|
+
async function grantCaptureLoads(cdp, captureUrl) {
|
|
10565
|
+
const prefix = capturePreviewPrefix(captureUrl);
|
|
10566
|
+
if (!prefix) return;
|
|
10567
|
+
cdp.on("Fetch.requestPaused", (event) => {
|
|
10568
|
+
const { requestId } = event;
|
|
10569
|
+
const headers = event.responseHeaders ?? [];
|
|
10570
|
+
const status = event.responseStatusCode;
|
|
10571
|
+
const grant = captureLoadGrant(
|
|
10572
|
+
{ url: event.request.url, method: event.request.method, resourceType: event.resourceType },
|
|
10573
|
+
captureUrl
|
|
10574
|
+
);
|
|
10575
|
+
const answered = status !== void 0 && !headers.some((header) => header.name.toLowerCase() === "access-control-allow-origin");
|
|
10576
|
+
const sent = grant === "preflight" ? cdp.send("Fetch.fulfillRequest", {
|
|
10577
|
+
requestId,
|
|
10578
|
+
responseCode: 204,
|
|
10579
|
+
responseHeaders: PREFLIGHT_ANSWER
|
|
10580
|
+
}) : grant && answered ? cdp.send("Fetch.continueResponse", {
|
|
10581
|
+
requestId,
|
|
10582
|
+
responseCode: status,
|
|
10583
|
+
responseHeaders: [...headers, ...OPAQUE_CALLER]
|
|
10584
|
+
}) : cdp.send("Fetch.continueRequest", { requestId });
|
|
10585
|
+
void sent.catch(() => void 0);
|
|
10586
|
+
});
|
|
10587
|
+
await cdp.send("Fetch.enable", {
|
|
10588
|
+
patterns: [...GRANTED_TYPES].map((resourceType) => ({
|
|
10589
|
+
urlPattern: `${prefix}*`,
|
|
10590
|
+
resourceType,
|
|
10591
|
+
requestStage: "Response"
|
|
10592
|
+
}))
|
|
10593
|
+
});
|
|
10594
|
+
}
|
|
10411
10595
|
function thumbnailDeviceScaleFactor({
|
|
10412
10596
|
width,
|
|
10413
10597
|
height,
|
|
@@ -10498,6 +10682,8 @@ export {
|
|
|
10498
10682
|
createStudioApi,
|
|
10499
10683
|
duplicateElementInHtml,
|
|
10500
10684
|
createPreviewDocumentStore,
|
|
10685
|
+
captureLoadGrant,
|
|
10686
|
+
grantCaptureLoads,
|
|
10501
10687
|
thumbnailDeviceScaleFactor,
|
|
10502
10688
|
createBackgroundRemovalJob
|
|
10503
10689
|
};
|
|
@@ -3295,21 +3295,20 @@ function isCompositionVariable(v) {
|
|
|
3295
3295
|
if (v.type === "enum" && !Array.isArray(v.options)) return false;
|
|
3296
3296
|
return true;
|
|
3297
3297
|
}
|
|
3298
|
-
function
|
|
3299
|
-
|
|
3300
|
-
if (!variablesAttr) {
|
|
3301
|
-
return [];
|
|
3302
|
-
}
|
|
3298
|
+
function readCompositionVariables(raw) {
|
|
3299
|
+
if (!raw) return { declarations: [], complete: true };
|
|
3303
3300
|
try {
|
|
3304
|
-
const parsed = JSON.parse(
|
|
3305
|
-
if (!Array.isArray(parsed)) {
|
|
3306
|
-
|
|
3307
|
-
}
|
|
3308
|
-
return parsed.filter(isCompositionVariable);
|
|
3301
|
+
const parsed = JSON.parse(raw);
|
|
3302
|
+
if (!Array.isArray(parsed)) return { declarations: [], complete: false };
|
|
3303
|
+
const declarations = parsed.filter(isCompositionVariable);
|
|
3304
|
+
return { declarations, complete: declarations.length === parsed.length };
|
|
3309
3305
|
} catch {
|
|
3310
|
-
return [];
|
|
3306
|
+
return { declarations: [], complete: false };
|
|
3311
3307
|
}
|
|
3312
3308
|
}
|
|
3309
|
+
function parseCompositionVariables(htmlEl) {
|
|
3310
|
+
return readCompositionVariables(htmlEl.getAttribute("data-composition-variables")).declarations;
|
|
3311
|
+
}
|
|
3313
3312
|
var EXCLUDED_TAGS = /* @__PURE__ */ new Set([
|
|
3314
3313
|
"script",
|
|
3315
3314
|
"style",
|
|
@@ -5369,6 +5368,17 @@ function isCompositionVariable2(v) {
|
|
|
5369
5368
|
if (v.type === "enum" && !Array.isArray(v.options)) return false;
|
|
5370
5369
|
return true;
|
|
5371
5370
|
}
|
|
5371
|
+
function readCompositionVariables2(raw) {
|
|
5372
|
+
if (!raw) return { declarations: [], complete: true };
|
|
5373
|
+
try {
|
|
5374
|
+
const parsed = JSON.parse(raw);
|
|
5375
|
+
if (!Array.isArray(parsed)) return { declarations: [], complete: false };
|
|
5376
|
+
const declarations = parsed.filter(isCompositionVariable2);
|
|
5377
|
+
return { declarations, complete: declarations.length === parsed.length };
|
|
5378
|
+
} catch {
|
|
5379
|
+
return { declarations: [], complete: false };
|
|
5380
|
+
}
|
|
5381
|
+
}
|
|
5372
5382
|
function isSafeMediaUrl(url) {
|
|
5373
5383
|
const normalized = url.replace(/[\u0000-\u0020]/g, "");
|
|
5374
5384
|
const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(normalized);
|
|
@@ -5637,6 +5647,7 @@ export {
|
|
|
5637
5647
|
isFontValue2 as isFontValue,
|
|
5638
5648
|
isImageValue2 as isImageValue,
|
|
5639
5649
|
isCompositionVariable2 as isCompositionVariable,
|
|
5650
|
+
readCompositionVariables2 as readCompositionVariables,
|
|
5640
5651
|
isSafeMediaUrl,
|
|
5641
5652
|
HTML_BODY_CSS_WIDTH_FIRST_RE2,
|
|
5642
5653
|
HTML_BODY_CSS_HEIGHT_FIRST_RE2,
|