hyperframes 0.8.140 → 0.8.141

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.
Files changed (149) hide show
  1. package/dist/{add-7SPPQB64.js → add-KH2CF4FD.js} +11 -11
  2. package/dist/{animatedGifPrep-HN3CJSFX.js → animatedGifPrep-QO4BSKR7.js} +5 -5
  3. package/dist/{asset-AZMFUTRL.js → asset-4RDZILVJ.js} +2 -2
  4. package/dist/{assetCataloger-TQUWYLHE.js → assetCataloger-WGR4LYYN.js} +2 -2
  5. package/dist/{auth-XGY74R4A.js → auth-WYQCOYE5.js} +1 -1
  6. package/dist/{autoUpdate-44NTJBQU.js → autoUpdate-PC5TN3NL.js} +2 -2
  7. package/dist/{backgroundChecks-ET4DJEPG.js → backgroundChecks-7M3T44EP.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{batchRender-HTWWNF3P.js → batchRender-GOLLOE4V.js} +3 -3
  10. package/dist/{beats-4GYTZUZG.js → beats-XJ7WP6QS.js} +10 -10
  11. package/dist/{benchmark-CJQHE3QN.js → benchmark-HCGFBEZJ.js} +8 -8
  12. package/dist/{browser-NXOVPGDG.js → browser-VQKO2FKG.js} +3 -3
  13. package/dist/{bundleWithLocalizedFonts-6PJP54TC.js → bundleWithLocalizedFonts-FH7PHTTX.js} +2 -2
  14. package/dist/{capture-EHOMO4MP.js → capture-TFZZSF6F.js} +8 -8
  15. package/dist/{capture-5EHGRJZM.js → capture-XD3P3YQR.js} +2 -2
  16. package/dist/{catalog-PTX5Z52R.js → catalog-4S33QWJJ.js} +11 -11
  17. package/dist/{catch-up-I45SPSCU.js → catch-up-RW7YXXNT.js} +4 -4
  18. package/dist/{check-LJ7LG7OI.js → check-XVTRRN4Y.js} +28 -28
  19. package/dist/{checkBrowser-6EK5E4PG.js → checkBrowser-HZXJ2EDU.js} +27 -27
  20. package/dist/{chunk-PFJFHNU3.js → chunk-34TXESM7.js} +3 -3
  21. package/dist/{chunk-6U3MN4HW.js → chunk-35RSNI77.js} +1 -1
  22. package/dist/{chunk-LQG6GPVK.js → chunk-3A5AAPMP.js} +1 -1
  23. package/dist/{chunk-QG3PDRSO.js → chunk-3NBKW2QJ.js} +1 -1
  24. package/dist/{chunk-MTVDXB6S.js → chunk-4BB7V6AI.js} +21 -13
  25. package/dist/{chunk-QP3BRKGF.js → chunk-6E6CM7WS.js} +19 -1
  26. package/dist/{chunk-MU6C2VP6.js → chunk-6IFXWJDX.js} +2 -2
  27. package/dist/{chunk-MHK5DE2P.js → chunk-6Q6FR4KH.js} +22 -14
  28. package/dist/{chunk-R4QIE6UY.js → chunk-7M4KAPAA.js} +92 -31
  29. package/dist/{chunk-JSGANFFH.js → chunk-7XTZVLE6.js} +1 -1
  30. package/dist/{chunk-QBK7WKHT.js → chunk-A7YQNIQT.js} +1 -1
  31. package/dist/{chunk-KMKWRIMC.js → chunk-AVWEIOEN.js} +1 -1
  32. package/dist/{chunk-IRBESGJ7.js → chunk-BM5PX3DJ.js} +1 -1
  33. package/dist/{chunk-WKTHUC2R.js → chunk-E4BSCXMU.js} +1 -1
  34. package/dist/{chunk-TPECLKPA.js → chunk-E6SDW5FV.js} +2 -2
  35. package/dist/{chunk-TYT2TLJR.js → chunk-EKA4ZZBI.js} +1 -1
  36. package/dist/{chunk-IFY57LUW.js → chunk-GS6FE3IW.js} +1 -1
  37. package/dist/{chunk-ASW6NWON.js → chunk-IKVBTDLO.js} +1 -1
  38. package/dist/{chunk-SLEPCESN.js → chunk-INI3TM6I.js} +2 -2
  39. package/dist/{chunk-2GMKWYEH.js → chunk-IO7ZIDRP.js} +9 -9
  40. package/dist/{chunk-F3SPK6SO.js → chunk-IV7EI5E2.js} +1 -1
  41. package/dist/{chunk-DDQ4LOML.js → chunk-IYFKBFTW.js} +1 -1
  42. package/dist/{chunk-PE2I3AFA.js → chunk-J5IPIQU2.js} +1 -1
  43. package/dist/{chunk-L2H2L22P.js → chunk-K2GOFLTX.js} +2 -2
  44. package/dist/{chunk-X3X3VETN.js → chunk-KFH6UD26.js} +3 -3
  45. package/dist/{chunk-VVJFZU6B.js → chunk-L3JSAB4L.js} +2 -2
  46. package/dist/{chunk-BJ5JWOES.js → chunk-N77KD7ZZ.js} +1 -1
  47. package/dist/{chunk-KJLY2SDJ.js → chunk-NORZWWLK.js} +2 -2
  48. package/dist/{chunk-BQKEGPPL.js → chunk-O3SKIXQK.js} +1 -1
  49. package/dist/{chunk-ABJNXQUA.js → chunk-OLDDJS3S.js} +7 -7
  50. package/dist/{chunk-KECV5G4V.js → chunk-P6E4HFFU.js} +9 -9
  51. package/dist/{chunk-5IKJONRY.js → chunk-Q65ZQFF2.js} +1 -1
  52. package/dist/{chunk-WQBA3MH4.js → chunk-R7UDXKI3.js} +2 -2
  53. package/dist/{chunk-C2JUHIG5.js → chunk-RCFCZT5O.js} +1 -1
  54. package/dist/{chunk-PUBKHEEA.js → chunk-RPYPW5NN.js} +9 -9
  55. package/dist/chunk-SYKKFAUW.js +3711 -0
  56. package/dist/{chunk-PB3P4MKP.js → chunk-TC2FBZJZ.js} +1 -1
  57. package/dist/{chunk-MUINFURL.js → chunk-W6HTOVHU.js} +2 -2
  58. package/dist/{chunk-KFQNMY36.js → chunk-XDSOIJC3.js} +5 -5
  59. package/dist/{chunk-DQNOPYAG.js → chunk-XWVGSEUT.js} +1 -1
  60. package/dist/{chunk-PPKFM5WE.js → chunk-YURXPGAM.js} +2 -2
  61. package/dist/{clean-Y3AQITOX.js → clean-L2E4VD57.js} +11 -11
  62. package/dist/cli.js +52 -52
  63. package/dist/{cloud-TDPOMBZF.js → cloud-IDUQRYLO.js} +4 -4
  64. package/dist/{cloudrun-FPAVAVHP.js → cloudrun-R3JXWXGG.js} +3 -3
  65. package/dist/{compare-LHL225ND.js → compare-VYBWSP3Y.js} +22 -22
  66. package/dist/{compiler-RTU3KTLF.js → compiler-ACHWOU5N.js} +2 -2
  67. package/dist/{component-L2YX7J56.js → component-PYYV2V3F.js} +3 -3
  68. package/dist/{compositions-V2UZKG7S.js → compositions-B5GQSXH7.js} +9 -9
  69. package/dist/{delete-OXZEXUQY.js → delete-EAX2U3WI.js} +2 -2
  70. package/dist/{deterministicFonts-GTITFRSJ.js → deterministicFonts-F6WIVL2W.js} +1 -1
  71. package/dist/{dist-N33CM63P.js → dist-ROUDWGLO.js} +8 -2
  72. package/dist/{doctor-MWTPSIVD.js → doctor-PJX7MLFG.js} +7 -7
  73. package/dist/{events-4TZGQZWF.js → events-SBC54MHO.js} +2 -2
  74. package/dist/{events-7VJJGC3D.js → events-YFFXKAQQ.js} +3 -3
  75. package/dist/{feedback-HSGAPVN7.js → feedback-UETLWREV.js} +6 -6
  76. package/dist/{figma-AMC6FAK3.js → figma-QDSJPIRW.js} +3 -3
  77. package/dist/fontLocalizeCli.js +8 -8
  78. package/dist/{get-Y7DFEFYM.js → get-B5TS6C7H.js} +2 -2
  79. package/dist/{gpuPolicy-A45VSUKR.js → gpuPolicy-LYOVBAJP.js} +5 -5
  80. package/dist/{grade-compare-ERSA3OUI.js → grade-compare-LBIHMAUN.js} +22 -22
  81. package/dist/{help-TW2AADLZ.js → help-XBP6A6LT.js} +1 -1
  82. package/dist/{history-DKGDSVWF.js → history-2S42ZXKL.js} +5 -5
  83. package/dist/hyperframe-runtime.js +54 -54
  84. package/dist/hyperframe.manifest.json +1 -1
  85. package/dist/hyperframe.runtime.iife.js +54 -54
  86. package/dist/hyperframes-player.global.js +3 -3
  87. package/dist/{info-I3NRRNX4.js → info-I2VDAWT7.js} +7 -7
  88. package/dist/{init-5Y3ZWZNF.js → init-BGHSDODI.js} +20 -20
  89. package/dist/{inspect-BJQKBB3X.js → inspect-MZK5B5RP.js} +23 -23
  90. package/dist/{installer-27K4JS2I.js → installer-LL4QAKFW.js} +4 -4
  91. package/dist/{keyframes-6V2NZO22.js → keyframes-2EBF7OSS.js} +6 -6
  92. package/dist/{lambda-AIMF3K4A.js → lambda-XKFPAOFE.js} +4 -4
  93. package/dist/{layout-YAPEBTU4.js → layout-TP5ERKEF.js} +23 -23
  94. package/dist/{lint-3LWWUIV7.js → lint-FQ6CEI7E.js} +6 -6
  95. package/dist/{list-NTSGEZJ6.js → list-FRNUJXZ3.js} +2 -2
  96. package/dist/{login-ZTDFGCCW.js → login-C25QU3BQ.js} +4 -4
  97. package/dist/{media-treatment-ARHX446F.js → media-treatment-DCANGWSV.js} +8 -8
  98. package/dist/{models-VHNQVTHG.js → models-GOD6ARB3.js} +6 -6
  99. package/dist/{motionShot-35HCSNCI.js → motionShot-FSKETANX.js} +11 -11
  100. package/dist/{normalize-audio-AUC73JH3.js → normalize-audio-C2IM7OID.js} +4 -4
  101. package/dist/{open-C5LVNU3U.js → open-VVISXIII.js} +4 -4
  102. package/dist/{pipeline-4GDTK54T.js → pipeline-7YHZPYIS.js} +5 -5
  103. package/dist/{play-U7UANF7Z.js → play-DSELK7G3.js} +16 -16
  104. package/dist/{present-X6V6TX3E.js → present-N72YFDKP.js} +12 -12
  105. package/dist/{preview-K43RTRU2.js → preview-XTYN4NJ2.js} +15 -15
  106. package/dist/{producer-PVMFMW23.js → producer-NDCU3MHK.js} +1 -1
  107. package/dist/{projectConfig-PI6MEN2T.js → projectConfig-MH4QU4AC.js} +6 -6
  108. package/dist/{publication-67C7KVTL.js → publication-KUSHI5MG.js} +2 -2
  109. package/dist/{publish-RBV7EAMH.js → publish-3XEEFWMF.js} +7 -7
  110. package/dist/{remove-background-Z2ECZX2Q.js → remove-background-2QKJ7XOD.js} +6 -6
  111. package/dist/{render-YBS3XGRJ.js → render-2DVYTVLQ.js} +18 -18
  112. package/dist/{render-2GQMQBU3.js → render-75E342ZU.js} +3 -3
  113. package/dist/{render-EFU4BZRZ.js → render-S73DW4KK.js} +8 -8
  114. package/dist/{render-batch-QC64OTB5.js → render-batch-YURBS54Q.js} +3 -3
  115. package/dist/{renderCancellation-NTVU7IMB.js → renderCancellation-373ASJTO.js} +5 -5
  116. package/dist/{resolver-GBWYG3EI.js → resolver-FE3GBZ4T.js} +4 -4
  117. package/dist/{sherpa-ZW6PWJS4.js → sherpa-B2D3AGP6.js} +6 -6
  118. package/dist/skills/media-use/SKILL.md +6 -4
  119. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +47 -4
  120. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +125 -18
  121. package/dist/skills/media-use/references/setup-providers.md +13 -0
  122. package/dist/{skills-VKZAX5AS.js → skills-ICJ22CZZ.js} +5 -5
  123. package/dist/{skillsUpdateCheck-PAY2OPDE.js → skillsUpdateCheck-GXZN56I5.js} +3 -3
  124. package/dist/{snapshot-SD5R3NWX.js → snapshot-XHKOAWF4.js} +23 -23
  125. package/dist/{src-RXTXL3VL.js → src-74PFDTDX.js} +7 -7
  126. package/dist/{src-7SSERHNP.js → src-I7UC3JTL.js} +4 -4
  127. package/dist/{staticProjectServer-XELJXX4J.js → staticProjectServer-2DGKD6TF.js} +12 -12
  128. package/dist/studio/assets/hyperframes-player-5Vx2AiUz.js +473 -0
  129. package/dist/studio/assets/{index-CWfuDCoA.js → index-BAnh7cSQ.js} +1 -1
  130. package/dist/studio/assets/{index-VAHDM_zL.js → index-C0thd4eM.js} +114 -114
  131. package/dist/studio/assets/{index-Dr3Bo9uH.js → index-P8fgj_Xa.js} +1 -1
  132. package/dist/studio/index.html +1 -1
  133. package/dist/studio/index.js +20 -0
  134. package/dist/studio/index.js.map +1 -1
  135. package/dist/{studio-api-4FNUZPJ4.js → studio-api-PROBO7JG.js} +6 -6
  136. package/dist/{studioServer-GHLL3F2M.js → studioServer-ID6UV2NE.js} +34 -34
  137. package/dist/{telemetry-7AO77PMH.js → telemetry-65LFHIWH.js} +3 -3
  138. package/dist/{timeline-6LTHSRXM.js → timeline-6UV3JJXD.js} +12 -12
  139. package/dist/{tokens-K6B46KNL.js → tokens-HIL4TZXI.js} +2 -2
  140. package/dist/{transcribe-CLLISRLZ.js → transcribe-TIO6W3EQ.js} +6 -6
  141. package/dist/{transcribe-K2OU6FZF.js → transcribe-V7F6QDSN.js} +6 -6
  142. package/dist/{updateCheck-X6UQBS6I.js → updateCheck-GZELANMA.js} +2 -2
  143. package/dist/{upgrade-BZFKEADI.js → upgrade-BX3KDDZJ.js} +2 -2
  144. package/dist/{urlDownloader-VAVUXYEQ.js → urlDownloader-R76OHFIE.js} +4 -4
  145. package/dist/{validate-VO5KEXWN.js → validate-7UX4I443.js} +14 -14
  146. package/dist/{video-JV6Y4UJR.js → video-RVGYEFQU.js} +5 -5
  147. package/package.json +1 -1
  148. package/dist/chunk-B3I3XJ47.js +0 -3711
  149. package/dist/studio/assets/hyperframes-player-BLuyxnK7.js +0 -473
@@ -3288,6 +3288,38 @@ function withPageText(url, fontText) {
3288
3288
  return `${withoutFragment}${joiner}text=${encodeURIComponent(fontText)}${parsed.hash}`;
3289
3289
  }
3290
3290
 
3291
+ // ../core/dist/fonts/fontDiagnostics.js
3292
+ var FontDiagCollector = class {
3293
+ families = [];
3294
+ current;
3295
+ beginFamily(required) {
3296
+ this.current = { required, resolved: false, attempts: [] };
3297
+ this.families.push(this.current);
3298
+ }
3299
+ endFamily(resolved) {
3300
+ if (this.current)
3301
+ this.current.resolved = resolved;
3302
+ this.current = void 0;
3303
+ }
3304
+ startAttempt(path, urlSource, textParam) {
3305
+ const attempt = {
3306
+ path,
3307
+ urlSource,
3308
+ textParam,
3309
+ cssCache: "fresh",
3310
+ cssStatus: null,
3311
+ blocksTotal: 0,
3312
+ regexMatches: 0,
3313
+ assets: { total: 0, diskCacheHit: 0, fetchedOk: 0, nonOk: {} }
3314
+ };
3315
+ this.current?.attempts.push(attempt);
3316
+ return attempt;
3317
+ }
3318
+ snapshot() {
3319
+ return { families: this.families };
3320
+ }
3321
+ };
3322
+
3291
3323
  // ../core/dist/fonts/deterministicFonts.js
3292
3324
  var GENERIC_FAMILIES = /* @__PURE__ */ new Set([
3293
3325
  "sans-serif",
@@ -3782,7 +3814,7 @@ async function bundledFamilyFaceRules(canonical, normalizedFamily, emitFamily, o
3782
3814
  coveredWeights.add(coverageKey(face.weight, style));
3783
3815
  }
3784
3816
  const canonicalFamily = resolveAliasDisplayName(normalizedFamily);
3785
- const googleFaces = canonicalFamily ? await fetchFamilyFaces(canonicalFamily, optional, options, fontText) : [];
3817
+ const googleFaces = canonicalFamily ? await fetchFamilyFaces(canonicalFamily, "bundled_supplement", optional, options, fontText) : [];
3786
3818
  const supplementary = googleFaces.filter((face) => !coveredWeights.has(coverageKey(face.weight, face.style)) || !isBundledSubsetRange(face.unicodeRange));
3787
3819
  const runs = groupFacesBySource(supplementary).flatMap((group) => partitionWeightRuns(group, coveredWeights));
3788
3820
  const firstAppearance = (run) => Math.min(...run.map((face) => supplementary.indexOf(face)));
@@ -3798,7 +3830,7 @@ async function bundledFamilyFaceRules(canonical, normalizedFamily, emitFamily, o
3798
3830
  return rules;
3799
3831
  }
3800
3832
  async function googleFamilyFaceRules(lookupFamily, emitFamily, optional, options, fontText) {
3801
- const googleFaces = await fetchFamilyFaces(lookupFamily, optional, options, fontText);
3833
+ const googleFaces = await fetchFamilyFaces(lookupFamily, "direct_google", optional, options, fontText);
3802
3834
  if (googleFaces.length === 0)
3803
3835
  return null;
3804
3836
  return googleFaces.map((face) => buildFontFaceRule(emitFamily, face.dataUri, face.weight, face.style, face.unicodeRange));
@@ -3974,8 +4006,10 @@ async function buildFontFaceCss(requestedFamilies, options, declaredFamilies, fo
3974
4006
  const unresolved = [];
3975
4007
  const requiredFirst = [...requestedFamilies].sort(([, a], [, b]) => Number(a.optional) - Number(b.optional));
3976
4008
  for (const [normalizedFamily, { family: originalCaseFamily, optional }] of requiredFirst) {
4009
+ options.diag.beginFamily(!optional);
3977
4010
  const familyRules = await resolveFamilyFaceRules(normalizedFamily, originalCaseFamily, originalCaseFamily, optional, options, fontText) ?? // Last, so a family that already resolves keeps exactly the faces it had.
3978
4011
  await resolveDeclaredFamilyAlias(originalCaseFamily, declaredFamilies(), optional, options, fontText);
4012
+ options.diag.endFamily(Boolean(familyRules));
3979
4013
  if (familyRules) {
3980
4014
  rules.push(...familyRules);
3981
4015
  continue;
@@ -4179,22 +4213,30 @@ async function fetchFontResource(url, init, readBody, familyName, what, options)
4179
4213
  }
4180
4214
  throw fontFetchError(familyName, url, what, lastCause, true);
4181
4215
  }
4182
- async function ensureWoff2DataUri(cachePath, woff2Url, familyName, weight, style, options) {
4216
+ async function ensureWoff2DataUri(cachePath, woff2Url, familyName, weight, style, options, tally) {
4217
+ tally.total += 1;
4183
4218
  try {
4184
- return `data:font/woff2;base64,${readFileSync2(cachePath).toString("base64")}`;
4219
+ const cached = `data:font/woff2;base64,${readFileSync2(cachePath).toString("base64")}`;
4220
+ tally.diskCacheHit += 1;
4221
+ return cached;
4185
4222
  } catch {
4186
4223
  }
4187
4224
  const woff2What = `Google Fonts woff2 (${weight}/${style})`;
4188
4225
  try {
4189
4226
  const fontResult = await fetchFontResource(woff2Url, void 0, (response) => response.arrayBuffer(), familyName, woff2What, options);
4190
- if (!fontResult.ok)
4227
+ if (!fontResult.ok) {
4228
+ const status = String(fontResult.response.status);
4229
+ tally.nonOk[status] = (tally.nonOk[status] ?? 0) + 1;
4191
4230
  return null;
4231
+ }
4192
4232
  writeFileSync2(cachePath, Buffer.from(fontResult.body), { flag: "wx", mode: 420 });
4233
+ tally.fetchedOk += 1;
4193
4234
  } catch (err) {
4194
4235
  throwIfCallerAborted(options.abortSignal);
4195
4236
  if (err instanceof FontFetchError)
4196
4237
  throw err;
4197
4238
  if (err.code === "EEXIST") {
4239
+ tally.diskCacheHit += 1;
4198
4240
  } else if (options.failClosedFontFetch) {
4199
4241
  throw fontFetchError(familyName, woff2Url, woff2What, { error: err });
4200
4242
  } else {
@@ -4218,17 +4260,18 @@ function raceAgainstAbort(promise, signal) {
4218
4260
  promise.then(resolve, reject).finally(() => signal.removeEventListener("abort", onAbort));
4219
4261
  });
4220
4262
  }
4221
- function fetchGoogleFontCss(url, familyName, options) {
4263
+ function fetchGoogleFontCss(url, familyName, options, attempt) {
4222
4264
  const mode = options.failClosedFontFetch ? `closed${options.retryPolicy.maxAttempts}` : "open";
4223
4265
  const key = `${mode}:${url}`;
4224
4266
  let shared = googleFontCssCache.get(key);
4267
+ attempt.cssCache = shared ? "hit" : "fresh";
4225
4268
  if (!shared) {
4226
4269
  shared = fetchFontResource(url, { headers: { "User-Agent": WOFF2_USER_AGENT } }, (response) => response.text(), familyName, "Google Fonts CSS", { ...options, abortSignal: void 0 }).then((result) => {
4227
4270
  if (result.ok)
4228
- return { ok: true, body: result.body };
4271
+ return { ok: true, body: result.body, status: result.response.status };
4229
4272
  if (isRetryableFontFetchStatus(result.response.status))
4230
4273
  googleFontCssCache.delete(key);
4231
- return { ok: false };
4274
+ return { ok: false, status: result.response.status };
4232
4275
  });
4233
4276
  googleFontCssCache.set(key, shared);
4234
4277
  shared.catch(() => googleFontCssCache.delete(key));
@@ -4242,28 +4285,39 @@ function declaredFaceFamily(block) {
4242
4285
  const found = /font-family:\s*['"]([^'"]+)['"]/i.exec(block);
4243
4286
  return found?.[1];
4244
4287
  }
4245
- async function fetchGoogleFont(familyName, options, fontText) {
4288
+ async function fetchGoogleFont(familyName, path, options, fontText) {
4246
4289
  const googleFamilyName = familyName.replace(/\+/g, " ");
4247
4290
  const encodedFamily = encodeURIComponent(googleFamilyName);
4248
4291
  const textParam = fontText ? `&text=${encodeURIComponent(fontText)}` : "";
4249
4292
  const normalizedFamily = normalizeFamilyName(googleFamilyName);
4250
4293
  const authoredStylesheet = FONT_ALIASES[normalizedFamily] ? void 0 : options.authoredStylesheets.get(normalizedFamily);
4251
- const urls = authoredStylesheet ? authoredStylesheet.map((url) => withPageText(url, fontText)) : [
4252
- `https://fonts.googleapis.com/css2?family=${encodedFamily}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700${textParam}`
4253
- ];
4294
+ const defaultUrl = `https://fonts.googleapis.com/css2?family=${encodedFamily}:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700${textParam}`;
4295
+ const fetchStylesheet = (url, urlSource) => fetchGoogleFontStylesheet(googleFamilyName, url, options, options.diag.startAttempt(path, urlSource, /[?&]text=/.test(url) ? "present" : "absent"));
4296
+ if (!authoredStylesheet) {
4297
+ return (await fetchStylesheet(defaultUrl, "default")).faces;
4298
+ }
4254
4299
  const faces = [];
4255
- for (const url of urls) {
4256
- faces.push(...await fetchGoogleFontStylesheet(googleFamilyName, url, options));
4300
+ const outcomes = [];
4301
+ for (const url of authoredStylesheet) {
4302
+ const result = await fetchStylesheet(withPageText(url, fontText), "authored");
4303
+ faces.push(...result.faces);
4304
+ if (result.faces.length === 0)
4305
+ outcomes.push(result.status ? `http_${result.status}` : "no_faces");
4257
4306
  }
4258
- return faces;
4307
+ if (faces.length > 0)
4308
+ return faces;
4309
+ const fallback = (await fetchStylesheet(defaultUrl, "default")).faces;
4310
+ options.log.warn(`[Compiler] google_font_link_fallback family="${familyName}" link_outcomes=${outcomes.join(",")} fallback_faces=${fallback.length}`);
4311
+ return fallback;
4259
4312
  }
4260
- async function readGoogleFontStylesheet(familyName, url, options) {
4313
+ async function readGoogleFontStylesheet(familyName, url, options, attempt) {
4261
4314
  try {
4262
- const cssResult = await fetchGoogleFontCss(url, familyName, options);
4315
+ const cssResult = await fetchGoogleFontCss(url, familyName, options, attempt);
4316
+ attempt.cssStatus = cssResult.status;
4263
4317
  if (!cssResult.ok) {
4264
- return null;
4318
+ return { css: null, status: cssResult.status };
4265
4319
  }
4266
- return cssResult.body;
4320
+ return { css: cssResult.body };
4267
4321
  } catch (err) {
4268
4322
  throwIfCallerAborted(options.abortSignal);
4269
4323
  if (err instanceof FontFetchError)
@@ -4271,7 +4325,7 @@ async function readGoogleFontStylesheet(familyName, url, options) {
4271
4325
  if (options.failClosedFontFetch) {
4272
4326
  throw fontFetchError(familyName, url, "Google Fonts CSS", { error: err });
4273
4327
  }
4274
- return null;
4328
+ return { css: null };
4275
4329
  }
4276
4330
  }
4277
4331
  function parseGoogleFontSource(match, familyName) {
@@ -4288,34 +4342,37 @@ function parseGoogleFontSource(match, familyName) {
4288
4342
  unicodeRange: match[4]?.trim() || void 0
4289
4343
  };
4290
4344
  }
4291
- async function fetchGoogleFontStylesheet(familyName, url, options) {
4345
+ async function fetchGoogleFontStylesheet(familyName, url, options, attempt) {
4292
4346
  const slug = fontSlug(familyName);
4293
- const cssText = await readGoogleFontStylesheet(familyName, url, options);
4294
- if (!cssText)
4295
- return [];
4347
+ const read = await readGoogleFontStylesheet(familyName, url, options, attempt);
4348
+ if (read.css === null)
4349
+ return { faces: [], status: read.status };
4350
+ const cssText = read.css;
4351
+ attempt.blocksTotal = (cssText.match(/@font-face\s*\{/gi) ?? []).length;
4296
4352
  const faceRegex = /@font-face\s*\{[^}]*font-style:\s*(normal|italic|oblique(?:\s+-?\d+(?:\.\d+)?deg){0,2})\s*;[^}]*font-weight:\s*(\d+(?:\s+\d+)?)[^}]*src:\s*url\(([^)]+)\)\s*format\(['"]woff2['"]\)(?:[^}]*?unicode-range:\s*([^;}]+))?[^}]*\}/gi;
4297
4353
  const faces = [];
4298
4354
  for (const match of cssText.matchAll(faceRegex)) {
4355
+ attempt.regexMatches += 1;
4299
4356
  const source = parseGoogleFontSource(match, familyName);
4300
4357
  if (!source)
4301
4358
  continue;
4302
4359
  const { weight, style, unicodeRange, url: woff2Url } = source;
4303
4360
  const cachePath = cachedWoff2Path(slug, weight, style, subsetToken(woff2Url));
4304
- const dataUri = await ensureWoff2DataUri(cachePath, woff2Url, familyName, weight, style, options);
4361
+ const dataUri = await ensureWoff2DataUri(cachePath, woff2Url, familyName, weight, style, options, attempt.assets);
4305
4362
  if (dataUri)
4306
4363
  faces.push({ weight, style, dataUri, unicodeRange });
4307
4364
  }
4308
4365
  if (faces.length > 0) {
4309
4366
  options.log.info(`[Compiler] Fetched ${faces.length} font face(s) for "${familyName}" from Google Fonts (cached to ${fontCacheDir(slug)})`);
4310
4367
  }
4311
- return faces;
4368
+ return { faces };
4312
4369
  }
4313
- async function fetchFamilyFaces(familyName, optional, options, fontText) {
4370
+ async function fetchFamilyFaces(familyName, path, optional, options, fontText) {
4314
4371
  if (!optional)
4315
- return fetchGoogleFont(familyName, options, fontText);
4372
+ return fetchGoogleFont(familyName, path, options, fontText);
4316
4373
  const maxAttempts = Math.min(options.retryPolicy.maxAttempts, 2);
4317
4374
  try {
4318
- return await fetchGoogleFont(familyName, { ...options, retryPolicy: { ...options.retryPolicy, maxAttempts } }, fontText);
4375
+ return await fetchGoogleFont(familyName, path, { ...options, retryPolicy: { ...options.retryPolicy, maxAttempts } }, fontText);
4319
4376
  } catch (err) {
4320
4377
  if (!(err instanceof FontFetchUnavailableError))
4321
4378
  throw err;
@@ -4456,6 +4513,7 @@ function placeAfterEveryStylesheet(document2, head, styleEl) {
4456
4513
  head.appendChild(styleEl);
4457
4514
  }
4458
4515
  async function injectDeterministicFontFaces(html, options = {}) {
4516
+ const diag = new FontDiagCollector();
4459
4517
  const failClosedFontFetch = options.failClosedFontFetch === true;
4460
4518
  const fetchImpl = options.fetchImpl ?? fetch;
4461
4519
  const allowSystemFontCapture = options.allowSystemFontCapture !== false;
@@ -4468,7 +4526,8 @@ async function injectDeterministicFontFaces(html, options = {}) {
4468
4526
  abortSignal: options.abortSignal,
4469
4527
  retryPolicy,
4470
4528
  retryDeadlineMs: Date.now() + retryPolicy.maxElapsedMs,
4471
- authoredStylesheets: authoredGoogleFontStylesheets(html)
4529
+ authoredStylesheets: authoredGoogleFontStylesheets(html),
4530
+ diag
4472
4531
  };
4473
4532
  const existingFaces = extractExistingFontFaces(html);
4474
4533
  const requestedFamilies = extractRequestedFontFamilies(html);
@@ -4485,7 +4544,9 @@ async function injectDeterministicFontFaces(html, options = {}) {
4485
4544
  const { css, unresolved } = await buildFontFaceCss(pendingFamilies, fetchOptions, () => declaredFamilies ??= collectDeclaredFontFamilies(html), extractGoogleFontsText(html));
4486
4545
  const required = unresolved.filter((family) => !pendingFamilies.get(family.toLowerCase())?.optional);
4487
4546
  if (required.length > 0 && options.failClosedFontFetch) {
4488
- throw new FontFetchError(required.join(", "), "", `[Compiler] Unresolved fonts in fail-closed mode: ${required.join(", ")}. Distributed renders require all fonts to be resolvable.`, void 0, FONT_FETCH_FAILED, unresolved);
4547
+ const unresolvedError = new FontFetchError(required.join(", "), "", `[Compiler] Unresolved fonts in fail-closed mode: ${required.join(", ")}. Distributed renders require all fonts to be resolvable.`, void 0, FONT_FETCH_FAILED, unresolved);
4548
+ unresolvedError.diagnostics = diag.snapshot();
4549
+ throw unresolvedError;
4489
4550
  }
4490
4551
  if (!css) {
4491
4552
  if (unresolved.length > 0) {
@@ -8,7 +8,7 @@ import {
8
8
  flush,
9
9
  shouldTrack,
10
10
  trackEvent
11
- } from "./chunk-C2JUHIG5.js";
11
+ } from "./chunk-RCFCZT5O.js";
12
12
  import {
13
13
  getPowerState
14
14
  } from "./chunk-GQJZORQP.js";
@@ -14,7 +14,7 @@ import {
14
14
  isAllowedHtmlAttribute,
15
15
  isSafeAttributeValue,
16
16
  sanitizeRichTextChildren
17
- } from "./chunk-QP3BRKGF.js";
17
+ } from "./chunk-6E6CM7WS.js";
18
18
  import {
19
19
  removeElementWithGsapCascade
20
20
  } from "./chunk-OZUQF4NB.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-HVW7ABXD.js";
13
13
  import {
14
14
  DEFAULT_REGISTRY_URL
15
- } from "./chunk-5IKJONRY.js";
15
+ } from "./chunk-Q65ZQFF2.js";
16
16
 
17
17
  // src/utils/projectConfig.ts
18
18
  import { readFileSync, writeFileSync } from "fs";
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  formatVariableValidationIssue,
18
18
  validateVariables
19
- } from "./chunk-QP3BRKGF.js";
19
+ } from "./chunk-6E6CM7WS.js";
20
20
  import {
21
21
  extractCompositionMetadata
22
22
  } from "./chunk-OZUQF4NB.js";
@@ -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-7VJJGC3D.js");
1281
+ const { trackCommandFailure } = await import("./events-YFFXKAQQ.js");
1282
1282
  trackCommandFailure(
1283
1283
  command,
1284
1284
  err,
@@ -26,7 +26,7 @@ import {
26
26
  renderFrameIdForRenderId,
27
27
  resolveAuthoredTimingWindow,
28
28
  toFps
29
- } from "./chunk-QP3BRKGF.js";
29
+ } from "./chunk-6E6CM7WS.js";
30
30
  import {
31
31
  AUDIO_GROUP_RENDER_ID_ATTR,
32
32
  COLOR_GRADING_SOURCE_HIDDEN_ATTR,
@@ -55,7 +55,7 @@ import {
55
55
  shiftRateLane,
56
56
  sourceTimeAt,
57
57
  timeAtSourceTime
58
- } from "./chunk-B3I3XJ47.js";
58
+ } from "./chunk-SYKKFAUW.js";
59
59
  import {
60
60
  clampAudioGain,
61
61
  isAudibleVideoElement
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-PBN6GBJE.js";
16
16
  import {
17
17
  parseFps
18
- } from "./chunk-QP3BRKGF.js";
18
+ } from "./chunk-6E6CM7WS.js";
19
19
 
20
20
  // src/browser/windowsCrash.ts
21
21
  var STATUS_STACK_BUFFER_OVERRUN_DEC = "3221225595";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  updateNoticesSuppressed
9
- } from "./chunk-DDQ4LOML.js";
9
+ } from "./chunk-IYFKBFTW.js";
10
10
  import {
11
11
  hostAnswers
12
12
  } from "./chunk-K4WIOZFP.js";
@@ -8,7 +8,7 @@ import {
8
8
  DEFAULT_REGISTRY_URL,
9
9
  fetchItemManifest,
10
10
  fetchRegistryManifest
11
- } from "./chunk-5IKJONRY.js";
11
+ } from "./chunk-Q65ZQFF2.js";
12
12
 
13
13
  // src/registry/resolver.ts
14
14
  function defaultWarn(message) {
@@ -8,10 +8,10 @@ import {
8
8
  DEFAULT_VP9_CPU_USED,
9
9
  isHttpUrl,
10
10
  runFfmpeg
11
- } from "./chunk-TPECLKPA.js";
11
+ } from "./chunk-E6SDW5FV.js";
12
12
  import {
13
13
  parseAnimatedGifMetadata
14
- } from "./chunk-QP3BRKGF.js";
14
+ } from "./chunk-6E6CM7WS.js";
15
15
  import {
16
16
  parseHTML
17
17
  } from "./chunk-GK4AIFIH.js";
@@ -6,24 +6,24 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  serveStaticProjectHtml
9
- } from "./chunk-PFJFHNU3.js";
9
+ } from "./chunk-34TXESM7.js";
10
10
  import {
11
11
  resolveProject
12
- } from "./chunk-PB3P4MKP.js";
12
+ } from "./chunk-TC2FBZJZ.js";
13
13
  import {
14
14
  AUDIT_SEEK_OPTIONS,
15
15
  installPageFunctionGuard,
16
16
  seekCompositionTimeline,
17
17
  waitForCompositionFonts,
18
18
  waitForRuntimeReady
19
- } from "./chunk-KFQNMY36.js";
19
+ } from "./chunk-XDSOIJC3.js";
20
20
  import {
21
21
  launchManagedBrowser,
22
22
  resolveManagedGpuMode
23
- } from "./chunk-BQKEGPPL.js";
23
+ } from "./chunk-O3SKIXQK.js";
24
24
  import {
25
25
  resolveDiagnosticNavigationTimeoutMs
26
- } from "./chunk-TYT2TLJR.js";
26
+ } from "./chunk-EKA4ZZBI.js";
27
27
  import {
28
28
  defineCommand
29
29
  } from "./chunk-S3S4TGEH.js";
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  printDeprecationNotice,
36
36
  withMeta
37
- } from "./chunk-DDQ4LOML.js";
37
+ } from "./chunk-IYFKBFTW.js";
38
38
  import {
39
39
  normalizeErrorMessage
40
40
  } from "./chunk-KNU5COPB.js";
@@ -670,7 +670,7 @@ async function collectTweenBoundaries(page) {
670
670
  });
671
671
  }
672
672
  async function bundleProjectHtml(projectDir) {
673
- const { bundleToSingleHtml } = await import("./compiler-RTU3KTLF.js");
673
+ const { bundleToSingleHtml } = await import("./compiler-ACHWOU5N.js");
674
674
  return bundleToSingleHtml(projectDir);
675
675
  }
676
676
  async function alignViewportToComposition(page, url) {
@@ -692,8 +692,8 @@ async function alignViewportToComposition(page, url) {
692
692
  async function runLayoutAudit(projectDir, opts) {
693
693
  const { ensureBrowser } = await import("./manager-CT3D67CG.js");
694
694
  const puppeteer = await import("puppeteer-core");
695
- const { buildChromeArgs } = await import("./src-7SSERHNP.js");
696
- const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalBrowserGpuMode } = await import("./gpuPolicy-A45VSUKR.js");
695
+ const { buildChromeArgs } = await import("./src-I7UC3JTL.js");
696
+ const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalBrowserGpuMode } = await import("./gpuPolicy-LYOVBAJP.js");
697
697
  const html = await bundleProjectHtml(projectDir);
698
698
  const server = await serveStaticProjectHtml(
699
699
  projectDir,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-6IHWCZ3W.js";
10
10
  import {
11
11
  stoppedByCancelSignal
12
- } from "./chunk-LQG6GPVK.js";
12
+ } from "./chunk-3A5AAPMP.js";
13
13
  import {
14
14
  DEFAULT_MODEL,
15
15
  ensureModel,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-ISN5GRYI.js";
18
18
  import {
19
19
  VERSION
20
- } from "./chunk-MUINFURL.js";
20
+ } from "./chunk-W6HTOVHU.js";
21
21
 
22
22
  // src/utils/updateCheck.ts
23
23
  import { existsSync, readFileSync } from "fs";
@@ -13,7 +13,7 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
13
13
  return "auto";
14
14
  }
15
15
  async function resolveCaptureBrowserGpuMode(requestedMode, chromePath) {
16
- const { resolveBrowserGpuMode } = await import("./src-7SSERHNP.js");
16
+ const { resolveBrowserGpuMode } = await import("./src-I7UC3JTL.js");
17
17
  return resolveBrowserGpuMode(requestedMode, { chromePath });
18
18
  }
19
19
 
@@ -20,7 +20,7 @@ import {
20
20
  typeDirPath,
21
21
  updateRecord,
22
22
  withFigmaErrors
23
- } from "./chunk-WKTHUC2R.js";
23
+ } from "./chunk-E4BSCXMU.js";
24
24
  import {
25
25
  defineCommand
26
26
  } from "./chunk-S3S4TGEH.js";
@@ -221,7 +221,7 @@ var asset_default = defineCommand({
221
221
  rendered > 0 ? `(${results.length} nodes, ${rendered} rendered in 1 figma request)` : `(${results.length} nodes, all reused from cache \u2014 no figma request)`
222
222
  );
223
223
  }
224
- const { trackFigmaImport } = await import("./telemetry-7AO77PMH.js");
224
+ const { trackFigmaImport } = await import("./telemetry-65LFHIWH.js");
225
225
  trackFigmaImport({
226
226
  phase: "asset",
227
227
  reused: results.every((r) => r.reused),
@@ -32,18 +32,18 @@ import {
32
32
  } from "./chunk-S3S4TGEH.js";
33
33
  import {
34
34
  resolveExtractCacheDir
35
- } from "./chunk-TPECLKPA.js";
35
+ } from "./chunk-E6SDW5FV.js";
36
36
  import {
37
37
  getUpdateMeta,
38
38
  withMeta
39
- } from "./chunk-DDQ4LOML.js";
39
+ } from "./chunk-IYFKBFTW.js";
40
40
  import {
41
41
  CONFIG_PATH,
42
42
  withFileLock
43
43
  } from "./chunk-XUXGIA7H.js";
44
44
  import {
45
45
  VERSION
46
- } from "./chunk-MUINFURL.js";
46
+ } from "./chunk-W6HTOVHU.js";
47
47
  import {
48
48
  normalizeErrorMessage
49
49
  } from "./chunk-KNU5COPB.js";
@@ -8,14 +8,14 @@ import {
8
8
  DEFAULT_REGISTRY_URL,
9
9
  fetchItemFile,
10
10
  validRegistryItem
11
- } from "./chunk-5IKJONRY.js";
11
+ } from "./chunk-Q65ZQFF2.js";
12
12
  import {
13
13
  publishRegistryFile,
14
14
  registryTargetPath
15
15
  } from "./chunk-GMECXFAN.js";
16
16
  import {
17
17
  validateVariables
18
- } from "./chunk-QP3BRKGF.js";
18
+ } from "./chunk-6E6CM7WS.js";
19
19
  import {
20
20
  realProjectRoot
21
21
  } from "./chunk-OFQWTKPW.js";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/utils/producer.ts
9
9
  async function loadProducer() {
10
- return await import("./src-RXTXL3VL.js");
10
+ return await import("./src-74PFDTDX.js");
11
11
  }
12
12
 
13
13
  export {
@@ -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-MHK5DE2P.js";
9
+ } from "./chunk-6Q6FR4KH.js";
10
10
  import {
11
11
  injectTagsAtHeadStart
12
- } from "./chunk-B3I3XJ47.js";
12
+ } from "./chunk-SYKKFAUW.js";
13
13
 
14
14
  // src/utils/compositionServer.ts
15
15
  import { createHash } from "crypto";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveCaptureBrowserGpuMode
9
- } from "./chunk-PE2I3AFA.js";
9
+ } from "./chunk-J5IPIQU2.js";
10
10
  import {
11
11
  requestCliExit
12
12
  } from "./chunk-PBN6GBJE.js";
@@ -7,29 +7,29 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  RegistryCompatibilityError,
9
9
  gateRegistryItemsCompatibility
10
- } from "./chunk-DQNOPYAG.js";
10
+ } from "./chunk-XWVGSEUT.js";
11
11
  import {
12
12
  DEFAULT_PROJECT_CONFIG,
13
13
  createProjectConfig,
14
14
  loadProjectConfig,
15
15
  projectConfigPath,
16
16
  recordProjectRegistryItems
17
- } from "./chunk-KMKWRIMC.js";
17
+ } from "./chunk-AVWEIOEN.js";
18
18
  import {
19
19
  resolveItemWithDependencies,
20
20
  resolveItemsByTag
21
- } from "./chunk-ASW6NWON.js";
21
+ } from "./chunk-IKVBTDLO.js";
22
22
  import {
23
23
  InvalidVariableValuesError,
24
24
  prepareItem,
25
25
  publishItem
26
- } from "./chunk-VVJFZU6B.js";
26
+ } from "./chunk-L3JSAB4L.js";
27
27
  import {
28
28
  DEFAULT_REGISTRY_URL
29
- } from "./chunk-5IKJONRY.js";
29
+ } from "./chunk-Q65ZQFF2.js";
30
30
  import {
31
31
  trackRegistryItemAdded
32
- } from "./chunk-JSGANFFH.js";
32
+ } from "./chunk-7XTZVLE6.js";
33
33
  import {
34
34
  defineCommand
35
35
  } from "./chunk-S3S4TGEH.js";
@@ -38,7 +38,7 @@ import {
38
38
  } from "./chunk-PBN6GBJE.js";
39
39
  import {
40
40
  ITEM_TYPE_DIRS
41
- } from "./chunk-QP3BRKGF.js";
41
+ } from "./chunk-6E6CM7WS.js";
42
42
  import {
43
43
  isProjectRootMissing,
44
44
  realpath