@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.
@@ -101982,7 +101982,9 @@ var INVALID_SCRIPT_CLOSE_PATTERN = /<script[^>]*>[\s\S]*?<\s*\/\s*script(?!>)/i;
101982
101982
  var WINDOW_TIMELINE_ASSIGN_PATTERN = /window\.__timelines\[\s*["']([^"']+)["']\s*\]\s*=\s*([A-Za-z_$][\w$]*)/i;
101983
101983
  var META_GSAP_KEYS = /* @__PURE__ */ new Set(["duration", "ease", "repeat", "yoyo", "overwrite", "delay"]);
101984
101984
  function lintHyperframeHtml(html, options = {}) {
101985
- const source2 = html || "";
101985
+ let source2 = html || "";
101986
+ const templateMatch = source2.match(/<template[^>]*>([\s\S]*)<\/template>/i);
101987
+ if (templateMatch?.[1]) source2 = templateMatch[1];
101986
101988
  const filePath = options.filePath;
101987
101989
  const findings = [];
101988
101990
  const seen = /* @__PURE__ */ new Set();
@@ -102339,18 +102341,20 @@ ${right2.raw}`)
102339
102341
  for (const tag of tags) {
102340
102342
  if (tag.name === "audio" || tag.name === "script" || tag.name === "style") continue;
102341
102343
  if (!readAttr(tag.raw, "data-start")) continue;
102344
+ if (readAttr(tag.raw, "data-composition-id")) continue;
102345
+ if (readAttr(tag.raw, "data-composition-src")) continue;
102342
102346
  const classAttr = readAttr(tag.raw, "class") || "";
102343
102347
  const styleAttr = readAttr(tag.raw, "style") || "";
102344
102348
  const hasClip = classAttr.split(/\s+/).includes("clip");
102345
- const hasHiddenStyle = /visibility\s*:\s*hidden/i.test(styleAttr);
102349
+ const hasHiddenStyle = /visibility\s*:\s*hidden/i.test(styleAttr) || /opacity\s*:\s*0/i.test(styleAttr);
102346
102350
  if (!hasClip && !hasHiddenStyle) {
102347
102351
  const elementId = readAttr(tag.raw, "id") || void 0;
102348
102352
  pushFinding({
102349
102353
  code: "timed_element_missing_visibility_hidden",
102350
- severity: "warning",
102351
- message: `<${tag.name}${elementId ? ` id="${elementId}"` : ""}> has data-start but no class="clip" or visibility:hidden. The framework needs elements to start hidden so it can manage their lifecycle.`,
102354
+ severity: "info",
102355
+ 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.`,
102352
102356
  elementId,
102353
- fixHint: 'Add class="clip" to the element (with CSS: .clip { visibility: hidden; }).',
102357
+ fixHint: 'Add class="clip" (with CSS: .clip { visibility: hidden; }) or style="opacity:0" if the element should start hidden.',
102354
102358
  snippet: truncateSnippet(tag.raw)
102355
102359
  });
102356
102360
  }
@@ -107031,7 +107035,8 @@ function parseRenderOptions(body) {
107031
107035
  const debug6 = body.debug === true;
107032
107036
  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;
107033
107037
  const entryFile = typeof body.entryFile === "string" && body.entryFile.trim().length > 0 ? body.entryFile.trim() : void 0;
107034
- return { outputPath, fps, quality, workers, useGpu, debug: debug6, entryFile };
107038
+ const format3 = ["mp4", "webm"].includes(body.format) ? body.format : void 0;
107039
+ return { outputPath, fps, quality, workers, useGpu, debug: debug6, entryFile, format: format3 };
107035
107040
  }
107036
107041
  async function prepareRenderBody(body) {
107037
107042
  const options = parseRenderOptions(body);
@@ -107199,6 +107204,7 @@ function createRenderHandlers(options = {}) {
107199
107204
  const job = createRenderJob({
107200
107205
  fps: input2.fps,
107201
107206
  quality: input2.quality,
107207
+ format: input2.format,
107202
107208
  workers: input2.workers,
107203
107209
  useGpu: input2.useGpu,
107204
107210
  debug: input2.debug,
@@ -107302,6 +107308,7 @@ function createRenderHandlers(options = {}) {
107302
107308
  const job = createRenderJob({
107303
107309
  fps: input2.fps,
107304
107310
  quality: input2.quality,
107311
+ format: input2.format,
107305
107312
  workers: input2.workers,
107306
107313
  useGpu: input2.useGpu,
107307
107314
  debug: input2.debug,