hyperframes 0.8.66 → 0.8.67

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.
@@ -12773,10 +12773,10 @@ function resolveSlideshow(manifest, scenes) {
12773
12773
  return { resolved: { slides, sequences }, errors };
12774
12774
  }
12775
12775
  function isSceneLikeCompositionId(compositionId) {
12776
- const normalized = compositionId.trim().toLowerCase();
12777
- if (!normalized || normalized === "main") return false;
12778
- if (normalized.includes("caption")) return false;
12779
- if (normalized.includes("ambient")) return false;
12776
+ const normalized2 = compositionId.trim().toLowerCase();
12777
+ if (!normalized2 || normalized2 === "main") return false;
12778
+ if (normalized2.includes("caption")) return false;
12779
+ if (normalized2.includes("ambient")) return false;
12780
12780
  return true;
12781
12781
  }
12782
12782
  var SLIDESHOW_ISLAND_TYPE;
@@ -50616,14 +50616,14 @@ function parseReferenceOffset(value) {
50616
50616
  return { refId, operator, magnitude };
50617
50617
  }
50618
50618
  function parseStartExpression(raw) {
50619
- const normalized = (raw ?? "").trim();
50620
- if (!normalized) return null;
50621
- const absolute = parseNumeric(normalized);
50619
+ const normalized2 = (raw ?? "").trim();
50620
+ if (!normalized2) return null;
50621
+ const absolute = parseNumeric(normalized2);
50622
50622
  if (absolute != null) return { kind: "absolute", value: absolute };
50623
- if (REFERENCE_ID_PATTERN.test(normalized)) {
50624
- return { kind: "reference", refId: normalized, offset: 0 };
50623
+ if (REFERENCE_ID_PATTERN.test(normalized2)) {
50624
+ return { kind: "reference", refId: normalized2, offset: 0 };
50625
50625
  }
50626
- const reference = parseReferenceOffset(normalized);
50626
+ const reference = parseReferenceOffset(normalized2);
50627
50627
  if (!reference) return null;
50628
50628
  return {
50629
50629
  kind: "reference",
@@ -52584,8 +52584,8 @@ function rewriteAssetPath(compSrcPath, relativePath, assetExists) {
52584
52584
  return assetExists(sibling2) ? sibling2 + suffix : relativePath;
52585
52585
  }
52586
52586
  const resolved = join(compDir, relativePath);
52587
- const normalized = resolve2("/", resolved).slice(1);
52588
- return normalized;
52587
+ const normalized2 = resolve2("/", resolved).slice(1);
52588
+ return normalized2;
52589
52589
  }
52590
52590
  function rewriteAssetPaths(elements, compSrcPath, getAttr2, setAttr2, assetExists) {
52591
52591
  for (const el of elements) {
@@ -55366,8 +55366,8 @@ function resolveExtractCacheDir(env = process.env) {
55366
55366
  if (raw === void 0) {
55367
55367
  return { dir: defaultExtractCacheDir(), disabled: false, source: "default" };
55368
55368
  }
55369
- const normalized = raw.trim().toLowerCase();
55370
- if (EXTRACT_CACHE_DIR_DISABLED_ALIASES.includes(normalized)) {
55369
+ const normalized2 = raw.trim().toLowerCase();
55370
+ if (EXTRACT_CACHE_DIR_DISABLED_ALIASES.includes(normalized2)) {
55371
55371
  return { dir: void 0, disabled: true, source: "env", rawValue: raw };
55372
55372
  }
55373
55373
  return { dir: raw, disabled: false, source: "env", rawValue: raw };
@@ -59354,8 +59354,8 @@ function candidateFileName(candidate) {
59354
59354
  return candidate.split(/[\\/]/).at(-1)?.toLowerCase() ?? candidate.toLowerCase();
59355
59355
  }
59356
59356
  function chooseBestPathCandidate(name, candidates) {
59357
- const normalized = candidates.map((candidate) => candidate.trim()).filter(Boolean);
59358
- return normalized.find((candidate) => candidateFileName(candidate) === `${name}.exe`) ?? normalized.find((candidate) => candidateFileName(candidate) === name) ?? normalized.find((candidate) => !candidateFileName(candidate).match(/\.(cmd|bat)$/i)) ?? normalized[0];
59357
+ const normalized2 = candidates.map((candidate) => candidate.trim()).filter(Boolean);
59358
+ return normalized2.find((candidate) => candidateFileName(candidate) === `${name}.exe`) ?? normalized2.find((candidate) => candidateFileName(candidate) === name) ?? normalized2.find((candidate) => !candidateFileName(candidate).match(/\.(cmd|bat)$/i)) ?? normalized2[0];
59359
59359
  }
59360
59360
  function isExecutablePathCandidate(candidate) {
59361
59361
  if (process.platform === "win32") return existsSync3(candidate);
@@ -59707,8 +59707,8 @@ function matchesAny(message, patterns) {
59707
59707
  return patterns.some((pattern) => pattern.test(message));
59708
59708
  }
59709
59709
  function hasIoOperationFailure(message) {
59710
- const normalized = message.toLowerCase();
59711
- return normalized.split(/[\r\n]/).some(
59710
+ const normalized2 = message.toLowerCase();
59711
+ return normalized2.split(/[\r\n]/).some(
59712
59712
  (line) => IO_OPERATION_TOKENS.some((operation) => {
59713
59713
  const operationIndex = line.indexOf(operation);
59714
59714
  if (operationIndex < 0) return false;
@@ -65300,15 +65300,15 @@ function looksLikeRemoteErrorDocument(prefix) {
65300
65300
  }
65301
65301
  function normalizeCallerSha256(value) {
65302
65302
  if (value === void 0) return void 0;
65303
- const normalized = value.trim().toLowerCase();
65304
- if (!/^[a-f0-9]{64}$/.test(normalized)) {
65303
+ const normalized2 = value.trim().toLowerCase();
65304
+ if (!/^[a-f0-9]{64}$/.test(normalized2)) {
65305
65305
  throw new UrlDownloadError(
65306
65306
  "hash_mismatch",
65307
65307
  false,
65308
65308
  "Caller-provided SHA-256 checksum is malformed"
65309
65309
  );
65310
65310
  }
65311
- return normalized;
65311
+ return normalized2;
65312
65312
  }
65313
65313
  function expectedResponseSha256(response, callerSha256) {
65314
65314
  if (callerSha256) return { value: callerSha256, encoding: "hex", source: "caller" };
@@ -65972,13 +65972,13 @@ function resolveAliasDisplayName2(alias) {
65972
65972
  return CANONICAL_FONT_DISPLAY_NAMES2[slug];
65973
65973
  }
65974
65974
  function isSafeMediaUrl(url) {
65975
- const normalized = url.replace(/[\u0000-\u0020]/g, "");
65976
- const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(normalized);
65975
+ const normalized2 = url.replace(/[\u0000-\u0020]/g, "");
65976
+ const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(normalized2);
65977
65977
  if (!scheme) return true;
65978
65978
  const proto = scheme[1]?.toLowerCase();
65979
65979
  if (!proto) return false;
65980
65980
  if (proto === "https" || proto === "http" || proto === "blob") return true;
65981
- if (proto === "data") return /^data:image\//i.test(normalized);
65981
+ if (proto === "data") return /^data:image\//i.test(normalized2);
65982
65982
  return false;
65983
65983
  }
65984
65984
  var CANVAS_DIMENSIONS2, VALID_CANVAS_RESOLUTIONS2, COMPOSITION_VARIABLE_TYPES2, FONT_ALIAS_MAP2, FONT_ALIAS_KEYS2, CANONICAL_FONT_DISPLAY_NAMES2, COMPOSITION_ATTRIBUTES4, CANONICAL_AUTHORED_TIMING_ATTRIBUTES4, DERIVED_TIMING_ATTRIBUTES4, LEGACY_TIMING_ATTRIBUTES4;
@@ -72820,10 +72820,60 @@ function hasCaptionStyles(styles) {
72820
72820
  return styles.some((s) => /\.caption[-_]?(?:group|word)/i.test(s.content));
72821
72821
  }
72822
72822
  function truncateSnippet(value, maxLength = 220) {
72823
- const normalized = value.replace(/\s+/g, " ").trim();
72824
- if (!normalized) return void 0;
72825
- if (normalized.length <= maxLength) return normalized;
72826
- return `${normalized.slice(0, maxLength - 3)}...`;
72823
+ const normalized2 = value.replace(/\s+/g, " ").trim();
72824
+ if (!normalized2) return void 0;
72825
+ if (normalized2.length <= maxLength) return normalized2;
72826
+ return `${normalized2.slice(0, maxLength - 3)}...`;
72827
+ }
72828
+ function normalized(source) {
72829
+ let text = "";
72830
+ const offsets = [];
72831
+ for (let i = 0; i < source.length; i++) {
72832
+ const char = source[i];
72833
+ if (/\s/.test(char)) {
72834
+ if (text.endsWith(" ")) continue;
72835
+ text += " ";
72836
+ } else text += char;
72837
+ offsets.push(i);
72838
+ }
72839
+ return { text, offsets };
72840
+ }
72841
+ function createSourceLocator(source) {
72842
+ const tags = parseHtmlStructure(source).tags;
72843
+ const searchable = source.split("");
72844
+ const parser = new Parser({
72845
+ oncomment() {
72846
+ searchable.fill("\0", parser.startIndex, parser.endIndex + 1);
72847
+ }
72848
+ });
72849
+ parser.write(source);
72850
+ parser.end();
72851
+ const normalizedSource = normalized(searchable.join(""));
72852
+ const at2 = (offset3) => {
72853
+ const before2 = source.slice(0, offset3);
72854
+ return {
72855
+ line: before2.split(/\r\n|\r|\n/).length,
72856
+ column: offset3 - Math.max(before2.lastIndexOf("\n"), before2.lastIndexOf("\r"))
72857
+ };
72858
+ };
72859
+ return (finding) => {
72860
+ if (finding.line !== void 0) return { line: finding.line, column: finding.column };
72861
+ if (finding.snippet) {
72862
+ const offset3 = snippetOffset(normalizedSource, finding.snippet);
72863
+ return offset3 === void 0 ? {} : at2(offset3);
72864
+ }
72865
+ const id = finding.elementId ?? /^#([\w-]+)$/.exec(finding.selector ?? "")?.[1];
72866
+ if (!id) return {};
72867
+ const matches2 = tags.filter((tag) => readDecodedAttr(tag.raw, "id") === id);
72868
+ return matches2.length === 1 ? at2(matches2[0].index) : {};
72869
+ };
72870
+ }
72871
+ function snippetOffset(source, snippet) {
72872
+ const needle = snippet.replace(/\s+/g, " ").trim().replace(/\.\.\.$/, "");
72873
+ if (!needle) return void 0;
72874
+ const index = source.text.indexOf(needle);
72875
+ if (index < 0 || source.text.indexOf(needle, index + 1) >= 0) return void 0;
72876
+ return source.offsets[index];
72827
72877
  }
72828
72878
  function buildLintContext(html, options = {}) {
72829
72879
  const rawSource = html || "";
@@ -73203,18 +73253,18 @@ function classNamesFromAttr(classAttr) {
73203
73253
  return classAttr.split(/\s+/).filter(Boolean);
73204
73254
  }
73205
73255
  function selectorTargetsManagedMedia(selector, mediaIndex) {
73206
- const normalized = selector.trim();
73207
- if (!normalized) return false;
73208
- if (mediaIndex.hasVideo && /\bvideo\b/i.test(normalized)) return true;
73209
- if (mediaIndex.hasAudio && /\baudio\b/i.test(normalized)) return true;
73256
+ const normalized2 = selector.trim();
73257
+ if (!normalized2) return false;
73258
+ if (mediaIndex.hasVideo && /\bvideo\b/i.test(normalized2)) return true;
73259
+ if (mediaIndex.hasAudio && /\baudio\b/i.test(normalized2)) return true;
73210
73260
  for (const mediaId of mediaIndex.ids) {
73211
73261
  const escapedId = escapeRegExp3(mediaId);
73212
- if (new RegExp(`#${escapedId}(?![\\w-])`).test(normalized) || normalized.includes(`[id="${mediaId}"]`) || normalized.includes(`[id='${mediaId}']`)) {
73262
+ if (new RegExp(`#${escapedId}(?![\\w-])`).test(normalized2) || normalized2.includes(`[id="${mediaId}"]`) || normalized2.includes(`[id='${mediaId}']`)) {
73213
73263
  return true;
73214
73264
  }
73215
73265
  }
73216
73266
  for (const className of mediaIndex.classes) {
73217
- if (new RegExp(`\\.${escapeRegExp3(className)}(?![\\w-])`).test(normalized)) {
73267
+ if (new RegExp(`\\.${escapeRegExp3(className)}(?![\\w-])`).test(normalized2)) {
73218
73268
  return true;
73219
73269
  }
73220
73270
  }
@@ -73532,8 +73582,8 @@ function readTagTiming(rawTag) {
73532
73582
  }
73533
73583
  function countPhysicalLines(source) {
73534
73584
  if (source.length === 0) return 0;
73535
- const normalized = source.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
73536
- const withoutFinalNewline = normalized.endsWith("\n") ? normalized.slice(0, -1) : normalized;
73585
+ const normalized2 = source.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
73586
+ const withoutFinalNewline = normalized2.endsWith("\n") ? normalized2.slice(0, -1) : normalized2;
73537
73587
  return withoutFinalNewline.split("\n").length;
73538
73588
  }
73539
73589
  function countStructuralLines(source) {
@@ -73546,8 +73596,8 @@ function isCaptionCue(tag) {
73546
73596
  }
73547
73597
  function isRegistrySourceFile(filePath) {
73548
73598
  if (!filePath) return false;
73549
- const normalized = filePath.replace(/\\/g, "/");
73550
- return /(?:^|\/)registry\/blocks\/([^/]+)\/\1\.html$/i.test(normalized);
73599
+ const normalized2 = filePath.replace(/\\/g, "/");
73600
+ return /(?:^|\/)registry\/blocks\/([^/]+)\/\1\.html$/i.test(normalized2);
73551
73601
  }
73552
73602
  function isRegistryInstalledFile(rawSource) {
73553
73603
  return /^\s*<!--\s*hyperframes-registry-item:[^>]*-->/i.test(rawSource.slice(0, 512));
@@ -73780,8 +73830,8 @@ function zeroValue(value) {
73780
73830
  return Number(value.trim()) === 0;
73781
73831
  }
73782
73832
  function isGsapColorProperty(property) {
73783
- const normalized = property.toLowerCase();
73784
- return !normalized.startsWith("--") && (normalized.endsWith("color") || normalized === "fill" || normalized === "stroke");
73833
+ const normalized2 = property.toLowerCase();
73834
+ return !normalized2.startsWith("--") && (normalized2.endsWith("color") || normalized2 === "fill" || normalized2 === "stroke");
73785
73835
  }
73786
73836
  function collectStaticCssVariableDefinitions(tags, styles) {
73787
73837
  const definitions = /* @__PURE__ */ new Set();
@@ -73908,10 +73958,10 @@ function styleHasHiddenInitialState(style) {
73908
73958
  function styleHasOpaqueBackground(style) {
73909
73959
  const background = readStyleProperty(style, "background") || readStyleProperty(style, "background-color");
73910
73960
  if (!background) return false;
73911
- const normalized = background.toLowerCase().replace(/\s+/g, "");
73912
- if (normalized === "transparent" || normalized === "none") return false;
73913
- if (/rgba?\([^)]*,0(?:\.0+)?\)$/.test(normalized)) return false;
73914
- if (/hsla?\([^)]*,0(?:\.0+)?\)$/.test(normalized)) return false;
73961
+ const normalized2 = background.toLowerCase().replace(/\s+/g, "");
73962
+ if (normalized2 === "transparent" || normalized2 === "none") return false;
73963
+ if (/rgba?\([^)]*,0(?:\.0+)?\)$/.test(normalized2)) return false;
73964
+ if (/hsla?\([^)]*,0(?:\.0+)?\)$/.test(normalized2)) return false;
73915
73965
  return true;
73916
73966
  }
73917
73967
  function styleLooksFullFrameOverlay(style) {
@@ -74279,9 +74329,9 @@ function elementLevelTokens(tokens, tagsByToken) {
74279
74329
  return expanded;
74280
74330
  }
74281
74331
  function isMultiComponentDasharray(value) {
74282
- const normalized = value.replace(/!important\s*$/i, "").trim();
74283
- if (!normalized || /^none$/i.test(normalized)) return false;
74284
- return normalized.split(/[\s,]+/).filter(Boolean).length >= 2;
74332
+ const normalized2 = value.replace(/!important\s*$/i, "").trim();
74333
+ if (!normalized2 || /^none$/i.test(normalized2)) return false;
74334
+ return normalized2.split(/[\s,]+/).filter(Boolean).length >= 2;
74285
74335
  }
74286
74336
  function gsapDasharrayValueLooksMultiComponent(valueSource) {
74287
74337
  const literal2 = valueSource.trim().match(/^(["'`])([\s\S]*)\1$/)?.[2];
@@ -74690,7 +74740,15 @@ function collectFindings(produced, seen, filePath, into) {
74690
74740
  async function lintHyperframeHtml(html, options = {}) {
74691
74741
  const startedAt = performance.now();
74692
74742
  const ctx = buildLintContext(html, options);
74693
- const { findings, timings } = await runRules(ctx, options.filePath);
74743
+ const { findings: rawFindings, timings } = await runRules(ctx, options.filePath);
74744
+ const locate = createSourceLocator(html);
74745
+ const findings = rawFindings.map((finding) => {
74746
+ if (finding.snippet && options.externalStyles?.some(
74747
+ (style) => style.content.replace(/\s+/g, " ").includes(finding.snippet.replace(/\.\.\.$/, ""))
74748
+ ))
74749
+ return finding;
74750
+ return { ...finding, ...locate(finding) };
74751
+ });
74694
74752
  const errorCount = findings.filter((f) => f.severity === "error").length;
74695
74753
  const warningCount = findings.filter((f) => f.severity === "warning").length;
74696
74754
  const infoCount = findings.filter((f) => f.severity === "info").length;
@@ -74708,6 +74766,7 @@ var init_dist3 = __esm({
74708
74766
  "../lint/dist/index.js"() {
74709
74767
  "use strict";
74710
74768
  init_esm6();
74769
+ init_esm6();
74711
74770
  import_postcss_selector_parser = __toESM(require_dist(), 1);
74712
74771
  init_dist();
74713
74772
  init_colorGradingContract();
@@ -92921,17 +92980,17 @@ function getSystemProfilerIndex() {
92921
92980
  const filePath = typeface.path;
92922
92981
  if (typeof filePath !== "string" || !FONT_EXT_RE.test(filePath))
92923
92982
  continue;
92924
- const normalized = normalizeName(family);
92983
+ const normalized2 = normalizeName(family);
92925
92984
  const ext = filePath.match(FONT_EXT_RE)?.[1] ?? "ttf";
92926
92985
  const entry = {
92927
- family: normalized,
92986
+ family: normalized2,
92928
92987
  path: filePath,
92929
92988
  format: extensionToFormat(ext),
92930
92989
  isRegular: isRegularWeight(filePath)
92931
92990
  };
92932
- const list = profilerCache.get(normalized) ?? [];
92991
+ const list = profilerCache.get(normalized2) ?? [];
92933
92992
  list.push(entry);
92934
- profilerCache.set(normalized, list);
92993
+ profilerCache.set(normalized2, list);
92935
92994
  }
92936
92995
  }
92937
92996
  } catch {
@@ -92969,12 +93028,12 @@ function inferWeightAndStyle(fileName) {
92969
93028
  return { weight: "400", style };
92970
93029
  }
92971
93030
  function locateSystemFontVariants(family) {
92972
- const normalized = normalizeName(family);
92973
- if (!normalized)
93031
+ const normalized2 = normalizeName(family);
93032
+ if (!normalized2)
92974
93033
  return [];
92975
93034
  const variants = [];
92976
93035
  const profilerIndex = getSystemProfilerIndex();
92977
- const profilerEntries = profilerIndex.get(normalized);
93036
+ const profilerEntries = profilerIndex.get(normalized2);
92978
93037
  if (profilerEntries && profilerEntries.length > 0) {
92979
93038
  for (const e of profilerEntries) {
92980
93039
  if (!isRegularFile(e.path) || !isPathBounded(e.path))
@@ -92987,7 +93046,7 @@ function locateSystemFontVariants(family) {
92987
93046
  }
92988
93047
  const allCandidates = [];
92989
93048
  for (const dir of fontDirectories()) {
92990
- allCandidates.push(...collectCandidatesFromDir(dir, normalized));
93049
+ allCandidates.push(...collectCandidatesFromDir(dir, normalized2));
92991
93050
  }
92992
93051
  for (const c of allCandidates) {
92993
93052
  const { weight, style } = inferWeightAndStyle(c.path);
@@ -93330,8 +93389,8 @@ function extractExistingFontFaces(html) {
93330
93389
  if (semicolon < 0) break;
93331
93390
  const end = html.indexOf("}", semicolon + 1);
93332
93391
  if (end < 0) break;
93333
- const normalized = normalizeFamilyName(html.slice(valueStart, semicolon));
93334
- if (normalized) families.add(normalized);
93392
+ const normalized2 = normalizeFamilyName(html.slice(valueStart, semicolon));
93393
+ if (normalized2) families.add(normalized2);
93335
93394
  opening.lastIndex = end + 1;
93336
93395
  }
93337
93396
  return families;
@@ -93344,10 +93403,10 @@ function extractRequestedFontFamilies(html) {
93344
93403
  declaration,
93345
93404
  customProperties
93346
93405
  )) {
93347
- const normalized = originalCase.toLowerCase();
93348
- if (!normalized || GENERIC_FAMILIES2.has(normalized)) continue;
93349
- if (normalized.startsWith("var(")) continue;
93350
- if (!requested.has(normalized)) requested.set(normalized, originalCase);
93406
+ const normalized2 = originalCase.toLowerCase();
93407
+ if (!normalized2 || GENERIC_FAMILIES2.has(normalized2)) continue;
93408
+ if (normalized2.startsWith("var(")) continue;
93409
+ if (!requested.has(normalized2)) requested.set(normalized2, originalCase);
93351
93410
  }
93352
93411
  }
93353
93412
  return requested;
@@ -94025,11 +94084,11 @@ function hasGifExtension(src) {
94025
94084
  function readLoopOverride(el) {
94026
94085
  const raw = el.getAttribute("data-loop");
94027
94086
  if (raw == null) return null;
94028
- const normalized = raw.trim().toLowerCase();
94029
- if (normalized === "" || normalized === "true" || normalized === "1" || normalized === "yes") {
94087
+ const normalized2 = raw.trim().toLowerCase();
94088
+ if (normalized2 === "" || normalized2 === "true" || normalized2 === "1" || normalized2 === "yes") {
94030
94089
  return true;
94031
94090
  }
94032
- if (normalized === "false" || normalized === "0" || normalized === "no") {
94091
+ if (normalized2 === "false" || normalized2 === "0" || normalized2 === "no") {
94033
94092
  return false;
94034
94093
  }
94035
94094
  return null;
@@ -102770,11 +102829,11 @@ function validateOutputResolutionOverride(body) {
102770
102829
  if (typeof body.outputResolution !== "string") {
102771
102830
  return 'outputResolution must be a string preset (e.g. "4k", "landscape-4k")';
102772
102831
  }
102773
- const normalized = normalizeResolutionFlag(body.outputResolution);
102774
- if (body.outputResolution.trim().length > 0 && normalized === void 0) {
102832
+ const normalized2 = normalizeResolutionFlag(body.outputResolution);
102833
+ if (body.outputResolution.trim().length > 0 && normalized2 === void 0) {
102775
102834
  return `Invalid outputResolution "${body.outputResolution}". Must be one of: landscape, portrait, landscape-4k, portrait-4k, square, square-4k (aliases: 1080p, 4k, \u2026).`;
102776
102835
  }
102777
- if (normalized !== void 0 && (body.format === "webm" || body.format === "mov")) {
102836
+ if (normalized2 !== void 0 && (body.format === "webm" || body.format === "mov")) {
102778
102837
  return `outputResolution is not supported with format "${body.format}" \u2014 the alpha (webm/mov) capture path can't supersample. Use format "mp4", or omit outputResolution to render at the composition's native dimensions.`;
102779
102838
  }
102780
102839
  return void 0;
@@ -103448,8 +103507,8 @@ async function runFontLocalize(io, localize) {
103448
103507
  }
103449
103508
 
103450
103509
  // src/version.ts
103451
- var VERSION = true ? "0.8.66" : "0.0.0-dev";
103452
- var PRODUCER_VERSION = true ? "0.8.66" : "0.0.0-dev";
103510
+ var VERSION = true ? "0.8.67" : "0.0.0-dev";
103511
+ var PRODUCER_VERSION = true ? "0.8.67" : "0.0.0-dev";
103453
103512
 
103454
103513
  // src/fontLocalizeCli.ts
103455
103514
  async function readStdin() {
@@ -1,4 +1,4 @@
1
- "use strict";var HyperframesPlayer=(()=>{var Se=Object.defineProperty;var fn=Object.getOwnPropertyDescriptor;var hn=Object.getOwnPropertyNames;var bn=Object.prototype.hasOwnProperty;var gn=(n,e)=>{for(var t in e)Se(n,t,{get:e[t],enumerable:!0})},_n=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of hn(e))!bn.call(n,r)&&r!==t&&Se(n,r,{get:()=>e[r],enumerable:!(i=fn(e,r))||i.enumerable});return n};var yn=n=>_n(Se({},"__esModule",{value:!0}),n);var Xi={};gn(Xi,{HyperframesPlayer:()=>Ee,SPEED_PRESETS:()=>we,formatSpeed:()=>G,formatTime:()=>ie});function ct(n){return n.hasRuntime||n.runtimeInjected?!1:!!(n.hasNestedCompositions||n.hasTimelines&&n.attempts>=5)}function H(n){return typeof n=="object"&&n!==null}function mt(n){return H(n)&&typeof n.getDuration=="function"}function pt(n){return H(n)&&typeof n.duration=="function"&&typeof n.time=="function"&&typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}var L="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.66/dist/hyperframe.runtime.iife.js";function V(n){if(n===null)return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function vn(n){let e=n?.querySelector("[data-composition-id][data-width][data-height]")??n?.querySelector("[data-width][data-height]");if(!e)return null;let t=V(e.getAttribute("data-width")),i=V(e.getAttribute("data-height"));return t!==null&&i!==null?{width:t,height:i}:null}var ne=class{constructor(e,t){this._iframe=e;this._callbacks=t}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;try{let t=this._iframe.contentWindow;if(!t)return;let i=!!(t.__hf||t.__player),r=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!this._iframe.contentDocument?.querySelector("[data-composition-src]");if(ct({hasRuntime:i,hasTimelines:r,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!i)return;let a=this._resolvePlaybackDurationAdapter(t);if(a&&a.getDuration()>0){this.stop();let s=vn(this._iframe.contentDocument);this._callbacks.onReady({duration:a.getDuration(),adapter:a,compositionSize:s});return}}catch{}e>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return Reflect.get(e,"__hf")!==void 0||H(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=L,(e.head||e.documentElement).appendChild(t),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let t=Reflect.get(e,"__timelines");if(!H(t))return null;let i=Object.keys(t);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in t?r:i[i.length-1],a=t[o];return pt(a)?a:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(mt(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var ft=`
1
+ "use strict";var HyperframesPlayer=(()=>{var Se=Object.defineProperty;var fn=Object.getOwnPropertyDescriptor;var hn=Object.getOwnPropertyNames;var bn=Object.prototype.hasOwnProperty;var gn=(n,e)=>{for(var t in e)Se(n,t,{get:e[t],enumerable:!0})},_n=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of hn(e))!bn.call(n,r)&&r!==t&&Se(n,r,{get:()=>e[r],enumerable:!(i=fn(e,r))||i.enumerable});return n};var yn=n=>_n(Se({},"__esModule",{value:!0}),n);var Xi={};gn(Xi,{HyperframesPlayer:()=>Ee,SPEED_PRESETS:()=>we,formatSpeed:()=>G,formatTime:()=>ie});function ct(n){return n.hasRuntime||n.runtimeInjected?!1:!!(n.hasNestedCompositions||n.hasTimelines&&n.attempts>=5)}function H(n){return typeof n=="object"&&n!==null}function mt(n){return H(n)&&typeof n.getDuration=="function"}function pt(n){return H(n)&&typeof n.duration=="function"&&typeof n.time=="function"&&typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}var L="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.67/dist/hyperframe.runtime.iife.js";function V(n){if(n===null)return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function vn(n){let e=n?.querySelector("[data-composition-id][data-width][data-height]")??n?.querySelector("[data-width][data-height]");if(!e)return null;let t=V(e.getAttribute("data-width")),i=V(e.getAttribute("data-height"));return t!==null&&i!==null?{width:t,height:i}:null}var ne=class{constructor(e,t){this._iframe=e;this._callbacks=t}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;try{let t=this._iframe.contentWindow;if(!t)return;let i=!!(t.__hf||t.__player),r=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!this._iframe.contentDocument?.querySelector("[data-composition-src]");if(ct({hasRuntime:i,hasTimelines:r,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!i)return;let a=this._resolvePlaybackDurationAdapter(t);if(a&&a.getDuration()>0){this.stop();let s=vn(this._iframe.contentDocument);this._callbacks.onReady({duration:a.getDuration(),adapter:a,compositionSize:s});return}}catch{}e>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return Reflect.get(e,"__hf")!==void 0||H(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=L,(e.head||e.documentElement).appendChild(t),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let t=Reflect.get(e,"__timelines");if(!H(t))return null;let i=Object.keys(t);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in t?r:i[i.length-1],a=t[o];return pt(a)?a:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(mt(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var ft=`
2
2
  :host {
3
3
  display: block;
4
4
  position: relative;