hyperframes 0.8.159 → 0.8.160
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/README.md +10 -0
- package/dist/{add-7UMRT6IJ.js → add-OGBTJCU4.js} +11 -11
- package/dist/{animatedGifPrep-COFZMEVD.js → animatedGifPrep-YAJTDXB7.js} +6 -6
- package/dist/api.js +16 -16
- package/dist/{asset-N37XIJTB.js → asset-DKQFFGPP.js} +2 -2
- package/dist/{assetCataloger-ZOQ67MGR.js → assetCataloger-BIDQA34M.js} +2 -2
- package/dist/audio-GK4OVVTH.js +2086 -0
- package/dist/{auth-GKFS2PL6.js → auth-AQMRAFXN.js} +1 -1
- package/dist/{autoUpdate-V4PLREDQ.js → autoUpdate-NFQB7V2X.js} +2 -2
- package/dist/{backgroundChecks-TVOKARY2.js → backgroundChecks-7JKE2FIU.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-IARQXQHN.js → batchRender-C2JCG5EK.js} +3 -3
- package/dist/{beats-FY4UDXBL.js → beats-C3ZSK2R2.js} +12 -12
- package/dist/{benchmark-ZJYFRFYF.js → benchmark-RRU67WEY.js} +8 -8
- package/dist/{browser-WRZOH4PD.js → browser-K4TP4ZM2.js} +5 -5
- package/dist/{bundleWithLocalizedFonts-SFHKZZAX.js → bundleWithLocalizedFonts-SLBVWQ7O.js} +2 -2
- package/dist/{capture-LLLIHYEF.js → capture-T2TBROMS.js} +2 -2
- package/dist/{capture-KFYPMVTT.js → capture-ZPRK3TOZ.js} +10 -10
- package/dist/{catalog-QO762U7V.js → catalog-IMIHQ4KX.js} +11 -11
- package/dist/{catch-up-MELHNTGB.js → catch-up-UY5MJWOG.js} +4 -4
- package/dist/{check-RX3LTKYB.js → check-6NAJSJHQ.js} +129 -118
- package/dist/{checkBrowser-EUUMEILI.js → checkBrowser-JWNQFYTY.js} +32 -30
- package/dist/{chunk-YIJMVFEJ.js → chunk-22QHO26F.js} +1 -1
- package/dist/{chunk-7F3B5YYT.js → chunk-2742O5DO.js} +178 -23
- package/dist/{chunk-HEEN6X6O.js → chunk-2ZLYSXZC.js} +8 -8
- package/dist/{chunk-5HNZQSO4.js → chunk-37LNY2EC.js} +1 -1
- package/dist/{chunk-6TDZJ43G.js → chunk-3XPVZLAR.js} +1 -1
- package/dist/{chunk-5RSV6DWB.js → chunk-4ID635FL.js} +1 -1
- package/dist/{chunk-4IKI2RYR.js → chunk-4VYNMVMC.js} +10 -10
- package/dist/chunk-6JR2XUEE.js +127 -0
- package/dist/{chunk-4D5RBIX6.js → chunk-6MCASYIS.js} +7 -7
- package/dist/{chunk-7XEVZDKU.js → chunk-7OFNPEKR.js} +7 -7
- package/dist/{chunk-BB2SFTMY.js → chunk-A2DMF2Q6.js} +6 -5
- package/dist/{chunk-MMYY4KV3.js → chunk-B5FZ2CQM.js} +1 -1
- package/dist/{chunk-IWOEAWIP.js → chunk-B7RUGHBT.js} +1 -1
- package/dist/{chunk-IJ7JPX4W.js → chunk-D2WGLWIK.js} +3 -3
- package/dist/{chunk-7RTTPSXG.js → chunk-D33YJZOH.js} +1 -1
- package/dist/{chunk-54DMWFQZ.js → chunk-D3ZWBHZP.js} +2 -15
- package/dist/{chunk-K5BMHQOU.js → chunk-D46G5IQH.js} +11 -11
- package/dist/{chunk-WWMFR4SH.js → chunk-DJZEIVAP.js} +3 -3
- package/dist/{chunk-EGJVFPUX.js → chunk-ERTJPFCH.js} +1 -1
- package/dist/{chunk-FEKRMXT6.js → chunk-EVRUR7DW.js} +1 -1
- package/dist/{chunk-DLQQA25O.js → chunk-FRGYHRP6.js} +1 -1
- package/dist/{chunk-UK4KRTIX.js → chunk-G642IIVK.js} +2 -2
- package/dist/{chunk-AEQWF7PE.js → chunk-GG37I7B3.js} +1 -1
- package/dist/chunk-GJQHHAAX.js +336 -0
- package/dist/{chunk-BEW7RCCW.js → chunk-GOASXWDD.js} +2 -2
- package/dist/{chunk-IKDBT5WT.js → chunk-GOTCGKX6.js} +3 -3
- package/dist/{chunk-HO3SITVT.js → chunk-ICZVCVD3.js} +1 -1
- package/dist/{chunk-5GPX4X4L.js → chunk-IGTGLGML.js} +2 -2
- package/dist/{chunk-KEGTYA7V.js → chunk-IK3SOMZ4.js} +5 -3
- package/dist/{chunk-6PIGOKTE.js → chunk-JGYHWVXQ.js} +339 -67
- package/dist/{chunk-NCVGBBWC.js → chunk-KRE55WLI.js} +1 -1
- package/dist/{chunk-JZLFHF2M.js → chunk-KWRBEDJI.js} +3 -3
- package/dist/{chunk-INNBWSZK.js → chunk-LYIG2GZ5.js} +2 -2
- package/dist/{chunk-ESOAYGIT.js → chunk-MMV6IY6U.js} +2 -2
- package/dist/{chunk-4DEBDQD4.js → chunk-MP676E4B.js} +2 -2
- package/dist/{chunk-24N3BB5M.js → chunk-MYGXKD7A.js} +5 -5
- package/dist/{chunk-3W3MOLRL.js → chunk-N2NDDTYW.js} +2 -2
- package/dist/{chunk-GGDCBVXK.js → chunk-OMJA7JP6.js} +5 -5
- package/dist/chunk-P47XYVEQ.js +3795 -0
- package/dist/{chunk-NIGOOCVS.js → chunk-P4QE7SSN.js} +1 -1
- package/dist/{chunk-AQXJC64X.js → chunk-PBNV5V5G.js} +1 -1
- package/dist/{chunk-A5RDOXZE.js → chunk-PINFPWRV.js} +5 -119
- package/dist/{chunk-2CEH75X3.js → chunk-PLEMSN3E.js} +2 -2
- package/dist/{chunk-DVAEX52Q.js → chunk-PPF65XAF.js} +1 -1
- package/dist/{chunk-V5J4XEBG.js → chunk-Q3TFX4OZ.js} +1 -1
- package/dist/{chunk-XSEGMQYA.js → chunk-QABAVWEX.js} +26 -3
- package/dist/{chunk-76NO4ZRM.js → chunk-RTS7BGEC.js} +1 -1
- package/dist/{chunk-H6BKVVU4.js → chunk-SB5DX6AD.js} +2 -2
- package/dist/{chunk-5YCFHCD4.js → chunk-SHVDJON6.js} +2 -2
- package/dist/{chunk-EWAAH7AU.js → chunk-TTFDAWCS.js} +1 -1
- package/dist/{chunk-MTUC2Z32.js → chunk-TU2CQJO3.js} +2 -2
- package/dist/{chunk-AFYZWHR7.js → chunk-V2FQQILJ.js} +2 -2
- package/dist/{chunk-ODE7HHNN.js → chunk-VD7WQYTO.js} +11 -9
- package/dist/{chunk-YITZFHRJ.js → chunk-VZ6LCTOZ.js} +1 -1
- package/dist/{chunk-SQHWDFTV.js → chunk-X3SCQP2A.js} +1 -1
- package/dist/{chunk-LBT4AMSF.js → chunk-XRKMITSS.js} +1 -1
- package/dist/{chunk-5O6I5ZV7.js → chunk-XTLV6UVP.js} +3 -3
- package/dist/{clean-RW7Z4XM6.js → clean-RRE6PMKZ.js} +18 -17
- package/dist/cli.js +54 -53
- package/dist/{cloud-EEOV7JKB.js → cloud-OIR6K7TS.js} +4 -4
- package/dist/{cloudrun-EZAXYVXG.js → cloudrun-BIQXBUDO.js} +3 -3
- package/dist/{compare-5UARQFXX.js → compare-E57W737I.js} +25 -24
- package/dist/{compiler-THI7BXZU.js → compiler-57M6W5WY.js} +3 -3
- package/dist/{component-AYOFPL33.js → component-I2O4AX56.js} +3 -3
- package/dist/{compositions-XJNJBOMG.js → compositions-B6NKZHIN.js} +10 -10
- package/dist/{delete-653AOR25.js → delete-DTUNBC6K.js} +2 -2
- package/dist/{dist-DLR4X3KN.js → dist-4JFB3WAR.js} +2 -2
- package/dist/{dist-2VXSQLXO.js → dist-ROVMAL74.js} +1 -1
- package/dist/{doctor-WA6VRRE7.js → doctor-SCNB73Z3.js} +12 -12
- package/dist/{events-XXBCP2I4.js → events-6LQNRKHZ.js} +3 -3
- package/dist/{events-U5COLUWT.js → events-Q37UJL36.js} +2 -2
- package/dist/{feedback-DX6Q3LN7.js → feedback-FOEBE2OW.js} +7 -7
- package/dist/{ffmpeg-2ROTISBL.js → ffmpeg-7BYARPLM.js} +4 -2
- package/dist/{figma-LCQVLBXF.js → figma-54MRTBKH.js} +3 -3
- package/dist/fontLocalizeCli.js +8 -8
- package/dist/{get-UYNPFMHX.js → get-EPGHM2SA.js} +2 -2
- package/dist/{gpuPolicy-YIW3HL3B.js → gpuPolicy-VGE3I5J4.js} +6 -6
- package/dist/{grade-compare-YQEYATJV.js → grade-compare-LOJWX6SK.js} +27 -26
- package/dist/{help-FDURC7WR.js → help-6FPZI3WP.js} +2 -1
- package/dist/{history-EU5UZLHT.js → history-GRXSUA5R.js} +8 -7
- package/dist/hyperframe-runtime.js +55 -55
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +55 -55
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-7T6CK6CL.js → info-LV7DFCLD.js} +7 -7
- package/dist/{init-KQYSKFVU.js → init-3J7BSAC3.js} +28 -28
- package/dist/{inspect-HQBV7VHS.js → inspect-5RON554C.js} +26 -25
- package/dist/{installer-OKKPQNKS.js → installer-T3STEB4U.js} +4 -4
- package/dist/{keyframes-SK74JHOA.js → keyframes-KHXTHI5C.js} +6 -6
- package/dist/{lambda-S2N4VTRO.js → lambda-4KCSMIM6.js} +4 -4
- package/dist/{layout-MTE5Y6DE.js → layout-DVWWT2TR.js} +26 -25
- package/dist/{lint-FJGGJYB7.js → lint-Q5WFB5ST.js} +7 -7
- package/dist/{lintProject-JGHKRO5L.js → lintProject-BGDYHF3F.js} +1 -1
- package/dist/{list-MBPALK5U.js → list-RFEUTW6N.js} +2 -2
- package/dist/{login-HDN4T5E4.js → login-WBHWA4M2.js} +4 -4
- package/dist/{manager-JNJE54OQ.js → manager-B6MVBM2E.js} +3 -3
- package/dist/{manager-ZLJD3EAY.js → manager-HEUPD2YB.js} +2 -2
- package/dist/{media-treatment-IP34DXWN.js → media-treatment-WRHVNWLS.js} +12 -11
- package/dist/{models-W5TASRHD.js → models-OA4MXEYG.js} +12 -12
- package/dist/{motionShot-2WYEMOPJ.js → motionShot-BZLRN3SS.js} +13 -13
- package/dist/{normalize-audio-F4NQPXII.js → normalize-audio-4YXE3RIF.js} +4 -4
- package/dist/{open-DRXNALDE.js → open-MCGYEFML.js} +4 -4
- package/dist/{parakeetRunner-VISBF2EA.js → parakeetRunner-DBLHMD5T.js} +13 -13
- package/dist/{pipeline-A2XOVZOM.js → pipeline-FSY65OQ4.js} +8 -8
- package/dist/{play-W2QELQX7.js → play-WXOV3BD7.js} +19 -18
- package/dist/{preflight-BH2XUQBS.js → preflight-G5KP7ZKA.js} +4 -4
- package/dist/{present-NHYRS4F4.js → present-RVG4J6CJ.js} +15 -14
- package/dist/{preview-SMJVUPXE.js → preview-PDUQR2JQ.js} +18 -18
- package/dist/{producer-276O3CKW.js → producer-C5V2A3YL.js} +1 -1
- package/dist/{projectConfig-FXFUHFPZ.js → projectConfig-X2IEHCSK.js} +6 -6
- package/dist/{publication-SSQO6ECV.js → publication-JEANCWBW.js} +2 -2
- package/dist/{publish-UHDKDXZI.js → publish-VX5OH4ST.js} +9 -9
- package/dist/{remove-background-IG6U56HC.js → remove-background-IXCISD26.js} +9 -9
- package/dist/{render-ZJPSLTKV.js → render-5BGU3FXU.js} +29 -28
- package/dist/{render-XQONIJEJ.js → render-ISUT7Q3X.js} +3 -3
- package/dist/{render-6P5RSFS3.js → render-JNJVFBFF.js} +9 -9
- package/dist/{render-batch-MH3Z6IPT.js → render-batch-2C6RUP3F.js} +3 -3
- package/dist/renderSetupWorker.js +4 -4
- package/dist/{resolver-JMSGO2JF.js → resolver-KTNKZVIB.js} +4 -4
- package/dist/{sherpa-64JLV4YM.js → sherpa-GFRG3TMM.js} +12 -12
- package/dist/skills/hyperframes-cli/SKILL.md +5 -4
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +8 -0
- package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +1 -1
- package/dist/{skills-UXOL62PY.js → skills-LKJA27ZN.js} +5 -5
- package/dist/{skillsUpdateCheck-5Y6676K6.js → skillsUpdateCheck-RFZJKZC4.js} +3 -3
- package/dist/{snapshot-SQBPCXOV.js → snapshot-EOYA4MLG.js} +40 -30
- package/dist/{src-N42CT3YR.js → src-GPUDUKY6.js} +5 -5
- package/dist/{src-RQMK5INS.js → src-IMCQRH4P.js} +7 -7
- package/dist/{staticProjectServer-AQXVWMLU.js → staticProjectServer-S3NK3V4S.js} +15 -14
- package/dist/studio/assets/{hyperframes-player-kqB1psAJ.js → hyperframes-player-CXL23NEv.js} +1 -1
- package/dist/studio/assets/{index-C3AZLr-0.js → index-Bl_xrA5T.js} +1 -1
- package/dist/studio/assets/{index-BrViH8hj.js → index-CejKvBNw.js} +1 -1
- package/dist/studio/assets/{index-X_d1b5vz.js → index-D7BvLHtZ.js} +7 -7
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-GY5D7RAP.js → studio-api-YM5HLXUS.js} +13 -8
- package/dist/{studioServer-O3VONODG.js → studioServer-CEXJK5TC.js} +45 -44
- package/dist/{telemetry-V2K5P7CI.js → telemetry-7AWYECPL.js} +3 -3
- package/dist/{timeline-YU3YPLKB.js → timeline-G7H373XX.js} +42 -347
- package/dist/{tokens-NPSSSG2A.js → tokens-GYH7NXXA.js} +2 -2
- package/dist/{transcribe-FNBDG24U.js → transcribe-CIC7WAT5.js} +17 -17
- package/dist/{transcribe-BXJNS3RZ.js → transcribe-FL6NGWHF.js} +11 -11
- package/dist/{updateCheck-MB3RHSVK.js → updateCheck-MQ44KGUR.js} +2 -2
- package/dist/{upgrade-5VNRUR37.js → upgrade-OL47SID3.js} +2 -2
- package/dist/{urlDownloader-WCT7FMLA.js → urlDownloader-KDJGLR2Y.js} +5 -5
- package/dist/{usage-EC3KFUIJ.js → usage-HG4WMM7A.js} +33 -5
- package/dist/{validate-UXSXRCE6.js → validate-TDCH6X3C.js} +20 -19
- package/dist/{video-NRNQBZMV.js → video-AHO4CDCK.js} +6 -6
- package/package.json +1 -1
- package/dist/chunk-TWBTXEDZ.js +0 -3795
|
@@ -4,12 +4,15 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
describeProject
|
|
9
|
+
} from "./chunk-GJQHHAAX.js";
|
|
7
10
|
import {
|
|
8
11
|
readCompositionFps
|
|
9
12
|
} from "./chunk-WPNE5NEP.js";
|
|
10
13
|
import {
|
|
11
14
|
resolveProject
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-37LNY2EC.js";
|
|
13
16
|
import "./chunk-K2FLNJVB.js";
|
|
14
17
|
import {
|
|
15
18
|
ensureDOMParser
|
|
@@ -17,24 +20,22 @@ import {
|
|
|
17
20
|
import {
|
|
18
21
|
applyFileMutations,
|
|
19
22
|
duplicateElementInHtml
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VD7WQYTO.js";
|
|
21
24
|
import {
|
|
22
|
-
findSyncPartner,
|
|
23
25
|
patchElementInHtml,
|
|
24
|
-
readLinkTiming,
|
|
25
26
|
removeElementFromHtml,
|
|
26
|
-
splitElementInHtml
|
|
27
|
-
|
|
28
|
-
} from "./chunk-A5RDOXZE.js";
|
|
27
|
+
splitElementInHtml
|
|
28
|
+
} from "./chunk-PINFPWRV.js";
|
|
29
29
|
import "./chunk-C6TPGUWD.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-6JR2XUEE.js";
|
|
31
|
+
import "./chunk-4ID635FL.js";
|
|
31
32
|
import {
|
|
32
33
|
fileContentVersion
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JGYHWVXQ.js";
|
|
34
35
|
import "./chunk-FFDC5OWV.js";
|
|
35
36
|
import "./chunk-5CS4T6C6.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-KRE55WLI.js";
|
|
38
|
+
import "./chunk-ICZVCVD3.js";
|
|
38
39
|
import "./chunk-VWG7OQKU.js";
|
|
39
40
|
import "./chunk-QWQ6GQTI.js";
|
|
40
41
|
import {
|
|
@@ -57,70 +58,44 @@ import "./chunk-EOOEC32M.js";
|
|
|
57
58
|
import "./chunk-TJSTGSAW.js";
|
|
58
59
|
import {
|
|
59
60
|
withMeta
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-FRGYHRP6.js";
|
|
61
62
|
import "./chunk-K4WIOZFP.js";
|
|
62
63
|
import "./chunk-XUXGIA7H.js";
|
|
63
64
|
import "./chunk-WERLJGIC.js";
|
|
64
65
|
import "./chunk-ISN5GRYI.js";
|
|
65
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-TU2CQJO3.js";
|
|
66
67
|
import "./chunk-EOVYQ3IG.js";
|
|
67
68
|
import "./chunk-XT6MXC7A.js";
|
|
68
|
-
import
|
|
69
|
-
|
|
70
|
-
extractAudioMetadata,
|
|
71
|
-
extractMediaMetadata,
|
|
72
|
-
resolveReferencedDuration,
|
|
73
|
-
resolveReferencedStart
|
|
74
|
-
} from "./chunk-2CEH75X3.js";
|
|
75
|
-
import "./chunk-INNBWSZK.js";
|
|
69
|
+
import "./chunk-PLEMSN3E.js";
|
|
70
|
+
import "./chunk-LYIG2GZ5.js";
|
|
76
71
|
import {
|
|
77
72
|
ensureHfIds
|
|
78
73
|
} from "./chunk-KCF6GHJP.js";
|
|
79
74
|
import "./chunk-JYVGYKXG.js";
|
|
80
75
|
import "./chunk-7KDQAD2W.js";
|
|
81
76
|
import {
|
|
82
|
-
byStart,
|
|
83
|
-
compositionOriginSeconds,
|
|
84
|
-
cutToHostSlots,
|
|
85
77
|
fpsToNumber,
|
|
86
|
-
hostInPointSeconds,
|
|
87
78
|
isInsideSpan,
|
|
88
79
|
parseFpsWithDefault,
|
|
89
|
-
resolveMediaStartSeconds,
|
|
90
80
|
sameInstant,
|
|
91
81
|
spansShareTime
|
|
92
|
-
} from "./chunk-
|
|
93
|
-
import
|
|
94
|
-
HF_AUDIO_AUTOMATION_ATTR,
|
|
95
|
-
HF_AUDIO_FX_ATTR,
|
|
96
|
-
parseAudioFxChain,
|
|
97
|
-
parseAutomation,
|
|
98
|
-
resolveAutomation
|
|
99
|
-
} from "./chunk-TWBTXEDZ.js";
|
|
82
|
+
} from "./chunk-Q3TFX4OZ.js";
|
|
83
|
+
import "./chunk-P47XYVEQ.js";
|
|
100
84
|
import "./chunk-VC76R6W2.js";
|
|
101
85
|
import "./chunk-UJKQWGFF.js";
|
|
102
|
-
import
|
|
103
|
-
topLevelElements,
|
|
104
|
-
trackKindOf
|
|
105
|
-
} from "./chunk-ALLKNYC3.js";
|
|
86
|
+
import "./chunk-ALLKNYC3.js";
|
|
106
87
|
import "./chunk-OFQWTKPW.js";
|
|
107
88
|
import "./chunk-DPVXBVLL.js";
|
|
108
89
|
import "./chunk-T76PLPD6.js";
|
|
109
90
|
import "./chunk-FXMKHHPO.js";
|
|
110
91
|
import "./chunk-RQVDTPGD.js";
|
|
111
92
|
import "./chunk-TWWSYAKJ.js";
|
|
112
|
-
import "./chunk-
|
|
93
|
+
import "./chunk-2742O5DO.js";
|
|
113
94
|
import "./chunk-IWFLMU2N.js";
|
|
114
95
|
import "./chunk-3VGU2SH7.js";
|
|
115
96
|
import "./chunk-VAS6HQX3.js";
|
|
116
|
-
import
|
|
117
|
-
|
|
118
|
-
} from "./chunk-3RM2ETQT.js";
|
|
119
|
-
import {
|
|
120
|
-
readMediaOffsetSeconds,
|
|
121
|
-
readPlaybackRate,
|
|
122
|
-
resolveMediaDuration
|
|
123
|
-
} from "./chunk-BSQ7XANM.js";
|
|
97
|
+
import "./chunk-3RM2ETQT.js";
|
|
98
|
+
import "./chunk-BSQ7XANM.js";
|
|
124
99
|
import "./chunk-SDYDNHEE.js";
|
|
125
100
|
import "./chunk-TYXH3EKP.js";
|
|
126
101
|
import "./chunk-IXLUTE6N.js";
|
|
@@ -128,286 +103,6 @@ import "./chunk-KNU5COPB.js";
|
|
|
128
103
|
import "./chunk-3GXQPCJC.js";
|
|
129
104
|
import "./chunk-M2WBOQ2Q.js";
|
|
130
105
|
|
|
131
|
-
// src/timeline/describeProject.ts
|
|
132
|
-
import { readFileSync, realpathSync, statSync } from "fs";
|
|
133
|
-
import { basename, dirname, isAbsolute, relative, resolve, sep } from "path";
|
|
134
|
-
var TRACK_ORDER = ["video", "graphics", "captions", "audio"];
|
|
135
|
-
function toNode(el) {
|
|
136
|
-
const attrs = {};
|
|
137
|
-
for (const { name, value } of Array.from(el.attributes)) attrs[name] = value;
|
|
138
|
-
return { tag: el.tagName, attrs, children: Array.from(el.children).map(toNode), el };
|
|
139
|
-
}
|
|
140
|
-
function safeChain(raw) {
|
|
141
|
-
try {
|
|
142
|
-
return parseAudioFxChain(raw);
|
|
143
|
-
} catch {
|
|
144
|
-
return void 0;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function readLanes(el) {
|
|
148
|
-
const raw = el.getAttribute(HF_AUDIO_AUTOMATION_ATTR);
|
|
149
|
-
if (!raw) return { lanes: [], laneError: null };
|
|
150
|
-
try {
|
|
151
|
-
const fx = el.getAttribute(HF_AUDIO_FX_ATTR);
|
|
152
|
-
const chain = fx ? safeChain(fx) : void 0;
|
|
153
|
-
const lanes = resolveAutomation(parseAutomation(raw), chain).lanes.map((lane) => ({
|
|
154
|
-
target: lane.target,
|
|
155
|
-
points: lane.points.map(({ t, v }) => ({ t, v }))
|
|
156
|
-
}));
|
|
157
|
-
return { lanes, laneError: null };
|
|
158
|
-
} catch (err) {
|
|
159
|
-
return { lanes: [], laneError: err instanceof Error ? err.message : String(err) };
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
var measureWithFfprobe = async (file, tag) => (tag === "audio" ? await extractAudioMetadata(file) : await extractMediaMetadata(file)).durationSeconds;
|
|
163
|
-
var MEDIA_TAG = /^(video|audio|img)$/;
|
|
164
|
-
var PROBE_CONCURRENCY = 4;
|
|
165
|
-
function createProbeGate(max) {
|
|
166
|
-
let active = 0;
|
|
167
|
-
const waiting = [];
|
|
168
|
-
return async function withProbeSlot(fn) {
|
|
169
|
-
if (active >= max) await new Promise((wake) => waiting.push(wake));
|
|
170
|
-
else active += 1;
|
|
171
|
-
try {
|
|
172
|
-
return await fn();
|
|
173
|
-
} finally {
|
|
174
|
-
const next = waiting.shift();
|
|
175
|
-
if (next) next();
|
|
176
|
-
else active -= 1;
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
async function probeSource(scope, el, tag) {
|
|
181
|
-
const src = el.getAttribute("src");
|
|
182
|
-
if (!src) return { ok: false, reason: "no src attribute" };
|
|
183
|
-
if (/^https?:\/\//i.test(src)) return { ok: false, reason: "remote source not probed" };
|
|
184
|
-
const file = realFileInside(scope.projectDir, resolve(scope.dir, src));
|
|
185
|
-
if (!file) return { ok: false, reason: "source file not found" };
|
|
186
|
-
return scope.withProbeSlot(async () => {
|
|
187
|
-
try {
|
|
188
|
-
return { ok: true, seconds: await scope.measure(file, tag) };
|
|
189
|
-
} catch (err) {
|
|
190
|
-
return { ok: false, reason: err instanceof Error ? err.message : String(err) };
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
function resolveContainerDuration(authored, children) {
|
|
195
|
-
if (authored !== null)
|
|
196
|
-
return { duration: authored, durationSource: "authored", pendingReason: null };
|
|
197
|
-
if (children.length === 0) return { duration: 0, durationSource: null, pendingReason: null };
|
|
198
|
-
const inner = children.reduce((max, c) => Math.max(max, c.end), 0);
|
|
199
|
-
return { duration: inner, durationSource: "inner", pendingReason: null };
|
|
200
|
-
}
|
|
201
|
-
async function resolveMediaRowDuration(scope, el, tag, authored) {
|
|
202
|
-
const getAttr = (name) => el.getAttribute(name);
|
|
203
|
-
const input = {
|
|
204
|
-
tag,
|
|
205
|
-
authoredDurationSeconds: authored,
|
|
206
|
-
mediaStartSeconds: readMediaOffsetSeconds(getAttr),
|
|
207
|
-
playbackRate: readPlaybackRate(getAttr)
|
|
208
|
-
};
|
|
209
|
-
const unprobed = resolveMediaDuration({ ...input, sourceDurationSeconds: null });
|
|
210
|
-
if (unprobed.source !== "pending") {
|
|
211
|
-
return {
|
|
212
|
-
duration: unprobed.seconds ?? 0,
|
|
213
|
-
durationSource: unprobed.source,
|
|
214
|
-
pendingReason: null
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
const probe = await probeSource(scope, el, tag);
|
|
218
|
-
const measured = probe.ok && probe.seconds > 0 ? probe.seconds : null;
|
|
219
|
-
const result = resolveMediaDuration({ ...input, sourceDurationSeconds: measured });
|
|
220
|
-
return {
|
|
221
|
-
duration: result.seconds ?? 0,
|
|
222
|
-
durationSource: result.source,
|
|
223
|
-
pendingReason: result.source === "pending" ? pendingReason(probe, result.reason) : null
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
function pendingReason(probe, resolverReason) {
|
|
227
|
-
if (!probe.ok) return probe.reason;
|
|
228
|
-
return probe.seconds > 0 ? resolverReason ?? "source duration unavailable" : "source reports no duration";
|
|
229
|
-
}
|
|
230
|
-
var roundMs = (v) => Math.round(v * 1e3) / 1e3;
|
|
231
|
-
function mainTimelineStart(scope, el, start) {
|
|
232
|
-
const ordinaryStart = () => scope.origin + start;
|
|
233
|
-
if (!/^(video|audio)$/i.test(el.tagName)) return ordinaryStart();
|
|
234
|
-
return resolveMediaStartSeconds({
|
|
235
|
-
authoredStart: parseNumeric(el.getAttribute("data-start")),
|
|
236
|
-
hostStart: scope.origin,
|
|
237
|
-
hasAutoStart: el.hasAttribute("data-hf-auto-start"),
|
|
238
|
-
basis: el.getAttribute("data-hf-media-start-basis"),
|
|
239
|
-
ordinaryStart
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
async function resolveRowTiming(scope, node, depth) {
|
|
243
|
-
const { el } = node;
|
|
244
|
-
const start = resolveReferencedStart(scope.doc, el, scope.startCache, /* @__PURE__ */ new Set());
|
|
245
|
-
const authored = resolveReferencedDuration(scope.doc, el, scope.startCache, /* @__PURE__ */ new Set());
|
|
246
|
-
const host = el.getAttribute("data-composition-src");
|
|
247
|
-
const absStart = mainTimelineStart(scope, el, start);
|
|
248
|
-
const slots = hostInPointSeconds(el) > 0 ? [{ start: absStart, end: absStart + (authored ?? Infinity) }] : [];
|
|
249
|
-
const children = host && depth === 0 ? await readSubComposition(host, scope, compositionOriginSeconds(absStart, el), slots) : [];
|
|
250
|
-
const kind = el.tagName.toLowerCase();
|
|
251
|
-
const duration = MEDIA_TAG.test(kind) ? await resolveMediaRowDuration(scope, el, kind, authored) : resolveContainerDuration(authored, children);
|
|
252
|
-
return { start, authored, absStart, children, duration };
|
|
253
|
-
}
|
|
254
|
-
function describeRowFields(scope, node, timing) {
|
|
255
|
-
const { el } = node;
|
|
256
|
-
const kind = el.tagName.toLowerCase();
|
|
257
|
-
const host = el.getAttribute("data-composition-src");
|
|
258
|
-
const rate = parseNumeric(el.getAttribute("data-playback-rate"));
|
|
259
|
-
return {
|
|
260
|
-
id: el.id || el.getAttribute("data-composition-id") || kind,
|
|
261
|
-
label: null,
|
|
262
|
-
kind,
|
|
263
|
-
trackKind: trackKindOf(node).kind,
|
|
264
|
-
start: timing.start,
|
|
265
|
-
duration: timing.duration.duration,
|
|
266
|
-
end: timing.start + timing.duration.duration,
|
|
267
|
-
absStart: roundMs(timing.absStart),
|
|
268
|
-
absEnd: roundMs(timing.absStart + timing.duration.duration),
|
|
269
|
-
file: scope.file,
|
|
270
|
-
trackIndex: parseNumeric(el.getAttribute("data-track-index")) ?? 0,
|
|
271
|
-
src: el.getAttribute("src") ?? host,
|
|
272
|
-
sourceFile: host,
|
|
273
|
-
volume: parseNumeric(el.getAttribute("data-volume")),
|
|
274
|
-
...readLanes(el),
|
|
275
|
-
playbackRate: rate === 1 ? null : rate,
|
|
276
|
-
audioGroup: el.getAttribute(HF_AUDIO_GROUP_ATTR),
|
|
277
|
-
role: null,
|
|
278
|
-
durationAuthored: timing.authored !== null,
|
|
279
|
-
durationSource: timing.duration.durationSource,
|
|
280
|
-
pendingReason: timing.duration.pendingReason,
|
|
281
|
-
children: timing.children,
|
|
282
|
-
ref: "",
|
|
283
|
-
warnings: [],
|
|
284
|
-
elementId: el.id || null,
|
|
285
|
-
hfId: el.getAttribute("data-hf-id"),
|
|
286
|
-
syncOffsetFrames: syncOffsetOf(el, scope.fps)
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
function syncOffsetOf(el, fps) {
|
|
290
|
-
const partner = findSyncPartner(el);
|
|
291
|
-
return partner ? syncOffsetFrames(readLinkTiming(el), readLinkTiming(partner), fps) : null;
|
|
292
|
-
}
|
|
293
|
-
async function describeRow(scope, node, depth) {
|
|
294
|
-
return describeRowFields(scope, node, await resolveRowTiming(scope, node, depth));
|
|
295
|
-
}
|
|
296
|
-
async function readSubComposition(src, parent, origin, slots) {
|
|
297
|
-
const authored = resolve(parent.dir, src);
|
|
298
|
-
const file = realFileInside(parent.projectDir, authored);
|
|
299
|
-
if (!file) return [];
|
|
300
|
-
const relativeFile = relative(parent.projectDir, authored).split(sep).join("/");
|
|
301
|
-
const source = parent.sourceOverrides.get(relativeFile) ?? readFileSync(file, "utf-8");
|
|
302
|
-
const doc = new DOMParser().parseFromString(source, "text/html");
|
|
303
|
-
const template = doc.querySelector("template");
|
|
304
|
-
const root = (template?.content ?? doc).querySelector("[data-composition-id]");
|
|
305
|
-
if (!root) return [];
|
|
306
|
-
const scope = {
|
|
307
|
-
doc,
|
|
308
|
-
dir: dirname(file),
|
|
309
|
-
startCache: /* @__PURE__ */ new Map(),
|
|
310
|
-
projectDir: parent.projectDir,
|
|
311
|
-
origin,
|
|
312
|
-
file: relative(parent.projectDir, authored).split(sep).join("/"),
|
|
313
|
-
withProbeSlot: parent.withProbeSlot,
|
|
314
|
-
measure: parent.measure,
|
|
315
|
-
sourceOverrides: parent.sourceOverrides,
|
|
316
|
-
fps: parent.fps
|
|
317
|
-
};
|
|
318
|
-
const rows = await Promise.all(
|
|
319
|
-
topLevelElements(toNode(root)).map((node) => describeRow(scope, node, 1))
|
|
320
|
-
);
|
|
321
|
-
return rows.flatMap((row) => cutRow(row, slots)).sort(byStart);
|
|
322
|
-
}
|
|
323
|
-
function cutRow(row, slots) {
|
|
324
|
-
const kept = cutToHostSlots({ start: row.absStart, end: row.absEnd }, slots);
|
|
325
|
-
if (kept.end === kept.start && row.absEnd > row.absStart) return [];
|
|
326
|
-
return [{ ...row, absStart: roundMs(kept.start), absEnd: roundMs(kept.end) }];
|
|
327
|
-
}
|
|
328
|
-
function realFileInside(projectDir, path) {
|
|
329
|
-
try {
|
|
330
|
-
const real = realpathSync(path);
|
|
331
|
-
const inside = relative(realpathSync(projectDir), real);
|
|
332
|
-
if (inside === ".." || inside.startsWith(`..${sep}`) || isAbsolute(inside)) return null;
|
|
333
|
-
return statSync(real).isFile() ? real : null;
|
|
334
|
-
} catch {
|
|
335
|
-
return null;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
function flatten(top) {
|
|
339
|
-
const entries = [
|
|
340
|
-
...top.map((clip) => ({ clip, host: null })),
|
|
341
|
-
...top.flatMap((host) => host.children.map((clip) => ({ clip, host })))
|
|
342
|
-
];
|
|
343
|
-
const byKind = TRACK_ORDER.map((kind) => ({
|
|
344
|
-
kind,
|
|
345
|
-
entries: entries.filter((e) => e.clip.trackKind === kind).sort((a, b) => a.clip.absStart - b.clip.absStart)
|
|
346
|
-
})).filter((t) => t.entries.length > 0);
|
|
347
|
-
const pointers = new Map(
|
|
348
|
-
byKind.flatMap((t) => t.entries.map((e, index) => [e.clip, { kind: t.kind, index }]))
|
|
349
|
-
);
|
|
350
|
-
const at = (clip) => pointers.get(clip);
|
|
351
|
-
const fileIds = /* @__PURE__ */ new Map();
|
|
352
|
-
for (const { entries: entries2 } of byKind) {
|
|
353
|
-
for (const { clip } of entries2) {
|
|
354
|
-
if (!clip.elementId) continue;
|
|
355
|
-
const ids = fileIds.get(clip.file) ?? /* @__PURE__ */ new Map();
|
|
356
|
-
ids.set(clip.elementId, (ids.get(clip.elementId) ?? 0) + 1);
|
|
357
|
-
fileIds.set(clip.file, ids);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
return byKind.map(({ kind, entries: kindEntries }) => ({
|
|
361
|
-
kind,
|
|
362
|
-
rows: kindEntries.map(({ clip, host }, index) => {
|
|
363
|
-
const uniqueId = clip.elementId && fileIds.get(clip.file)?.get(clip.elementId) === 1;
|
|
364
|
-
const ref = uniqueId ? `#${clip.elementId}` : clip.hfId ? `hf:${clip.hfId}` : `${kind}/${index}`;
|
|
365
|
-
const warnings = uniqueId || clip.hfId ? [] : [
|
|
366
|
-
'row has no stable name; add id="<name>" to the element in this file, then retry with #<name>'
|
|
367
|
-
];
|
|
368
|
-
return {
|
|
369
|
-
...clip,
|
|
370
|
-
index,
|
|
371
|
-
ref,
|
|
372
|
-
warnings,
|
|
373
|
-
nested: host !== null,
|
|
374
|
-
host: host && host.id,
|
|
375
|
-
hostRow: host && at(host),
|
|
376
|
-
children: clip.children.map(at)
|
|
377
|
-
};
|
|
378
|
-
})
|
|
379
|
-
}));
|
|
380
|
-
}
|
|
381
|
-
function projectFps(source) {
|
|
382
|
-
const parsed = parseFpsWithDefault(readCompositionFps(source) ?? void 0);
|
|
383
|
-
return fpsToNumber(parsed.ok ? parsed.value : { num: 30, den: 1 });
|
|
384
|
-
}
|
|
385
|
-
async function describeProject(indexPath, measure = measureWithFfprobe, sourceOverrides = /* @__PURE__ */ new Map()) {
|
|
386
|
-
const projectDir = dirname(indexPath);
|
|
387
|
-
const source = sourceOverrides.get(basename(indexPath)) ?? readFileSync(indexPath, "utf-8");
|
|
388
|
-
const doc = new DOMParser().parseFromString(source, "text/html");
|
|
389
|
-
const root = doc.querySelector("[data-composition-id]") ?? doc.body;
|
|
390
|
-
const dir = projectDir;
|
|
391
|
-
const scope = {
|
|
392
|
-
doc,
|
|
393
|
-
dir,
|
|
394
|
-
startCache: /* @__PURE__ */ new Map(),
|
|
395
|
-
projectDir: dir,
|
|
396
|
-
origin: 0,
|
|
397
|
-
file: basename(indexPath),
|
|
398
|
-
withProbeSlot: createProbeGate(PROBE_CONCURRENCY),
|
|
399
|
-
measure,
|
|
400
|
-
sourceOverrides,
|
|
401
|
-
fps: projectFps(source)
|
|
402
|
-
};
|
|
403
|
-
const rows = (await Promise.all(topLevelElements(toNode(root)).map((node) => describeRow(scope, node, 0)))).sort(byStart);
|
|
404
|
-
const declared = parseNumeric(root.getAttribute("data-duration"));
|
|
405
|
-
return {
|
|
406
|
-
duration: declared ?? rows.reduce((max, r) => Math.max(max, r.end), 0),
|
|
407
|
-
tracks: flatten(rows)
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
|
|
411
106
|
// src/timeline/formatTimeline.ts
|
|
412
107
|
var BAR_WIDTH = 40;
|
|
413
108
|
var n = (v) => String(Math.round(v * 1e3) / 1e3);
|
|
@@ -474,7 +169,7 @@ function formatTimeline(timeline) {
|
|
|
474
169
|
}
|
|
475
170
|
|
|
476
171
|
// src/timeline/a2Commands.ts
|
|
477
|
-
import { readFileSync as
|
|
172
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
478
173
|
import { join } from "path";
|
|
479
174
|
|
|
480
175
|
// src/timeline/resolveRef.ts
|
|
@@ -517,9 +212,9 @@ function parseTimeExpression(expression, context) {
|
|
|
517
212
|
const frames = /^(-?\d+(?:\.\d+)?)f$/.exec(raw);
|
|
518
213
|
if (frames) return { ok: true, seconds: Number(frames[1]) / context.fps };
|
|
519
214
|
const absolute = /^\d+(?:\.\d+)?$/.test(raw);
|
|
520
|
-
const
|
|
215
|
+
const relative = /^[+-]\d+(?:\.\d+)?$/.test(raw);
|
|
521
216
|
if (absolute) return { ok: true, seconds: Number(raw) };
|
|
522
|
-
if (
|
|
217
|
+
if (relative) return { ok: true, seconds: context.row.start + Number(raw) };
|
|
523
218
|
const anchor = /^(after|before|start-of|end-of):(.+)$/.exec(raw);
|
|
524
219
|
if (!anchor) return { ok: false, reason: `invalid time expression: ${expression}` };
|
|
525
220
|
const row = context.resolveAnchor(anchor[2]);
|
|
@@ -536,7 +231,7 @@ function parseTimeExpression(expression, context) {
|
|
|
536
231
|
}
|
|
537
232
|
|
|
538
233
|
// src/timeline/a2Shared.ts
|
|
539
|
-
import { readFileSync
|
|
234
|
+
import { readFileSync } from "fs";
|
|
540
235
|
|
|
541
236
|
// src/timeline/a2Mutations.ts
|
|
542
237
|
function parseSetAssignments(values) {
|
|
@@ -606,7 +301,7 @@ function publicReceipt(receipt) {
|
|
|
606
301
|
}
|
|
607
302
|
function fpsFor(indexPath) {
|
|
608
303
|
const parsed = parseFpsWithDefault(
|
|
609
|
-
readCompositionFps(
|
|
304
|
+
readCompositionFps(readFileSync(indexPath, "utf-8")) ?? void 0
|
|
610
305
|
);
|
|
611
306
|
return fpsToNumber(parsed.ok ? parsed.value : { num: 30, den: 1 });
|
|
612
307
|
}
|
|
@@ -913,7 +608,7 @@ async function runIds(args) {
|
|
|
913
608
|
const beforeTimeline = await describeProject(project.indexPath);
|
|
914
609
|
const files = [.../* @__PURE__ */ new Set(["index.html", ...allRows(beforeTimeline).map((row) => row.file)])];
|
|
915
610
|
const inputs = files.flatMap((file) => {
|
|
916
|
-
const before =
|
|
611
|
+
const before = readFileSync2(join(project.dir, file), "utf-8");
|
|
917
612
|
const after = ensureHfIds(before);
|
|
918
613
|
return after === before ? [] : [
|
|
919
614
|
{
|
|
@@ -1002,7 +697,7 @@ function applyPlanEdit(edit, timeline, project, sourceByFile) {
|
|
|
1002
697
|
return { ok: true, file: row.file, after: decision.after };
|
|
1003
698
|
}
|
|
1004
699
|
function readEditPlan(file) {
|
|
1005
|
-
const raw = file === "-" ?
|
|
700
|
+
const raw = file === "-" ? readFileSync2(0, "utf-8") : readFileSync2(file, "utf-8");
|
|
1006
701
|
try {
|
|
1007
702
|
const edits = JSON.parse(raw);
|
|
1008
703
|
return Array.isArray(edits) ? { ok: true, edits } : { ok: false, reason: "edit plan must be a JSON array", fix: "pass a JSON array of edits" };
|
|
@@ -1014,7 +709,7 @@ function readPlanSources(timeline, project) {
|
|
|
1014
709
|
const sourceByFile = /* @__PURE__ */ new Map();
|
|
1015
710
|
const beforeByFile = /* @__PURE__ */ new Map();
|
|
1016
711
|
for (const fileName of new Set(allRows(timeline).map((row) => row.file))) {
|
|
1017
|
-
const source =
|
|
712
|
+
const source = readFileSync2(join(project.dir, fileName), "utf-8");
|
|
1018
713
|
sourceByFile.set(fileName, source);
|
|
1019
714
|
beforeByFile.set(fileName, source);
|
|
1020
715
|
}
|
|
@@ -1086,7 +781,7 @@ function isUndoReceipt(value) {
|
|
|
1086
781
|
function readUndoInput(input) {
|
|
1087
782
|
let raw;
|
|
1088
783
|
try {
|
|
1089
|
-
raw =
|
|
784
|
+
raw = readFileSync2(input, "utf-8");
|
|
1090
785
|
} catch {
|
|
1091
786
|
raw = input;
|
|
1092
787
|
}
|
|
@@ -1128,8 +823,8 @@ async function runUndo(args) {
|
|
|
1128
823
|
return {
|
|
1129
824
|
sourceFile: receipt.file,
|
|
1130
825
|
absPath: target,
|
|
1131
|
-
before:
|
|
1132
|
-
after:
|
|
826
|
+
before: readFileSync2(target, "utf-8"),
|
|
827
|
+
after: readFileSync2(join(project.dir, receipt.backupPath), "utf-8"),
|
|
1133
828
|
expectedVersion: receipt.version
|
|
1134
829
|
};
|
|
1135
830
|
});
|
|
@@ -1154,7 +849,7 @@ async function runUndo(args) {
|
|
|
1154
849
|
}
|
|
1155
850
|
|
|
1156
851
|
// src/timeline/a2MutationCommand.ts
|
|
1157
|
-
import { readFileSync as
|
|
852
|
+
import { readFileSync as readFileSync3 } from "fs";
|
|
1158
853
|
import { join as join2 } from "path";
|
|
1159
854
|
async function runMutation(verb, args) {
|
|
1160
855
|
const setup = await prepareMutation(args);
|
|
@@ -1171,14 +866,14 @@ async function prepareMutation(args) {
|
|
|
1171
866
|
const overwrite = args.overwrite === true;
|
|
1172
867
|
const snap = args.snap === true;
|
|
1173
868
|
ensureDOMParser();
|
|
1174
|
-
const indexSource =
|
|
869
|
+
const indexSource = readFileSync3(project.indexPath, "utf-8");
|
|
1175
870
|
const initialTimeline = await describeProject(
|
|
1176
871
|
project.indexPath,
|
|
1177
872
|
void 0,
|
|
1178
873
|
/* @__PURE__ */ new Map([["index.html", indexSource]])
|
|
1179
874
|
);
|
|
1180
|
-
const
|
|
1181
|
-
if (snap &&
|
|
875
|
+
const projectFps = declaredFps(indexSource);
|
|
876
|
+
if (snap && projectFps === null) {
|
|
1182
877
|
return {
|
|
1183
878
|
ok: false,
|
|
1184
879
|
reason: "project fps is unknown",
|
|
@@ -1191,7 +886,7 @@ async function prepareMutation(args) {
|
|
|
1191
886
|
return { ok: false, reason: initialResolved.reason, fix: initialResolved.fix, json };
|
|
1192
887
|
const initialRow = initialResolved.row;
|
|
1193
888
|
const filePath = join2(project.dir, initialRow.file);
|
|
1194
|
-
const before =
|
|
889
|
+
const before = readFileSync3(filePath, "utf-8");
|
|
1195
890
|
const expectedVersion = fileContentVersion(before);
|
|
1196
891
|
const sources = /* @__PURE__ */ new Map([
|
|
1197
892
|
["index.html", indexSource],
|
|
@@ -1213,7 +908,7 @@ async function prepareMutation(args) {
|
|
|
1213
908
|
resolveAnchor: anchor
|
|
1214
909
|
});
|
|
1215
910
|
if (!parsed.ok || !snap) return parsed;
|
|
1216
|
-
return { ok: true, seconds: Math.round(parsed.seconds *
|
|
911
|
+
return { ok: true, seconds: Math.round(parsed.seconds * projectFps) / projectFps };
|
|
1217
912
|
};
|
|
1218
913
|
return {
|
|
1219
914
|
ok: true,
|
|
@@ -1458,9 +1153,9 @@ var timeline_default = defineCommand({
|
|
|
1458
1153
|
const info = await fetch(`${url}/info`, { signal: AbortSignal.timeout(5e3) }).then(
|
|
1459
1154
|
(r) => r.json()
|
|
1460
1155
|
);
|
|
1461
|
-
const { realpathSync
|
|
1462
|
-
const { dirname
|
|
1463
|
-
if (
|
|
1156
|
+
const { realpathSync } = await import("fs");
|
|
1157
|
+
const { dirname } = await import("path");
|
|
1158
|
+
if (realpathSync(info.project) !== realpathSync(dirname(project.indexPath)))
|
|
1464
1159
|
throw new Error("Inspector service belongs to another project");
|
|
1465
1160
|
const component = args.component?.trim().startsWith("{") ? JSON.parse(args.component) : args.component ? { selector: args.component } : void 0;
|
|
1466
1161
|
const response = await fetch(`${url}/timeline`, {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
tokensToVariables,
|
|
12
12
|
upsertBindings,
|
|
13
13
|
withFigmaErrors
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VZ6LCTOZ.js";
|
|
15
15
|
import "./chunk-K2FLNJVB.js";
|
|
16
16
|
import {
|
|
17
17
|
defineCommand
|
|
@@ -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-7AWYECPL.js");
|
|
80
80
|
trackFigmaImport({
|
|
81
81
|
phase: "tokens",
|
|
82
82
|
tokensMode: result.mode,
|
|
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
trackTranscribeUnavailable
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-KRE55WLI.js";
|
|
10
|
+
import "./chunk-ICZVCVD3.js";
|
|
11
11
|
import "./chunk-VWG7OQKU.js";
|
|
12
12
|
import "./chunk-QWQ6GQTI.js";
|
|
13
13
|
import {
|
|
@@ -28,36 +28,36 @@ import "./chunk-K4WIOZFP.js";
|
|
|
28
28
|
import "./chunk-XUXGIA7H.js";
|
|
29
29
|
import "./chunk-WERLJGIC.js";
|
|
30
30
|
import "./chunk-ISN5GRYI.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-TU2CQJO3.js";
|
|
32
32
|
import {
|
|
33
33
|
MIN_TIMEOUT_MS,
|
|
34
34
|
TranscribeError,
|
|
35
35
|
runTranscribe
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-OMJA7JP6.js";
|
|
37
|
+
import "./chunk-RTS7BGEC.js";
|
|
38
|
+
import "./chunk-MP676E4B.js";
|
|
39
39
|
import "./chunk-BXCMXMJQ.js";
|
|
40
40
|
import "./chunk-3DKN5WKL.js";
|
|
41
41
|
import "./chunk-EOVYQ3IG.js";
|
|
42
42
|
import {
|
|
43
43
|
createProgressWriter
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
} from "./chunk-DJZEIVAP.js";
|
|
45
|
+
import "./chunk-G642IIVK.js";
|
|
46
46
|
import "./chunk-VHZ6DL3M.js";
|
|
47
47
|
import "./chunk-6BEFEWFB.js";
|
|
48
48
|
import {
|
|
49
49
|
DEFAULT_MODEL
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-X3SCQP2A.js";
|
|
51
51
|
import "./chunk-PO2SDVQA.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-IK3SOMZ4.js";
|
|
53
53
|
import "./chunk-XT6MXC7A.js";
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-PLEMSN3E.js";
|
|
55
|
+
import "./chunk-LYIG2GZ5.js";
|
|
56
56
|
import "./chunk-KCF6GHJP.js";
|
|
57
57
|
import "./chunk-JYVGYKXG.js";
|
|
58
58
|
import "./chunk-7KDQAD2W.js";
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-Q3TFX4OZ.js";
|
|
60
|
+
import "./chunk-P47XYVEQ.js";
|
|
61
61
|
import "./chunk-VC76R6W2.js";
|
|
62
62
|
import "./chunk-UJKQWGFF.js";
|
|
63
63
|
import "./chunk-ALLKNYC3.js";
|
|
@@ -66,10 +66,10 @@ import "./chunk-DPVXBVLL.js";
|
|
|
66
66
|
import "./chunk-T76PLPD6.js";
|
|
67
67
|
import "./chunk-FXMKHHPO.js";
|
|
68
68
|
import "./chunk-RQVDTPGD.js";
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
69
|
+
import "./chunk-22QHO26F.js";
|
|
70
|
+
import "./chunk-D3ZWBHZP.js";
|
|
71
71
|
import "./chunk-TWWSYAKJ.js";
|
|
72
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-2742O5DO.js";
|
|
73
73
|
import "./chunk-IWFLMU2N.js";
|
|
74
74
|
import "./chunk-3VGU2SH7.js";
|
|
75
75
|
import "./chunk-VAS6HQX3.js";
|