@hyperframes/producer 0.1.10 → 0.1.11
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/index.js +13 -6
- package/dist/index.js.map +3 -3
- package/dist/public-server.js +13 -6
- package/dist/public-server.js.map +3 -3
- package/dist/server.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -99193,7 +99193,9 @@ var INVALID_SCRIPT_CLOSE_PATTERN = /<script[^>]*>[\s\S]*?<\s*\/\s*script(?!>)/i;
|
|
|
99193
99193
|
var WINDOW_TIMELINE_ASSIGN_PATTERN = /window\.__timelines\[\s*["']([^"']+)["']\s*\]\s*=\s*([A-Za-z_$][\w$]*)/i;
|
|
99194
99194
|
var META_GSAP_KEYS = /* @__PURE__ */ new Set(["duration", "ease", "repeat", "yoyo", "overwrite", "delay"]);
|
|
99195
99195
|
function lintHyperframeHtml(html, options = {}) {
|
|
99196
|
-
|
|
99196
|
+
let source2 = html || "";
|
|
99197
|
+
const templateMatch = source2.match(/<template[^>]*>([\s\S]*)<\/template>/i);
|
|
99198
|
+
if (templateMatch?.[1]) source2 = templateMatch[1];
|
|
99197
99199
|
const filePath = options.filePath;
|
|
99198
99200
|
const findings = [];
|
|
99199
99201
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -99550,18 +99552,20 @@ ${right2.raw}`)
|
|
|
99550
99552
|
for (const tag of tags) {
|
|
99551
99553
|
if (tag.name === "audio" || tag.name === "script" || tag.name === "style") continue;
|
|
99552
99554
|
if (!readAttr(tag.raw, "data-start")) continue;
|
|
99555
|
+
if (readAttr(tag.raw, "data-composition-id")) continue;
|
|
99556
|
+
if (readAttr(tag.raw, "data-composition-src")) continue;
|
|
99553
99557
|
const classAttr = readAttr(tag.raw, "class") || "";
|
|
99554
99558
|
const styleAttr = readAttr(tag.raw, "style") || "";
|
|
99555
99559
|
const hasClip = classAttr.split(/\s+/).includes("clip");
|
|
99556
|
-
const hasHiddenStyle = /visibility\s*:\s*hidden/i.test(styleAttr);
|
|
99560
|
+
const hasHiddenStyle = /visibility\s*:\s*hidden/i.test(styleAttr) || /opacity\s*:\s*0/i.test(styleAttr);
|
|
99557
99561
|
if (!hasClip && !hasHiddenStyle) {
|
|
99558
99562
|
const elementId = readAttr(tag.raw, "id") || void 0;
|
|
99559
99563
|
pushFinding({
|
|
99560
99564
|
code: "timed_element_missing_visibility_hidden",
|
|
99561
|
-
severity: "
|
|
99562
|
-
message: `<${tag.name}${elementId ? ` id="${elementId}"` : ""}> has data-start but no class="clip" or
|
|
99565
|
+
severity: "info",
|
|
99566
|
+
message: `<${tag.name}${elementId ? ` id="${elementId}"` : ""}> has data-start but no class="clip", visibility:hidden, or opacity:0. Consider adding initial hidden state if the element should not be visible before its start time.`,
|
|
99563
99567
|
elementId,
|
|
99564
|
-
fixHint: 'Add class="clip"
|
|
99568
|
+
fixHint: 'Add class="clip" (with CSS: .clip { visibility: hidden; }) or style="opacity:0" if the element should start hidden.',
|
|
99565
99569
|
snippet: truncateSnippet(tag.raw)
|
|
99566
99570
|
});
|
|
99567
99571
|
}
|
|
@@ -107030,7 +107034,8 @@ function parseRenderOptions(body) {
|
|
|
107030
107034
|
const debug6 = body.debug === true;
|
|
107031
107035
|
const outputPath = typeof body.outputPath === "string" && body.outputPath.trim().length > 0 ? body.outputPath : typeof body.output === "string" && body.output.trim().length > 0 ? body.output : null;
|
|
107032
107036
|
const entryFile = typeof body.entryFile === "string" && body.entryFile.trim().length > 0 ? body.entryFile.trim() : void 0;
|
|
107033
|
-
|
|
107037
|
+
const format3 = ["mp4", "webm"].includes(body.format) ? body.format : void 0;
|
|
107038
|
+
return { outputPath, fps, quality, workers, useGpu, debug: debug6, entryFile, format: format3 };
|
|
107034
107039
|
}
|
|
107035
107040
|
async function prepareRenderBody(body) {
|
|
107036
107041
|
const options = parseRenderOptions(body);
|
|
@@ -107198,6 +107203,7 @@ function createRenderHandlers(options = {}) {
|
|
|
107198
107203
|
const job = createRenderJob({
|
|
107199
107204
|
fps: input2.fps,
|
|
107200
107205
|
quality: input2.quality,
|
|
107206
|
+
format: input2.format,
|
|
107201
107207
|
workers: input2.workers,
|
|
107202
107208
|
useGpu: input2.useGpu,
|
|
107203
107209
|
debug: input2.debug,
|
|
@@ -107301,6 +107307,7 @@ function createRenderHandlers(options = {}) {
|
|
|
107301
107307
|
const job = createRenderJob({
|
|
107302
107308
|
fps: input2.fps,
|
|
107303
107309
|
quality: input2.quality,
|
|
107310
|
+
format: input2.format,
|
|
107304
107311
|
workers: input2.workers,
|
|
107305
107312
|
useGpu: input2.useGpu,
|
|
107306
107313
|
debug: input2.debug,
|