hyperframes 0.8.160 → 0.8.161
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-OGBTJCU4.js → add-7U5TQGSQ.js} +5 -5
- package/dist/{asset-DKQFFGPP.js → asset-N3JO5LHY.js} +2 -2
- package/dist/audio-QNPSENQR.js +1131 -0
- package/dist/{auth-AQMRAFXN.js → auth-HINUM4A7.js} +1 -1
- package/dist/{autoUpdate-NFQB7V2X.js → autoUpdate-AAMND4XK.js} +2 -2
- package/dist/{backgroundChecks-7JKE2FIU.js → backgroundChecks-FXIEHPND.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/beats-UZNREIRU.js +239 -0
- package/dist/{benchmark-RRU67WEY.js → benchmark-YM3QXPH6.js} +5 -5
- package/dist/{browser-K4TP4ZM2.js → browser-SD3T2XMH.js} +3 -3
- package/dist/{capture-T2TBROMS.js → capture-GUO23PVN.js} +1 -1
- package/dist/{catalog-IMIHQ4KX.js → catalog-6PF7KZAZ.js} +5 -5
- package/dist/{catch-up-UY5MJWOG.js → catch-up-5LTQTD3X.js} +4 -4
- package/dist/{check-6NAJSJHQ.js → check-NE2YXJR2.js} +18 -18
- package/dist/{checkBrowser-JWNQFYTY.js → checkBrowser-XDTXDEYO.js} +14 -14
- package/dist/{chunk-VD7WQYTO.js → chunk-5YSHR4XC.js} +5 -5
- package/dist/{chunk-FRGYHRP6.js → chunk-7ZKEOQ5N.js} +1 -1
- package/dist/{chunk-D46G5IQH.js → chunk-AHNJMWMU.js} +7 -7
- package/dist/{chunk-D2WGLWIK.js → chunk-AY2FEJDR.js} +2 -2
- package/dist/{chunk-V2FQQILJ.js → chunk-CGOGEA62.js} +1 -1
- package/dist/chunk-FFJ5TDRD.js +1181 -0
- package/dist/{chunk-GOASXWDD.js → chunk-G5AZMSQP.js} +1 -1
- package/dist/{chunk-PINFPWRV.js → chunk-GIPNECWL.js} +12 -10
- package/dist/{chunk-4VYNMVMC.js → chunk-H4VXLZ6O.js} +4 -4
- package/dist/{chunk-KRE55WLI.js → chunk-HM4PLNTX.js} +1 -1
- package/dist/{chunk-MYGXKD7A.js → chunk-I6CVW5CA.js} +2 -2
- package/dist/{chunk-VZ6LCTOZ.js → chunk-IL6C7T5X.js} +1 -1
- package/dist/{chunk-ICZVCVD3.js → chunk-KZPG4DXX.js} +1 -1
- package/dist/{chunk-6MCASYIS.js → chunk-ON2HYNGB.js} +4 -4
- package/dist/{chunk-IGTGLGML.js → chunk-PYMYGIZ4.js} +2 -2
- package/dist/{chunk-7OFNPEKR.js → chunk-PZH7FTRZ.js} +2 -2
- package/dist/{chunk-GOTCGKX6.js → chunk-RGYEL7QD.js} +1 -1
- package/dist/{chunk-3XPVZLAR.js → chunk-SAS6XBY5.js} +1 -1
- package/dist/{chunk-KWRBEDJI.js → chunk-TXG6W4X4.js} +2 -2
- package/dist/{chunk-TTFDAWCS.js → chunk-VYTGK5YA.js} +1 -1
- package/dist/{chunk-37LNY2EC.js → chunk-WDUEIP22.js} +1 -1
- package/dist/{chunk-TU2CQJO3.js → chunk-WNXVPPMV.js} +2 -2
- package/dist/{chunk-SHVDJON6.js → chunk-XWWYGXJ5.js} +1 -1
- package/dist/{clean-RRE6PMKZ.js → clean-4Y4G3YV3.js} +6 -6
- package/dist/cli.js +49 -49
- package/dist/{cloud-OIR6K7TS.js → cloud-BWXJB2B7.js} +4 -4
- package/dist/{compare-E57W737I.js → compare-OLLJBVNL.js} +11 -11
- package/dist/{component-I2O4AX56.js → component-ULSAC45J.js} +3 -3
- package/dist/{compositions-B6NKZHIN.js → compositions-G2JTQBTJ.js} +5 -5
- package/dist/{delete-DTUNBC6K.js → delete-BONV4XUI.js} +2 -2
- package/dist/{doctor-SCNB73Z3.js → doctor-EMLC4VZ4.js} +3 -3
- package/dist/{events-6LQNRKHZ.js → events-LF2J436R.js} +3 -3
- package/dist/{events-Q37UJL36.js → events-ZFGAA5UD.js} +2 -2
- package/dist/{feedback-FOEBE2OW.js → feedback-WKCUQE6T.js} +5 -5
- package/dist/{figma-54MRTBKH.js → figma-VJKG252Z.js} +3 -3
- package/dist/fontLocalizeCli.js +1 -1
- package/dist/{get-EPGHM2SA.js → get-OINAGI2B.js} +2 -2
- package/dist/{grade-compare-LOJWX6SK.js → grade-compare-DY5VFXPK.js} +11 -11
- package/dist/{help-6FPZI3WP.js → help-HHB7JRZA.js} +1 -1
- package/dist/{history-GRXSUA5R.js → history-D44JJBBC.js} +6 -6
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-LV7DFCLD.js → info-2WZLISAR.js} +5 -5
- package/dist/{init-3J7BSAC3.js → init-UYZS2WXQ.js} +6 -6
- package/dist/{inspect-5RON554C.js → inspect-IEFCB4PT.js} +13 -13
- package/dist/{keyframes-KHXTHI5C.js → keyframes-FS43QHM2.js} +6 -6
- package/dist/{layout-DVWWT2TR.js → layout-AK2A7Q46.js} +13 -13
- package/dist/{lint-Q5WFB5ST.js → lint-JRJUSZO7.js} +6 -6
- package/dist/{list-RFEUTW6N.js → list-BKKGPT7E.js} +2 -2
- package/dist/{login-WBHWA4M2.js → login-QJZTUDDO.js} +4 -4
- package/dist/{media-treatment-WRHVNWLS.js → media-treatment-473OM7G7.js} +6 -6
- package/dist/{motionShot-BZLRN3SS.js → motionShot-C2YDYRNB.js} +5 -5
- package/dist/{normalize-audio-4YXE3RIF.js → normalize-audio-M3KVTFTQ.js} +4 -4
- package/dist/{open-MCGYEFML.js → open-363TDMEP.js} +4 -4
- package/dist/{play-WXOV3BD7.js → play-2UB33EGB.js} +9 -9
- package/dist/{present-RVG4J6CJ.js → present-F3ASSDJX.js} +9 -9
- package/dist/{preview-PDUQR2JQ.js → preview-EF76WIHK.js} +5 -5
- package/dist/publish-VX5OH4ST.js +1 -1
- package/dist/{render-JNJVFBFF.js → render-GL72Z2W2.js} +6 -6
- package/dist/{render-5BGU3FXU.js → render-GUBYSVQD.js} +7 -7
- package/dist/skills/hyperframes-cli/references/beats.md +2 -6
- package/dist/{skills-LKJA27ZN.js → skills-7XI4DHLN.js} +5 -5
- package/dist/{skillsUpdateCheck-RFZJKZC4.js → skillsUpdateCheck-34WOCMHV.js} +3 -3
- package/dist/{snapshot-EOYA4MLG.js → snapshot-SGTO2OQ4.js} +13 -13
- package/dist/{staticProjectServer-S3NK3V4S.js → staticProjectServer-4CQ3KDQK.js} +5 -5
- package/dist/studio/assets/{hyperframes-player-CXL23NEv.js → hyperframes-player-C8VFb4NS.js} +1 -1
- package/dist/studio/assets/{index-D7BvLHtZ.js → index-J8Bpbg6o.js} +118 -118
- package/dist/studio/assets/{index-CejKvBNw.js → index-RZnZPb-B.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-YM5HLXUS.js → studio-api-RYCDLEOR.js} +3 -3
- package/dist/{studioServer-CEXJK5TC.js → studioServer-VIIVGFZH.js} +9 -9
- package/dist/{telemetry-7AWYECPL.js → telemetry-YKVYLJSB.js} +3 -3
- package/dist/{timeline-G7H373XX.js → timeline-LDRA7QZ3.js} +8 -8
- package/dist/{tokens-GYH7NXXA.js → tokens-ZAOFRU55.js} +2 -2
- package/dist/{transcribe-CIC7WAT5.js → transcribe-CJXUHTAS.js} +3 -3
- package/dist/{updateCheck-MQ44KGUR.js → updateCheck-TIRFQBSI.js} +2 -2
- package/dist/{upgrade-OL47SID3.js → upgrade-7R5G3MNO.js} +2 -2
- package/dist/{validate-TDCH6X3C.js → validate-VGEPWGQO.js} +11 -11
- package/package.json +2 -3
- package/dist/audio-GK4OVVTH.js +0 -2086
- package/dist/beat-analyzer.global.js +0 -341
- package/dist/beats-C3ZSK2R2.js +0 -322
- package/dist/lib-TPG2ZMAX.js +0 -128
- package/dist/studio/assets/index-Bl_xrA5T.js +0 -1
- /package/dist/{capture-ZPRK3TOZ.js → capture-M5ZAD3BI.js} +0 -0
- /package/dist/{lambda-4KCSMIM6.js → lambda-RAJA6ZNA.js} +0 -0
|
@@ -46,7 +46,7 @@ ${c.bold("ENV VARS:")}
|
|
|
46
46
|
var auth_default = defineCommand({
|
|
47
47
|
meta: { name: "auth", description: "Sign in to HeyGen and manage credentials" },
|
|
48
48
|
subCommands: {
|
|
49
|
-
login: () => import("./login-
|
|
49
|
+
login: () => import("./login-QJZTUDDO.js").then((m) => m.default),
|
|
50
50
|
status: () => import("./status-RGHSK3DJ.js").then((m) => m.default),
|
|
51
51
|
logout: () => import("./logout-DKJANASY.js").then((m) => m.default),
|
|
52
52
|
refresh: () => import("./refresh-MGCVWX56.js").then((m) => m.default)
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
detectInstaller,
|
|
13
13
|
installInvocation,
|
|
14
14
|
updateCheckDisabled
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7ZKEOQ5N.js";
|
|
16
16
|
import "./chunk-K4WIOZFP.js";
|
|
17
17
|
import {
|
|
18
18
|
readConfig,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-XUXGIA7H.js";
|
|
22
22
|
import "./chunk-WERLJGIC.js";
|
|
23
23
|
import "./chunk-ISN5GRYI.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-WNXVPPMV.js";
|
|
25
25
|
import "./chunk-KNU5COPB.js";
|
|
26
26
|
import "./chunk-M2WBOQ2Q.js";
|
|
27
27
|
|
|
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
skillsCheckDue
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VYTGK5YA.js";
|
|
10
10
|
import {
|
|
11
11
|
updateCheckDue
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7ZKEOQ5N.js";
|
|
13
13
|
import "./chunk-K4WIOZFP.js";
|
|
14
14
|
import {
|
|
15
15
|
readConfig,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-XUXGIA7H.js";
|
|
19
19
|
import "./chunk-WERLJGIC.js";
|
|
20
20
|
import "./chunk-ISN5GRYI.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-WNXVPPMV.js";
|
|
22
22
|
import "./chunk-KNU5COPB.js";
|
|
23
23
|
import "./chunk-M2WBOQ2Q.js";
|
|
24
24
|
|
|
@@ -6,15 +6,15 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
refreshSkillsCache
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VYTGK5YA.js";
|
|
10
10
|
import {
|
|
11
11
|
checkForUpdate
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7ZKEOQ5N.js";
|
|
13
13
|
import "./chunk-K4WIOZFP.js";
|
|
14
14
|
import "./chunk-XUXGIA7H.js";
|
|
15
15
|
import "./chunk-WERLJGIC.js";
|
|
16
16
|
import "./chunk-ISN5GRYI.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-WNXVPPMV.js";
|
|
18
18
|
import "./chunk-KNU5COPB.js";
|
|
19
19
|
import "./chunk-M2WBOQ2Q.js";
|
|
20
20
|
|
|
@@ -0,0 +1,239 @@
|
|
|
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
|
+
bandFramesOf,
|
|
9
|
+
decodeAudio,
|
|
10
|
+
energyMix,
|
|
11
|
+
rhythm,
|
|
12
|
+
tempoOf
|
|
13
|
+
} from "./chunk-FFJ5TDRD.js";
|
|
14
|
+
import {
|
|
15
|
+
resolveProject
|
|
16
|
+
} from "./chunk-WDUEIP22.js";
|
|
17
|
+
import "./chunk-K2FLNJVB.js";
|
|
18
|
+
import "./chunk-HM4PLNTX.js";
|
|
19
|
+
import "./chunk-KZPG4DXX.js";
|
|
20
|
+
import "./chunk-VWG7OQKU.js";
|
|
21
|
+
import "./chunk-QWQ6GQTI.js";
|
|
22
|
+
import {
|
|
23
|
+
defineCommand
|
|
24
|
+
} from "./chunk-S3S4TGEH.js";
|
|
25
|
+
import "./chunk-54HJ63Q2.js";
|
|
26
|
+
import {
|
|
27
|
+
failCommand
|
|
28
|
+
} from "./chunk-PBN6GBJE.js";
|
|
29
|
+
import {
|
|
30
|
+
c
|
|
31
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
32
|
+
import "./chunk-K4WIOZFP.js";
|
|
33
|
+
import "./chunk-XUXGIA7H.js";
|
|
34
|
+
import "./chunk-WERLJGIC.js";
|
|
35
|
+
import "./chunk-ISN5GRYI.js";
|
|
36
|
+
import "./chunk-WNXVPPMV.js";
|
|
37
|
+
import "./chunk-XT6MXC7A.js";
|
|
38
|
+
import "./chunk-JYVGYKXG.js";
|
|
39
|
+
import "./chunk-7KDQAD2W.js";
|
|
40
|
+
import {
|
|
41
|
+
decodeAuthoredAttribute,
|
|
42
|
+
scanHtmlOpeningTags
|
|
43
|
+
} from "./chunk-ALLKNYC3.js";
|
|
44
|
+
import "./chunk-DPVXBVLL.js";
|
|
45
|
+
import "./chunk-T76PLPD6.js";
|
|
46
|
+
import "./chunk-FXMKHHPO.js";
|
|
47
|
+
import "./chunk-VAS6HQX3.js";
|
|
48
|
+
import "./chunk-SDYDNHEE.js";
|
|
49
|
+
import "./chunk-TYXH3EKP.js";
|
|
50
|
+
import "./chunk-KNU5COPB.js";
|
|
51
|
+
import "./chunk-M2WBOQ2Q.js";
|
|
52
|
+
|
|
53
|
+
// src/commands/beats.ts
|
|
54
|
+
import { existsSync, readFileSync, mkdirSync, writeFileSync } from "fs";
|
|
55
|
+
import { resolve, join, dirname } from "path";
|
|
56
|
+
|
|
57
|
+
// ../core/dist/beats/beatDetection.js
|
|
58
|
+
var STRENGTH_WINDOW_S = 0.05;
|
|
59
|
+
function computeRmsAt(channelData, sampleRate, time) {
|
|
60
|
+
const halfWindow = Math.floor(sampleRate * STRENGTH_WINDOW_S);
|
|
61
|
+
const center = Math.floor(time * sampleRate);
|
|
62
|
+
const start = Math.max(0, center - halfWindow);
|
|
63
|
+
const end = Math.min(channelData.length, center + halfWindow);
|
|
64
|
+
let sum = 0;
|
|
65
|
+
for (let i = start; i < end; i++) {
|
|
66
|
+
const s = channelData[i] ?? 0;
|
|
67
|
+
sum += s * s;
|
|
68
|
+
}
|
|
69
|
+
return Math.sqrt(sum / Math.max(end - start, 1));
|
|
70
|
+
}
|
|
71
|
+
var HIGH_CONFIDENCE = 0.35;
|
|
72
|
+
function beatStrengths(beats, levels, sampleRate) {
|
|
73
|
+
const energies = beats.map((t) => computeRmsAt(levels, sampleRate, t));
|
|
74
|
+
const peak = Math.max(...energies, 1e-6);
|
|
75
|
+
return { strengths: energies.map((e) => Math.min(1, e / peak)), peak };
|
|
76
|
+
}
|
|
77
|
+
async function analyzeMusicFromSignal(signal, { pause } = {}) {
|
|
78
|
+
await pause?.();
|
|
79
|
+
bandFramesOf(signal);
|
|
80
|
+
await pause?.();
|
|
81
|
+
const { beats } = rhythm(signal);
|
|
82
|
+
await pause?.();
|
|
83
|
+
const channelData = energyMix(signal);
|
|
84
|
+
const confidence = beats.confidence ?? 0;
|
|
85
|
+
const times = beats.times;
|
|
86
|
+
const { strengths, peak } = beatStrengths(times, channelData, signal.sampleRate);
|
|
87
|
+
const bpm = tempoOf(times).value;
|
|
88
|
+
return {
|
|
89
|
+
beatTimes: times,
|
|
90
|
+
beatStrengths: strengths,
|
|
91
|
+
bpm,
|
|
92
|
+
bpmConfidence: bpm === null ? "uncertain" : confidence >= HIGH_CONFIDENCE ? "high" : "low",
|
|
93
|
+
channelData,
|
|
94
|
+
sampleRate: signal.sampleRate,
|
|
95
|
+
peak
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ../core/dist/beats/beatFile.js
|
|
100
|
+
function audioRelPathForSrc(src) {
|
|
101
|
+
if (!src)
|
|
102
|
+
return null;
|
|
103
|
+
if (/^(blob:|data:)/i.test(src))
|
|
104
|
+
return null;
|
|
105
|
+
let rel = null;
|
|
106
|
+
const PREVIEW = "/preview/";
|
|
107
|
+
const previewIdx = src.indexOf(PREVIEW);
|
|
108
|
+
if (previewIdx !== -1) {
|
|
109
|
+
let after = src.slice(previewIdx + PREVIEW.length);
|
|
110
|
+
const queryOrHash = after.search(/[?#]/);
|
|
111
|
+
if (queryOrHash !== -1)
|
|
112
|
+
after = after.slice(0, queryOrHash);
|
|
113
|
+
if (after.startsWith("comp/"))
|
|
114
|
+
after = after.slice("comp/".length);
|
|
115
|
+
rel = after ? decodeURIComponent(after) : null;
|
|
116
|
+
}
|
|
117
|
+
if (!rel) {
|
|
118
|
+
try {
|
|
119
|
+
rel = decodeURIComponent(new URL(src, "http://_").pathname);
|
|
120
|
+
} catch {
|
|
121
|
+
rel = src;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (!rel)
|
|
125
|
+
return null;
|
|
126
|
+
rel = rel.replace(/^\/+/, "");
|
|
127
|
+
return rel || null;
|
|
128
|
+
}
|
|
129
|
+
function serializeBeats(times, strengths, audio) {
|
|
130
|
+
const beats = times.map((t, i) => ({
|
|
131
|
+
time: Math.round(t * 1e3) / 1e3,
|
|
132
|
+
strength: Math.round((strengths[i] ?? 0.5) * 1e3) / 1e3
|
|
133
|
+
}));
|
|
134
|
+
const data = { version: 1, audio, beats };
|
|
135
|
+
return `${JSON.stringify(data, null, 2)}
|
|
136
|
+
`;
|
|
137
|
+
}
|
|
138
|
+
var MUSIC_ID_RE = /\b(music|bgm|soundtrack|background[-_]?music)\b/i;
|
|
139
|
+
function attr(tag, name) {
|
|
140
|
+
const attribute = tag.attributes.find((value) => value.name === name);
|
|
141
|
+
return attribute?.kind === "value" ? decodeAuthoredAttribute(attribute.value) : null;
|
|
142
|
+
}
|
|
143
|
+
function isSoundingVideoTag(tag) {
|
|
144
|
+
return attr(tag, "data-has-audio") === "true" && !tag.attributes.some((attribute) => attribute.name === "muted");
|
|
145
|
+
}
|
|
146
|
+
function isMusicSourceTag(tag) {
|
|
147
|
+
return tag.closed && (tag.name === "audio" || tag.name === "video" && isSoundingVideoTag(tag));
|
|
148
|
+
}
|
|
149
|
+
function findMusicAudioSrc(html) {
|
|
150
|
+
for (const tag of scanHtmlOpeningTags(html)) {
|
|
151
|
+
if (!isMusicSourceTag(tag))
|
|
152
|
+
continue;
|
|
153
|
+
const src = attr(tag, "src");
|
|
154
|
+
if (!src)
|
|
155
|
+
continue;
|
|
156
|
+
const role = attr(tag, "data-timeline-role");
|
|
157
|
+
if (role) {
|
|
158
|
+
if (role === "music")
|
|
159
|
+
return src;
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
const id = attr(tag, "id");
|
|
163
|
+
if (id && MUSIC_ID_RE.test(id))
|
|
164
|
+
return src;
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// src/commands/beats.ts
|
|
170
|
+
var examples = [
|
|
171
|
+
["Generate the beat file for the current project", "hyperframes beats"],
|
|
172
|
+
["Generate for a specific directory", "hyperframes beats ./my-video"]
|
|
173
|
+
];
|
|
174
|
+
function fail(message) {
|
|
175
|
+
console.error(c.error(message));
|
|
176
|
+
failCommand();
|
|
177
|
+
}
|
|
178
|
+
function resolveMusicTarget(project) {
|
|
179
|
+
const src = findMusicAudioSrc(readFileSync(project.indexPath, "utf-8"));
|
|
180
|
+
if (!src) {
|
|
181
|
+
fail(
|
|
182
|
+
'No music track found. Add data-timeline-role="music" to the <audio> element, or to a <video data-has-audio="true"> whose own sound is the music (or give it an id like music/bgm/soundtrack).'
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
const rel = audioRelPathForSrc(src);
|
|
186
|
+
if (!rel) fail(`Cannot derive a beat-file path for music src: ${src}`);
|
|
187
|
+
const audioPath = resolve(project.dir, rel);
|
|
188
|
+
if (!existsSync(audioPath)) fail(`Audio file not found: ${rel}`);
|
|
189
|
+
return { rel, audioPath };
|
|
190
|
+
}
|
|
191
|
+
async function decode(audioPath) {
|
|
192
|
+
try {
|
|
193
|
+
const decoded = await decodeAudio(audioPath);
|
|
194
|
+
if (decoded) return decoded.signal;
|
|
195
|
+
} catch (err) {
|
|
196
|
+
fail(`Beat detection failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
197
|
+
}
|
|
198
|
+
fail(`Beat detection failed: ${audioPath} has no audio stream`);
|
|
199
|
+
}
|
|
200
|
+
function report(file, result, json) {
|
|
201
|
+
if (json) {
|
|
202
|
+
console.log(
|
|
203
|
+
JSON.stringify({ ok: true, file, count: result.beatTimes.length, bpm: result.bpm }, null, 2)
|
|
204
|
+
);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
console.log(
|
|
208
|
+
c.success(
|
|
209
|
+
`\u2713 Wrote ${result.beatTimes.length} beats \u2192 ${file} (bpm ${result.bpm ?? "?"}, ${result.bpmConfidence})`
|
|
210
|
+
)
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
var beats_default = defineCommand({
|
|
214
|
+
meta: {
|
|
215
|
+
name: "beats",
|
|
216
|
+
description: "Detect beats in the music track and write beats/<audio>.json"
|
|
217
|
+
},
|
|
218
|
+
args: {
|
|
219
|
+
dir: { type: "positional", description: "Project directory", required: false },
|
|
220
|
+
json: { type: "boolean", description: "Output result as JSON", default: false }
|
|
221
|
+
},
|
|
222
|
+
async run({ args }) {
|
|
223
|
+
const project = resolveProject(args.dir);
|
|
224
|
+
const { rel, audioPath } = resolveMusicTarget(project);
|
|
225
|
+
if (!args.json) console.log(c.dim(`Analyzing ${rel}\u2026`));
|
|
226
|
+
const result = await analyzeMusicFromSignal(await decode(audioPath));
|
|
227
|
+
if (result.beatTimes.length === 0) {
|
|
228
|
+
fail(`No beats detected in ${rel} \u2014 nothing written. (Track may be silent/ambient.)`);
|
|
229
|
+
}
|
|
230
|
+
const outPath = join(project.dir, "beats", `${rel}.json`);
|
|
231
|
+
mkdirSync(dirname(outPath), { recursive: true });
|
|
232
|
+
writeFileSync(outPath, serializeBeats(result.beatTimes, result.beatStrengths, rel));
|
|
233
|
+
report(`beats/${rel}.json`, result, Boolean(args.json));
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
export {
|
|
237
|
+
beats_default as default,
|
|
238
|
+
examples
|
|
239
|
+
};
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-P4QE7SSN.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WDUEIP22.js";
|
|
13
13
|
import {
|
|
14
14
|
errorBox,
|
|
15
15
|
formatBytes,
|
|
16
16
|
formatDuration
|
|
17
17
|
} from "./chunk-K2FLNJVB.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-HM4PLNTX.js";
|
|
19
|
+
import "./chunk-KZPG4DXX.js";
|
|
20
20
|
import "./chunk-VWG7OQKU.js";
|
|
21
21
|
import "./chunk-QWQ6GQTI.js";
|
|
22
22
|
import {
|
|
@@ -34,12 +34,12 @@ import {
|
|
|
34
34
|
} from "./chunk-ZTZA4UWZ.js";
|
|
35
35
|
import {
|
|
36
36
|
withMeta
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7ZKEOQ5N.js";
|
|
38
38
|
import "./chunk-K4WIOZFP.js";
|
|
39
39
|
import "./chunk-XUXGIA7H.js";
|
|
40
40
|
import "./chunk-WERLJGIC.js";
|
|
41
41
|
import "./chunk-ISN5GRYI.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-WNXVPPMV.js";
|
|
43
43
|
import "./chunk-XT6MXC7A.js";
|
|
44
44
|
import "./chunk-JYVGYKXG.js";
|
|
45
45
|
import "./chunk-7KDQAD2W.js";
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
} from "./chunk-K2FLNJVB.js";
|
|
10
10
|
import {
|
|
11
11
|
trackBrowserInstall
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-HM4PLNTX.js";
|
|
13
|
+
import "./chunk-KZPG4DXX.js";
|
|
14
14
|
import "./chunk-VWG7OQKU.js";
|
|
15
15
|
import "./chunk-QWQ6GQTI.js";
|
|
16
16
|
import {
|
|
@@ -41,7 +41,7 @@ import "./chunk-K4WIOZFP.js";
|
|
|
41
41
|
import "./chunk-XUXGIA7H.js";
|
|
42
42
|
import "./chunk-WERLJGIC.js";
|
|
43
43
|
import "./chunk-ISN5GRYI.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-WNXVPPMV.js";
|
|
45
45
|
import "./chunk-XT6MXC7A.js";
|
|
46
46
|
import "./chunk-JYVGYKXG.js";
|
|
47
47
|
import "./chunk-7KDQAD2W.js";
|
|
@@ -173,7 +173,7 @@ var capture_default = defineCommand({
|
|
|
173
173
|
}
|
|
174
174
|
console.log();
|
|
175
175
|
}
|
|
176
|
-
const { captureWebsite } = await import("./capture-
|
|
176
|
+
const { captureWebsite } = await import("./capture-M5ZAD3BI.js");
|
|
177
177
|
let captureFailed = false;
|
|
178
178
|
try {
|
|
179
179
|
const result = await captureWebsite(
|
|
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
runAdd
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-PZH7FTRZ.js";
|
|
10
|
+
import "./chunk-SAS6XBY5.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_PROJECT_CONFIG,
|
|
13
13
|
loadProjectConfig
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
import "./chunk-AWDFDFI3.js";
|
|
26
26
|
import "./chunk-P6LJ4Y32.js";
|
|
27
27
|
import "./chunk-GMECXFAN.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-HM4PLNTX.js";
|
|
29
|
+
import "./chunk-KZPG4DXX.js";
|
|
30
30
|
import "./chunk-VWG7OQKU.js";
|
|
31
31
|
import "./chunk-QWQ6GQTI.js";
|
|
32
32
|
import {
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
isAttendedTerminal
|
|
55
55
|
} from "./chunk-WERLJGIC.js";
|
|
56
56
|
import "./chunk-ISN5GRYI.js";
|
|
57
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-WNXVPPMV.js";
|
|
58
58
|
import {
|
|
59
59
|
installedOptionalPackageVersion,
|
|
60
60
|
loadInstalledOptionalPackage,
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WDUEIP22.js";
|
|
10
10
|
import "./chunk-K2FLNJVB.js";
|
|
11
11
|
import {
|
|
12
12
|
filesChangedSince,
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
readSeen,
|
|
15
15
|
unseenTurns
|
|
16
16
|
} from "./chunk-DCAI5DBR.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-HM4PLNTX.js";
|
|
18
|
+
import "./chunk-KZPG4DXX.js";
|
|
19
19
|
import "./chunk-VWG7OQKU.js";
|
|
20
20
|
import "./chunk-QWQ6GQTI.js";
|
|
21
21
|
import {
|
|
@@ -30,7 +30,7 @@ import "./chunk-K4WIOZFP.js";
|
|
|
30
30
|
import "./chunk-XUXGIA7H.js";
|
|
31
31
|
import "./chunk-WERLJGIC.js";
|
|
32
32
|
import "./chunk-ISN5GRYI.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-WNXVPPMV.js";
|
|
34
34
|
import "./chunk-EOVYQ3IG.js";
|
|
35
35
|
import "./chunk-XT6MXC7A.js";
|
|
36
36
|
import "./chunk-JYVGYKXG.js";
|
|
@@ -20,15 +20,15 @@ import {
|
|
|
20
20
|
} from "./chunk-QABAVWEX.js";
|
|
21
21
|
import {
|
|
22
22
|
captureArtifactRevision
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-G5AZMSQP.js";
|
|
24
|
+
import "./chunk-CGOGEA62.js";
|
|
25
25
|
import "./chunk-X7MTZ4T2.js";
|
|
26
26
|
import {
|
|
27
27
|
loadProducer
|
|
28
28
|
} from "./chunk-P4QE7SSN.js";
|
|
29
29
|
import {
|
|
30
30
|
trackLintRun
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TXG6W4X4.js";
|
|
32
32
|
import {
|
|
33
33
|
assertionTargets,
|
|
34
34
|
buildLayoutSampleTimes,
|
|
@@ -47,32 +47,32 @@ import {
|
|
|
47
47
|
mergeSampleTimes,
|
|
48
48
|
parseAt,
|
|
49
49
|
readMotionSpec
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-FH7WODJH.js";
|
|
50
|
+
} from "./chunk-H4VXLZ6O.js";
|
|
51
|
+
import "./chunk-ON2HYNGB.js";
|
|
53
52
|
import {
|
|
54
53
|
BrowserCleanupError,
|
|
55
54
|
closeManagedBrowser
|
|
56
55
|
} from "./chunk-B5FZ2CQM.js";
|
|
56
|
+
import "./chunk-FH7WODJH.js";
|
|
57
57
|
import "./chunk-ERTJPFCH.js";
|
|
58
58
|
import "./chunk-WPNE5NEP.js";
|
|
59
59
|
import {
|
|
60
60
|
resolveProject
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-WDUEIP22.js";
|
|
62
62
|
import "./chunk-K2FLNJVB.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-RGYEL7QD.js";
|
|
64
64
|
import "./chunk-X7MTZ4T2.js";
|
|
65
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-XWWYGXJ5.js";
|
|
66
66
|
import "./chunk-DQBY7FRR.js";
|
|
67
67
|
import {
|
|
68
68
|
resolveLocalBrowserGpuMode
|
|
69
69
|
} from "./chunk-SB5DX6AD.js";
|
|
70
70
|
import "./chunk-442JNXRM.js";
|
|
71
71
|
import "./chunk-XUHOIDKG.js";
|
|
72
|
-
import "./chunk-
|
|
73
|
-
import "./chunk-
|
|
74
|
-
import "./chunk-C6TPGUWD.js";
|
|
72
|
+
import "./chunk-5YSHR4XC.js";
|
|
73
|
+
import "./chunk-GIPNECWL.js";
|
|
75
74
|
import "./chunk-6JR2XUEE.js";
|
|
75
|
+
import "./chunk-C6TPGUWD.js";
|
|
76
76
|
import "./chunk-4ID635FL.js";
|
|
77
77
|
import {
|
|
78
78
|
recordArtifacts
|
|
@@ -92,8 +92,8 @@ import "./chunk-5CS4T6C6.js";
|
|
|
92
92
|
import {
|
|
93
93
|
trackCheckReport,
|
|
94
94
|
trackCommandFailure
|
|
95
|
-
} from "./chunk-
|
|
96
|
-
import "./chunk-
|
|
95
|
+
} from "./chunk-HM4PLNTX.js";
|
|
96
|
+
import "./chunk-KZPG4DXX.js";
|
|
97
97
|
import "./chunk-VWG7OQKU.js";
|
|
98
98
|
import "./chunk-QWQ6GQTI.js";
|
|
99
99
|
import {
|
|
@@ -118,12 +118,12 @@ import "./chunk-TJSTGSAW.js";
|
|
|
118
118
|
import "./chunk-Q5X2B5WT.js";
|
|
119
119
|
import {
|
|
120
120
|
withMeta
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-7ZKEOQ5N.js";
|
|
122
122
|
import "./chunk-K4WIOZFP.js";
|
|
123
123
|
import "./chunk-XUXGIA7H.js";
|
|
124
124
|
import "./chunk-WERLJGIC.js";
|
|
125
125
|
import "./chunk-ISN5GRYI.js";
|
|
126
|
-
import "./chunk-
|
|
126
|
+
import "./chunk-WNXVPPMV.js";
|
|
127
127
|
import "./chunk-EOVYQ3IG.js";
|
|
128
128
|
import "./chunk-XT6MXC7A.js";
|
|
129
129
|
import {
|
|
@@ -1555,7 +1555,7 @@ function resolveMotionSpec(projectDir) {
|
|
|
1555
1555
|
};
|
|
1556
1556
|
}
|
|
1557
1557
|
async function runBrowserCheck(project, options, motion, deadline) {
|
|
1558
|
-
const module = await import("./checkBrowser-
|
|
1558
|
+
const module = await import("./checkBrowser-XDTXDEYO.js");
|
|
1559
1559
|
return module.runBrowserCheck(project, options, motion, runAuditGrid, deadline);
|
|
1560
1560
|
}
|
|
1561
1561
|
async function writeSnapshot(projectDir, index, time, pngBase64) {
|
|
@@ -1567,7 +1567,7 @@ async function writeSnapshot(projectDir, index, time, pngBase64) {
|
|
|
1567
1567
|
return relative(projectDir, path);
|
|
1568
1568
|
}
|
|
1569
1569
|
async function captureFindingCrops(project, options, requests, deadline) {
|
|
1570
|
-
const module = await import("./checkBrowser-
|
|
1570
|
+
const module = await import("./checkBrowser-XDTXDEYO.js");
|
|
1571
1571
|
return module.captureFindingCrops(project, options, requests, deadline);
|
|
1572
1572
|
}
|
|
1573
1573
|
var DEFAULT_DEPENDENCIES2 = {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
auditClipDurations,
|
|
9
9
|
shouldIgnoreHttpError,
|
|
10
10
|
shouldIgnoreRequestFailure
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AHNJMWMU.js";
|
|
12
12
|
import {
|
|
13
13
|
checkSnapshotDirectory,
|
|
14
14
|
rectToBbox
|
|
@@ -17,7 +17,7 @@ import "./chunk-X7MTZ4T2.js";
|
|
|
17
17
|
import {
|
|
18
18
|
ambiguousIssue,
|
|
19
19
|
loadBrowserScript
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-H4VXLZ6O.js";
|
|
21
21
|
import {
|
|
22
22
|
AUDIT_SEEK_OPTIONS,
|
|
23
23
|
DEFAULT_ZOOM_PADDING_PX,
|
|
@@ -29,28 +29,28 @@ import {
|
|
|
29
29
|
resolveCliChromeGpuMode,
|
|
30
30
|
seekCompositionTimeline,
|
|
31
31
|
waitForPreferredSeekTarget
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-FH7WODJH.js";
|
|
32
|
+
} from "./chunk-ON2HYNGB.js";
|
|
34
33
|
import {
|
|
35
34
|
BrowserCleanupError,
|
|
36
35
|
closeManagedBrowser
|
|
37
36
|
} from "./chunk-B5FZ2CQM.js";
|
|
37
|
+
import "./chunk-FH7WODJH.js";
|
|
38
38
|
import "./chunk-ERTJPFCH.js";
|
|
39
39
|
import "./chunk-WPNE5NEP.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-WDUEIP22.js";
|
|
41
41
|
import "./chunk-K2FLNJVB.js";
|
|
42
42
|
import {
|
|
43
43
|
serveStaticProjectHtml
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RGYEL7QD.js";
|
|
45
45
|
import "./chunk-X7MTZ4T2.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-XWWYGXJ5.js";
|
|
47
47
|
import "./chunk-SB5DX6AD.js";
|
|
48
48
|
import "./chunk-442JNXRM.js";
|
|
49
49
|
import "./chunk-XUHOIDKG.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-C6TPGUWD.js";
|
|
50
|
+
import "./chunk-5YSHR4XC.js";
|
|
51
|
+
import "./chunk-GIPNECWL.js";
|
|
53
52
|
import "./chunk-6JR2XUEE.js";
|
|
53
|
+
import "./chunk-C6TPGUWD.js";
|
|
54
54
|
import {
|
|
55
55
|
FfmpegUnavailableError,
|
|
56
56
|
decideMediaProxyEligibility,
|
|
@@ -73,8 +73,8 @@ import "./chunk-AWDFDFI3.js";
|
|
|
73
73
|
import "./chunk-P6LJ4Y32.js";
|
|
74
74
|
import "./chunk-GMECXFAN.js";
|
|
75
75
|
import "./chunk-5CS4T6C6.js";
|
|
76
|
-
import "./chunk-
|
|
77
|
-
import "./chunk-
|
|
76
|
+
import "./chunk-HM4PLNTX.js";
|
|
77
|
+
import "./chunk-KZPG4DXX.js";
|
|
78
78
|
import "./chunk-VWG7OQKU.js";
|
|
79
79
|
import "./chunk-QWQ6GQTI.js";
|
|
80
80
|
import "./chunk-S3S4TGEH.js";
|
|
@@ -84,12 +84,12 @@ import "./chunk-ZTZA4UWZ.js";
|
|
|
84
84
|
import "./chunk-KLIKCX6Q.js";
|
|
85
85
|
import "./chunk-EOOEC32M.js";
|
|
86
86
|
import "./chunk-TJSTGSAW.js";
|
|
87
|
-
import "./chunk-
|
|
87
|
+
import "./chunk-7ZKEOQ5N.js";
|
|
88
88
|
import "./chunk-K4WIOZFP.js";
|
|
89
89
|
import "./chunk-XUXGIA7H.js";
|
|
90
90
|
import "./chunk-WERLJGIC.js";
|
|
91
91
|
import "./chunk-ISN5GRYI.js";
|
|
92
|
-
import "./chunk-
|
|
92
|
+
import "./chunk-WNXVPPMV.js";
|
|
93
93
|
import "./chunk-EOVYQ3IG.js";
|
|
94
94
|
import "./chunk-XT6MXC7A.js";
|
|
95
95
|
import "./chunk-PLEMSN3E.js";
|
|
@@ -19,7 +19,11 @@ import {
|
|
|
19
19
|
splitElementInHtml,
|
|
20
20
|
unwrapElementsFromHtml,
|
|
21
21
|
wrapElementsInHtml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GIPNECWL.js";
|
|
23
|
+
import {
|
|
24
|
+
MEDIA_LINK_ATTR,
|
|
25
|
+
relinkSplitHalves
|
|
26
|
+
} from "./chunk-6JR2XUEE.js";
|
|
23
27
|
import {
|
|
24
28
|
DEFAULT_TARGET_LUFS,
|
|
25
29
|
absoluteLoudnessPlan,
|
|
@@ -29,10 +33,6 @@ import {
|
|
|
29
33
|
requiredFfmpeg,
|
|
30
34
|
resolveLocalAudioPath
|
|
31
35
|
} from "./chunk-C6TPGUWD.js";
|
|
32
|
-
import {
|
|
33
|
-
MEDIA_LINK_ATTR,
|
|
34
|
-
relinkSplitHalves
|
|
35
|
-
} from "./chunk-6JR2XUEE.js";
|
|
36
36
|
import {
|
|
37
37
|
PROXY_PARAMS_VERSION,
|
|
38
38
|
PROXY_PENDING_RETRY_AFTER_SECONDS,
|