hyperframes 0.8.142 → 0.8.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-YS2RCWEK.js → add-CWRTVGDB.js} +18 -17
- package/dist/{animatedGifPrep-SAMCDT7T.js → animatedGifPrep-JTOHIWI4.js} +15 -14
- package/dist/{asset-BLWC2NWB.js → asset-KU2Z4UFM.js} +4 -4
- package/dist/{assetCataloger-FVNBBRP3.js → assetCataloger-3CS2P7PA.js} +8 -7
- package/dist/{auth-DRZB7OAC.js → auth-IDSOIQWG.js} +1 -1
- package/dist/{autoUpdate-I5I3BOJK.js → autoUpdate-373B4BA2.js} +2 -2
- package/dist/{backgroundChecks-VR2QHGNY.js → backgroundChecks-53Q3NAMG.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-4YUHQI6X.js → batchRender-UKZA6BME.js} +11 -10
- package/dist/{beats-7OT7ALV3.js → beats-N5JGEOFR.js} +33 -28
- package/dist/{benchmark-Q2XQCRTR.js → benchmark-CUN3LN4V.js} +15 -14
- package/dist/{browser-7VAWQQZC.js → browser-NCZT5AP6.js} +40 -56
- package/dist/{bundleWithLocalizedFonts-DDMLLL2R.js → bundleWithLocalizedFonts-FWC7PE2D.js} +2 -2
- package/dist/{capture-HEJS6M5A.js → capture-QBLG3VJR.js} +26 -25
- package/dist/{capture-U7ABPKS5.js → capture-YLS32UHT.js} +2 -2
- package/dist/{catalog-DVJ3XPDN.js → catalog-HIWNAFHW.js} +19 -18
- package/dist/{catch-up-DF6AVSN2.js → catch-up-HGS7KIAC.js} +5 -5
- package/dist/{check-KXORRWAE.js → check-FH6UYYLO.js} +78 -66
- package/dist/{checkBrowser-J7HZJTRH.js → checkBrowser-RNWNOMCZ.js} +93 -41
- package/dist/{chunk-R2JEKLDZ.js → chunk-2DA2BBNY.js} +3 -3
- package/dist/{chunk-TQFG7HTI.js → chunk-3RM2ETQT.js} +0 -168
- package/dist/{chunk-YFT3BL7N.js → chunk-3VYNNWVA.js} +30 -12
- package/dist/{chunk-7FCDA4RH.js → chunk-3XTEXWNN.js} +8 -5
- package/dist/{chunk-PFCFR3KZ.js → chunk-442JNXRM.js} +1 -1
- package/dist/{chunk-BPZVDBHY.js → chunk-4LAR447G.js} +1 -1
- package/dist/{chunk-AM5L5YIA.js → chunk-4OA4LDTU.js} +1 -1
- package/dist/{chunk-DZEVA7DI.js → chunk-4OC7MQNB.js} +2 -2
- package/dist/{chunk-75JJVANE.js → chunk-54QISXOC.js} +3 -3
- package/dist/{chunk-FZK35GT4.js → chunk-5HJ343GH.js} +1 -1
- package/dist/{chunk-IDX52YJN.js → chunk-5VMR4WBS.js} +458 -159
- package/dist/{chunk-OSUKETIH.js → chunk-5WADG7PR.js} +1 -1
- package/dist/{chunk-JYYOAKHS.js → chunk-6IIGT7BX.js} +1 -1
- package/dist/{chunk-6UYZB4TY.js → chunk-7RAYSCYT.js} +4 -4
- package/dist/{chunk-WTMUCJ6Z.js → chunk-7SDCIWHQ.js} +11 -2
- package/dist/{chunk-LAOCA3MQ.js → chunk-A4Q7W4LV.js} +13 -8
- package/dist/{chunk-B6SMSALD.js → chunk-A53CBD24.js} +18 -12
- package/dist/{chunk-4PFZPP2N.js → chunk-A6S35NYA.js} +54 -16
- package/dist/{chunk-JOTLPC6S.js → chunk-AUBOF2PN.js} +1 -1
- package/dist/{chunk-WCJGTLPF.js → chunk-BHVFTYSI.js} +6 -3
- package/dist/chunk-BSQ7XANM.js +210 -0
- package/dist/{chunk-LCSMOLGX.js → chunk-BYSBRF24.js} +69 -8
- package/dist/{chunk-U7E736AJ.js → chunk-DDIVWXN7.js} +32 -14
- package/dist/{chunk-KOEWEFHK.js → chunk-DIRJ322I.js} +10 -5
- package/dist/{chunk-HMUF7FEO.js → chunk-EX6C672Y.js} +2 -2
- package/dist/{chunk-QGRFOOLE.js → chunk-F2SMS24Q.js} +288 -85
- package/dist/{chunk-5Z63TBTX.js → chunk-FH7WODJH.js} +1 -1
- package/dist/{chunk-XTLBLWOV.js → chunk-GEWKFRFI.js} +1 -1
- package/dist/{chunk-RVCWIIZ7.js → chunk-GV5R5B7Q.js} +1 -1
- package/dist/{chunk-TY6XOHEM.js → chunk-GZM2EFOE.js} +3 -3
- package/dist/chunk-GZVP4TWN.js +76 -0
- package/dist/{chunk-QXPCARFE.js → chunk-I5KY7EZP.js} +1 -1
- package/dist/{chunk-IW2CKH6A.js → chunk-IEIJRMLZ.js} +94 -59
- package/dist/chunk-IR35BCLK.js +13 -0
- package/dist/{chunk-JFKL3WAE.js → chunk-IWFLMU2N.js} +104 -19
- package/dist/{chunk-EFDXGAAD.js → chunk-JEHFZQYT.js} +1 -1
- package/dist/{chunk-IHFUKJOR.js → chunk-K2FLNJVB.js} +8 -2
- package/dist/{chunk-KDPYVTEU.js → chunk-KBB4RG6F.js} +6 -1
- package/dist/{chunk-LJAU4TPS.js → chunk-KFKZ3ISO.js} +2 -2
- package/dist/{sherpa-ZYTNFHD5.js → chunk-L5TUCXWR.js} +11 -44
- package/dist/{chunk-KYN364DU.js → chunk-LC3RQURJ.js} +7 -9
- package/dist/{chunk-IMY4QQTQ.js → chunk-LFX2HEYP.js} +8 -8
- package/dist/{chunk-PXSM4HPB.js → chunk-MAYCCGMQ.js} +12 -3
- package/dist/{chunk-OZUQF4NB.js → chunk-MQZVBHEY.js} +123 -8
- package/dist/{chunk-FWRNQOLT.js → chunk-MXNDKDFT.js} +3 -3
- package/dist/{chunk-A4KQZXZI.js → chunk-NE55C6S5.js} +4 -2
- package/dist/{chunk-GYE63V4P.js → chunk-NOPBBSLA.js} +24 -19
- package/dist/{chunk-H2X52H2N.js → chunk-NV4RXIQ7.js} +3 -3
- package/dist/{chunk-WGVOWWVK.js → chunk-OIDN7G42.js} +3 -3
- package/dist/{chunk-DPHJKWP5.js → chunk-OUSLVRO4.js} +107 -108
- package/dist/{chunk-JLKMWY2T.js → chunk-P6WH6QTV.js} +8 -5
- package/dist/{chunk-7M4KAPAA.js → chunk-PUGIRFPX.js} +2 -2
- package/dist/{chunk-6RAD4BCC.js → chunk-QATWIE4K.js} +2 -2
- package/dist/{chunk-D2KNWIQ6.js → chunk-QFSCCQIR.js} +1 -1
- package/dist/{chunk-XGMNQQTJ.js → chunk-RG3QWWIE.js} +1 -1
- package/dist/{chunk-MVTUV4TP.js → chunk-RI53TS2Y.js} +14 -6
- package/dist/{chunk-LQASVU3I.js → chunk-RVFEDAUV.js} +12 -4
- package/dist/{chunk-GK4AIFIH.js → chunk-SDYDNHEE.js} +34 -3
- package/dist/{chunk-WSGY5CDQ.js → chunk-SLCFKB3Y.js} +14 -10
- package/dist/{chunk-2NCHQUPX.js → chunk-SQLK7SJL.js} +1 -1
- package/dist/{chunk-PMRBLBUP.js → chunk-T42U2W2R.js} +14 -2
- package/dist/chunk-UPFUC4DB.js +136 -0
- package/dist/{chunk-IXCTG2WY.js → chunk-VYSUZEJG.js} +5 -5
- package/dist/chunk-WJB7WI4J.js +3753 -0
- package/dist/{chunk-YEIFI443.js → chunk-WPNE5NEP.js} +1 -1
- package/dist/{chunk-YHRZQJXH.js → chunk-XGFHYAYN.js} +265 -68
- package/dist/{chunk-LBKDQKWV.js → chunk-XU5GGV6R.js} +1 -1
- package/dist/{chunk-LTGGTEMA.js → chunk-Y6UPYWJS.js} +2 -2
- package/dist/{chunk-OKCR3JTO.js → chunk-YJXHMIZA.js} +13 -10
- package/dist/{chunk-JU6Y5TTZ.js → chunk-YUAXFWSQ.js} +3 -3
- package/dist/{chunk-TVCRUG2S.js → chunk-ZEUONDQG.js} +1 -1
- package/dist/{chunk-THXFSPLV.js → chunk-ZIRIDSDB.js} +1 -1
- package/dist/{chunk-6UM3R7PP.js → chunk-ZOA2SC4P.js} +129 -60
- package/dist/{clean-KTHTV5G5.js → clean-KPX27IKJ.js} +27 -26
- package/dist/cli.js +70 -160
- package/dist/{cloud-ARSZWALC.js → cloud-P7DAOISN.js} +4 -4
- package/dist/{cloudrun-NM7RXOCL.js → cloudrun-XM56TBOH.js} +13 -12
- package/dist/commands/contrast-audit.browser.js +60 -4
- package/dist/commands/layout-audit.browser.js +68 -0
- package/dist/{compare-CY4UO3RW.js → compare-F6YAFZZM.js} +37 -36
- package/dist/{compiler-VTH2D3ID.js → compiler-JZ4GNFMG.js} +16 -10
- package/dist/{component-FRUIAXIR.js → component-3CFOGIQA.js} +5 -5
- package/dist/{compositions-CUSY6ZYY.js → compositions-CPCMWF24.js} +38 -33
- package/dist/{delete-KT3VHP4L.js → delete-GYVKOKB6.js} +4 -4
- package/dist/{deterministicFonts-F6WIVL2W.js → deterministicFonts-U2BIMGPG.js} +3 -3
- package/dist/{dist-7SZU7MA7.js → dist-KDJTFJHA.js} +7 -6
- package/dist/{dist-2GC6XKRQ.js → dist-YPWQDWJ4.js} +42 -40
- package/dist/{doctor-4ROTBL5U.js → doctor-GWI3B6JT.js} +21 -20
- package/dist/{dom-IROKGVJI.js → dom-37K6YOH4.js} +2 -2
- package/dist/{events-QJDVMKSR.js → events-BRRUDPPT.js} +3 -3
- package/dist/{events-Q5PXT5UC.js → events-V2QFN4YM.js} +2 -2
- package/dist/{feedback-PQ7TWESA.js → feedback-CXMD7FWL.js} +14 -13
- package/dist/{ffmpeg-QIUFEFTY.js → ffmpeg-T5SH2EFJ.js} +3 -2
- package/dist/{figma-JN5DDBDS.js → figma-YABDWD66.js} +3 -3
- package/dist/fontLocalizeCli.js +18 -17
- package/dist/{get-KT6OTERO.js → get-L2SOQKHX.js} +4 -4
- package/dist/{gpuPolicy-LCBWVGEH.js → gpuPolicy-NBJNWHYS.js} +19 -16
- package/dist/{grade-compare-VS3RP73G.js → grade-compare-STXQPKYQ.js} +39 -38
- package/dist/{help-AD6FIZIO.js → help-4H6BSFLB.js} +2 -2
- package/dist/{history-ZRWYRY7R.js → history-4IQOLTHJ.js} +6 -6
- package/dist/hyperframe-runtime.js +56 -56
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +56 -56
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/hyperframes-slideshow.global.js +23 -23
- package/dist/{info-WBBQA2AX.js → info-2CZOTNBC.js} +17 -16
- package/dist/{init-A2XBDFGF.js → init-6BXK42VS.js} +46 -46
- package/dist/{inspect-CLTZHA5O.js → inspect-VKU47TBH.js} +38 -37
- package/dist/{installer-WQDRVXH4.js → installer-T2BSSUDY.js} +11 -10
- package/dist/{keyframes-3FYOK6H6.js → keyframes-IEYVHRPI.js} +10 -10
- package/dist/{lambda-Y2PA2BGS.js → lambda-TIKG25CK.js} +12 -11
- package/dist/{layout-4KP5O7IJ.js → layout-XOI4PT7A.js} +38 -37
- package/dist/{lint-V4GRFHOJ.js → lint-DWCMVIX5.js} +14 -13
- package/dist/{lintProject-RG2KGAXB.js → lintProject-UBZ3TDHU.js} +7 -6
- package/dist/{list-OQ4VED6E.js → list-7GXKG5QM.js} +5 -5
- package/dist/{login-W47NKN5S.js → login-BQ5L2UHX.js} +4 -4
- package/dist/{manager-CT3D67CG.js → manager-BPSR6D3V.js} +2 -2
- package/dist/{manager-524RPYO7.js → manager-RFZNG5YT.js} +2 -2
- package/dist/{manager-DXB7JDHU.js → manager-YKMHR6LN.js} +9 -6
- package/dist/{media-treatment-HJYL3EME.js → media-treatment-IFB7OSZ3.js} +24 -22
- package/dist/{models-DYBAD2GQ.js → models-TY4PJ545.js} +68 -27
- package/dist/{motionShot-7NE2YBB3.js → motionShot-WXMFHICW.js} +33 -33
- package/dist/{normalize-IGLHCWTF.js → normalize-U3SL5VG3.js} +19 -8
- package/dist/{normalize-audio-INKCLMS2.js → normalize-audio-RFD776HQ.js} +10 -6
- package/dist/{open-TYC5THVY.js → open-7IXXGO2E.js} +5 -5
- package/dist/parakeetRunner-IHLYYMTZ.js +67 -0
- package/dist/{pipeline-EVKEPQEW.js → pipeline-TXKPLL2U.js} +20 -18
- package/dist/{play-QMZEM6X3.js → play-J2KP64UK.js} +31 -29
- package/dist/{preflight-Y5DN5D37.js → preflight-B4AFK3RG.js} +4 -4
- package/dist/{present-Y7IK3C4W.js → present-MHHNRVRA.js} +26 -25
- package/dist/{preview-5OQRYE6A.js → preview-CONUOFFQ.js} +28 -27
- package/dist/{producer-Q6G6JU7B.js → producer-ZI46K7HH.js} +1 -1
- package/dist/{projectConfig-RJN3DKDB.js → projectConfig-FGGVG5MV.js} +13 -12
- package/dist/{publication-QCPGGN3U.js → publication-TXFBMW6B.js} +8 -7
- package/dist/{publish-VZLFIGYY.js → publish-YZSPBFRD.js} +18 -17
- package/dist/{remove-background-TKOEHBA5.js → remove-background-4ATVLHLG.js} +22 -20
- package/dist/{render-KIIIF6PS.js → render-6FBYLYGJ.js} +20 -19
- package/dist/{render-XTXE5CRU.js → render-GFW5BPES.js} +13 -12
- package/dist/{render-X3NFNVEQ.js → render-MH4IUPWB.js} +41 -40
- package/dist/{render-batch-M55YZLZ5.js → render-batch-XUCZ2PUJ.js} +13 -12
- package/dist/{renderCancellation-X5BEHAZU.js → renderCancellation-XF7M7IUP.js} +18 -16
- package/dist/renderSetupWorker.js +37 -48
- package/dist/{resolver-GAMXRA42.js → resolver-W7AYCQGS.js} +10 -9
- package/dist/sherpa-LDUB5NLY.js +75 -0
- package/dist/sherpaWorker.js +2 -1
- package/dist/skills/hyperframes-cli/references/doctor-browser.md +24 -1
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
- package/dist/skills/media-use/scripts/lib/cache.mjs +28 -14
- package/dist/skills/media-use/scripts/lib/cache.test.mjs +110 -0
- package/dist/skills/media-use/scripts/lib/duck.mjs +2 -1
- package/dist/skills/media-use/scripts/lib/duck.test.mjs +87 -0
- package/dist/skills/media-use/scripts/lib/probe.mjs +6 -1
- package/dist/skills/media-use/scripts/lib/probe.test.mjs +73 -0
- package/dist/skills/media-use/scripts/lib/words.mjs +1 -1
- package/dist/{skills-CZHVAD3J.js → skills-VENERS5X.js} +7 -7
- package/dist/{skillsUpdateCheck-6WLLX53A.js → skillsUpdateCheck-UXFYTACG.js} +3 -3
- package/dist/{slideshow-EJ4IMY6P.js → slideshow-4OJEPWNZ.js} +1 -1
- package/dist/{snapshot-K7BTJPYQ.js → snapshot-C6T74HTI.js} +44 -40
- package/dist/{src-YUW26JU5.js → src-FS5RSVEI.js} +17 -16
- package/dist/{src-3I3RH3V5.js → src-VUJ2FUFK.js} +18 -13
- package/dist/{staticProjectServer-IKCSGN2B.js → staticProjectServer-V2RZ4DWD.js} +23 -22
- package/dist/studio/assets/hyperframes-player-Bw_jIaSX.js +473 -0
- package/dist/studio/assets/{index-B-wffzRH.js → index-BVM9NuWl.js} +153 -153
- package/dist/studio/assets/{index-D3Vij9t1.js → index-Cj7W_c7p.js} +1 -1
- package/dist/studio/assets/{index-D5q2_7Gw.js → index-DyH9dT7b.js} +1 -1
- package/dist/studio/{chunk-TFLU2MGI.js → chunk-3GHTHPZD.js} +8 -1
- package/dist/studio/chunk-3GHTHPZD.js.map +1 -0
- package/dist/studio/{chunk-H2DUOXTF.js → chunk-G3EDKRZH.js} +3 -3
- package/dist/studio/{chunk-UYWON5AX.js → chunk-PEAKCOUW.js} +7 -3
- package/dist/studio/chunk-PEAKCOUW.js.map +1 -0
- package/dist/studio/{chunk-LOVBLSMR.js → chunk-Y2OHHNM2.js} +35 -19
- package/dist/studio/chunk-Y2OHHNM2.js.map +1 -0
- package/dist/studio/{domEditingLayers-KBTPQKGA.js → domEditingLayers-PYST4G45.js} +3 -3
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +261 -230
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/player.js +3 -3
- package/dist/studio/ui.d.ts +4 -5
- package/dist/studio/ui.js +1 -1
- package/dist/{studio-api-SQ3NXFSM.js → studio-api-TQE7KWKO.js} +22 -17
- package/dist/{studioServer-VVEO7XCH.js → studioServer-CYKSQK7L.js} +81 -64
- package/dist/{synthesize-77PTU6C5.js → synthesize-UCI4X5O7.js} +6 -6
- package/dist/{telemetry-FQDKR5XA.js → telemetry-A23PPRD6.js} +3 -3
- package/dist/{timeline-N6ZASFNE.js → timeline-T3QSGT3A.js} +143 -99
- package/dist/{tokens-2OIIBBCW.js → tokens-RT5HWA6C.js} +4 -4
- package/dist/{transcribe-7YTUCXDX.js → transcribe-FOLNOC5G.js} +116 -52
- package/dist/{transcribe-4F6MK73N.js → transcribe-HCF64LQK.js} +23 -20
- package/dist/{tts-TOHSPWEG.js → tts-B6AHFQEO.js} +6 -6
- package/dist/{updateCheck-AZ2COZFR.js → updateCheck-27PIP3AA.js} +2 -2
- package/dist/{upgrade-QAJEYB4X.js → upgrade-TVGXBUPJ.js} +2 -2
- package/dist/{urlDownloader-LSMFEO3R.js → urlDownloader-KBLBJKRL.js} +14 -13
- package/dist/{validate-GW5MDL36.js → validate-ZMYGK4QI.js} +40 -27
- package/dist/{video-PRNOKUK3.js → video-AVE5GIGM.js} +15 -14
- package/package.json +1 -1
- package/dist/chunk-J4UX3RS3.js +0 -3717
- package/dist/studio/assets/hyperframes-player-sAsRuV73.js +0 -473
- package/dist/studio/chunk-LOVBLSMR.js.map +0 -1
- package/dist/studio/chunk-TFLU2MGI.js.map +0 -1
- package/dist/studio/chunk-UYWON5AX.js.map +0 -1
- package/dist/{chunk-HBBJFK6I.js → chunk-APDLWWFG.js} +0 -0
- package/dist/{screenshotCapture-TEUIWXWN.js → screenshotCapture-3JXXUZND.js} +3 -3
- /package/dist/studio/{chunk-H2DUOXTF.js.map → chunk-G3EDKRZH.js.map} +0 -0
- /package/dist/studio/{domEditingLayers-KBTPQKGA.js.map → domEditingLayers-PYST4G45.js.map} +0 -0
|
@@ -6,15 +6,15 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KFKZ3ISO.js";
|
|
10
10
|
import {
|
|
11
11
|
readCompositionFps
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-WPNE5NEP.js";
|
|
13
|
+
import "./chunk-K2FLNJVB.js";
|
|
14
14
|
import {
|
|
15
15
|
applyFileMutations,
|
|
16
16
|
duplicateElementInHtml
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XGFHYAYN.js";
|
|
18
18
|
import {
|
|
19
19
|
findSyncPartner,
|
|
20
20
|
patchElementInHtml,
|
|
@@ -22,23 +22,30 @@ import {
|
|
|
22
22
|
removeElementFromHtml,
|
|
23
23
|
splitElementInHtml,
|
|
24
24
|
syncOffsetFrames
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-YJXHMIZA.js";
|
|
26
26
|
import {
|
|
27
27
|
fileContentVersion
|
|
28
28
|
} from "./chunk-QZ3AZTXI.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-DDIVWXN7.js";
|
|
30
|
+
import "./chunk-ZOA2SC4P.js";
|
|
31
31
|
import "./chunk-G75ENCEZ.js";
|
|
32
32
|
import "./chunk-EOVYQ3IG.js";
|
|
33
33
|
import {
|
|
34
34
|
ensureDOMParser
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-442JNXRM.js";
|
|
36
36
|
import "./chunk-374QQGBQ.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-RG3QWWIE.js";
|
|
38
|
+
import "./chunk-XU5GGV6R.js";
|
|
39
39
|
import "./chunk-VWG7OQKU.js";
|
|
40
40
|
import "./chunk-GQJZORQP.js";
|
|
41
41
|
import "./chunk-AMKC3AXA.js";
|
|
42
|
+
import {
|
|
43
|
+
resolveExtraPositionals
|
|
44
|
+
} from "./chunk-GZVP4TWN.js";
|
|
45
|
+
import "./chunk-K4WKGXRC.js";
|
|
46
|
+
import {
|
|
47
|
+
assertKnownFlags
|
|
48
|
+
} from "./chunk-UPFUC4DB.js";
|
|
42
49
|
import {
|
|
43
50
|
defineCommand
|
|
44
51
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -54,11 +61,11 @@ import {
|
|
|
54
61
|
extractMediaMetadata,
|
|
55
62
|
resolveReferencedDuration,
|
|
56
63
|
resolveReferencedStart
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
64
|
+
} from "./chunk-5VMR4WBS.js";
|
|
65
|
+
import "./chunk-OUSLVRO4.js";
|
|
59
66
|
import {
|
|
60
67
|
ensureHfIds
|
|
61
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-NE55C6S5.js";
|
|
62
69
|
import "./chunk-USDEMXXL.js";
|
|
63
70
|
import {
|
|
64
71
|
byStart,
|
|
@@ -68,47 +75,49 @@ import {
|
|
|
68
75
|
resolveMediaStartSeconds,
|
|
69
76
|
sameInstant,
|
|
70
77
|
spansShareTime
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import {
|
|
73
|
-
topLevelElements,
|
|
74
|
-
trackKindOf
|
|
75
|
-
} from "./chunk-OZUQF4NB.js";
|
|
76
|
-
import "./chunk-DPVXBVLL.js";
|
|
78
|
+
} from "./chunk-3VYNNWVA.js";
|
|
77
79
|
import {
|
|
78
80
|
HF_AUDIO_AUTOMATION_ATTR,
|
|
79
81
|
HF_AUDIO_FX_ATTR,
|
|
80
82
|
parseAudioFxChain,
|
|
81
83
|
parseAutomation,
|
|
82
84
|
resolveAutomation
|
|
83
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-WJB7WI4J.js";
|
|
84
86
|
import "./chunk-VC76R6W2.js";
|
|
85
87
|
import "./chunk-YA62XGXS.js";
|
|
88
|
+
import {
|
|
89
|
+
topLevelElements,
|
|
90
|
+
trackKindOf
|
|
91
|
+
} from "./chunk-MQZVBHEY.js";
|
|
86
92
|
import "./chunk-OFQWTKPW.js";
|
|
93
|
+
import "./chunk-DPVXBVLL.js";
|
|
87
94
|
import "./chunk-T76PLPD6.js";
|
|
88
95
|
import "./chunk-FXMKHHPO.js";
|
|
89
96
|
import "./chunk-RQVDTPGD.js";
|
|
90
97
|
import "./chunk-TWWSYAKJ.js";
|
|
91
|
-
import "./chunk-
|
|
92
|
-
import "./chunk-
|
|
93
|
-
import "./chunk-
|
|
98
|
+
import "./chunk-IEIJRMLZ.js";
|
|
99
|
+
import "./chunk-IWFLMU2N.js";
|
|
100
|
+
import "./chunk-APDLWWFG.js";
|
|
94
101
|
import "./chunk-PJ3HDUCY.js";
|
|
95
102
|
import {
|
|
96
|
-
parseNumeric
|
|
103
|
+
parseNumeric
|
|
104
|
+
} from "./chunk-3RM2ETQT.js";
|
|
105
|
+
import {
|
|
97
106
|
readMediaOffsetSeconds,
|
|
98
107
|
readPlaybackRate,
|
|
99
108
|
resolveMediaDuration
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import "./chunk-
|
|
109
|
+
} from "./chunk-BSQ7XANM.js";
|
|
110
|
+
import "./chunk-SDYDNHEE.js";
|
|
102
111
|
import "./chunk-2PSPARWP.js";
|
|
103
|
-
import "./chunk-
|
|
112
|
+
import "./chunk-T42U2W2R.js";
|
|
104
113
|
import {
|
|
105
114
|
withMeta
|
|
106
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-P6WH6QTV.js";
|
|
107
116
|
import "./chunk-K4WIOZFP.js";
|
|
108
117
|
import "./chunk-XUXGIA7H.js";
|
|
109
118
|
import "./chunk-WERLJGIC.js";
|
|
110
119
|
import "./chunk-ISN5GRYI.js";
|
|
111
|
-
import "./chunk-
|
|
120
|
+
import "./chunk-4OC7MQNB.js";
|
|
112
121
|
import "./chunk-KNU5COPB.js";
|
|
113
122
|
import "./chunk-3GXQPCJC.js";
|
|
114
123
|
import "./chunk-ZTZA4UWZ.js";
|
|
@@ -394,7 +403,7 @@ var n = (v) => String(Math.round(v * 1e3) / 1e3);
|
|
|
394
403
|
function bar(row, total) {
|
|
395
404
|
if (total <= 0) return " ".repeat(BAR_WIDTH);
|
|
396
405
|
const known = row.durationAuthored || row.duration > 0;
|
|
397
|
-
const from = Math.min(BAR_WIDTH - 1, Math.floor(row.absStart / total * BAR_WIDTH));
|
|
406
|
+
const from = Math.max(0, Math.min(BAR_WIDTH - 1, Math.floor(row.absStart / total * BAR_WIDTH)));
|
|
398
407
|
const to = known ? row.absEnd / total * BAR_WIDTH : BAR_WIDTH;
|
|
399
408
|
const width = Math.max(1, Math.min(BAR_WIDTH, Math.ceil(to)) - from);
|
|
400
409
|
const fill = known ? "\u2588" : "\u2591";
|
|
@@ -1060,16 +1069,10 @@ async function runApply(args) {
|
|
|
1060
1069
|
`${plan ? "planned" : "applied"} ${inputs.length} file${inputs.length === 1 ? "" : "s"}`
|
|
1061
1070
|
);
|
|
1062
1071
|
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
if (!input)
|
|
1068
|
-
return refuse(
|
|
1069
|
-
"timeline undo",
|
|
1070
|
-
{ reason: "an undo receipt is required", fix: "pass the receipt JSON or its file" },
|
|
1071
|
-
json
|
|
1072
|
-
);
|
|
1072
|
+
function isUndoReceipt(value) {
|
|
1073
|
+
return isRecord(value) && typeof value.file === "string" && typeof value.version === "string" && typeof value.backupPath === "string";
|
|
1074
|
+
}
|
|
1075
|
+
function readUndoInput(input) {
|
|
1073
1076
|
let raw;
|
|
1074
1077
|
try {
|
|
1075
1078
|
raw = readFileSync3(input, "utf-8");
|
|
@@ -1080,37 +1083,63 @@ async function runUndo(args) {
|
|
|
1080
1083
|
try {
|
|
1081
1084
|
parsed = JSON.parse(raw);
|
|
1082
1085
|
} catch {
|
|
1083
|
-
return
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1086
|
+
return {
|
|
1087
|
+
ok: false,
|
|
1088
|
+
reason: "undo receipt is not valid JSON",
|
|
1089
|
+
fix: "pass the applied JSON receipt"
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
const value = isRecord(parsed) && "receipt" in parsed ? parsed.receipt : parsed;
|
|
1093
|
+
const values = Array.isArray(value) ? value : [value];
|
|
1094
|
+
if (!values.every(isUndoReceipt)) {
|
|
1095
|
+
return {
|
|
1096
|
+
ok: false,
|
|
1097
|
+
reason: "undo receipt is missing file, version, or backupPath",
|
|
1098
|
+
fix: "pass an applied timeline receipt"
|
|
1099
|
+
};
|
|
1088
1100
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1101
|
+
return { ok: true, receipts: values, batch: Array.isArray(value) };
|
|
1102
|
+
}
|
|
1103
|
+
async function runUndo(args) {
|
|
1104
|
+
const project = resolveProject(typeof args.dir === "string" ? args.dir : void 0);
|
|
1105
|
+
const json = args.json === true;
|
|
1106
|
+
const input = typeof args.receipt === "string" ? args.receipt : positional(args)[1];
|
|
1107
|
+
if (!input)
|
|
1091
1108
|
return refuse(
|
|
1092
1109
|
"timeline undo",
|
|
1093
|
-
{
|
|
1094
|
-
reason: "undo receipt is missing file, version, or backupPath",
|
|
1095
|
-
fix: "pass an applied timeline receipt"
|
|
1096
|
-
},
|
|
1110
|
+
{ reason: "an undo receipt is required", fix: "pass the receipt JSON or its file" },
|
|
1097
1111
|
json
|
|
1098
1112
|
);
|
|
1113
|
+
const undo = readUndoInput(input);
|
|
1114
|
+
if (!undo.ok) return refuse("timeline undo", undo, json);
|
|
1115
|
+
const inputs = undo.receipts.map((receipt) => {
|
|
1116
|
+
const target = join(project.dir, receipt.file);
|
|
1117
|
+
return {
|
|
1118
|
+
sourceFile: receipt.file,
|
|
1119
|
+
absPath: target,
|
|
1120
|
+
before: readFileSync3(target, "utf-8"),
|
|
1121
|
+
after: readFileSync3(join(project.dir, receipt.backupPath), "utf-8"),
|
|
1122
|
+
expectedVersion: receipt.version
|
|
1123
|
+
};
|
|
1124
|
+
});
|
|
1125
|
+
let receipts;
|
|
1126
|
+
try {
|
|
1127
|
+
receipts = applyFileMutations(project.dir, inputs);
|
|
1128
|
+
} catch (error) {
|
|
1129
|
+
if (isFileChanged(error))
|
|
1130
|
+
return refusal(error.message, "read the latest timeline before retrying undo", json);
|
|
1131
|
+
throw error;
|
|
1099
1132
|
}
|
|
1100
|
-
const backup = join(project.dir, value.backupPath);
|
|
1101
|
-
const target = join(project.dir, value.file);
|
|
1102
|
-
const before = readFileSync3(target, "utf-8");
|
|
1103
|
-
const after = readFileSync3(backup, "utf-8");
|
|
1104
|
-
const receipts = applyFileMutations(project.dir, [
|
|
1105
|
-
{ sourceFile: value.file, absPath: target, before, after, expectedVersion: value.version }
|
|
1106
|
-
]);
|
|
1107
1133
|
const result = {
|
|
1108
1134
|
ok: true,
|
|
1109
1135
|
receipt: receipts.map((receipt) => publicReceipt(receipt)),
|
|
1110
|
-
file:
|
|
1136
|
+
file: undo.batch ? undo.receipts.map((receipt) => receipt.file) : undo.receipts[0].file
|
|
1111
1137
|
};
|
|
1112
1138
|
if (json) console.log(JSON.stringify(withMeta(result), null, 2));
|
|
1113
|
-
else
|
|
1139
|
+
else
|
|
1140
|
+
console.log(
|
|
1141
|
+
undo.batch ? `undid ${receipts.length} file${receipts.length === 1 ? "" : "s"}` : `undid ${undo.receipts[0].file}`
|
|
1142
|
+
);
|
|
1114
1143
|
}
|
|
1115
1144
|
|
|
1116
1145
|
// src/timeline/a2MutationCommand.ts
|
|
@@ -1326,52 +1355,67 @@ function mutationCommand(verb) {
|
|
|
1326
1355
|
}
|
|
1327
1356
|
});
|
|
1328
1357
|
}
|
|
1358
|
+
var subCommands = {
|
|
1359
|
+
move: () => mutationCommand("move"),
|
|
1360
|
+
trim: () => mutationCommand("trim"),
|
|
1361
|
+
split: () => mutationCommand("split"),
|
|
1362
|
+
delete: () => mutationCommand("delete"),
|
|
1363
|
+
set: () => mutationCommand("set"),
|
|
1364
|
+
duplicate: () => mutationCommand("duplicate"),
|
|
1365
|
+
ids: () => defineCommand({
|
|
1366
|
+
meta: { name: "ids", description: "Stamp stable ids on timeline clips" },
|
|
1367
|
+
args: { dir: { type: "string" }, json: { type: "boolean", default: false } },
|
|
1368
|
+
async run({ args }) {
|
|
1369
|
+
await runIds(args);
|
|
1370
|
+
}
|
|
1371
|
+
}),
|
|
1372
|
+
apply: () => defineCommand({
|
|
1373
|
+
meta: { name: "apply", description: "Apply an atomic timeline edit plan" },
|
|
1374
|
+
args: {
|
|
1375
|
+
file: { type: "positional", required: true },
|
|
1376
|
+
dir: { type: "string" },
|
|
1377
|
+
json: { type: "boolean", default: false },
|
|
1378
|
+
plan: { type: "boolean", default: false }
|
|
1379
|
+
},
|
|
1380
|
+
async run({ args }) {
|
|
1381
|
+
await runApply(args);
|
|
1382
|
+
}
|
|
1383
|
+
}),
|
|
1384
|
+
undo: () => defineCommand({
|
|
1385
|
+
meta: { name: "undo", description: "Restore a timeline mutation receipt" },
|
|
1386
|
+
args: {
|
|
1387
|
+
receipt: { type: "positional", required: true },
|
|
1388
|
+
dir: { type: "string" },
|
|
1389
|
+
json: { type: "boolean", default: false }
|
|
1390
|
+
},
|
|
1391
|
+
async run({ args }) {
|
|
1392
|
+
await runUndo(args);
|
|
1393
|
+
}
|
|
1394
|
+
})
|
|
1395
|
+
};
|
|
1396
|
+
function isTimelineSubcommand(first, rawArgs) {
|
|
1397
|
+
if (!first || !Object.hasOwn(subCommands, first)) return false;
|
|
1398
|
+
const separator = rawArgs.indexOf("--");
|
|
1399
|
+
return separator < 0 || rawArgs.indexOf(first) < separator;
|
|
1400
|
+
}
|
|
1329
1401
|
var timeline_default = defineCommand({
|
|
1330
1402
|
meta: { name: "timeline", description: "Print and edit the project's tracks and clips" },
|
|
1331
1403
|
args: {
|
|
1332
1404
|
dir: { type: "positional", description: "Project directory", required: false },
|
|
1333
1405
|
json: { type: "boolean", description: "Output as JSON", default: false }
|
|
1334
1406
|
},
|
|
1335
|
-
subCommands
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
meta: { name: "ids", description: "Stamp stable ids on timeline clips" },
|
|
1344
|
-
args: { dir: { type: "string" }, json: { type: "boolean", default: false } },
|
|
1345
|
-
async run({ args }) {
|
|
1346
|
-
await runIds(args);
|
|
1347
|
-
}
|
|
1348
|
-
}),
|
|
1349
|
-
apply: () => defineCommand({
|
|
1350
|
-
meta: { name: "apply", description: "Apply an atomic timeline edit plan" },
|
|
1351
|
-
args: {
|
|
1352
|
-
file: { type: "positional", required: true },
|
|
1353
|
-
dir: { type: "string" },
|
|
1354
|
-
json: { type: "boolean", default: false },
|
|
1355
|
-
plan: { type: "boolean", default: false }
|
|
1356
|
-
},
|
|
1357
|
-
async run({ args }) {
|
|
1358
|
-
await runApply(args);
|
|
1359
|
-
}
|
|
1360
|
-
}),
|
|
1361
|
-
undo: () => defineCommand({
|
|
1362
|
-
meta: { name: "undo", description: "Restore a timeline mutation receipt" },
|
|
1363
|
-
args: {
|
|
1364
|
-
receipt: { type: "positional", required: true },
|
|
1365
|
-
dir: { type: "string" },
|
|
1366
|
-
json: { type: "boolean", default: false }
|
|
1367
|
-
},
|
|
1368
|
-
async run({ args }) {
|
|
1369
|
-
await runUndo(args);
|
|
1370
|
-
}
|
|
1371
|
-
})
|
|
1407
|
+
subCommands,
|
|
1408
|
+
setup({ args, rawArgs, cmd }) {
|
|
1409
|
+
const first = args._[0];
|
|
1410
|
+
if (!first || isTimelineSubcommand(first, rawArgs)) return;
|
|
1411
|
+
assertKnownFlags({ args: cmd.args }, rawArgs);
|
|
1412
|
+
const separator = rawArgs.indexOf("--");
|
|
1413
|
+
const directoryIndex = rawArgs.indexOf(first);
|
|
1414
|
+
if (separator < 0 || directoryIndex < separator) rawArgs.splice(directoryIndex, 0, "--");
|
|
1372
1415
|
},
|
|
1373
|
-
async run({ args }) {
|
|
1374
|
-
if (args._
|
|
1416
|
+
async run({ args, rawArgs, cmd }) {
|
|
1417
|
+
if (isTimelineSubcommand(args._[0], rawArgs)) return;
|
|
1418
|
+
resolveExtraPositionals({ args: cmd.args }, "timeline", args);
|
|
1375
1419
|
const project = resolveProject(args.dir);
|
|
1376
1420
|
ensureDOMParser();
|
|
1377
1421
|
const timeline = await describeProject(project.indexPath);
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
tokensToVariables,
|
|
12
12
|
upsertBindings,
|
|
13
13
|
withFigmaErrors
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-2DA2BBNY.js";
|
|
15
|
+
import "./chunk-K2FLNJVB.js";
|
|
16
16
|
import {
|
|
17
17
|
defineCommand
|
|
18
18
|
} from "./chunk-S3S4TGEH.js";
|
|
19
19
|
import "./chunk-PBN6GBJE.js";
|
|
20
20
|
import "./chunk-VC76R6W2.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-SDYDNHEE.js";
|
|
22
22
|
import "./chunk-ZTZA4UWZ.js";
|
|
23
23
|
import "./chunk-M2WBOQ2Q.js";
|
|
24
24
|
|
|
@@ -76,7 +76,7 @@ var tokens_default = defineCommand({
|
|
|
76
76
|
console.log("add to data-composition-variables:");
|
|
77
77
|
console.log(JSON.stringify(result.entries, null, 2));
|
|
78
78
|
}
|
|
79
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
79
|
+
const { trackFigmaImport } = await import("./telemetry-A23PPRD6.js");
|
|
80
80
|
trackFigmaImport({
|
|
81
81
|
phase: "tokens",
|
|
82
82
|
tokensMode: result.mode,
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_MODEL,
|
|
12
12
|
isWhisperUnavailable
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-MAYCCGMQ.js";
|
|
14
|
+
import "./chunk-BHVFTYSI.js";
|
|
15
|
+
import "./chunk-ZEUONDQG.js";
|
|
16
16
|
import {
|
|
17
17
|
trackTranscribeUnavailable
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-RG3QWWIE.js";
|
|
19
|
+
import "./chunk-XU5GGV6R.js";
|
|
20
20
|
import "./chunk-VWG7OQKU.js";
|
|
21
21
|
import "./chunk-GQJZORQP.js";
|
|
22
22
|
import "./chunk-AMKC3AXA.js";
|
|
@@ -34,30 +34,33 @@ import {
|
|
|
34
34
|
import "./chunk-USDEMXXL.js";
|
|
35
35
|
import "./chunk-T76PLPD6.js";
|
|
36
36
|
import "./chunk-FXMKHHPO.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-BYSBRF24.js";
|
|
38
38
|
import "./chunk-PJ3HDUCY.js";
|
|
39
39
|
import "./chunk-K4WIOZFP.js";
|
|
40
40
|
import "./chunk-XUXGIA7H.js";
|
|
41
41
|
import "./chunk-WERLJGIC.js";
|
|
42
42
|
import "./chunk-ISN5GRYI.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-4OC7MQNB.js";
|
|
44
44
|
import {
|
|
45
45
|
normalizeErrorMessage
|
|
46
46
|
} from "./chunk-KNU5COPB.js";
|
|
47
47
|
import {
|
|
48
|
+
PARAKEET_INSTALL_COMMAND,
|
|
48
49
|
PARAKEET_LANGUAGES,
|
|
49
|
-
findParakeet,
|
|
50
50
|
parakeetSpeaks,
|
|
51
51
|
transcribeWithParakeet
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-KBB4RG6F.js";
|
|
53
|
+
import {
|
|
54
|
+
TRANSCRIPT_FILE
|
|
55
|
+
} from "./chunk-IR35BCLK.js";
|
|
53
56
|
import {
|
|
54
57
|
c
|
|
55
58
|
} from "./chunk-ZTZA4UWZ.js";
|
|
56
59
|
import "./chunk-M2WBOQ2Q.js";
|
|
57
60
|
|
|
58
61
|
// src/commands/transcribe.ts
|
|
59
|
-
import { existsSync, rmSync, writeFileSync } from "fs";
|
|
60
|
-
import { resolve, join, extname, dirname } from "path";
|
|
62
|
+
import { existsSync, realpathSync, rmSync, statSync, writeFileSync } from "fs";
|
|
63
|
+
import { resolve, join, extname, dirname, basename } from "path";
|
|
61
64
|
var examples = [
|
|
62
65
|
["Transcribe an audio file", "hyperframes transcribe audio.mp3"],
|
|
63
66
|
["Transcribe a video file", "hyperframes transcribe video.mp4"],
|
|
@@ -66,6 +69,7 @@ var examples = [
|
|
|
66
69
|
["Import an existing SRT file", "hyperframes transcribe subtitles.srt"],
|
|
67
70
|
["Import an OpenAI Whisper JSON response", "hyperframes transcribe response.json"],
|
|
68
71
|
["Export captions to SRT", "hyperframes transcribe transcript.json --to srt"],
|
|
72
|
+
["Transcribe a video straight to VTT captions", "hyperframes transcribe video.mp4 --to vtt"],
|
|
69
73
|
[
|
|
70
74
|
"Export single-word/CJK captions without re-grouping",
|
|
71
75
|
"hyperframes transcribe transcript.json --to vtt --preserve-cues"
|
|
@@ -110,7 +114,7 @@ var transcribe_default = defineCommand({
|
|
|
110
114
|
},
|
|
111
115
|
to: {
|
|
112
116
|
type: "string",
|
|
113
|
-
description: "
|
|
117
|
+
description: "Write an srt or vtt caption sidecar: exported from a transcript file, or written after transcribing audio/video"
|
|
114
118
|
},
|
|
115
119
|
output: {
|
|
116
120
|
type: "string",
|
|
@@ -147,15 +151,9 @@ var transcribe_default = defineCommand({
|
|
|
147
151
|
const dir = resolve(args.dir ?? dirname(inputPath));
|
|
148
152
|
const ext = extname(inputPath).toLowerCase();
|
|
149
153
|
const isImport = ext === ".json" || ext === ".srt" || ext === ".vtt";
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
-
failWith(
|
|
154
|
-
"--to can only export from transcript files (.json, .srt, .vtt). Run transcribe first.",
|
|
155
|
-
args.json
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
return exportTranscript(inputPath, dir, to, args.output, args.json, args["preserve-cues"]);
|
|
154
|
+
const sidecar = parseSidecar(args, inputPath, dir);
|
|
155
|
+
if (sidecar && isImport) {
|
|
156
|
+
return exportTranscript(inputPath, sidecar, args.json);
|
|
159
157
|
}
|
|
160
158
|
if (isImport) {
|
|
161
159
|
return importTranscript(inputPath, dir, args.json);
|
|
@@ -168,7 +166,8 @@ var transcribe_default = defineCommand({
|
|
|
168
166
|
json: args.json,
|
|
169
167
|
optional: args.optional,
|
|
170
168
|
installRuntime: args["runtime-install"],
|
|
171
|
-
timeoutMs
|
|
169
|
+
timeoutMs,
|
|
170
|
+
sidecar
|
|
172
171
|
});
|
|
173
172
|
}
|
|
174
173
|
});
|
|
@@ -199,14 +198,47 @@ function parseExportFormat(value, json) {
|
|
|
199
198
|
if (normalized === "srt" || normalized === "vtt") return normalized;
|
|
200
199
|
failWith(`Unsupported caption export format: ${value}. Use srt or vtt.`, json);
|
|
201
200
|
}
|
|
201
|
+
function parseSidecar(args, inputPath, dir) {
|
|
202
|
+
const to = parseExportFormat(args.to, args.json);
|
|
203
|
+
if (!to) return void 0;
|
|
204
|
+
const outPath = resolve(args.output ?? join(dir, `transcript.${to}`));
|
|
205
|
+
const keep = [inputPath, join(dir, TRANSCRIPT_FILE)];
|
|
206
|
+
const problem = args.output !== void 0 && outputProblem(args.output, outPath, to) || overwriteProblem(outPath, keep);
|
|
207
|
+
if (problem) failWith(problem, args.json);
|
|
208
|
+
return { to, outPath, preserveCues: args["preserve-cues"], keep };
|
|
209
|
+
}
|
|
210
|
+
function outputProblem(output, outPath, to) {
|
|
211
|
+
if (!output) return "--output needs a file path";
|
|
212
|
+
const folder = dirname(outPath);
|
|
213
|
+
if (!existsSync(folder) || !statSync(folder).isDirectory()) {
|
|
214
|
+
return `Output folder not found: ${folder}`;
|
|
215
|
+
}
|
|
216
|
+
if (/[\\/]$/.test(output) || existsSync(outPath) && statSync(outPath).isDirectory()) {
|
|
217
|
+
return `--output is a folder; give a file path such as ${join(outPath, `transcript.${to}`)}`;
|
|
218
|
+
}
|
|
219
|
+
return void 0;
|
|
220
|
+
}
|
|
221
|
+
function overwriteProblem(outPath, keep) {
|
|
222
|
+
const hit = keep.find((file) => sameFile(outPath, file));
|
|
223
|
+
return hit && `The caption file would overwrite ${hit}; choose another file with --output`;
|
|
224
|
+
}
|
|
225
|
+
function sameFile(out, file) {
|
|
226
|
+
if (existsSync(out) && existsSync(file)) {
|
|
227
|
+
const [a, b] = [statSync(out, { bigint: true }), statSync(file, { bigint: true })];
|
|
228
|
+
if (a.ino !== 0n && b.ino !== 0n) return a.dev === b.dev && a.ino === b.ino;
|
|
229
|
+
return realpathSync.native(out) === realpathSync.native(file);
|
|
230
|
+
}
|
|
231
|
+
const realDir = (p) => existsSync(dirname(p)) ? realpathSync.native(dirname(p)) : dirname(p);
|
|
232
|
+
return realDir(out) === realDir(file) && basename(out).toLowerCase() === basename(file).toLowerCase();
|
|
233
|
+
}
|
|
202
234
|
function exitNoWords(json) {
|
|
203
235
|
failWith("No words found in transcript.", json);
|
|
204
236
|
}
|
|
205
237
|
async function importTranscript(inputPath, dir, json) {
|
|
206
|
-
const { loadTranscript, patchCaptionHtml } = await import("./normalize-
|
|
238
|
+
const { loadTranscript, patchCaptionHtml } = await import("./normalize-U3SL5VG3.js");
|
|
207
239
|
const { words, format } = loadTranscript(inputPath);
|
|
208
240
|
if (words.length === 0) exitNoWords(json);
|
|
209
|
-
const outPath = join(dir,
|
|
241
|
+
const outPath = join(dir, TRANSCRIPT_FILE);
|
|
210
242
|
writeFileSync(outPath, JSON.stringify(words, null, 2));
|
|
211
243
|
patchCaptionHtml(dir, words);
|
|
212
244
|
if (json) {
|
|
@@ -219,49 +251,62 @@ async function importTranscript(inputPath, dir, json) {
|
|
|
219
251
|
);
|
|
220
252
|
}
|
|
221
253
|
}
|
|
222
|
-
async function
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
const preGrouped = preserveCues ||
|
|
227
|
-
const outPath = resolve(output ?? join(dir, `transcript.${to}`));
|
|
254
|
+
async function writeCaptionSidecar(words, { to, outPath, preserveCues, keep }, phraseLevelSource) {
|
|
255
|
+
const hit = keep.find((file) => sameFile(outPath, file));
|
|
256
|
+
if (hit) throw new Error(`it is the same file as ${hit}`);
|
|
257
|
+
const { formatSrt, formatVtt } = await import("./normalize-U3SL5VG3.js");
|
|
258
|
+
const preGrouped = preserveCues || phraseLevelSource;
|
|
228
259
|
const content = to === "srt" ? formatSrt(words, { preGrouped }) : formatVtt(words, { preGrouped });
|
|
229
260
|
writeFileSync(outPath, content);
|
|
261
|
+
}
|
|
262
|
+
function reportSidecar(to, wordCount, outPath) {
|
|
263
|
+
console.log(
|
|
264
|
+
`${c.success("\u25C7")} Exported ${c.accent(String(wordCount))} words to ${c.accent(to.toUpperCase())} \u2192 ${c.accent(outPath)}`
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
async function exportTranscript(inputPath, sidecar, json) {
|
|
268
|
+
const { loadTranscript } = await import("./normalize-U3SL5VG3.js");
|
|
269
|
+
const { words, format } = loadTranscript(inputPath);
|
|
270
|
+
if (words.length === 0) exitNoWords(json);
|
|
271
|
+
const { outPath } = sidecar;
|
|
272
|
+
try {
|
|
273
|
+
await writeCaptionSidecar(words, sidecar, format === "srt" || format === "vtt" || void 0);
|
|
274
|
+
} catch (err) {
|
|
275
|
+
failWith(
|
|
276
|
+
`The caption file ${outPath} could not be written: ${normalizeErrorMessage(err)}`,
|
|
277
|
+
json
|
|
278
|
+
);
|
|
279
|
+
}
|
|
230
280
|
if (json) {
|
|
231
281
|
console.log(
|
|
232
|
-
JSON.stringify({
|
|
282
|
+
JSON.stringify({
|
|
283
|
+
ok: true,
|
|
284
|
+
format: sidecar.to,
|
|
285
|
+
wordCount: words.length,
|
|
286
|
+
outputPath: outPath
|
|
287
|
+
})
|
|
233
288
|
);
|
|
234
289
|
} else {
|
|
235
|
-
|
|
236
|
-
`${c.success("\u25C7")} Exported ${c.accent(String(words.length))} words to ${c.accent(to.toUpperCase())} \u2192 ${c.accent(outPath)}`
|
|
237
|
-
);
|
|
290
|
+
reportSidecar(sidecar.to, words.length, outPath);
|
|
238
291
|
}
|
|
239
292
|
}
|
|
240
|
-
|
|
241
|
-
function pickRunner(engine, sherpaUsable, language) {
|
|
293
|
+
function pickRunner(engine, parakeet, language) {
|
|
242
294
|
if (engine === "whisper" || !parakeetSpeaks(language)) return "whisper";
|
|
243
|
-
|
|
244
|
-
return findParakeet() ? "parakeet-mlx" : "whisper";
|
|
295
|
+
return parakeet() ?? "whisper";
|
|
245
296
|
}
|
|
246
297
|
var parakeetFallsBack = (engine) => engine === "auto";
|
|
247
298
|
async function transcribeAudio(inputPath, dir, opts) {
|
|
248
|
-
const { transcribe } = await import("./transcribe-
|
|
249
|
-
const { loadTranscript, patchCaptionHtml } = await import("./normalize-
|
|
250
|
-
const {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
sherpaParakeetInstalled,
|
|
254
|
-
sherpaUnsupportedReason,
|
|
255
|
-
transcribeWithSherpa
|
|
256
|
-
} = await import("./sherpa-ZYTNFHD5.js");
|
|
257
|
-
const { createRenderCancellationScope, stoppedByCancelSignal } = await import("./renderCancellation-X5BEHAZU.js");
|
|
299
|
+
const { transcribe } = await import("./transcribe-HCF64LQK.js");
|
|
300
|
+
const { loadTranscript, patchCaptionHtml } = await import("./normalize-U3SL5VG3.js");
|
|
301
|
+
const { DecodeCancelled, prepareSherpaWav, sherpaUnsupportedReason, transcribeWithSherpa } = await import("./sherpa-LDUB5NLY.js");
|
|
302
|
+
const { parakeetRunner } = await import("./parakeetRunner-IHLYYMTZ.js");
|
|
303
|
+
const { createRenderCancellationScope, stoppedByCancelSignal } = await import("./renderCancellation-XF7M7IUP.js");
|
|
258
304
|
const engine = (opts.engine ?? "auto").toLowerCase();
|
|
259
305
|
if (engine !== "auto" && engine !== "parakeet" && engine !== "whisper") {
|
|
260
306
|
failWith(`Unknown --engine: ${opts.engine}. Use auto, parakeet, or whisper.`, !!opts.json);
|
|
261
307
|
}
|
|
262
308
|
const unsupported = sherpaUnsupportedReason();
|
|
263
|
-
|
|
264
|
-
let runner = pickRunner(engine, sherpaUsable, opts.language);
|
|
309
|
+
let runner = pickRunner(engine, () => parakeetRunner({ unsupported }), opts.language);
|
|
265
310
|
if (engine === "parakeet" && runner === "whisper") {
|
|
266
311
|
failWith(
|
|
267
312
|
!parakeetSpeaks(opts.language) ? `Parakeet does not transcribe --language ${opts.language}; it covers ${PARAKEET_LANGUAGES.split(" ").join(", ")}. Use --engine whisper.` : unsupported ?? `Parakeet is not installed. Install it with: ${PARAKEET_INSTALL_COMMAND} (or use --engine whisper)`,
|
|
@@ -320,7 +365,11 @@ async function transcribeAudio(inputPath, dir, opts) {
|
|
|
320
365
|
const reason = normalizeErrorMessage(err).replace(/\.+$/, "");
|
|
321
366
|
const parakeetError = `Parakeet failed: ${reason}. To repair it, run: ${PARAKEET_INSTALL_COMMAND}`;
|
|
322
367
|
if (!parakeetFallsBack(engine)) throw new Error(parakeetError);
|
|
323
|
-
runner = pickRunner(
|
|
368
|
+
runner = pickRunner(
|
|
369
|
+
engine,
|
|
370
|
+
() => parakeetRunner({ unsupported, skipSherpa: true }),
|
|
371
|
+
opts.language
|
|
372
|
+
);
|
|
324
373
|
spin?.clear();
|
|
325
374
|
console.error(c.warn(`${parakeetError}. Using ${runner} for this run.`));
|
|
326
375
|
spin?.start(`Transcribing with ${label(runner)}...`);
|
|
@@ -337,6 +386,19 @@ async function transcribeAudio(inputPath, dir, opts) {
|
|
|
337
386
|
const { words } = loadTranscript(result.transcriptPath);
|
|
338
387
|
writeFileSync(result.transcriptPath, JSON.stringify(words, null, 2));
|
|
339
388
|
patchCaptionHtml(dir, words);
|
|
389
|
+
const { sidecar } = opts;
|
|
390
|
+
if (sidecar) {
|
|
391
|
+
try {
|
|
392
|
+
await writeCaptionSidecar(words, sidecar, false);
|
|
393
|
+
} catch (err) {
|
|
394
|
+
const message = `Transcript saved to ${result.transcriptPath}, but the caption file ${sidecar.outPath} could not be written: ${normalizeErrorMessage(err)}`;
|
|
395
|
+
if (opts.json) console.log(JSON.stringify({ ok: false, error: message }));
|
|
396
|
+
else spin?.stop(c.error(message));
|
|
397
|
+
setCommandExitCode(1);
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const exported = sidecar && { format: sidecar.to, outputPath: sidecar.outPath };
|
|
340
402
|
if (opts.json) {
|
|
341
403
|
console.log(
|
|
342
404
|
JSON.stringify({
|
|
@@ -347,7 +409,8 @@ async function transcribeAudio(inputPath, dir, opts) {
|
|
|
347
409
|
wordCount: words.length,
|
|
348
410
|
durationSeconds: result.durationSeconds,
|
|
349
411
|
speechOnsetSeconds: result.speechOnsetSeconds,
|
|
350
|
-
transcriptPath: result.transcriptPath
|
|
412
|
+
transcriptPath: result.transcriptPath,
|
|
413
|
+
...exported
|
|
351
414
|
})
|
|
352
415
|
);
|
|
353
416
|
} else {
|
|
@@ -357,6 +420,7 @@ async function transcribeAudio(inputPath, dir, opts) {
|
|
|
357
420
|
`Transcribed ${c.accent(String(words.length))} words (${result.durationSeconds.toFixed(1)}s${onsetNote})`
|
|
358
421
|
)
|
|
359
422
|
);
|
|
423
|
+
if (exported) reportSidecar(exported.format, words.length, exported.outputPath);
|
|
360
424
|
}
|
|
361
425
|
} catch (err) {
|
|
362
426
|
if (err instanceof DecodeCancelled || cancellation?.signal.aborted) {
|