hyperframes 0.8.168 → 0.8.170
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-VCX3UE2B.js → add-KDCZCEMQ.js} +11 -11
- package/dist/{animatedGifPrep-TWD5BNVK.js → animatedGifPrep-MVP5LCEM.js} +5 -5
- package/dist/api.js +11 -11
- package/dist/{asset-BBJ3GAL7.js → asset-6VH3OCEC.js} +2 -2
- package/dist/{assetCataloger-S47GINRQ.js → assetCataloger-RN5A2SVA.js} +5 -5
- package/dist/{audio-MEDCANA3.js → audio-636CQSXK.js} +11 -11
- package/dist/{auth-LZYMCNTB.js → auth-AHLKM4M2.js} +1 -1
- package/dist/{autoUpdate-AXTW2NKX.js → autoUpdate-5UA6TJW7.js} +2 -2
- package/dist/{backgroundChecks-3YDYYI3D.js → backgroundChecks-DP242536.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-UDE7TOKY.js → batchRender-KWBVAUE3.js} +3 -3
- package/dist/{beats-HHXMPMGT.js → beats-HKY5L463.js} +4 -4
- package/dist/{benchmark-2BY7PBAP.js → benchmark-4YQDVIO5.js} +8 -8
- package/dist/{browser-CXB4KTJP.js → browser-7ZPWXEYW.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-M7CRHOS7.js → bundleWithLocalizedFonts-42V34HJF.js} +2 -2
- package/dist/{capture-WHG37ZLF.js → capture-572X5NDD.js} +9 -9
- package/dist/{capture-PRTE4Z7E.js → capture-VXMUZSBI.js} +2 -2
- package/dist/{catalog-WRM2373Z.js → catalog-PUUTHPP7.js} +11 -11
- package/dist/{catch-up-WHLD6E5F.js → catch-up-K6CV44WQ.js} +4 -4
- package/dist/{check-R5E7WLKF.js → check-MBDLSWCY.js} +35 -34
- package/dist/{checkBrowser-Y4CZVGIV.js → checkBrowser-33UWWDZG.js} +30 -30
- package/dist/{chunk-ID7B7NGN.js → chunk-2E7NDKTN.js} +1 -1
- package/dist/{chunk-EW2QBTYO.js → chunk-2UD6O6QG.js} +10 -7
- package/dist/{chunk-QKJ4KGNR.js → chunk-44GV6ZMC.js} +1 -1
- package/dist/{chunk-YTZA25TZ.js → chunk-4B6PUT4R.js} +1 -1
- package/dist/{chunk-N7QCMEQG.js → chunk-4RXJG3SY.js} +197 -26
- package/dist/chunk-6M3IPJS6.js +3803 -0
- package/dist/{chunk-TJSTGSAW.js → chunk-7FMUTGOH.js} +2 -77
- package/dist/{chunk-AQZZZTFL.js → chunk-AGHHZIZN.js} +1 -1
- package/dist/{chunk-FA3TWKZO.js → chunk-AUMJ3QSO.js} +2 -2
- package/dist/{chunk-ATOXD5VV.js → chunk-AWSVUIWG.js} +1 -1
- package/dist/{chunk-MD4S2RXW.js → chunk-BAW7UNLK.js} +9 -9
- package/dist/{chunk-RG66EU4L.js → chunk-CFBGKAKQ.js} +9 -9
- package/dist/{chunk-ATCB4PMO.js → chunk-EHDKCMKX.js} +1 -1
- package/dist/{chunk-LGCHE2F4.js → chunk-EJYBYR4C.js} +1 -1
- package/dist/{chunk-LUSWL6OJ.js → chunk-ERJHLFPD.js} +2 -2
- package/dist/{chunk-KDC5D5VM.js → chunk-FAORS3UR.js} +28 -13
- package/dist/{chunk-EEP5Y5IE.js → chunk-FE2XTCTM.js} +18 -1
- package/dist/{chunk-YULVV525.js → chunk-FSP2JNAP.js} +1 -1
- package/dist/{chunk-NT3WPYAU.js → chunk-G6GKIAEM.js} +3 -3
- package/dist/{chunk-4CIMRQQY.js → chunk-GBWSBTEE.js} +1 -1
- package/dist/{chunk-O7BABHM4.js → chunk-GG3V5BHG.js} +1 -1
- package/dist/{chunk-E7CIMKJS.js → chunk-GU5FLCZV.js} +1 -1
- package/dist/{chunk-XR3XDG7V.js → chunk-JAERN4RH.js} +1 -1
- package/dist/{chunk-2GSGFDEP.js → chunk-KUFEPCR3.js} +7 -7
- package/dist/{chunk-LZGRJDNJ.js → chunk-KUW4LWY6.js} +1 -1
- package/dist/{chunk-BTCUP5ZY.js → chunk-LMMFO5UV.js} +2 -2
- package/dist/{chunk-HL6GWREP.js → chunk-LWB3KZ5E.js} +1 -1
- package/dist/{chunk-EKEK3GOB.js → chunk-MSFON5DJ.js} +3 -3
- package/dist/{chunk-CDDIEZ4D.js → chunk-MXMIVNUE.js} +19 -23
- package/dist/{chunk-4WPRJ7ID.js → chunk-NSJLCWLG.js} +1 -1
- package/dist/{chunk-MOJKJ4K4.js → chunk-NYCJCQNY.js} +4 -4
- package/dist/{chunk-PYSGYMM4.js → chunk-OGVQJHNM.js} +2 -2
- package/dist/{chunk-C3WPYYGK.js → chunk-PCX3YF2U.js} +1 -1
- package/dist/{chunk-5VGEWXJL.js → chunk-PECICVTJ.js} +2 -2
- package/dist/{chunk-TW7H5CJO.js → chunk-PH3RS5X4.js} +2 -2
- package/dist/{chunk-XOODFU75.js → chunk-PP64Q43K.js} +1 -1
- package/dist/{chunk-DO3UPPO4.js → chunk-PXA4S6OE.js} +2 -2
- package/dist/{chunk-54MI3SGP.js → chunk-QO3JEPEW.js} +2 -2
- package/dist/{chunk-SYKPCN32.js → chunk-QZUVPWC4.js} +3 -1
- package/dist/{chunk-EXMTTXKQ.js → chunk-T56MM7RC.js} +2 -2
- package/dist/{chunk-BOT7PGM5.js → chunk-T5LGOTQR.js} +1 -1
- package/dist/{chunk-UWQL2MP4.js → chunk-UDDJQEGS.js} +25 -6
- package/dist/{chunk-BC2XZL6O.js → chunk-UQPH3Y45.js} +2 -2
- package/dist/{chunk-4PHDDZVL.js → chunk-UUP4KOMD.js} +4 -4
- package/dist/{chunk-BV2NH7ZA.js → chunk-V2T7FFPB.js} +1 -1
- package/dist/{chunk-CAHSX6IW.js → chunk-VKFYI7AQ.js} +182 -77
- package/dist/{chunk-2F7S7OK2.js → chunk-WICIV6R3.js} +23 -1
- package/dist/{chunk-4LXK7TOM.js → chunk-WLNNWLIE.js} +7 -7
- package/dist/{chunk-OQGORCT3.js → chunk-WZQSL7UX.js} +2 -2
- package/dist/{chunk-NYIKKCMC.js → chunk-X3U6KEID.js} +1 -1
- package/dist/{chunk-M4N6IHCQ.js → chunk-XRQBHOBT.js} +7 -1
- package/dist/{chunk-BWFUUGIZ.js → chunk-YFGJVADL.js} +10 -5
- package/dist/{chunk-VTBME36F.js → chunk-ZINH7YA2.js} +1 -1
- package/dist/{clean-UPXYD6VX.js → clean-5AXXHD45.js} +12 -12
- package/dist/cli.js +53 -53
- package/dist/{cloud-74GU7KDD.js → cloud-DQCCYKOB.js} +4 -4
- package/dist/{cloudrun-KHMVQL7C.js → cloudrun-CDFL5JBL.js} +9 -11
- package/dist/{compare-BG77ZXYF.js → compare-6RB5X3SO.js} +25 -25
- package/dist/{compiler-OSQ4L7FP.js → compiler-GU5GPO5A.js} +2 -2
- package/dist/{component-34PVECJG.js → component-7RRNNC5F.js} +3 -3
- package/dist/{compositions-KCVIKKSR.js → compositions-CANET3EJ.js} +9 -9
- package/dist/{delete-NU2ENZYQ.js → delete-KEZJPDWJ.js} +2 -2
- package/dist/{deterministicFonts-KXVO7QEL.js → deterministicFonts-RWGQPEZU.js} +2 -2
- package/dist/{dist-3VKMLNXT.js → dist-IDZRZHGE.js} +2 -2
- package/dist/{doctor-GVELHIHI.js → doctor-5RAEGA6G.js} +7 -7
- package/dist/{events-E6CVR42M.js → events-4ZJSJ76H.js} +2 -2
- package/dist/{events-UP3IQXPM.js → events-SHOWEHI5.js} +3 -3
- package/dist/{feedback-IRYQ4YKX.js → feedback-4IIGUUYZ.js} +6 -6
- package/dist/{figma-BLQBHAPG.js → figma-BFDECPE5.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{get-HESG62RX.js → get-BO32YZUQ.js} +2 -2
- package/dist/{gpuPolicy-CHXUX2ZT.js → gpuPolicy-QWJYZLVJ.js} +5 -5
- package/dist/{grade-compare-ZDJMJUYY.js → grade-compare-SW4SAG5R.js} +25 -25
- package/dist/{help-2BQBFF4Z.js → help-7AMSMPUF.js} +1 -1
- package/dist/{history-4IZQ6NRV.js → history-VXAQFJJV.js} +6 -6
- package/dist/hyperframe-runtime.js +63 -62
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +63 -62
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-JNGAI3JU.js → info-KN4TX6T5.js} +7 -7
- package/dist/{init-ZQO6G5C7.js → init-7A2T7LDW.js} +20 -20
- package/dist/{inspect-DWMKJEVE.js → inspect-CCCV6JFV.js} +26 -26
- package/dist/{installer-UKZT4SKK.js → installer-ZCCZUOPN.js} +4 -4
- package/dist/{keyframes-FC273E5N.js → keyframes-K6XNZGK3.js} +6 -6
- package/dist/{lambda-GSZCV77P.js → lambda-B2K237DX.js} +10 -12
- package/dist/{layout-ASSCBJCO.js → layout-HAPR5OV4.js} +26 -26
- package/dist/{lint-PSCEVVNL.js → lint-3COFAXAJ.js} +6 -6
- package/dist/{list-KO4N2VJL.js → list-QCNHO7DR.js} +2 -2
- package/dist/{login-ZJEBRFV5.js → login-BAFYZS6W.js} +4 -4
- package/dist/{media-treatment-HGHLLZR3.js → media-treatment-C53ZBW2B.js} +8 -8
- package/dist/{models-NTAVDCAV.js → models-INX67ETR.js} +8 -8
- package/dist/{motionShot-SJENYTRO.js → motionShot-UOS26VLB.js} +13 -13
- package/dist/{normalize-audio-PQIC7IPK.js → normalize-audio-I7HGJGA5.js} +4 -4
- package/dist/{open-EI7UEAZZ.js → open-RFXGV4RY.js} +4 -4
- package/dist/{parakeetRunner-7SDEI3IZ.js → parakeetRunner-PCCBODBS.js} +8 -8
- package/dist/{pipeline-EXHHCUE7.js → pipeline-GDC7SL5N.js} +5 -5
- package/dist/{play-Y4EMM2OJ.js → play-DRCWK35L.js} +17 -17
- package/dist/{present-LFMGQGX6.js → present-HUJV553D.js} +13 -13
- package/dist/{preview-EYQG7L6X.js → preview-CZENYIGN.js} +15 -15
- package/dist/{producer-FKOEAHJW.js → producer-23NJEJRO.js} +1 -1
- package/dist/{projectConfig-SXW3QMZE.js → projectConfig-R3FCIARW.js} +6 -6
- package/dist/{publication-ZC4LDEXQ.js → publication-GY3OJ6VH.js} +2 -2
- package/dist/{publish-4ZCLHA5W.js → publish-XBW4NVFY.js} +7 -7
- package/dist/{remove-background-IGDRS2QV.js → remove-background-Q7CQ3PJF.js} +6 -6
- package/dist/{render-ZN777RDD.js → render-24JWWXMA.js} +3 -3
- package/dist/{render-TA3DG3LZ.js → render-DOHHCT2G.js} +8 -8
- package/dist/{render-QJCBJQOM.js → render-WWAXTKYR.js} +23 -23
- package/dist/{render-batch-2JQNFAL4.js → render-batch-EK4ZBQHH.js} +3 -3
- package/dist/renderSetupWorker.js +9 -1
- package/dist/{resolver-JZF5G6YC.js → resolver-5Y6VNMTC.js} +4 -4
- package/dist/{sherpa-MDVSUF6Y.js → sherpa-VMADZBF7.js} +7 -7
- package/dist/skills/media-use/SKILL.md +3 -3
- package/dist/skills/media-use/audio/references/requirements.md +7 -7
- package/dist/skills/media-use/audio/references/sfx.md +19 -13
- package/dist/skills/media-use/audio/scripts/audio.mjs +9 -9
- package/dist/skills/media-use/audio/scripts/audio.test.mjs +17 -10
- package/dist/skills/media-use/audio/scripts/lib/media-record.mjs +7 -3
- package/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +22 -3
- package/dist/skills/media-use/audio/scripts/lib/openverse.mjs +134 -0
- package/dist/skills/media-use/audio/scripts/lib/sfx.mjs +120 -89
- package/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +222 -12
- package/dist/skills/media-use/references/audio.md +1 -1
- package/dist/skills/media-use/references/resolve.md +1 -1
- package/dist/skills/media-use/references/setup-providers.md +13 -12
- package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +4 -7
- package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +5 -5
- package/dist/skills/media-use/scripts/lib/manifest.d.mts +1 -0
- package/dist/skills/media-use/scripts/lib/manifest.mjs +9 -6
- package/dist/skills/media-use/scripts/lib/openverse.mjs +134 -0
- package/dist/skills/media-use/scripts/lib/openverse.test.mjs +219 -0
- package/dist/skills/media-use/scripts/lib/registry.mjs +4 -2
- package/dist/skills/media-use/scripts/lib/registry.test.mjs +13 -13
- package/dist/skills/media-use/scripts/lib/sfx-provider.mjs +23 -13
- package/dist/skills/media-use/scripts/resolve.mjs +45 -55
- package/dist/{skills-JVNMX37H.js → skills-ONFYYL6R.js} +5 -5
- package/dist/{skillsUpdateCheck-KNTQFGOI.js → skillsUpdateCheck-JTHZOHRT.js} +3 -3
- package/dist/{snapshot-RDQTFIPX.js → snapshot-SUA62VQ2.js} +28 -28
- package/dist/{src-ZPEZRIUC.js → src-J6KABXGZ.js} +8 -8
- package/dist/{src-5XO7KBBL.js → src-VFTQPSQD.js} +4 -4
- package/dist/{staticProjectServer-RLERPIY6.js → staticProjectServer-XQPUABYX.js} +13 -13
- package/dist/studio/assets/{hyperframes-player-mYPt9XVX.js → hyperframes-player-Dsmhm7Q8.js} +1 -1
- package/dist/studio/assets/{index-B-v5xQjD.js → index-CV00F8qG.js} +4 -4
- package/dist/studio/assets/{index-DtHmIKM0.js → index-DT1wigvW.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-4INCUOCU.js → studio-api-MBDDFEA2.js} +7 -7
- package/dist/{studioServer-DMDE7IZU.js → studioServer-7HWDCLKT.js} +38 -38
- package/dist/{telemetry-4Y5DYI6H.js → telemetry-763NW3QF.js} +3 -3
- package/dist/{timeline-XJRKELVE.js → timeline-ZLFPNI27.js} +15 -15
- package/dist/{tokens-G4VKTABI.js → tokens-RXJLVZKD.js} +2 -2
- package/dist/{transcribe-JRSQRPVH.js → transcribe-IM5UNBSH.js} +6 -6
- package/dist/{transcribe-Y46B2ZVD.js → transcribe-UDISJXCZ.js} +12 -12
- package/dist/{updateCheck-NGYDWGQL.js → updateCheck-V2RXHFQL.js} +2 -2
- package/dist/{upgrade-M2LQP5S7.js → upgrade-MJI3EW3W.js} +2 -2
- package/dist/{urlDownloader-UFDUP3VF.js → urlDownloader-BOLOMGC7.js} +4 -4
- package/dist/{validate-B3AUFCC5.js → validate-IM5NPJHI.js} +20 -20
- package/dist/{video-WLCNVSVU.js → video-HUNOZDLT.js} +5 -5
- package/package.json +1 -1
- package/dist/chunk-QE7XLLGT.js +0 -3803
|
@@ -11,7 +11,6 @@ import { existsSync, lstatSync, readdirSync, realpathSync } from "fs";
|
|
|
11
11
|
import { homedir, platform } from "os";
|
|
12
12
|
import { join, resolve } from "path";
|
|
13
13
|
var SYSTEM_FONT_SIZE_LIMIT = 5 * 1024 * 1024;
|
|
14
|
-
var PROFILER_TIMEOUT_MS = 5e3;
|
|
15
14
|
var FC_MATCH_TIMEOUT_MS = 3e3;
|
|
16
15
|
var FONT_EXT_RE = /\.(otf|ttf|ttc|woff2?)$/i;
|
|
17
16
|
var FORMAT_PRIORITY = {
|
|
@@ -178,59 +177,6 @@ function pickBestCandidate(candidates) {
|
|
|
178
177
|
const best = candidates[0];
|
|
179
178
|
return { path: best.path, format: best.format };
|
|
180
179
|
}
|
|
181
|
-
var profilerCache = null;
|
|
182
|
-
function getSystemProfilerIndex() {
|
|
183
|
-
if (profilerCache)
|
|
184
|
-
return profilerCache;
|
|
185
|
-
profilerCache = /* @__PURE__ */ new Map();
|
|
186
|
-
if (platform() !== "darwin")
|
|
187
|
-
return profilerCache;
|
|
188
|
-
try {
|
|
189
|
-
const raw = execFileSync("system_profiler", ["SPFontsDataType", "-json"], {
|
|
190
|
-
encoding: "utf8",
|
|
191
|
-
maxBuffer: 12 * 1024 * 1024,
|
|
192
|
-
timeout: PROFILER_TIMEOUT_MS
|
|
193
|
-
});
|
|
194
|
-
const parsed = JSON.parse(raw);
|
|
195
|
-
if (!parsed?.SPFontsDataType || !Array.isArray(parsed.SPFontsDataType))
|
|
196
|
-
return profilerCache;
|
|
197
|
-
for (const fontEntry of parsed.SPFontsDataType) {
|
|
198
|
-
if (!fontEntry?.typefaces || !Array.isArray(fontEntry.typefaces))
|
|
199
|
-
continue;
|
|
200
|
-
for (const typeface of fontEntry.typefaces) {
|
|
201
|
-
if (!typeface)
|
|
202
|
-
continue;
|
|
203
|
-
const family = typeface.family ?? typeface.fullname ?? typeface._name;
|
|
204
|
-
if (typeof family !== "string")
|
|
205
|
-
continue;
|
|
206
|
-
const filePath = typeface.path;
|
|
207
|
-
if (typeof filePath !== "string" || !FONT_EXT_RE.test(filePath))
|
|
208
|
-
continue;
|
|
209
|
-
const normalized = normalizeName(family);
|
|
210
|
-
const ext = filePath.match(FONT_EXT_RE)?.[1] ?? "ttf";
|
|
211
|
-
const entry = {
|
|
212
|
-
family: normalized,
|
|
213
|
-
path: filePath,
|
|
214
|
-
format: extensionToFormat(ext),
|
|
215
|
-
isRegular: isRegularWeight(filePath)
|
|
216
|
-
};
|
|
217
|
-
const list = profilerCache.get(normalized) ?? [];
|
|
218
|
-
list.push(entry);
|
|
219
|
-
profilerCache.set(normalized, list);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
} catch {
|
|
223
|
-
}
|
|
224
|
-
return profilerCache;
|
|
225
|
-
}
|
|
226
|
-
function locateViaSystemProfiler(targetFamily) {
|
|
227
|
-
const index = getSystemProfilerIndex();
|
|
228
|
-
const entries = index.get(targetFamily);
|
|
229
|
-
if (!entries || entries.length === 0)
|
|
230
|
-
return null;
|
|
231
|
-
const candidates = entries.filter((e) => isRegularFile(e.path) && isPathBounded(e.path)).map((e) => ({ path: e.path, format: e.format, isRegular: e.isRegular }));
|
|
232
|
-
return pickBestCandidate(candidates);
|
|
233
|
-
}
|
|
234
180
|
function locateViaFcMatch(targetFamily) {
|
|
235
181
|
if (platform() !== "linux")
|
|
236
182
|
return null;
|
|
@@ -258,11 +204,7 @@ function locateSystemFont(family) {
|
|
|
258
204
|
const cached = cache.get(normalized);
|
|
259
205
|
if (cached !== void 0)
|
|
260
206
|
return cached;
|
|
261
|
-
let result =
|
|
262
|
-
result = locateViaSystemProfiler(normalized);
|
|
263
|
-
if (!result) {
|
|
264
|
-
result = locateViaFcMatch(normalized);
|
|
265
|
-
}
|
|
207
|
+
let result = locateViaFcMatch(normalized);
|
|
266
208
|
if (!result) {
|
|
267
209
|
const allCandidates = [];
|
|
268
210
|
for (const dir of fontDirectories()) {
|
|
@@ -308,18 +250,6 @@ function locateSystemFontVariants(family) {
|
|
|
308
250
|
if (!normalized)
|
|
309
251
|
return [];
|
|
310
252
|
const variants = [];
|
|
311
|
-
const profilerIndex = getSystemProfilerIndex();
|
|
312
|
-
const profilerEntries = profilerIndex.get(normalized);
|
|
313
|
-
if (profilerEntries && profilerEntries.length > 0) {
|
|
314
|
-
for (const e of profilerEntries) {
|
|
315
|
-
if (!isRegularFile(e.path) || !isPathBounded(e.path))
|
|
316
|
-
continue;
|
|
317
|
-
const { weight, style } = inferWeightAndStyle(e.path);
|
|
318
|
-
variants.push({ path: e.path, format: e.format, weight, style });
|
|
319
|
-
}
|
|
320
|
-
if (variants.length > 0)
|
|
321
|
-
return dedupeVariants(variants);
|
|
322
|
-
}
|
|
323
253
|
const allCandidates = [];
|
|
324
254
|
for (const dir of fontDirectories()) {
|
|
325
255
|
allCandidates.push(...collectCandidatesFromDir(dir, normalized));
|
|
@@ -339,16 +269,11 @@ function dedupeVariants(variants) {
|
|
|
339
269
|
}
|
|
340
270
|
return Array.from(seen.values());
|
|
341
271
|
}
|
|
342
|
-
function getSystemProfilerFamilies() {
|
|
343
|
-
const index = getSystemProfilerIndex();
|
|
344
|
-
return Array.from(index.keys());
|
|
345
|
-
}
|
|
346
272
|
|
|
347
273
|
export {
|
|
348
274
|
SYSTEM_FONT_SIZE_LIMIT,
|
|
349
275
|
fontDirectories,
|
|
350
276
|
collectFontFileEntries,
|
|
351
277
|
locateSystemFont,
|
|
352
|
-
locateSystemFontVariants
|
|
353
|
-
getSystemProfilerFamilies
|
|
278
|
+
locateSystemFontVariants
|
|
354
279
|
};
|
|
@@ -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-MXMIVNUE.js";
|
|
10
10
|
import {
|
|
11
11
|
injectTagsAtHeadStart
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6M3IPJS6.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/compositionServer.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -10,21 +10,21 @@ import {
|
|
|
10
10
|
seekCompositionTimeline,
|
|
11
11
|
waitForCompositionFonts,
|
|
12
12
|
waitForRuntimeReady
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2UD6O6QG.js";
|
|
14
14
|
import {
|
|
15
15
|
gotoWhenSent,
|
|
16
16
|
launchManagedBrowser,
|
|
17
17
|
resolveManagedGpuMode
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UDDJQEGS.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveDiagnosticNavigationTimeoutMs
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LMMFO5UV.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveProject
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-EJYBYR4C.js";
|
|
25
25
|
import {
|
|
26
26
|
serveStaticProjectHtml
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MSFON5DJ.js";
|
|
28
28
|
import {
|
|
29
29
|
defineCommand
|
|
30
30
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
printDeprecationNotice,
|
|
40
40
|
withMeta
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-GG3V5BHG.js";
|
|
42
42
|
import {
|
|
43
43
|
normalizeErrorMessage
|
|
44
44
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -709,7 +709,7 @@ async function collectTweenBoundaries(page) {
|
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
711
|
async function bundleProjectHtml(projectDir) {
|
|
712
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
712
|
+
const { bundleToSingleHtml } = await import("./compiler-GU5GPO5A.js");
|
|
713
713
|
return bundleToSingleHtml(projectDir);
|
|
714
714
|
}
|
|
715
715
|
async function alignViewportToComposition(page, url) {
|
|
@@ -728,13 +728,13 @@ async function alignViewportToComposition(page, url) {
|
|
|
728
728
|
async function runLayoutAudit(projectDir, opts) {
|
|
729
729
|
const { ensureBrowser } = await import("./manager-HEUPD2YB.js");
|
|
730
730
|
const puppeteer = await import("puppeteer-core");
|
|
731
|
-
const { buildChromeArgs } = await import("./src-
|
|
731
|
+
const { buildChromeArgs } = await import("./src-VFTQPSQD.js");
|
|
732
732
|
const {
|
|
733
733
|
assertWebGpuAdapterAvailable,
|
|
734
734
|
compositionRequiresWebGpu,
|
|
735
735
|
resolveLocalBrowserGpuMode,
|
|
736
736
|
resolveLocalWebGpu
|
|
737
|
-
} = await import("./gpuPolicy-
|
|
737
|
+
} = await import("./gpuPolicy-QWJYZLVJ.js");
|
|
738
738
|
const html = await bundleProjectHtml(projectDir);
|
|
739
739
|
const server = await serveStaticProjectHtml(
|
|
740
740
|
projectDir,
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
resolveCliChromeGpuMode,
|
|
10
10
|
seekCompositionTimeline,
|
|
11
11
|
waitForRuntimeReady
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2UD6O6QG.js";
|
|
13
13
|
import {
|
|
14
14
|
launchManagedBrowser,
|
|
15
15
|
resolveManagedGpuMode
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UDDJQEGS.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveCompositionViewportFromHtml
|
|
19
19
|
} from "./chunk-FH7WODJH.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveProject
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EJYBYR4C.js";
|
|
23
23
|
import {
|
|
24
24
|
defineCommand
|
|
25
25
|
} from "./chunk-S3S4TGEH.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
printDeprecationNotice,
|
|
35
35
|
withMeta
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GG3V5BHG.js";
|
|
37
37
|
import {
|
|
38
38
|
decodeWellFormedEscapes
|
|
39
39
|
} from "./chunk-BSQ7XANM.js";
|
|
@@ -228,7 +228,7 @@ function extractCompositionErrorsFromLint(lintResult) {
|
|
|
228
228
|
async function localizeRemoteAssets(html) {
|
|
229
229
|
let dir;
|
|
230
230
|
try {
|
|
231
|
-
const { loadProducer } = await import("./producer-
|
|
231
|
+
const { loadProducer } = await import("./producer-23NJEJRO.js");
|
|
232
232
|
const { localizeRemoteMediaSources, localizeRemoteImageSources, localizeRemoteFontFaces } = await loadProducer();
|
|
233
233
|
dir = mkdtempSync(join(tmpdir(), "hf-validate-assets-"));
|
|
234
234
|
const assetDir = dir;
|
|
@@ -249,9 +249,9 @@ async function localizeRemoteAssets(html) {
|
|
|
249
249
|
}
|
|
250
250
|
async function validateInBrowser(project, opts) {
|
|
251
251
|
const projectDir = project.dir;
|
|
252
|
-
const { bundleToSingleHtml } = await import("./compiler-
|
|
252
|
+
const { bundleToSingleHtml } = await import("./compiler-GU5GPO5A.js");
|
|
253
253
|
const { ensureBrowser } = await import("./manager-HEUPD2YB.js");
|
|
254
|
-
const { serveStaticProjectHtml } = await import("./staticProjectServer-
|
|
254
|
+
const { serveStaticProjectHtml } = await import("./staticProjectServer-XQPUABYX.js");
|
|
255
255
|
const { lintProject } = await import("./lintProject-PXB5Y6TX.js");
|
|
256
256
|
const lintResult = await lintProject(projectDir);
|
|
257
257
|
const compositionErrors = extractCompositionErrorsFromLint(lintResult);
|
|
@@ -273,9 +273,9 @@ async function validateInBrowser(project, opts) {
|
|
|
273
273
|
try {
|
|
274
274
|
const browser = await ensureBrowser();
|
|
275
275
|
const puppeteer = await import("puppeteer-core");
|
|
276
|
-
const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-
|
|
276
|
+
const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-VFTQPSQD.js");
|
|
277
277
|
const requestedGpuMode = resolveCliChromeGpuMode();
|
|
278
|
-
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-
|
|
278
|
+
const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-QWJYZLVJ.js");
|
|
279
279
|
const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
|
|
280
280
|
const requiresWebGpu = compositionRequiresWebGpu(html);
|
|
281
281
|
const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
SDR_RGB_TO_BT709_FILTER,
|
|
21
21
|
SDR_RGB_TO_TAGGED_BT709_FILTER,
|
|
22
22
|
renderProvenanceArgs
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VKFYI7AQ.js";
|
|
24
24
|
|
|
25
25
|
// src/background-removal/pipeline.ts
|
|
26
26
|
import { spawn } from "child_process";
|
|
@@ -270,7 +270,7 @@ function inferInputKind(inputPath) {
|
|
|
270
270
|
}
|
|
271
271
|
async function probeMedia(inputPath) {
|
|
272
272
|
const isImage = inferInputKind(inputPath) === "image";
|
|
273
|
-
const engine = await import("./src-
|
|
273
|
+
const engine = await import("./src-VFTQPSQD.js");
|
|
274
274
|
const meta = await engine.extractMediaMetadata(inputPath);
|
|
275
275
|
if (isImage) {
|
|
276
276
|
return { width: meta.width, height: meta.height, fps: 0, frameCount: 1 };
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
stripEmbeddedRuntimeScripts,
|
|
41
41
|
styleElementsFor,
|
|
42
42
|
warnUnknownEnumValues
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-6M3IPJS6.js";
|
|
44
44
|
import {
|
|
45
45
|
cssVariableName
|
|
46
46
|
} from "./chunk-VC76R6W2.js";
|
|
@@ -134,6 +134,7 @@ import { createHash } from "crypto";
|
|
|
134
134
|
// ../core/dist/sceneParts.js
|
|
135
135
|
var SCENE_PART_ATTR = "data-hf-scene";
|
|
136
136
|
var SCENE_PARTS_META = "hf-scene-parts";
|
|
137
|
+
var SCENE_FONTS_ATTR = "data-hf-scene-fonts";
|
|
137
138
|
var SCENE_NO_SWAP_ATTR = "data-hf-scene-no-swap";
|
|
138
139
|
|
|
139
140
|
// ../core/dist/compiler/externalScripts.js
|
|
@@ -721,7 +722,12 @@ function fontFaceKey(atRule) {
|
|
|
721
722
|
});
|
|
722
723
|
return decls.join(";");
|
|
723
724
|
}
|
|
724
|
-
|
|
725
|
+
var dedupeFontFaceRules = (styleTexts) => dropFontFaces(styleTexts);
|
|
726
|
+
function hoistFontFaceRules(styleTexts) {
|
|
727
|
+
const faces = [];
|
|
728
|
+
return { styles: dropFontFaces(styleTexts, faces), faces };
|
|
729
|
+
}
|
|
730
|
+
function dropFontFaces(styleTexts, hoisted) {
|
|
725
731
|
const seen = /* @__PURE__ */ new Set();
|
|
726
732
|
return [...styleTexts].reverse().map((css) => {
|
|
727
733
|
if (!css || !/@font-face/i.test(css))
|
|
@@ -737,12 +743,14 @@ function dedupeFontFaceRules(styleTexts) {
|
|
|
737
743
|
if (!isFontFaceAtRule(node))
|
|
738
744
|
continue;
|
|
739
745
|
const key = fontFaceKey(node);
|
|
740
|
-
if (seen.has(key)) {
|
|
741
|
-
node.remove();
|
|
742
|
-
changed = true;
|
|
743
|
-
} else {
|
|
746
|
+
if (!seen.has(key)) {
|
|
744
747
|
seen.add(key);
|
|
748
|
+
if (!hoisted)
|
|
749
|
+
continue;
|
|
750
|
+
hoisted.unshift(node.toString());
|
|
745
751
|
}
|
|
752
|
+
node.remove();
|
|
753
|
+
changed = true;
|
|
746
754
|
}
|
|
747
755
|
return changed ? root.toResult({ map: false }).css : css;
|
|
748
756
|
}).reverse();
|
|
@@ -2859,12 +2867,17 @@ async function bundleProject(projectDir, options) {
|
|
|
2859
2867
|
if (srcset)
|
|
2860
2868
|
el.setAttribute("srcset", rewriteSrcsetWithInlinedAssets(srcset, projectDir, inlineAssets));
|
|
2861
2869
|
}
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2870
|
+
const liveStyles = [...document.querySelectorAll("style")].filter(isAlwaysAppliedStyle);
|
|
2871
|
+
const liveCss = liveStyles.map((el) => el.textContent || "");
|
|
2872
|
+
const { styles, faces } = options?.sceneParts ? hoistFontFaceRules(liveCss) : { styles: dedupeFontFaceRules(liveCss), faces: [] };
|
|
2873
|
+
liveStyles.forEach((el, i) => {
|
|
2874
|
+
el.textContent = styles[i] ?? "";
|
|
2875
|
+
});
|
|
2876
|
+
if (faces.length > 0) {
|
|
2877
|
+
const holder = document.createElement("style");
|
|
2878
|
+
holder.setAttribute(SCENE_FONTS_ATTR, "");
|
|
2879
|
+
holder.textContent = faces.join("\n");
|
|
2880
|
+
document.head.prepend(holder);
|
|
2868
2881
|
}
|
|
2869
2882
|
for (const styleEl of document.querySelectorAll("style")) {
|
|
2870
2883
|
styleEl.textContent = rewriteCssUrlsWithInlinedAssets(styleEl.textContent || "", projectDir, inlineAssets);
|
|
@@ -3104,7 +3117,9 @@ function addScenePartsManifest(html, ignore = []) {
|
|
|
3104
3117
|
}
|
|
3105
3118
|
for (const el of parts)
|
|
3106
3119
|
el.replaceWith(doc.createComment(`hf-scene:${el.getAttribute(SCENE_PART_ATTR)}`));
|
|
3107
|
-
for (const el of ignore.flatMap((sel) => [
|
|
3120
|
+
for (const el of [...ignore, `style[${SCENE_FONTS_ATTR}]`].flatMap((sel) => [
|
|
3121
|
+
...doc.querySelectorAll(sel)
|
|
3122
|
+
]))
|
|
3108
3123
|
el.remove();
|
|
3109
3124
|
const manifest = {
|
|
3110
3125
|
shared: hash(doc.toString()),
|
|
@@ -4,6 +4,9 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
c
|
|
9
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
7
10
|
import {
|
|
8
11
|
VALID_CANVAS_RESOLUTIONS,
|
|
9
12
|
resolveResolutionFlagPair
|
|
@@ -23,6 +26,20 @@ function parseOutputResolutionFlag(raw, options) {
|
|
|
23
26
|
);
|
|
24
27
|
}
|
|
25
28
|
|
|
29
|
+
// src/utils/missingPackage.ts
|
|
30
|
+
function isMissingPackageError(error, pkg) {
|
|
31
|
+
return error?.code === "ERR_MODULE_NOT_FOUND" && error instanceof Error && error.message.includes(`Cannot find package '${pkg}'`);
|
|
32
|
+
}
|
|
33
|
+
function missingPackageMessage(pkg, command) {
|
|
34
|
+
return `${c.error(`${pkg} is not installed.`)} The ${c.accent(command)} command needs it at runtime.
|
|
35
|
+
Install it alongside the CLI:
|
|
36
|
+
${c.accent(`npm install -g ${pkg}`)}
|
|
37
|
+
Or, for an opt-in project setup:
|
|
38
|
+
${c.accent(`npm install ${pkg}`)}`;
|
|
39
|
+
}
|
|
40
|
+
|
|
26
41
|
export {
|
|
27
|
-
parseOutputResolutionFlag
|
|
42
|
+
parseOutputResolutionFlag,
|
|
43
|
+
isMissingPackageError,
|
|
44
|
+
missingPackageMessage
|
|
28
45
|
};
|
|
@@ -32,21 +32,21 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
getUpdateMeta,
|
|
34
34
|
withMeta
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GG3V5BHG.js";
|
|
36
36
|
import {
|
|
37
37
|
CONFIG_PATH,
|
|
38
38
|
withFileLock
|
|
39
39
|
} from "./chunk-XUXGIA7H.js";
|
|
40
40
|
import {
|
|
41
41
|
VERSION
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-UQPH3Y45.js";
|
|
43
43
|
import {
|
|
44
44
|
OPTIONAL_PACKAGES,
|
|
45
45
|
installedOptionalPackageVersion
|
|
46
46
|
} from "./chunk-3DKN5WKL.js";
|
|
47
47
|
import {
|
|
48
48
|
resolveExtractCacheDir
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-VKFYI7AQ.js";
|
|
50
50
|
import {
|
|
51
51
|
normalizeErrorMessage
|
|
52
52
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -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-EJYBYR4C.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_HISTORY_ROOT,
|
|
12
12
|
HistoryBusyError,
|
|
@@ -113,14 +113,14 @@ function previewOwner(route) {
|
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
async function directOwner(projectDir) {
|
|
116
|
+
async function directOwner(projectDir, ownerWaitMs = historyDeps.ownerWaitMs) {
|
|
117
117
|
let turn = null;
|
|
118
118
|
const history = await openProjectHistory({
|
|
119
119
|
projectDir,
|
|
120
120
|
historyRoot: historyDeps.historyRoot,
|
|
121
121
|
now: () => historyDeps.now(),
|
|
122
122
|
pruneGoneProjectsBudgetMs: 1e3,
|
|
123
|
-
ownerWaitMs
|
|
123
|
+
ownerWaitMs,
|
|
124
124
|
closedWindowAfterOwnership: () => {
|
|
125
125
|
turn = readTurn(projectDir);
|
|
126
126
|
return turn ? {
|
|
@@ -151,7 +151,7 @@ async function directOwner(projectDir) {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
async function connect(projectDir) {
|
|
154
|
+
async function connect(projectDir, ownerWaitMs) {
|
|
155
155
|
const server = await historyDeps.findServer(projectDir);
|
|
156
156
|
if (server) {
|
|
157
157
|
const route = (path) => studioApiUrl(server, `history${path}`);
|
|
@@ -161,11 +161,11 @@ async function connect(projectDir) {
|
|
|
161
161
|
);
|
|
162
162
|
if (status !== 404) return { owner: previewOwner(route), turn: readTurn(projectDir) };
|
|
163
163
|
}
|
|
164
|
-
return directOwner(projectDir);
|
|
164
|
+
return directOwner(projectDir, ownerWaitMs);
|
|
165
165
|
}
|
|
166
|
-
async function withOwner(dir, task) {
|
|
166
|
+
async function withOwner(dir, task, { ownerWaitMs } = {}) {
|
|
167
167
|
const { dir: projectDir } = resolveProject(dir);
|
|
168
|
-
const { owner, turn } = await connect(projectDir);
|
|
168
|
+
const { owner, turn } = await connect(projectDir, ownerWaitMs);
|
|
169
169
|
try {
|
|
170
170
|
return await task(owner, turn, projectDir);
|
|
171
171
|
} finally {
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
readCompositionFps
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JAERN4RH.js";
|
|
10
10
|
import {
|
|
11
11
|
errorBox
|
|
12
12
|
} from "./chunk-K2FLNJVB.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-PBN6GBJE.js";
|
|
16
16
|
import {
|
|
17
17
|
parseFps
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QZUVPWC4.js";
|
|
19
19
|
|
|
20
20
|
// src/browser/windowsCrash.ts
|
|
21
21
|
var STATUS_STACK_BUFFER_OVERRUN_DEC = "3221225595";
|
|
@@ -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-SHOWEHI5.js");
|
|
1282
1282
|
trackCommandFailure(
|
|
1283
1283
|
command,
|
|
1284
1284
|
err,
|
|
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getMimeType,
|
|
9
9
|
injectMediaCodecMapIntoHtml
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MXMIVNUE.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-AGHHZIZN.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveAutoProxy
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PCX3YF2U.js";
|
|
25
25
|
import {
|
|
26
26
|
decodeWellFormedEscapes
|
|
27
27
|
} from "./chunk-BSQ7XANM.js";
|