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
@@ -10,24 +10,24 @@ import {
10
10
  import {
11
11
  launchManagedBrowser,
12
12
  resolveManagedGpuMode
13
- } from "./chunk-4VZBKOQJ.js";
13
+ } from "./chunk-O3SKIXQK.js";
14
14
  import {
15
15
  resolveDiagnosticNavigationTimeoutMs,
16
16
  windowsChromeCrashRemediation
17
- } from "./chunk-R7LWDIKB.js";
17
+ } from "./chunk-EKA4ZZBI.js";
18
18
  import {
19
19
  resolveLocalBrowserGpuMode
20
- } from "./chunk-JIIIBTN2.js";
21
- import {
22
- c
23
- } from "./chunk-ZTZA4UWZ.js";
20
+ } from "./chunk-J5IPIQU2.js";
24
21
  import {
25
22
  assertWebGpuAdapterAvailable,
26
23
  compositionRequiresWebGpu
27
- } from "./chunk-QXOFUKBF.js";
24
+ } from "./chunk-E6SDW5FV.js";
28
25
  import {
29
26
  normalizeErrorMessage
30
27
  } from "./chunk-KNU5COPB.js";
28
+ import {
29
+ c
30
+ } from "./chunk-ZTZA4UWZ.js";
31
31
 
32
32
  // src/capture/captureCompositionFrame.ts
33
33
  import { spawn } from "child_process";
@@ -103,7 +103,7 @@ async function openSettledCompositionPage(html, url, options) {
103
103
  const { ensureBrowser, findSystemBrowser } = await import("./manager-CT3D67CG.js");
104
104
  const browser = await ensureBrowser();
105
105
  const puppeteer = await import("puppeteer-core");
106
- const { buildChromeArgs } = await import("./src-YWFJILQF.js");
106
+ const { buildChromeArgs } = await import("./src-I7UC3JTL.js");
107
107
  const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
108
108
  const requiresWebGpu = compositionRequiresWebGpu(html);
109
109
  const launch = async (executablePath) => {
@@ -10,7 +10,7 @@ import {
10
10
  hasPreservedUnknownData,
11
11
  readStore,
12
12
  writeStore
13
- } from "./chunk-I465DBM6.js";
13
+ } from "./chunk-246MOR5U.js";
14
14
 
15
15
  // src/auth/user.ts
16
16
  function isUserInfoEmpty(u) {
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-UMWROSIP.js";
9
+ } from "./chunk-W6HTOVHU.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";
@@ -0,0 +1,45 @@
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
+
8
+ // ../core/dist/audibleVideo.js
9
+ var AUDIBLE_VIDEO_QUALIFIER = ':not([muted]):is(:not([data-has-audio]),[data-has-audio="true"])';
10
+ var AUDIBLE_MEDIA_SELECTOR = `audio[data-start], video[data-start]${AUDIBLE_VIDEO_QUALIFIER}`;
11
+ function isAudibleVideoElement(el) {
12
+ if (el.tagName.toLowerCase() !== "video" || el.hasAttribute("muted"))
13
+ return false;
14
+ const declared = el.getAttribute("data-has-audio");
15
+ return declared === null || declared === "true";
16
+ }
17
+ function audibleVideoNeedsWebAudio(fields) {
18
+ return (fields.volume ?? 1) > 1 || Boolean(fields.fxChain || fields.automation || fields.audioGroup);
19
+ }
20
+
21
+ // ../core/dist/audioGain.js
22
+ var MAX_AUDIO_GAIN_DB = 12;
23
+ function audioDbToGain(db) {
24
+ return 10 ** (db / 20);
25
+ }
26
+ var MAX_AUDIO_GAIN = audioDbToGain(MAX_AUDIO_GAIN_DB);
27
+ function clampAudioGain(value) {
28
+ if (!Number.isFinite(value))
29
+ return 1;
30
+ return Math.max(0, Math.min(MAX_AUDIO_GAIN, value));
31
+ }
32
+ function formatAudioGain(gain) {
33
+ return clampAudioGain(gain).toFixed(6).replace(/\.?0+$/, "");
34
+ }
35
+
36
+ export {
37
+ MAX_AUDIO_GAIN_DB,
38
+ MAX_AUDIO_GAIN,
39
+ clampAudioGain,
40
+ formatAudioGain,
41
+ AUDIBLE_VIDEO_QUALIFIER,
42
+ AUDIBLE_MEDIA_SELECTOR,
43
+ isAudibleVideoElement,
44
+ audibleVideoNeedsWebAudio
45
+ };
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  DEFAULT_VP9_CPU_USED,
21
21
  renderProvenanceArgs
22
- } from "./chunk-QXOFUKBF.js";
22
+ } from "./chunk-E6SDW5FV.js";
23
23
 
24
24
  // src/background-removal/pipeline.ts
25
25
  import { spawn } from "child_process";
@@ -202,7 +202,7 @@ function inferInputKind(inputPath) {
202
202
  }
203
203
  async function probeMedia(inputPath) {
204
204
  const isImage = inferInputKind(inputPath) === "image";
205
- const engine = await import("./src-YWFJILQF.js");
205
+ const engine = await import("./src-I7UC3JTL.js");
206
206
  const meta = await engine.extractMediaMetadata(inputPath);
207
207
  if (isImage) {
208
208
  return { width: meta.width, height: meta.height, fps: 0, frameCount: 1 };
@@ -6,36 +6,35 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  redactHome
9
- } from "./chunk-X3TMMIDP.js";
9
+ } from "./chunk-KFH6UD26.js";
10
10
  import "./chunk-Z27A7NUB.js";
11
11
  import "./chunk-5ETJX6WM.js";
12
12
  import {
13
13
  loadProducer
14
- } from "./chunk-3RT6D4P6.js";
14
+ } from "./chunk-N77KD7ZZ.js";
15
15
  import "./chunk-3DKN5WKL.js";
16
16
  import {
17
17
  formatBytes
18
18
  } from "./chunk-IHFUKJOR.js";
19
+ import "./chunk-6Q6FR4KH.js";
20
+ import "./chunk-A7YQNIQT.js";
19
21
  import {
20
22
  DEFAULT_HISTORY_ROOT,
21
23
  listProjectHistories,
22
24
  pruneGoneProjectHistories
23
- } from "./chunk-Z67RZ4XO.js";
24
- import "./chunk-DUQJF7FK.js";
25
- import "./chunk-Q73ISOVQ.js";
25
+ } from "./chunk-QZ3AZTXI.js";
26
+ import "./chunk-U7E736AJ.js";
26
27
  import {
27
28
  CACHE_DIR_NAME,
28
29
  cleanupProxyCache
29
- } from "./chunk-A4X2YWNQ.js";
30
+ } from "./chunk-4BB7V6AI.js";
31
+ import "./chunk-G75ENCEZ.js";
30
32
  import "./chunk-EOVYQ3IG.js";
31
- import "./chunk-O6K5DWXM.js";
33
+ import "./chunk-KOEWEFHK.js";
32
34
  import "./chunk-6BEFEWFB.js";
33
35
  import "./chunk-TVCRUG2S.js";
34
36
  import "./chunk-374QQGBQ.js";
35
- import {
36
- c
37
- } from "./chunk-ZTZA4UWZ.js";
38
- import "./chunk-PLNWWGE7.js";
37
+ import "./chunk-GQJZORQP.js";
39
38
  import "./chunk-AMKC3AXA.js";
40
39
  import {
41
40
  defineCommand
@@ -50,35 +49,45 @@ import {
50
49
  directorySizeBytes,
51
50
  gcExtractionCache,
52
51
  resolveExtractCacheDir
53
- } from "./chunk-QXOFUKBF.js";
54
- import "./chunk-EJ7OWYF2.js";
52
+ } from "./chunk-E6SDW5FV.js";
53
+ import "./chunk-35RSNI77.js";
54
+ import "./chunk-A4KQZXZI.js";
55
+ import "./chunk-USDEMXXL.js";
56
+ import "./chunk-6E6CM7WS.js";
55
57
  import "./chunk-OZUQF4NB.js";
56
58
  import "./chunk-DPVXBVLL.js";
57
- import "./chunk-GWV2Y36Q.js";
58
- import "./chunk-HYYSJI5D.js";
59
+ import "./chunk-SYKKFAUW.js";
59
60
  import "./chunk-VC76R6W2.js";
61
+ import "./chunk-YA62XGXS.js";
60
62
  import "./chunk-OFQWTKPW.js";
63
+ import "./chunk-T76PLPD6.js";
64
+ import "./chunk-FXMKHHPO.js";
65
+ import "./chunk-RQVDTPGD.js";
61
66
  import "./chunk-4PFZPP2N.js";
62
67
  import "./chunk-LCSMOLGX.js";
63
68
  import "./chunk-TWWSYAKJ.js";
64
- import "./chunk-STA43FMY.js";
69
+ import "./chunk-WY5OODN5.js";
70
+ import "./chunk-24OWOBQH.js";
71
+ import "./chunk-JFKL3WAE.js";
65
72
  import "./chunk-HBBJFK6I.js";
66
73
  import "./chunk-PJ3HDUCY.js";
67
74
  import "./chunk-TQFG7HTI.js";
68
75
  import "./chunk-GK4AIFIH.js";
69
76
  import "./chunk-2PSPARWP.js";
77
+ import "./chunk-PMRBLBUP.js";
70
78
  import {
71
79
  withMeta
72
- } from "./chunk-TCWL4BKK.js";
80
+ } from "./chunk-IYFKBFTW.js";
73
81
  import "./chunk-K4WIOZFP.js";
74
82
  import "./chunk-XUXGIA7H.js";
75
83
  import "./chunk-WERLJGIC.js";
76
84
  import "./chunk-ISN5GRYI.js";
77
- import "./chunk-UMWROSIP.js";
85
+ import "./chunk-W6HTOVHU.js";
78
86
  import "./chunk-KNU5COPB.js";
79
87
  import "./chunk-3GXQPCJC.js";
80
- import "./chunk-RQVDTPGD.js";
81
- import "./chunk-PMRBLBUP.js";
88
+ import {
89
+ c
90
+ } from "./chunk-ZTZA4UWZ.js";
82
91
  import "./chunk-M2WBOQ2Q.js";
83
92
 
84
93
  // src/commands/clean.ts
package/dist/cli.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  } from "./chunk-ISN5GRYI.js";
35
35
  import {
36
36
  VERSION
37
- } from "./chunk-UMWROSIP.js";
37
+ } from "./chunk-W6HTOVHU.js";
38
38
  import "./chunk-M2WBOQ2Q.js";
39
39
 
40
40
  // src/cli.ts
@@ -181,7 +181,7 @@ function wrapCommand(cmd, path) {
181
181
  }
182
182
  async function reportCommandFailure(command2, err) {
183
183
  try {
184
- const { trackCommandFailure } = await import("./events-6T7M2VCO.js");
184
+ const { trackCommandFailure } = await import("./events-YFFXKAQQ.js");
185
185
  trackCommandFailure(command2, err);
186
186
  } catch {
187
187
  }
@@ -253,54 +253,54 @@ async function assertStudioWorkspaceBuilt() {
253
253
  });
254
254
  }
255
255
  var commandLoaders = {
256
- init: () => import("./init-YLIJE4CG.js").then((m) => m.default),
257
- add: () => import("./add-VYJQ4S3P.js").then((m) => m.default),
258
- catalog: () => import("./catalog-EWX4BBI2.js").then((m) => m.default),
256
+ init: () => import("./init-BGHSDODI.js").then((m) => m.default),
257
+ add: () => import("./add-KH2CF4FD.js").then((m) => m.default),
258
+ catalog: () => import("./catalog-4S33QWJJ.js").then((m) => m.default),
259
259
  "media-use": () => import("./media-use-4XXGABIL.js").then((m) => m.default),
260
- play: () => import("./play-3SPH5GWZ.js").then((m) => m.default),
261
- present: () => import("./present-ZTJQDKXZ.js").then((m) => m.default),
262
- preview: () => assertStudioWorkspaceBuilt().then(() => import("./preview-4A3XZR6J.js").then((m) => m.default)),
263
- publish: () => import("./publish-YTT2WMXO.js").then((m) => m.default),
264
- open: () => import("./open-JXAMO325.js").then((m) => m.default),
265
- "catch-up": () => import("./catch-up-FJFH7T4W.js").then((m) => m.default),
266
- render: () => import("./render-WUBFQMAH.js").then((m) => m.default),
267
- lint: () => import("./lint-YD6NJGR2.js").then((m) => m.default),
268
- check: () => import("./check-YJNVDCBP.js").then((m) => m.default),
269
- beats: () => import("./beats-EAA4U3YN.js").then((m) => m.default),
270
- "normalize-audio": () => import("./normalize-audio-5ADDZKPJ.js").then((m) => m.default),
271
- inspect: () => import("./inspect-3D56ONJD.js").then((m) => m.default),
272
- keyframes: () => import("./keyframes-NXNCTQPK.js").then((m) => m.default),
273
- layout: () => import("./layout-Z5DOS6DU.js").then((m) => m.default),
274
- info: () => import("./info-EOFRHN5A.js").then((m) => m.default),
275
- compositions: () => import("./compositions-JR7PX356.js").then((m) => m.default),
276
- timeline: () => import("./timeline-3JCP6PXU.js").then((m) => m.default),
277
- history: () => import("./history-THP4VNMF.js").then((m) => m.default),
278
- benchmark: () => import("./benchmark-KKZQVK2Y.js").then((m) => m.default),
279
- browser: () => import("./browser-ZIVVJLJT.js").then((m) => m.default),
280
- "remove-background": () => import("./remove-background-W35INR3B.js").then((m) => m.default),
281
- transcribe: () => import("./transcribe-POH25ZPX.js").then((m) => m.default),
260
+ play: () => import("./play-DSELK7G3.js").then((m) => m.default),
261
+ present: () => import("./present-N72YFDKP.js").then((m) => m.default),
262
+ preview: () => assertStudioWorkspaceBuilt().then(() => import("./preview-XTYN4NJ2.js").then((m) => m.default)),
263
+ publish: () => import("./publish-3XEEFWMF.js").then((m) => m.default),
264
+ open: () => import("./open-VVISXIII.js").then((m) => m.default),
265
+ "catch-up": () => import("./catch-up-RW7YXXNT.js").then((m) => m.default),
266
+ render: () => import("./render-2DVYTVLQ.js").then((m) => m.default),
267
+ lint: () => import("./lint-FQ6CEI7E.js").then((m) => m.default),
268
+ check: () => import("./check-XVTRRN4Y.js").then((m) => m.default),
269
+ beats: () => import("./beats-XJ7WP6QS.js").then((m) => m.default),
270
+ "normalize-audio": () => import("./normalize-audio-C2IM7OID.js").then((m) => m.default),
271
+ inspect: () => import("./inspect-MZK5B5RP.js").then((m) => m.default),
272
+ keyframes: () => import("./keyframes-2EBF7OSS.js").then((m) => m.default),
273
+ layout: () => import("./layout-TP5ERKEF.js").then((m) => m.default),
274
+ info: () => import("./info-I2VDAWT7.js").then((m) => m.default),
275
+ compositions: () => import("./compositions-B5GQSXH7.js").then((m) => m.default),
276
+ timeline: () => import("./timeline-6UV3JJXD.js").then((m) => m.default),
277
+ history: () => import("./history-2S42ZXKL.js").then((m) => m.default),
278
+ benchmark: () => import("./benchmark-HCGFBEZJ.js").then((m) => m.default),
279
+ browser: () => import("./browser-VQKO2FKG.js").then((m) => m.default),
280
+ "remove-background": () => import("./remove-background-2QKJ7XOD.js").then((m) => m.default),
281
+ transcribe: () => import("./transcribe-V7F6QDSN.js").then((m) => m.default),
282
282
  usage: () => import("./usage-EC3KFUIJ.js").then((m) => m.default),
283
- models: () => import("./models-MXRDH4WJ.js").then((m) => m.default),
284
- tts: () => import("./tts-FU35O6YB.js").then((m) => m.default),
285
- docs: () => import("./docs-QAPJEGLS.js").then((m) => m.default),
286
- doctor: () => import("./doctor-OTDHPM6K.js").then((m) => m.default),
287
- clean: () => import("./clean-P4KTCOUA.js").then((m) => m.default),
288
- upgrade: () => import("./upgrade-K6OK4FKT.js").then((m) => m.default),
289
- skills: () => import("./skills-2XJIOEBT.js").then((m) => m.default),
290
- feedback: () => import("./feedback-ZGZODHB6.js").then((m) => m.default),
291
- telemetry: () => import("./telemetry-2YC4SGQU.js").then((m) => m.default),
292
- events: () => import("./events-UAFTI24U.js").then((m) => m.default),
293
- validate: () => import("./validate-PPPOBJHB.js").then((m) => m.default),
294
- snapshot: () => import("./snapshot-WBRSTLJ2.js").then((m) => m.default),
295
- "media-treatment": () => import("./media-treatment-TY4X4GQQ.js").then((m) => m.mediaTreatmentCommand),
296
- "grade-compare": () => import("./grade-compare-ZXHFHCD2.js").then((m) => m.default),
297
- compare: () => import("./compare-LDWVSPC5.js").then((m) => m.default),
298
- capture: () => import("./capture-MKJHABUL.js").then((m) => m.default),
299
- lambda: () => import("./lambda-VGRZD7TR.js").then((m) => m.default),
300
- cloudrun: () => import("./cloudrun-54MA2W5H.js").then((m) => m.default),
301
- cloud: () => import("./cloud-PDY7S4HU.js").then((m) => m.default),
302
- auth: () => import("./auth-EZXIN4M4.js").then((m) => m.default),
303
- figma: () => import("./figma-D26EJ7ZB.js").then((m) => m.default)
283
+ models: () => import("./models-GOD6ARB3.js").then((m) => m.default),
284
+ tts: () => import("./tts-TOHSPWEG.js").then((m) => m.default),
285
+ docs: () => import("./docs-MPOM3PHH.js").then((m) => m.default),
286
+ doctor: () => import("./doctor-PJX7MLFG.js").then((m) => m.default),
287
+ clean: () => import("./clean-L2E4VD57.js").then((m) => m.default),
288
+ upgrade: () => import("./upgrade-BX3KDDZJ.js").then((m) => m.default),
289
+ skills: () => import("./skills-ICJ22CZZ.js").then((m) => m.default),
290
+ feedback: () => import("./feedback-UETLWREV.js").then((m) => m.default),
291
+ telemetry: () => import("./telemetry-W5AKPI4R.js").then((m) => m.default),
292
+ events: () => import("./events-SBC54MHO.js").then((m) => m.default),
293
+ validate: () => import("./validate-7UX4I443.js").then((m) => m.default),
294
+ snapshot: () => import("./snapshot-XHKOAWF4.js").then((m) => m.default),
295
+ "media-treatment": () => import("./media-treatment-DCANGWSV.js").then((m) => m.mediaTreatmentCommand),
296
+ "grade-compare": () => import("./grade-compare-LBIHMAUN.js").then((m) => m.default),
297
+ compare: () => import("./compare-VYBWSP3Y.js").then((m) => m.default),
298
+ capture: () => import("./capture-XD3P3YQR.js").then((m) => m.default),
299
+ lambda: () => import("./lambda-XKFPAOFE.js").then((m) => m.default),
300
+ cloudrun: () => import("./cloudrun-R3JXWXGG.js").then((m) => m.default),
301
+ cloud: () => import("./cloud-IDUQRYLO.js").then((m) => m.default),
302
+ auth: () => import("./auth-WYQCOYE5.js").then((m) => m.default),
303
+ figma: () => import("./figma-QDSJPIRW.js").then((m) => m.default)
304
304
  };
305
305
  var subCommands = Object.fromEntries(
306
306
  Object.entries(commandLoaders).map(([name, load]) => [name, trackCommandFailures(load)])
@@ -324,7 +324,7 @@ var _printStalePinNotice;
324
324
  var _printSkillsUpdateNotice;
325
325
  var telemetryReady = Promise.resolve();
326
326
  if (!isHelp && command !== "telemetry" && command !== "events" && command !== "usage" && command !== "unknown") {
327
- telemetryReady = import("./telemetry-LOBRQGUD.js").then((mod) => {
327
+ telemetryReady = import("./telemetry-65LFHIWH.js").then((mod) => {
328
328
  _flushSync = mod.flushSync;
329
329
  _trackCliError = mod.trackCliError;
330
330
  _trackCommandResult = mod.trackCommandResult;
@@ -334,23 +334,23 @@ if (!isHelp && command !== "telemetry" && command !== "events" && command !== "u
334
334
  });
335
335
  }
336
336
  if (!isHelp && !hasJsonFlag && command !== "upgrade" && command !== "events" && command !== "telemetry" && command !== "skills" && command !== "usage") {
337
- import("./autoUpdate-ZPMY5T3X.js").then((mod) => mod.reportCompletedUpdate()).catch(() => {
337
+ import("./autoUpdate-PC5TN3NL.js").then((mod) => mod.reportCompletedUpdate()).catch(() => {
338
338
  });
339
- import("./updateCheck-5ITBSBST.js").then(async (mod) => {
339
+ import("./updateCheck-GZELANMA.js").then(async (mod) => {
340
340
  _printUpdateNotice = mod.printUpdateNotice;
341
341
  _printStalePinNotice = mod.printStalePinNotice;
342
342
  const result = mod.cachedUpdateCheck();
343
343
  if (result.updateAvailable) {
344
- const auto = await import("./autoUpdate-ZPMY5T3X.js").catch(() => null);
344
+ const auto = await import("./autoUpdate-PC5TN3NL.js").catch(() => null);
345
345
  auto?.scheduleBackgroundInstall(result.latest, result.current);
346
346
  }
347
347
  }).catch(() => {
348
348
  });
349
- import("./skillsUpdateCheck-LMCCWGNO.js").then((mod) => {
349
+ import("./skillsUpdateCheck-GXZN56I5.js").then((mod) => {
350
350
  _printSkillsUpdateNotice = mod.printSkillsUpdateNotice;
351
351
  }).catch(() => {
352
352
  });
353
- import("./backgroundChecks-JIDTAUFE.js").then((mod) => mod.launchBackgroundChecks()).catch(() => {
353
+ import("./backgroundChecks-7M3T44EP.js").then((mod) => mod.launchBackgroundChecks()).catch(() => {
354
354
  });
355
355
  }
356
356
  var _appHistoryNotice = null;
@@ -468,7 +468,7 @@ process.on("unhandledRejection", (reason) => {
468
468
  emitCliErrorEvent("unhandled_rejection", error);
469
469
  });
470
470
  async function showUsage(cmd, parent) {
471
- const { showUsage: impl } = await import("./help-RVNYHW3N.js");
471
+ const { showUsage: impl } = await import("./help-XBP6A6LT.js");
472
472
  return impl(cmd, parent);
473
473
  }
474
474
  async function showRequestedUsage() {
@@ -4,12 +4,12 @@ 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
- c
9
- } from "./chunk-ZTZA4UWZ.js";
10
7
  import {
11
8
  defineCommand
12
9
  } from "./chunk-S3S4TGEH.js";
10
+ import {
11
+ c
12
+ } from "./chunk-ZTZA4UWZ.js";
13
13
  import "./chunk-M2WBOQ2Q.js";
14
14
 
15
15
  // src/commands/cloud.ts
@@ -55,10 +55,10 @@ ${c.bold("AUTH:")}
55
55
  var cloud_default = defineCommand({
56
56
  meta: { name: "cloud", description: "Render HyperFrames compositions on the HeyGen cloud" },
57
57
  subCommands: {
58
- render: () => import("./render-KICXUPNR.js").then((m) => m.default),
59
- list: () => import("./list-XGDKILYN.js").then((m) => m.default),
60
- get: () => import("./get-IAREU7IK.js").then((m) => m.default),
61
- delete: () => import("./delete-FXA2IHOS.js").then((m) => m.default)
58
+ render: () => import("./render-S73DW4KK.js").then((m) => m.default),
59
+ list: () => import("./list-FRNUJXZ3.js").then((m) => m.default),
60
+ get: () => import("./get-B5TS6C7H.js").then((m) => m.default),
61
+ delete: () => import("./delete-EAX2U3WI.js").then((m) => m.default)
62
62
  },
63
63
  async run({ args }) {
64
64
  if (!args._?.[0]) console.log(HELP);
@@ -11,35 +11,38 @@ import {
11
11
  reportVariableIssues,
12
12
  resolveVariablesArg,
13
13
  validateVariablesAgainstProject
14
- } from "./chunk-UQXOHEQ7.js";
14
+ } from "./chunk-BM5PX3DJ.js";
15
15
  import {
16
16
  readAllowedCompositionFpsFromDir
17
17
  } from "./chunk-YEIFI443.js";
18
18
  import "./chunk-IHFUKJOR.js";
19
19
  import "./chunk-PFCFR3KZ.js";
20
- import {
21
- c
22
- } from "./chunk-ZTZA4UWZ.js";
23
20
  import {
24
21
  defineCommand
25
22
  } from "./chunk-S3S4TGEH.js";
26
23
  import {
27
24
  failCommand
28
25
  } from "./chunk-PBN6GBJE.js";
29
- import "./chunk-EJ7OWYF2.js";
26
+ import "./chunk-6E6CM7WS.js";
30
27
  import "./chunk-OZUQF4NB.js";
31
28
  import "./chunk-DPVXBVLL.js";
32
- import "./chunk-HYYSJI5D.js";
29
+ import "./chunk-SYKKFAUW.js";
33
30
  import "./chunk-VC76R6W2.js";
31
+ import "./chunk-YA62XGXS.js";
34
32
  import "./chunk-OFQWTKPW.js";
33
+ import "./chunk-T76PLPD6.js";
34
+ import "./chunk-FXMKHHPO.js";
35
+ import "./chunk-RQVDTPGD.js";
35
36
  import "./chunk-TQFG7HTI.js";
36
37
  import "./chunk-GK4AIFIH.js";
37
38
  import "./chunk-2PSPARWP.js";
39
+ import "./chunk-PMRBLBUP.js";
38
40
  import {
39
41
  normalizeErrorMessage
40
42
  } from "./chunk-KNU5COPB.js";
41
- import "./chunk-RQVDTPGD.js";
42
- import "./chunk-PMRBLBUP.js";
43
+ import {
44
+ c
45
+ } from "./chunk-ZTZA4UWZ.js";
43
46
  import "./chunk-M2WBOQ2Q.js";
44
47
 
45
48
  // src/commands/cloudrun.ts
@@ -471,6 +471,15 @@
471
471
  };
472
472
  }
473
473
 
474
+ function capitalizeWords(text) {
475
+ const words = new Intl.Segmenter(undefined, { granularity: "word" }).segment(text);
476
+ return Array.from(words, ({ segment, isWordLike }) => {
477
+ if (!isWordLike) return segment;
478
+ const [first, ...rest] = segment;
479
+ return first.toUpperCase() + rest.join("");
480
+ }).join("");
481
+ }
482
+
474
483
  function horizontalTextMetrics(element, style) {
475
484
  if (style.writingMode && style.writingMode !== "horizontal-tb") return null;
476
485
  const context = document.createElement("canvas").getContext("2d");
@@ -479,6 +488,7 @@
479
488
  let text = textContentFor(element, true);
480
489
  if (style.textTransform === "uppercase") text = text.toUpperCase();
481
490
  if (style.textTransform === "lowercase") text = text.toLowerCase();
491
+ if (style.textTransform === "capitalize") text = capitalizeWords(text);
482
492
  const metrics = context.measureText(text);
483
493
  return metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent > 0 ? metrics : null;
484
494
  }
@@ -490,6 +500,16 @@
490
500
  );
491
501
  }
492
502
 
503
+ // The glyphs' own extent inside a Range rect (the font's content area); font metrics scale with the rect.
504
+ function inkRect(rect, metrics) {
505
+ const scale = rect.height / (metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent);
506
+ const top =
507
+ rect.top + (metrics.fontBoundingBoxAscent - metrics.actualBoundingBoxAscent) * scale;
508
+ const bottom =
509
+ rect.bottom - (metrics.fontBoundingBoxDescent - metrics.actualBoundingBoxDescent) * scale;
510
+ return { ...rect, top, bottom, height: bottom - top };
511
+ }
512
+
493
513
  function visibleTextLineRects(element, rects, style, clip, tolerance) {
494
514
  const metrics = horizontalTextMetrics(element, style);
495
515
  const fontHeight = metrics ? metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent : 0;
@@ -497,12 +517,7 @@
497
517
  return rects.flatMap((rect) => {
498
518
  if (!metrics) return intersectsTextWindow(rect, clip, tolerance) ? [rect] : [];
499
519
  const scale = rect.height / fontHeight;
500
- const inkTop =
501
- rect.top + (metrics.fontBoundingBoxAscent - metrics.actualBoundingBoxAscent) * scale;
502
- const inkBottom =
503
- rect.bottom - (metrics.fontBoundingBoxDescent - metrics.actualBoundingBoxDescent) * scale;
504
- const ink = { ...rect, top: inkTop, bottom: inkBottom };
505
- if (!intersectsTextWindow(ink, clip, tolerance)) return [];
520
+ if (!intersectsTextWindow(inkRect(rect, metrics), clip, tolerance)) return [];
506
521
  // Negative leading belongs outside the used line box. Font metrics scale
507
522
  // with the Range rect, so zoomed cards retain the same clipping decision.
508
523
  const inset = Math.max(0, (rect.height - lineHeight * scale) / 2);
@@ -718,6 +733,20 @@
718
733
  return total;
719
734
  }
720
735
 
736
+ function overlapsByAFifth(a, b) {
737
+ return fragmentIntersectionArea(a, b) > Math.min(rectsArea(a), rectsArea(b)) * 0.2;
738
+ }
739
+
740
+ // Collision is judged on the glyphs: at line-height < 1 the content areas of stacked lines overlap
741
+ // while the words do not touch. Measured only for pairs whose content areas already overlap.
742
+ function glyphRects(block) {
743
+ if (!block.glyphRects) {
744
+ const metrics = horizontalTextMetrics(block.element, getComputedStyle(block.element));
745
+ block.glyphRects = metrics ? block.rects.map((rect) => inkRect(rect, metrics)) : block.rects;
746
+ }
747
+ return block.glyphRects;
748
+ }
749
+
721
750
  function isNested(a, b) {
722
751
  return a.contains(b) || b.contains(a);
723
752
  }
@@ -753,8 +782,8 @@
753
782
  function overlapIssue(a, b, time) {
754
783
  if (isNested(a.element, b.element)) return null;
755
784
  if (isManagedFlowOverlap(a.element, b.element)) return null;
756
- const area = fragmentIntersectionArea(a.rects, b.rects);
757
- if (area <= Math.min(rectsArea(a.rects), rectsArea(b.rects)) * 0.2) return null;
785
+ if (!overlapsByAFifth(a.rects, b.rects)) return null;
786
+ if (!overlapsByAFifth(glyphRects(a), glyphRects(b))) return null;
758
787
  return {
759
788
  // Warning at the per-sample level: a single-sample overlap is usually an
760
789
  // entrance/exit transient (two blocks crossing mid-animation), not a real
@@ -9,6 +9,7 @@
9
9
  const FNV_PRIME = 16777619;
10
10
  const LIVENESS_POSITION_BUCKET_PX = 2;
11
11
  const LIVENESS_OPACITY_BUCKET = 0.08;
12
+ const LIVENESS_MEDIA_TIME_BUCKET_SEC = 0.1;
12
13
  const IGNORE_SELECTOR = "[data-layout-ignore], [data-layout-check='ignore']";
13
14
  // counter(name) / counters(name, sep) in generated content. A list-item box
14
15
  // whose ::marker content is `normal` paints counter(list-item) implicitly.
@@ -139,6 +140,34 @@
139
140
  return clip ? hashFields([clip]) : "";
140
141
  }
141
142
 
143
+ // Paint that moves no geometry: a filter, color, background, shadow or SVG paint tween restyles a box in place.
144
+ function paintChannel(properties) {
145
+ return (element, ctx) => {
146
+ const values = properties.map((property) => cssValue(ctx.style[property]));
147
+ return values.some(Boolean) ? hashFields(values) : "";
148
+ };
149
+ }
150
+ const backgroundPaintChannel = paintChannel([
151
+ "filter",
152
+ "backdropFilter",
153
+ "backgroundColor",
154
+ "backgroundImage",
155
+ "backgroundPosition",
156
+ "boxShadow",
157
+ ]);
158
+
159
+ const STROKE_EDGES = ["borderTop", "borderRight", "borderBottom", "borderLeft", "outline"];
160
+ // Blink computes border and outline colors as `currentColor` even when none is drawn, so they follow `color`.
161
+ function drawnColor(style, edge) {
162
+ const drawn = style[`${edge}Style`] !== "none" && Number.parseFloat(style[`${edge}Width`]) > 0;
163
+ return drawn ? style[`${edge}Color`] : "";
164
+ }
165
+ function strokePaintChannel(element, ctx) {
166
+ const values = STROKE_EDGES.map((edge) => drawnColor(ctx.style, edge));
167
+ return values.some(Boolean) ? hashFields(values) : "";
168
+ }
169
+ const contentPaintChannel = paintChannel(["color", "textShadow", "fill", "stroke"]);
170
+
142
171
  // Direct text nodes only: descendants are signed separately, and a hidden
143
172
  // descendant's text mutation must not masquerade as visible motion.
144
173
  function textChannel(element) {
@@ -223,12 +252,15 @@
223
252
  fontAxesChannel,
224
253
  clipPathChannel,
225
254
  controlWidgetChannel,
255
+ backgroundPaintChannel,
256
+ strokePaintChannel,
226
257
  ];
227
258
  const CONTENT_CHANNELS = [
228
259
  textChannel,
229
260
  controlValueChannel,
230
261
  generatedContentChannel,
231
262
  mediaPixelChannel,
263
+ contentPaintChannel,
232
264
  ];
233
265
  const ELEMENT_CHANNELS = [...BOX_CHANNELS, ...CONTENT_CHANNELS];
234
266
 
@@ -302,6 +334,20 @@
302
334
  return parts;
303
335
  }
304
336
 
337
+ // Media time moves under seek where no pixel can be read: a graded video is drawn into a WebGL canvas that
338
+ // reads back blank, and audio has no box. Audio shows the timeline ran but is no picture, so it is kept apart.
339
+ function mediaTimeParts(root, quantize, selector) {
340
+ const parts = [];
341
+ for (const media of root.querySelectorAll(selector)) {
342
+ if (isOptedOut(media, root)) continue;
343
+ const time = media.currentTime;
344
+ parts.push(
345
+ String(quantize ? Math.round(time / LIVENESS_MEDIA_TIME_BUCKET_SEC) : round(time)),
346
+ );
347
+ }
348
+ return parts;
349
+ }
350
+
305
351
  // One signature of everything under `root`, root included, that a viewer could see change between seeks.
306
352
  // Opted-out elements inside the root may animate off the timeline, so they are neither signed nor counter
307
353
  // consumers, but stay counter owners; the root itself is always measured.
@@ -353,7 +399,7 @@
353
399
  const channels = skipped ? BOX_CHANNELS : ELEMENT_CHANNELS;
354
400
  parts.push(channels.map((channel) => channel(element, ctx)).join(","));
355
401
  }
356
- parts.push(...counterParts(root, boxOwners));
402
+ parts.push(...counterParts(root, boxOwners), ...mediaTimeParts(root, quantize, "video"));
357
403
  return parts.join("|");
358
404
  }
359
405
 
@@ -369,6 +415,9 @@
369
415
  // The name predates the textual/media channels and is kept for driver
370
416
  // compatibility.
371
417
  window.__hyperframesLayoutGeometry = function collectLayoutGeometry() {
372
- return compositionSignature(compositionRoot(), { quantize: false });
418
+ const root = compositionRoot();
419
+ // AUDIO_TIME_SEPARATOR in utils/checkPipeline.ts: what follows it is audio time, not something seen.
420
+ const audio = root ? mediaTimeParts(root, false, "audio").join("|") : "";
421
+ return `${compositionSignature(root, { quantize: false })}\u001f${audio}`;
373
422
  };
374
423
  })();