hyperframes 0.8.113 → 0.8.114
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-ILIGSLV4.js → add-KCBOVKEU.js} +5 -5
- package/dist/{asset-OFDEIAGM.js → asset-AJ4ZZE3K.js} +2 -2
- package/dist/{auth-5JDDEX2M.js → auth-PSEHAWSA.js} +1 -1
- package/dist/{autoUpdate-JXVZVJCV.js → autoUpdate-E32YLKFZ.js} +2 -2
- package/dist/{backgroundChecks-BBWGY3V6.js → backgroundChecks-FNHBA7YI.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{beats-YEYVQMX6.js → beats-F67KZC3V.js} +4 -4
- package/dist/{benchmark-J2V46VWI.js → benchmark-CGD6CPRK.js} +5 -5
- package/dist/{browser-XBWASLD2.js → browser-FPX3Z2AR.js} +3 -3
- package/dist/{catalog-3QDMTDK2.js → catalog-4BZX7MQQ.js} +5 -5
- package/dist/{check-O3RR4NWI.js → check-IO3HWLLU.js} +12 -12
- package/dist/{checkBrowser-K36DAG4S.js → checkBrowser-JTQ7ABCL.js} +10 -10
- package/dist/{chunk-VIJ35BJ6.js → chunk-3SH322X7.js} +3 -3
- package/dist/{chunk-FXHVADV6.js → chunk-6U3K3U62.js} +1 -1
- package/dist/{chunk-L5SYYW2P.js → chunk-752X6G7T.js} +1 -1
- package/dist/{chunk-R4NWAW35.js → chunk-7ZR25WGW.js} +2 -2
- package/dist/{chunk-2DBYGR4N.js → chunk-BORVRAHJ.js} +3 -3
- package/dist/{chunk-ZZIXIOK2.js → chunk-HGMKPPGD.js} +2 -2
- package/dist/{chunk-DDK22K3I.js → chunk-IPXPSCWV.js} +1 -1
- package/dist/{chunk-7CGIICLA.js → chunk-JH7ZJRDL.js} +1 -1
- package/dist/{chunk-OEA2J2TF.js → chunk-LDSWUYZB.js} +1 -1
- package/dist/{chunk-XZM2I47O.js → chunk-LSSIYIXI.js} +2 -2
- package/dist/{chunk-VTP4VSRP.js → chunk-LYNBNESS.js} +72 -5
- package/dist/{chunk-3XPZJUKM.js → chunk-MLLBZR2U.js} +2 -2
- package/dist/{chunk-EMZF2TPA.js → chunk-MR6BQLGM.js} +2 -2
- package/dist/{chunk-ZYSS3JED.js → chunk-MST5JBOR.js} +1 -1
- package/dist/{chunk-HYXL3VJA.js → chunk-RKSRXPKV.js} +2 -2
- package/dist/{chunk-FW7K32YT.js → chunk-SSM2TJYE.js} +1 -1
- package/dist/{chunk-U4VSY56O.js → chunk-SYQOD3W7.js} +1 -1
- package/dist/{chunk-IRJBTYJF.js → chunk-WAS5VEA4.js} +1 -1
- package/dist/{clean-RPB34TT6.js → clean-MCL76KQH.js} +4 -4
- package/dist/cli.js +44 -44
- package/dist/{cloud-QECFFPKC.js → cloud-444K6HIK.js} +4 -4
- package/dist/{compare-PF6WHQ4T.js → compare-CGNTCOR2.js} +7 -7
- package/dist/{component-4ENCNLED.js → component-HTXLOIHR.js} +3 -3
- package/dist/{compositions-5UA33RSG.js → compositions-KK46F5AC.js} +5 -5
- package/dist/{delete-SARS5LIK.js → delete-SSRZKKWQ.js} +2 -2
- package/dist/{doctor-TSAQGYP4.js → doctor-IIOX25KM.js} +3 -3
- package/dist/{events-3HUO73ZE.js → events-DCUZBRW6.js} +3 -3
- package/dist/{events-SZ5NWYWD.js → events-TYMMAKHX.js} +2 -2
- package/dist/{feedback-42OTOFC6.js → feedback-RIAGW6LG.js} +4 -4
- package/dist/{figma-RYNFCYXB.js → figma-VBOUGJNX.js} +3 -3
- package/dist/fontLocalizeCli.js +1 -1
- package/dist/{get-IRHLG5OQ.js → get-LT6NUGNR.js} +2 -2
- package/dist/{grade-compare-KGJP5HV7.js → grade-compare-WWYQSQUM.js} +7 -7
- package/dist/{help-C5HS56RZ.js → help-55ZV2M5U.js} +1 -1
- package/dist/{history-DFJNDM2T.js → history-QCY7CO4P.js} +6 -6
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-26GTDTKN.js → info-ROTXHRAH.js} +5 -5
- package/dist/{init-RXA6NI73.js → init-5XFOWGGN.js} +6 -6
- package/dist/{inspect-2S5GAZYC.js → inspect-3UF4VLTM.js} +9 -9
- package/dist/{keyframes-WBMAX7XZ.js → keyframes-OFZ6XNMC.js} +6 -6
- package/dist/{layout-ZRU7PXBG.js → layout-B4XF2734.js} +9 -9
- package/dist/{lint-ATVNZ6FG.js → lint-3YIJITTC.js} +6 -6
- package/dist/{list-E2GHYPCQ.js → list-276FF3QE.js} +2 -2
- package/dist/{login-LOC4KA7H.js → login-SA3MCAIS.js} +4 -4
- package/dist/{media-treatment-L43MVH2V.js → media-treatment-ICA5DWHS.js} +5 -5
- package/dist/{motionShot-BJ5CLYMN.js → motionShot-TQBDZZ4M.js} +1 -1
- package/dist/{normalize-audio-K33FKGAF.js → normalize-audio-URNASKUV.js} +4 -4
- package/dist/{play-PHHXYCQI.js → play-JYBAII35.js} +7 -7
- package/dist/{present-KBFK2YVB.js → present-WIEZRZET.js} +7 -7
- package/dist/{preview-T3E5TFDC.js → preview-YUPU646E.js} +19 -13
- package/dist/{render-H6RSJF2V.js → render-AX77WC3C.js} +5 -5
- package/dist/{render-OKNPNMFS.js → render-F3QVCKKA.js} +5 -5
- package/dist/{skills-O25ZTFTO.js → skills-M6ETUUH5.js} +5 -5
- package/dist/{skillsUpdateCheck-Y2V4OMMT.js → skillsUpdateCheck-UTX5LT5C.js} +3 -3
- package/dist/{snapshot-KGM2HZIC.js → snapshot-HMDAENTY.js} +123 -34
- package/dist/{staticProjectServer-OCE7GU5S.js → staticProjectServer-XDH5SQV6.js} +3 -3
- package/dist/studio/assets/{hyperframes-player-DzJbtQVO.js → hyperframes-player-aXNJKiIg.js} +1 -1
- package/dist/studio/assets/index-BYnsJnJV.css +1 -0
- package/dist/studio/assets/{index-n5FUn1xv.js → index-Bn2RJNTJ.js} +1 -1
- package/dist/studio/assets/{index-DgwDQK5G.js → index-C9N-DGjC.js} +1 -1
- package/dist/studio/assets/{index-DRhF3v4Z.js → index-Dz7doz9l.js} +199 -199
- package/dist/studio/index.d.ts +3 -3
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +1605 -1536
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/styles.css +1 -1
- package/dist/{studio-api-IEQ5BIHT.js → studio-api-E5WFZ7YK.js} +1 -1
- package/dist/{studioServer-LXJ34MGN.js → studioServer-C7GTHTRY.js} +5 -5
- package/dist/{telemetry-R3BPD6VK.js → telemetry-XH6D37RL.js} +3 -3
- package/dist/{timeline-N5UKVS2S.js → timeline-4RR7O6QW.js} +6 -6
- package/dist/{tokens-774UBF2R.js → tokens-MVTK3RPO.js} +2 -2
- package/dist/{transcribe-IP74EZLM.js → transcribe-I6WDPH7E.js} +3 -3
- package/dist/{updateCheck-EXHNAPKI.js → updateCheck-ELMPFCBF.js} +2 -2
- package/dist/{upgrade-A4M3O2F2.js → upgrade-6UAOGP4D.js} +2 -2
- package/dist/{validate-DV75GM6J.js → validate-ZMMGUMBD.js} +6 -6
- package/package.json +1 -1
- package/dist/studio/assets/index-DbfKVTId.css +0 -1
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
} from "./chunk-WMQNIQDJ.js";
|
|
10
10
|
import {
|
|
11
11
|
trackSkillsInstallSkipped
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-JH7ZJRDL.js";
|
|
13
|
+
import "./chunk-IPXPSCWV.js";
|
|
14
14
|
import {
|
|
15
15
|
diag
|
|
16
16
|
} from "./chunk-VWG7OQKU.js";
|
|
@@ -51,15 +51,15 @@ import {
|
|
|
51
51
|
isCoreSkill,
|
|
52
52
|
presentSkills,
|
|
53
53
|
pruneOrphanedLockEntries
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-6U3K3U62.js";
|
|
55
55
|
import {
|
|
56
56
|
withMeta
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-SYQOD3W7.js";
|
|
58
58
|
import "./chunk-K4WIOZFP.js";
|
|
59
59
|
import "./chunk-XUXGIA7H.js";
|
|
60
60
|
import "./chunk-WERLJGIC.js";
|
|
61
61
|
import "./chunk-ISN5GRYI.js";
|
|
62
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-MLLBZR2U.js";
|
|
63
63
|
import "./chunk-KNU5COPB.js";
|
|
64
64
|
import {
|
|
65
65
|
buildNpxCommand
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
printSkillsUpdateNotice,
|
|
10
10
|
refreshSkillsCache,
|
|
11
11
|
skillsCheckDue
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-6U3K3U62.js";
|
|
13
|
+
import "./chunk-SYQOD3W7.js";
|
|
14
14
|
import "./chunk-K4WIOZFP.js";
|
|
15
15
|
import "./chunk-XUXGIA7H.js";
|
|
16
16
|
import "./chunk-WERLJGIC.js";
|
|
17
17
|
import "./chunk-ISN5GRYI.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-MLLBZR2U.js";
|
|
19
19
|
import "./chunk-KNU5COPB.js";
|
|
20
20
|
import "./chunk-M2WBOQ2Q.js";
|
|
21
21
|
export {
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
} from "./chunk-KZI44OPA.js";
|
|
10
10
|
import {
|
|
11
11
|
serveStaticProjectHtml
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LDSWUYZB.js";
|
|
13
13
|
import "./chunk-XUHOIDKG.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-752X6G7T.js";
|
|
15
15
|
import "./chunk-X7MTZ4T2.js";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_ZOOM_SCALE,
|
|
@@ -26,14 +26,14 @@ import "./chunk-5Z63TBTX.js";
|
|
|
26
26
|
import "./chunk-262C25DQ.js";
|
|
27
27
|
import "./chunk-3IUSKIZW.js";
|
|
28
28
|
import "./chunk-YEIFI443.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-LYNBNESS.js";
|
|
30
30
|
import "./chunk-XFJXFNJF.js";
|
|
31
31
|
import "./chunk-WEATBQTR.js";
|
|
32
32
|
import "./chunk-GDJ74GHW.js";
|
|
33
33
|
import "./chunk-LMC46FK5.js";
|
|
34
34
|
import {
|
|
35
35
|
resolveProject
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WAS5VEA4.js";
|
|
37
37
|
import {
|
|
38
38
|
formatLintFindings
|
|
39
39
|
} from "./chunk-6CSYCFQV.js";
|
|
@@ -53,11 +53,12 @@ import "./chunk-AWDFDFI3.js";
|
|
|
53
53
|
import "./chunk-GMECXFAN.js";
|
|
54
54
|
import {
|
|
55
55
|
findFFmpeg,
|
|
56
|
+
findFFprobe,
|
|
56
57
|
getFFmpegInstallHint
|
|
57
58
|
} from "./chunk-TVCRUG2S.js";
|
|
58
59
|
import "./chunk-RDMAU7AJ.js";
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-JH7ZJRDL.js";
|
|
61
|
+
import "./chunk-IPXPSCWV.js";
|
|
61
62
|
import "./chunk-VWG7OQKU.js";
|
|
62
63
|
import {
|
|
63
64
|
c
|
|
@@ -92,7 +93,9 @@ import {
|
|
|
92
93
|
definitiveEntryMismatchComposition,
|
|
93
94
|
hasDefinitiveEntryMismatch
|
|
94
95
|
} from "./chunk-Q5X2B5WT.js";
|
|
95
|
-
import
|
|
96
|
+
import {
|
|
97
|
+
runCancellableProcess
|
|
98
|
+
} from "./chunk-LCSMOLGX.js";
|
|
96
99
|
import "./chunk-TWWSYAKJ.js";
|
|
97
100
|
import {
|
|
98
101
|
lintProject
|
|
@@ -106,7 +109,7 @@ import "./chunk-K4WIOZFP.js";
|
|
|
106
109
|
import "./chunk-XUXGIA7H.js";
|
|
107
110
|
import "./chunk-WERLJGIC.js";
|
|
108
111
|
import "./chunk-ISN5GRYI.js";
|
|
109
|
-
import "./chunk-
|
|
112
|
+
import "./chunk-MLLBZR2U.js";
|
|
110
113
|
import {
|
|
111
114
|
normalizeErrorMessage
|
|
112
115
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -195,35 +198,121 @@ async function recaptureSnapshotComposite(page) {
|
|
|
195
198
|
});
|
|
196
199
|
}
|
|
197
200
|
}
|
|
198
|
-
|
|
201
|
+
function containingSourceFrameIndex(timestamps, time) {
|
|
202
|
+
if (!Number.isFinite(time)) return -1;
|
|
203
|
+
const tolerance = 16 * Number.EPSILON * Math.max(1, Math.abs(time));
|
|
204
|
+
let index = -1;
|
|
205
|
+
for (const [i, timestamp] of timestamps.entries()) {
|
|
206
|
+
if (timestamp > time + tolerance) break;
|
|
207
|
+
index = i;
|
|
208
|
+
}
|
|
209
|
+
return index;
|
|
210
|
+
}
|
|
211
|
+
async function probeContainingSourceFrameSeek(videoPath, time, holdLastFrame) {
|
|
212
|
+
const ffprobe = findFFprobe();
|
|
213
|
+
if (!ffprobe) return { seek: time };
|
|
214
|
+
const probe = async (readIntervals, entries) => {
|
|
215
|
+
try {
|
|
216
|
+
const { stdout } = await runCancellableProcess(
|
|
217
|
+
ffprobe,
|
|
218
|
+
[
|
|
219
|
+
...["-v", "error", "-select_streams", "v:0", "-read_intervals", readIntervals],
|
|
220
|
+
...["-show_entries", entries, "-of", "json", "--", videoPath]
|
|
221
|
+
],
|
|
222
|
+
{ timeoutMs: FFMPEG_EXTRACT_TIMEOUT_MS, maxBufferBytes: 32 * 1024 * 1024 }
|
|
223
|
+
);
|
|
224
|
+
const parsed = JSON.parse(stdout);
|
|
225
|
+
return typeof parsed === "object" && parsed !== null ? parsed : null;
|
|
226
|
+
} catch {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
const data = await probe("%+#1", "stream=time_base,start_pts:format=start_time,duration");
|
|
231
|
+
if (data === null || !Array.isArray(data.streams)) return null;
|
|
232
|
+
const stream = data.streams[0];
|
|
233
|
+
if (typeof stream !== "object" || stream === null || !("time_base" in stream) || typeof stream.time_base !== "string")
|
|
234
|
+
return null;
|
|
235
|
+
const [numerator, denominator] = stream.time_base.split("/");
|
|
236
|
+
const timeBase = Number(numerator) / Number(denominator);
|
|
237
|
+
if (!Number.isFinite(timeBase) || timeBase <= 0) return null;
|
|
238
|
+
const format = "format" in data ? data.format : null;
|
|
239
|
+
const start = typeof format === "object" && format !== null && "start_time" in format ? Number(format.start_time) : 0;
|
|
240
|
+
const duration = typeof format === "object" && format !== null && "duration" in format ? Number(format.duration) : NaN;
|
|
241
|
+
if (!holdLastFrame && Number.isFinite(duration) && time >= duration) return null;
|
|
242
|
+
const formatStart = Number.isFinite(start) ? start : 0;
|
|
243
|
+
const startPts = "start_pts" in stream && typeof stream.start_pts === "number" ? stream.start_pts : NaN;
|
|
244
|
+
const startTicks = Math.abs(startPts * timeBase - formatStart) <= 1e-6 ? startPts : formatStart / timeBase;
|
|
245
|
+
const packetData = await probe(`%${startTicks * timeBase + time + 1}`, "packet=pts,dts,flags");
|
|
246
|
+
if (packetData === null || !Array.isArray(packetData.packets)) return null;
|
|
247
|
+
const packets = [];
|
|
248
|
+
for (const packet of packetData.packets) {
|
|
249
|
+
if (typeof packet !== "object" || packet === null) return null;
|
|
250
|
+
const pts = "pts" in packet ? packet.pts : "dts" in packet ? packet.dts : void 0;
|
|
251
|
+
if (typeof pts !== "number") return null;
|
|
252
|
+
const dts = "dts" in packet && typeof packet.dts === "number" ? packet.dts : pts;
|
|
253
|
+
const key = "flags" in packet && typeof packet.flags === "string" && packet.flags.includes("K");
|
|
254
|
+
packets.push({ pts: (pts - startTicks) * timeBase, dts: (dts - startTicks) * timeBase, key });
|
|
255
|
+
}
|
|
256
|
+
const timestamps = packets.map((packet) => packet.pts).sort((a, b) => a - b);
|
|
257
|
+
const index = Math.max(0, containingSourceFrameIndex(timestamps, time));
|
|
258
|
+
if (timestamps.length === 0 || !Number.isFinite(time)) return null;
|
|
259
|
+
const frame = timestamps[index];
|
|
260
|
+
const previous = timestamps[index - 1] ?? frame - 1e-3;
|
|
261
|
+
const mid = (previous + frame) / 2;
|
|
262
|
+
const ffmpeg = findFFmpeg();
|
|
263
|
+
const landing = async (seek) => {
|
|
264
|
+
const raw = ffmpeg ? await probeSeekLanding(ffmpeg, videoPath, seek) : null;
|
|
265
|
+
return raw === null ? null : raw - startTicks * timeBase;
|
|
266
|
+
};
|
|
267
|
+
const candidates = packets.filter(
|
|
268
|
+
(packet) => packet.key && packet.pts > 0 && packet.pts <= frame
|
|
269
|
+
);
|
|
270
|
+
for (const candidate of candidates.reverse().slice(0, 3)) {
|
|
271
|
+
const landed = await landing(candidate.pts);
|
|
272
|
+
if (landed === null) break;
|
|
273
|
+
if (landed <= 0 || landed > frame) continue;
|
|
274
|
+
const again = Math.abs(landed - candidate.pts) < 1e-6 ? landed : await landing(landed);
|
|
275
|
+
if (again !== null && Math.abs(again - landed) < 1e-6)
|
|
276
|
+
return { seek: landed, select: mid - landed };
|
|
277
|
+
}
|
|
278
|
+
return { select: mid - (timestamps.find((t) => t >= 0) ?? frame) };
|
|
279
|
+
}
|
|
280
|
+
async function probeSeekLanding(ffmpeg, videoPath, seek) {
|
|
281
|
+
try {
|
|
282
|
+
const { stdout } = await runCancellableProcess(
|
|
283
|
+
ffmpeg,
|
|
284
|
+
[
|
|
285
|
+
...["-v", "error", "-copyts", "-noaccurate_seek", "-ss", String(seek), "-i", videoPath],
|
|
286
|
+
...["-map", "0:v:0", "-c", "copy", "-frames:v", "1", "-f", "framecrc", "-"]
|
|
287
|
+
],
|
|
288
|
+
{ timeoutMs: FFMPEG_EXTRACT_TIMEOUT_MS, maxBufferBytes: 1024 * 1024 }
|
|
289
|
+
);
|
|
290
|
+
const base = /^#tb 0: (\d+)\/(\d+)/m.exec(stdout);
|
|
291
|
+
const row = /^0,\s*-?\d+,\s*(-?\d+),/m.exec(stdout);
|
|
292
|
+
if (!base || !row) return null;
|
|
293
|
+
return Number(row[1]) * Number(base[1]) / Number(base[2]);
|
|
294
|
+
} catch {
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
async function extractVideoFrameToBuffer(videoPath, timeSeconds, useVp9AlphaDecoder = false, holdLastFrame = false) {
|
|
199
299
|
const tmp = mkdtempSync(join(tmpdir(), "hf-snapshot-frame-"));
|
|
200
300
|
const outPath = join(tmp, "frame.png");
|
|
201
301
|
try {
|
|
202
302
|
const ffmpegPath = requireSnapshotFfmpeg(findFFmpeg());
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const decoderArgs = [...args];
|
|
208
|
-
const seek = ["-ss", String(Math.max(0, timeSeconds))];
|
|
209
|
-
args.push(
|
|
210
|
-
...accurateSeek ? ["-i", videoPath, ...seek] : [...seek, "-i", videoPath],
|
|
211
|
-
"-frames:v",
|
|
212
|
-
"1",
|
|
213
|
-
"-q:v",
|
|
214
|
-
"2",
|
|
215
|
-
"-y",
|
|
216
|
-
outPath
|
|
303
|
+
const seek = await probeContainingSourceFrameSeek(
|
|
304
|
+
videoPath,
|
|
305
|
+
Math.max(0, timeSeconds),
|
|
306
|
+
holdLastFrame
|
|
217
307
|
);
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
308
|
+
if (seek === null) return null;
|
|
309
|
+
const args = ["-hide_banner", "-loglevel", "error"];
|
|
310
|
+
if (useVp9AlphaDecoder) args.push("-c:v", "libvpx-vp9");
|
|
311
|
+
if (seek.seek !== void 0) args.push("-ss", String(seek.seek));
|
|
312
|
+
args.push("-i", videoPath, "-map", "0:v:0");
|
|
313
|
+
if (seek.select !== void 0) args.push("-vf", `select=gte(t-start_t\\,${seek.select})`);
|
|
314
|
+
args.push("-frames:v", "1", "-q:v", "2", "-y", outPath);
|
|
315
|
+
const result = await runFfmpegOnce(ffmpegPath, args, FFMPEG_EXTRACT_TIMEOUT_MS);
|
|
227
316
|
if (result.code !== 0 || result.timedOut || !existsSync(outPath)) return null;
|
|
228
317
|
return readFileSync(outPath);
|
|
229
318
|
} finally {
|
|
@@ -443,7 +532,6 @@ async function captureSnapshots(projectDir, opts) {
|
|
|
443
532
|
ffmpegInput,
|
|
444
533
|
Math.max(0, v.relTime),
|
|
445
534
|
useVp9AlphaDecoder,
|
|
446
|
-
false,
|
|
447
535
|
v.srcDuration > 0 && v.relTime >= v.srcDuration - 1
|
|
448
536
|
);
|
|
449
537
|
if (!png) continue;
|
|
@@ -499,7 +587,7 @@ async function captureSnapshots(projectDir, opts) {
|
|
|
499
587
|
await page.screenshot({ path: framePath, type: "png", omitBackground: true });
|
|
500
588
|
}
|
|
501
589
|
if (opts.against) {
|
|
502
|
-
const refPng = await extractVideoFrameToBuffer(opts.against, time
|
|
590
|
+
const refPng = await extractVideoFrameToBuffer(opts.against, time);
|
|
503
591
|
if (!refPng) {
|
|
504
592
|
console.error(
|
|
505
593
|
` ${c.warn("\u26A0")} --against has no frame at ${timeLabel} \u2014 reference pair skipped`
|
|
@@ -771,6 +859,7 @@ ${c.error("\u2717")} Snapshot failed: ${msg}`);
|
|
|
771
859
|
});
|
|
772
860
|
export {
|
|
773
861
|
computeSnapshotTimes,
|
|
862
|
+
containingSourceFrameIndex,
|
|
774
863
|
snapshot_default as default,
|
|
775
864
|
examples,
|
|
776
865
|
extractVideoFrameToBuffer,
|
|
@@ -6,11 +6,11 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
serveStaticProjectHtml
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LDSWUYZB.js";
|
|
10
10
|
import "./chunk-XUHOIDKG.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-752X6G7T.js";
|
|
12
12
|
import "./chunk-X7MTZ4T2.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-LYNBNESS.js";
|
|
14
14
|
import "./chunk-XFJXFNJF.js";
|
|
15
15
|
import "./chunk-WEATBQTR.js";
|
|
16
16
|
import "./chunk-GDJ74GHW.js";
|
package/dist/studio/assets/{hyperframes-player-DzJbtQVO.js → hyperframes-player-aXNJKiIg.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var xe=Object.defineProperty;var ke=(r,i,e)=>i in r?xe(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var h=(r,i,e)=>ke(r,typeof i!="symbol"?i+"":i,e);import{r as fe,i as Ie,a as w,b as _e,p as Oe,c as Ne,d as Fe,s as Ve,e as ge,F as ye}from"./index-
|
|
1
|
+
var xe=Object.defineProperty;var ke=(r,i,e)=>i in r?xe(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var h=(r,i,e)=>ke(r,typeof i!="symbol"?i+"":i,e);import{r as fe,i as Ie,a as w,b as _e,p as Oe,c as Ne,d as Fe,s as Ve,e as ge,F as ye}from"./index-Dz7doz9l.js";function He(r){return r.hasRuntime||r.runtimeInjected?!1:!!(r.hasNestedCompositions||r.hasTimelines&&r.attempts>=5)}function z(r){return typeof r=="object"&&r!==null}function Ue(r){return z(r)&&typeof r.getDuration=="function"}function We(r){return z(r)&&typeof r.duration=="function"&&typeof r.time=="function"&&typeof r.seek=="function"&&typeof r.play=="function"&&typeof r.pause=="function"}function ze(r){if(!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(r))throw new Error(`Invalid HyperFrames runtime version: ${r}`);return`https://cdn.jsdelivr.net/npm/@hyperframes/core@${r}/dist/hyperframe.runtime.iife.js`}const U=typeof __HYPERFRAMES_RUNTIME_CDN_URL__=="string"?__HYPERFRAMES_RUNTIME_CDN_URL__:ze("0.0.0-dev");function $(r){if(r===null)return null;const i=Number.parseInt(r,10);return Number.isFinite(i)&&i>0?i:null}function $e(r){const i=(r==null?void 0:r.querySelector("[data-composition-id][data-width][data-height]"))??(r==null?void 0:r.querySelector("[data-width][data-height]"));if(!i)return null;const e=$(i.getAttribute("data-width")),t=$(i.getAttribute("data-height"));return e!==null&&t!==null?{width:e,height:t}:null}class je{constructor(i,e){h(this,"_interval",null);h(this,"_runtimeInjected",!1);this._iframe=i,this._callbacks=e}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let i=0;this._interval=setInterval(()=>{var e;i++;try{const t=this._iframe.contentWindow;if(!t)return;const s=!!(t.__hf||t.__player),n=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!((e=this._iframe.contentDocument)!=null&&e.querySelector("[data-composition-src]"));if(He({hasRuntime:s,hasTimelines:n,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:i})){this._injectRuntime();return}if(this._runtimeInjected&&!s)return;const a=this._resolvePlaybackDurationAdapter(t);if(a&&a.getDuration()>0){this.stop();const c=$e(this._iframe.contentDocument);this._callbacks.onReady({duration:a.getDuration(),adapter:a,compositionSize:c});return}}catch{}i>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{const i=this._iframe.contentWindow;return i?this._resolveDirectTimelineAdapterFromWindow(i):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(i){return this._resolveDirectTimelineAdapterFromWindow(i)}hasRuntimeBridge(i){return Reflect.get(i,"__hf")!==void 0||z(Reflect.get(i,"__player"))}_injectRuntime(){var i,e;this._runtimeInjected=!0;try{const t=this._iframe.contentDocument;if(!t)return;const s=t.createElement("script");s.src=U,(t.head||t.documentElement).appendChild(s),(e=(i=this._callbacks).onRuntimeInjected)==null||e.call(i)}catch{}}_resolveDirectTimelineAdapterFromWindow(i){var a,c;if(this.hasRuntimeBridge(i))return null;const e=Reflect.get(i,"__timelines");if(!z(e))return null;const t=Object.keys(e);if(t.length===0)return null;const s=(c=(a=this._iframe.contentDocument)==null?void 0:a.querySelector("[data-composition-id]"))==null?void 0:c.getAttribute("data-composition-id"),n=s&&s in e?s:t[t.length-1],o=e[n];return We(o)?o:null}_resolvePlaybackDurationAdapter(i){const e=Reflect.get(i,"__player");if(Ue(e))return{kind:"runtime",getDuration:()=>e.getDuration()};const t=this._resolveDirectTimelineAdapterFromWindow(i);return t?{kind:"direct-timeline",timeline:t,getDuration:()=>t.duration()}:null}}const Be=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|