hyperframes 0.8.114 → 0.8.115
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-KCBOVKEU.js → add-ZSLFODRZ.js} +15 -14
- package/dist/{animatedGifPrep-U7FMC7DB.js → animatedGifPrep-72A45YER.js} +5 -5
- package/dist/{asset-AJ4ZZE3K.js → asset-SGDOHBBN.js} +2 -2
- package/dist/{assetCataloger-5LCGR5XU.js → assetCataloger-Q7BCDARF.js} +2 -2
- package/dist/{auth-PSEHAWSA.js → auth-5JGFN7SV.js} +2 -2
- package/dist/{autoUpdate-E32YLKFZ.js → autoUpdate-ZVTMYO7Z.js} +2 -2
- package/dist/{backgroundChecks-FNHBA7YI.js → backgroundChecks-IY3G5G2D.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-QVJ7NEUH.js → batchRender-QVLLL5DN.js} +3 -3
- package/dist/{beats-F67KZC3V.js → beats-66KZIB5V.js} +14 -10
- package/dist/{benchmark-CGD6CPRK.js → benchmark-AWFKSWQH.js} +11 -11
- package/dist/{browser-FPX3Z2AR.js → browser-J54EXMCE.js} +8 -8
- package/dist/{bundleWithLocalizedFonts-4CVITCYK.js → bundleWithLocalizedFonts-BLLHP2TO.js} +2 -2
- package/dist/{capture-GLHK4ST7.js → capture-D4HRSVSK.js} +2 -2
- package/dist/{capture-F2Y7TIHU.js → capture-SLI2I5BS.js} +16 -11
- package/dist/{catalog-4BZX7MQQ.js → catalog-BUMLQU7L.js} +15 -14
- package/dist/{check-IO3HWLLU.js → check-HEZUK62C.js} +31 -29
- package/dist/{checkBrowser-JTQ7ABCL.js → checkBrowser-RVJM6IUO.js} +30 -28
- package/dist/{chunk-MR6BQLGM.js → chunk-2DX6JYL2.js} +2 -2
- package/dist/{chunk-BOUDTDBQ.js → chunk-2GWVY66H.js} +1 -1
- package/dist/{chunk-P3FGUSFK.js → chunk-2H37RGJ2.js} +7 -7
- package/dist/{chunk-7543YIMQ.js → chunk-3J4EBX5M.js} +1 -1
- package/dist/{chunk-MLLBZR2U.js → chunk-3R6P5BIG.js} +2 -2
- package/dist/{chunk-HGMKPPGD.js → chunk-3YTWSGBV.js} +4 -4
- package/dist/{chunk-RKSRXPKV.js → chunk-4HIF3LI3.js} +5 -5
- package/dist/{chunk-HTQR7SUZ.js → chunk-4P2TOD7N.js} +1 -1
- package/dist/{chunk-G2T2X6FZ.js → chunk-5MXN7WM4.js} +2 -2
- package/dist/{chunk-BORVRAHJ.js → chunk-5YSA3YXO.js} +14 -18
- package/dist/{chunk-JH7ZJRDL.js → chunk-6SEUZGID.js} +3 -3
- package/dist/{chunk-VLC7JS4K.js → chunk-74RAXWDF.js} +1 -1
- package/dist/{chunk-MST5JBOR.js → chunk-AXXK3LWL.js} +1 -1
- package/dist/chunk-BDNCUMZM.js +2961 -0
- package/dist/{chunk-E52XEEAA.js → chunk-BQG33YTI.js} +1 -1
- package/dist/{chunk-QPR4N2D4.js → chunk-CVBWF2MD.js} +1 -1
- package/dist/{chunk-7ZR25WGW.js → chunk-HOBR4IHC.js} +7 -7
- package/dist/{chunk-LSSIYIXI.js → chunk-HPWPLV5J.js} +2 -2
- package/dist/{chunk-FCEFKWPM.js → chunk-IEE7GIVX.js} +1 -1
- package/dist/{chunk-L5QASNBN.js → chunk-IOJAVV6J.js} +1 -1
- package/dist/{chunk-IPXPSCWV.js → chunk-KLZ7OCHR.js} +3 -3
- package/dist/{chunk-OCNCK5FQ.js → chunk-M7XTMZF5.js} +1 -1
- package/dist/{chunk-GDJ74GHW.js → chunk-MPB7BQT7.js} +1 -1
- package/dist/{chunk-3SH322X7.js → chunk-ORAISNGN.js} +14 -17
- package/dist/{chunk-IP3XINRB.js → chunk-P6LJ4Y32.js} +23 -2944
- package/dist/chunk-P73WQPSB.js +93 -0
- package/dist/{chunk-LYNBNESS.js → chunk-PLP4K6WZ.js} +122 -47
- package/dist/{chunk-LMC46FK5.js → chunk-QMFCL2ZN.js} +1 -1
- package/dist/{chunk-DR7QW6C5.js → chunk-QXNRRMBQ.js} +2 -2
- package/dist/{chunk-C6AIZOQN.js → chunk-RRPJEHHW.js} +1 -1
- package/dist/{chunk-6U3K3U62.js → chunk-SAO3NQPF.js} +1 -1
- package/dist/{chunk-3IUSKIZW.js → chunk-SC7ICSIU.js} +1 -1
- package/dist/{chunk-SSM2TJYE.js → chunk-SK53U3PF.js} +1 -1
- package/dist/{chunk-XXKBPGPJ.js → chunk-SOEQWMNS.js} +2 -2
- package/dist/{chunk-752X6G7T.js → chunk-SSZYJCAL.js} +2 -2
- package/dist/{chunk-SYQOD3W7.js → chunk-T5HXGUM3.js} +1 -1
- package/dist/{chunk-ENHAGQEP.js → chunk-TMCJPHPP.js} +1 -1
- package/dist/{chunk-XFJXFNJF.js → chunk-TWJT2RGZ.js} +27 -12
- package/dist/{chunk-ZMMSMDCA.js → chunk-VDASTWUM.js} +1 -1
- package/dist/{chunk-T3NMEYGM.js → chunk-WZYHTXZY.js} +1 -1
- package/dist/{chunk-WAS5VEA4.js → chunk-XJQ7TRLG.js} +1 -1
- package/dist/{chunk-LDSWUYZB.js → chunk-Y2Y4LBJD.js} +3 -3
- package/dist/{chunk-SIN32SJB.js → chunk-YNHP6OFJ.js} +2 -2
- package/dist/{chunk-4KGMIOMY.js → chunk-ZBQP54CD.js} +10 -7
- package/dist/{clean-MCL76KQH.js → clean-X6Y252ZC.js} +14 -14
- package/dist/cli.js +53 -52
- package/dist/{cloud-444K6HIK.js → cloud-EE4GALWR.js} +4 -4
- package/dist/{cloudrun-BML6ZG7K.js → cloudrun-Y6A42KHE.js} +3 -3
- package/dist/{compare-CGNTCOR2.js → compare-K6XJZ3OC.js} +25 -23
- package/dist/{compiler-ZHVIEP26.js → compiler-DYACPLUW.js} +2 -2
- package/dist/{component-HTXLOIHR.js → component-T6IYSCFP.js} +3 -3
- package/dist/{compositions-KK46F5AC.js → compositions-4KUTNS5L.js} +10 -10
- package/dist/{delete-SSRZKKWQ.js → delete-C64TWAPE.js} +2 -2
- package/dist/{dist-OKRUIHYU.js → dist-KNGSQALD.js} +2 -2
- package/dist/{doctor-IIOX25KM.js → doctor-WJXZK5QN.js} +9 -9
- package/dist/{events-DCUZBRW6.js → events-FVG3Y6Q4.js} +8 -8
- package/dist/{events-TYMMAKHX.js → events-QRWJBSV4.js} +7 -7
- package/dist/{feedback-RIAGW6LG.js → feedback-NQHRUOZP.js} +9 -9
- package/dist/{figma-VBOUGJNX.js → figma-MEX4CSIM.js} +3 -3
- package/dist/fontLocalizeCli.js +7 -7
- package/dist/{get-LT6NUGNR.js → get-CMJIHGSA.js} +2 -2
- package/dist/{gpuPolicy-LRMOZXFU.js → gpuPolicy-5S4OZDME.js} +5 -5
- package/dist/{grade-compare-WWYQSQUM.js → grade-compare-NIDMIUGZ.js} +25 -23
- package/dist/{help-55ZV2M5U.js → help-G6AWAWJW.js} +1 -1
- package/dist/{history-QCY7CO4P.js → history-ZBOK2JQF.js} +20 -18
- package/dist/hyperframe-runtime.js +36 -36
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +36 -36
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-ROTXHRAH.js → info-2ORQZ6I2.js} +10 -10
- package/dist/{init-5XFOWGGN.js → init-3PSKH6UR.js} +22 -21
- package/dist/{inspect-3UF4VLTM.js → inspect-NR54RMEE.js} +26 -24
- package/dist/{installer-DGYYDGWJ.js → installer-YQUWHYBZ.js} +5 -4
- package/dist/{keyframes-OFZ6XNMC.js → keyframes-KT7T4AEV.js} +11 -11
- package/dist/{lambda-OQBFCEFA.js → lambda-3FF4V3X3.js} +4 -4
- package/dist/{layout-B4XF2734.js → layout-RB3M37ER.js} +26 -24
- package/dist/{lint-3YIJITTC.js → lint-HR57M5YP.js} +11 -11
- package/dist/{list-276FF3QE.js → list-YDXYHXHF.js} +2 -2
- package/dist/{login-SA3MCAIS.js → login-N6UNRVYW.js} +4 -4
- package/dist/{media-treatment-ICA5DWHS.js → media-treatment-UXJOTNRO.js} +11 -11
- package/dist/{models-JF5OOZ5A.js → models-Z3XFMGXB.js} +6 -6
- package/dist/{motionShot-TQBDZZ4M.js → motionShot-KQMCXJ77.js} +15 -12
- package/dist/{normalize-audio-URNASKUV.js → normalize-audio-XJQMDWRV.js} +10 -10
- package/dist/{pipeline-IWPF5ZMK.js → pipeline-U3OISHWV.js} +5 -5
- package/dist/{play-JYBAII35.js → play-XP77PML5.js} +20 -19
- package/dist/{preflight-2GH2Z4GZ.js → preflight-CANFVC4Y.js} +6 -6
- package/dist/{present-WIEZRZET.js → present-MWGA3O4S.js} +15 -15
- package/dist/{preview-YUPU646E.js → preview-X5GWZ3Q6.js} +17 -16
- package/dist/{producer-SL66UNEP.js → producer-B2IHU7MA.js} +1 -1
- package/dist/{projectConfig-7AKXZNNR.js → projectConfig-2A64YU5H.js} +7 -6
- package/dist/{publication-B2OERUY7.js → publication-CFYBPLRS.js} +2 -2
- package/dist/{publish-ZGKT7KED.js → publish-WE6AS77D.js} +8 -7
- package/dist/{remove-background-4LRTT6YL.js → remove-background-XSDOCVN5.js} +6 -6
- package/dist/{render-AX77WC3C.js → render-5TMRIC73.js} +11 -11
- package/dist/{render-F3QVCKKA.js → render-HVZUCLYW.js} +21 -20
- package/dist/{render-TGCDBKMP.js → render-QX6AKB6Y.js} +3 -3
- package/dist/{render-batch-WRQFW4UC.js → render-batch-QJXFVTDE.js} +3 -3
- package/dist/{renderCancellation-BFCQYGVV.js → renderCancellation-WSSSHRFR.js} +5 -5
- package/dist/{resolver-37UOGAMT.js → resolver-WTXO6WXA.js} +5 -4
- package/dist/{sherpa-SDVKYXCX.js → sherpa-S6ZBBEFO.js} +6 -6
- package/dist/skills/hyperframes/SKILL.md +4 -0
- package/dist/skills/hyperframes-cli/SKILL.md +8 -0
- package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +8 -0
- package/dist/skills/media-use/audio/scripts/audio.mjs +4 -1
- package/dist/skills/media-use/audio/scripts/audio.test.mjs +33 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +1 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +44 -1
- package/dist/{skills-M6ETUUH5.js → skills-CDRSTETB.js} +10 -10
- package/dist/{skillsUpdateCheck-UTX5LT5C.js → skillsUpdateCheck-FKREJXSF.js} +3 -3
- package/dist/{snapshot-HMDAENTY.js → snapshot-T4PFSXTH.js} +26 -24
- package/dist/{src-PLWCT745.js → src-5BZDQAVN.js} +6 -6
- package/dist/{src-PJJ6NISA.js → src-IZMCUYK7.js} +4 -4
- package/dist/{staticProjectServer-XDH5SQV6.js → staticProjectServer-VN4ARAH4.js} +14 -13
- package/dist/{status-LENRPQS5.js → status-OJZWJB53.js} +5 -5
- package/dist/studio/assets/{hyperframes-player-aXNJKiIg.js → hyperframes-player-C-9N8nk0.js} +1 -1
- package/dist/studio/assets/{index-Bn2RJNTJ.js → index-BoUM6Xqb.js} +1 -1
- package/dist/studio/assets/{index-Dz7doz9l.js → index-CAvZ0AA-.js} +201 -201
- package/dist/studio/assets/{index-C9N-DGjC.js → index-CVuorIMv.js} +1 -1
- package/dist/studio/assets/{index-BYnsJnJV.css → index-t1LH6H5H.css} +1 -1
- package/dist/studio/{chunk-K47E2ZJA.js → chunk-5EKWJZLM.js} +504 -17
- package/dist/studio/chunk-5EKWJZLM.js.map +1 -0
- package/dist/studio/{chunk-VWT7STY3.js → chunk-J6Q572FA.js} +2 -2
- package/dist/studio/{chunk-BIUXP3PG.js → chunk-TXZMMOMA.js} +43 -276
- package/dist/studio/chunk-TXZMMOMA.js.map +1 -0
- package/dist/studio/{domEditingLayers-V67MS4WP.js → domEditingLayers-D7VYFJJD.js} +3 -5
- package/dist/studio/index.d.ts +43 -19
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +2939 -2596
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/player.js +2 -2
- package/dist/studio/styles.css +1 -1
- package/dist/{studio-api-E5WFZ7YK.js → studio-api-CIO2NKK5.js} +9 -7
- package/dist/{studioServer-C7GTHTRY.js → studioServer-G5GNYWDI.js} +45 -45
- package/dist/{system-4KRSV2B7.js → system-PPNNGVIM.js} +5 -5
- package/dist/{telemetry-XH6D37RL.js → telemetry-GMDMISOX.js} +8 -8
- package/dist/{timeline-4RR7O6QW.js → timeline-5LSQX4OS.js} +14 -14
- package/dist/{tokens-MVTK3RPO.js → tokens-VBXAT7CK.js} +2 -2
- package/dist/{transcribe-I6WDPH7E.js → transcribe-GYCAIIEQ.js} +11 -11
- package/dist/{transcribe-3UXXEDXX.js → transcribe-VGYAWRXS.js} +6 -6
- package/dist/{updateCheck-ELMPFCBF.js → updateCheck-AZEREUQV.js} +2 -2
- package/dist/{upgrade-6UAOGP4D.js → upgrade-S63QN2LA.js} +2 -2
- package/dist/{urlDownloader-4KNER64L.js → urlDownloader-SM6ODN5O.js} +4 -4
- package/dist/usage-EC3KFUIJ.js +2139 -0
- package/dist/{validate-ZMMGUMBD.js → validate-7MNUK5MH.js} +15 -14
- package/dist/{video-GINAMW5I.js → video-JEOHARTC.js} +5 -5
- package/package.json +1 -1
- package/dist/studio/chunk-BIUXP3PG.js.map +0 -1
- package/dist/studio/chunk-K47E2ZJA.js.map +0 -1
- /package/dist/studio/{chunk-VWT7STY3.js.map → chunk-J6Q572FA.js.map} +0 -0
- /package/dist/studio/{domEditingLayers-V67MS4WP.js.map → domEditingLayers-D7VYFJJD.js.map} +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
resolveCaptureBrowserGpuMode
|
|
9
|
+
} from "./chunk-WZYHTXZY.js";
|
|
10
|
+
import {
|
|
11
|
+
requestCliExit
|
|
12
|
+
} from "./chunk-PBN6GBJE.js";
|
|
13
|
+
|
|
14
|
+
// src/browser/launch.ts
|
|
15
|
+
var browsers = /* @__PURE__ */ new Set();
|
|
16
|
+
var pending = /* @__PURE__ */ new Map();
|
|
17
|
+
var CLOSE_GRACE_MS = 1e3;
|
|
18
|
+
var listening = false;
|
|
19
|
+
var shutdown;
|
|
20
|
+
function stopForSignal(signal) {
|
|
21
|
+
if (shutdown) return;
|
|
22
|
+
shutdown = closeManagedBrowsers();
|
|
23
|
+
void shutdown.then(
|
|
24
|
+
() => requestCliExit(signal === "SIGINT" ? 130 : 143),
|
|
25
|
+
(error) => {
|
|
26
|
+
console.error("Browser shutdown failed:", error);
|
|
27
|
+
requestCliExit(1);
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function ownSignals() {
|
|
32
|
+
if (listening) return;
|
|
33
|
+
listening = true;
|
|
34
|
+
process.on("SIGINT", () => stopForSignal("SIGINT"));
|
|
35
|
+
process.on("SIGTERM", () => stopForSignal("SIGTERM"));
|
|
36
|
+
}
|
|
37
|
+
async function resolveManagedGpuMode(requestedMode, chromePath) {
|
|
38
|
+
ownSignals();
|
|
39
|
+
return resolveCaptureBrowserGpuMode(requestedMode, chromePath);
|
|
40
|
+
}
|
|
41
|
+
async function launchManagedBrowser(puppeteer, options) {
|
|
42
|
+
if (shutdown) throw new Error("The CLI is stopping; no browser can start.");
|
|
43
|
+
ownSignals();
|
|
44
|
+
const abort = new AbortController();
|
|
45
|
+
const signal = options.signal ? AbortSignal.any([options.signal, abort.signal]) : abort.signal;
|
|
46
|
+
const launch = puppeteer.launch({
|
|
47
|
+
...options,
|
|
48
|
+
signal,
|
|
49
|
+
handleSIGINT: false,
|
|
50
|
+
handleSIGTERM: false
|
|
51
|
+
});
|
|
52
|
+
pending.set(launch, abort);
|
|
53
|
+
try {
|
|
54
|
+
const browser = await launch;
|
|
55
|
+
const child = browser.process();
|
|
56
|
+
if (!child) throw new Error("A launched browser has no owned process.");
|
|
57
|
+
browsers.add(browser);
|
|
58
|
+
child.once("exit", () => browsers.delete(browser));
|
|
59
|
+
return browser;
|
|
60
|
+
} finally {
|
|
61
|
+
pending.delete(launch);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function closeManagedBrowsers() {
|
|
65
|
+
for (const abort of pending.values()) abort.abort();
|
|
66
|
+
await Promise.allSettled(pending.keys());
|
|
67
|
+
await Promise.all([...browsers].map(closeBrowser));
|
|
68
|
+
}
|
|
69
|
+
async function closeBrowser(browser) {
|
|
70
|
+
const child = browser.process();
|
|
71
|
+
if (!child) throw new Error("A managed browser lost its owned process.");
|
|
72
|
+
if (child.exitCode !== null || child.signalCode !== null) return;
|
|
73
|
+
const exited = new Promise((resolve) => child.once("exit", () => resolve()));
|
|
74
|
+
let timer;
|
|
75
|
+
const grace = new Promise((resolve) => {
|
|
76
|
+
timer = setTimeout(resolve, CLOSE_GRACE_MS);
|
|
77
|
+
});
|
|
78
|
+
try {
|
|
79
|
+
await Promise.race([
|
|
80
|
+
browser.close().catch((error) => console.warn("Browser close failed:", error)),
|
|
81
|
+
grace
|
|
82
|
+
]);
|
|
83
|
+
if (child.exitCode === null && child.signalCode === null) child.kill("SIGKILL");
|
|
84
|
+
await exited;
|
|
85
|
+
} finally {
|
|
86
|
+
clearTimeout(timer);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
resolveManagedGpuMode,
|
|
92
|
+
launchManagedBrowser
|
|
93
|
+
};
|
|
@@ -12,13 +12,15 @@ import {
|
|
|
12
12
|
parseSourceDocument,
|
|
13
13
|
patchElementInHtml,
|
|
14
14
|
probeElementInSource,
|
|
15
|
+
probeElementsInSource,
|
|
15
16
|
relinkSplitHalves,
|
|
16
17
|
relinkSplitHalvesInHtml,
|
|
17
18
|
removeElementFromHtml,
|
|
19
|
+
removeElementsFromHtml,
|
|
18
20
|
splitElementInHtml,
|
|
19
21
|
unwrapElementsFromHtml,
|
|
20
22
|
wrapElementsInHtml
|
|
21
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TWJT2RGZ.js";
|
|
22
24
|
import {
|
|
23
25
|
atomicTempPath,
|
|
24
26
|
createFileAtomically,
|
|
@@ -31,7 +33,7 @@ import {
|
|
|
31
33
|
measureAudio,
|
|
32
34
|
requiredFfmpeg,
|
|
33
35
|
resolveLocalAudioPath
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-MPB7BQT7.js";
|
|
35
37
|
import {
|
|
36
38
|
PROXY_PARAMS_VERSION,
|
|
37
39
|
PROXY_PENDING_RETRY_AFTER_SECONDS,
|
|
@@ -57,7 +59,7 @@ import {
|
|
|
57
59
|
shouldPrewarmProxy,
|
|
58
60
|
waitForProxy,
|
|
59
61
|
walkDir
|
|
60
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-QMFCL2ZN.js";
|
|
61
63
|
import {
|
|
62
64
|
findTimelineScript,
|
|
63
65
|
parseGsapScriptAcorn
|
|
@@ -76,7 +78,7 @@ import {
|
|
|
76
78
|
formatRenderOutputTimestamp,
|
|
77
79
|
parseFps,
|
|
78
80
|
sameInstant
|
|
79
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-IEE7GIVX.js";
|
|
80
82
|
import {
|
|
81
83
|
MagicString,
|
|
82
84
|
VALID_CANVAS_RESOLUTIONS,
|
|
@@ -85,7 +87,7 @@ import {
|
|
|
85
87
|
import {
|
|
86
88
|
addScenePartsManifest,
|
|
87
89
|
ensureHfIds
|
|
88
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-M7XTMZF5.js";
|
|
89
91
|
import {
|
|
90
92
|
findStartTags,
|
|
91
93
|
injectScriptsIntoHtml,
|
|
@@ -95,7 +97,7 @@ import {
|
|
|
95
97
|
resolveRateSpec,
|
|
96
98
|
sourceTimeAt,
|
|
97
99
|
stripEmbeddedRuntimeScripts
|
|
98
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-RRPJEHHW.js";
|
|
99
101
|
import {
|
|
100
102
|
ProjectRootMissingError,
|
|
101
103
|
folderGone,
|
|
@@ -213,7 +215,7 @@ function stampFileHfIds(filePath) {
|
|
|
213
215
|
}
|
|
214
216
|
}
|
|
215
217
|
|
|
216
|
-
// ../studio-server/dist/chunk-
|
|
218
|
+
// ../studio-server/dist/chunk-E3HLZKPI.js
|
|
217
219
|
import { randomUUID as randomUUID6 } from "crypto";
|
|
218
220
|
import { mkdir as mkdir2, readdir as readdir3, rm as rm3, rmdir, writeFile } from "fs/promises";
|
|
219
221
|
import {
|
|
@@ -1015,6 +1017,7 @@ function ignoresCase(dir) {
|
|
|
1015
1017
|
return self !== void 0 && other?.ino === self.ino && other.dev === self.dev;
|
|
1016
1018
|
}
|
|
1017
1019
|
var blocks = (removed, added) => added.startsWith(`${removed}/`) || removed.startsWith(`${added}/`);
|
|
1020
|
+
var MAX_TIMER_MS = 2 ** 31 - 1;
|
|
1018
1021
|
var takesWrite = (window2, at) => window2.idleMs === void 0 || at - (window2.lastWriteAt ?? at) <= window2.idleMs;
|
|
1019
1022
|
function chainBackFrom(byAfter, hash) {
|
|
1020
1023
|
const chain = /* @__PURE__ */ new Map();
|
|
@@ -1170,7 +1173,7 @@ var Engine = class {
|
|
|
1170
1173
|
this.windows.push({ id, who, label, startedAt, lastWriteAt, idleMs, changes: /* @__PURE__ */ new Map() });
|
|
1171
1174
|
}
|
|
1172
1175
|
async firstOpen() {
|
|
1173
|
-
const sweptAt =
|
|
1176
|
+
const sweptAt = this.now();
|
|
1174
1177
|
for (const file of listProjectFiles(this.dir)) {
|
|
1175
1178
|
const hash = await this.storeIfPresent(file.path);
|
|
1176
1179
|
if (this.whereFolder() !== "here") throw this.replaced();
|
|
@@ -1202,7 +1205,7 @@ var Engine = class {
|
|
|
1202
1205
|
*/
|
|
1203
1206
|
async sweep() {
|
|
1204
1207
|
if (this.whereFolder() !== "here") return;
|
|
1205
|
-
const sweptAt =
|
|
1208
|
+
const sweptAt = this.now();
|
|
1206
1209
|
const changedAt = (file) => Math.min(sweptAt, Math.max(file.mtimeMs, file.ctimeMs));
|
|
1207
1210
|
const seen = listProjectFiles(this.dir);
|
|
1208
1211
|
const heard = new Map(this.overwritten);
|
|
@@ -1477,7 +1480,7 @@ var Engine = class {
|
|
|
1477
1480
|
await this.settle();
|
|
1478
1481
|
const window2 = { ...this.newGroup(who, label), idleMs };
|
|
1479
1482
|
this.windows.push(window2);
|
|
1480
|
-
this.touch(window2,
|
|
1483
|
+
this.touch(window2, this.now());
|
|
1481
1484
|
const close = () => this.queue(() => this.sweepAndEnd(window2));
|
|
1482
1485
|
return { id: window2.id, startedAt: window2.startedAt, close };
|
|
1483
1486
|
});
|
|
@@ -1485,11 +1488,19 @@ var Engine = class {
|
|
|
1485
1488
|
/** A window with no write for its idleMs ends, so a close that never comes cannot hold every later write. */
|
|
1486
1489
|
touch(window2, at) {
|
|
1487
1490
|
window2.lastWriteAt = Math.max(window2.lastWriteAt ?? at, at);
|
|
1491
|
+
this.endWhenIdle(window2, window2.idleMs);
|
|
1492
|
+
}
|
|
1493
|
+
endWhenIdle(window2, delay) {
|
|
1488
1494
|
clearTimeout(window2.idleTimer);
|
|
1489
|
-
if (window2.idleMs === void 0 || !Number.isFinite(window2.idleMs))
|
|
1495
|
+
if (window2.idleMs === void 0 || !Number.isFinite(window2.idleMs) || delay === void 0)
|
|
1496
|
+
return;
|
|
1490
1497
|
window2.idleTimer = setTimeout(
|
|
1491
|
-
() =>
|
|
1492
|
-
|
|
1498
|
+
() => {
|
|
1499
|
+
const left = window2.idleMs - (this.now() - (window2.lastWriteAt ?? this.now()));
|
|
1500
|
+
if (left > 0) this.endWhenIdle(window2, left);
|
|
1501
|
+
else this.background(() => this.sweepAndEnd(window2));
|
|
1502
|
+
},
|
|
1503
|
+
Math.min(delay, MAX_TIMER_MS)
|
|
1493
1504
|
);
|
|
1494
1505
|
window2.idleTimer.unref?.();
|
|
1495
1506
|
}
|
|
@@ -1799,7 +1810,7 @@ function historyCache(open2) {
|
|
|
1799
1810
|
};
|
|
1800
1811
|
}
|
|
1801
1812
|
|
|
1802
|
-
// ../studio-server/dist/chunk-
|
|
1813
|
+
// ../studio-server/dist/chunk-IMG2GSY6.js
|
|
1803
1814
|
function getElementScreenshotClip(selector, selectorIndex) {
|
|
1804
1815
|
let matches;
|
|
1805
1816
|
try {
|
|
@@ -1812,6 +1823,16 @@ function getElementScreenshotClip(selector, selectorIndex) {
|
|
|
1812
1823
|
const safeIndex = Math.max(0, Math.min(matches.length - 1, Math.floor(selectorIndex ?? 0)));
|
|
1813
1824
|
const el = matches[safeIndex] ?? null;
|
|
1814
1825
|
if (!(el instanceof HTMLElement)) return void 0;
|
|
1826
|
+
const page = window;
|
|
1827
|
+
const faded = page.__hfThumbnailFaded ??= [];
|
|
1828
|
+
for (let node = el; node.parentElement; node = node.parentElement) {
|
|
1829
|
+
for (const sibling of Array.from(node.parentElement.children)) {
|
|
1830
|
+
const style = sibling.style;
|
|
1831
|
+
if (sibling === node || !style) continue;
|
|
1832
|
+
faded.push([style, style.getPropertyValue("opacity"), style.getPropertyPriority("opacity")]);
|
|
1833
|
+
style.setProperty("opacity", "0", "important");
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1815
1836
|
const rect = el.getBoundingClientRect();
|
|
1816
1837
|
if (rect.width < 4 || rect.height < 4) return void 0;
|
|
1817
1838
|
const pad = 8;
|
|
@@ -1826,6 +1847,14 @@ function getElementScreenshotClip(selector, selectorIndex) {
|
|
|
1826
1847
|
height: Math.max(1, Math.min(rect.height + pad * 2, maxHeight))
|
|
1827
1848
|
};
|
|
1828
1849
|
}
|
|
1850
|
+
function clearElementScreenshotIsolation() {
|
|
1851
|
+
const page = window;
|
|
1852
|
+
for (const [style, value, priority] of (page.__hfThumbnailFaded ?? []).reverse()) {
|
|
1853
|
+
if (value) style.setProperty("opacity", value, priority);
|
|
1854
|
+
else style.removeProperty("opacity");
|
|
1855
|
+
}
|
|
1856
|
+
page.__hfThumbnailFaded = [];
|
|
1857
|
+
}
|
|
1829
1858
|
|
|
1830
1859
|
// ../studio-server/dist/chunk-WK3ZL3SN.js
|
|
1831
1860
|
import { resolve as resolve4 } from "path";
|
|
@@ -5122,14 +5151,15 @@ import {
|
|
|
5122
5151
|
writeFileSync as writeFileSync42
|
|
5123
5152
|
} from "fs";
|
|
5124
5153
|
import { join as join11 } from "path";
|
|
5125
|
-
import { createHash as
|
|
5154
|
+
import { createHash as createHash42, randomUUID as randomUUID22 } from "crypto";
|
|
5126
5155
|
import { readFileSync as readFileSync8 } from "fs";
|
|
5156
|
+
import { createHash as createHash32 } from "crypto";
|
|
5127
5157
|
import { existsSync as existsSync7, readFileSync as readFileSync10, statSync as statSync7 } from "fs";
|
|
5128
5158
|
import { join as join12, resolve as resolve52 } from "path";
|
|
5129
5159
|
import { execFile } from "child_process";
|
|
5130
5160
|
import { existsSync as existsSync8, readFileSync as readFileSync11, statSync as statSync8 } from "fs";
|
|
5131
5161
|
import { dirname as dirname52, join as join13, relative as relative4, sep as sep22 } from "path";
|
|
5132
|
-
import { createHash as
|
|
5162
|
+
import { createHash as createHash5, randomBytes } from "crypto";
|
|
5133
5163
|
import { existsSync as existsSync9 } from "fs";
|
|
5134
5164
|
import { existsSync as existsSync10, readFileSync as readFileSync12, statSync as statSync9 } from "fs";
|
|
5135
5165
|
import { join as join14, resolve as resolve6 } from "path";
|
|
@@ -5142,7 +5172,7 @@ import { basename as basename22, dirname as dirname6, extname as extname2, join
|
|
|
5142
5172
|
import { existsSync as existsSync12, readFileSync as readFileSync13 } from "fs";
|
|
5143
5173
|
import { homedir as homedir2 } from "os";
|
|
5144
5174
|
import { join as join16 } from "path";
|
|
5145
|
-
import { createHash as
|
|
5175
|
+
import { createHash as createHash6 } from "crypto";
|
|
5146
5176
|
import { readFileSync as readFileSync14, readdirSync as readdirSync5, rmSync as rmSync5 } from "fs";
|
|
5147
5177
|
import { join as join17 } from "path";
|
|
5148
5178
|
async function filterCompositionFiles(projectDir, files) {
|
|
@@ -6454,7 +6484,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
6454
6484
|
let block = extractGsapScriptBlock(html);
|
|
6455
6485
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
6456
6486
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
6457
|
-
const { GSAP_CDN } = await import("./dist-
|
|
6487
|
+
const { GSAP_CDN } = await import("./dist-KNGSQALD.js");
|
|
6458
6488
|
const bootstrap = [
|
|
6459
6489
|
`<script src="${GSAP_CDN}"></script>`,
|
|
6460
6490
|
"<script>",
|
|
@@ -6502,7 +6532,9 @@ async function applyGsapMutations(c, res, mutations) {
|
|
|
6502
6532
|
} catch (error) {
|
|
6503
6533
|
return c.json({ error: error instanceof Error ? error.message : String(error) }, 400);
|
|
6504
6534
|
}
|
|
6535
|
+
const mutationChanges = [];
|
|
6505
6536
|
for (const mutation of mutations) {
|
|
6537
|
+
const previousScript = block.scriptText;
|
|
6506
6538
|
const result = await executeGsapMutation(mutation, block, respond, writer);
|
|
6507
6539
|
if (result instanceof Response) return result;
|
|
6508
6540
|
let newScript = typeof result === "string" ? result : result.script;
|
|
@@ -6512,6 +6544,7 @@ async function applyGsapMutations(c, res, mutations) {
|
|
|
6512
6544
|
if (HOLD_SYNC_MUTATION_TYPES.has(mutation.type)) {
|
|
6513
6545
|
newScript = writer === "acorn" ? syncPositionHoldsBeforeKeyframes(newScript) : (await loadGsapParser()).syncPositionHoldsBeforeKeyframes(newScript);
|
|
6514
6546
|
}
|
|
6547
|
+
mutationChanges.push(newScript !== previousScript);
|
|
6515
6548
|
block.scriptText = newScript;
|
|
6516
6549
|
}
|
|
6517
6550
|
const changed = block.scriptText !== initialScript;
|
|
@@ -6536,6 +6569,7 @@ async function applyGsapMutations(c, res, mutations) {
|
|
|
6536
6569
|
ok: true,
|
|
6537
6570
|
changed,
|
|
6538
6571
|
mutated: changed,
|
|
6572
|
+
mutationChanges,
|
|
6539
6573
|
parsed: parseGsapScriptAcorn(block.scriptText),
|
|
6540
6574
|
before: beforeHtml,
|
|
6541
6575
|
after: newHtml,
|
|
@@ -7595,11 +7629,14 @@ function registerFileRoutes(api, adapter) {
|
|
|
7595
7629
|
return c.json({ error: "targets required" }, 400);
|
|
7596
7630
|
}
|
|
7597
7631
|
const originalContent = readFileSync32(ctx.absPath, "utf-8");
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7632
|
+
return writeIfChanged(
|
|
7633
|
+
c,
|
|
7634
|
+
ctx.project.dir,
|
|
7635
|
+
ctx.filePath,
|
|
7636
|
+
ctx.absPath,
|
|
7637
|
+
originalContent,
|
|
7638
|
+
removeElementsFromHtml(originalContent, targets)
|
|
7639
|
+
);
|
|
7603
7640
|
});
|
|
7604
7641
|
api.post("/projects/:id/file-mutations/split-batch", async (c) => {
|
|
7605
7642
|
const body = await c.req.json().catch(() => null);
|
|
@@ -8003,6 +8040,19 @@ function registerFileRoutes(api, adapter) {
|
|
|
8003
8040
|
const exists = probeElementInSource(content, parsed.target);
|
|
8004
8041
|
return c.json({ exists });
|
|
8005
8042
|
});
|
|
8043
|
+
api.post("/projects/:id/file-mutations/probe-elements/*", async (c) => {
|
|
8044
|
+
const ctx = await resolveFileMutationContext(c, adapter, "probe-elements");
|
|
8045
|
+
if ("error" in ctx) return ctx.error;
|
|
8046
|
+
const body = await c.req.json().catch(() => null);
|
|
8047
|
+
if (!Array.isArray(body?.targets)) return c.json({ error: "targets required" }, 400);
|
|
8048
|
+
let content;
|
|
8049
|
+
try {
|
|
8050
|
+
content = readFileSync32(ctx.absPath, "utf-8");
|
|
8051
|
+
} catch {
|
|
8052
|
+
return c.json({ exists: body.targets.map(() => false) });
|
|
8053
|
+
}
|
|
8054
|
+
return c.json({ exists: probeElementsInSource(content, body.targets) });
|
|
8055
|
+
});
|
|
8006
8056
|
api.patch("/projects/:id/files/*", async (c) => {
|
|
8007
8057
|
const res = await resolveProjectFile(c, adapter, { mustExist: true });
|
|
8008
8058
|
if ("error" in res) return res.error;
|
|
@@ -8086,17 +8136,18 @@ function registerFileRoutes(api, adapter) {
|
|
|
8086
8136
|
});
|
|
8087
8137
|
if ("error" in res) return res.error;
|
|
8088
8138
|
const html = readFileSync32(res.absPath, "utf-8");
|
|
8139
|
+
const etag = `${fileContentVersion(html).slice(0, -1)}:gsap-animations:v1"`;
|
|
8140
|
+
const headers = { ETag: etag, "Cache-Control": "no-cache" };
|
|
8141
|
+
if (c.req.header("If-None-Match") === etag) return new Response(null, { status: 304, headers });
|
|
8089
8142
|
const block = extractGsapScriptBlock(html);
|
|
8090
8143
|
if (!block) {
|
|
8091
|
-
return c.json(
|
|
8092
|
-
animations: [],
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
});
|
|
8144
|
+
return c.json(
|
|
8145
|
+
{ animations: [], timelineVar: "tl", preamble: "", postamble: "" },
|
|
8146
|
+
200,
|
|
8147
|
+
headers
|
|
8148
|
+
);
|
|
8097
8149
|
}
|
|
8098
|
-
|
|
8099
|
-
return c.json(parsed);
|
|
8150
|
+
return c.json(parseGsapScriptAcorn(block.scriptText), 200, headers);
|
|
8100
8151
|
});
|
|
8101
8152
|
api.get("/projects/:id/gsap-mutation-capabilities", async (c) => {
|
|
8102
8153
|
const project = await adapter.resolveProject(c.req.param("id"));
|
|
@@ -8246,6 +8297,9 @@ function tagRootCompositionFile(bodyHtml, compPath) {
|
|
|
8246
8297
|
if (bodyHtml.slice(match.index, tagEnd).includes("data-composition-file")) return bodyHtml;
|
|
8247
8298
|
return bodyHtml.slice(0, tagEnd) + ` data-composition-file="${compPath}"` + bodyHtml.slice(tagEnd);
|
|
8248
8299
|
}
|
|
8300
|
+
function rootHeadContent(rootHtml) {
|
|
8301
|
+
return rootHtml.match(/<head[^>]*>([\s\S]*?)<\/head>/i)?.[1] ?? "";
|
|
8302
|
+
}
|
|
8249
8303
|
function buildSubCompositionHtml(projectDir, compPath, runtimeUrl, baseHref, rawOverride) {
|
|
8250
8304
|
const compFile = join62(projectDir, compPath);
|
|
8251
8305
|
if (!existsSync42(compFile)) return null;
|
|
@@ -8281,11 +8335,7 @@ function buildSubCompositionHtml(projectDir, compPath, runtimeUrl, baseHref, raw
|
|
|
8281
8335
|
rewrittenContent = tagRootCompositionFile(rewrittenContent, compPath);
|
|
8282
8336
|
const indexPath = join62(projectDir, "index.html");
|
|
8283
8337
|
let headContent = "";
|
|
8284
|
-
if (existsSync42(indexPath))
|
|
8285
|
-
const indexHtml = readFileSync42(indexPath, "utf-8");
|
|
8286
|
-
const headMatch = indexHtml.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
8287
|
-
headContent = headMatch?.[1] ?? "";
|
|
8288
|
-
}
|
|
8338
|
+
if (existsSync42(indexPath)) headContent = rootHeadContent(readFileSync42(indexPath, "utf-8"));
|
|
8289
8339
|
if (baseHref && !hasBaseElement(headContent)) {
|
|
8290
8340
|
headContent = `<base href="${baseHref}">
|
|
8291
8341
|
${headContent}`;
|
|
@@ -9424,25 +9474,49 @@ function closureOf(read, compPath) {
|
|
|
9424
9474
|
return closure;
|
|
9425
9475
|
}
|
|
9426
9476
|
var inputSignatures = /* @__PURE__ */ new Map();
|
|
9477
|
+
var rootMemos = /* @__PURE__ */ new Map();
|
|
9478
|
+
var sha1 = (text2) => createHash32("sha1").update(text2).digest("hex");
|
|
9479
|
+
function rootHashes(read) {
|
|
9480
|
+
const source = read(ROOT_COMPOSITION) ?? "";
|
|
9481
|
+
return { root: sha1(source), head: sha1(rootHeadContent(source)) };
|
|
9482
|
+
}
|
|
9427
9483
|
function compositionInputSignature(projectDir, compPath, projectSignature) {
|
|
9428
9484
|
const key = `${projectDir}\0${compPath}`;
|
|
9429
9485
|
const known = inputSignatures.get(key);
|
|
9430
9486
|
if (known?.projectSignature === projectSignature) return known.inputSignature;
|
|
9431
9487
|
const read = projectReader(projectDir);
|
|
9432
|
-
const
|
|
9433
|
-
const
|
|
9434
|
-
const
|
|
9488
|
+
const comp = normalizeSource(compPath) ?? compPath;
|
|
9489
|
+
const inputs = closureOf(read, comp).add(ROOT_COMPOSITION);
|
|
9490
|
+
const excluded = new Set(
|
|
9491
|
+
[...closureOf(read, ROOT_COMPOSITION)].filter((path) => !inputs.has(path))
|
|
9492
|
+
);
|
|
9493
|
+
let inputSignature;
|
|
9494
|
+
if (comp === ROOT_COMPOSITION) {
|
|
9495
|
+
inputSignature = createProjectSignature(projectDir, excluded);
|
|
9496
|
+
} else {
|
|
9497
|
+
const hashes = rootHashes(read);
|
|
9498
|
+
if (!rootMemos.has(projectDir)) rootMemos.set(projectDir, { ...hashes, affected: null });
|
|
9499
|
+
inputSignature = `${createProjectSignature(projectDir, excluded.add(ROOT_COMPOSITION))}:${hashes.head}`;
|
|
9500
|
+
}
|
|
9435
9501
|
inputSignatures.set(key, { projectSignature, inputSignature });
|
|
9436
9502
|
return inputSignature;
|
|
9437
9503
|
}
|
|
9438
9504
|
function compositionsAffectedBy(projectDir, changedPath) {
|
|
9439
9505
|
const changed = changedPath.replace(/\\/g, "/");
|
|
9440
9506
|
const read = projectReader(projectDir);
|
|
9507
|
+
if (changed === ROOT_COMPOSITION) {
|
|
9508
|
+
const now = rootHashes(read);
|
|
9509
|
+
const memo = rootMemos.get(projectDir);
|
|
9510
|
+
if (memo?.root === now.root) return memo.affected;
|
|
9511
|
+
const affected = memo?.head === now.head ? [ROOT_COMPOSITION] : null;
|
|
9512
|
+
rootMemos.set(projectDir, { ...now, affected });
|
|
9513
|
+
return affected;
|
|
9514
|
+
}
|
|
9441
9515
|
const mounted = closureOf(read, ROOT_COMPOSITION);
|
|
9442
|
-
if (
|
|
9516
|
+
if (!mounted.has(changed)) return null;
|
|
9443
9517
|
return [...mounted].filter((path) => closureOf(read, path).has(changed));
|
|
9444
9518
|
}
|
|
9445
|
-
var THUMBNAIL_CACHE_VERSION = "
|
|
9519
|
+
var THUMBNAIL_CACHE_VERSION = "v5";
|
|
9446
9520
|
var THUMBNAIL_MAX_OUTPUT_WIDTH = 240;
|
|
9447
9521
|
var THUMBNAIL_MAX_OUTPUT_HEIGHT = 135;
|
|
9448
9522
|
var THUMBNAIL_CACHE_MAX_BYTES = 512 * 1024 * 1024;
|
|
@@ -9515,7 +9589,7 @@ function readFileOnce(file) {
|
|
|
9515
9589
|
function manifestKey(file) {
|
|
9516
9590
|
const manifest = readFileOnce(file);
|
|
9517
9591
|
if (typeof manifest === "string") return { key: "", mtimeMs: -Infinity };
|
|
9518
|
-
const hash =
|
|
9592
|
+
const hash = createHash42("sha1").update(manifest.data).digest("hex").slice(0, 16);
|
|
9519
9593
|
return { key: `_${hash}`, mtimeMs: Math.round(manifest.mtimeMs) };
|
|
9520
9594
|
}
|
|
9521
9595
|
function registerThumbnailRoutes(api, adapter) {
|
|
@@ -9552,7 +9626,7 @@ function registerThumbnailRoutes(api, adapter) {
|
|
|
9552
9626
|
let sourceKey = "";
|
|
9553
9627
|
if (source !== "missing") {
|
|
9554
9628
|
const html = source.data.toString("utf-8");
|
|
9555
|
-
sourceKey = `_${
|
|
9629
|
+
sourceKey = `_${createHash42("sha1").update(html).digest("hex").slice(0, 16)}`;
|
|
9556
9630
|
sourceMtime = Math.round(source.mtimeMs);
|
|
9557
9631
|
if (!vpWidth) {
|
|
9558
9632
|
const wMatch = html.match(/data-width=["'](\d+)["']/);
|
|
@@ -9568,9 +9642,9 @@ function registerThumbnailRoutes(api, adapter) {
|
|
|
9568
9642
|
const previewPath = compPath === "index.html" ? `${projectUrl}/preview` : `${projectUrl}/preview/comp/${compPath.split("/").map(encodeURIComponent).join("/")}`;
|
|
9569
9643
|
const previewUrl = `${previewPath}?${PREVIEW_CAPTURE_PARAM}=1`;
|
|
9570
9644
|
const cacheDir = join11(project.dir, ".thumbnails");
|
|
9571
|
-
const selectorKey = selector ? `_${selector.
|
|
9645
|
+
const selectorKey = selector ? `_${createHash42("sha1").update(selector).digest("hex").slice(0, 16)}_${selectorIndex ?? 0}` : "";
|
|
9572
9646
|
const urlVersionKey = urlVersion ? `_${urlVersion.replace(/[^a-zA-Z0-9_-]+/g, "_").slice(0, 32)}` : "";
|
|
9573
|
-
const inputSignatureKey = `_${
|
|
9647
|
+
const inputSignatureKey = `_${createHash42("sha1").update(inputSignature).digest("hex").slice(0, 16)}`;
|
|
9574
9648
|
const outputScale = outputMode === "source" ? 1 : Math.min(1, THUMBNAIL_MAX_OUTPUT_WIDTH / compW, THUMBNAIL_MAX_OUTPUT_HEIGHT / compH);
|
|
9575
9649
|
const outputWidth = Math.max(1, Math.round(compW * outputScale));
|
|
9576
9650
|
const outputHeight = Math.max(1, Math.round(compH * outputScale));
|
|
@@ -9698,7 +9772,7 @@ function freezeExtractArgs(src, mediaTime, output) {
|
|
|
9698
9772
|
var randomStillToken = () => randomBytes(4).toString("hex");
|
|
9699
9773
|
function freezeStillFileName(clipId, playhead, token = randomStillToken()) {
|
|
9700
9774
|
const stem = clipId.replace(/[^A-Za-z0-9_-]/g, "_").slice(0, 48) || "clip";
|
|
9701
|
-
const idHash =
|
|
9775
|
+
const idHash = createHash5("sha256").update(clipId).digest("hex").slice(0, 10);
|
|
9702
9776
|
return `${stem}-${idHash}-${Math.round(playhead * 1e3)}-${token}.png`;
|
|
9703
9777
|
}
|
|
9704
9778
|
function readFreezeSource(html, target, playhead) {
|
|
@@ -10857,7 +10931,7 @@ function numericAttribute(element, name) {
|
|
|
10857
10931
|
}
|
|
10858
10932
|
function createPreviewDocumentStore(projectDir, salt) {
|
|
10859
10933
|
const dir = join17(projectDir, ".hyperframes", "preview");
|
|
10860
|
-
const fileFor = (key) => join17(dir, `${
|
|
10934
|
+
const fileFor = (key) => join17(dir, `${createHash6("sha256").update(`${salt}
|
|
10861
10935
|
${key}`).digest("hex").slice(0, 32)}.html`);
|
|
10862
10936
|
return {
|
|
10863
10937
|
read(key) {
|
|
@@ -10966,6 +11040,7 @@ export {
|
|
|
10966
11040
|
openProjectHistory,
|
|
10967
11041
|
historyCache,
|
|
10968
11042
|
getElementScreenshotClip,
|
|
11043
|
+
clearElementScreenshotIsolation,
|
|
10969
11044
|
injectMediaCodecMapIntoHtml,
|
|
10970
11045
|
STUDIO_MOTION_PATH,
|
|
10971
11046
|
createStudioMotionRenderBodyScript,
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
DEFAULT_REGISTRY_URL,
|
|
9
9
|
fetchItemFile,
|
|
10
10
|
validRegistryItem
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BDNCUMZM.js";
|
|
12
12
|
import {
|
|
13
13
|
publishRegistryFile,
|
|
14
14
|
registryTargetPath
|
|
15
15
|
} from "./chunk-GMECXFAN.js";
|
|
16
16
|
import {
|
|
17
17
|
validateVariables
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IEE7GIVX.js";
|
|
19
19
|
import {
|
|
20
20
|
realProjectRoot
|
|
21
21
|
} from "./chunk-OFQWTKPW.js";
|