hyperframes 0.8.139 → 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 (200) hide show
  1. package/dist/{add-VYJQ4S3P.js → add-KH2CF4FD.js} +20 -22
  2. package/dist/{animatedGifPrep-IBMW6FZB.js → animatedGifPrep-QO4BSKR7.js} +15 -8
  3. package/dist/{asset-FLSUS73X.js → asset-4RDZILVJ.js} +3 -3
  4. package/dist/{assetCataloger-TGD7TRCR.js → assetCataloger-WGR4LYYN.js} +6 -3
  5. package/dist/{auth-EZXIN4M4.js → auth-WYQCOYE5.js} +7 -7
  6. package/dist/{autoUpdate-ZPMY5T3X.js → autoUpdate-PC5TN3NL.js} +2 -2
  7. package/dist/{backgroundChecks-JIDTAUFE.js → backgroundChecks-7M3T44EP.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{batchRender-FNZ6TJYY.js → batchRender-GOLLOE4V.js} +11 -8
  10. package/dist/beat-analyzer.global.js +5 -2
  11. package/dist/{beats-EAA4U3YN.js → beats-XJ7WP6QS.js} +24 -17
  12. package/dist/{benchmark-KKZQVK2Y.js → benchmark-HCGFBEZJ.js} +20 -23
  13. package/dist/{browser-ZIVVJLJT.js → browser-VQKO2FKG.js} +14 -28
  14. package/dist/{bundleWithLocalizedFonts-2XWC3PEM.js → bundleWithLocalizedFonts-FH7PHTTX.js} +5 -5
  15. package/dist/{capture-EFYPXI42.js → capture-TFZZSF6F.js} +22 -15
  16. package/dist/{capture-MKJHABUL.js → capture-XD3P3YQR.js} +2 -2
  17. package/dist/{catalog-EWX4BBI2.js → catalog-4S33QWJJ.js} +28 -30
  18. package/dist/{catch-up-FJFH7T4W.js → catch-up-RW7YXXNT.js} +11 -25
  19. package/dist/{check-YJNVDCBP.js → check-XVTRRN4Y.js} +72 -54
  20. package/dist/{checkBrowser-I6SPPEGD.js → checkBrowser-HZXJ2EDU.js} +81 -36
  21. package/dist/chunk-24OWOBQH.js +3656 -0
  22. package/dist/{chunk-OENM2JVZ.js → chunk-34TXESM7.js} +3 -3
  23. package/dist/{chunk-GWV2Y36Q.js → chunk-35RSNI77.js} +5 -106
  24. package/dist/{chunk-BC3OY2ED.js → chunk-3A5AAPMP.js} +1 -1
  25. package/dist/{chunk-U3HX7WE6.js → chunk-3NBKW2QJ.js} +1 -1
  26. package/dist/{chunk-A4X2YWNQ.js → chunk-4BB7V6AI.js} +38 -301
  27. package/dist/{chunk-EJ7OWYF2.js → chunk-6E6CM7WS.js} +19 -163
  28. package/dist/{chunk-CDMB3PRC.js → chunk-6IFXWJDX.js} +7 -7
  29. package/dist/{chunk-Z67RZ4XO.js → chunk-6Q6FR4KH.js} +279 -1968
  30. package/dist/{chunk-R4QIE6UY.js → chunk-7M4KAPAA.js} +92 -31
  31. package/dist/{chunk-25DHUDOK.js → chunk-7XTZVLE6.js} +12 -3
  32. package/dist/chunk-A4KQZXZI.js +116 -0
  33. package/dist/{chunk-DUQJF7FK.js → chunk-A7YQNIQT.js} +8 -8
  34. package/dist/{chunk-XOZ3J3LB.js → chunk-AVWEIOEN.js} +1 -1
  35. package/dist/{chunk-UQXOHEQ7.js → chunk-BM5PX3DJ.js} +4 -4
  36. package/dist/{chunk-SHB5VDMH.js → chunk-BRITLL56.js} +1 -1
  37. package/dist/{chunk-JX7Y57YY.js → chunk-E4BSCXMU.js} +1 -1
  38. package/dist/{chunk-QXOFUKBF.js → chunk-E6SDW5FV.js} +168 -165
  39. package/dist/{chunk-JH556Q42.js → chunk-EDYBFSPE.js} +2 -2
  40. package/dist/{chunk-R7LWDIKB.js → chunk-EKA4ZZBI.js} +1 -1
  41. package/dist/chunk-FXMKHHPO.js +123 -0
  42. package/dist/chunk-G75ENCEZ.js +283 -0
  43. package/dist/{chunk-PLNWWGE7.js → chunk-GQJZORQP.js} +1 -1
  44. package/dist/{chunk-U3GEXWI5.js → chunk-GS6FE3IW.js} +1 -1
  45. package/dist/{chunk-Y6W4DVPS.js → chunk-HKCNZITN.js} +1 -1
  46. package/dist/{chunk-HOIHGPWO.js → chunk-IKVBTDLO.js} +1 -1
  47. package/dist/{chunk-YOL4QRSL.js → chunk-INI3TM6I.js} +2 -2
  48. package/dist/{chunk-SIKMUO45.js → chunk-IO7ZIDRP.js} +12 -12
  49. package/dist/{chunk-W7SAWBQC.js → chunk-IV7EI5E2.js} +1 -1
  50. package/dist/{chunk-TCWL4BKK.js → chunk-IYFKBFTW.js} +1 -1
  51. package/dist/{chunk-JIIIBTN2.js → chunk-J5IPIQU2.js} +1 -1
  52. package/dist/chunk-JFKL3WAE.js +161 -0
  53. package/dist/{chunk-IBRZUVTH.js → chunk-K2GOFLTX.js} +2 -2
  54. package/dist/{chunk-X3TMMIDP.js → chunk-KFH6UD26.js} +8 -8
  55. package/dist/{chunk-O6K5DWXM.js → chunk-KOEWEFHK.js} +1 -1
  56. package/dist/{chunk-VTVS4IIP.js → chunk-L3JSAB4L.js} +2 -2
  57. package/dist/{chunk-3RT6D4P6.js → chunk-N77KD7ZZ.js} +1 -1
  58. package/dist/{chunk-FLRCVYNE.js → chunk-NORZWWLK.js} +2 -2
  59. package/dist/{chunk-4VZBKOQJ.js → chunk-O3SKIXQK.js} +1 -1
  60. package/dist/{chunk-PFI3VD77.js → chunk-OLDDJS3S.js} +10 -10
  61. package/dist/{chunk-UGI77E35.js → chunk-P6E4HFFU.js} +167 -61
  62. package/dist/{chunk-GIDHR5OL.js → chunk-Q65ZQFF2.js} +1 -1
  63. package/dist/chunk-QZ3AZTXI.js +1740 -0
  64. package/dist/{chunk-NTIOLSFE.js → chunk-R7UDXKI3.js} +3 -3
  65. package/dist/{chunk-7SI7GCX6.js → chunk-RCFCZT5O.js} +6 -6
  66. package/dist/{chunk-DW32KBHN.js → chunk-RPYPW5NN.js} +13 -13
  67. package/dist/chunk-SYKKFAUW.js +3711 -0
  68. package/dist/chunk-T76PLPD6.js +57 -0
  69. package/dist/{chunk-JTAYFSLO.js → chunk-TC2FBZJZ.js} +1 -1
  70. package/dist/{chunk-Q73ISOVQ.js → chunk-U7E736AJ.js} +1 -1
  71. package/dist/chunk-USDEMXXL.js +110 -0
  72. package/dist/{chunk-UMWROSIP.js → chunk-W6HTOVHU.js} +2 -2
  73. package/dist/{chunk-STA43FMY.js → chunk-WY5OODN5.js} +71 -3855
  74. package/dist/{chunk-EZ2P7LAP.js → chunk-XDSOIJC3.js} +8 -8
  75. package/dist/{chunk-ZTZ7NCJT.js → chunk-XTFJOR3K.js} +1 -1
  76. package/dist/{chunk-CDJ7FPPJ.js → chunk-XWVGSEUT.js} +1 -1
  77. package/dist/chunk-YA62XGXS.js +45 -0
  78. package/dist/{chunk-EH4VUY27.js → chunk-YURXPGAM.js} +2 -2
  79. package/dist/{clean-P4KTCOUA.js → clean-L2E4VD57.js} +29 -20
  80. package/dist/cli.js +55 -55
  81. package/dist/{cloud-PDY7S4HU.js → cloud-IDUQRYLO.js} +7 -7
  82. package/dist/{cloudrun-54MA2W5H.js → cloudrun-R3JXWXGG.js} +11 -8
  83. package/dist/commands/layout-audit.browser.js +37 -8
  84. package/dist/commands/motion-signature.browser.js +51 -2
  85. package/dist/{compare-LDWVSPC5.js → compare-VYBWSP3Y.js} +40 -31
  86. package/dist/{compiler-CWSZ4W7J.js → compiler-ACHWOU5N.js} +7 -3
  87. package/dist/{component-FIEGC22U.js → component-PYYV2V3F.js} +4 -4
  88. package/dist/{compositions-JR7PX356.js → compositions-B5GQSXH7.js} +23 -16
  89. package/dist/{delete-FXA2IHOS.js → delete-EAX2U3WI.js} +8 -8
  90. package/dist/{deterministicFonts-GTITFRSJ.js → deterministicFonts-F6WIVL2W.js} +1 -1
  91. package/dist/{dist-OJTEVNJR.js → dist-NZSQCYOF.js} +3 -1
  92. package/dist/{dist-4JZWRWS6.js → dist-ROUDWGLO.js} +27 -15
  93. package/dist/{doctor-OTDHPM6K.js → doctor-PJX7MLFG.js} +20 -13
  94. package/dist/{events-UAFTI24U.js → events-SBC54MHO.js} +6 -22
  95. package/dist/{events-6T7M2VCO.js → events-YFFXKAQQ.js} +10 -23
  96. package/dist/{feedback-ZGZODHB6.js → feedback-UETLWREV.js} +67 -45
  97. package/dist/{figma-D26EJ7ZB.js → figma-QDSJPIRW.js} +6 -6
  98. package/dist/fontLocalizeCli.js +18 -11
  99. package/dist/{get-IAREU7IK.js → get-B5TS6C7H.js} +8 -8
  100. package/dist/{gpuPolicy-NS7WZRDJ.js → gpuPolicy-LYOVBAJP.js} +15 -8
  101. package/dist/{grade-compare-ZXHFHCD2.js → grade-compare-LBIHMAUN.js} +40 -31
  102. package/dist/{help-RVNYHW3N.js → help-XBP6A6LT.js} +4 -4
  103. package/dist/{history-THP4VNMF.js → history-2S42ZXKL.js} +12 -30
  104. package/dist/hyperframe-runtime.js +59 -59
  105. package/dist/hyperframe.manifest.json +1 -1
  106. package/dist/hyperframe.runtime.iife.js +59 -59
  107. package/dist/hyperframes-player.global.js +3 -3
  108. package/dist/{info-EOFRHN5A.js → info-I2VDAWT7.js} +17 -20
  109. package/dist/{init-YLIJE4CG.js → init-BGHSDODI.js} +48 -41
  110. package/dist/{inspect-3D56ONJD.js → inspect-MZK5B5RP.js} +39 -30
  111. package/dist/{installer-GRR2GDZK.js → installer-LL4QAKFW.js} +8 -5
  112. package/dist/{keyframes-NXNCTQPK.js → keyframes-2EBF7OSS.js} +14 -25
  113. package/dist/{lambda-VGRZD7TR.js → lambda-XKFPAOFE.js} +16 -13
  114. package/dist/{layout-Z5DOS6DU.js → layout-TP5ERKEF.js} +39 -30
  115. package/dist/{lint-YD6NJGR2.js → lint-FQ6CEI7E.js} +17 -23
  116. package/dist/{lintProject-ANMPLBIT.js → lintProject-LM3XZRPZ.js} +3 -1
  117. package/dist/{list-XGDKILYN.js → list-FRNUJXZ3.js} +8 -8
  118. package/dist/{login-GD5SA4RD.js → login-C25QU3BQ.js} +9 -9
  119. package/dist/{logout-Q654A3SI.js → logout-GJXZQKOA.js} +5 -5
  120. package/dist/{media-treatment-TY4X4GQQ.js → media-treatment-DCANGWSV.js} +21 -20
  121. package/dist/{models-MXRDH4WJ.js → models-GOD6ARB3.js} +19 -12
  122. package/dist/{motionShot-6LKR3C2E.js → motionShot-FSKETANX.js} +22 -15
  123. package/dist/{normalize-O76AC4HE.js → normalize-IGLHCWTF.js} +0 -4
  124. package/dist/{normalize-audio-5ADDZKPJ.js → normalize-audio-C2IM7OID.js} +13 -26
  125. package/dist/{open-JXAMO325.js → open-VVISXIII.js} +11 -25
  126. package/dist/{pipeline-Q5MOPIIX.js → pipeline-7YHZPYIS.js} +15 -8
  127. package/dist/{play-3SPH5GWZ.js → play-DSELK7G3.js} +38 -32
  128. package/dist/{preflight-2PWAPKWC.js → preflight-Y5DN5D37.js} +3 -18
  129. package/dist/{present-ZTJQDKXZ.js → present-N72YFDKP.js} +32 -26
  130. package/dist/{preview-4A3XZR6J.js → preview-XTYN4NJ2.js} +33 -26
  131. package/dist/{producer-5ZKKKQPB.js → producer-NDCU3MHK.js} +1 -1
  132. package/dist/{projectConfig-WA4CS4SN.js → projectConfig-MH4QU4AC.js} +10 -7
  133. package/dist/{publication-CLG2FRRI.js → publication-KUSHI5MG.js} +6 -3
  134. package/dist/{publish-YTT2WMXO.js → publish-3XEEFWMF.js} +27 -20
  135. package/dist/{refresh-K24ETHMA.js → refresh-MFITBIKV.js} +5 -5
  136. package/dist/{remove-background-W35INR3B.js → remove-background-2QKJ7XOD.js} +22 -15
  137. package/dist/{render-WUBFQMAH.js → render-2DVYTVLQ.js} +52 -32
  138. package/dist/{render-7A4P5WMU.js → render-75E342ZU.js} +10 -7
  139. package/dist/{render-KICXUPNR.js → render-S73DW4KK.js} +23 -26
  140. package/dist/{render-batch-N7EFGE6S.js → render-batch-YURBS54Q.js} +11 -8
  141. package/dist/{renderCancellation-LYQPPFAO.js → renderCancellation-373ASJTO.js} +15 -8
  142. package/dist/renderSetupWorker.js +4 -2
  143. package/dist/{resolver-YTT2NENF.js → resolver-FE3GBZ4T.js} +8 -5
  144. package/dist/{sherpa-353MW4UV.js → sherpa-B2D3AGP6.js} +16 -9
  145. package/dist/skills/hyperframes/references/capability-menu.md +1 -1
  146. package/dist/skills/hyperframes-cli/SKILL.md +5 -0
  147. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
  148. package/dist/skills/hyperframes-cli/references/preview-render.md +1 -1
  149. package/dist/skills/media-use/SKILL.md +9 -5
  150. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +47 -4
  151. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +125 -18
  152. package/dist/skills/media-use/audio/scripts/lib/host-audio.mjs +28 -0
  153. package/dist/skills/media-use/audio/scripts/lib/host-audio.test.mjs +106 -0
  154. package/dist/skills/media-use/references/setup-providers.md +16 -2
  155. package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +21 -1
  156. package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +14 -0
  157. package/dist/skills/media-use/scripts/resolve.mjs +11 -6
  158. package/dist/{skills-2XJIOEBT.js → skills-ICJ22CZZ.js} +15 -30
  159. package/dist/{skillsUpdateCheck-LMCCWGNO.js → skillsUpdateCheck-GXZN56I5.js} +3 -3
  160. package/dist/{snapshot-WBRSTLJ2.js → snapshot-XHKOAWF4.js} +41 -32
  161. package/dist/{src-ZS3BLTZ5.js → src-74PFDTDX.js} +17 -10
  162. package/dist/{src-YWFJILQF.js → src-I7UC3JTL.js} +19 -11
  163. package/dist/{staticProjectServer-4VKVHPNG.js → staticProjectServer-2DGKD6TF.js} +24 -16
  164. package/dist/{status-73MBN37B.js → status-JA6SKQVH.js} +7 -24
  165. package/dist/studio/assets/hyperframes-player-5Vx2AiUz.js +473 -0
  166. package/dist/studio/assets/{index-DsEkE5_G.js → index-BAnh7cSQ.js} +1 -1
  167. package/dist/studio/assets/{index-Br1Whc0f.js → index-C0thd4eM.js} +204 -204
  168. package/dist/studio/assets/{index-BmIPrb8I.js → index-P8fgj_Xa.js} +1 -1
  169. package/dist/studio/{chunk-E422JDF5.js → chunk-H2DUOXTF.js} +2 -1
  170. package/dist/studio/index.d.ts +19 -3
  171. package/dist/studio/index.html +1 -1
  172. package/dist/studio/index.js +6518 -5813
  173. package/dist/studio/index.js.map +1 -1
  174. package/dist/studio/player.js +1 -1
  175. package/dist/{studio-api-5V4TVSQV.js → studio-api-PROBO7JG.js} +40 -28
  176. package/dist/{studioServer-M5XY3HYC.js → studioServer-ID6UV2NE.js} +100 -69
  177. package/dist/{system-RCRNX5VF.js → system-OQLOGGPJ.js} +2 -19
  178. package/dist/{telemetry-LOBRQGUD.js → telemetry-65LFHIWH.js} +8 -23
  179. package/dist/{timeline-3JCP6PXU.js → timeline-6UV3JJXD.js} +32 -22
  180. package/dist/{tokens-MLMIJBVF.js → tokens-HIL4TZXI.js} +3 -3
  181. package/dist/{transcribe-KNFXDEAX.js → transcribe-TIO6W3EQ.js} +16 -9
  182. package/dist/{transcribe-POH25ZPX.js → transcribe-V7F6QDSN.js} +20 -44
  183. package/dist/{updateCheck-5ITBSBST.js → updateCheck-GZELANMA.js} +2 -2
  184. package/dist/{upgrade-K6OK4FKT.js → upgrade-BX3KDDZJ.js} +5 -5
  185. package/dist/{urlDownloader-TJJQKADT.js → urlDownloader-R76OHFIE.js} +14 -7
  186. package/dist/{validate-PPPOBJHB.js → validate-7UX4I443.js} +26 -19
  187. package/dist/{video-OB22HWXZ.js → video-RVGYEFQU.js} +18 -11
  188. package/package.json +1 -1
  189. package/dist/chunk-HYYSJI5D.js +0 -3742
  190. package/dist/studio/assets/hyperframes-player-CckOoCJ8.js +0 -473
  191. package/dist/{chunk-I465DBM6.js → chunk-246MOR5U.js} +3 -3
  192. package/dist/{deploy-MX76RZ36.js → deploy-5G4Z6LPA.js} +1 -1
  193. package/dist/{destroy-H2TZBYHH.js → destroy-GFQLTIY3.js} +1 -1
  194. package/dist/{docs-QAPJEGLS.js → docs-MPOM3PHH.js} +3 -3
  195. package/dist/{policies-FSDZVS2E.js → policies-4FEXMXPK.js} +3 -3
  196. package/dist/{progress-FBIEEB7Y.js → progress-5AM2MZ7V.js} +3 -3
  197. package/dist/{sites-TNVKZS73.js → sites-HZMADOA3.js} +1 -1
  198. package/dist/studio/{chunk-E422JDF5.js.map → chunk-H2DUOXTF.js.map} +0 -0
  199. package/dist/{telemetry-2YC4SGQU.js → telemetry-W5AKPI4R.js} +3 -3
  200. package/dist/{tts-FU35O6YB.js → tts-TOHSPWEG.js} +4 -4
@@ -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,16 +8,16 @@ import {
8
8
  flush,
9
9
  shouldTrack,
10
10
  trackEvent
11
- } from "./chunk-7SI7GCX6.js";
11
+ } from "./chunk-RCFCZT5O.js";
12
12
  import {
13
13
  getPowerState
14
- } from "./chunk-PLNWWGE7.js";
14
+ } from "./chunk-GQJZORQP.js";
15
15
  import {
16
16
  CliRuntimeError
17
17
  } from "./chunk-PBN6GBJE.js";
18
18
  import {
19
19
  redactTelemetryString
20
- } from "./chunk-EJ7OWYF2.js";
20
+ } from "./chunk-T76PLPD6.js";
21
21
  import {
22
22
  readConfig
23
23
  } from "./chunk-XUXGIA7H.js";
@@ -486,6 +486,14 @@ function trackHistoryAction(props) {
486
486
  function trackSkillsInstallSkipped(props) {
487
487
  trackEvent("cli skill install skipped", { reason: props.reason });
488
488
  }
489
+ function trackFeedbackComment(props) {
490
+ trackEvent("cli_feedback_comment", {
491
+ comment: props.comment,
492
+ ...props.doctorSummary ? { doctor_summary: props.doctorSummary } : {},
493
+ ...props.feedbackId ? { feedback_id: props.feedbackId } : {},
494
+ ...props.recentRenderIds?.length ? { recent_render_ids: props.recentRenderIds.join(",") } : {}
495
+ });
496
+ }
489
497
  function trackRenderFeedback(props) {
490
498
  trackEvent("cli_render_feedback", {
491
499
  rating: props.rating,
@@ -592,6 +600,7 @@ export {
592
600
  trackCompareSheet,
593
601
  trackHistoryAction,
594
602
  trackSkillsInstallSkipped,
603
+ trackFeedbackComment,
595
604
  trackRenderFeedback,
596
605
  trackCatalogSearchMiss,
597
606
  trackCommandResult,
@@ -0,0 +1,116 @@
1
+ import { createRequire as __hf_createRequire } from "node:module";
2
+ import { fileURLToPath as __hf_fileURLToPath } from "node:url";
3
+ import { dirname as __hf_dirname } from "node:path";
4
+ var require = __hf_createRequire(import.meta.url);
5
+ var __filename = __hf_fileURLToPath(import.meta.url);
6
+ var __dirname = __hf_dirname(__filename);
7
+ import {
8
+ parseHTML
9
+ } from "./chunk-GK4AIFIH.js";
10
+
11
+ // ../parsers/dist/hfIds.js
12
+ var EXCLUDED_TAGS = /* @__PURE__ */ new Set([
13
+ "script",
14
+ "style",
15
+ "template",
16
+ "meta",
17
+ "link",
18
+ "noscript",
19
+ "base"
20
+ ]);
21
+ function fnv1a(str) {
22
+ let h = 2166136261;
23
+ for (let i = 0; i < str.length; i++) {
24
+ h ^= str.charCodeAt(i);
25
+ h = Math.imul(h, 16777619);
26
+ }
27
+ return h >>> 0;
28
+ }
29
+ function toHfId(hash) {
30
+ const s = (hash >>> 0).toString(36);
31
+ const four = s.length >= 4 ? s.slice(-4) : s.padStart(4, "0");
32
+ return `hf-${four}`;
33
+ }
34
+ function ownText(el) {
35
+ let text = "";
36
+ el.childNodes.forEach((n) => {
37
+ if (n.nodeType === 3) text += n.nodeValue ?? "";
38
+ });
39
+ return text.trim();
40
+ }
41
+ function getContractAttribute(el, name) {
42
+ return Array.from(el.attributes).find((attr) => attr.name.toLowerCase() === name)?.value ?? null;
43
+ }
44
+ function contentKey(el) {
45
+ const attrs = Array.from(el.attributes).filter((a) => !a.name.toLowerCase().startsWith("data-hf-")).map((a) => `${a.name.toLowerCase()}\0${a.value}`).sort().join("");
46
+ return `${el.tagName.toLowerCase()}|${attrs}|${ownText(el)}`;
47
+ }
48
+ function mintHfId(el, assigned) {
49
+ const key = contentKey(el);
50
+ let id = toHfId(fnv1a(key));
51
+ let dup = 0;
52
+ while (assigned.has(id)) {
53
+ dup += 1;
54
+ if (dup > 1e4) {
55
+ id = `hf-${(fnv1a(key) >>> 0).toString(36)}-${dup}`;
56
+ break;
57
+ }
58
+ id = toHfId(fnv1a(`${key}#${dup}`));
59
+ }
60
+ assigned.add(id);
61
+ return id;
62
+ }
63
+ function getChildElements(parent) {
64
+ const directChildren = Array.from(parent.children);
65
+ if (directChildren.length || parent.tagName.toLowerCase() !== "template") return directChildren;
66
+ const content = parent.content;
67
+ if (content?.children.length) return Array.from(content.children);
68
+ return directChildren;
69
+ }
70
+ function isCompositionTemplate(el) {
71
+ if (el.tagName.toLowerCase() !== "template") return false;
72
+ if (getContractAttribute(el, "data-composition-id") !== null) return true;
73
+ for (const child of getChildElements(el)) {
74
+ if (getContractAttribute(child, "data-composition-id") !== null) return true;
75
+ }
76
+ return false;
77
+ }
78
+ function walkCompositionDescendants(root, visit) {
79
+ const rootElement = root.nodeType === 9 ? root.documentElement : root;
80
+ if (!rootElement) return;
81
+ const walk = (parent) => {
82
+ for (const child of getChildElements(parent)) {
83
+ const isTemplate = child.tagName.toLowerCase() === "template";
84
+ if (isTemplate && !isCompositionTemplate(child)) continue;
85
+ visit(child);
86
+ walk(child);
87
+ }
88
+ };
89
+ walk(rootElement);
90
+ }
91
+ function assignHfIds(body) {
92
+ const assigned = /* @__PURE__ */ new Set();
93
+ walkCompositionDescendants(body, (el) => {
94
+ const existing = getContractAttribute(el, "data-hf-id");
95
+ if (existing) assigned.add(existing);
96
+ });
97
+ walkCompositionDescendants(body, (el) => {
98
+ if (EXCLUDED_TAGS.has(el.tagName.toLowerCase())) return;
99
+ if (getContractAttribute(el, "data-hf-id")) return;
100
+ el.setAttribute("data-hf-id", mintHfId(el, assigned));
101
+ });
102
+ }
103
+ function ensureHfIds(html) {
104
+ const wrapped = !/<!doctype|<html[\s>]/i.test(html);
105
+ const { document } = wrapped ? parseHTML(`<!DOCTYPE html><html><head></head><body>${html}</body></html>`) : parseHTML(html);
106
+ if (!document.body) return html;
107
+ assignHfIds(document.body);
108
+ return wrapped ? document.body.innerHTML || "" : document.toString();
109
+ }
110
+
111
+ export {
112
+ EXCLUDED_TAGS,
113
+ mintHfId,
114
+ walkCompositionDescendants,
115
+ ensureHfIds
116
+ };
@@ -4,23 +4,23 @@ import { dirname as __hf_dirname } from "node:path";
4
4
  var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
+ import {
8
+ EXCLUDED_TAGS,
9
+ ensureHfIds,
10
+ mintHfId,
11
+ walkCompositionDescendants
12
+ } from "./chunk-A4KQZXZI.js";
7
13
  import {
8
14
  isAllowedHtmlAttribute,
9
15
  isSafeAttributeValue,
10
16
  sanitizeRichTextChildren
11
- } from "./chunk-EJ7OWYF2.js";
17
+ } from "./chunk-6E6CM7WS.js";
12
18
  import {
13
19
  removeElementWithGsapCascade
14
20
  } from "./chunk-OZUQF4NB.js";
15
- import {
16
- EXCLUDED_TAGS,
17
- ensureHfIds,
18
- mintHfId,
19
- walkCompositionDescendants
20
- } from "./chunk-GWV2Y36Q.js";
21
21
  import {
22
22
  require_dist
23
- } from "./chunk-STA43FMY.js";
23
+ } from "./chunk-24OWOBQH.js";
24
24
  import {
25
25
  readClipTiming,
26
26
  readMediaOffsetSeconds,
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-HVW7ABXD.js";
13
13
  import {
14
14
  DEFAULT_REGISTRY_URL
15
- } from "./chunk-GIDHR5OL.js";
15
+ } from "./chunk-Q65ZQFF2.js";
16
16
 
17
17
  // src/utils/projectConfig.ts
18
18
  import { readFileSync, writeFileSync } from "fs";
@@ -10,19 +10,19 @@ import {
10
10
  import {
11
11
  ensureDOMParser
12
12
  } from "./chunk-PFCFR3KZ.js";
13
- import {
14
- c
15
- } from "./chunk-ZTZA4UWZ.js";
16
13
  import {
17
14
  failCommand
18
15
  } from "./chunk-PBN6GBJE.js";
19
16
  import {
20
17
  formatVariableValidationIssue,
21
18
  validateVariables
22
- } from "./chunk-EJ7OWYF2.js";
19
+ } from "./chunk-6E6CM7WS.js";
23
20
  import {
24
21
  extractCompositionMetadata
25
22
  } from "./chunk-OZUQF4NB.js";
23
+ import {
24
+ c
25
+ } from "./chunk-ZTZA4UWZ.js";
26
26
 
27
27
  // src/utils/variables.ts
28
28
  import { readFileSync } from "fs";
@@ -9,7 +9,7 @@ import {
9
9
  buildAuthHeaders,
10
10
  refreshTokens,
11
11
  resolveCredential
12
- } from "./chunk-I465DBM6.js";
12
+ } from "./chunk-246MOR5U.js";
13
13
 
14
14
  // src/cloud/auth.ts
15
15
  async function resolveCloudAuthHeaders() {
@@ -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-6T7M2VCO.js");
1281
+ const { trackCommandFailure } = await import("./events-YFFXKAQQ.js");
1282
1282
  trackCommandFailure(
1283
1283
  command,
1284
1284
  err,