hyperframes 0.8.141 → 0.8.142
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-KH2CF4FD.js → add-YS2RCWEK.js} +11 -11
- package/dist/{animatedGifPrep-QO4BSKR7.js → animatedGifPrep-SAMCDT7T.js} +6 -7
- package/dist/{asset-4RDZILVJ.js → asset-BLWC2NWB.js} +2 -2
- package/dist/{assetCataloger-WGR4LYYN.js → assetCataloger-FVNBBRP3.js} +2 -2
- package/dist/{auth-WYQCOYE5.js → auth-DRZB7OAC.js} +5 -4
- package/dist/{autoUpdate-PC5TN3NL.js → autoUpdate-I5I3BOJK.js} +2 -2
- package/dist/{backgroundChecks-7M3T44EP.js → backgroundChecks-VR2QHGNY.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-GOLLOE4V.js → batchRender-4YUHQI6X.js} +3 -3
- package/dist/{beats-XJ7WP6QS.js → beats-7OT7ALV3.js} +11 -12
- package/dist/{benchmark-HCGFBEZJ.js → benchmark-Q2XQCRTR.js} +8 -8
- package/dist/{browser-VQKO2FKG.js → browser-7VAWQQZC.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-FH7PHTTX.js → bundleWithLocalizedFonts-DDMLLL2R.js} +2 -2
- package/dist/{capture-TFZZSF6F.js → capture-HEJS6M5A.js} +74 -33
- package/dist/{capture-XD3P3YQR.js → capture-U7ABPKS5.js} +24 -8
- package/dist/{catalog-4S33QWJJ.js → catalog-DVJ3XPDN.js} +11 -11
- package/dist/{catch-up-RW7YXXNT.js → catch-up-DF6AVSN2.js} +4 -4
- package/dist/{check-XVTRRN4Y.js → check-KXORRWAE.js} +75 -72
- package/dist/{checkBrowser-HZXJ2EDU.js → checkBrowser-J7HZJTRH.js} +28 -29
- package/dist/{chunk-XTFJOR3K.js → chunk-4SFGME7K.js} +1 -1
- package/dist/{chunk-EDYBFSPE.js → chunk-6RAD4BCC.js} +5 -8
- package/dist/{chunk-4BB7V6AI.js → chunk-6UM3R7PP.js} +1 -1
- package/dist/{chunk-BM5PX3DJ.js → chunk-6UYZB4TY.js} +1 -1
- package/dist/{chunk-L3JSAB4L.js → chunk-75JJVANE.js} +2 -2
- package/dist/{chunk-IV7EI5E2.js → chunk-7FCDA4RH.js} +1 -1
- package/dist/{chunk-HKCNZITN.js → chunk-AM5L5YIA.js} +1 -1
- package/dist/{chunk-BRITLL56.js → chunk-B4P5VDFQ.js} +1 -1
- package/dist/{chunk-IO7ZIDRP.js → chunk-B6SMSALD.js} +53 -12
- package/dist/{chunk-XWVGSEUT.js → chunk-BPZVDBHY.js} +1 -1
- package/dist/{chunk-246MOR5U.js → chunk-DKSDVDXG.js} +175 -162
- package/dist/{chunk-35RSNI77.js → chunk-DPHJKWP5.js} +2 -2
- package/dist/{chunk-W6HTOVHU.js → chunk-DZEVA7DI.js} +2 -2
- package/dist/{chunk-AVWEIOEN.js → chunk-EFDXGAAD.js} +1 -1
- package/dist/{chunk-3A5AAPMP.js → chunk-FWRNQOLT.js} +1 -1
- package/dist/{chunk-GS6FE3IW.js → chunk-FZK35GT4.js} +1 -1
- package/dist/{chunk-RPYPW5NN.js → chunk-GYE63V4P.js} +10 -10
- package/dist/{chunk-R7UDXKI3.js → chunk-H2X52H2N.js} +3 -3
- package/dist/{chunk-3NBKW2QJ.js → chunk-HMUF7FEO.js} +1 -1
- package/dist/{chunk-E6SDW5FV.js → chunk-IDX52YJN.js} +5 -5
- package/dist/{chunk-OLDDJS3S.js → chunk-IMY4QQTQ.js} +7 -7
- package/dist/{chunk-WY5OODN5.js → chunk-IW2CKH6A.js} +3645 -3
- package/dist/{chunk-KFH6UD26.js → chunk-IXCTG2WY.js} +3 -3
- package/dist/chunk-J4UX3RS3.js +3717 -0
- package/dist/{chunk-IYFKBFTW.js → chunk-JLKMWY2T.js} +1 -1
- package/dist/{chunk-IKVBTDLO.js → chunk-JOTLPC6S.js} +1 -1
- package/dist/{chunk-6IFXWJDX.js → chunk-JU6Y5TTZ.js} +2 -2
- package/dist/{chunk-YURXPGAM.js → chunk-KYN364DU.js} +2 -2
- package/dist/{chunk-RCFCZT5O.js → chunk-LBKDQKWV.js} +1 -1
- package/dist/{chunk-TC2FBZJZ.js → chunk-LJAU4TPS.js} +1 -1
- package/dist/{chunk-34TXESM7.js → chunk-LQASVU3I.js} +3 -3
- package/dist/{chunk-NORZWWLK.js → chunk-LTGGTEMA.js} +2 -2
- package/dist/{chunk-K2GOFLTX.js → chunk-MVTUV4TP.js} +2 -2
- package/dist/{chunk-A7YQNIQT.js → chunk-OKCR3JTO.js} +104 -4
- package/dist/{chunk-O3SKIXQK.js → chunk-OSUKETIH.js} +1 -1
- package/dist/chunk-P36MALQF.js +15 -0
- package/dist/{chunk-P6E4HFFU.js → chunk-QGRFOOLE.js} +8 -8
- package/dist/{chunk-Q65ZQFF2.js → chunk-QXPCARFE.js} +1 -1
- package/dist/{chunk-E4BSCXMU.js → chunk-R2JEKLDZ.js} +1 -1
- package/dist/{chunk-EKA4ZZBI.js → chunk-TY6XOHEM.js} +1 -1
- package/dist/{chunk-INI3TM6I.js → chunk-WGVOWWVK.js} +2 -2
- package/dist/{chunk-XDSOIJC3.js → chunk-WSGY5CDQ.js} +5 -5
- package/dist/{chunk-J5IPIQU2.js → chunk-WTMUCJ6Z.js} +1 -1
- package/dist/{chunk-7XTZVLE6.js → chunk-XGMNQQTJ.js} +1 -1
- package/dist/{chunk-N77KD7ZZ.js → chunk-XTLBLWOV.js} +1 -1
- package/dist/{chunk-6E6CM7WS.js → chunk-YFT3BL7N.js} +1 -1
- package/dist/{chunk-6Q6FR4KH.js → chunk-YHRZQJXH.js} +43 -29
- package/dist/{clean-L2E4VD57.js → clean-KTHTV5G5.js} +12 -13
- package/dist/cli.js +52 -52
- package/dist/{cloud-IDUQRYLO.js → cloud-ARSZWALC.js} +4 -4
- package/dist/{cloudrun-R3JXWXGG.js → cloudrun-NM7RXOCL.js} +3 -3
- package/dist/commands/layout-audit.browser.js +20 -20
- package/dist/{compare-VYBWSP3Y.js → compare-CY4UO3RW.js} +23 -24
- package/dist/{compiler-ACHWOU5N.js → compiler-VTH2D3ID.js} +3 -4
- package/dist/{component-PYYV2V3F.js → component-FRUIAXIR.js} +3 -3
- package/dist/{compositions-B5GQSXH7.js → compositions-CUSY6ZYY.js} +10 -11
- package/dist/{delete-EAX2U3WI.js → delete-KT3VHP4L.js} +5 -5
- package/dist/{dist-ROUDWGLO.js → dist-2GC6XKRQ.js} +2 -2
- package/dist/{dist-NZSQCYOF.js → dist-7SZU7MA7.js} +1 -2
- package/dist/{doctor-PJX7MLFG.js → doctor-4ROTBL5U.js} +8 -9
- package/dist/{events-SBC54MHO.js → events-Q5PXT5UC.js} +2 -2
- package/dist/{events-YFFXKAQQ.js → events-QJDVMKSR.js} +3 -3
- package/dist/{feedback-UETLWREV.js → feedback-PQ7TWESA.js} +10 -10
- package/dist/{figma-QDSJPIRW.js → figma-JN5DDBDS.js} +3 -3
- package/dist/fontLocalizeCli.js +8 -9
- package/dist/{get-B5TS6C7H.js → get-KT6OTERO.js} +5 -5
- package/dist/{gpuPolicy-LYOVBAJP.js → gpuPolicy-LCBWVGEH.js} +6 -7
- package/dist/{grade-compare-LBIHMAUN.js → grade-compare-VS3RP73G.js} +23 -24
- package/dist/{help-XBP6A6LT.js → help-AD6FIZIO.js} +1 -1
- package/dist/{history-2S42ZXKL.js → history-ZRWYRY7R.js} +5 -5
- package/dist/hyperframe-runtime.js +2 -2
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +2 -2
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-I2VDAWT7.js → info-WBBQA2AX.js} +7 -7
- package/dist/{init-BGHSDODI.js → init-A2XBDFGF.js} +21 -22
- package/dist/{inspect-MZK5B5RP.js → inspect-CLTZHA5O.js} +24 -25
- package/dist/{installer-LL4QAKFW.js → installer-WQDRVXH4.js} +4 -4
- package/dist/{keyframes-2EBF7OSS.js → keyframes-3FYOK6H6.js} +6 -6
- package/dist/{lambda-XKFPAOFE.js → lambda-Y2PA2BGS.js} +4 -4
- package/dist/{layout-TP5ERKEF.js → layout-4KP5O7IJ.js} +24 -25
- package/dist/{lint-FQ6CEI7E.js → lint-V4GRFHOJ.js} +7 -8
- package/dist/{lintProject-LM3XZRPZ.js → lintProject-RG2KGAXB.js} +1 -2
- package/dist/{list-FRNUJXZ3.js → list-OQ4VED6E.js} +5 -5
- package/dist/{login-C25QU3BQ.js → login-W47NKN5S.js} +20 -24
- package/dist/{logout-GJXZQKOA.js → logout-B4KS4A7S.js} +6 -6
- package/dist/{media-treatment-DCANGWSV.js → media-treatment-HJYL3EME.js} +43 -24
- package/dist/{models-GOD6ARB3.js → models-DYBAD2GQ.js} +7 -8
- package/dist/{motionShot-FSKETANX.js → motionShot-7NE2YBB3.js} +12 -13
- package/dist/{normalize-audio-C2IM7OID.js → normalize-audio-INKCLMS2.js} +4 -4
- package/dist/{open-VVISXIII.js → open-TYC5THVY.js} +4 -4
- package/dist/{pipeline-7YHZPYIS.js → pipeline-EVKEPQEW.js} +6 -7
- package/dist/{play-DSELK7G3.js → play-QMZEM6X3.js} +17 -18
- package/dist/{present-N72YFDKP.js → present-Y7IK3C4W.js} +13 -14
- package/dist/{preview-XTYN4NJ2.js → preview-5OQRYE6A.js} +16 -17
- package/dist/{producer-NDCU3MHK.js → producer-Q6G6JU7B.js} +1 -1
- package/dist/{projectConfig-MH4QU4AC.js → projectConfig-RJN3DKDB.js} +6 -6
- package/dist/{publication-KUSHI5MG.js → publication-QCPGGN3U.js} +2 -2
- package/dist/{publish-3XEEFWMF.js → publish-VZLFIGYY.js} +15 -15
- package/dist/{refresh-MFITBIKV.js → refresh-PVHBEABE.js} +2 -2
- package/dist/{remove-background-2QKJ7XOD.js → remove-background-TKOEHBA5.js} +7 -8
- package/dist/{render-S73DW4KK.js → render-KIIIF6PS.js} +13 -13
- package/dist/{render-2DVYTVLQ.js → render-X3NFNVEQ.js} +19 -20
- package/dist/{render-75E342ZU.js → render-XTXE5CRU.js} +3 -3
- package/dist/{render-batch-YURBS54Q.js → render-batch-M55YZLZ5.js} +3 -3
- package/dist/{renderCancellation-373ASJTO.js → renderCancellation-X5BEHAZU.js} +6 -7
- package/dist/renderSetupWorker.js +1 -2
- package/dist/{resolver-FE3GBZ4T.js → resolver-GAMXRA42.js} +4 -4
- package/dist/{screenshotCapture-ECBTLCU6.js → screenshotCapture-TEUIWXWN.js} +53 -33
- package/dist/{sherpa-B2D3AGP6.js → sherpa-ZYTNFHD5.js} +7 -8
- package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
- package/dist/skills/media-use/references/grading.md +4 -2
- package/dist/{skills-ICJ22CZZ.js → skills-CZHVAD3J.js} +5 -5
- package/dist/{skillsUpdateCheck-GXZN56I5.js → skillsUpdateCheck-6WLLX53A.js} +3 -3
- package/dist/{snapshot-XHKOAWF4.js → snapshot-K7BTJPYQ.js} +24 -25
- package/dist/{src-I7UC3JTL.js → src-3I3RH3V5.js} +5 -6
- package/dist/{src-74PFDTDX.js → src-YUW26JU5.js} +7 -8
- package/dist/{staticProjectServer-2DGKD6TF.js → staticProjectServer-IKCSGN2B.js} +13 -14
- package/dist/{status-JA6SKQVH.js → status-LXPGSSKY.js} +6 -4
- package/dist/studio/assets/{hyperframes-player-5Vx2AiUz.js → hyperframes-player-sAsRuV73.js} +1 -1
- package/dist/studio/assets/{index-C0thd4eM.js → index-B-wffzRH.js} +126 -126
- package/dist/studio/assets/{index-BAnh7cSQ.js → index-D3Vij9t1.js} +1 -1
- package/dist/studio/assets/{index-P8fgj_Xa.js → index-D5q2_7Gw.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +26 -15
- package/dist/studio/index.js.map +1 -1
- package/dist/{studio-api-PROBO7JG.js → studio-api-SQ3NXFSM.js} +7 -8
- package/dist/{studioServer-ID6UV2NE.js → studioServer-VVEO7XCH.js} +35 -36
- package/dist/{telemetry-65LFHIWH.js → telemetry-FQDKR5XA.js} +3 -3
- package/dist/{timeline-6UV3JJXD.js → timeline-N6ZASFNE.js} +13 -14
- package/dist/{tokens-HIL4TZXI.js → tokens-2OIIBBCW.js} +2 -2
- package/dist/{transcribe-TIO6W3EQ.js → transcribe-4F6MK73N.js} +7 -8
- package/dist/{transcribe-V7F6QDSN.js → transcribe-7YTUCXDX.js} +6 -6
- package/dist/{updateCheck-GZELANMA.js → updateCheck-AZ2COZFR.js} +2 -2
- package/dist/{upgrade-BX3KDDZJ.js → upgrade-QAJEYB4X.js} +2 -2
- package/dist/{urlDownloader-R76OHFIE.js → urlDownloader-LSMFEO3R.js} +5 -6
- package/dist/{validate-7UX4I443.js → validate-GW5MDL36.js} +15 -16
- package/dist/{video-RVGYEFQU.js → video-PRNOKUK3.js} +6 -7
- package/package.json +1 -1
- package/dist/chunk-24OWOBQH.js +0 -3656
- package/dist/chunk-SYKKFAUW.js +0 -3711
|
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
parseFeedbackRating,
|
|
9
9
|
trackRenderFeedback
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XGMNQQTJ.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LBKDQKWV.js";
|
|
14
14
|
import {
|
|
15
15
|
detectAgentRuntime
|
|
16
16
|
} from "./chunk-GQJZORQP.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_VP9_CPU_USED,
|
|
21
21
|
renderProvenanceArgs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IDX52YJN.js";
|
|
23
23
|
|
|
24
24
|
// src/background-removal/pipeline.ts
|
|
25
25
|
import { spawn } from "child_process";
|
|
@@ -202,7 +202,7 @@ function inferInputKind(inputPath) {
|
|
|
202
202
|
}
|
|
203
203
|
async function probeMedia(inputPath) {
|
|
204
204
|
const isImage = inferInputKind(inputPath) === "image";
|
|
205
|
-
const engine = await import("./src-
|
|
205
|
+
const engine = await import("./src-3I3RH3V5.js");
|
|
206
206
|
const meta = await engine.extractMediaMetadata(inputPath);
|
|
207
207
|
if (isImage) {
|
|
208
208
|
return { width: meta.width, height: meta.height, fps: 0, frameCount: 1 };
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getMimeType,
|
|
9
9
|
injectMediaCodecMapIntoHtml
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YHRZQJXH.js";
|
|
11
11
|
import {
|
|
12
12
|
PROXY_VARIANT_CONFIG,
|
|
13
13
|
ProxyCapacityError,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
recordProxyRequest,
|
|
19
19
|
resolveProxy,
|
|
20
20
|
resolveProxyVariantRequest
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6UM3R7PP.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveAutoProxy
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-EFDXGAAD.js";
|
|
25
25
|
|
|
26
26
|
// src/utils/staticProjectServer.ts
|
|
27
27
|
import { createServer } from "http";
|
|
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getMimeType
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YHRZQJXH.js";
|
|
10
10
|
import {
|
|
11
11
|
injectTagsAtHeadStart
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-J4UX3RS3.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/compositionServer.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
typeDirPath,
|
|
21
21
|
updateRecord,
|
|
22
22
|
withFigmaErrors
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-R2JEKLDZ.js";
|
|
24
24
|
import {
|
|
25
25
|
defineCommand
|
|
26
26
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -221,7 +221,7 @@ var asset_default = defineCommand({
|
|
|
221
221
|
rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
224
|
+
const { trackFigmaImport } = await import("./telemetry-FQDKR5XA.js");
|
|
225
225
|
trackFigmaImport({
|
|
226
226
|
phase: "asset",
|
|
227
227
|
reused: results.every((r) => r.reused),
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
isAllowedHtmlAttribute,
|
|
15
15
|
isSafeAttributeValue,
|
|
16
16
|
sanitizeRichTextChildren
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YFT3BL7N.js";
|
|
18
18
|
import {
|
|
19
19
|
removeElementWithGsapCascade
|
|
20
20
|
} from "./chunk-OZUQF4NB.js";
|
|
21
21
|
import {
|
|
22
22
|
require_dist
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IW2CKH6A.js";
|
|
24
24
|
import {
|
|
25
25
|
readClipTiming,
|
|
26
26
|
readMediaOffsetSeconds,
|
|
@@ -34,7 +34,105 @@ import {
|
|
|
34
34
|
__toESM
|
|
35
35
|
} from "./chunk-M2WBOQ2Q.js";
|
|
36
36
|
|
|
37
|
-
// ../
|
|
37
|
+
// ../core/dist/timelineAssetId.js
|
|
38
|
+
function trimIdUnderscores(value) {
|
|
39
|
+
let start = 0;
|
|
40
|
+
let end = value.length;
|
|
41
|
+
while (value[start] === "_")
|
|
42
|
+
start += 1;
|
|
43
|
+
while (end > start && value[end - 1] === "_")
|
|
44
|
+
end -= 1;
|
|
45
|
+
return value.slice(start, end);
|
|
46
|
+
}
|
|
47
|
+
function buildTimelineAssetId(assetPath, existingIds) {
|
|
48
|
+
const baseName = assetPath.slice(assetPath.lastIndexOf("/") + 1);
|
|
49
|
+
const normalized = baseName.replace(/\.[^.]+$/, "").replace(/[^a-zA-Z0-9_-]+/g, "_").toLowerCase();
|
|
50
|
+
const baseId = trimIdUnderscores(normalized) || "asset";
|
|
51
|
+
const ids = new Set(existingIds);
|
|
52
|
+
if (!ids.has(baseId))
|
|
53
|
+
return baseId;
|
|
54
|
+
let suffix = 2;
|
|
55
|
+
while (ids.has(`${baseId}_${suffix}`))
|
|
56
|
+
suffix += 1;
|
|
57
|
+
return `${baseId}_${suffix}`;
|
|
58
|
+
}
|
|
59
|
+
function referenceChildren(element) {
|
|
60
|
+
if (element.children.length > 0)
|
|
61
|
+
return element.children;
|
|
62
|
+
if (element.tagName.toLowerCase() !== "template")
|
|
63
|
+
return [];
|
|
64
|
+
const content = element.content;
|
|
65
|
+
return content ? content.children : [];
|
|
66
|
+
}
|
|
67
|
+
function documentElements(document) {
|
|
68
|
+
const elements = [];
|
|
69
|
+
const visit = (element) => {
|
|
70
|
+
elements.push(element);
|
|
71
|
+
for (const child of referenceChildren(element))
|
|
72
|
+
visit(child);
|
|
73
|
+
};
|
|
74
|
+
if (document.documentElement)
|
|
75
|
+
visit(document.documentElement);
|
|
76
|
+
return elements;
|
|
77
|
+
}
|
|
78
|
+
function decodeIdEscape(original, hex) {
|
|
79
|
+
const codePoint = Number.parseInt(hex, 16);
|
|
80
|
+
return codePoint <= 1114111 ? String.fromCodePoint(codePoint) : original;
|
|
81
|
+
}
|
|
82
|
+
function referencesId(value, id) {
|
|
83
|
+
const decoded = value.replace(/\\x([0-9a-f]{2})/gi, (original, hex) => decodeIdEscape(original, hex)).replace(/\\u\{([0-9a-f]+)\}|\\u([0-9a-f]{4})/gi, (original, braced, fixed) => decodeIdEscape(original, braced ?? fixed)).replace(/\\([0-9a-f]{1,6})\s?/gi, (original, hex) => decodeIdEscape(original, hex)).replace(/\\([^\r\n])/g, "$1");
|
|
84
|
+
return decoded.includes(id);
|
|
85
|
+
}
|
|
86
|
+
function decodeFragment(value) {
|
|
87
|
+
const fragment = value.split("#").slice(1).join("#");
|
|
88
|
+
try {
|
|
89
|
+
return decodeURIComponent(fragment);
|
|
90
|
+
} catch {
|
|
91
|
+
return fragment;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function attributeReferencesId(attribute, id) {
|
|
95
|
+
if (["id", "data-hf-id"].includes(attribute.name))
|
|
96
|
+
return false;
|
|
97
|
+
if (attribute.name === "src")
|
|
98
|
+
return referencesId(decodeFragment(attribute.value), id);
|
|
99
|
+
return referencesId(attribute.value, id);
|
|
100
|
+
}
|
|
101
|
+
function elementReferencesId(element, id) {
|
|
102
|
+
const code = ["script", "style"].includes(element.tagName.toLowerCase());
|
|
103
|
+
if (code && referencesId(element.textContent ?? "", id))
|
|
104
|
+
return true;
|
|
105
|
+
return Array.from(element.attributes).some((attribute) => attributeReferencesId(attribute, id));
|
|
106
|
+
}
|
|
107
|
+
function readMediaIdentity(element) {
|
|
108
|
+
const media = ["video", "audio", "img"].includes(element.tagName.toLowerCase());
|
|
109
|
+
const src = element.getAttribute("src");
|
|
110
|
+
const id = element.getAttribute("id");
|
|
111
|
+
if (!media || !src || !id)
|
|
112
|
+
return null;
|
|
113
|
+
return { id, src };
|
|
114
|
+
}
|
|
115
|
+
function matchesGeneratedId({ id, src }) {
|
|
116
|
+
const base = buildTimelineAssetId(src, []);
|
|
117
|
+
const suffix = id.slice(base.length);
|
|
118
|
+
return id === base || id.startsWith(base) && /^_(?:[2-9]\d*|1\d+)$/.test(suffix);
|
|
119
|
+
}
|
|
120
|
+
function canRenameMedia(element, identity, newSrc) {
|
|
121
|
+
const authored = ["data-timeline-label", "data-label", "aria-label"].some((name) => element.getAttribute(name)?.trim());
|
|
122
|
+
return !authored && identity.src !== newSrc && matchesGeneratedId(identity);
|
|
123
|
+
}
|
|
124
|
+
function replacementTimelineAssetId(document, element, newSrc) {
|
|
125
|
+
const identity = readMediaIdentity(element);
|
|
126
|
+
if (!identity || !canRenameMedia(element, identity, newSrc))
|
|
127
|
+
return null;
|
|
128
|
+
const elements = documentElements(document);
|
|
129
|
+
if (elements.some((other) => elementReferencesId(other, identity.id)))
|
|
130
|
+
return null;
|
|
131
|
+
const ids = elements.filter((other) => other !== element).map((other) => other.getAttribute("id")).filter((value) => value !== null);
|
|
132
|
+
return buildTimelineAssetId(newSrc, ids);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// ../studio-server/dist/chunk-JJ4N3PXT.js
|
|
38
136
|
var import_postcss_selector_parser = __toESM(require_dist(), 1);
|
|
39
137
|
import postcss from "postcss";
|
|
40
138
|
|
|
@@ -148,7 +246,7 @@ function findSyncPartner(el) {
|
|
|
148
246
|
return best?.el ?? null;
|
|
149
247
|
}
|
|
150
248
|
|
|
151
|
-
// ../studio-server/dist/chunk-
|
|
249
|
+
// ../studio-server/dist/chunk-JJ4N3PXT.js
|
|
152
250
|
function parseStyleDecls(style) {
|
|
153
251
|
const props = /* @__PURE__ */ new Map();
|
|
154
252
|
const order = [];
|
|
@@ -373,6 +471,8 @@ function patchElementInHtml(source, target, operations, takenIds) {
|
|
|
373
471
|
if (!isAllowedHtmlAttribute(op.property)) break;
|
|
374
472
|
if (op.value != null) {
|
|
375
473
|
if (!isSafeAttributeValue(op.property, op.value)) break;
|
|
474
|
+
const replacementId = op.property === "src" ? replacementTimelineAssetId(document, opTarget, op.value) : null;
|
|
475
|
+
if (replacementId !== null) opTarget.setAttribute("id", replacementId);
|
|
376
476
|
opTarget.setAttribute(op.property, op.value);
|
|
377
477
|
} else {
|
|
378
478
|
opTarget.removeAttribute(op.property);
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveCaptureBrowserGpuMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WTMUCJ6Z.js";
|
|
10
10
|
import {
|
|
11
11
|
requestCliExit
|
|
12
12
|
} from "./chunk-PBN6GBJE.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
|
|
8
|
+
// src/capture/types.ts
|
|
9
|
+
var DEFAULT_MAX_SCREENSHOTS = 21;
|
|
10
|
+
var CAPTURE_PHASE_SCHEMA = "hyperframes.capture.phase.v1";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
DEFAULT_MAX_SCREENSHOTS,
|
|
14
|
+
CAPTURE_PHASE_SCHEMA
|
|
15
|
+
};
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
EncoderInterruptedError,
|
|
17
17
|
encoderFailureError,
|
|
18
18
|
prepareAnimatedGifInputs
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WGVOWWVK.js";
|
|
20
20
|
import {
|
|
21
21
|
createStudioPositionSeekReapplyScript
|
|
22
22
|
} from "./chunk-KC5XXX3X.js";
|
|
@@ -141,7 +141,7 @@ import {
|
|
|
141
141
|
validateEngineConfigSnapshot,
|
|
142
142
|
verifyDiskDrawElementSamples,
|
|
143
143
|
writeCapturedFrame
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-IDX52YJN.js";
|
|
145
145
|
import {
|
|
146
146
|
assignBundledRuntimeCompositionIds,
|
|
147
147
|
buildVariablesByCompScript,
|
|
@@ -151,7 +151,7 @@ import {
|
|
|
151
151
|
ensureExternalScriptTag,
|
|
152
152
|
inlineSubCompositions,
|
|
153
153
|
prepareFlattenedInnerRoot
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-DPHJKWP5.js";
|
|
155
155
|
import {
|
|
156
156
|
LOW_MEMORY_TOTAL_MB_THRESHOLD,
|
|
157
157
|
getCgroupMemoryLimitMb,
|
|
@@ -172,7 +172,7 @@ import {
|
|
|
172
172
|
resolveAbsoluteMediaStartSeconds,
|
|
173
173
|
resolveAuthoredTimingWindow,
|
|
174
174
|
toFps
|
|
175
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-YFT3BL7N.js";
|
|
176
176
|
import {
|
|
177
177
|
CANVAS_DIMENSIONS,
|
|
178
178
|
HTML_BODY_CSS_HEIGHT_FIRST_RE,
|
|
@@ -210,7 +210,7 @@ import {
|
|
|
210
210
|
shouldClampResolvedMediaDuration,
|
|
211
211
|
sourceTimeAt,
|
|
212
212
|
styleElementsFor
|
|
213
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-J4UX3RS3.js";
|
|
214
214
|
import {
|
|
215
215
|
MAX_AUDIO_GAIN
|
|
216
216
|
} from "./chunk-YA62XGXS.js";
|
|
@@ -223,7 +223,7 @@ import {
|
|
|
223
223
|
} from "./chunk-TWWSYAKJ.js";
|
|
224
224
|
import {
|
|
225
225
|
lintHyperframeHtml
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-IW2CKH6A.js";
|
|
227
227
|
import {
|
|
228
228
|
isUnresolvedAssetPlaceholder,
|
|
229
229
|
readProjectFile,
|
|
@@ -14319,7 +14319,7 @@ function startServer(options = {}) {
|
|
|
14319
14319
|
});
|
|
14320
14320
|
async function shutdown(signal) {
|
|
14321
14321
|
log.info(`Received ${signal}, shutting down`);
|
|
14322
|
-
const { drainBrowserPool } = await import("./src-
|
|
14322
|
+
const { drainBrowserPool } = await import("./src-3I3RH3V5.js");
|
|
14323
14323
|
await drainBrowserPool().catch(() => {
|
|
14324
14324
|
});
|
|
14325
14325
|
const handle = await Promise.race([
|
|
@@ -15442,7 +15442,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
|
|
|
15442
15442
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
15443
15443
|
if (probeResult.probeSession) {
|
|
15444
15444
|
try {
|
|
15445
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
15445
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-3I3RH3V5.js");
|
|
15446
15446
|
await closeCaptureSession2(probeResult.probeSession);
|
|
15447
15447
|
} catch (err) {
|
|
15448
15448
|
log.warn("[plan] probe session close failed", {
|
|
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
|
|
|
1278
1278
|
} catch (err) {
|
|
1279
1279
|
if (err instanceof Error) {
|
|
1280
1280
|
try {
|
|
1281
|
-
const { trackCommandFailure } = await import("./events-
|
|
1281
|
+
const { trackCommandFailure } = await import("./events-QJDVMKSR.js");
|
|
1282
1282
|
trackCommandFailure(
|
|
1283
1283
|
command,
|
|
1284
1284
|
err,
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
DEFAULT_VP9_CPU_USED,
|
|
9
9
|
isHttpUrl,
|
|
10
10
|
runFfmpeg
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IDX52YJN.js";
|
|
12
12
|
import {
|
|
13
13
|
parseAnimatedGifMetadata
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YFT3BL7N.js";
|
|
15
15
|
import {
|
|
16
16
|
parseHTML
|
|
17
17
|
} from "./chunk-GK4AIFIH.js";
|
|
@@ -10,18 +10,18 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
launchManagedBrowser,
|
|
12
12
|
resolveManagedGpuMode
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OSUKETIH.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveDiagnosticNavigationTimeoutMs,
|
|
16
16
|
windowsChromeCrashRemediation
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TY6XOHEM.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveLocalBrowserGpuMode
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WTMUCJ6Z.js";
|
|
21
21
|
import {
|
|
22
22
|
assertWebGpuAdapterAvailable,
|
|
23
23
|
compositionRequiresWebGpu
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-IDX52YJN.js";
|
|
25
25
|
import {
|
|
26
26
|
normalizeErrorMessage
|
|
27
27
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -103,7 +103,7 @@ async function openSettledCompositionPage(html, url, options) {
|
|
|
103
103
|
const { ensureBrowser, findSystemBrowser } = await import("./manager-CT3D67CG.js");
|
|
104
104
|
const browser = await ensureBrowser();
|
|
105
105
|
const puppeteer = await import("puppeteer-core");
|
|
106
|
-
const { buildChromeArgs } = await import("./src-
|
|
106
|
+
const { buildChromeArgs } = await import("./src-3I3RH3V5.js");
|
|
107
107
|
const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
|
|
108
108
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
109
109
|
const launch = async (executablePath) => {
|
|
@@ -13,7 +13,7 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
|
|
|
13
13
|
return "auto";
|
|
14
14
|
}
|
|
15
15
|
async function resolveCaptureBrowserGpuMode(requestedMode, chromePath) {
|
|
16
|
-
const { resolveBrowserGpuMode } = await import("./src-
|
|
16
|
+
const { resolveBrowserGpuMode } = await import("./src-3I3RH3V5.js");
|
|
17
17
|
return resolveBrowserGpuMode(requestedMode, { chromePath });
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
splitElementInHtml,
|
|
22
22
|
unwrapElementsFromHtml,
|
|
23
23
|
wrapElementsInHtml
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OKCR3JTO.js";
|
|
25
25
|
import {
|
|
26
26
|
MAX_WINDOW_IDLE_MS,
|
|
27
27
|
STUDIO_SIGNATURE_MANIFEST_PATHS,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
scanProjectMediaCodecMap,
|
|
64
64
|
shouldPrewarmProxy,
|
|
65
65
|
waitForProxy
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-6UM3R7PP.js";
|
|
67
67
|
import {
|
|
68
68
|
STUDIO_MOTION_PATH,
|
|
69
69
|
createStudioMotionRenderBodyScript,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
} from "./chunk-TJSTGSAW.js";
|
|
97
97
|
import {
|
|
98
98
|
addScenePartsManifest
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-DPHJKWP5.js";
|
|
100
100
|
import {
|
|
101
101
|
ensureHfIds
|
|
102
102
|
} from "./chunk-A4KQZXZI.js";
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
parseFps,
|
|
110
110
|
parsePreviewProxyBox,
|
|
111
111
|
sameInstant
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-YFT3BL7N.js";
|
|
113
113
|
import {
|
|
114
114
|
MagicString,
|
|
115
115
|
VALID_CANVAS_RESOLUTIONS,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
resolveRateSpec,
|
|
129
129
|
sourceTimeAt,
|
|
130
130
|
stripEmbeddedRuntimeScripts
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-J4UX3RS3.js";
|
|
132
132
|
import {
|
|
133
133
|
ProjectRootMissingError,
|
|
134
134
|
folderGone,
|
|
@@ -3590,7 +3590,7 @@ import { readFileSync as readFileSync7 } from "fs";
|
|
|
3590
3590
|
import { join as join9 } from "path";
|
|
3591
3591
|
import { streamSSE } from "hono/streaming";
|
|
3592
3592
|
import { existsSync as existsSync6, lstatSync as lstatSync3, readFileSync as readFileSync8, unlinkSync as unlinkSync3, readdirSync as readdirSync3, statSync as statSync5 } from "fs";
|
|
3593
|
-
import { join as join10 } from "path";
|
|
3593
|
+
import { dirname as dirname5, join as join10 } from "path";
|
|
3594
3594
|
import { HTTPException } from "hono/http-exception";
|
|
3595
3595
|
import { open, stat } from "fs/promises";
|
|
3596
3596
|
import { createHash as createHash3 } from "crypto";
|
|
@@ -3612,7 +3612,7 @@ import { existsSync as existsSync7, readFileSync as readFileSync10, statSync as
|
|
|
3612
3612
|
import { join as join12, resolve as resolve5 } from "path";
|
|
3613
3613
|
import { execFile } from "child_process";
|
|
3614
3614
|
import { readFileSync as readFileSync11, rmSync as rmSync5, statSync as statSync8 } from "fs";
|
|
3615
|
-
import { basename as basename2, dirname as
|
|
3615
|
+
import { basename as basename2, dirname as dirname6, join as join13, relative as relative4, sep as sep2 } from "path";
|
|
3616
3616
|
import { createHash as createHash5, randomBytes } from "crypto";
|
|
3617
3617
|
import { existsSync as existsSync8 } from "fs";
|
|
3618
3618
|
import { existsSync as existsSync9, readFileSync as readFileSync12, statSync as statSync9 } from "fs";
|
|
@@ -3622,7 +3622,7 @@ import { promisify } from "util";
|
|
|
3622
3622
|
import { closeSync as closeSync3, constants as constants2, fstatSync as fstatSync3, openSync as openSync3, readSync } from "fs";
|
|
3623
3623
|
import { streamSSE as streamSSE2 } from "hono/streaming";
|
|
3624
3624
|
import { existsSync as existsSync10 } from "fs";
|
|
3625
|
-
import { basename as basename3, dirname as
|
|
3625
|
+
import { basename as basename3, dirname as dirname7, extname, join as join15, posix } from "path";
|
|
3626
3626
|
import { existsSync as existsSync11, readFileSync as readFileSync13 } from "fs";
|
|
3627
3627
|
import { homedir } from "os";
|
|
3628
3628
|
import { join as join16 } from "path";
|
|
@@ -5240,7 +5240,7 @@ async function prepareGsapMutationScript(c, res, firstMutation) {
|
|
|
5240
5240
|
let block = extractGsapScriptBlock(html);
|
|
5241
5241
|
if (!block && (firstMutation.type === "add" || firstMutation.type === "add-with-keyframes")) {
|
|
5242
5242
|
const compId = html.match(/data-composition-id="([^"]+)"/)?.[1] ?? "main";
|
|
5243
|
-
const { GSAP_CDN } = await import("./dist-
|
|
5243
|
+
const { GSAP_CDN } = await import("./dist-2GC6XKRQ.js");
|
|
5244
5244
|
const bootstrap = [
|
|
5245
5245
|
`<script src="${GSAP_CDN}"></script>`,
|
|
5246
5246
|
"<script>",
|
|
@@ -7666,6 +7666,21 @@ function registerLintRoutes(api, adapter) {
|
|
|
7666
7666
|
});
|
|
7667
7667
|
}
|
|
7668
7668
|
var VALID_RESOLUTIONS = new Set(VALID_CANVAS_RESOLUTIONS);
|
|
7669
|
+
var RENDER_MIME = {
|
|
7670
|
+
".mp4": "video/mp4",
|
|
7671
|
+
".webm": "video/webm",
|
|
7672
|
+
".mov": "video/quicktime"
|
|
7673
|
+
};
|
|
7674
|
+
var RENDER_EXTENSIONS = Object.keys(RENDER_MIME);
|
|
7675
|
+
var RENDER_ARTIFACT_EXTENSIONS = [...RENDER_EXTENSIONS, ".meta.json"];
|
|
7676
|
+
function resolveRenderArtifacts(directories, jobId) {
|
|
7677
|
+
const artifacts = [...new Set(directories)].filter(existsSync6).flatMap(
|
|
7678
|
+
(directory) => RENDER_ARTIFACT_EXTENSIONS.map(
|
|
7679
|
+
(extension) => resolveWithinProject(directory, `${jobId}${extension}`)
|
|
7680
|
+
)
|
|
7681
|
+
);
|
|
7682
|
+
return artifacts.every((path) => path !== null) ? artifacts : null;
|
|
7683
|
+
}
|
|
7669
7684
|
function contentDispositionHeader(disposition, filename) {
|
|
7670
7685
|
const fallback = filename.replace(/[^\x20-\x7e]|["\\]/g, "_");
|
|
7671
7686
|
const encoded = encodeURIComponent(filename).replace(
|
|
@@ -7783,12 +7798,6 @@ function registerRenderRoutes(api, adapter) {
|
|
|
7783
7798
|
}
|
|
7784
7799
|
return c.json({ status: job.status });
|
|
7785
7800
|
});
|
|
7786
|
-
const RENDER_MIME = {
|
|
7787
|
-
".mp4": "video/mp4",
|
|
7788
|
-
".webm": "video/webm",
|
|
7789
|
-
".mov": "video/quicktime"
|
|
7790
|
-
};
|
|
7791
|
-
const RENDER_EXTENSIONS = Object.keys(RENDER_MIME);
|
|
7792
7801
|
const isPlainFile = (path) => {
|
|
7793
7802
|
try {
|
|
7794
7803
|
return lstatSync3(path).isFile();
|
|
@@ -7834,17 +7843,22 @@ function registerRenderRoutes(api, adapter) {
|
|
|
7834
7843
|
}
|
|
7835
7844
|
});
|
|
7836
7845
|
});
|
|
7837
|
-
|
|
7846
|
+
async function renderDirectories(jobId) {
|
|
7847
|
+
const outputPath = renderJobs.get(jobId)?.outputPath;
|
|
7848
|
+
if (outputPath) return [dirname5(outputPath)];
|
|
7849
|
+
const projects = await adapter.listProjects();
|
|
7850
|
+
return projects.map((project) => adapter.rendersDir(project));
|
|
7851
|
+
}
|
|
7852
|
+
api.delete("/render/:jobId", async (c) => {
|
|
7838
7853
|
const { jobId } = c.req.param();
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
}
|
|
7854
|
+
if (jobId.includes("/") || jobId.includes("\\") || jobId.includes("\0")) {
|
|
7855
|
+
return c.json({ error: "forbidden" }, 403);
|
|
7856
|
+
}
|
|
7857
|
+
const directories = await renderDirectories(jobId);
|
|
7858
|
+
const artifacts = resolveRenderArtifacts(directories, jobId);
|
|
7859
|
+
if (!artifacts) return c.json({ error: "forbidden" }, 403);
|
|
7860
|
+
for (const path of artifacts) {
|
|
7861
|
+
if (existsSync6(path)) unlinkSync3(path);
|
|
7848
7862
|
}
|
|
7849
7863
|
renderJobs.delete(jobId);
|
|
7850
7864
|
return c.json({ deleted: true });
|
|
@@ -8585,14 +8599,14 @@ async function extractThenPublishWhole(extract, mediaPath, mediaTime, imagePath)
|
|
|
8585
8599
|
}
|
|
8586
8600
|
}
|
|
8587
8601
|
async function extractStill(projectDir, absPath, source, playhead, tools) {
|
|
8588
|
-
const fileDir =
|
|
8602
|
+
const fileDir = dirname6(absPath);
|
|
8589
8603
|
const mediaPath = pinWithinProject(projectDir, relative4(projectDir, join13(fileDir, source.src)));
|
|
8590
8604
|
if (!mediaPath) return { error: `forbidden media path: ${source.src}`, status: 403 };
|
|
8591
8605
|
const freezeDir = join13(projectDir, ...FREEZE_DIR);
|
|
8592
8606
|
const fileName = freezeStillFileName(source.id, playhead, tools.stillToken());
|
|
8593
8607
|
mkdirWithinProject(projectDir, freezeDir);
|
|
8594
8608
|
const imagePath = pinWithinProject(projectDir, join13(...FREEZE_DIR, fileName));
|
|
8595
|
-
if (!imagePath ||
|
|
8609
|
+
if (!imagePath || dirname6(imagePath) !== freezeDir) {
|
|
8596
8610
|
return { error: `forbidden freeze path: ${fileName}`, status: 403 };
|
|
8597
8611
|
}
|
|
8598
8612
|
const failed = await extractThenPublishWhole(
|
|
@@ -9278,8 +9292,8 @@ function registerMediaRoutes(api, adapter, options = {}) {
|
|
|
9278
9292
|
return c.json({ error: "forbidden" }, 403);
|
|
9279
9293
|
}
|
|
9280
9294
|
}
|
|
9281
|
-
mkdirWithinProject(project.dir,
|
|
9282
|
-
if (backgroundOutputPath) mkdirWithinProject(project.dir,
|
|
9295
|
+
mkdirWithinProject(project.dir, dirname7(outputPath));
|
|
9296
|
+
if (backgroundOutputPath) mkdirWithinProject(project.dir, dirname7(backgroundOutputPath));
|
|
9283
9297
|
const jobId = makeJobId(project.id, mediaJobs);
|
|
9284
9298
|
const state = adapter.startBackgroundRemoval({
|
|
9285
9299
|
project,
|