hyperframes 0.8.138 → 0.8.140

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 (207) hide show
  1. package/dist/{add-IZQPSHT5.js → add-7SPPQB64.js} +20 -22
  2. package/dist/{animatedGifPrep-MQF3GRFW.js → animatedGifPrep-HN3CJSFX.js} +15 -8
  3. package/dist/{asset-RNZX4ISG.js → asset-AZMFUTRL.js} +3 -3
  4. package/dist/{assetCataloger-5YRUY3PJ.js → assetCataloger-TQUWYLHE.js} +6 -3
  5. package/dist/{auth-LUELYGJ4.js → auth-XGY74R4A.js} +7 -7
  6. package/dist/{autoUpdate-ECMQWUU5.js → autoUpdate-44NTJBQU.js} +2 -2
  7. package/dist/{backgroundChecks-PBEJMSA3.js → backgroundChecks-ET4DJEPG.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{batchRender-2GXKBPFQ.js → batchRender-HTWWNF3P.js} +11 -8
  10. package/dist/beat-analyzer.global.js +5 -2
  11. package/dist/{beats-AAAZVDOY.js → beats-4GYTZUZG.js} +24 -17
  12. package/dist/{benchmark-EI767IB4.js → benchmark-CJQHE3QN.js} +20 -23
  13. package/dist/{browser-KAA2VXYH.js → browser-NXOVPGDG.js} +14 -28
  14. package/dist/{bundleWithLocalizedFonts-MWDYAPGB.js → bundleWithLocalizedFonts-6PJP54TC.js} +5 -5
  15. package/dist/{capture-IRRHK6BT.js → capture-5EHGRJZM.js} +2 -2
  16. package/dist/{capture-VYT5NQQI.js → capture-EHOMO4MP.js} +22 -15
  17. package/dist/{catalog-FYTZ2ET6.js → catalog-PTX5Z52R.js} +28 -30
  18. package/dist/{catch-up-XH3OAKQR.js → catch-up-I45SPSCU.js} +11 -25
  19. package/dist/{check-MUMIOK5K.js → check-LJ7LG7OI.js} +72 -54
  20. package/dist/{checkBrowser-LKSZFOU6.js → checkBrowser-6EK5E4PG.js} +81 -36
  21. package/dist/chunk-24OWOBQH.js +3656 -0
  22. package/dist/{chunk-3F6YLT72.js → chunk-2GMKWYEH.js} +12 -12
  23. package/dist/{chunk-KRLYIT22.js → chunk-5IKJONRY.js} +1 -1
  24. package/dist/chunk-6IHWCZ3W.js +54 -0
  25. package/dist/{chunk-P5WDMFBB.js → chunk-6U3MN4HW.js} +5 -106
  26. package/dist/chunk-A4KQZXZI.js +116 -0
  27. package/dist/{chunk-MKVKVMUH.js → chunk-ABJNXQUA.js} +10 -10
  28. package/dist/{chunk-YGXLBX3N.js → chunk-ASW6NWON.js} +1 -1
  29. package/dist/chunk-B3I3XJ47.js +3711 -0
  30. package/dist/{chunk-FSSMOTMS.js → chunk-BJ5JWOES.js} +1 -1
  31. package/dist/{chunk-OBC75KXL.js → chunk-BQKEGPPL.js} +1 -1
  32. package/dist/{chunk-SHB5VDMH.js → chunk-BRITLL56.js} +1 -1
  33. package/dist/{chunk-VR5UQWGV.js → chunk-C2JUHIG5.js} +6 -6
  34. package/dist/{chunk-YNBXJWSD.js → chunk-DDQ4LOML.js} +1 -1
  35. package/dist/{chunk-HUZYBV2Z.js → chunk-DQNOPYAG.js} +1 -1
  36. package/dist/{chunk-JH556Q42.js → chunk-EDYBFSPE.js} +2 -2
  37. package/dist/{chunk-SIMYRD5P.js → chunk-F3SPK6SO.js} +78 -20
  38. package/dist/chunk-FXMKHHPO.js +123 -0
  39. package/dist/chunk-G75ENCEZ.js +283 -0
  40. package/dist/{chunk-MIOBYUXT.js → chunk-GQJZORQP.js} +1 -1
  41. package/dist/{chunk-Y6W4DVPS.js → chunk-HKCNZITN.js} +1 -1
  42. package/dist/{chunk-APMG37MX.js → chunk-IFY57LUW.js} +1 -1
  43. package/dist/{chunk-JOUVZO7M.js → chunk-IRBESGJ7.js} +4 -4
  44. package/dist/chunk-JFKL3WAE.js +161 -0
  45. package/dist/{chunk-WH6PRFNX.js → chunk-JSGANFFH.js} +12 -3
  46. package/dist/{chunk-S3S2LSZX.js → chunk-KDPYVTEU.js} +2 -1
  47. package/dist/{chunk-PHXBLIKK.js → chunk-KECV5G4V.js} +165 -59
  48. package/dist/{chunk-SDRKEYZV.js → chunk-KFQNMY36.js} +8 -8
  49. package/dist/{chunk-QPOK6I32.js → chunk-KJLY2SDJ.js} +2 -2
  50. package/dist/{chunk-SZITAGRK.js → chunk-KMKWRIMC.js} +1 -1
  51. package/dist/{chunk-UUMK6VME.js → chunk-KOEWEFHK.js} +1 -1
  52. package/dist/{chunk-HXXX6N2G.js → chunk-L2H2L22P.js} +2 -2
  53. package/dist/{chunk-DJMXTKKK.js → chunk-LQG6GPVK.js} +1 -1
  54. package/dist/{chunk-GJGVYREG.js → chunk-MHK5DE2P.js} +268 -1964
  55. package/dist/{chunk-W3KQCJVP.js → chunk-MTVDXB6S.js} +18 -289
  56. package/dist/{chunk-IRYC5BRO.js → chunk-MU6C2VP6.js} +7 -7
  57. package/dist/{chunk-P75OFLZN.js → chunk-MUINFURL.js} +2 -2
  58. package/dist/{chunk-L5E5ZN6G.js → chunk-PB3P4MKP.js} +1 -1
  59. package/dist/{chunk-PHRWQQOJ.js → chunk-PE2I3AFA.js} +1 -1
  60. package/dist/{chunk-DXHYACUC.js → chunk-PFJFHNU3.js} +3 -3
  61. package/dist/{chunk-KBUUCAIZ.js → chunk-PPKFM5WE.js} +2 -2
  62. package/dist/{chunk-RH5VML6E.js → chunk-PUBKHEEA.js} +13 -13
  63. package/dist/{chunk-R6C6URKB.js → chunk-QBK7WKHT.js} +8 -8
  64. package/dist/{chunk-I3BRUEKD.js → chunk-QG3PDRSO.js} +1 -1
  65. package/dist/{chunk-RLNB3JCY.js → chunk-QP3BRKGF.js} +1 -163
  66. package/dist/chunk-QZ3AZTXI.js +1740 -0
  67. package/dist/{chunk-GNHJ4ONK.js → chunk-SLEPCESN.js} +2 -2
  68. package/dist/chunk-T76PLPD6.js +57 -0
  69. package/dist/{chunk-7Y5SMPRV.js → chunk-TPECLKPA.js} +168 -165
  70. package/dist/{chunk-IC5L6L7K.js → chunk-TYT2TLJR.js} +1 -1
  71. package/dist/{chunk-ASPTQ6DT.js → chunk-U7E736AJ.js} +1 -1
  72. package/dist/chunk-UOFAE5RF.js +42 -0
  73. package/dist/chunk-USDEMXXL.js +110 -0
  74. package/dist/{chunk-5K33TNUJ.js → chunk-VVJFZU6B.js} +2 -2
  75. package/dist/{chunk-XQODEVF3.js → chunk-WKTHUC2R.js} +1 -1
  76. package/dist/{chunk-7OLMGFDN.js → chunk-WQBA3MH4.js} +3 -3
  77. package/dist/{chunk-STA43FMY.js → chunk-WY5OODN5.js} +71 -3855
  78. package/dist/{chunk-JCRJBB4E.js → chunk-X3X3VETN.js} +8 -8
  79. package/dist/{chunk-ZTZ7NCJT.js → chunk-XTFJOR3K.js} +1 -1
  80. package/dist/chunk-YA62XGXS.js +45 -0
  81. package/dist/{clean-LZPDOAV4.js → clean-Y3AQITOX.js} +29 -20
  82. package/dist/cli.js +55 -55
  83. package/dist/{cloud-RVAH5NNL.js → cloud-TDPOMBZF.js} +7 -7
  84. package/dist/{cloudrun-NFGM6TRT.js → cloudrun-FPAVAVHP.js} +11 -8
  85. package/dist/commands/layout-audit.browser.js +37 -8
  86. package/dist/commands/motion-signature.browser.js +51 -2
  87. package/dist/{compare-S3M5OAL2.js → compare-LHL225ND.js} +40 -31
  88. package/dist/{compiler-SZ4GTYFB.js → compiler-RTU3KTLF.js} +7 -3
  89. package/dist/{component-PR2WZTQ4.js → component-L2YX7J56.js} +4 -4
  90. package/dist/{compositions-6RYXH2UA.js → compositions-V2UZKG7S.js} +23 -16
  91. package/dist/{delete-EO7C3LQ6.js → delete-OXZEXUQY.js} +8 -8
  92. package/dist/{dist-RVC3JTID.js → dist-N33CM63P.js} +21 -15
  93. package/dist/{dist-OJTEVNJR.js → dist-NZSQCYOF.js} +3 -1
  94. package/dist/{doctor-UTCCMN32.js → doctor-MWTPSIVD.js} +20 -13
  95. package/dist/{events-RE3OR6KY.js → events-4TZGQZWF.js} +6 -22
  96. package/dist/{events-RCGWL4LI.js → events-7VJJGC3D.js} +10 -23
  97. package/dist/{feedback-V7C64JIR.js → feedback-HSGAPVN7.js} +67 -45
  98. package/dist/{figma-26LOX5PV.js → figma-AMC6FAK3.js} +6 -6
  99. package/dist/fontLocalizeCli.js +17 -10
  100. package/dist/{get-E2K2JRTV.js → get-Y7DFEFYM.js} +8 -8
  101. package/dist/{gpuPolicy-Z3PQN6ZK.js → gpuPolicy-A45VSUKR.js} +15 -8
  102. package/dist/{grade-compare-OTZDU463.js → grade-compare-ERSA3OUI.js} +40 -31
  103. package/dist/{gsapParser-2OL54XZ5.js → gsapParser-UP3PNPC2.js} +3 -2
  104. package/dist/{help-IRSQLNI5.js → help-TW2AADLZ.js} +4 -4
  105. package/dist/{history-G44U6762.js → history-DKGDSVWF.js} +12 -30
  106. package/dist/hyperframe-runtime.js +59 -59
  107. package/dist/hyperframe.manifest.json +1 -1
  108. package/dist/hyperframe.runtime.iife.js +59 -59
  109. package/dist/hyperframes-player.global.js +3 -3
  110. package/dist/{info-KXQ2TAHX.js → info-I3NRRNX4.js} +17 -20
  111. package/dist/{init-7SXMLHJE.js → init-5Y3ZWZNF.js} +50 -41
  112. package/dist/{inspect-7JTINR25.js → inspect-BJQKBB3X.js} +39 -30
  113. package/dist/{installer-RH4E6WXT.js → installer-27K4JS2I.js} +8 -5
  114. package/dist/{keyframes-PIV573S6.js → keyframes-6V2NZO22.js} +14 -25
  115. package/dist/{lambda-GO5HAA4S.js → lambda-AIMF3K4A.js} +16 -13
  116. package/dist/{layout-N2736OO3.js → layout-YAPEBTU4.js} +39 -30
  117. package/dist/{lint-WUXZ5WWZ.js → lint-3LWWUIV7.js} +17 -23
  118. package/dist/{lintProject-ANMPLBIT.js → lintProject-LM3XZRPZ.js} +3 -1
  119. package/dist/{list-QF7AMX5F.js → list-NTSGEZJ6.js} +8 -8
  120. package/dist/{login-6RGSXHQJ.js → login-ZTDFGCCW.js} +9 -9
  121. package/dist/{logout-Q654A3SI.js → logout-GJXZQKOA.js} +5 -5
  122. package/dist/{media-treatment-T4KDEDYW.js → media-treatment-ARHX446F.js} +21 -20
  123. package/dist/{models-6JMNK3XI.js → models-VHNQVTHG.js} +20 -13
  124. package/dist/{motionShot-74WM7KF6.js → motionShot-35HCSNCI.js} +22 -15
  125. package/dist/{normalize-O76AC4HE.js → normalize-IGLHCWTF.js} +0 -4
  126. package/dist/{normalize-audio-ZZU36ZMD.js → normalize-audio-AUC73JH3.js} +13 -26
  127. package/dist/{open-G523K45B.js → open-C5LVNU3U.js} +11 -25
  128. package/dist/{pipeline-AKDGCWRE.js → pipeline-4GDTK54T.js} +15 -8
  129. package/dist/{play-SHIGXVON.js → play-U7UANF7Z.js} +38 -32
  130. package/dist/{preflight-6ERLORWK.js → preflight-Y5DN5D37.js} +3 -18
  131. package/dist/{present-QOYYNZCE.js → present-X6V6TX3E.js} +32 -26
  132. package/dist/{preview-KUXTDJL3.js → preview-K43RTRU2.js} +33 -26
  133. package/dist/{producer-CH33JXHK.js → producer-PVMFMW23.js} +1 -1
  134. package/dist/{projectConfig-NKIPRWAE.js → projectConfig-PI6MEN2T.js} +10 -7
  135. package/dist/{publication-4RBVVR5Z.js → publication-67C7KVTL.js} +6 -3
  136. package/dist/{publish-OLHR4Z4U.js → publish-RBV7EAMH.js} +27 -20
  137. package/dist/{refresh-K24ETHMA.js → refresh-MFITBIKV.js} +5 -5
  138. package/dist/{remove-background-NPKZSIPY.js → remove-background-Z2ECZX2Q.js} +22 -15
  139. package/dist/{render-UOKPAJNH.js → render-2GQMQBU3.js} +10 -7
  140. package/dist/{render-GYYGWYQC.js → render-EFU4BZRZ.js} +23 -26
  141. package/dist/{render-P4NWFUS7.js → render-YBS3XGRJ.js} +52 -32
  142. package/dist/{render-batch-ZDG3EXSD.js → render-batch-QC64OTB5.js} +11 -8
  143. package/dist/{renderCancellation-QYQLWHZY.js → renderCancellation-NTVU7IMB.js} +15 -8
  144. package/dist/renderSetupWorker.js +4 -2
  145. package/dist/{resolver-CWH3VVB7.js → resolver-GBWYG3EI.js} +8 -5
  146. package/dist/{sherpa-WEQE23S5.js → sherpa-ZW6PWJS4.js} +46 -14
  147. package/dist/sherpaWorker.js +11 -3
  148. package/dist/skills/hyperframes/references/capability-menu.md +1 -1
  149. package/dist/skills/hyperframes-cli/SKILL.md +5 -0
  150. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
  151. package/dist/skills/hyperframes-cli/references/preview-render.md +1 -1
  152. package/dist/skills/media-use/SKILL.md +6 -4
  153. package/dist/skills/media-use/audio/scripts/lib/host-audio.mjs +28 -0
  154. package/dist/skills/media-use/audio/scripts/lib/host-audio.test.mjs +106 -0
  155. package/dist/skills/media-use/references/setup-providers.md +3 -2
  156. package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +21 -1
  157. package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +14 -0
  158. package/dist/skills/media-use/scripts/resolve.mjs +11 -6
  159. package/dist/{skills-BVONI6TC.js → skills-VKZAX5AS.js} +15 -30
  160. package/dist/{skillsUpdateCheck-KKDPTFM7.js → skillsUpdateCheck-PAY2OPDE.js} +3 -3
  161. package/dist/{snapshot-PWZFJEDR.js → snapshot-SD5R3NWX.js} +41 -32
  162. package/dist/{src-YO7MAWGD.js → src-7SSERHNP.js} +19 -11
  163. package/dist/{src-HH4C5GZV.js → src-RXTXL3VL.js} +16 -9
  164. package/dist/{staticProjectServer-PR5INXSA.js → staticProjectServer-XELJXX4J.js} +24 -16
  165. package/dist/{status-AK67DTED.js → status-JA6SKQVH.js} +7 -24
  166. package/dist/studio/assets/{hyperframes-player-B30apksz.js → hyperframes-player-BLuyxnK7.js} +1 -1
  167. package/dist/studio/assets/{index-DXVvWfQG.js → index-CWfuDCoA.js} +1 -1
  168. package/dist/studio/assets/{index-DIJuIBwI.js → index-Dr3Bo9uH.js} +1 -1
  169. package/dist/studio/assets/{index-BdjA0CLD.js → index-VAHDM_zL.js} +210 -210
  170. package/dist/studio/{chunk-4S3AYCOG.js → chunk-H2DUOXTF.js} +3 -2
  171. package/dist/studio/{chunk-TDWGXBUT.js → chunk-TFLU2MGI.js} +1 -6
  172. package/dist/studio/chunk-TFLU2MGI.js.map +1 -0
  173. package/dist/studio/{chunk-7UQWVN52.js → chunk-UYWON5AX.js} +2 -2
  174. package/dist/studio/{domEditingLayers-IEVLO54Z.js → domEditingLayers-KBTPQKGA.js} +3 -3
  175. package/dist/studio/index.d.ts +20 -3
  176. package/dist/studio/index.html +1 -1
  177. package/dist/studio/index.js +7327 -6265
  178. package/dist/studio/index.js.map +1 -1
  179. package/dist/studio/player.js +2 -2
  180. package/dist/{studio-api-NFJMFAB7.js → studio-api-4FNUZPJ4.js} +40 -28
  181. package/dist/{studioServer-TQZVCIEL.js → studioServer-GHLL3F2M.js} +99 -68
  182. package/dist/{system-ZWIBWWE6.js → system-OQLOGGPJ.js} +2 -19
  183. package/dist/{telemetry-63L2ORO3.js → telemetry-7AO77PMH.js} +8 -23
  184. package/dist/{timeline-QKZQL5DJ.js → timeline-6LTHSRXM.js} +32 -22
  185. package/dist/{tokens-ELK62U4A.js → tokens-K6B46KNL.js} +3 -3
  186. package/dist/{transcribe-OSK7HEOJ.js → transcribe-CLLISRLZ.js} +18 -9
  187. package/dist/{transcribe-VKSXTM7K.js → transcribe-K2OU6FZF.js} +37 -78
  188. package/dist/{updateCheck-PM4FEI7P.js → updateCheck-X6UQBS6I.js} +2 -2
  189. package/dist/{upgrade-G635QCNO.js → upgrade-BZFKEADI.js} +5 -5
  190. package/dist/{urlDownloader-MVYQTP73.js → urlDownloader-VAVUXYEQ.js} +14 -7
  191. package/dist/{validate-AZTMI3HR.js → validate-VO5KEXWN.js} +26 -19
  192. package/dist/{video-H56FK33V.js → video-JV6Y4UJR.js} +18 -11
  193. package/package.json +1 -1
  194. package/dist/chunk-UINDCCO7.js +0 -3742
  195. package/dist/studio/chunk-TDWGXBUT.js.map +0 -1
  196. package/dist/{chunk-I465DBM6.js → chunk-246MOR5U.js} +3 -3
  197. package/dist/{deploy-MX76RZ36.js → deploy-5G4Z6LPA.js} +1 -1
  198. package/dist/{destroy-H2TZBYHH.js → destroy-GFQLTIY3.js} +1 -1
  199. package/dist/{docs-QAPJEGLS.js → docs-MPOM3PHH.js} +3 -3
  200. package/dist/{policies-FSDZVS2E.js → policies-4FEXMXPK.js} +3 -3
  201. package/dist/{progress-FBIEEB7Y.js → progress-5AM2MZ7V.js} +3 -3
  202. package/dist/{sites-TNVKZS73.js → sites-HZMADOA3.js} +1 -1
  203. package/dist/studio/{chunk-4S3AYCOG.js.map → chunk-H2DUOXTF.js.map} +0 -0
  204. package/dist/studio/{chunk-7UQWVN52.js.map → chunk-UYWON5AX.js.map} +0 -0
  205. package/dist/studio/{domEditingLayers-IEVLO54Z.js.map → domEditingLayers-KBTPQKGA.js.map} +0 -0
  206. package/dist/{telemetry-2YC4SGQU.js → telemetry-W5AKPI4R.js} +3 -3
  207. package/dist/{tts-FU35O6YB.js → tts-TOHSPWEG.js} +4 -4
@@ -20,36 +20,36 @@ import {
20
20
  } from "./chunk-3DKN5WKL.js";
21
21
  import {
22
22
  runEnvironmentChecks
23
- } from "./chunk-UUMK6VME.js";
24
- import {
25
- c
26
- } from "./chunk-ZTZA4UWZ.js";
23
+ } from "./chunk-KOEWEFHK.js";
27
24
  import {
28
25
  getAvailableMemoryMb,
29
26
  getFreeDiskMb,
30
27
  getShmSizeMb,
31
28
  getSystemMeta
32
- } from "./chunk-MIOBYUXT.js";
29
+ } from "./chunk-GQJZORQP.js";
33
30
  import {
34
31
  defineCommand
35
32
  } from "./chunk-S3S4TGEH.js";
36
33
  import {
37
34
  resolveExtractCacheDir
38
- } from "./chunk-7Y5SMPRV.js";
35
+ } from "./chunk-TPECLKPA.js";
39
36
  import {
40
37
  getUpdateMeta,
41
38
  withMeta
42
- } from "./chunk-YNBXJWSD.js";
39
+ } from "./chunk-DDQ4LOML.js";
43
40
  import {
44
41
  CONFIG_PATH,
45
42
  withFileLock
46
43
  } from "./chunk-XUXGIA7H.js";
47
44
  import {
48
45
  VERSION
49
- } from "./chunk-P75OFLZN.js";
46
+ } from "./chunk-MUINFURL.js";
50
47
  import {
51
48
  normalizeErrorMessage
52
49
  } from "./chunk-KNU5COPB.js";
50
+ import {
51
+ c
52
+ } from "./chunk-ZTZA4UWZ.js";
53
53
 
54
54
  // src/commands/doctor.ts
55
55
  import { execFileSync, execSync } from "child_process";
@@ -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) {
@@ -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
+ };
@@ -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-JCRJBB4E.js";
9
+ } from "./chunk-X3X3VETN.js";
10
10
  import "./chunk-Z27A7NUB.js";
11
11
  import "./chunk-5ETJX6WM.js";
12
12
  import {
13
13
  loadProducer
14
- } from "./chunk-FSSMOTMS.js";
14
+ } from "./chunk-BJ5JWOES.js";
15
15
  import "./chunk-3DKN5WKL.js";
16
16
  import {
17
17
  formatBytes
18
18
  } from "./chunk-IHFUKJOR.js";
19
+ import "./chunk-MHK5DE2P.js";
20
+ import "./chunk-QBK7WKHT.js";
19
21
  import {
20
22
  DEFAULT_HISTORY_ROOT,
21
23
  listProjectHistories,
22
24
  pruneGoneProjectHistories
23
- } from "./chunk-GJGVYREG.js";
24
- import "./chunk-R6C6URKB.js";
25
- import "./chunk-ASPTQ6DT.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-W3KQCJVP.js";
30
+ } from "./chunk-MTVDXB6S.js";
31
+ import "./chunk-G75ENCEZ.js";
30
32
  import "./chunk-EOVYQ3IG.js";
31
- import "./chunk-UUMK6VME.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-MIOBYUXT.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-7Y5SMPRV.js";
54
- import "./chunk-RLNB3JCY.js";
52
+ } from "./chunk-TPECLKPA.js";
53
+ import "./chunk-6U3MN4HW.js";
54
+ import "./chunk-A4KQZXZI.js";
55
+ import "./chunk-USDEMXXL.js";
56
+ import "./chunk-QP3BRKGF.js";
55
57
  import "./chunk-OZUQF4NB.js";
56
58
  import "./chunk-DPVXBVLL.js";
57
- import "./chunk-P5WDMFBB.js";
58
- import "./chunk-UINDCCO7.js";
59
+ import "./chunk-B3I3XJ47.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-YNBXJWSD.js";
80
+ } from "./chunk-DDQ4LOML.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-P75OFLZN.js";
85
+ import "./chunk-MUINFURL.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-P75OFLZN.js";
37
+ } from "./chunk-MUINFURL.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-RCGWL4LI.js");
184
+ const { trackCommandFailure } = await import("./events-7VJJGC3D.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-7SXMLHJE.js").then((m) => m.default),
257
- add: () => import("./add-IZQPSHT5.js").then((m) => m.default),
258
- catalog: () => import("./catalog-FYTZ2ET6.js").then((m) => m.default),
256
+ init: () => import("./init-5Y3ZWZNF.js").then((m) => m.default),
257
+ add: () => import("./add-7SPPQB64.js").then((m) => m.default),
258
+ catalog: () => import("./catalog-PTX5Z52R.js").then((m) => m.default),
259
259
  "media-use": () => import("./media-use-4XXGABIL.js").then((m) => m.default),
260
- play: () => import("./play-SHIGXVON.js").then((m) => m.default),
261
- present: () => import("./present-QOYYNZCE.js").then((m) => m.default),
262
- preview: () => assertStudioWorkspaceBuilt().then(() => import("./preview-KUXTDJL3.js").then((m) => m.default)),
263
- publish: () => import("./publish-OLHR4Z4U.js").then((m) => m.default),
264
- open: () => import("./open-G523K45B.js").then((m) => m.default),
265
- "catch-up": () => import("./catch-up-XH3OAKQR.js").then((m) => m.default),
266
- render: () => import("./render-P4NWFUS7.js").then((m) => m.default),
267
- lint: () => import("./lint-WUXZ5WWZ.js").then((m) => m.default),
268
- check: () => import("./check-MUMIOK5K.js").then((m) => m.default),
269
- beats: () => import("./beats-AAAZVDOY.js").then((m) => m.default),
270
- "normalize-audio": () => import("./normalize-audio-ZZU36ZMD.js").then((m) => m.default),
271
- inspect: () => import("./inspect-7JTINR25.js").then((m) => m.default),
272
- keyframes: () => import("./keyframes-PIV573S6.js").then((m) => m.default),
273
- layout: () => import("./layout-N2736OO3.js").then((m) => m.default),
274
- info: () => import("./info-KXQ2TAHX.js").then((m) => m.default),
275
- compositions: () => import("./compositions-6RYXH2UA.js").then((m) => m.default),
276
- timeline: () => import("./timeline-QKZQL5DJ.js").then((m) => m.default),
277
- history: () => import("./history-G44U6762.js").then((m) => m.default),
278
- benchmark: () => import("./benchmark-EI767IB4.js").then((m) => m.default),
279
- browser: () => import("./browser-KAA2VXYH.js").then((m) => m.default),
280
- "remove-background": () => import("./remove-background-NPKZSIPY.js").then((m) => m.default),
281
- transcribe: () => import("./transcribe-VKSXTM7K.js").then((m) => m.default),
260
+ play: () => import("./play-U7UANF7Z.js").then((m) => m.default),
261
+ present: () => import("./present-X6V6TX3E.js").then((m) => m.default),
262
+ preview: () => assertStudioWorkspaceBuilt().then(() => import("./preview-K43RTRU2.js").then((m) => m.default)),
263
+ publish: () => import("./publish-RBV7EAMH.js").then((m) => m.default),
264
+ open: () => import("./open-C5LVNU3U.js").then((m) => m.default),
265
+ "catch-up": () => import("./catch-up-I45SPSCU.js").then((m) => m.default),
266
+ render: () => import("./render-YBS3XGRJ.js").then((m) => m.default),
267
+ lint: () => import("./lint-3LWWUIV7.js").then((m) => m.default),
268
+ check: () => import("./check-LJ7LG7OI.js").then((m) => m.default),
269
+ beats: () => import("./beats-4GYTZUZG.js").then((m) => m.default),
270
+ "normalize-audio": () => import("./normalize-audio-AUC73JH3.js").then((m) => m.default),
271
+ inspect: () => import("./inspect-BJQKBB3X.js").then((m) => m.default),
272
+ keyframes: () => import("./keyframes-6V2NZO22.js").then((m) => m.default),
273
+ layout: () => import("./layout-YAPEBTU4.js").then((m) => m.default),
274
+ info: () => import("./info-I3NRRNX4.js").then((m) => m.default),
275
+ compositions: () => import("./compositions-V2UZKG7S.js").then((m) => m.default),
276
+ timeline: () => import("./timeline-6LTHSRXM.js").then((m) => m.default),
277
+ history: () => import("./history-DKGDSVWF.js").then((m) => m.default),
278
+ benchmark: () => import("./benchmark-CJQHE3QN.js").then((m) => m.default),
279
+ browser: () => import("./browser-NXOVPGDG.js").then((m) => m.default),
280
+ "remove-background": () => import("./remove-background-Z2ECZX2Q.js").then((m) => m.default),
281
+ transcribe: () => import("./transcribe-K2OU6FZF.js").then((m) => m.default),
282
282
  usage: () => import("./usage-EC3KFUIJ.js").then((m) => m.default),
283
- models: () => import("./models-6JMNK3XI.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-UTCCMN32.js").then((m) => m.default),
287
- clean: () => import("./clean-LZPDOAV4.js").then((m) => m.default),
288
- upgrade: () => import("./upgrade-G635QCNO.js").then((m) => m.default),
289
- skills: () => import("./skills-BVONI6TC.js").then((m) => m.default),
290
- feedback: () => import("./feedback-V7C64JIR.js").then((m) => m.default),
291
- telemetry: () => import("./telemetry-2YC4SGQU.js").then((m) => m.default),
292
- events: () => import("./events-RE3OR6KY.js").then((m) => m.default),
293
- validate: () => import("./validate-AZTMI3HR.js").then((m) => m.default),
294
- snapshot: () => import("./snapshot-PWZFJEDR.js").then((m) => m.default),
295
- "media-treatment": () => import("./media-treatment-T4KDEDYW.js").then((m) => m.mediaTreatmentCommand),
296
- "grade-compare": () => import("./grade-compare-OTZDU463.js").then((m) => m.default),
297
- compare: () => import("./compare-S3M5OAL2.js").then((m) => m.default),
298
- capture: () => import("./capture-IRRHK6BT.js").then((m) => m.default),
299
- lambda: () => import("./lambda-GO5HAA4S.js").then((m) => m.default),
300
- cloudrun: () => import("./cloudrun-NFGM6TRT.js").then((m) => m.default),
301
- cloud: () => import("./cloud-RVAH5NNL.js").then((m) => m.default),
302
- auth: () => import("./auth-LUELYGJ4.js").then((m) => m.default),
303
- figma: () => import("./figma-26LOX5PV.js").then((m) => m.default)
283
+ models: () => import("./models-VHNQVTHG.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-MWTPSIVD.js").then((m) => m.default),
287
+ clean: () => import("./clean-Y3AQITOX.js").then((m) => m.default),
288
+ upgrade: () => import("./upgrade-BZFKEADI.js").then((m) => m.default),
289
+ skills: () => import("./skills-VKZAX5AS.js").then((m) => m.default),
290
+ feedback: () => import("./feedback-HSGAPVN7.js").then((m) => m.default),
291
+ telemetry: () => import("./telemetry-W5AKPI4R.js").then((m) => m.default),
292
+ events: () => import("./events-4TZGQZWF.js").then((m) => m.default),
293
+ validate: () => import("./validate-VO5KEXWN.js").then((m) => m.default),
294
+ snapshot: () => import("./snapshot-SD5R3NWX.js").then((m) => m.default),
295
+ "media-treatment": () => import("./media-treatment-ARHX446F.js").then((m) => m.mediaTreatmentCommand),
296
+ "grade-compare": () => import("./grade-compare-ERSA3OUI.js").then((m) => m.default),
297
+ compare: () => import("./compare-LHL225ND.js").then((m) => m.default),
298
+ capture: () => import("./capture-5EHGRJZM.js").then((m) => m.default),
299
+ lambda: () => import("./lambda-AIMF3K4A.js").then((m) => m.default),
300
+ cloudrun: () => import("./cloudrun-FPAVAVHP.js").then((m) => m.default),
301
+ cloud: () => import("./cloud-TDPOMBZF.js").then((m) => m.default),
302
+ auth: () => import("./auth-XGY74R4A.js").then((m) => m.default),
303
+ figma: () => import("./figma-AMC6FAK3.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-63L2ORO3.js").then((mod) => {
327
+ telemetryReady = import("./telemetry-7AO77PMH.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-ECMQWUU5.js").then((mod) => mod.reportCompletedUpdate()).catch(() => {
337
+ import("./autoUpdate-44NTJBQU.js").then((mod) => mod.reportCompletedUpdate()).catch(() => {
338
338
  });
339
- import("./updateCheck-PM4FEI7P.js").then(async (mod) => {
339
+ import("./updateCheck-X6UQBS6I.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-ECMQWUU5.js").catch(() => null);
344
+ const auto = await import("./autoUpdate-44NTJBQU.js").catch(() => null);
345
345
  auto?.scheduleBackgroundInstall(result.latest, result.current);
346
346
  }
347
347
  }).catch(() => {
348
348
  });
349
- import("./skillsUpdateCheck-KKDPTFM7.js").then((mod) => {
349
+ import("./skillsUpdateCheck-PAY2OPDE.js").then((mod) => {
350
350
  _printSkillsUpdateNotice = mod.printSkillsUpdateNotice;
351
351
  }).catch(() => {
352
352
  });
353
- import("./backgroundChecks-PBEJMSA3.js").then((mod) => mod.launchBackgroundChecks()).catch(() => {
353
+ import("./backgroundChecks-ET4DJEPG.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-IRSQLNI5.js");
471
+ const { showUsage: impl } = await import("./help-TW2AADLZ.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-GYYGWYQC.js").then((m) => m.default),
59
- list: () => import("./list-QF7AMX5F.js").then((m) => m.default),
60
- get: () => import("./get-E2K2JRTV.js").then((m) => m.default),
61
- delete: () => import("./delete-EO7C3LQ6.js").then((m) => m.default)
58
+ render: () => import("./render-EFU4BZRZ.js").then((m) => m.default),
59
+ list: () => import("./list-NTSGEZJ6.js").then((m) => m.default),
60
+ get: () => import("./get-Y7DFEFYM.js").then((m) => m.default),
61
+ delete: () => import("./delete-OXZEXUQY.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-JOUVZO7M.js";
14
+ } from "./chunk-IRBESGJ7.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-RLNB3JCY.js";
26
+ import "./chunk-QP3BRKGF.js";
30
27
  import "./chunk-OZUQF4NB.js";
31
28
  import "./chunk-DPVXBVLL.js";
32
- import "./chunk-UINDCCO7.js";
29
+ import "./chunk-B3I3XJ47.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
  })();