@hyperframes/studio-server 0.8.144 → 0.8.146

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.
Files changed (60) hide show
  1. package/dist/{chunk-DG2VOIGR.js → chunk-3RUFN2CK.js} +1 -2
  2. package/dist/{chunk-RN33UALN.js → chunk-EJC7TX3O.js} +1 -2
  3. package/dist/{chunk-4ETS2LXI.js → chunk-L3HJVTQE.js} +0 -1
  4. package/dist/{chunk-DTKK7TKL.js → chunk-M62HDRLX.js} +2 -3
  5. package/dist/{chunk-IMG2GSY6.js → chunk-RGC6DKVM.js} +0 -1
  6. package/dist/{chunk-6XMC64FJ.js → chunk-SVQFE44C.js} +0 -1
  7. package/dist/{chunk-X62ASOGO.js → chunk-UEEXAVOA.js} +0 -1
  8. package/dist/{chunk-32IH7WBY.js → chunk-VMT4OC5B.js} +2 -3
  9. package/dist/{chunk-AZBGTB3N.js → chunk-XKBQOQFZ.js} +45 -10
  10. package/dist/{chunk-K3H6HTVC.js → chunk-Y7V6FJHS.js} +41 -16
  11. package/dist/{chunk-JJ4N3PXT.js → chunk-Z5UJMFO4.js} +1 -2
  12. package/dist/{chunk-VE2AOX4K.js → chunk-ZNRTEXK2.js} +2 -3
  13. package/dist/helpers/draftMarkers.js +0 -1
  14. package/dist/helpers/finiteMutation.js +1 -2
  15. package/dist/helpers/hfIdPersist.js +4 -5
  16. package/dist/helpers/loudness.js +4 -5
  17. package/dist/helpers/manualEditsRenderScript.js +1 -2
  18. package/dist/helpers/mediaCodecMap.js +4 -5
  19. package/dist/helpers/mediaProxyPreview.d.ts +2 -2
  20. package/dist/helpers/mediaProxyPreview.js +6 -7
  21. package/dist/helpers/proxyTranscoder.d.ts +16 -4
  22. package/dist/helpers/proxyTranscoder.js +9 -6
  23. package/dist/helpers/safePath.js +3 -4
  24. package/dist/helpers/screenshotClip.js +1 -2
  25. package/dist/helpers/sourceMutation.d.ts +0 -1
  26. package/dist/helpers/sourceMutation.js +1 -2
  27. package/dist/helpers/studioMotionRenderScript.js +1 -2
  28. package/dist/history/index.d.ts +2 -2
  29. package/dist/history/index.js +8 -7
  30. package/dist/index.d.ts +5 -4
  31. package/dist/index.js +31 -25
  32. package/dist/{mediaProxyPreview-ozy7FkMP.d.ts → mediaProxyPreview-BR7yXz2M.d.ts} +2 -1
  33. package/dist/{projectHistory-Cm8Mdmmv.d.ts → projectHistory-CyTVYz2y.d.ts} +9 -1
  34. package/package.json +3 -3
  35. package/dist/chunk-32IH7WBY.js.map +0 -1
  36. package/dist/chunk-4ETS2LXI.js.map +0 -1
  37. package/dist/chunk-6XMC64FJ.js.map +0 -1
  38. package/dist/chunk-AZBGTB3N.js.map +0 -1
  39. package/dist/chunk-DG2VOIGR.js.map +0 -1
  40. package/dist/chunk-DTKK7TKL.js.map +0 -1
  41. package/dist/chunk-IMG2GSY6.js.map +0 -1
  42. package/dist/chunk-JJ4N3PXT.js.map +0 -1
  43. package/dist/chunk-K3H6HTVC.js.map +0 -1
  44. package/dist/chunk-RN33UALN.js.map +0 -1
  45. package/dist/chunk-VE2AOX4K.js.map +0 -1
  46. package/dist/chunk-X62ASOGO.js.map +0 -1
  47. package/dist/helpers/draftMarkers.js.map +0 -1
  48. package/dist/helpers/finiteMutation.js.map +0 -1
  49. package/dist/helpers/hfIdPersist.js.map +0 -1
  50. package/dist/helpers/loudness.js.map +0 -1
  51. package/dist/helpers/manualEditsRenderScript.js.map +0 -1
  52. package/dist/helpers/mediaCodecMap.js.map +0 -1
  53. package/dist/helpers/mediaProxyPreview.js.map +0 -1
  54. package/dist/helpers/proxyTranscoder.js.map +0 -1
  55. package/dist/helpers/safePath.js.map +0 -1
  56. package/dist/helpers/screenshotClip.js.map +0 -1
  57. package/dist/helpers/sourceMutation.js.map +0 -1
  58. package/dist/helpers/studioMotionRenderScript.js.map +0 -1
  59. package/dist/history/index.js.map +0 -1
  60. package/dist/index.js.map +0 -1
@@ -2,7 +2,7 @@ import {
2
2
  isInHiddenOrVendorDir,
3
3
  mkdirWithinProject,
4
4
  walkDir
5
- } from "./chunk-DTKK7TKL.js";
5
+ } from "./chunk-M62HDRLX.js";
6
6
 
7
7
  // src/helpers/hfIdPersist.ts
8
8
  import { ensureHfIds } from "@hyperframes/parsers/hf-ids";
@@ -95,4 +95,3 @@ export {
95
95
  stampProjectHfIds,
96
96
  stampFileHfIds
97
97
  };
98
- //# sourceMappingURL=chunk-DG2VOIGR.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-DTKK7TKL.js";
3
+ } from "./chunk-M62HDRLX.js";
4
4
 
5
5
  // src/helpers/mediaCodecMap.ts
6
6
  import { scanHtmlOpeningTags, decodeAuthoredAttribute } from "@hyperframes/parsers";
@@ -344,4 +344,3 @@ export {
344
344
  probeAssetCodec,
345
345
  scanProjectMediaCodecMap
346
346
  };
347
- //# sourceMappingURL=chunk-RN33UALN.js.map
@@ -189,4 +189,3 @@ export {
189
189
  STUDIO_MOTION_PATH,
190
190
  createStudioMotionRenderBodyScript
191
191
  };
192
- //# sourceMappingURL=chunk-4ETS2LXI.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  STUDIO_MANUAL_EDITS_PATH
3
- } from "./chunk-6XMC64FJ.js";
3
+ } from "./chunk-SVQFE44C.js";
4
4
  import {
5
5
  STUDIO_MOTION_PATH
6
- } from "./chunk-4ETS2LXI.js";
6
+ } from "./chunk-L3HJVTQE.js";
7
7
 
8
8
  // src/helpers/safePath.ts
9
9
  import { basename, dirname, isAbsolute, join, relative, sep } from "path";
@@ -100,4 +100,3 @@ export {
100
100
  realpath2 as realpath,
101
101
  realProjectRoot
102
102
  };
103
- //# sourceMappingURL=chunk-DTKK7TKL.js.map
@@ -48,4 +48,3 @@ export {
48
48
  getElementScreenshotClip,
49
49
  clearElementScreenshotIsolation
50
50
  };
51
- //# sourceMappingURL=chunk-IMG2GSY6.js.map
@@ -581,4 +581,3 @@ export {
581
581
  createStudioManualEditsRenderBodyScript,
582
582
  createStudioPositionSeekReapplyScript
583
583
  };
584
- //# sourceMappingURL=chunk-6XMC64FJ.js.map
@@ -27,4 +27,3 @@ export {
27
27
  findUnsafeMutationValues,
28
28
  findUnsafeDomPatchValues
29
29
  };
30
- //# sourceMappingURL=chunk-X62ASOGO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveWithinProject
3
- } from "./chunk-DTKK7TKL.js";
3
+ } from "./chunk-M62HDRLX.js";
4
4
 
5
5
  // src/helpers/loudness.ts
6
6
  import { execFile } from "child_process";
@@ -269,7 +269,7 @@ function audioNormalizationPlan(referenceTrack, targetTrack) {
269
269
  const wantedGainDb = referenceLufs - targetTrack.integratedLufs;
270
270
  if (wantedGainDb > MAX_AUDIO_GAIN_DB + 1e-9) {
271
271
  throw new Error(
272
- `Matching #${targetTrack.id} needs ${wantedGainDb.toFixed(1)} dB, beyond the +${MAX_AUDIO_GAIN_DB} dB authoring ceiling. A gap this large belongs in the source file, not the mixer \u2014 mixer gain raises the noise floor with the signal. Normalize ${targetTrack.id}'s asset offline (e.g. ffmpeg loudnorm), or lower #${referenceTrack.id} instead.`
272
+ `Matching #${targetTrack.id} needs ${wantedGainDb.toFixed(1)} dB, beyond the +${MAX_AUDIO_GAIN_DB} dB authoring ceiling. A gap this large belongs in the source file, not the mixer: mixer gain raises the noise floor with the signal. Normalize ${targetTrack.id}'s asset offline (e.g. ffmpeg loudnorm), or lower #${referenceTrack.id} instead.`
273
273
  );
274
274
  }
275
275
  const volume = 10 ** (wantedGainDb / 20);
@@ -381,4 +381,3 @@ export {
381
381
  NORMALIZE_TRUE_PEAK_CEILING_DBFS,
382
382
  absoluteLoudnessPlan
383
383
  };
384
- //# sourceMappingURL=chunk-32IH7WBY.js.map
@@ -2,12 +2,12 @@ import {
2
2
  PROXY_VARIANT_CONFIG,
3
3
  probeFirstFrameColour,
4
4
  probeMediaMetadata
5
- } from "./chunk-RN33UALN.js";
5
+ } from "./chunk-EJC7TX3O.js";
6
6
  import {
7
7
  mkdirWithinProject,
8
8
  realProjectRoot,
9
9
  realpath
10
- } from "./chunk-DTKK7TKL.js";
10
+ } from "./chunk-M62HDRLX.js";
11
11
 
12
12
  // src/helpers/proxyTranscoder.ts
13
13
  import { spawn } from "child_process";
@@ -148,8 +148,9 @@ var ProxyTranscodeError = class extends Error {
148
148
  }
149
149
  };
150
150
  var FfmpegUnavailableError = class extends ProxyTranscodeError {
151
- constructor() {
152
- super("ffmpeg binary not found", null, "");
151
+ constructor(message = "ffmpeg binary not found", stderrTail = "") {
152
+ super(message, null, stderrTail);
153
+ this.name = "FfmpegUnavailableError";
153
154
  }
154
155
  };
155
156
  var FfmpegMissingFilterError = class extends ProxyTranscodeError {
@@ -229,10 +230,11 @@ function getCanonicalProxyCachePath(source, variant, box) {
229
230
  `${key}${PROXY_VARIANT_CONFIG[variant].extension}`
230
231
  );
231
232
  }
232
- function getProxyCachePath(projectDir, absoluteSourcePath, variant = "h264") {
233
+ function getProxyCachePath(projectDir, absoluteSourcePath, variant = "h264", box) {
233
234
  return getCanonicalProxyCachePath(
234
235
  canonicalizeProxySource(projectDir, absoluteSourcePath),
235
- variant
236
+ variant,
237
+ box
236
238
  );
237
239
  }
238
240
  var ProxyDroppedError = class extends ProxyTranscodeError {
@@ -356,6 +358,13 @@ function proxyScaleFilter(box) {
356
358
  const side = (d) => `min(trunc(${d}/2)*2\\,ceil(${d}*${factor}/2)*2)`;
357
359
  return `scale=${side("iw")}:${side("ih")}`;
358
360
  }
361
+ var STDERR_ERROR_LINE = /error|invalid|denied|no space|not found|unknown/i;
362
+ function stderrReason(stderrTail) {
363
+ const lines = stderrTail.split("\n").map((line2) => line2.trim()).filter(Boolean);
364
+ const errorLines = lines.filter((line2) => STDERR_ERROR_LINE.test(line2));
365
+ const line = errorLines.at(-1) ?? lines.at(-1);
366
+ return line ? `: ${line.replace(/[.!]+$/, "")}` : "";
367
+ }
359
368
  async function runFfmpeg(sourcePath, outputPath, variant, box) {
360
369
  const metadata = await probeMediaMetadata(sourcePath);
361
370
  const ffmpegPath = findFfBinary("ffmpeg", { configuredMustExist: true });
@@ -438,7 +447,7 @@ async function runFfmpeg(sourcePath, outputPath, variant, box) {
438
447
  stderrTail = (stderrTail + chunk.toString()).slice(-STDERR_TAIL_MAX_CHARS);
439
448
  });
440
449
  proc.on("error", (err) => {
441
- reject(new ProxyTranscodeError(`failed to spawn ffmpeg: ${err.message}`, null, stderrTail));
450
+ reject(new FfmpegUnavailableError(`failed to spawn ffmpeg: ${err.message}`, stderrTail));
442
451
  });
443
452
  proc.on("close", (code, signal) => {
444
453
  if (code === 0) {
@@ -452,7 +461,13 @@ async function runFfmpeg(sourcePath, outputPath, variant, box) {
452
461
  )
453
462
  );
454
463
  } else {
455
- reject(new ProxyTranscodeError(`ffmpeg exited with code ${code}`, code, stderrTail));
464
+ reject(
465
+ new ProxyTranscodeError(
466
+ `ffmpeg exited with code ${code}${stderrReason(stderrTail)}`,
467
+ code,
468
+ stderrTail
469
+ )
470
+ );
456
471
  }
457
472
  });
458
473
  });
@@ -528,6 +543,25 @@ async function resolveProxy(projectDir, absoluteSourcePath, variant = "h264", bo
528
543
  if (options.priority) prioritize(entry.job);
529
544
  return joinJob(entry.promise, entry.job, options.signal);
530
545
  }
546
+ async function resolveProxies(projectDir, sources) {
547
+ const results = [];
548
+ let next = 0;
549
+ const worker = async () => {
550
+ for (let index = next++; index < sources.length; index = next++) {
551
+ const { sourcePath, variant } = sources[index];
552
+ results[index] = await waitForProxy(
553
+ resolveProxy(projectDir, sourcePath, variant),
554
+ TRANSCODE_TIMEOUT_MS
555
+ ).then(
556
+ (value) => ({ status: "fulfilled", value }),
557
+ (reason) => ({ status: "rejected", reason })
558
+ );
559
+ }
560
+ };
561
+ const workers = Math.min(MAX_CONCURRENT_TRANSCODES, sources.length);
562
+ await Promise.all(Array.from({ length: workers }, worker));
563
+ return results;
564
+ }
531
565
  function joinJob(promise, job, signal) {
532
566
  job.callers++;
533
567
  if (!signal) return promise;
@@ -549,6 +583,7 @@ export {
549
583
  PROXY_PENDING_RETRY_AFTER_SECONDS,
550
584
  DEFAULT_PROXY_WAIT_TIMEOUT_MS,
551
585
  ProxyTranscodeError,
586
+ FfmpegUnavailableError,
552
587
  FfmpegMissingFilterError,
553
588
  ProxyCapacityError,
554
589
  ProxySourceOutsideProjectError,
@@ -557,6 +592,6 @@ export {
557
592
  getProxyCachePath,
558
593
  clearFailedTranscodesForTest,
559
594
  proxyActivityMark,
560
- resolveProxy
595
+ resolveProxy,
596
+ resolveProxies
561
597
  };
562
- //# sourceMappingURL=chunk-AZBGTB3N.js.map
@@ -2,7 +2,7 @@ import {
2
2
  isSafePath,
3
3
  mkdirWithinProject,
4
4
  realFilePath
5
- } from "./chunk-DTKK7TKL.js";
5
+ } from "./chunk-M62HDRLX.js";
6
6
 
7
7
  // src/history/projectHistory.ts
8
8
  import { randomUUID as randomUUID6 } from "crypto";
@@ -293,6 +293,11 @@ import { copyFile, mkdir, readdir, readFile, rename, rm, stat } from "fs/promise
293
293
  import { dirname, join } from "path";
294
294
  import { atomicTempPath } from "@hyperframes/core/atomic-file";
295
295
  var BLOB_HASH = /^[0-9a-f]{64}$/;
296
+ function blobPath(dir, hash) {
297
+ if (!BLOB_HASH.test(hash)) throw new Error("That is not a history blob.");
298
+ return join(dir, hash.slice(0, 2), hash);
299
+ }
300
+ var readBlob = (dir, hash) => readFile(blobPath(dir, hash));
296
301
  async function hashFile(path) {
297
302
  const hash = createHash3("sha256");
298
303
  for await (const chunk of createReadStream(path)) hash.update(chunk);
@@ -316,10 +321,7 @@ async function openBlobStore(dir) {
316
321
  for (const shard of await readdir(dir))
317
322
  for (const hash of await readdir(join(dir, shard)).catch(() => []))
318
323
  sizes.set(hash, (await stat(join(dir, shard, hash))).size);
319
- const pathOf = (hash) => {
320
- if (!BLOB_HASH.test(hash)) throw new Error("That is not a history blob.");
321
- return join(dir, hash.slice(0, 2), hash);
322
- };
324
+ const pathOf = (hash) => blobPath(dir, hash);
323
325
  let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
324
326
  return {
325
327
  async put(absPath) {
@@ -339,7 +341,7 @@ async function openBlobStore(dir) {
339
341
  return hash;
340
342
  },
341
343
  has: (hash) => sizes.has(hash),
342
- read: async (hash) => readFile(pathOf(hash)),
344
+ read: async (hash) => readBlob(dir, hash),
343
345
  writeTo: async (hash, absPath, beforeReplace) => cloneOrCopy(pathOf(hash), absPath, beforeReplace),
344
346
  bytes: () => total,
345
347
  size: (hash) => sizes.get(hash) ?? 0,
@@ -808,6 +810,19 @@ function isHistoryPath(path) {
808
810
  if (KEPT_HIDDEN_PATHS.has(path)) return true;
809
811
  return !path.split("/").some((segment) => segment.startsWith("."));
810
812
  }
813
+ var logFileIn = (home) => join5(home, "log.jsonl");
814
+ function listOf(log) {
815
+ const undone = undoneIds(log.entries);
816
+ return log.entries.map((entry) => ({
817
+ ...entry,
818
+ pinned: log.pins.has(entry.id),
819
+ undone: undone.has(entry.id)
820
+ }));
821
+ }
822
+ function peekOf(log, point) {
823
+ const files = manifestAt(log, point);
824
+ return files && Object.fromEntries(files);
825
+ }
811
826
  function withoutHiddenPaths(log) {
812
827
  for (const path of log.baseline.keys()) if (!isHistoryPath(path)) log.baseline.delete(path);
813
828
  for (const entry of log.entries)
@@ -914,7 +929,7 @@ var Engine = class {
914
929
  return this.foldsCase ? path.toLowerCase() : path;
915
930
  }
916
931
  get logFile() {
917
- return join5(this.home, "log.jsonl");
932
+ return logFileIn(this.home);
918
933
  }
919
934
  now() {
920
935
  return (this.options.now ?? Date.now)();
@@ -1584,12 +1599,7 @@ var Engine = class {
1584
1599
  },
1585
1600
  list: () => {
1586
1601
  this.assertOpen();
1587
- const undone = undoneIds(this.log.entries);
1588
- return this.log.entries.map((entry) => ({
1589
- ...entry,
1590
- pinned: this.log.pins.has(entry.id),
1591
- undone: undone.has(entry.id)
1592
- }));
1602
+ return listOf(this.log);
1593
1603
  },
1594
1604
  step: (direction, who, { writeToken } = {}) => this.operation(writeToken, async () => {
1595
1605
  const target = this.next(direction, who);
@@ -1602,8 +1612,7 @@ var Engine = class {
1602
1612
  ),
1603
1613
  peek: (point) => {
1604
1614
  this.assertOpen();
1605
- const files = manifestAt(this.log, point);
1606
- return files && Object.fromEntries(files);
1615
+ return peekOf(this.log, point);
1607
1616
  },
1608
1617
  checkout: (entryId, side, emptyDir) => this.queue(async () => {
1609
1618
  this.entry(entryId);
@@ -1699,6 +1708,22 @@ async function openProjectHistory(options) {
1699
1708
  throw error;
1700
1709
  }
1701
1710
  }
1711
+ function readProjectHistory(options) {
1712
+ const dir = resolve3(options.projectDir);
1713
+ const id = readId(dir);
1714
+ const home = id && isRecordedFolder(join5(options.historyRoot, id), statSync3(dir)) ? join5(options.historyRoot, id) : null;
1715
+ const read = home && readLog(logFileIn(home), () => {
1716
+ });
1717
+ const log = withoutHiddenPaths(read || { baseline: /* @__PURE__ */ new Map(), entries: [], pins: /* @__PURE__ */ new Set() });
1718
+ return {
1719
+ list: () => listOf(log),
1720
+ peek: (point) => peekOf(log, point),
1721
+ readBlob: async (hash) => {
1722
+ if (!home) throw new Error("That is not a history blob.");
1723
+ return readBlob(join5(home, "blobs"), hash);
1724
+ }
1725
+ };
1726
+ }
1702
1727
 
1703
1728
  // src/history/historyCache.ts
1704
1729
  function historyCache(open) {
@@ -1748,6 +1773,6 @@ export {
1748
1773
  UNDO_MODES,
1749
1774
  HistoryClosedError,
1750
1775
  openProjectHistory,
1776
+ readProjectHistory,
1751
1777
  historyCache
1752
1778
  };
1753
- //# sourceMappingURL=chunk-K3H6HTVC.js.map
@@ -330,7 +330,7 @@ function splitElementInHtml(source, target, splitTime, newId, fallbackTiming) {
330
330
  clone.removeAttribute("data-hf-id");
331
331
  for (const node of clone.querySelectorAll("[data-hf-id]")) node.removeAttribute("data-hf-id");
332
332
  setElementDuration(clone, splitTime, secondDuration, fallbackTiming?.track);
333
- const playbackStartAttr = el.hasAttribute("data-playback-start") ? "data-playback-start" : el.hasAttribute("data-media-start") ? "data-media-start" : fallbackTiming?.stampPlaybackStart ? "data-playback-start" : el.matches("audio, video") ? "data-media-start" : null;
333
+ const playbackStartAttr = el.hasAttribute("data-playback-start") ? "data-playback-start" : el.hasAttribute("data-media-start") ? "data-media-start" : el.matches("[data-composition-src], [data-composition-id]") ? "data-playback-start" : el.matches("audio, video") ? "data-media-start" : null;
334
334
  if (playbackStartAttr) {
335
335
  const readAttr = (name) => el.getAttribute(name);
336
336
  const authoredTrim = el.getAttribute(playbackStartAttr);
@@ -522,4 +522,3 @@ export {
522
522
  unwrapElementsFromHtml,
523
523
  relinkSplitHalvesInHtml
524
524
  };
525
- //# sourceMappingURL=chunk-JJ4N3PXT.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  PROXY_PARAMS_VERSION,
3
3
  resolveProxy
4
- } from "./chunk-AZBGTB3N.js";
4
+ } from "./chunk-XKBQOQFZ.js";
5
5
  import {
6
6
  createMediaCodecProbeCache,
7
7
  proxyVariantFor,
8
8
  recordProxyPrewarm,
9
9
  scanProjectMediaCodecMap,
10
10
  shouldPrewarmProxy
11
- } from "./chunk-RN33UALN.js";
11
+ } from "./chunk-EJC7TX3O.js";
12
12
 
13
13
  // src/helpers/mediaProxyPreview.ts
14
14
  import { resolve } from "path";
@@ -64,4 +64,3 @@ export {
64
64
  injectMediaCodecMapIntoHtml,
65
65
  injectMediaCodecMap
66
66
  };
67
- //# sourceMappingURL=chunk-VE2AOX4K.js.map
@@ -1,3 +1,2 @@
1
1
  // src/helpers/draftMarkers.ts
2
2
  export * from "@hyperframes/core/editing/draft-markers";
3
- //# sourceMappingURL=draftMarkers.js.map
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  findUnsafeDomPatchValues,
3
3
  findUnsafeMutationValues
4
- } from "../chunk-X62ASOGO.js";
4
+ } from "../chunk-UEEXAVOA.js";
5
5
  export {
6
6
  findUnsafeDomPatchValues,
7
7
  findUnsafeMutationValues
8
8
  };
9
- //# sourceMappingURL=finiteMutation.js.map
@@ -2,13 +2,12 @@ import {
2
2
  isCompositionSource,
3
3
  stampFileHfIds,
4
4
  stampProjectHfIds
5
- } from "../chunk-DG2VOIGR.js";
6
- import "../chunk-DTKK7TKL.js";
7
- import "../chunk-6XMC64FJ.js";
8
- import "../chunk-4ETS2LXI.js";
5
+ } from "../chunk-3RUFN2CK.js";
6
+ import "../chunk-M62HDRLX.js";
7
+ import "../chunk-SVQFE44C.js";
8
+ import "../chunk-L3HJVTQE.js";
9
9
  export {
10
10
  isCompositionSource,
11
11
  stampFileHfIds,
12
12
  stampProjectHfIds
13
13
  };
14
- //# sourceMappingURL=hfIdPersist.js.map
@@ -11,10 +11,10 @@ import {
11
11
  requiredFfmpeg,
12
12
  resolveLocalAudioPath,
13
13
  updateAudioVolume
14
- } from "../chunk-32IH7WBY.js";
15
- import "../chunk-DTKK7TKL.js";
16
- import "../chunk-6XMC64FJ.js";
17
- import "../chunk-4ETS2LXI.js";
14
+ } from "../chunk-VMT4OC5B.js";
15
+ import "../chunk-M62HDRLX.js";
16
+ import "../chunk-SVQFE44C.js";
17
+ import "../chunk-L3HJVTQE.js";
18
18
  export {
19
19
  DEFAULT_TARGET_LUFS,
20
20
  NORMALIZE_TRUE_PEAK_CEILING_DBFS,
@@ -29,4 +29,3 @@ export {
29
29
  resolveLocalAudioPath,
30
30
  updateAudioVolume
31
31
  };
32
- //# sourceMappingURL=loudness.js.map
@@ -2,10 +2,9 @@ import {
2
2
  STUDIO_MANUAL_EDITS_PATH,
3
3
  createStudioManualEditsRenderBodyScript,
4
4
  createStudioPositionSeekReapplyScript
5
- } from "../chunk-6XMC64FJ.js";
5
+ } from "../chunk-SVQFE44C.js";
6
6
  export {
7
7
  STUDIO_MANUAL_EDITS_PATH,
8
8
  createStudioManualEditsRenderBodyScript,
9
9
  createStudioPositionSeekReapplyScript
10
10
  };
11
- //# sourceMappingURL=manualEditsRenderScript.js.map
@@ -13,10 +13,10 @@ import {
13
13
  resolveProxyVariantRequest,
14
14
  scanProjectMediaCodecMap,
15
15
  shouldPrewarmProxy
16
- } from "../chunk-RN33UALN.js";
17
- import "../chunk-DTKK7TKL.js";
18
- import "../chunk-6XMC64FJ.js";
19
- import "../chunk-4ETS2LXI.js";
16
+ } from "../chunk-EJC7TX3O.js";
17
+ import "../chunk-M62HDRLX.js";
18
+ import "../chunk-SVQFE44C.js";
19
+ import "../chunk-L3HJVTQE.js";
20
20
  export {
21
21
  BROWSER_HOSTILE_CODECS,
22
22
  PROXY_VARIANT_CONFIG,
@@ -33,4 +33,3 @@ export {
33
33
  scanProjectMediaCodecMap,
34
34
  shouldPrewarmProxy
35
35
  };
36
- //# sourceMappingURL=mediaCodecMap.js.map
@@ -1,6 +1,6 @@
1
1
  import '@hyperframes/core';
2
- export { a as PreviewApiAdapter, P as PreviewDocumentStore, i as injectMediaCodecMap, f as injectMediaCodecMapIntoHtml, g as isAutoProxyEnabled, p as proxyEtagSalt, r as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-ozy7FkMP.js';
2
+ export { a as PreviewApiAdapter, P as PreviewDocumentStore, i as injectMediaCodecMap, f as injectMediaCodecMapIntoHtml, g as isAutoProxyEnabled, p as proxyEtagSalt, r as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-BR7yXz2M.js';
3
3
  import './mediaCodecMap.js';
4
4
  import '@hyperframes/parsers';
5
5
  import '@hyperframes/core/compiler';
6
- import '../projectHistory-Cm8Mdmmv.js';
6
+ import '../projectHistory-CyTVYz2y.js';
@@ -4,12 +4,12 @@ import {
4
4
  isAutoProxyEnabled,
5
5
  proxyEtagSalt,
6
6
  resolvePreviewMediaCodecProbeCache
7
- } from "../chunk-VE2AOX4K.js";
8
- import "../chunk-AZBGTB3N.js";
9
- import "../chunk-RN33UALN.js";
10
- import "../chunk-DTKK7TKL.js";
11
- import "../chunk-6XMC64FJ.js";
12
- import "../chunk-4ETS2LXI.js";
7
+ } from "../chunk-ZNRTEXK2.js";
8
+ import "../chunk-XKBQOQFZ.js";
9
+ import "../chunk-EJC7TX3O.js";
10
+ import "../chunk-M62HDRLX.js";
11
+ import "../chunk-SVQFE44C.js";
12
+ import "../chunk-L3HJVTQE.js";
13
13
  export {
14
14
  injectMediaCodecMap,
15
15
  injectMediaCodecMapIntoHtml,
@@ -17,4 +17,3 @@ export {
17
17
  proxyEtagSalt,
18
18
  resolvePreviewMediaCodecProbeCache
19
19
  };
20
- //# sourceMappingURL=mediaProxyPreview.js.map
@@ -21,6 +21,12 @@ declare class ProxyTranscodeError extends Error {
21
21
  readonly stderrTail: string;
22
22
  constructor(message: string, exitCode: number | null, stderrTail: string);
23
23
  }
24
+ /** ffmpeg is missing or cannot start — an environment condition, not a per-source
25
+ * failure, so the negative cache below keeps it only briefly
26
+ * (installing ffmpeg mid-session must recover without a server restart). */
27
+ declare class FfmpegUnavailableError extends ProxyTranscodeError {
28
+ constructor(message?: string, stderrTail?: string);
29
+ }
24
30
  declare class FfmpegMissingFilterError extends ProxyTranscodeError {
25
31
  constructor();
26
32
  }
@@ -38,10 +44,10 @@ declare class ProxyWaitTimeoutError extends ProxyTranscodeError {
38
44
  declare function waitForProxy<T>(promise: Promise<T>, timeoutMs?: number): Promise<T>;
39
45
  /**
40
46
  * Computes the absolute path a proxy for this source would live at, without
41
- * transcoding anything. Route handlers use this to check cache state (e.g.
42
- * for ETag/If-None-Match) before deciding whether to await a transcode.
47
+ * transcoding anything, so a host can check cache state. Pass the request's
48
+ * preview box (`hf-proxy-box`) to name a boxed copy.
43
49
  */
44
- declare function getProxyCachePath(projectDir: string, absoluteSourcePath: string, variant?: ProxyVariant): string;
50
+ declare function getProxyCachePath(projectDir: string, absoluteSourcePath: string, variant?: ProxyVariant, box?: PreviewProxyBox): string;
45
51
  /** Test hook: forget remembered transcode failures (module state persists
46
52
  * across tests that don't reload the module). */
47
53
  declare function clearFailedTranscodesForTest(): void;
@@ -60,9 +66,15 @@ declare function proxyActivityMark(projectDir: string): string | null;
60
66
  * lets this caller leave (see the detachment note at the top of this file).
61
67
  */
62
68
  declare function resolveProxy(projectDir: string, absoluteSourcePath: string, variant?: ProxyVariant, box?: PreviewProxyBox, options?: ResolveProxyOptions): Promise<string>;
69
+ /** Batch resolve for check and publish: at most MAX_CONCURRENT_TRANSCODES of its own requests in
70
+ * flight (other callers can still fill the queue); each waits at most TRANSCODE_TIMEOUT_MS. */
71
+ declare function resolveProxies(projectDir: string, sources: ReadonlyArray<{
72
+ sourcePath: string;
73
+ variant: ProxyVariant;
74
+ }>): Promise<PromiseSettledResult<string>[]>;
63
75
  interface ResolveProxyOptions {
64
76
  priority?: boolean;
65
77
  signal?: AbortSignal;
66
78
  }
67
79
 
68
- export { CACHE_DIR_NAME, DEFAULT_PROXY_WAIT_TIMEOUT_MS, FfmpegMissingFilterError, PROXY_PARAMS_VERSION, PROXY_PENDING_RETRY_AFTER_SECONDS, ProxyCapacityError, ProxySourceOutsideProjectError, ProxyTranscodeError, ProxyWaitTimeoutError, type ResolveProxyOptions, TRANSCODE_TIMEOUT_MS, clearFailedTranscodesForTest, getProxyCachePath, proxyActivityMark, resolveProxy, waitForProxy };
80
+ export { CACHE_DIR_NAME, DEFAULT_PROXY_WAIT_TIMEOUT_MS, FfmpegMissingFilterError, FfmpegUnavailableError, PROXY_PARAMS_VERSION, PROXY_PENDING_RETRY_AFTER_SECONDS, ProxyCapacityError, ProxySourceOutsideProjectError, ProxyTranscodeError, ProxyWaitTimeoutError, type ResolveProxyOptions, TRANSCODE_TIMEOUT_MS, clearFailedTranscodesForTest, getProxyCachePath, proxyActivityMark, resolveProxies, resolveProxy, waitForProxy };
@@ -2,6 +2,7 @@ import {
2
2
  CACHE_DIR_NAME,
3
3
  DEFAULT_PROXY_WAIT_TIMEOUT_MS,
4
4
  FfmpegMissingFilterError,
5
+ FfmpegUnavailableError,
5
6
  PROXY_PARAMS_VERSION,
6
7
  PROXY_PENDING_RETRY_AFTER_SECONDS,
7
8
  ProxyCapacityError,
@@ -12,17 +13,19 @@ import {
12
13
  clearFailedTranscodesForTest,
13
14
  getProxyCachePath,
14
15
  proxyActivityMark,
16
+ resolveProxies,
15
17
  resolveProxy,
16
18
  waitForProxy
17
- } from "../chunk-AZBGTB3N.js";
18
- import "../chunk-RN33UALN.js";
19
- import "../chunk-DTKK7TKL.js";
20
- import "../chunk-6XMC64FJ.js";
21
- import "../chunk-4ETS2LXI.js";
19
+ } from "../chunk-XKBQOQFZ.js";
20
+ import "../chunk-EJC7TX3O.js";
21
+ import "../chunk-M62HDRLX.js";
22
+ import "../chunk-SVQFE44C.js";
23
+ import "../chunk-L3HJVTQE.js";
22
24
  export {
23
25
  CACHE_DIR_NAME,
24
26
  DEFAULT_PROXY_WAIT_TIMEOUT_MS,
25
27
  FfmpegMissingFilterError,
28
+ FfmpegUnavailableError,
26
29
  PROXY_PARAMS_VERSION,
27
30
  PROXY_PENDING_RETRY_AFTER_SECONDS,
28
31
  ProxyCapacityError,
@@ -33,7 +36,7 @@ export {
33
36
  clearFailedTranscodesForTest,
34
37
  getProxyCachePath,
35
38
  proxyActivityMark,
39
+ resolveProxies,
36
40
  resolveProxy,
37
41
  waitForProxy
38
42
  };
39
- //# sourceMappingURL=proxyTranscoder.js.map
@@ -12,9 +12,9 @@ import {
12
12
  realpath,
13
13
  resolveWithinProject,
14
14
  walkDir
15
- } from "../chunk-DTKK7TKL.js";
16
- import "../chunk-6XMC64FJ.js";
17
- import "../chunk-4ETS2LXI.js";
15
+ } from "../chunk-M62HDRLX.js";
16
+ import "../chunk-SVQFE44C.js";
17
+ import "../chunk-L3HJVTQE.js";
18
18
  export {
19
19
  folderGone,
20
20
  isInHiddenOrVendorDir,
@@ -30,4 +30,3 @@ export {
30
30
  resolveWithinProject,
31
31
  walkDir
32
32
  };
33
- //# sourceMappingURL=safePath.js.map
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  clearElementScreenshotIsolation,
3
3
  getElementScreenshotClip
4
- } from "../chunk-IMG2GSY6.js";
4
+ } from "../chunk-RGC6DKVM.js";
5
5
  export {
6
6
  clearElementScreenshotIsolation,
7
7
  getElementScreenshotClip
8
8
  };
9
- //# sourceMappingURL=screenshotClip.js.map
@@ -44,7 +44,6 @@ declare function splitElementInHtml(source: string, target: SourceMutationTarget
44
44
  duration: number;
45
45
  playbackStart?: number;
46
46
  playbackRate?: number;
47
- stampPlaybackStart?: boolean;
48
47
  track?: number;
49
48
  }): SplitElementResult;
50
49
  interface WrapElementsResult {
@@ -13,7 +13,7 @@ import {
13
13
  splitElementInHtml,
14
14
  unwrapElementsFromHtml,
15
15
  wrapElementsInHtml
16
- } from "../chunk-JJ4N3PXT.js";
16
+ } from "../chunk-Z5UJMFO4.js";
17
17
  export {
18
18
  dedupeClonedCompositionId,
19
19
  findTargetElement,
@@ -30,4 +30,3 @@ export {
30
30
  unwrapElementsFromHtml,
31
31
  wrapElementsInHtml
32
32
  };
33
- //# sourceMappingURL=sourceMutation.js.map
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  STUDIO_MOTION_PATH,
3
3
  createStudioMotionRenderBodyScript
4
- } from "../chunk-4ETS2LXI.js";
4
+ } from "../chunk-L3HJVTQE.js";
5
5
  export {
6
6
  STUDIO_MOTION_PATH,
7
7
  createStudioMotionRenderBodyScript
8
8
  };
9
- //# sourceMappingURL=studioMotionRenderScript.js.map
@@ -1,5 +1,5 @@
1
- import { P as ProjectHistory } from '../projectHistory-Cm8Mdmmv.js';
2
- export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, S as HISTORY_START, H as HistoryClosedError, a as HistoryEntry, b as HistoryEntrySide, c as HistoryFileChange, d as HistoryListItem, e as HistoryResult, f as HistoryWho, g as HistoryWindow, M as MAX_WINDOW_IDLE_MS, h as ProjectHistoryOptions, U as UNDO_MODES, i as UndoMode, o as openProjectHistory } from '../projectHistory-Cm8Mdmmv.js';
1
+ import { P as ProjectHistory } from '../projectHistory-CyTVYz2y.js';
2
+ export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, S as HISTORY_START, H as HistoryClosedError, a as HistoryEntry, b as HistoryEntrySide, c as HistoryFileChange, d as HistoryListItem, e as HistoryResult, f as HistoryWho, g as HistoryWindow, M as MAX_WINDOW_IDLE_MS, h as ProjectHistoryOptions, i as ProjectHistoryView, U as UNDO_MODES, j as UndoMode, o as openProjectHistory, r as readProjectHistory } from '../projectHistory-CyTVYz2y.js';
3
3
 
4
4
  declare class HistoryBusyError extends Error {
5
5
  readonly pid: number;