@ignix-social/editor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/NOTICE +54 -0
- package/README.md +23 -0
- package/bin/ignix-editor.mjs +8 -0
- package/package.json +53 -0
- package/patches/index.mjs +53 -0
- package/scripts/build-ffmpeg-macos.sh +35 -0
- package/scripts/build-whisper-macos.sh +21 -0
- package/scripts/vendor.mjs +41 -0
- package/skills/ignix-editor/SKILL.md +132 -0
- package/src/audio.mjs +31 -0
- package/src/binaries.json +46 -0
- package/src/binaries.mjs +83 -0
- package/src/cli.mjs +254 -0
- package/src/prepare.mjs +74 -0
- package/src/runtime/ignix-frame.js +92 -0
- package/src/transcribe.mjs +71 -0
- package/src/validate.mjs +71 -0
- package/templates/blank/index.html +41 -0
- package/vendor/hyperframes/README.md +181 -0
- package/vendor/hyperframes/UPSTREAM.json +12 -0
- package/vendor/hyperframes/bin/hyperframes-localize-fonts.mjs +12 -0
- package/vendor/hyperframes/bin/hyperframes.mjs +11 -0
- package/vendor/hyperframes/dist/add-LR3ZR2A5.js +79 -0
- package/vendor/hyperframes/dist/agentPromptGenerator-VIIPZCJ3.js +143 -0
- package/vendor/hyperframes/dist/animatedGifPrep-P2T6YM7Z.js +34 -0
- package/vendor/hyperframes/dist/asset-BE2DOV72.js +26 -0
- package/vendor/hyperframes/dist/assetCataloger-VBLPHX24.js +340 -0
- package/vendor/hyperframes/dist/auth-RCQB2ZT7.js +60 -0
- package/vendor/hyperframes/dist/autoUpdate-RJAX3DAZ.js +268 -0
- package/vendor/hyperframes/dist/backgroundChecks-H2LCUIMJ.js +61 -0
- package/vendor/hyperframes/dist/backgroundChecksWorker.js +26 -0
- package/vendor/hyperframes/dist/batchRender-FT7AP7XH.js +355 -0
- package/vendor/hyperframes/dist/beat-analyzer.global.js +338 -0
- package/vendor/hyperframes/dist/beats-Y2EOP72P.js +309 -0
- package/vendor/hyperframes/dist/benchmark-MZ7GY3JW.js +231 -0
- package/vendor/hyperframes/dist/browser-HUTAMRQE.js +237 -0
- package/vendor/hyperframes/dist/bundleWithLocalizedFonts-5QOPOB5D.js +52 -0
- package/vendor/hyperframes/dist/capture-RLZA6EMR.js +4079 -0
- package/vendor/hyperframes/dist/capture-SZZ4IYJK.js +290 -0
- package/vendor/hyperframes/dist/captureFile-LYOJOUIE.js +15 -0
- package/vendor/hyperframes/dist/captureTimeout-PA4FYWT5.js +27 -0
- package/vendor/hyperframes/dist/catalog-KYU55EWR.js +1001 -0
- package/vendor/hyperframes/dist/check-TCG4PXLR.js +1697 -0
- package/vendor/hyperframes/dist/checkBrowser-RPMO4OW5.js +1032 -0
- package/vendor/hyperframes/dist/chunk-2EAXUCCE.js +88 -0
- package/vendor/hyperframes/dist/chunk-2EGFTPWD.js +1077 -0
- package/vendor/hyperframes/dist/chunk-2PSPARWP.js +6058 -0
- package/vendor/hyperframes/dist/chunk-2YN64IN5.js +5747 -0
- package/vendor/hyperframes/dist/chunk-3GXQPCJC.js +682 -0
- package/vendor/hyperframes/dist/chunk-3ZP5DXE7.js +15 -0
- package/vendor/hyperframes/dist/chunk-4NWOGZZS.js +1990 -0
- package/vendor/hyperframes/dist/chunk-4PFZPP2N.js +587 -0
- package/vendor/hyperframes/dist/chunk-4THIAPBL.js +128 -0
- package/vendor/hyperframes/dist/chunk-4YYJOFKS.js +28 -0
- package/vendor/hyperframes/dist/chunk-54HJ63Q2.js +29 -0
- package/vendor/hyperframes/dist/chunk-5ETJX6WM.js +89 -0
- package/vendor/hyperframes/dist/chunk-5IAKAQA7.js +389 -0
- package/vendor/hyperframes/dist/chunk-5Z63TBTX.js +37 -0
- package/vendor/hyperframes/dist/chunk-6BEFEWFB.js +25 -0
- package/vendor/hyperframes/dist/chunk-6CSYCFQV.js +68 -0
- package/vendor/hyperframes/dist/chunk-6CTIGJY7.js +154 -0
- package/vendor/hyperframes/dist/chunk-7HG4BFIN.js +93 -0
- package/vendor/hyperframes/dist/chunk-7JZ4FXP2.js +118 -0
- package/vendor/hyperframes/dist/chunk-A2Z4Z4VL.js +2961 -0
- package/vendor/hyperframes/dist/chunk-AMKC3AXA.js +25 -0
- package/vendor/hyperframes/dist/chunk-AVUUN2XD.js +4847 -0
- package/vendor/hyperframes/dist/chunk-AWDFDFI3.js +46 -0
- package/vendor/hyperframes/dist/chunk-AWNBM3MZ.js +94 -0
- package/vendor/hyperframes/dist/chunk-BXCMXMJQ.js +73 -0
- package/vendor/hyperframes/dist/chunk-BZ56MTDX.js +6 -0
- package/vendor/hyperframes/dist/chunk-CFKU7HTK.js +171 -0
- package/vendor/hyperframes/dist/chunk-CWPVM2QV.js +308 -0
- package/vendor/hyperframes/dist/chunk-DPVXBVLL.js +31292 -0
- package/vendor/hyperframes/dist/chunk-DQBY7FRR.js +397 -0
- package/vendor/hyperframes/dist/chunk-E6RPWJVC.js +213 -0
- package/vendor/hyperframes/dist/chunk-EISRN4E6.js +294 -0
- package/vendor/hyperframes/dist/chunk-EOVYQ3IG.js +143 -0
- package/vendor/hyperframes/dist/chunk-F3WZGU7C.js +479 -0
- package/vendor/hyperframes/dist/chunk-FCSIGXXP.js +366 -0
- package/vendor/hyperframes/dist/chunk-FI4I7CME.js +56 -0
- package/vendor/hyperframes/dist/chunk-FLWXXDNS.js +15 -0
- package/vendor/hyperframes/dist/chunk-GK4AIFIH.js +11171 -0
- package/vendor/hyperframes/dist/chunk-GMECXFAN.js +57 -0
- package/vendor/hyperframes/dist/chunk-GULOKZLI.js +155 -0
- package/vendor/hyperframes/dist/chunk-H4YZZ2VQ.js +68 -0
- package/vendor/hyperframes/dist/chunk-H6QMKUYA.js +477 -0
- package/vendor/hyperframes/dist/chunk-HBBJFK6I.js +273 -0
- package/vendor/hyperframes/dist/chunk-HRUGC23L.js +212 -0
- package/vendor/hyperframes/dist/chunk-HVW7ABXD.js +19 -0
- package/vendor/hyperframes/dist/chunk-HW6OYASV.js +344 -0
- package/vendor/hyperframes/dist/chunk-HWKCIWQT.js +3578 -0
- package/vendor/hyperframes/dist/chunk-I465DBM6.js +1214 -0
- package/vendor/hyperframes/dist/chunk-IGLEPPTN.js +24 -0
- package/vendor/hyperframes/dist/chunk-IGNAAHS3.js +433 -0
- package/vendor/hyperframes/dist/chunk-IHFUKJOR.js +85 -0
- package/vendor/hyperframes/dist/chunk-IQ3OUQ5Z.js +213 -0
- package/vendor/hyperframes/dist/chunk-ISN5GRYI.js +20 -0
- package/vendor/hyperframes/dist/chunk-IUZFXWSV.js +446 -0
- package/vendor/hyperframes/dist/chunk-JH556Q42.js +647 -0
- package/vendor/hyperframes/dist/chunk-JTHMTOMQ.js +601 -0
- package/vendor/hyperframes/dist/chunk-K2EQN4VU.js +405 -0
- package/vendor/hyperframes/dist/chunk-K2FTXJYH.js +16044 -0
- package/vendor/hyperframes/dist/chunk-K4WIOZFP.js +32 -0
- package/vendor/hyperframes/dist/chunk-K4WKGXRC.js +18 -0
- package/vendor/hyperframes/dist/chunk-KBJUXVOJ.js +172 -0
- package/vendor/hyperframes/dist/chunk-KC5XXX3X.js +590 -0
- package/vendor/hyperframes/dist/chunk-KNU5COPB.js +29 -0
- package/vendor/hyperframes/dist/chunk-KZI44OPA.js +185 -0
- package/vendor/hyperframes/dist/chunk-L3YOGIPG.js +48 -0
- package/vendor/hyperframes/dist/chunk-LAOCA3MQ.js +189 -0
- package/vendor/hyperframes/dist/chunk-LCSMOLGX.js +312 -0
- package/vendor/hyperframes/dist/chunk-LFGJWOVA.js +61 -0
- package/vendor/hyperframes/dist/chunk-LHSR3M4M.js +498 -0
- package/vendor/hyperframes/dist/chunk-LYNI3FOL.js +123 -0
- package/vendor/hyperframes/dist/chunk-M2WBOQ2Q.js +54 -0
- package/vendor/hyperframes/dist/chunk-MRF4AMKD.js +104 -0
- package/vendor/hyperframes/dist/chunk-MWB3ZIFM.js +852 -0
- package/vendor/hyperframes/dist/chunk-NGKM64BP.js +39 -0
- package/vendor/hyperframes/dist/chunk-NXMYHJAL.js +43 -0
- package/vendor/hyperframes/dist/chunk-OAF4XJOW.js +192 -0
- package/vendor/hyperframes/dist/chunk-OFQWTKPW.js +117 -0
- package/vendor/hyperframes/dist/chunk-P6LJ4Y32.js +4662 -0
- package/vendor/hyperframes/dist/chunk-PBN6GBJE.js +108 -0
- package/vendor/hyperframes/dist/chunk-PDAMK4Q5.js +28 -0
- package/vendor/hyperframes/dist/chunk-PFCFR3KZ.js +20 -0
- package/vendor/hyperframes/dist/chunk-PJ3HDUCY.js +108 -0
- package/vendor/hyperframes/dist/chunk-PMRBLBUP.js +152 -0
- package/vendor/hyperframes/dist/chunk-PPQUYWTW.js +240 -0
- package/vendor/hyperframes/dist/chunk-Q5X2B5WT.js +29 -0
- package/vendor/hyperframes/dist/chunk-Q7IU7MOR.js +351 -0
- package/vendor/hyperframes/dist/chunk-QC4FJVLM.js +371 -0
- package/vendor/hyperframes/dist/chunk-QNYYOUU3.js +1318 -0
- package/vendor/hyperframes/dist/chunk-RDNNAKEP.js +161 -0
- package/vendor/hyperframes/dist/chunk-RMHUQGRK.js +657 -0
- package/vendor/hyperframes/dist/chunk-RQVDTPGD.js +6 -0
- package/vendor/hyperframes/dist/chunk-RVCWIIZ7.js +68 -0
- package/vendor/hyperframes/dist/chunk-S3D6GE5W.js +72 -0
- package/vendor/hyperframes/dist/chunk-S3S4TGEH.js +424 -0
- package/vendor/hyperframes/dist/chunk-S7NPLFWV.js +11395 -0
- package/vendor/hyperframes/dist/chunk-SHB5VDMH.js +51 -0
- package/vendor/hyperframes/dist/chunk-TCLGPL65.js +860 -0
- package/vendor/hyperframes/dist/chunk-THXFSPLV.js +40 -0
- package/vendor/hyperframes/dist/chunk-TJSTGSAW.js +354 -0
- package/vendor/hyperframes/dist/chunk-TQFG7HTI.js +1024 -0
- package/vendor/hyperframes/dist/chunk-TVCRUG2S.js +265 -0
- package/vendor/hyperframes/dist/chunk-TWWSYAKJ.js +24 -0
- package/vendor/hyperframes/dist/chunk-U7CZBDMV.js +27 -0
- package/vendor/hyperframes/dist/chunk-UEZXMWG3.js +139 -0
- package/vendor/hyperframes/dist/chunk-UYEZTK4U.js +61 -0
- package/vendor/hyperframes/dist/chunk-VC76R6W2.js +27 -0
- package/vendor/hyperframes/dist/chunk-VFCKXTBB.js +159 -0
- package/vendor/hyperframes/dist/chunk-VWG7OQKU.js +22 -0
- package/vendor/hyperframes/dist/chunk-VXVRPIJA.js +105 -0
- package/vendor/hyperframes/dist/chunk-WBLXWOYK.js +15 -0
- package/vendor/hyperframes/dist/chunk-WERLJGIC.js +20 -0
- package/vendor/hyperframes/dist/chunk-WMQNIQDJ.js +2057 -0
- package/vendor/hyperframes/dist/chunk-WPHMNO44.js +4528 -0
- package/vendor/hyperframes/dist/chunk-X5HWXQPU.js +113 -0
- package/vendor/hyperframes/dist/chunk-X7MTZ4T2.js +6 -0
- package/vendor/hyperframes/dist/chunk-XH4DSOS5.js +59 -0
- package/vendor/hyperframes/dist/chunk-XS4EJSKU.js +23 -0
- package/vendor/hyperframes/dist/chunk-XT5P4QMO.js +181 -0
- package/vendor/hyperframes/dist/chunk-XT7X6QCP.js +6 -0
- package/vendor/hyperframes/dist/chunk-XUHOIDKG.js +6 -0
- package/vendor/hyperframes/dist/chunk-XUXGIA7H.js +485 -0
- package/vendor/hyperframes/dist/chunk-XZABUQTX.js +113 -0
- package/vendor/hyperframes/dist/chunk-Y6W4DVPS.js +356 -0
- package/vendor/hyperframes/dist/chunk-YEIFI443.js +44 -0
- package/vendor/hyperframes/dist/chunk-YQZNILVH.js +375 -0
- package/vendor/hyperframes/dist/chunk-Z27A7NUB.js +65 -0
- package/vendor/hyperframes/dist/chunk-Z6B37SNM.js +3081 -0
- package/vendor/hyperframes/dist/chunk-ZJUKFZ2P.js +10954 -0
- package/vendor/hyperframes/dist/chunk-ZKDMAOFU.js +32 -0
- package/vendor/hyperframes/dist/chunk-ZMXUQLI2.js +17219 -0
- package/vendor/hyperframes/dist/chunk-ZTZ7NCJT.js +58 -0
- package/vendor/hyperframes/dist/chunk-ZTZA4UWZ.js +108 -0
- package/vendor/hyperframes/dist/clean-W57E5YQ3.js +293 -0
- package/vendor/hyperframes/dist/cli.js +495 -0
- package/vendor/hyperframes/dist/cloud-FFTJGZ24.js +70 -0
- package/vendor/hyperframes/dist/cloudrun-AJUTHUEA.js +763 -0
- package/vendor/hyperframes/dist/colors-HKWSZCGK.js +15 -0
- package/vendor/hyperframes/dist/commands/contrast-audit.browser.js +459 -0
- package/vendor/hyperframes/dist/commands/layout-audit.browser.js +2102 -0
- package/vendor/hyperframes/dist/commands/motion-sample.browser.js +74 -0
- package/vendor/hyperframes/dist/commands/motion-signature.browser.js +374 -0
- package/vendor/hyperframes/dist/compare-AYCTT55F.js +421 -0
- package/vendor/hyperframes/dist/compiler-QO36EXLS.js +121 -0
- package/vendor/hyperframes/dist/component-VFFR2O7T.js +176 -0
- package/vendor/hyperframes/dist/compositions-QTVN3U2A.js +228 -0
- package/vendor/hyperframes/dist/contactSheet-27SRU7A4.js +22 -0
- package/vendor/hyperframes/dist/delete-ZAKYCB7I.js +114 -0
- package/vendor/hyperframes/dist/deploy-MX76RZ36.js +101 -0
- package/vendor/hyperframes/dist/destroy-H2TZBYHH.js +42 -0
- package/vendor/hyperframes/dist/deterministicFonts-HAEMV4TM.js +50 -0
- package/vendor/hyperframes/dist/dist-EWXJGN63.js +129 -0
- package/vendor/hyperframes/dist/dist-FNNGCKFS.js +29 -0
- package/vendor/hyperframes/dist/dist-S3PJNPXQ.js +392 -0
- package/vendor/hyperframes/dist/docker/Dockerfile.render +65 -0
- package/vendor/hyperframes/dist/docs/compositions.md +67 -0
- package/vendor/hyperframes/dist/docs/data-attributes.md +27 -0
- package/vendor/hyperframes/dist/docs/examples.md +19 -0
- package/vendor/hyperframes/dist/docs/gsap.md +26 -0
- package/vendor/hyperframes/dist/docs/rendering.md +35 -0
- package/vendor/hyperframes/dist/docs/troubleshooting.md +29 -0
- package/vendor/hyperframes/dist/docs-QAPJEGLS.js +131 -0
- package/vendor/hyperframes/dist/doctor-AI7C3FON.js +67 -0
- package/vendor/hyperframes/dist/dom-IROKGVJI.js +14 -0
- package/vendor/hyperframes/dist/dotEnv-AECLXQSO.js +14 -0
- package/vendor/hyperframes/dist/events-7LALYNKZ.js +92 -0
- package/vendor/hyperframes/dist/events-FQY3HGKZ.js +88 -0
- package/vendor/hyperframes/dist/feedback-WCMDMSTK.js +472 -0
- package/vendor/hyperframes/dist/ffmpeg-QIUFEFTY.js +35 -0
- package/vendor/hyperframes/dist/figma-64WY462P.js +63 -0
- package/vendor/hyperframes/dist/fontData.generated-NXAOI4GH.js +13 -0
- package/vendor/hyperframes/dist/fontLocalizeCli.js +132 -0
- package/vendor/hyperframes/dist/get-FPOMJMZB.js +103 -0
- package/vendor/hyperframes/dist/gpuPolicy-2ZUZE5D6.js +38 -0
- package/vendor/hyperframes/dist/grade-compare-E2CKPST4.js +647 -0
- package/vendor/hyperframes/dist/gsapParser-DIYYX6JT.js +2846 -0
- package/vendor/hyperframes/dist/gsapParserAcorn-E3GEIRZB.js +28 -0
- package/vendor/hyperframes/dist/help-YRQIDDML.js +197 -0
- package/vendor/hyperframes/dist/history-PP5NDRV3.js +571 -0
- package/vendor/hyperframes/dist/hyperframe-runtime.js +1081 -0
- package/vendor/hyperframes/dist/hyperframe.manifest.json +22 -0
- package/vendor/hyperframes/dist/hyperframe.runtime.iife.js +1081 -0
- package/vendor/hyperframes/dist/hyperframes-player.global.js +474 -0
- package/vendor/hyperframes/dist/hyperframes-slideshow.global.js +149 -0
- package/vendor/hyperframes/dist/info-SEX3B7JL.js +153 -0
- package/vendor/hyperframes/dist/init-U3AKHO5B.js +1147 -0
- package/vendor/hyperframes/dist/inspect-Q3K6EDEK.js +97 -0
- package/vendor/hyperframes/dist/installer-K6O5WF44.js +37 -0
- package/vendor/hyperframes/dist/keyframes-DC64JCI3.js +2602 -0
- package/vendor/hyperframes/dist/lambda-D7UMN4DJ.js +451 -0
- package/vendor/hyperframes/dist/layout-XSPPDHOO.js +86 -0
- package/vendor/hyperframes/dist/lib-TPG2ZMAX.js +128 -0
- package/vendor/hyperframes/dist/lint-7DQZE7L3.js +164 -0
- package/vendor/hyperframes/dist/lintProject-OHBBM3DJ.js +27 -0
- package/vendor/hyperframes/dist/list-4K5MVDQX.js +162 -0
- package/vendor/hyperframes/dist/login-NTX4OWXL.js +377 -0
- package/vendor/hyperframes/dist/logout-Q654A3SI.js +100 -0
- package/vendor/hyperframes/dist/manager-67P2XFXQ.js +34 -0
- package/vendor/hyperframes/dist/manager-CT3D67CG.js +38 -0
- package/vendor/hyperframes/dist/manager-GFN75DM4.js +30 -0
- package/vendor/hyperframes/dist/media-treatment-5FYAOPNL.js +972 -0
- package/vendor/hyperframes/dist/media-use-4XXGABIL.js +113 -0
- package/vendor/hyperframes/dist/models-C4E4IWJD.js +137 -0
- package/vendor/hyperframes/dist/motionShot-S4MIGMT5.js +614 -0
- package/vendor/hyperframes/dist/normalize-O76AC4HE.js +333 -0
- package/vendor/hyperframes/dist/normalize-audio-CSFTXLXD.js +276 -0
- package/vendor/hyperframes/dist/open-2ZD6BHZG.js +115 -0
- package/vendor/hyperframes/dist/pipeline-TNGWUZQC.js +54 -0
- package/vendor/hyperframes/dist/play-CTMUXX6E.js +349 -0
- package/vendor/hyperframes/dist/policies-FSDZVS2E.js +292 -0
- package/vendor/hyperframes/dist/preflight-SMNV6RW2.js +45 -0
- package/vendor/hyperframes/dist/present-WQVHV5CR.js +350 -0
- package/vendor/hyperframes/dist/preview-JOJXTH75.js +1820 -0
- package/vendor/hyperframes/dist/producer-ECLEN5RP.js +13 -0
- package/vendor/hyperframes/dist/progress-FBIEEB7Y.js +73 -0
- package/vendor/hyperframes/dist/projectConfig-HYJMJ5BY.js +56 -0
- package/vendor/hyperframes/dist/publication-HQ5Y3KBM.js +29 -0
- package/vendor/hyperframes/dist/publish-VHDYQASC.js +430 -0
- package/vendor/hyperframes/dist/refresh-K24ETHMA.js +53 -0
- package/vendor/hyperframes/dist/remove-background-W2YX2NVH.js +253 -0
- package/vendor/hyperframes/dist/render-AO5VX3YI.js +177 -0
- package/vendor/hyperframes/dist/render-LNO62LEL.js +2367 -0
- package/vendor/hyperframes/dist/render-TTQI7TGN.js +796 -0
- package/vendor/hyperframes/dist/render-batch-YH7CTWNY.js +284 -0
- package/vendor/hyperframes/dist/renderCancellation-JPIHE47X.js +35 -0
- package/vendor/hyperframes/dist/renderSetupWorker.js +79 -0
- package/vendor/hyperframes/dist/resolver-IZ647GBZ.js +38 -0
- package/vendor/hyperframes/dist/runtimeVersion.js +18 -0
- package/vendor/hyperframes/dist/screenshotCapture-ECBTLCU6.js +179 -0
- package/vendor/hyperframes/dist/shaderTransitionWorker.js +44 -0
- package/vendor/hyperframes/dist/sherpa-KKLNW6U2.js +314 -0
- package/vendor/hyperframes/dist/sherpaWorker.js +77 -0
- package/vendor/hyperframes/dist/sites-TNVKZS73.js +52 -0
- package/vendor/hyperframes/dist/skill-ZHVLH7KX.js +15 -0
- package/vendor/hyperframes/dist/skills/hyperframes/SKILL.md +152 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/brief-contract.md +108 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/brief-format.md +72 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/capability-menu.md +47 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/frame-worker-core.md +80 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/intent-interview.md +73 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/pitch-round.md +40 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/plugin-installation.md +43 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/production-loop.md +26 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/review-loop.md +37 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/route-briefs.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/embedded-captions.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/faceless-explainer.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/general-video.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/motion-graphics.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/music-to-video.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/pr-to-video.md +28 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/product-launch-video.md +13 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/remotion-to-hyperframes.md +9 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/slideshow.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/talking-head-recut.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/script-format.md +52 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/skill-lifecycle.md +35 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/storyboard-format.md +99 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/subagent-dispatch.md +35 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/workflow-catalog.md +10 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/lib/frame-packets-core.mjs +194 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/plugin-cli.mjs +88 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +117 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/SKILL.md +189 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/beats.md +19 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/cloud.md +163 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/cloudrun.md +62 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/compare-and-batch.md +105 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/doctor-browser.md +57 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/init-and-scaffold.md +74 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/lambda.md +185 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +132 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/preview-render.md +193 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +134 -0
- package/vendor/hyperframes/dist/skills/media-use/SKILL.md +100 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/CREDITS.md +35 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/chime.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/click-soft.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/click.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/error.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-1.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-2.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-3.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/impact-bass-1.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/impact-bass-2.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/key-press.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/manifest.json +97 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/notification.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/ping.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/pop.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/riser.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/sparkle.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/typing.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh-cinematic.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh-short.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/bgm.md +76 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/authoring.md +163 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/motion.md +87 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/transcript-handling.md +97 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/remove-background.md +143 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/requirements.md +29 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/sfx.md +42 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/transcribe.md +52 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/tts-to-captions.md +35 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/tts.md +260 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/audio.mjs +311 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/audio.test.mjs +159 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +131 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-tts.mjs +122 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-tts.test.mjs +38 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-voice.mjs +98 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-voice.test.mjs +233 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/audio-meta.mjs +39 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm-volume.mjs +4 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm.mjs +257 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm.test.mjs +74 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/concurrency.mjs +14 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/concurrency.test.mjs +41 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.mjs +43 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.py +52 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.test.mjs +86 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth_test.py +90 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-tts.mjs +122 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-tts.test.mjs +243 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/heygen.mjs +197 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +185 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/media-record.mjs +114 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +205 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/python.mjs +77 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/python.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/sfx.mjs +165 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +121 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.mjs +389 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +158 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +230 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lyria-recipe.py +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/wait-bgm.mjs +175 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/wait-bgm.test.mjs +108 -0
- package/vendor/hyperframes/dist/skills/media-use/luts/README.md +28 -0
- package/vendor/hyperframes/dist/skills/media-use/luts/index.json +57 -0
- package/vendor/hyperframes/dist/skills/media-use/references/audio.md +20 -0
- package/vendor/hyperframes/dist/skills/media-use/references/grading.md +160 -0
- package/vendor/hyperframes/dist/skills/media-use/references/media-treatment-recipes.md +929 -0
- package/vendor/hyperframes/dist/skills/media-use/references/media-treatments.md +202 -0
- package/vendor/hyperframes/dist/skills/media-use/references/memory.md +37 -0
- package/vendor/hyperframes/dist/skills/media-use/references/meta.md +61 -0
- package/vendor/hyperframes/dist/skills/media-use/references/operations.md +327 -0
- package/vendor/hyperframes/dist/skills/media-use/references/resolve.md +150 -0
- package/vendor/hyperframes/dist/skills/media-use/references/setup-providers.md +80 -0
- package/vendor/hyperframes/dist/skills/media-use/references/telemetry-dashboard.md +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/audio-duck.mjs +113 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/compatibility.test.mjs +96 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/dither.mjs +328 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/dither.test.mjs +176 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/eval.mjs +369 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/adopt.mjs +128 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/adopt.test.mjs +95 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bgm-provider.mjs +20 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/brand-provider.mjs +59 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bundled-sfx-provider.mjs +119 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bundled-sfx-provider.test.mjs +139 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cache.mjs +148 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/candidates.mjs +91 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/candidates.test.mjs +155 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/codex-provider.mjs +161 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/codex-provider.test.mjs +34 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.d.mts +3 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.mjs +45 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.test.mjs +79 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/coverage.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-build.mjs +181 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-build.test.mjs +80 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-validate.mjs +198 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-validate.test.mjs +125 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cutlist.mjs +184 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cutlist.test.mjs +162 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/duck.mjs +95 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/duck.test.mjs +153 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/error-diffusion.mjs +230 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/error-diffusion.test.mjs +102 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ff-binaries.mjs +37 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/freeze.mjs +72 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/freeze.test.mjs +138 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/grade-analyzer.mjs +265 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/grade-analyzer.test.mjs +285 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-cli.mjs +191 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +301 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-search.mjs +45 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-search.test.mjs +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-video-provider.mjs +138 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-video-provider.test.mjs +435 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/image-provider.mjs +44 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/index-gen.mjs +63 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-media-search.mjs +32 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-models.mjs +318 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-models.test.mjs +220 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-run.mjs +78 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-run.test.mjs +121 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/logo-provider.mjs +244 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +298 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ltx-video-provider.mjs +94 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ltx-video-provider.test.mjs +316 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/lut-preset-provider.mjs +271 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/lut-preset-provider.test.mjs +199 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.d.mts +19 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.mjs +279 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.test.mjs +397 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/match.mjs +47 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-fetch.mjs +85 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-fetch.test.mjs +197 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-home.mjs +20 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-home.test.mjs +61 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-search.d.mts +9 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-search.mjs +107 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/mflux-provider.mjs +128 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/mflux-provider.test.mjs +174 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/misses.mjs +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/misses.test.mjs +89 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/npx-sync.mjs +31 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +50 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/parakeet-words.mjs +27 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/parakeet-words.test.mjs +44 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/prefs-store.mjs +180 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/prefs-store.test.mjs +189 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/probe.mjs +41 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/probe.test.mjs +148 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/providers.mjs +5 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/recipe-store.mjs +367 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/recipe-store.test.mjs +367 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/registry.mjs +212 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/registry.test.mjs +262 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/search.mjs +24 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/search.test.mjs +32 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/sfx-provider.mjs +23 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/specs.mjs +132 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/specs.test.mjs +157 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/stats.mjs +117 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/stats.test.mjs +165 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/svg-sanitize.mjs +21 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/telemetry.mjs +210 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/telemetry.test.mjs +437 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/test-home.test.mjs +10 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/transcriptCutFade.mjs +21 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/transcriptCutFade.test.mjs +33 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/tts-local-provider.mjs +94 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +72 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/usage.mjs +57 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/usage.test.mjs +54 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/voice-provider.mjs +57 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/voice-provider.test.mjs +46 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/words.mjs +18 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/prefs.mjs +70 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/recipe.mjs +103 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/resolve-plugin.test.mjs +62 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/resolve.mjs +1369 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcribe.mjs +194 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcribe.test.mjs +112 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcript-cut.mjs +270 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcript-cut.test.mjs +117 -0
- package/vendor/hyperframes/dist/skills-MJ2J4GEM.js +808 -0
- package/vendor/hyperframes/dist/skillsUpdateCheck-TKTYQN5R.js +26 -0
- package/vendor/hyperframes/dist/slideshow-EJ4IMY6P.js +24 -0
- package/vendor/hyperframes/dist/snapshot-KIVDUUMN.js +875 -0
- package/vendor/hyperframes/dist/src-6YQBJGWR.js +202 -0
- package/vendor/hyperframes/dist/src-PVYUYV3M.js +471 -0
- package/vendor/hyperframes/dist/state-KAXGHF77.js +26 -0
- package/vendor/hyperframes/dist/staticProjectServer-7EU666GS.js +49 -0
- package/vendor/hyperframes/dist/status-YM52BQ6S.js +311 -0
- package/vendor/hyperframes/dist/studio/assets/hyperframes-player-Cp8e_Zst.js +473 -0
- package/vendor/hyperframes/dist/studio/assets/index-BX3KHhGX.js +71 -0
- package/vendor/hyperframes/dist/studio/assets/index-CASEBNy2.js +1 -0
- package/vendor/hyperframes/dist/studio/assets/index-D11atkBt.css +1 -0
- package/vendor/hyperframes/dist/studio/assets/index-DMTt9nTf.js +531 -0
- package/vendor/hyperframes/dist/studio/assets/index-oE1pOdAy.js +399 -0
- package/vendor/hyperframes/dist/studio/chunk-5VSXRGIX.js +948 -0
- package/vendor/hyperframes/dist/studio/chunk-5VSXRGIX.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-7UQWVN52.js +938 -0
- package/vendor/hyperframes/dist/studio/chunk-7UQWVN52.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-EEXSYY5F.js +190 -0
- package/vendor/hyperframes/dist/studio/chunk-EEXSYY5F.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-FOEID72M.js +1441 -0
- package/vendor/hyperframes/dist/studio/chunk-FOEID72M.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-PZ5AY32C.js +10 -0
- package/vendor/hyperframes/dist/studio/chunk-PZ5AY32C.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-TDWGXBUT.js +1103 -0
- package/vendor/hyperframes/dist/studio/chunk-TDWGXBUT.js.map +1 -0
- package/vendor/hyperframes/dist/studio/domEditingLayers-IEVLO54Z.js +47 -0
- package/vendor/hyperframes/dist/studio/domEditingLayers-IEVLO54Z.js.map +1 -0
- package/vendor/hyperframes/dist/studio/favicon.svg +14 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/audio.svg +7 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/captions.svg +5 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/composition.svg +12 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/image.svg +18 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/music.svg +10 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/text.svg +3 -0
- package/vendor/hyperframes/dist/studio/index.css +165 -0
- package/vendor/hyperframes/dist/studio/index.css.map +1 -0
- package/vendor/hyperframes/dist/studio/index.d.ts +4296 -0
- package/vendor/hyperframes/dist/studio/index.html +23 -0
- package/vendor/hyperframes/dist/studio/index.js +99693 -0
- package/vendor/hyperframes/dist/studio/index.js.map +1 -0
- package/vendor/hyperframes/dist/studio/player.d.ts +30 -0
- package/vendor/hyperframes/dist/studio/player.js +10 -0
- package/vendor/hyperframes/dist/studio/player.js.map +1 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.d.ts +39 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.js +50 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.js.map +1 -0
- package/vendor/hyperframes/dist/studio/styles.css +1 -0
- package/vendor/hyperframes/dist/studio/ui.d.ts +296 -0
- package/vendor/hyperframes/dist/studio/ui.js +66 -0
- package/vendor/hyperframes/dist/studio/ui.js.map +1 -0
- package/vendor/hyperframes/dist/studio-api-PNQZRPX5.js +136 -0
- package/vendor/hyperframes/dist/studioSelectionClient-IUUPKUHZ.js +25 -0
- package/vendor/hyperframes/dist/studioServer-UWRBPIOJ.js +1457 -0
- package/vendor/hyperframes/dist/synthesize-K62TIZWI.js +182 -0
- package/vendor/hyperframes/dist/system-EZYZNUFD.js +44 -0
- package/vendor/hyperframes/dist/telemetry-2YC4SGQU.js +144 -0
- package/vendor/hyperframes/dist/telemetry-QMYM4WME.js +95 -0
- package/vendor/hyperframes/dist/templates/_shared/AGENTS.md +107 -0
- package/vendor/hyperframes/dist/templates/_shared/CLAUDE.md +107 -0
- package/vendor/hyperframes/dist/templates/blank/index.html +55 -0
- package/vendor/hyperframes/dist/templates/from-file/index.html +75 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/captions.html +154 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/graphics.html +162 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/intro.html +87 -0
- package/vendor/hyperframes/dist/templates/warm-grain/index.html +264 -0
- package/vendor/hyperframes/dist/templates/warm-grain/registry-item.json +34 -0
- package/vendor/hyperframes/dist/timeline-77Z3BBQM.js +1377 -0
- package/vendor/hyperframes/dist/tokens-OBGTYE4Z.js +92 -0
- package/vendor/hyperframes/dist/transcribe-7NVFHCGA.js +387 -0
- package/vendor/hyperframes/dist/transcribe-BNSJRR4M.js +62 -0
- package/vendor/hyperframes/dist/tts-P3LIPIL5.js +234 -0
- package/vendor/hyperframes/dist/updateCheck-UDWIJ4ZQ.js +39 -0
- package/vendor/hyperframes/dist/upgrade-CT3CPO3E.js +231 -0
- package/vendor/hyperframes/dist/urlDownloader-H6WRI2UE.js +39 -0
- package/vendor/hyperframes/dist/usage-EC3KFUIJ.js +2139 -0
- package/vendor/hyperframes/dist/validate-65QDZJWZ.js +70 -0
- package/vendor/hyperframes/dist/video-FGSGKRSV.js +261 -0
- package/vendor/hyperframes/dist/workspaceBuildCheck-TOLGAI4T.js +133 -0
- package/vendor/hyperframes/package.json +80 -0
|
@@ -0,0 +1,1457 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
renderJobObservabilityTelemetryPayload,
|
|
9
|
+
renderObservabilityTelemetryPayload
|
|
10
|
+
} from "./chunk-VXVRPIJA.js";
|
|
11
|
+
import {
|
|
12
|
+
seekCompositionTimeline
|
|
13
|
+
} from "./chunk-YQZNILVH.js";
|
|
14
|
+
import "./chunk-5Z63TBTX.js";
|
|
15
|
+
import "./chunk-7HG4BFIN.js";
|
|
16
|
+
import "./chunk-HRUGC23L.js";
|
|
17
|
+
import "./chunk-YEIFI443.js";
|
|
18
|
+
import {
|
|
19
|
+
DEFAULT_HISTORY_ROOT,
|
|
20
|
+
DELETED_VERSION,
|
|
21
|
+
HistoryBusyError,
|
|
22
|
+
HistoryClosedError,
|
|
23
|
+
PREVIEW_BUNDLE_OPTIONS,
|
|
24
|
+
affectsPreview,
|
|
25
|
+
affectsProjectSignature,
|
|
26
|
+
clearElementScreenshotIsolation,
|
|
27
|
+
compositionsAffectedBy,
|
|
28
|
+
createBackgroundRemovalJob,
|
|
29
|
+
createPreviewDocumentStore,
|
|
30
|
+
createProjectSignature,
|
|
31
|
+
createStudioApi,
|
|
32
|
+
fileContentVersion,
|
|
33
|
+
getElementScreenshotClip,
|
|
34
|
+
getMimeType,
|
|
35
|
+
historyCache,
|
|
36
|
+
identifyFileWrite,
|
|
37
|
+
openProjectHistory,
|
|
38
|
+
stampProjectHfIds,
|
|
39
|
+
thumbnailDeviceScaleFactor
|
|
40
|
+
} from "./chunk-S7NPLFWV.js";
|
|
41
|
+
import "./chunk-RMHUQGRK.js";
|
|
42
|
+
import {
|
|
43
|
+
isAtomicTempPath,
|
|
44
|
+
replaceFileAtomically
|
|
45
|
+
} from "./chunk-EOVYQ3IG.js";
|
|
46
|
+
import "./chunk-QC4FJVLM.js";
|
|
47
|
+
import "./chunk-TCLGPL65.js";
|
|
48
|
+
import {
|
|
49
|
+
HANDOFF_READY,
|
|
50
|
+
desktopDownloadUrl,
|
|
51
|
+
desktopInstalled,
|
|
52
|
+
openInDesktop
|
|
53
|
+
} from "./chunk-GULOKZLI.js";
|
|
54
|
+
import "./chunk-IHFUKJOR.js";
|
|
55
|
+
import {
|
|
56
|
+
resolveCaptureBrowserGpuMode,
|
|
57
|
+
resolveLocalBrowserGpuMode
|
|
58
|
+
} from "./chunk-XS4EJSKU.js";
|
|
59
|
+
import {
|
|
60
|
+
resolveRenderBrowser
|
|
61
|
+
} from "./chunk-FCSIGXXP.js";
|
|
62
|
+
import "./chunk-PFCFR3KZ.js";
|
|
63
|
+
import {
|
|
64
|
+
resolveAutoProxy
|
|
65
|
+
} from "./chunk-CFKU7HTK.js";
|
|
66
|
+
import "./chunk-XT7X6QCP.js";
|
|
67
|
+
import "./chunk-4YYJOFKS.js";
|
|
68
|
+
import "./chunk-HVW7ABXD.js";
|
|
69
|
+
import "./chunk-LYNI3FOL.js";
|
|
70
|
+
import "./chunk-CWPVM2QV.js";
|
|
71
|
+
import "./chunk-A2Z4Z4VL.js";
|
|
72
|
+
import "./chunk-AWDFDFI3.js";
|
|
73
|
+
import "./chunk-P6LJ4Y32.js";
|
|
74
|
+
import "./chunk-GMECXFAN.js";
|
|
75
|
+
import "./chunk-TVCRUG2S.js";
|
|
76
|
+
import "./chunk-4NWOGZZS.js";
|
|
77
|
+
import {
|
|
78
|
+
trackRenderComplete,
|
|
79
|
+
trackRenderError
|
|
80
|
+
} from "./chunk-JTHMTOMQ.js";
|
|
81
|
+
import {
|
|
82
|
+
canaryDecisionsForStudio,
|
|
83
|
+
resetTelemetryPostureCache,
|
|
84
|
+
shouldTrack
|
|
85
|
+
} from "./chunk-EISRN4E6.js";
|
|
86
|
+
import "./chunk-VWG7OQKU.js";
|
|
87
|
+
import "./chunk-ZTZA4UWZ.js";
|
|
88
|
+
import {
|
|
89
|
+
bytesToMb,
|
|
90
|
+
detectAgentRuntime
|
|
91
|
+
} from "./chunk-IUZFXWSV.js";
|
|
92
|
+
import "./chunk-AMKC3AXA.js";
|
|
93
|
+
import "./chunk-54HJ63Q2.js";
|
|
94
|
+
import "./chunk-PBN6GBJE.js";
|
|
95
|
+
import {
|
|
96
|
+
createStudioManualEditsRenderBodyScript
|
|
97
|
+
} from "./chunk-KC5XXX3X.js";
|
|
98
|
+
import "./chunk-TJSTGSAW.js";
|
|
99
|
+
import {
|
|
100
|
+
assertWebGpuAdapterAvailable,
|
|
101
|
+
compositionRequiresWebGpu
|
|
102
|
+
} from "./chunk-K2FTXJYH.js";
|
|
103
|
+
import {
|
|
104
|
+
fpsToNumber
|
|
105
|
+
} from "./chunk-2YN64IN5.js";
|
|
106
|
+
import "./chunk-AVUUN2XD.js";
|
|
107
|
+
import "./chunk-DPVXBVLL.js";
|
|
108
|
+
import "./chunk-Z6B37SNM.js";
|
|
109
|
+
import "./chunk-HWKCIWQT.js";
|
|
110
|
+
import "./chunk-VC76R6W2.js";
|
|
111
|
+
import {
|
|
112
|
+
realpath
|
|
113
|
+
} from "./chunk-OFQWTKPW.js";
|
|
114
|
+
import "./chunk-4PFZPP2N.js";
|
|
115
|
+
import {
|
|
116
|
+
runRenderSetupWorker
|
|
117
|
+
} from "./chunk-LCSMOLGX.js";
|
|
118
|
+
import "./chunk-TWWSYAKJ.js";
|
|
119
|
+
import {
|
|
120
|
+
isWithinProjectRoot
|
|
121
|
+
} from "./chunk-ZJUKFZ2P.js";
|
|
122
|
+
import "./chunk-HBBJFK6I.js";
|
|
123
|
+
import "./chunk-PJ3HDUCY.js";
|
|
124
|
+
import "./chunk-TQFG7HTI.js";
|
|
125
|
+
import "./chunk-GK4AIFIH.js";
|
|
126
|
+
import "./chunk-2PSPARWP.js";
|
|
127
|
+
import "./chunk-K4WIOZFP.js";
|
|
128
|
+
import {
|
|
129
|
+
readConfig,
|
|
130
|
+
readConfigFresh
|
|
131
|
+
} from "./chunk-XUXGIA7H.js";
|
|
132
|
+
import "./chunk-WERLJGIC.js";
|
|
133
|
+
import {
|
|
134
|
+
isDevMode
|
|
135
|
+
} from "./chunk-ISN5GRYI.js";
|
|
136
|
+
import {
|
|
137
|
+
VERSION
|
|
138
|
+
} from "./chunk-FLWXXDNS.js";
|
|
139
|
+
import "./chunk-KNU5COPB.js";
|
|
140
|
+
import "./chunk-3GXQPCJC.js";
|
|
141
|
+
import "./chunk-RQVDTPGD.js";
|
|
142
|
+
import "./chunk-PMRBLBUP.js";
|
|
143
|
+
import "./chunk-M2WBOQ2Q.js";
|
|
144
|
+
|
|
145
|
+
// src/server/studioServer.ts
|
|
146
|
+
import { Hono } from "hono";
|
|
147
|
+
import { streamSSE } from "hono/streaming";
|
|
148
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2, statSync as statSync2, writeFileSync, unlinkSync } from "fs";
|
|
149
|
+
import { createHash as createHash2 } from "crypto";
|
|
150
|
+
import { fileURLToPath } from "url";
|
|
151
|
+
import { resolve as resolve2, join as join2, basename, relative as relative2, sep as sep2 } from "path";
|
|
152
|
+
|
|
153
|
+
// src/server/readBundleFile.ts
|
|
154
|
+
import { openSync, fstatSync, closeSync, statSync, readFileSync, constants } from "fs";
|
|
155
|
+
function readBundleFile(filePath) {
|
|
156
|
+
let fd;
|
|
157
|
+
try {
|
|
158
|
+
fd = openSync(filePath, constants.O_RDONLY | constants.O_NONBLOCK);
|
|
159
|
+
} catch (error) {
|
|
160
|
+
if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR"))
|
|
161
|
+
return null;
|
|
162
|
+
if (!statSync(filePath, { throwIfNoEntry: false })?.isFile()) return null;
|
|
163
|
+
throw error;
|
|
164
|
+
}
|
|
165
|
+
try {
|
|
166
|
+
if (!fstatSync(fd).isFile()) return null;
|
|
167
|
+
return readFileSync(fd);
|
|
168
|
+
} finally {
|
|
169
|
+
closeSync(fd);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// src/server/fileWatcher.ts
|
|
174
|
+
import { lstatSync, readdirSync, watch } from "fs";
|
|
175
|
+
import { join, relative, sep } from "path";
|
|
176
|
+
var WATCHER_EXCLUDED_DIRS = /* @__PURE__ */ new Set([
|
|
177
|
+
".cache",
|
|
178
|
+
".git",
|
|
179
|
+
".hyperframes",
|
|
180
|
+
".next",
|
|
181
|
+
".thumbnails",
|
|
182
|
+
".transcode-cache",
|
|
183
|
+
".vite",
|
|
184
|
+
".waveform-cache",
|
|
185
|
+
"build",
|
|
186
|
+
"coverage",
|
|
187
|
+
"dist",
|
|
188
|
+
"node_modules",
|
|
189
|
+
"outputs",
|
|
190
|
+
"renders"
|
|
191
|
+
]);
|
|
192
|
+
var QUIET_MS = 30;
|
|
193
|
+
var BURST_MS = 300;
|
|
194
|
+
function shouldWatchProjectFile(filename) {
|
|
195
|
+
if (!filename || isAtomicTempPath(filename)) return false;
|
|
196
|
+
const parts = filename.split(/[\\/]+/);
|
|
197
|
+
return !parts.some((part) => WATCHER_EXCLUDED_DIRS.has(part));
|
|
198
|
+
}
|
|
199
|
+
function isDirectory(path) {
|
|
200
|
+
try {
|
|
201
|
+
return lstatSync(path).isDirectory();
|
|
202
|
+
} catch {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function watchProjectTree(projectDir, onChange) {
|
|
207
|
+
if (process.platform !== "linux") {
|
|
208
|
+
const tree = watch(projectDir, { recursive: true }, (_event, filename) => {
|
|
209
|
+
if (filename) onChange(filename.toString());
|
|
210
|
+
});
|
|
211
|
+
tree.on("error", () => tree.close());
|
|
212
|
+
return () => tree.close();
|
|
213
|
+
}
|
|
214
|
+
const directories = /* @__PURE__ */ new Map();
|
|
215
|
+
const unwatch = (dir) => {
|
|
216
|
+
for (const [watched, watcher] of directories) {
|
|
217
|
+
if (watched === dir || watched.startsWith(dir + sep)) {
|
|
218
|
+
watcher.close();
|
|
219
|
+
directories.delete(watched);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const watchDirectory = (dir) => {
|
|
224
|
+
if (directories.has(dir)) return;
|
|
225
|
+
let watcher;
|
|
226
|
+
try {
|
|
227
|
+
watcher = watch(dir, { persistent: true }, (event, name) => {
|
|
228
|
+
if (!name) return;
|
|
229
|
+
const path = join(dir, name.toString());
|
|
230
|
+
onChange(relative(projectDir, path));
|
|
231
|
+
if (event !== "rename") return;
|
|
232
|
+
if (isDirectory(path)) descend(path);
|
|
233
|
+
else unwatch(path);
|
|
234
|
+
});
|
|
235
|
+
} catch (error) {
|
|
236
|
+
if (dir === projectDir) throw error;
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
watcher.on("error", () => unwatch(dir));
|
|
240
|
+
directories.set(dir, watcher);
|
|
241
|
+
let entries = [];
|
|
242
|
+
try {
|
|
243
|
+
entries = readdirSync(dir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => join(dir, entry.name));
|
|
244
|
+
} catch {
|
|
245
|
+
}
|
|
246
|
+
for (const child of entries) descend(child);
|
|
247
|
+
};
|
|
248
|
+
const descend = (dir) => {
|
|
249
|
+
const rel = relative(projectDir, dir);
|
|
250
|
+
if (shouldWatchProjectFile(rel) || rel === ".hyperframes") watchDirectory(dir);
|
|
251
|
+
};
|
|
252
|
+
watchDirectory(projectDir);
|
|
253
|
+
return () => {
|
|
254
|
+
for (const watcher of directories.values()) watcher.close();
|
|
255
|
+
directories.clear();
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
function createProjectWatcher(projectDir) {
|
|
259
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
260
|
+
const pendingPaths = /* @__PURE__ */ new Set();
|
|
261
|
+
let debounceTimer = null;
|
|
262
|
+
let lastFlushAt = Number.NEGATIVE_INFINITY;
|
|
263
|
+
let closeTree = null;
|
|
264
|
+
try {
|
|
265
|
+
closeTree = watchProjectTree(projectDir, (relativePath) => {
|
|
266
|
+
if (!shouldWatchProjectFile(relativePath) && !affectsProjectSignature(projectDir, join(projectDir, relativePath))) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
pendingPaths.add(relativePath);
|
|
270
|
+
if (debounceTimer) clearTimeout(debounceTimer);
|
|
271
|
+
const delay = Math.max(QUIET_MS, lastFlushAt + BURST_MS - Date.now());
|
|
272
|
+
debounceTimer = setTimeout(() => {
|
|
273
|
+
const changedPaths = [...pendingPaths];
|
|
274
|
+
pendingPaths.clear();
|
|
275
|
+
debounceTimer = null;
|
|
276
|
+
lastFlushAt = Date.now();
|
|
277
|
+
for (const changedPath of changedPaths) {
|
|
278
|
+
for (const fn of listeners) {
|
|
279
|
+
fn(changedPath);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}, delay);
|
|
283
|
+
});
|
|
284
|
+
} catch {
|
|
285
|
+
}
|
|
286
|
+
return {
|
|
287
|
+
addListener(fn) {
|
|
288
|
+
listeners.add(fn);
|
|
289
|
+
},
|
|
290
|
+
removeListener(fn) {
|
|
291
|
+
listeners.delete(fn);
|
|
292
|
+
},
|
|
293
|
+
close() {
|
|
294
|
+
if (debounceTimer) clearTimeout(debounceTimer);
|
|
295
|
+
pendingPaths.clear();
|
|
296
|
+
closeTree?.();
|
|
297
|
+
listeners.clear();
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// src/server/runtimeSource.ts
|
|
303
|
+
import { createHash } from "crypto";
|
|
304
|
+
import { existsSync } from "fs";
|
|
305
|
+
import { resolve, dirname } from "path";
|
|
306
|
+
var ARTIFACT_NAMES = ["hyperframe-runtime.js", "hyperframe.runtime.iife.js"];
|
|
307
|
+
async function loadRuntimeSource() {
|
|
308
|
+
return await buildFromSource() ?? await getInlinedRuntime() ?? readPrebuiltArtifact();
|
|
309
|
+
}
|
|
310
|
+
async function loadRuntimeSourceSignature() {
|
|
311
|
+
const source = await loadRuntimeSource();
|
|
312
|
+
if (!source) return null;
|
|
313
|
+
return createHash("sha256").update(source).digest("hex");
|
|
314
|
+
}
|
|
315
|
+
function hashSignatureParts(parts) {
|
|
316
|
+
const hash = createHash("sha256");
|
|
317
|
+
for (const part of parts) {
|
|
318
|
+
hash.update(part ?? "");
|
|
319
|
+
hash.update("\n--hf-signature-part--\n");
|
|
320
|
+
}
|
|
321
|
+
return hash.digest("hex");
|
|
322
|
+
}
|
|
323
|
+
var ENTRY_TS = resolve(__dirname, "..", "..", "..", "core", "src", "runtime", "entry.ts");
|
|
324
|
+
async function buildFromSource() {
|
|
325
|
+
if (!existsSync(ENTRY_TS)) return null;
|
|
326
|
+
try {
|
|
327
|
+
const mod = await import("./dist-S3PJNPXQ.js");
|
|
328
|
+
if (typeof mod.loadHyperframeRuntimeSource === "function") {
|
|
329
|
+
const source = mod.loadHyperframeRuntimeSource();
|
|
330
|
+
if (source) return source;
|
|
331
|
+
}
|
|
332
|
+
} catch {
|
|
333
|
+
}
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
async function getInlinedRuntime() {
|
|
337
|
+
try {
|
|
338
|
+
const mod = await import("./dist-S3PJNPXQ.js");
|
|
339
|
+
if (typeof mod.getHyperframeRuntimeScript === "function") {
|
|
340
|
+
return mod.getHyperframeRuntimeScript() ?? null;
|
|
341
|
+
}
|
|
342
|
+
} catch {
|
|
343
|
+
}
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
function readPrebuiltArtifact() {
|
|
347
|
+
return readFromDir(__dirname) ?? readFromCoreDistDir() ?? readFromNodeModules();
|
|
348
|
+
}
|
|
349
|
+
function readFromDir(dir) {
|
|
350
|
+
for (const name of ARTIFACT_NAMES) {
|
|
351
|
+
const path = resolve(dir, name);
|
|
352
|
+
const content = readBundleFile(path);
|
|
353
|
+
if (content !== null) return content.toString("utf-8");
|
|
354
|
+
}
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
function readFromCoreDistDir() {
|
|
358
|
+
return readFromDir(resolve(__dirname, "..", "..", "..", "core", "dist"));
|
|
359
|
+
}
|
|
360
|
+
function readFromNodeModules() {
|
|
361
|
+
const subPaths = ["node_modules/hyperframes/dist", "node_modules/@hyperframes/core/dist"];
|
|
362
|
+
let dir = __dirname;
|
|
363
|
+
for (; ; ) {
|
|
364
|
+
for (const sub of subPaths) {
|
|
365
|
+
const result = readFromDir(resolve(dir, sub));
|
|
366
|
+
if (result) return result;
|
|
367
|
+
}
|
|
368
|
+
const parent = dirname(dir);
|
|
369
|
+
if (parent === dir) break;
|
|
370
|
+
dir = parent;
|
|
371
|
+
}
|
|
372
|
+
return null;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// src/server/telemetryIdentity.ts
|
|
376
|
+
import { hostname, networkInterfaces } from "os";
|
|
377
|
+
function resolveCliTelemetryDistinctId() {
|
|
378
|
+
try {
|
|
379
|
+
if (!shouldTrack()) return null;
|
|
380
|
+
const id = readConfig().anonymousId;
|
|
381
|
+
return typeof id === "string" && id.length > 0 ? id : null;
|
|
382
|
+
} catch {
|
|
383
|
+
return null;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
function resolveCliBucketSeed() {
|
|
387
|
+
try {
|
|
388
|
+
if (!shouldTrack()) return null;
|
|
389
|
+
const seed = readConfig().bucketSeed;
|
|
390
|
+
return typeof seed === "string" && seed.length > 0 ? seed : null;
|
|
391
|
+
} catch {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
function isLoopbackHost(host) {
|
|
396
|
+
if (!host) return false;
|
|
397
|
+
const bracketed = /^\[([^\]]+)\]/.exec(host);
|
|
398
|
+
const hostname2 = (bracketed ? bracketed[1] : host.split(":")[0])?.toLowerCase() ?? "";
|
|
399
|
+
if (hostname2 === "localhost" || hostname2 === "::1" || hostname2 === "0:0:0:0:0:0:0:1") return true;
|
|
400
|
+
return /^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(hostname2);
|
|
401
|
+
}
|
|
402
|
+
function encodeInlineScriptValue(value) {
|
|
403
|
+
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/\//g, "\\/");
|
|
404
|
+
}
|
|
405
|
+
function encodeInlineScriptJson(value) {
|
|
406
|
+
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/\//g, "\\/");
|
|
407
|
+
}
|
|
408
|
+
function resolveCliCanaryDecisions() {
|
|
409
|
+
try {
|
|
410
|
+
const decisions = canaryDecisionsForStudio();
|
|
411
|
+
return Object.keys(decisions).length > 0 ? decisions : null;
|
|
412
|
+
} catch {
|
|
413
|
+
return null;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
function buildCliIdentityScript(options = {}) {
|
|
417
|
+
const { includeIdentity = true } = options;
|
|
418
|
+
const parts = [];
|
|
419
|
+
parts.push(`window.__HF_CLI_TELEMETRY_DISABLED=${!shouldTrack()};`);
|
|
420
|
+
const cliId = includeIdentity ? resolveCliTelemetryDistinctId() : null;
|
|
421
|
+
if (cliId) {
|
|
422
|
+
parts.push(`window.__HF_CLI_DISTINCT_ID=${encodeInlineScriptValue(cliId)};`);
|
|
423
|
+
const seed = resolveCliBucketSeed();
|
|
424
|
+
if (seed) parts.push(`window.__HF_CLI_BUCKET_SEED=${encodeInlineScriptValue(seed)};`);
|
|
425
|
+
}
|
|
426
|
+
const decisions = resolveCliCanaryDecisions();
|
|
427
|
+
if (decisions !== null) {
|
|
428
|
+
parts.push(`window.__HF_CLI_CANARY_DECISIONS=${encodeInlineScriptJson(decisions)};`);
|
|
429
|
+
}
|
|
430
|
+
const agent = shouldTrack() ? detectAgentRuntime() : null;
|
|
431
|
+
if (agent) {
|
|
432
|
+
parts.push(`window.__HF_CLI_AGENT_RUNTIME=${encodeInlineScriptValue(agent)};`);
|
|
433
|
+
}
|
|
434
|
+
return parts.length === 0 ? "" : `<script>${parts.join("")}</script>`;
|
|
435
|
+
}
|
|
436
|
+
function buildStudioHeadScripts(envScript, options = {}) {
|
|
437
|
+
return `${buildCliIdentityScript(options)}${envScript}`;
|
|
438
|
+
}
|
|
439
|
+
function hostnameOf(host) {
|
|
440
|
+
if (!host) return "";
|
|
441
|
+
const bracketed = /^\[([^\]]+)\]/.exec(host);
|
|
442
|
+
return (bracketed ? bracketed[1] : host.split(":")[0])?.toLowerCase() ?? "";
|
|
443
|
+
}
|
|
444
|
+
function localNames() {
|
|
445
|
+
const names = /* @__PURE__ */ new Set();
|
|
446
|
+
try {
|
|
447
|
+
for (const entries of Object.values(networkInterfaces())) {
|
|
448
|
+
for (const entry of entries ?? []) names.add(entry.address.toLowerCase());
|
|
449
|
+
}
|
|
450
|
+
const self = hostname().toLowerCase();
|
|
451
|
+
if (self !== "") {
|
|
452
|
+
names.add(self);
|
|
453
|
+
names.add(`${self}.local`);
|
|
454
|
+
const short = self.split(".")[0];
|
|
455
|
+
if (short !== void 0 && short !== "") {
|
|
456
|
+
names.add(short);
|
|
457
|
+
names.add(`${short}.local`);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
} catch {
|
|
461
|
+
}
|
|
462
|
+
return names;
|
|
463
|
+
}
|
|
464
|
+
function hostMatchesBind(host, bind) {
|
|
465
|
+
const requested = hostnameOf(host);
|
|
466
|
+
if (requested === "") return false;
|
|
467
|
+
const bound = bind.toLowerCase();
|
|
468
|
+
if (requested === bound) return true;
|
|
469
|
+
return bound === "0.0.0.0" || bound === "::" || bound === "*" ? localNames().has(requested) : false;
|
|
470
|
+
}
|
|
471
|
+
function identityAllowed(host) {
|
|
472
|
+
if (isLoopbackHost(host)) return true;
|
|
473
|
+
const bind = (process.env["HYPERFRAMES_PREVIEW_HOST"] ?? "").trim();
|
|
474
|
+
if (bind === "" || isLoopbackHost(bind)) return false;
|
|
475
|
+
return hostMatchesBind(host, bind);
|
|
476
|
+
}
|
|
477
|
+
function refreshTelemetryPosture() {
|
|
478
|
+
try {
|
|
479
|
+
readConfigFresh();
|
|
480
|
+
resetTelemetryPostureCache();
|
|
481
|
+
} catch {
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function buildStudioHeadScriptsForHost(envScript, host) {
|
|
485
|
+
refreshTelemetryPosture();
|
|
486
|
+
return buildStudioHeadScripts(envScript, { includeIdentity: identityAllowed(host) });
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// src/server/studioRenderTelemetry.ts
|
|
490
|
+
import { freemem } from "os";
|
|
491
|
+
function memSnapshot() {
|
|
492
|
+
return {
|
|
493
|
+
peakMemoryMb: bytesToMb(process.memoryUsage.rss()),
|
|
494
|
+
memoryFreeMb: bytesToMb(freemem())
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
function stagesPayload(stages) {
|
|
498
|
+
return {
|
|
499
|
+
stageCompileMs: stages.compileMs,
|
|
500
|
+
stageVideoExtractMs: stages.videoExtractMs,
|
|
501
|
+
stageAudioProcessMs: stages.audioProcessMs,
|
|
502
|
+
stageCaptureMs: stages.captureMs,
|
|
503
|
+
stageCaptureSetupMs: stages.captureSetupMs,
|
|
504
|
+
stageCaptureFrameMs: stages.captureFrameMs,
|
|
505
|
+
stageEncodeMs: stages.encodeMs,
|
|
506
|
+
stageAssembleMs: stages.assembleMs
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
function extractPayload(extract) {
|
|
510
|
+
if (!extract) return {};
|
|
511
|
+
return {
|
|
512
|
+
extractResolveMs: extract.resolveMs,
|
|
513
|
+
extractHdrProbeMs: extract.hdrProbeMs,
|
|
514
|
+
extractHdrPreflightMs: extract.hdrPreflightMs,
|
|
515
|
+
extractHdrPreflightCount: extract.hdrPreflightCount,
|
|
516
|
+
extractVfrProbeMs: extract.vfrProbeMs,
|
|
517
|
+
extractVfrPreflightMs: extract.vfrPreflightMs,
|
|
518
|
+
extractVfrPreflightCount: extract.vfrPreflightCount,
|
|
519
|
+
extractPhase3Ms: extract.extractMs,
|
|
520
|
+
extractCacheHits: extract.cacheHits,
|
|
521
|
+
extractCacheMisses: extract.cacheMisses
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
function perfPayload(perf, elapsedMs) {
|
|
525
|
+
if (!perf) return {};
|
|
526
|
+
const compositionDurationMs = Math.round(perf.compositionDurationSeconds * 1e3);
|
|
527
|
+
const speedRatio = compositionDurationMs > 0 && elapsedMs > 0 ? Math.round(compositionDurationMs / elapsedMs * 100) / 100 : void 0;
|
|
528
|
+
return {
|
|
529
|
+
workers: perf.workers,
|
|
530
|
+
compositionDurationMs,
|
|
531
|
+
compositionWidth: perf.resolution.width,
|
|
532
|
+
compositionHeight: perf.resolution.height,
|
|
533
|
+
totalFrames: perf.totalFrames,
|
|
534
|
+
speedRatio,
|
|
535
|
+
captureAvgMs: perf.captureAvgMs,
|
|
536
|
+
capturePeakMs: perf.capturePeakMs,
|
|
537
|
+
tmpPeakBytes: perf.tmpPeakBytes,
|
|
538
|
+
...stagesPayload(perf.stages),
|
|
539
|
+
...extractPayload(perf.videoExtractBreakdown),
|
|
540
|
+
...renderObservabilityTelemetryPayload(perf.observability)
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
function emitStudioRenderError(opts, elapsedMs, failedStage, err, job) {
|
|
544
|
+
if (opts.telemetryOptOut === true) return;
|
|
545
|
+
trackRenderError({
|
|
546
|
+
fps: fpsToNumber(opts.fps),
|
|
547
|
+
quality: opts.quality,
|
|
548
|
+
docker: false,
|
|
549
|
+
source: "studio",
|
|
550
|
+
failedStage,
|
|
551
|
+
errorMessage: err instanceof Error ? err.message : String(err),
|
|
552
|
+
elapsedMs,
|
|
553
|
+
outputFormat: opts.format,
|
|
554
|
+
outputResolutionPreset: opts.outputResolution,
|
|
555
|
+
distinctId: opts.distinctId,
|
|
556
|
+
...renderJobObservabilityTelemetryPayload(job),
|
|
557
|
+
...memSnapshot()
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
function emitStudioRenderComplete(opts, elapsedMs, perf) {
|
|
561
|
+
if (opts.telemetryOptOut === true) return;
|
|
562
|
+
trackRenderComplete({
|
|
563
|
+
durationMs: elapsedMs,
|
|
564
|
+
fps: fpsToNumber(opts.fps),
|
|
565
|
+
quality: opts.quality,
|
|
566
|
+
docker: false,
|
|
567
|
+
gpu: false,
|
|
568
|
+
source: "studio",
|
|
569
|
+
outputFormat: opts.format,
|
|
570
|
+
outputResolutionPreset: opts.outputResolution,
|
|
571
|
+
distinctId: opts.distinctId,
|
|
572
|
+
...perfPayload(perf, elapsedMs),
|
|
573
|
+
...memSnapshot()
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// src/server/desktopRoutes.ts
|
|
578
|
+
function sameOriginPost(headers) {
|
|
579
|
+
const { host, origin, fetchSite } = headers;
|
|
580
|
+
if (!host || !identityAllowed(host)) return false;
|
|
581
|
+
if (fetchSite && fetchSite !== "same-origin") return false;
|
|
582
|
+
return origin === void 0 || origin === `http://${host}`;
|
|
583
|
+
}
|
|
584
|
+
function mountDesktopRoutes(app, projectDir, {
|
|
585
|
+
ready = HANDOFF_READY,
|
|
586
|
+
open = openInDesktop,
|
|
587
|
+
platform = process.platform,
|
|
588
|
+
installed = () => desktopInstalled({ platform })
|
|
589
|
+
} = {}) {
|
|
590
|
+
const downloadUrl = desktopDownloadUrl(platform);
|
|
591
|
+
app.get(
|
|
592
|
+
"/api/open-in-desktop",
|
|
593
|
+
(c) => c.json({ available: downloadUrl !== null || installed(), handoff: ready, downloadUrl })
|
|
594
|
+
);
|
|
595
|
+
app.post("/api/open-in-desktop", (c) => {
|
|
596
|
+
const allowed = sameOriginPost({
|
|
597
|
+
host: c.req.header("host"),
|
|
598
|
+
origin: c.req.header("origin"),
|
|
599
|
+
fetchSite: c.req.header("sec-fetch-site")
|
|
600
|
+
});
|
|
601
|
+
if (!allowed) return c.json({ error: "forbidden" }, 403);
|
|
602
|
+
if (!ready)
|
|
603
|
+
return c.json({
|
|
604
|
+
opened: false,
|
|
605
|
+
reason: "handoff-unavailable",
|
|
606
|
+
downloadUrl
|
|
607
|
+
});
|
|
608
|
+
return c.json(open(projectDir));
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
// src/server/thumbnailPages.ts
|
|
613
|
+
function createThumbnailPages(maxPages = 2, idleMs = 1e3) {
|
|
614
|
+
const pages = /* @__PURE__ */ new Map();
|
|
615
|
+
const drop = (url) => {
|
|
616
|
+
const entry = pages.get(url);
|
|
617
|
+
if (!entry) return;
|
|
618
|
+
pages.delete(url);
|
|
619
|
+
clearTimeout(entry.idleTimer);
|
|
620
|
+
void entry.queue.then(() => entry.page).then((page) => page.close()).catch(() => {
|
|
621
|
+
});
|
|
622
|
+
};
|
|
623
|
+
const entryFor = (browser, url, version, time, load) => {
|
|
624
|
+
const existing = pages.get(url);
|
|
625
|
+
if (existing && existing.browser === browser && existing.version === version && existing.shownUpTo <= time) {
|
|
626
|
+
existing.shownUpTo = time;
|
|
627
|
+
return existing;
|
|
628
|
+
}
|
|
629
|
+
drop(url);
|
|
630
|
+
const page = browser.newPage().then(async (created) => {
|
|
631
|
+
try {
|
|
632
|
+
await load(created);
|
|
633
|
+
} catch (error) {
|
|
634
|
+
await created.close().catch(() => {
|
|
635
|
+
});
|
|
636
|
+
throw error;
|
|
637
|
+
}
|
|
638
|
+
return created;
|
|
639
|
+
});
|
|
640
|
+
const entry = { browser, version, shownUpTo: time, page, queue: Promise.resolve() };
|
|
641
|
+
pages.set(url, entry);
|
|
642
|
+
while (pages.size > maxPages) drop(pages.keys().next().value);
|
|
643
|
+
return entry;
|
|
644
|
+
};
|
|
645
|
+
const armIdleClose = (url, entry) => {
|
|
646
|
+
if (pages.get(url) !== entry) return;
|
|
647
|
+
clearTimeout(entry.idleTimer);
|
|
648
|
+
entry.idleTimer = setTimeout(() => {
|
|
649
|
+
if (pages.get(url) === entry) drop(url);
|
|
650
|
+
}, idleMs);
|
|
651
|
+
entry.idleTimer.unref?.();
|
|
652
|
+
};
|
|
653
|
+
return {
|
|
654
|
+
async withPage(browser, url, version, time, load, use) {
|
|
655
|
+
const current = entryFor(browser, url, version, time, load);
|
|
656
|
+
clearTimeout(current.idleTimer);
|
|
657
|
+
const run = current.queue.then(async () => use(await current.page));
|
|
658
|
+
current.queue = run.catch(() => {
|
|
659
|
+
});
|
|
660
|
+
try {
|
|
661
|
+
return await run;
|
|
662
|
+
} catch (error) {
|
|
663
|
+
if (pages.get(url) === current) drop(url);
|
|
664
|
+
throw error;
|
|
665
|
+
} finally {
|
|
666
|
+
armIdleClose(url, current);
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
closeAll() {
|
|
670
|
+
for (const url of [...pages.keys()]) drop(url);
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
// src/server/studioServer.ts
|
|
676
|
+
var STUDIO_MANUAL_EDITS_PATH = ".hyperframes/studio-manual-edits.json";
|
|
677
|
+
var RENDER_SHUTDOWN_WAIT_MS = 2e3;
|
|
678
|
+
var IMMUTABLE_CACHE_CONTROL = "public, max-age=31536000, immutable";
|
|
679
|
+
var REMOTE_GIF_IMG_SRC_RE = /<img\b[^>]*?\bsrc\s*=\s*["'](https?:\/\/[^"']+\.gif(?:[?#][^"']*)?)["'][^>]*>/gi;
|
|
680
|
+
async function loadStudioProducer() {
|
|
681
|
+
if (!isDevMode()) return await import("./src-6YQBJGWR.js");
|
|
682
|
+
if (!process.versions.bun) {
|
|
683
|
+
throw new Error(
|
|
684
|
+
"Studio dev-mode rendering requires bun (the producer is loaded from TypeScript source, which Node cannot resolve). Restart the studio with `bun run studio`."
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
return await import("./src-6YQBJGWR.js");
|
|
688
|
+
}
|
|
689
|
+
function resolveDistDir() {
|
|
690
|
+
return resolveStudioBundle().dir;
|
|
691
|
+
}
|
|
692
|
+
function resolveStudioBundle() {
|
|
693
|
+
const builtPath = resolve2(__dirname, "studio");
|
|
694
|
+
const builtIndex = resolve2(builtPath, "index.html");
|
|
695
|
+
if (existsSync2(builtIndex)) {
|
|
696
|
+
return { dir: builtPath, indexPath: builtIndex, available: true, checkedPaths: [builtIndex] };
|
|
697
|
+
}
|
|
698
|
+
const devPath = resolve2(__dirname, "..", "..", "..", "studio", "dist");
|
|
699
|
+
const devIndex = resolve2(devPath, "index.html");
|
|
700
|
+
if (existsSync2(devIndex)) {
|
|
701
|
+
return {
|
|
702
|
+
dir: devPath,
|
|
703
|
+
indexPath: devIndex,
|
|
704
|
+
available: true,
|
|
705
|
+
checkedPaths: [builtIndex, devIndex]
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
return {
|
|
709
|
+
dir: builtPath,
|
|
710
|
+
indexPath: builtIndex,
|
|
711
|
+
available: false,
|
|
712
|
+
checkedPaths: [builtIndex, devIndex]
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
function resolveRuntimePath() {
|
|
716
|
+
const builtPath = resolve2(__dirname, "hyperframe-runtime.js");
|
|
717
|
+
if (existsSync2(builtPath)) return builtPath;
|
|
718
|
+
const iifePath = resolve2(__dirname, "hyperframe.runtime.iife.js");
|
|
719
|
+
if (existsSync2(iifePath)) return iifePath;
|
|
720
|
+
const devPath = resolve2(
|
|
721
|
+
__dirname,
|
|
722
|
+
"..",
|
|
723
|
+
"..",
|
|
724
|
+
"..",
|
|
725
|
+
"core",
|
|
726
|
+
"dist",
|
|
727
|
+
"hyperframe.runtime.iife.js"
|
|
728
|
+
);
|
|
729
|
+
if (existsSync2(devPath)) return devPath;
|
|
730
|
+
return builtPath;
|
|
731
|
+
}
|
|
732
|
+
function readStudioManualEditManifestContent(projectDir) {
|
|
733
|
+
const manifestPath = join2(projectDir, STUDIO_MANUAL_EDITS_PATH);
|
|
734
|
+
if (!existsSync2(manifestPath)) return "";
|
|
735
|
+
try {
|
|
736
|
+
return readFileSync2(manifestPath, "utf-8");
|
|
737
|
+
} catch {
|
|
738
|
+
return "";
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
async function applyStudioManualEditsToThumbnailPage(page, manifestContent, activeCompositionPath) {
|
|
742
|
+
const script = createStudioManualEditsRenderBodyScript(manifestContent, {
|
|
743
|
+
activeCompositionPath
|
|
744
|
+
});
|
|
745
|
+
if (!script) return;
|
|
746
|
+
await page.addScriptTag({ content: script });
|
|
747
|
+
}
|
|
748
|
+
async function reapplyStudioManualEditsToThumbnailPage(page) {
|
|
749
|
+
await page.evaluate(() => {
|
|
750
|
+
const apply = window.__hfStudioManualEditsApply;
|
|
751
|
+
if (typeof apply === "function") apply();
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
function collectRemoteGifImageSources(html) {
|
|
755
|
+
const urls = /* @__PURE__ */ new Set();
|
|
756
|
+
const re = new RegExp(REMOTE_GIF_IMG_SRC_RE.source, REMOTE_GIF_IMG_SRC_RE.flags);
|
|
757
|
+
let match;
|
|
758
|
+
while ((match = re.exec(html)) !== null) {
|
|
759
|
+
if (match[1]) urls.add(match[1]);
|
|
760
|
+
}
|
|
761
|
+
return [...urls];
|
|
762
|
+
}
|
|
763
|
+
async function downloadRemoteGifImageSources(html, downloadDir, downloadToTemp) {
|
|
764
|
+
const sourceAssets = /* @__PURE__ */ new Map();
|
|
765
|
+
await Promise.all(
|
|
766
|
+
collectRemoteGifImageSources(html).map(async (url) => {
|
|
767
|
+
try {
|
|
768
|
+
sourceAssets.set(url, await downloadToTemp(url, downloadDir));
|
|
769
|
+
} catch (err) {
|
|
770
|
+
console.warn(
|
|
771
|
+
"[Studio] Remote animated GIF prep skipped:",
|
|
772
|
+
err instanceof Error ? err.message : err
|
|
773
|
+
);
|
|
774
|
+
}
|
|
775
|
+
})
|
|
776
|
+
);
|
|
777
|
+
return sourceAssets;
|
|
778
|
+
}
|
|
779
|
+
var _thumbnailBrowserLease = null;
|
|
780
|
+
var thumbnailPages = createThumbnailPages();
|
|
781
|
+
var _thumbnailBrowserInitializing = null;
|
|
782
|
+
var _thumbnailBrowserModes = null;
|
|
783
|
+
async function getThumbnailBrowser(requestedGpuMode, isShuttingDown) {
|
|
784
|
+
if (isShuttingDown()) return null;
|
|
785
|
+
if (_thumbnailBrowserLease?.browser.connected && _thumbnailBrowserModes?.requested === requestedGpuMode) {
|
|
786
|
+
return {
|
|
787
|
+
browser: _thumbnailBrowserLease.browser,
|
|
788
|
+
requestedGpuMode: _thumbnailBrowserModes.requested,
|
|
789
|
+
resolvedGpuMode: _thumbnailBrowserModes.resolved
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
if (_thumbnailBrowserInitializing) {
|
|
793
|
+
const session = await _thumbnailBrowserInitializing;
|
|
794
|
+
if (session?.requestedGpuMode === requestedGpuMode) return session;
|
|
795
|
+
}
|
|
796
|
+
if (_thumbnailBrowserLease) await closeThumbnailBrowser();
|
|
797
|
+
_thumbnailBrowserInitializing = (async () => {
|
|
798
|
+
try {
|
|
799
|
+
if (isShuttingDown()) return null;
|
|
800
|
+
const { ensureBrowser } = await import("./manager-CT3D67CG.js");
|
|
801
|
+
const { acquireBrowser, buildChromeArgs } = await import("./src-PVYUYV3M.js");
|
|
802
|
+
let executablePath;
|
|
803
|
+
try {
|
|
804
|
+
const b = await ensureBrowser({ preferManagedChrome: true });
|
|
805
|
+
executablePath = b.executablePath;
|
|
806
|
+
if (b.executablePath && !process.env.PRODUCER_HEADLESS_SHELL_PATH) {
|
|
807
|
+
process.env.PRODUCER_HEADLESS_SHELL_PATH = b.executablePath;
|
|
808
|
+
}
|
|
809
|
+
} catch {
|
|
810
|
+
}
|
|
811
|
+
const resolvedGpuMode = await resolveCaptureBrowserGpuMode(requestedGpuMode, executablePath);
|
|
812
|
+
const acquired = await acquireBrowser(
|
|
813
|
+
buildChromeArgs(
|
|
814
|
+
{ width: 1920, height: 1080, captureMode: "screenshot" },
|
|
815
|
+
{ browserGpuMode: resolvedGpuMode }
|
|
816
|
+
),
|
|
817
|
+
{ forceScreenshot: true }
|
|
818
|
+
);
|
|
819
|
+
_thumbnailBrowserLease = acquired;
|
|
820
|
+
_thumbnailBrowserModes = { requested: requestedGpuMode, resolved: resolvedGpuMode };
|
|
821
|
+
acquired.browser.on("disconnected", () => {
|
|
822
|
+
if (_thumbnailBrowserLease !== acquired) return;
|
|
823
|
+
_thumbnailBrowserLease = null;
|
|
824
|
+
_thumbnailBrowserModes = null;
|
|
825
|
+
_thumbnailBrowserInitializing = null;
|
|
826
|
+
});
|
|
827
|
+
return { browser: acquired.browser, requestedGpuMode, resolvedGpuMode };
|
|
828
|
+
} catch (err) {
|
|
829
|
+
console.warn(
|
|
830
|
+
"[Studio] Failed to launch thumbnail browser:",
|
|
831
|
+
err instanceof Error ? err.message : err
|
|
832
|
+
);
|
|
833
|
+
_thumbnailBrowserInitializing = null;
|
|
834
|
+
return null;
|
|
835
|
+
}
|
|
836
|
+
})();
|
|
837
|
+
return _thumbnailBrowserInitializing;
|
|
838
|
+
}
|
|
839
|
+
async function closeThumbnailBrowser() {
|
|
840
|
+
thumbnailPages.closeAll();
|
|
841
|
+
if (_thumbnailBrowserInitializing) await _thumbnailBrowserInitializing.catch(() => {
|
|
842
|
+
});
|
|
843
|
+
if (!_thumbnailBrowserLease) return;
|
|
844
|
+
const lease = _thumbnailBrowserLease;
|
|
845
|
+
_thumbnailBrowserLease = null;
|
|
846
|
+
_thumbnailBrowserModes = null;
|
|
847
|
+
_thumbnailBrowserInitializing = null;
|
|
848
|
+
await lease.release().catch(() => {
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
async function loadPreviewServerBuildSignature() {
|
|
852
|
+
const runtimeSignature = await loadRuntimeSourceSignature();
|
|
853
|
+
const studioBundle = resolveStudioBundle();
|
|
854
|
+
const studioIndex = studioBundle.available ? readBundleFile(studioBundle.indexPath)?.toString("utf-8") ?? "" : "";
|
|
855
|
+
return hashSignatureParts([
|
|
856
|
+
VERSION,
|
|
857
|
+
runtimeSignature,
|
|
858
|
+
studioIndex,
|
|
859
|
+
createStudioServer.toString(),
|
|
860
|
+
createStudioApi.toString(),
|
|
861
|
+
createProjectSignature.toString(),
|
|
862
|
+
getMimeType.toString(),
|
|
863
|
+
getElementScreenshotClip.toString()
|
|
864
|
+
]);
|
|
865
|
+
}
|
|
866
|
+
function rewriteWrittenToHostViewport(projectDir, written) {
|
|
867
|
+
const indexPath = join2(projectDir, "index.html");
|
|
868
|
+
if (!existsSync2(indexPath)) return;
|
|
869
|
+
const indexHtml = readFileSync2(indexPath, "utf-8");
|
|
870
|
+
const hostW = indexHtml.match(/data-width="(\d+)"/)?.[1];
|
|
871
|
+
const hostH = indexHtml.match(/data-height="(\d+)"/)?.[1];
|
|
872
|
+
if (!hostW || !hostH) return;
|
|
873
|
+
for (const absPath of written) {
|
|
874
|
+
if (!absPath.endsWith(".html")) continue;
|
|
875
|
+
let content = readFileSync2(absPath, "utf-8");
|
|
876
|
+
content = content.replace(
|
|
877
|
+
/(<meta\s+name="viewport"\s+content="width=)\d+(,\s*height=)\d+/i,
|
|
878
|
+
`$1${hostW}$2${hostH}`
|
|
879
|
+
);
|
|
880
|
+
content = content.replace(
|
|
881
|
+
/(\bwidth:\s*)\d+(px;\s*\n?\s*height:\s*)\d+(px;)/g,
|
|
882
|
+
(match, pre, mid, post) => {
|
|
883
|
+
if (match.includes("1920") || match.includes("1080")) {
|
|
884
|
+
return `${pre}${hostW}${mid}${hostH}${post}`;
|
|
885
|
+
}
|
|
886
|
+
return match;
|
|
887
|
+
}
|
|
888
|
+
);
|
|
889
|
+
replaceFileAtomically(absPath, content, statSync2(absPath).mode);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
function createStudioServer(options) {
|
|
893
|
+
const { projectDir, projectName } = options;
|
|
894
|
+
const projectId = projectName || basename(projectDir);
|
|
895
|
+
const browserGpuMode = options.browserGpuMode ?? resolveLocalBrowserGpuMode();
|
|
896
|
+
const studioDir = resolveDistDir();
|
|
897
|
+
const runtimePath = resolveRuntimePath();
|
|
898
|
+
stampProjectHfIds(projectDir);
|
|
899
|
+
const watcher = createProjectWatcher(projectDir);
|
|
900
|
+
const project = { id: projectId, dir: projectDir, title: projectId };
|
|
901
|
+
let cachedProjectSignature = null;
|
|
902
|
+
watcher.addListener((changedPath) => {
|
|
903
|
+
if (affectsProjectSignature(projectDir, join2(projectDir, changedPath))) {
|
|
904
|
+
cachedProjectSignature = null;
|
|
905
|
+
}
|
|
906
|
+
});
|
|
907
|
+
const projectSignature = (dir) => {
|
|
908
|
+
if (resolve2(dir) !== resolve2(projectDir)) return createProjectSignature(dir);
|
|
909
|
+
cachedProjectSignature ??= createProjectSignature(projectDir);
|
|
910
|
+
return cachedProjectSignature;
|
|
911
|
+
};
|
|
912
|
+
let ownerWaitMs;
|
|
913
|
+
const histories = historyCache(
|
|
914
|
+
() => openProjectHistory({
|
|
915
|
+
projectDir,
|
|
916
|
+
historyRoot: options.historyRoot ?? DEFAULT_HISTORY_ROOT,
|
|
917
|
+
ownerWaitMs
|
|
918
|
+
}).then((history) => {
|
|
919
|
+
ownerWaitMs = void 0;
|
|
920
|
+
return history;
|
|
921
|
+
}).catch((error) => {
|
|
922
|
+
console.warn(`[studio] Project history is off: ${String(error)}`);
|
|
923
|
+
if (error instanceof HistoryBusyError) ownerWaitMs = 0;
|
|
924
|
+
if (error instanceof HistoryBusyError || error instanceof HistoryClosedError)
|
|
925
|
+
histories.forget(projectDir);
|
|
926
|
+
return null;
|
|
927
|
+
})
|
|
928
|
+
);
|
|
929
|
+
const projectHistory = () => histories.get(projectDir);
|
|
930
|
+
watcher.addListener((changedPath) => {
|
|
931
|
+
void histories.peek(projectDir)?.then((opened) => opened?.noteChange(changedPath));
|
|
932
|
+
});
|
|
933
|
+
const inFlightRenders = /* @__PURE__ */ new Map();
|
|
934
|
+
let shuttingDown = false;
|
|
935
|
+
const adapter = {
|
|
936
|
+
history: () => projectHistory(),
|
|
937
|
+
// Explicit option wins (preview's resolved --proxy/--no-proxy + config);
|
|
938
|
+
// otherwise honor the project's hyperframes.json media.autoProxy so every
|
|
939
|
+
// createStudioServer caller (e.g. the background preview child) gets the
|
|
940
|
+
// configured behavior without its own plumbing.
|
|
941
|
+
autoProxy: options.autoProxy ?? resolveAutoProxy(projectDir, void 0),
|
|
942
|
+
listProjects: () => [project],
|
|
943
|
+
// Salted with the running CLI file, so an upgraded CLI never serves an older build's document.
|
|
944
|
+
previewDocuments: createPreviewDocumentStore(
|
|
945
|
+
projectDir,
|
|
946
|
+
createHash2("sha256").update(readFileSync2(fileURLToPath(import.meta.url))).digest("hex")
|
|
947
|
+
),
|
|
948
|
+
resolveProject: (id) => id === projectId ? project : null,
|
|
949
|
+
async bundle(dir, options2) {
|
|
950
|
+
try {
|
|
951
|
+
const { bundleToSingleHtml } = await import("./compiler-QO36EXLS.js");
|
|
952
|
+
let html = await bundleToSingleHtml(dir, { ...PREVIEW_BUNDLE_OPTIONS, ...options2 });
|
|
953
|
+
html = html.replace(
|
|
954
|
+
'data-hyperframes-preview-runtime="1" src=""',
|
|
955
|
+
'data-hyperframes-preview-runtime="1" src="/api/runtime.js"'
|
|
956
|
+
);
|
|
957
|
+
return html;
|
|
958
|
+
} catch (err) {
|
|
959
|
+
console.error("[studio] Bundle failed:", err);
|
|
960
|
+
return null;
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
async transformPreviewHtml({ html, project: project2 }) {
|
|
964
|
+
const { injectDeterministicFontFaces } = await import("./deterministicFonts-HAEMV4TM.js");
|
|
965
|
+
const { prepareAnimatedGifInputs } = await import("./animatedGifPrep-P2T6YM7Z.js");
|
|
966
|
+
const { downloadToTemp, writeUrlDownloadTelemetry } = await import("./urlDownloader-H6WRI2UE.js");
|
|
967
|
+
const gifOutputDir = join2(project2.dir, ".hyperframes", "prepared-assets", "gif");
|
|
968
|
+
const gifDownloadDir = join2(project2.dir, ".hyperframes", "prepared-assets", "downloads");
|
|
969
|
+
const prepared = await prepareAnimatedGifInputs(html, {
|
|
970
|
+
projectDir: project2.dir,
|
|
971
|
+
downloadDir: gifDownloadDir,
|
|
972
|
+
outputDir: gifOutputDir,
|
|
973
|
+
outputSrcPrefix: ".hyperframes/prepared-assets/gif",
|
|
974
|
+
cacheDir: gifOutputDir,
|
|
975
|
+
sourceAssets: await downloadRemoteGifImageSources(
|
|
976
|
+
html,
|
|
977
|
+
gifDownloadDir,
|
|
978
|
+
(url, destDir) => downloadToTemp(url, destDir, void 0, void 0, void 0, {
|
|
979
|
+
onTelemetry: writeUrlDownloadTelemetry
|
|
980
|
+
})
|
|
981
|
+
)
|
|
982
|
+
});
|
|
983
|
+
return injectDeterministicFontFaces(prepared.html);
|
|
984
|
+
},
|
|
985
|
+
getProjectSignature: projectSignature,
|
|
986
|
+
invalidateProjectSignature: (dir) => {
|
|
987
|
+
if (resolve2(dir) === resolve2(projectDir)) cachedProjectSignature = null;
|
|
988
|
+
},
|
|
989
|
+
async lint(html, opts) {
|
|
990
|
+
const { lintHyperframeHtml } = await import("./dist-FNNGCKFS.js");
|
|
991
|
+
return await lintHyperframeHtml(html, { ...opts, host: "studio" });
|
|
992
|
+
},
|
|
993
|
+
// Out of process: linting a large composition is seconds of synchronous parsing, and on
|
|
994
|
+
// this event loop it stalls every other Studio request, the preview included.
|
|
995
|
+
lintProject: (dir) => runRenderSetupWorker(
|
|
996
|
+
"lint",
|
|
997
|
+
{ projectDir: dir, host: "studio" },
|
|
998
|
+
{ maxBufferBytes: 8 * 1024 * 1024 }
|
|
999
|
+
),
|
|
1000
|
+
runtimeUrl: "/api/runtime.js",
|
|
1001
|
+
rendersDir: () => join2(projectDir, "renders"),
|
|
1002
|
+
startRender(opts) {
|
|
1003
|
+
if (shuttingDown) {
|
|
1004
|
+
return {
|
|
1005
|
+
id: opts.jobId,
|
|
1006
|
+
status: "failed",
|
|
1007
|
+
progress: 0,
|
|
1008
|
+
outputPath: opts.outputPath,
|
|
1009
|
+
error: "Studio server is shutting down"
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
refreshTelemetryPosture();
|
|
1013
|
+
const abortController = new AbortController();
|
|
1014
|
+
const state = {
|
|
1015
|
+
id: opts.jobId,
|
|
1016
|
+
status: "rendering",
|
|
1017
|
+
progress: 0,
|
|
1018
|
+
outputPath: opts.outputPath,
|
|
1019
|
+
cancel: () => abortController.abort()
|
|
1020
|
+
};
|
|
1021
|
+
const startTime = Date.now();
|
|
1022
|
+
const run = (async () => {
|
|
1023
|
+
let renderJob;
|
|
1024
|
+
const removeCancelledOutput = () => {
|
|
1025
|
+
state.status = "cancelled";
|
|
1026
|
+
for (const suffix of ["", ".meta.json"]) {
|
|
1027
|
+
const fp = suffix ? opts.outputPath.replace(/\.(mp4|webm|mov)$/, suffix) : opts.outputPath;
|
|
1028
|
+
try {
|
|
1029
|
+
if (existsSync2(fp)) unlinkSync(fp);
|
|
1030
|
+
} catch {
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
};
|
|
1034
|
+
try {
|
|
1035
|
+
const { createRenderJob, executeRenderJob } = await loadStudioProducer();
|
|
1036
|
+
const browser = await resolveRenderBrowser(abortController.signal);
|
|
1037
|
+
if (!process.env.PRODUCER_HEADLESS_SHELL_PATH) {
|
|
1038
|
+
process.env.PRODUCER_HEADLESS_SHELL_PATH = browser.executablePath;
|
|
1039
|
+
}
|
|
1040
|
+
const manifestContent = readStudioManualEditManifestContent(opts.project.dir);
|
|
1041
|
+
const manualEditsRenderScript = createStudioManualEditsRenderBodyScript(manifestContent);
|
|
1042
|
+
const job = createRenderJob({
|
|
1043
|
+
// opts.fps is already an Fps rational — see vite-config-studio
|
|
1044
|
+
// adapter for the same convention.
|
|
1045
|
+
fps: opts.fps,
|
|
1046
|
+
quality: opts.quality,
|
|
1047
|
+
format: opts.format,
|
|
1048
|
+
outputResolution: opts.outputResolution,
|
|
1049
|
+
...manualEditsRenderScript ? { renderBodyScripts: [manualEditsRenderScript] } : {},
|
|
1050
|
+
...opts.composition ? { entryFile: opts.composition } : {},
|
|
1051
|
+
...opts.variables ? { variables: opts.variables } : {}
|
|
1052
|
+
});
|
|
1053
|
+
renderJob = job;
|
|
1054
|
+
const onProgress = (j) => {
|
|
1055
|
+
state.progress = j.progress;
|
|
1056
|
+
if (j.currentStage) state.stage = j.currentStage;
|
|
1057
|
+
};
|
|
1058
|
+
await executeRenderJob(
|
|
1059
|
+
job,
|
|
1060
|
+
opts.project.dir,
|
|
1061
|
+
opts.outputPath,
|
|
1062
|
+
onProgress,
|
|
1063
|
+
abortController.signal
|
|
1064
|
+
);
|
|
1065
|
+
if (abortController.signal.aborted) {
|
|
1066
|
+
removeCancelledOutput();
|
|
1067
|
+
return;
|
|
1068
|
+
}
|
|
1069
|
+
if (job.audioLoweredDb !== void 0) state.audioLoweredDb = job.audioLoweredDb;
|
|
1070
|
+
state.status = "complete";
|
|
1071
|
+
state.progress = 100;
|
|
1072
|
+
const metaPath = opts.outputPath.replace(/\.(mp4|webm|mov)$/, ".meta.json");
|
|
1073
|
+
writeFileSync(
|
|
1074
|
+
metaPath,
|
|
1075
|
+
JSON.stringify({
|
|
1076
|
+
status: "complete",
|
|
1077
|
+
durationMs: Date.now() - startTime,
|
|
1078
|
+
...job.audioLoweredDb !== void 0 ? { audioLoweredDb: job.audioLoweredDb } : {}
|
|
1079
|
+
})
|
|
1080
|
+
);
|
|
1081
|
+
refreshTelemetryPosture();
|
|
1082
|
+
emitStudioRenderComplete(opts, Date.now() - startTime, job.perfSummary);
|
|
1083
|
+
} catch (err) {
|
|
1084
|
+
if (abortController.signal.aborted) {
|
|
1085
|
+
removeCancelledOutput();
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1088
|
+
state.status = "failed";
|
|
1089
|
+
state.error = err instanceof Error ? err.message : String(err);
|
|
1090
|
+
refreshTelemetryPosture();
|
|
1091
|
+
emitStudioRenderError(opts, Date.now() - startTime, state.stage, err, renderJob);
|
|
1092
|
+
try {
|
|
1093
|
+
const metaPath = opts.outputPath.replace(/\.(mp4|webm|mov)$/, ".meta.json");
|
|
1094
|
+
writeFileSync(metaPath, JSON.stringify({ status: "failed" }));
|
|
1095
|
+
} catch {
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
})();
|
|
1099
|
+
inFlightRenders.set(abortController, run);
|
|
1100
|
+
const forget = () => void inFlightRenders.delete(abortController);
|
|
1101
|
+
run.then(forget, forget);
|
|
1102
|
+
return state;
|
|
1103
|
+
},
|
|
1104
|
+
startBackgroundRemoval(opts) {
|
|
1105
|
+
return createBackgroundRemovalJob(opts, async (renderOpts) => {
|
|
1106
|
+
const sourcePipelinePath = "../background-removal/pipeline.ts";
|
|
1107
|
+
const pipeline = await import("./pipeline-TNGWUZQC.js").catch(
|
|
1108
|
+
() => import(sourcePipelinePath)
|
|
1109
|
+
);
|
|
1110
|
+
return pipeline.render(renderOpts);
|
|
1111
|
+
});
|
|
1112
|
+
},
|
|
1113
|
+
async generateThumbnail(opts) {
|
|
1114
|
+
const session = await getThumbnailBrowser(browserGpuMode, () => shuttingDown);
|
|
1115
|
+
if (!session) {
|
|
1116
|
+
if (!shuttingDown) {
|
|
1117
|
+
console.warn("[Studio] Thumbnail: no browser available \u2014 Chrome may not be installed");
|
|
1118
|
+
}
|
|
1119
|
+
return null;
|
|
1120
|
+
}
|
|
1121
|
+
const sourcePath = join2(opts.project.dir, opts.compPath);
|
|
1122
|
+
const requiresWebGpu = existsSync2(sourcePath) ? compositionRequiresWebGpu(readFileSync2(sourcePath, "utf-8")) : false;
|
|
1123
|
+
if (opts.signal.aborted) return null;
|
|
1124
|
+
const width = opts.width || 1920;
|
|
1125
|
+
const height = opts.height || 1080;
|
|
1126
|
+
const viewport = { width, height, deviceScaleFactor: thumbnailDeviceScaleFactor(opts) };
|
|
1127
|
+
try {
|
|
1128
|
+
return await thumbnailPages.withPage(
|
|
1129
|
+
session.browser,
|
|
1130
|
+
opts.previewUrl,
|
|
1131
|
+
projectSignature(opts.project.dir),
|
|
1132
|
+
opts.seekTime,
|
|
1133
|
+
async (page) => {
|
|
1134
|
+
await page.setViewport(viewport);
|
|
1135
|
+
await page.goto(opts.previewUrl, { waitUntil: "domcontentloaded", timeout: 1e4 });
|
|
1136
|
+
await assertWebGpuAdapterAvailable(page, requiresWebGpu);
|
|
1137
|
+
await page.waitForFunction(
|
|
1138
|
+
() => {
|
|
1139
|
+
const w = window;
|
|
1140
|
+
return !!(w.__timelines && Object.keys(w.__timelines).length > 0);
|
|
1141
|
+
},
|
|
1142
|
+
{ timeout: 5e3 }
|
|
1143
|
+
).catch(() => {
|
|
1144
|
+
});
|
|
1145
|
+
},
|
|
1146
|
+
async (page) => {
|
|
1147
|
+
if (opts.signal.aborted) return null;
|
|
1148
|
+
await page.setViewport(viewport);
|
|
1149
|
+
await seekCompositionTimeline(page, opts.seekTime, {
|
|
1150
|
+
fallbackToBridgeAndTimelines: true,
|
|
1151
|
+
waitForPreferredSeekTargetMs: 500,
|
|
1152
|
+
animationFrameSettle: "double",
|
|
1153
|
+
waitForFontsMs: 500
|
|
1154
|
+
});
|
|
1155
|
+
const manifestContent = readStudioManualEditManifestContent(opts.project.dir);
|
|
1156
|
+
await applyStudioManualEditsToThumbnailPage(page, manifestContent, opts.compPath);
|
|
1157
|
+
await page.evaluate(() => {
|
|
1158
|
+
void document.fonts?.ready;
|
|
1159
|
+
const body = document.body;
|
|
1160
|
+
if (body && getComputedStyle(body).backgroundColor === "rgba(0, 0, 0, 0)") {
|
|
1161
|
+
body.style.backgroundColor = "#1c2028";
|
|
1162
|
+
}
|
|
1163
|
+
});
|
|
1164
|
+
await new Promise((r) => setTimeout(r, 200));
|
|
1165
|
+
await reapplyStudioManualEditsToThumbnailPage(page);
|
|
1166
|
+
if (opts.signal.aborted) return null;
|
|
1167
|
+
try {
|
|
1168
|
+
const clip = opts.selector ? await page.evaluate(getElementScreenshotClip, opts.selector, opts.selectorIndex) : void 0;
|
|
1169
|
+
return await page.screenshot(
|
|
1170
|
+
opts.format === "png" ? { type: "png", ...clip ? { clip } : {} } : { type: "jpeg", quality: 80, ...clip ? { clip } : {} }
|
|
1171
|
+
);
|
|
1172
|
+
} finally {
|
|
1173
|
+
if (opts.selector) await page.evaluate(clearElementScreenshotIsolation);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
} catch (err) {
|
|
1178
|
+
if (!opts.signal.aborted) {
|
|
1179
|
+
console.warn(
|
|
1180
|
+
"[Studio] Thumbnail generation failed:",
|
|
1181
|
+
err instanceof Error ? err.message : err
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
return null;
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
async listRegistryCatalog() {
|
|
1188
|
+
const { listRegistryItems, loadAllItems } = await import("./resolver-IZ647GBZ.js");
|
|
1189
|
+
const { loadProjectConfig } = await import("./projectConfig-HYJMJ5BY.js");
|
|
1190
|
+
const registry = { baseUrl: loadProjectConfig(projectDir).registry };
|
|
1191
|
+
const entries = await listRegistryItems(void 0, registry);
|
|
1192
|
+
const blockAndComponentEntries = entries.filter(
|
|
1193
|
+
(e) => e.type === "hyperframes:block" || e.type === "hyperframes:component"
|
|
1194
|
+
);
|
|
1195
|
+
return loadAllItems(blockAndComponentEntries, registry);
|
|
1196
|
+
},
|
|
1197
|
+
async installRegistryBlock(opts) {
|
|
1198
|
+
const { addToProject, primaryInstalledTarget } = await import("./add-LR3ZR2A5.js");
|
|
1199
|
+
const { recordRewrittenInstall } = await import("./installer-K6O5WF44.js");
|
|
1200
|
+
const { registryTargetPath } = await import("./publication-HQ5Y3KBM.js");
|
|
1201
|
+
const { result, item } = await addToProject({
|
|
1202
|
+
name: opts.blockName,
|
|
1203
|
+
projectDir: opts.project.dir,
|
|
1204
|
+
skipClipboard: true,
|
|
1205
|
+
source: "studio"
|
|
1206
|
+
});
|
|
1207
|
+
for (const warning of result.warnings) {
|
|
1208
|
+
process.stderr.write(`hyperframes:registry ${warning}
|
|
1209
|
+
`);
|
|
1210
|
+
}
|
|
1211
|
+
const written = result.written;
|
|
1212
|
+
rewriteWrittenToHostViewport(opts.project.dir, written);
|
|
1213
|
+
recordRewrittenInstall(opts.project.dir, written);
|
|
1214
|
+
const root = realpath(opts.project.dir);
|
|
1215
|
+
const primary = primaryInstalledTarget(item);
|
|
1216
|
+
const primaryPath = registryTargetPath(root, primary);
|
|
1217
|
+
const others = written.filter((abs) => abs !== primaryPath).map((abs) => relative2(root, abs).split(sep2).join("/"));
|
|
1218
|
+
return {
|
|
1219
|
+
written: written.includes(primaryPath) ? [primary, ...others] : others,
|
|
1220
|
+
block: item
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
const app = new Hono();
|
|
1225
|
+
app.get("/__hyperframes_config", (c) => {
|
|
1226
|
+
const serve = async () => {
|
|
1227
|
+
const serverBuildSignature = await loadPreviewServerBuildSignature();
|
|
1228
|
+
return c.json({
|
|
1229
|
+
isHyperframes: true,
|
|
1230
|
+
pid: process.pid,
|
|
1231
|
+
projectName: projectId,
|
|
1232
|
+
projectDir,
|
|
1233
|
+
serverBuildSignature,
|
|
1234
|
+
browserGpuMode,
|
|
1235
|
+
version: VERSION
|
|
1236
|
+
});
|
|
1237
|
+
};
|
|
1238
|
+
return serve();
|
|
1239
|
+
});
|
|
1240
|
+
app.get("/api/runtime.js", (c) => {
|
|
1241
|
+
const serve = async () => {
|
|
1242
|
+
const runtimeSource = await loadRuntimeSource() ?? readBundleFile(runtimePath)?.toString("utf-8") ?? null;
|
|
1243
|
+
if (!runtimeSource) return c.text("runtime not available", 404);
|
|
1244
|
+
return c.body(runtimeSource, 200, {
|
|
1245
|
+
"Content-Type": "text/javascript",
|
|
1246
|
+
"Cache-Control": "no-store"
|
|
1247
|
+
});
|
|
1248
|
+
};
|
|
1249
|
+
return serve();
|
|
1250
|
+
});
|
|
1251
|
+
app.get("/api/telemetry-identity", (c) => {
|
|
1252
|
+
if (!identityAllowed(c.req.header("host"))) {
|
|
1253
|
+
return c.json({ error: "forbidden" }, 403);
|
|
1254
|
+
}
|
|
1255
|
+
refreshTelemetryPosture();
|
|
1256
|
+
return c.json({ distinctId: resolveCliTelemetryDistinctId() });
|
|
1257
|
+
});
|
|
1258
|
+
app.get("/api/events", (c) => {
|
|
1259
|
+
return streamSSE(c, async (stream) => {
|
|
1260
|
+
const listener = (path) => {
|
|
1261
|
+
const absPath = resolve2(projectDir, path);
|
|
1262
|
+
let version = null;
|
|
1263
|
+
try {
|
|
1264
|
+
version = fileContentVersion(readFileSync2(absPath));
|
|
1265
|
+
} catch {
|
|
1266
|
+
}
|
|
1267
|
+
const receipt = identifyFileWrite(absPath, version ?? DELETED_VERSION);
|
|
1268
|
+
const reloads = affectsPreview(projectDir, path);
|
|
1269
|
+
stream.writeSSE({
|
|
1270
|
+
event: "file-change",
|
|
1271
|
+
data: JSON.stringify({
|
|
1272
|
+
path,
|
|
1273
|
+
version,
|
|
1274
|
+
projectId: project.id,
|
|
1275
|
+
affectsPreview: reloads,
|
|
1276
|
+
// Which thumbnails this write can change; null means all of them.
|
|
1277
|
+
affectedCompositions: reloads ? compositionsAffectedBy(projectDir, path) : [],
|
|
1278
|
+
...receipt
|
|
1279
|
+
})
|
|
1280
|
+
}).catch(() => {
|
|
1281
|
+
});
|
|
1282
|
+
};
|
|
1283
|
+
const wrappedListener = (changedPath) => {
|
|
1284
|
+
if (shouldWatchProjectFile(changedPath)) listener(changedPath);
|
|
1285
|
+
};
|
|
1286
|
+
watcher.addListener(wrappedListener);
|
|
1287
|
+
stream.onAbort(() => watcher.removeListener(wrappedListener));
|
|
1288
|
+
try {
|
|
1289
|
+
while (true) {
|
|
1290
|
+
await stream.sleep(3e4);
|
|
1291
|
+
}
|
|
1292
|
+
} finally {
|
|
1293
|
+
watcher.removeListener(wrappedListener);
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
});
|
|
1297
|
+
let ffmpegReady = false;
|
|
1298
|
+
app.get("/api/environment/ffmpeg", async (c) => {
|
|
1299
|
+
if (ffmpegReady) return c.json({ ok: true });
|
|
1300
|
+
const [{ runEnvironmentChecks }, { getFFmpegInstallCommand }] = await Promise.all([
|
|
1301
|
+
import("./preflight-SMNV6RW2.js"),
|
|
1302
|
+
import("./ffmpeg-QIUFEFTY.js")
|
|
1303
|
+
]);
|
|
1304
|
+
const { outcomes } = await runEnvironmentChecks();
|
|
1305
|
+
const failed = outcomes.find((outcome) => !outcome.ok);
|
|
1306
|
+
if (!failed) {
|
|
1307
|
+
ffmpegReady = true;
|
|
1308
|
+
return c.json({ ok: true });
|
|
1309
|
+
}
|
|
1310
|
+
return c.json({
|
|
1311
|
+
ok: false,
|
|
1312
|
+
title: failed.title ?? `${failed.name} not found`,
|
|
1313
|
+
detail: failed.detail,
|
|
1314
|
+
hint: failed.hint,
|
|
1315
|
+
command: getFFmpegInstallCommand()
|
|
1316
|
+
});
|
|
1317
|
+
});
|
|
1318
|
+
mountDesktopRoutes(app, projectDir);
|
|
1319
|
+
let cachedFFmpegPath;
|
|
1320
|
+
app.post("/api/projects/:id/render", async (c, next) => {
|
|
1321
|
+
const { findFFmpeg, getFFmpegInstallHint } = await import("./ffmpeg-QIUFEFTY.js");
|
|
1322
|
+
if (!cachedFFmpegPath) {
|
|
1323
|
+
cachedFFmpegPath = findFFmpeg();
|
|
1324
|
+
}
|
|
1325
|
+
if (!cachedFFmpegPath) {
|
|
1326
|
+
return c.json({ error: "FFmpeg not found", hint: getFFmpegInstallHint() }, 503);
|
|
1327
|
+
}
|
|
1328
|
+
return next();
|
|
1329
|
+
});
|
|
1330
|
+
const api = createStudioApi(adapter);
|
|
1331
|
+
app.all("/api/*", async (c) => {
|
|
1332
|
+
const url = new URL(c.req.url);
|
|
1333
|
+
url.pathname = url.pathname.slice(4);
|
|
1334
|
+
const forwardReq = new Request(url.toString(), {
|
|
1335
|
+
method: c.req.method,
|
|
1336
|
+
headers: c.req.raw.headers,
|
|
1337
|
+
body: c.req.raw.body,
|
|
1338
|
+
// @ts-expect-error -- Node needs duplex for streaming bodies
|
|
1339
|
+
duplex: "half"
|
|
1340
|
+
});
|
|
1341
|
+
return api.fetch(forwardReq);
|
|
1342
|
+
});
|
|
1343
|
+
const serveStudioStaticFile = (cacheControl) => (c) => {
|
|
1344
|
+
const filePath = resolve2(studioDir, c.req.path.slice(1));
|
|
1345
|
+
if (!isWithinProjectRoot(studioDir, filePath)) return c.text("not found", 404);
|
|
1346
|
+
const content = readBundleFile(filePath);
|
|
1347
|
+
if (content === null) return c.text("not found", 404);
|
|
1348
|
+
return new Response(content, {
|
|
1349
|
+
headers: { "Content-Type": getMimeType(filePath), "Cache-Control": cacheControl }
|
|
1350
|
+
});
|
|
1351
|
+
};
|
|
1352
|
+
app.get("/assets/*", serveStudioStaticFile(IMMUTABLE_CACHE_CONTROL));
|
|
1353
|
+
app.get("/icons/*", serveStudioStaticFile("no-store"));
|
|
1354
|
+
app.get("/favicon.svg", serveStudioStaticFile("no-store"));
|
|
1355
|
+
function buildRuntimeEnvScript() {
|
|
1356
|
+
const overrides = {};
|
|
1357
|
+
for (const [key, value] of Object.entries(process.env)) {
|
|
1358
|
+
if (key.startsWith("VITE_STUDIO_") && value !== void 0) {
|
|
1359
|
+
overrides[key] = value;
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
if (Object.keys(overrides).length === 0) return "";
|
|
1363
|
+
return `<script>window.__HF_STUDIO_ENV__=${JSON.stringify(overrides)};</script>`;
|
|
1364
|
+
}
|
|
1365
|
+
app.get("*", (c) => {
|
|
1366
|
+
const indexPath = resolve2(studioDir, "index.html");
|
|
1367
|
+
const indexContent = readBundleFile(indexPath);
|
|
1368
|
+
if (indexContent === null) {
|
|
1369
|
+
return c.html(
|
|
1370
|
+
`<!doctype html>
|
|
1371
|
+
<html>
|
|
1372
|
+
<head>
|
|
1373
|
+
<meta charset="utf-8" />
|
|
1374
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
1375
|
+
<title>HyperFrames Studio unavailable</title>
|
|
1376
|
+
<style>
|
|
1377
|
+
body {
|
|
1378
|
+
margin: 0;
|
|
1379
|
+
min-height: 100vh;
|
|
1380
|
+
display: grid;
|
|
1381
|
+
place-items: center;
|
|
1382
|
+
background: #0d0f14;
|
|
1383
|
+
color: #eef2f7;
|
|
1384
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
1385
|
+
}
|
|
1386
|
+
main {
|
|
1387
|
+
width: min(560px, calc(100vw - 48px));
|
|
1388
|
+
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
1389
|
+
border-radius: 8px;
|
|
1390
|
+
padding: 28px;
|
|
1391
|
+
background: #151923;
|
|
1392
|
+
}
|
|
1393
|
+
h1 {
|
|
1394
|
+
margin: 0 0 12px;
|
|
1395
|
+
font-size: 22px;
|
|
1396
|
+
line-height: 1.2;
|
|
1397
|
+
}
|
|
1398
|
+
p {
|
|
1399
|
+
margin: 0 0 18px;
|
|
1400
|
+
color: #aab3c2;
|
|
1401
|
+
line-height: 1.5;
|
|
1402
|
+
}
|
|
1403
|
+
code {
|
|
1404
|
+
display: block;
|
|
1405
|
+
padding: 12px 14px;
|
|
1406
|
+
border-radius: 6px;
|
|
1407
|
+
background: #090b10;
|
|
1408
|
+
color: #8ff0c2;
|
|
1409
|
+
overflow-wrap: anywhere;
|
|
1410
|
+
}
|
|
1411
|
+
</style>
|
|
1412
|
+
</head>
|
|
1413
|
+
<body>
|
|
1414
|
+
<main>
|
|
1415
|
+
<h1>Studio bundle missing</h1>
|
|
1416
|
+
<p>The preview server started, but this CLI build does not contain the Studio assets.</p>
|
|
1417
|
+
<code>bun run build</code>
|
|
1418
|
+
</main>
|
|
1419
|
+
</body>
|
|
1420
|
+
</html>`,
|
|
1421
|
+
500
|
|
1422
|
+
);
|
|
1423
|
+
}
|
|
1424
|
+
let html = indexContent.toString("utf-8");
|
|
1425
|
+
const headScript = buildStudioHeadScriptsForHost(buildRuntimeEnvScript(), c.req.header("host"));
|
|
1426
|
+
if (headScript) {
|
|
1427
|
+
html = html.replace("<head>", `<head>${headScript}`);
|
|
1428
|
+
}
|
|
1429
|
+
return c.html(html, 200, { "Cache-Control": "no-cache" });
|
|
1430
|
+
});
|
|
1431
|
+
const shutdown = async () => {
|
|
1432
|
+
shuttingDown = true;
|
|
1433
|
+
const closeHistory = histories.closeAll().catch(() => {
|
|
1434
|
+
});
|
|
1435
|
+
const renders = [...inFlightRenders];
|
|
1436
|
+
for (const [abortController] of renders) abortController.abort();
|
|
1437
|
+
const { killTrackedProcesses, closeBrowserPool } = await import("./src-PVYUYV3M.js");
|
|
1438
|
+
killTrackedProcesses();
|
|
1439
|
+
const closeBrowsers = Promise.allSettled([
|
|
1440
|
+
closeThumbnailBrowser().catch(() => {
|
|
1441
|
+
}),
|
|
1442
|
+
closeBrowserPool().catch(() => {
|
|
1443
|
+
})
|
|
1444
|
+
]);
|
|
1445
|
+
await Promise.race([
|
|
1446
|
+
Promise.allSettled([...renders.map(([, done]) => done), closeHistory]),
|
|
1447
|
+
new Promise((resolve3) => setTimeout(resolve3, RENDER_SHUTDOWN_WAIT_MS).unref())
|
|
1448
|
+
]);
|
|
1449
|
+
await closeBrowsers;
|
|
1450
|
+
};
|
|
1451
|
+
return { app, watcher, adapter, shutdown };
|
|
1452
|
+
}
|
|
1453
|
+
export {
|
|
1454
|
+
createStudioServer,
|
|
1455
|
+
loadPreviewServerBuildSignature,
|
|
1456
|
+
resolveStudioBundle
|
|
1457
|
+
};
|