hyperframes 0.6.63 → 0.6.64
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/cli.js +25 -11
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ var VERSION;
|
|
|
50
50
|
var init_version = __esm({
|
|
51
51
|
"src/version.ts"() {
|
|
52
52
|
"use strict";
|
|
53
|
-
VERSION = true ? "0.6.
|
|
53
|
+
VERSION = true ? "0.6.64" : "0.0.0-dev";
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
@@ -36438,6 +36438,19 @@ function extractCompositionIdsFromCss(css) {
|
|
|
36438
36438
|
}
|
|
36439
36439
|
return [...ids];
|
|
36440
36440
|
}
|
|
36441
|
+
function extractTimelineRegistryKeys(source) {
|
|
36442
|
+
const keys2 = /* @__PURE__ */ new Set();
|
|
36443
|
+
let match;
|
|
36444
|
+
const pattern = new RegExp(
|
|
36445
|
+
TIMELINE_REGISTRY_KEY_PATTERN.source,
|
|
36446
|
+
TIMELINE_REGISTRY_KEY_PATTERN.flags
|
|
36447
|
+
);
|
|
36448
|
+
while ((match = pattern.exec(source)) !== null) {
|
|
36449
|
+
const key2 = match[1] ?? match[2];
|
|
36450
|
+
if (key2) keys2.add(key2);
|
|
36451
|
+
}
|
|
36452
|
+
return [...keys2];
|
|
36453
|
+
}
|
|
36441
36454
|
function getInlineScriptSyntaxError(source) {
|
|
36442
36455
|
if (!source.trim()) return null;
|
|
36443
36456
|
try {
|
|
@@ -36457,7 +36470,7 @@ function truncateSnippet(value, maxLength = 220) {
|
|
|
36457
36470
|
if (normalized.length <= maxLength) return normalized;
|
|
36458
36471
|
return `${normalized.slice(0, maxLength - 3)}...`;
|
|
36459
36472
|
}
|
|
36460
|
-
var TAG_PATTERN, STYLE_BLOCK_PATTERN, SCRIPT_BLOCK_PATTERN, COMPOSITION_ID_IN_CSS_PATTERN, TIMELINE_REGISTRY_INIT_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, WINDOW_TIMELINE_ASSIGN_PATTERN, INVALID_SCRIPT_CLOSE_PATTERN;
|
|
36473
|
+
var TAG_PATTERN, STYLE_BLOCK_PATTERN, SCRIPT_BLOCK_PATTERN, COMPOSITION_ID_IN_CSS_PATTERN, TIMELINE_REGISTRY_INIT_PATTERN, TIMELINE_REGISTRY_ASSIGN_PATTERN, WINDOW_TIMELINE_ASSIGN_PATTERN, INVALID_SCRIPT_CLOSE_PATTERN, TIMELINE_REGISTRY_KEY_PATTERN;
|
|
36461
36474
|
var init_utils2 = __esm({
|
|
36462
36475
|
"../core/src/lint/utils.ts"() {
|
|
36463
36476
|
"use strict";
|
|
@@ -36466,9 +36479,10 @@ var init_utils2 = __esm({
|
|
|
36466
36479
|
SCRIPT_BLOCK_PATTERN = /<script\b([^>]*)>([\s\S]*?)<\/script>/gi;
|
|
36467
36480
|
COMPOSITION_ID_IN_CSS_PATTERN = /\[data-composition-id=["']([^"']+)["']\]/g;
|
|
36468
36481
|
TIMELINE_REGISTRY_INIT_PATTERN = /window\.__timelines\s*=\s*window\.__timelines\s*\|\|\s*\{\}|window\.__timelines\s*=\s*\{\}|window\.__timelines\s*\?\?=\s*\{\}/i;
|
|
36469
|
-
TIMELINE_REGISTRY_ASSIGN_PATTERN = /window\.__timelines
|
|
36470
|
-
WINDOW_TIMELINE_ASSIGN_PATTERN = /window\.__timelines
|
|
36482
|
+
TIMELINE_REGISTRY_ASSIGN_PATTERN = /window\.__timelines(?:\[[^\]]+\]|\.[A-Za-z_$][\w$]*)\s*=/i;
|
|
36483
|
+
WINDOW_TIMELINE_ASSIGN_PATTERN = /window\.__timelines(?:\[\s*["']([^"']+)["']\s*\]|\.\s*([A-Za-z_$][\w$]*))\s*=\s*([A-Za-z_$][\w$]*)/i;
|
|
36471
36484
|
INVALID_SCRIPT_CLOSE_PATTERN = /<script[^>]*>[\s\S]*?<\s*\/\s*script(?!>)/i;
|
|
36485
|
+
TIMELINE_REGISTRY_KEY_PATTERN = /window\.__timelines(?:\[\s*["']([^"']+)["']\s*\]|\.\s*([A-Za-z_$][\w$]*))\s*=/g;
|
|
36472
36486
|
}
|
|
36473
36487
|
});
|
|
36474
36488
|
|
|
@@ -36604,13 +36618,12 @@ var init_core = __esm({
|
|
|
36604
36618
|
const htmlCompIds = /* @__PURE__ */ new Set();
|
|
36605
36619
|
const timelineRegKeys = /* @__PURE__ */ new Set();
|
|
36606
36620
|
const compIdRe = /data-composition-id\s*=\s*["']([^"']+)["']/gi;
|
|
36607
|
-
const tlKeyRe = /window\.__timelines\[\s*["']([^"']+)["']\s*\]/g;
|
|
36608
36621
|
let m2;
|
|
36609
36622
|
while ((m2 = compIdRe.exec(source)) !== null) {
|
|
36610
36623
|
if (m2[1]) htmlCompIds.add(m2[1]);
|
|
36611
36624
|
}
|
|
36612
|
-
|
|
36613
|
-
|
|
36625
|
+
for (const key2 of extractTimelineRegistryKeys(source)) {
|
|
36626
|
+
timelineRegKeys.add(key2);
|
|
36614
36627
|
}
|
|
36615
36628
|
for (const key2 of timelineRegKeys) {
|
|
36616
36629
|
if (!htmlCompIds.has(key2)) {
|
|
@@ -37358,7 +37371,7 @@ function countClassUsage(tags) {
|
|
|
37358
37371
|
}
|
|
37359
37372
|
function readRegisteredTimelineCompositionId(script) {
|
|
37360
37373
|
const match = script.match(WINDOW_TIMELINE_ASSIGN_PATTERN);
|
|
37361
|
-
return match?.[1] || null;
|
|
37374
|
+
return match?.[1] || match?.[2] || null;
|
|
37362
37375
|
}
|
|
37363
37376
|
function unwrapRaw(value) {
|
|
37364
37377
|
if (typeof value === "number") return value;
|
|
@@ -67373,9 +67386,9 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config)
|
|
|
67373
67386
|
);
|
|
67374
67387
|
});
|
|
67375
67388
|
const mixInputs = tracks.map((_, i2) => `[a${i2}]`).join("");
|
|
67376
|
-
const
|
|
67377
|
-
const
|
|
67378
|
-
const postMixGainFilter = `[mixed]volume=${
|
|
67389
|
+
const mixFilter = `${mixInputs}amix=inputs=${tracks.length}:duration=longest:dropout_transition=0[mixed]`;
|
|
67390
|
+
const compensatedGain = masterOutputGain * tracks.length;
|
|
67391
|
+
const postMixGainFilter = `[mixed]volume=${formatFilterNumber(compensatedGain)}[out]`;
|
|
67379
67392
|
const fullFilter = [...filterParts, mixFilter, postMixGainFilter].join(";");
|
|
67380
67393
|
return [
|
|
67381
67394
|
...inputs,
|
|
@@ -71552,6 +71565,7 @@ async function compileHtmlFile(html, baseDir, downloadDir) {
|
|
|
71552
71565
|
compiledHtml = clampDurations(compiledHtml, clampList);
|
|
71553
71566
|
}
|
|
71554
71567
|
compiledHtml = compiledHtml.replace(/(<video\b[^>]*)\s+crossorigin(?:=["'][^"']*["'])?/gi, "$1");
|
|
71568
|
+
compiledHtml = compiledHtml.replace(/(<img\b[^>]*)\s+crossorigin(?:=["'][^"']*["'])?/gi, "$1");
|
|
71555
71569
|
return { html: compiledHtml, unresolvedCompositions };
|
|
71556
71570
|
}
|
|
71557
71571
|
async function parseSubCompositions(html, projectDir, downloadDir, parentOffset = 0, parentEnd = Infinity, visited = /* @__PURE__ */ new Set()) {
|