hyperframes 0.8.141 → 0.8.143

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-KH2CF4FD.js → add-Q5EYDUAY.js} +18 -17
  2. package/dist/{animatedGifPrep-QO4BSKR7.js → animatedGifPrep-H2DUQEZ3.js} +15 -15
  3. package/dist/{asset-4RDZILVJ.js → asset-C7JBYYX4.js} +4 -4
  4. package/dist/{assetCataloger-WGR4LYYN.js → assetCataloger-FRO4G6OU.js} +8 -7
  5. package/dist/{auth-WYQCOYE5.js → auth-FRWLCO36.js} +5 -4
  6. package/dist/{autoUpdate-PC5TN3NL.js → autoUpdate-E4OZXQK6.js} +2 -2
  7. package/dist/{backgroundChecks-7M3T44EP.js → backgroundChecks-FSUVHN5L.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{batchRender-GOLLOE4V.js → batchRender-4U73BYTU.js} +11 -10
  10. package/dist/{beats-XJ7WP6QS.js → beats-U6KJWF35.js} +32 -28
  11. package/dist/{benchmark-HCGFBEZJ.js → benchmark-5ONT7V7B.js} +15 -14
  12. package/dist/{browser-VQKO2FKG.js → browser-R4DU46IE.js} +4 -4
  13. package/dist/{bundleWithLocalizedFonts-FH7PHTTX.js → bundleWithLocalizedFonts-VH55VOAL.js} +2 -2
  14. package/dist/{capture-TFZZSF6F.js → capture-26G2DPSI.js} +83 -41
  15. package/dist/{capture-XD3P3YQR.js → capture-OGQAEYKO.js} +24 -8
  16. package/dist/{catalog-4S33QWJJ.js → catalog-RKORTIUE.js} +19 -18
  17. package/dist/{catch-up-RW7YXXNT.js → catch-up-4OBERRQO.js} +5 -5
  18. package/dist/{check-XVTRRN4Y.js → check-P2XDN57S.js} +89 -85
  19. package/dist/{checkBrowser-HZXJ2EDU.js → checkBrowser-NTGJGAEA.js} +42 -42
  20. package/dist/{chunk-AVWEIOEN.js → chunk-2LBBHMKT.js} +1 -1
  21. package/dist/{chunk-E6SDW5FV.js → chunk-33RZPZ4K.js} +192 -45
  22. package/dist/{chunk-6IFXWJDX.js → chunk-3NE7ZYU2.js} +2 -2
  23. package/dist/{chunk-TQFG7HTI.js → chunk-3RM2ETQT.js} +0 -168
  24. package/dist/{chunk-PFCFR3KZ.js → chunk-442JNXRM.js} +1 -1
  25. package/dist/{chunk-6E6CM7WS.js → chunk-4M4EC7JX.js} +19 -12
  26. package/dist/{chunk-HKCNZITN.js → chunk-4OA4LDTU.js} +2 -2
  27. package/dist/{chunk-XTFJOR3K.js → chunk-4SFGME7K.js} +1 -1
  28. package/dist/{chunk-34TXESM7.js → chunk-5FISWJ37.js} +12 -4
  29. package/dist/{chunk-JYYOAKHS.js → chunk-6IIGT7BX.js} +1 -1
  30. package/dist/chunk-6TPZSTCL.js +3681 -0
  31. package/dist/{chunk-P6E4HFFU.js → chunk-6XMFEICO.js} +263 -75
  32. package/dist/{chunk-6Q6FR4KH.js → chunk-7UYBQ6NF.js} +296 -89
  33. package/dist/{chunk-BRITLL56.js → chunk-B4P5VDFQ.js} +1 -1
  34. package/dist/{chunk-U7E736AJ.js → chunk-BFDJ63J5.js} +32 -14
  35. package/dist/{chunk-WCJGTLPF.js → chunk-BHVFTYSI.js} +6 -3
  36. package/dist/{chunk-IO7ZIDRP.js → chunk-BT27OYYX.js} +53 -12
  37. package/dist/{chunk-KFH6UD26.js → chunk-BYK73CR7.js} +4 -4
  38. package/dist/{chunk-L3JSAB4L.js → chunk-CLOH4LIB.js} +3 -3
  39. package/dist/{chunk-R7UDXKI3.js → chunk-DF2BHILQ.js} +3 -3
  40. package/dist/{chunk-246MOR5U.js → chunk-DKSDVDXG.js} +175 -162
  41. package/dist/{chunk-35RSNI77.js → chunk-F26LCYRY.js} +42 -34
  42. package/dist/{chunk-5Z63TBTX.js → chunk-FH7WODJH.js} +1 -1
  43. package/dist/{chunk-NORZWWLK.js → chunk-FVYXDXEV.js} +2 -2
  44. package/dist/{chunk-YURXPGAM.js → chunk-GNBGPUJ7.js} +6 -8
  45. package/dist/{chunk-RVCWIIZ7.js → chunk-GV5R5B7Q.js} +1 -1
  46. package/dist/{chunk-GS6FE3IW.js → chunk-HC7EVDEL.js} +1 -1
  47. package/dist/{chunk-K2GOFLTX.js → chunk-HLYOEIWM.js} +14 -6
  48. package/dist/{chunk-XDSOIJC3.js → chunk-HMT2RPZU.js} +6 -6
  49. package/dist/{chunk-IKVBTDLO.js → chunk-HW4AKJ5F.js} +1 -1
  50. package/dist/{chunk-OLDDJS3S.js → chunk-I7QGQAZM.js} +8 -8
  51. package/dist/{chunk-JFKL3WAE.js → chunk-IWFLMU2N.js} +104 -19
  52. package/dist/{chunk-IHFUKJOR.js → chunk-K2FLNJVB.js} +8 -2
  53. package/dist/chunk-KJJLA674.js +121 -0
  54. package/dist/{chunk-XWVGSEUT.js → chunk-KO5QBV73.js} +1 -1
  55. package/dist/{chunk-INI3TM6I.js → chunk-KQLGTGE5.js} +3 -3
  56. package/dist/{chunk-E4BSCXMU.js → chunk-LVX6NK36.js} +3 -3
  57. package/dist/{chunk-BM5PX3DJ.js → chunk-LW6HO6U3.js} +4 -4
  58. package/dist/{chunk-OZUQF4NB.js → chunk-MQZVBHEY.js} +123 -8
  59. package/dist/{chunk-IV7EI5E2.js → chunk-N3DQEVSI.js} +2 -2
  60. package/dist/{chunk-A4KQZXZI.js → chunk-NE55C6S5.js} +4 -2
  61. package/dist/{chunk-EDYBFSPE.js → chunk-OBXQRJWQ.js} +7 -10
  62. package/dist/{chunk-RCFCZT5O.js → chunk-OSSHSIMD.js} +1 -1
  63. package/dist/chunk-P36MALQF.js +15 -0
  64. package/dist/{chunk-EKA4ZZBI.js → chunk-P7THMINS.js} +3 -3
  65. package/dist/{chunk-3NBKW2QJ.js → chunk-PAGIICKN.js} +2 -2
  66. package/dist/{chunk-O3SKIXQK.js → chunk-PJU63L6W.js} +1 -1
  67. package/dist/{chunk-RPYPW5NN.js → chunk-POLR33RB.js} +20 -13
  68. package/dist/{chunk-7M4KAPAA.js → chunk-PUGIRFPX.js} +2 -2
  69. package/dist/{chunk-7XTZVLE6.js → chunk-QFN7NVWM.js} +1 -1
  70. package/dist/{chunk-D2KNWIQ6.js → chunk-QFSCCQIR.js} +1 -1
  71. package/dist/{chunk-J5IPIQU2.js → chunk-QRKLPWEX.js} +1 -1
  72. package/dist/{chunk-N77KD7ZZ.js → chunk-QVYVUCWD.js} +1 -1
  73. package/dist/{chunk-GK4AIFIH.js → chunk-SDYDNHEE.js} +34 -3
  74. package/dist/{chunk-2NCHQUPX.js → chunk-SQLK7SJL.js} +1 -1
  75. package/dist/{chunk-PMRBLBUP.js → chunk-T42U2W2R.js} +14 -2
  76. package/dist/{chunk-Q65ZQFF2.js → chunk-TAMQYQGJ.js} +1 -1
  77. package/dist/{chunk-PXSM4HPB.js → chunk-U3X3TPBW.js} +1 -1
  78. package/dist/{chunk-3A5AAPMP.js → chunk-UICWP23D.js} +1 -1
  79. package/dist/{chunk-A7YQNIQT.js → chunk-UM2GRYM3.js} +113 -10
  80. package/dist/{chunk-TC2FBZJZ.js → chunk-VIVBA6E6.js} +2 -2
  81. package/dist/{chunk-W6HTOVHU.js → chunk-W35EKBS6.js} +2 -2
  82. package/dist/{chunk-YEIFI443.js → chunk-WPNE5NEP.js} +1 -1
  83. package/dist/{chunk-WY5OODN5.js → chunk-XONFUK3M.js} +3693 -28
  84. package/dist/{chunk-IYFKBFTW.js → chunk-Y6QL2LGO.js} +8 -5
  85. package/dist/{chunk-THXFSPLV.js → chunk-ZIRIDSDB.js} +1 -1
  86. package/dist/chunk-ZLW2V65P.js +209 -0
  87. package/dist/{chunk-4BB7V6AI.js → chunk-ZQQ3SEIE.js} +33 -32
  88. package/dist/{clean-L2E4VD57.js → clean-YHGPY33K.js} +23 -23
  89. package/dist/cli.js +57 -159
  90. package/dist/{cloud-IDUQRYLO.js → cloud-DOFI5ISR.js} +4 -4
  91. package/dist/{cloudrun-R3JXWXGG.js → cloudrun-KTZ4XDHL.js} +13 -12
  92. package/dist/commands/contrast-audit.browser.js +60 -4
  93. package/dist/commands/layout-audit.browser.js +88 -20
  94. package/dist/{compare-VYBWSP3Y.js → compare-SMMIZN2C.js} +37 -37
  95. package/dist/{compiler-ACHWOU5N.js → compiler-TEXQWW6N.js} +14 -11
  96. package/dist/{component-PYYV2V3F.js → component-B3GCNGSS.js} +5 -5
  97. package/dist/{compositions-B5GQSXH7.js → compositions-OQNZZTKF.js} +38 -34
  98. package/dist/{delete-EAX2U3WI.js → delete-EL5LVSEP.js} +6 -6
  99. package/dist/{deterministicFonts-F6WIVL2W.js → deterministicFonts-U2BIMGPG.js} +3 -3
  100. package/dist/{dist-NZSQCYOF.js → dist-5UVIRMSM.js} +7 -7
  101. package/dist/{dist-ROUDWGLO.js → dist-XN234YFQ.js} +41 -39
  102. package/dist/{doctor-PJX7MLFG.js → doctor-UOL3OI2A.js} +17 -17
  103. package/dist/{dom-IROKGVJI.js → dom-37K6YOH4.js} +2 -2
  104. package/dist/{events-SBC54MHO.js → events-K2DB2PBC.js} +2 -2
  105. package/dist/{events-YFFXKAQQ.js → events-NIZBS6S7.js} +3 -3
  106. package/dist/{feedback-UETLWREV.js → feedback-QMP4E6L7.js} +16 -15
  107. package/dist/{figma-QDSJPIRW.js → figma-2AUJRNVC.js} +3 -3
  108. package/dist/fontLocalizeCli.js +18 -18
  109. package/dist/{get-B5TS6C7H.js → get-P5NC7SRM.js} +6 -6
  110. package/dist/{gpuPolicy-LYOVBAJP.js → gpuPolicy-7N5MCE2G.js} +15 -15
  111. package/dist/{grade-compare-LBIHMAUN.js → grade-compare-HV5AFZ6P.js} +37 -37
  112. package/dist/{help-XBP6A6LT.js → help-3TSTXBLN.js} +1 -1
  113. package/dist/{history-2S42ZXKL.js → history-D65XFJ6D.js} +6 -6
  114. package/dist/hyperframe-runtime.js +25 -25
  115. package/dist/hyperframe.manifest.json +1 -1
  116. package/dist/hyperframe.runtime.iife.js +25 -25
  117. package/dist/hyperframes-player.global.js +3 -3
  118. package/dist/hyperframes-slideshow.global.js +23 -23
  119. package/dist/{info-I2VDAWT7.js → info-TXV7MLFO.js} +17 -16
  120. package/dist/{init-BGHSDODI.js → init-OSDMJZJV.js} +38 -38
  121. package/dist/{inspect-MZK5B5RP.js → inspect-RQQSAYIJ.js} +38 -38
  122. package/dist/{installer-LL4QAKFW.js → installer-CDOB32HE.js} +11 -10
  123. package/dist/{keyframes-2EBF7OSS.js → keyframes-V75Q6GRM.js} +10 -10
  124. package/dist/{lambda-XKFPAOFE.js → lambda-RODV4RCX.js} +12 -11
  125. package/dist/{layout-TP5ERKEF.js → layout-IZAI5SFC.js} +38 -38
  126. package/dist/{lint-FQ6CEI7E.js → lint-PLXOXY5R.js} +14 -14
  127. package/dist/{lintProject-LM3XZRPZ.js → lintProject-OQ6H6XBR.js} +7 -7
  128. package/dist/{list-FRNUJXZ3.js → list-BQBPNKDZ.js} +7 -7
  129. package/dist/{login-C25QU3BQ.js → login-NP6F4FHC.js} +20 -24
  130. package/dist/{logout-GJXZQKOA.js → logout-B4KS4A7S.js} +6 -6
  131. package/dist/{manager-DXB7JDHU.js → manager-GXYF4AVO.js} +2 -2
  132. package/dist/{manager-524RPYO7.js → manager-RFZNG5YT.js} +2 -2
  133. package/dist/{media-treatment-DCANGWSV.js → media-treatment-PXGMZ4A4.js} +55 -34
  134. package/dist/{models-GOD6ARB3.js → models-CEZM6XZ7.js} +17 -17
  135. package/dist/{motionShot-FSKETANX.js → motionShot-R4GHYWYM.js} +25 -25
  136. package/dist/{normalize-IGLHCWTF.js → normalize-H6KUHHEI.js} +18 -7
  137. package/dist/{normalize-audio-C2IM7OID.js → normalize-audio-MQ7NFCOV.js} +10 -6
  138. package/dist/{open-VVISXIII.js → open-AKQTGNXF.js} +5 -5
  139. package/dist/{pipeline-7YHZPYIS.js → pipeline-SYJYP2RM.js} +17 -17
  140. package/dist/{play-DSELK7G3.js → play-NBH4B7PL.js} +31 -30
  141. package/dist/{present-N72YFDKP.js → present-XAX55CFS.js} +26 -26
  142. package/dist/{preview-XTYN4NJ2.js → preview-OLANKNFA.js} +26 -26
  143. package/dist/{producer-NDCU3MHK.js → producer-Q6YNZZUJ.js} +1 -1
  144. package/dist/{projectConfig-MH4QU4AC.js → projectConfig-EM26P45P.js} +13 -12
  145. package/dist/{publication-KUSHI5MG.js → publication-OXWJZKSX.js} +8 -7
  146. package/dist/{publish-3XEEFWMF.js → publish-4VBWP2UB.js} +23 -22
  147. package/dist/{refresh-MFITBIKV.js → refresh-PVHBEABE.js} +2 -2
  148. package/dist/{remove-background-2QKJ7XOD.js → remove-background-REB7427G.js} +19 -19
  149. package/dist/{render-75E342ZU.js → render-3CVZ2SZG.js} +13 -12
  150. package/dist/{render-S73DW4KK.js → render-K25YOG3M.js} +22 -21
  151. package/dist/{render-2DVYTVLQ.js → render-TSE75QUL.js} +35 -35
  152. package/dist/{render-batch-YURBS54Q.js → render-batch-GGUOK3DS.js} +13 -12
  153. package/dist/{renderCancellation-373ASJTO.js → renderCancellation-PZRWB53I.js} +15 -15
  154. package/dist/renderSetupWorker.js +7 -7
  155. package/dist/{resolver-FE3GBZ4T.js → resolver-S5VK6UCB.js} +10 -9
  156. package/dist/{screenshotCapture-ECBTLCU6.js → screenshotCapture-TEUIWXWN.js} +53 -33
  157. package/dist/{sherpa-B2D3AGP6.js → sherpa-LVIUEAGF.js} +18 -18
  158. package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
  159. package/dist/skills/hyperframes-cli/references/doctor-browser.md +24 -1
  160. package/dist/skills/media-use/references/grading.md +4 -2
  161. package/dist/skills/media-use/scripts/lib/cache.mjs +28 -14
  162. package/dist/skills/media-use/scripts/lib/cache.test.mjs +110 -0
  163. package/dist/skills/media-use/scripts/lib/duck.mjs +2 -1
  164. package/dist/skills/media-use/scripts/lib/duck.test.mjs +87 -0
  165. package/dist/skills/media-use/scripts/lib/probe.mjs +6 -1
  166. package/dist/skills/media-use/scripts/lib/probe.test.mjs +73 -0
  167. package/dist/skills/media-use/scripts/lib/words.mjs +1 -1
  168. package/dist/{skills-ICJ22CZZ.js → skills-I65FU5HD.js} +5 -5
  169. package/dist/{skillsUpdateCheck-GXZN56I5.js → skillsUpdateCheck-J57RNNIV.js} +3 -3
  170. package/dist/{slideshow-EJ4IMY6P.js → slideshow-4OJEPWNZ.js} +1 -1
  171. package/dist/{snapshot-XHKOAWF4.js → snapshot-YROOGY22.js} +42 -39
  172. package/dist/{src-I7UC3JTL.js → src-JO5JOV7Y.js} +16 -14
  173. package/dist/{src-74PFDTDX.js → src-X426BZAG.js} +17 -17
  174. package/dist/{staticProjectServer-2DGKD6TF.js → staticProjectServer-5VMBS262.js} +23 -23
  175. package/dist/{status-JA6SKQVH.js → status-LXPGSSKY.js} +6 -4
  176. package/dist/studio/assets/{hyperframes-player-5Vx2AiUz.js → hyperframes-player-BXSuksFh.js} +3 -3
  177. package/dist/studio/assets/{index-BAnh7cSQ.js → index-BgOVCqjo.js} +1 -1
  178. package/dist/studio/assets/{index-P8fgj_Xa.js → index-FgyO_5Kv.js} +1 -1
  179. package/dist/studio/assets/{index-C0thd4eM.js → index-J7jpL4pj.js} +157 -157
  180. package/dist/studio/index.html +1 -1
  181. package/dist/studio/index.js +148 -175
  182. package/dist/studio/index.js.map +1 -1
  183. package/dist/{studio-api-PROBO7JG.js → studio-api-VRBZUGAE.js} +22 -18
  184. package/dist/{studioServer-ID6UV2NE.js → studioServer-DBNKZ6I6.js} +50 -50
  185. package/dist/{synthesize-77PTU6C5.js → synthesize-C3IWDAXF.js} +2 -2
  186. package/dist/{telemetry-65LFHIWH.js → telemetry-CXAX3TO3.js} +3 -3
  187. package/dist/{timeline-6UV3JJXD.js → timeline-VQ34WH7J.js} +91 -70
  188. package/dist/{tokens-HIL4TZXI.js → tokens-62R7VFAZ.js} +4 -4
  189. package/dist/{transcribe-TIO6W3EQ.js → transcribe-7KR7IPJA.js} +18 -18
  190. package/dist/{transcribe-V7F6QDSN.js → transcribe-XOHPPL2O.js} +11 -11
  191. package/dist/{tts-TOHSPWEG.js → tts-MUV42JXT.js} +6 -6
  192. package/dist/{updateCheck-GZELANMA.js → updateCheck-POYNH3B5.js} +2 -2
  193. package/dist/{upgrade-BX3KDDZJ.js → upgrade-NBNOT7J2.js} +2 -2
  194. package/dist/{urlDownloader-R76OHFIE.js → urlDownloader-3NS63A7B.js} +14 -14
  195. package/dist/{validate-7UX4I443.js → validate-Y2QDHAEP.js} +40 -28
  196. package/dist/{video-RVGYEFQU.js → video-SJDMTSTL.js} +15 -15
  197. package/package.json +1 -1
  198. package/dist/chunk-24OWOBQH.js +0 -3656
  199. package/dist/chunk-SYKKFAUW.js +0 -3711
  200. /package/dist/{chunk-HBBJFK6I.js → chunk-APDLWWFG.js} +0 -0
@@ -4,6 +4,9 @@ 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
+ resolveWithinProject
9
+ } from "./chunk-G75ENCEZ.js";
7
10
  import {
8
11
  MAX_AUDIO_GAIN_DB,
9
12
  formatAudioGain,
@@ -12,11 +15,28 @@ import {
12
15
  import {
13
16
  findFfBinary
14
17
  } from "./chunk-PJ3HDUCY.js";
18
+ import {
19
+ decodeWellFormedEscapes,
20
+ decodedUrlPath,
21
+ readMediaOffsetSeconds
22
+ } from "./chunk-ZLW2V65P.js";
15
23
 
16
- // ../studio-server/dist/chunk-DSVQ2U7J.js
24
+ // ../studio-server/dist/chunk-32IH7WBY.js
17
25
  import { execFile } from "child_process";
18
26
  import { isAbsolute, relative, resolve } from "path";
19
27
  import { promisify } from "util";
28
+ import { existsSync } from "fs";
29
+ function requestSubPath(url, route) {
30
+ const routeSegments = route.split("/");
31
+ const segments = new URL(url).pathname.split("/");
32
+ const start = segments.indexOf(routeSegments[0] ?? "");
33
+ return decodeWellFormedEscapes(segments.slice(start + routeSegments.length).join("/"));
34
+ }
35
+ function requestedProjectPath(projectDir, field) {
36
+ const trimmed = field.trim().replace(/^[.]\//, "");
37
+ const named = resolveWithinProject(projectDir, trimmed);
38
+ return named && existsSync(named) ? trimmed : decodedUrlPath(trimmed);
39
+ }
20
40
  var execFileAsync = promisify(execFile);
21
41
  var FFMPEG_TIMEOUT_MS = 12e4;
22
42
  function authoredNumber(raw, fallback, attribute, id, strictlyPositive = false) {
@@ -161,6 +181,13 @@ function requiredAudioIdentity(attributes) {
161
181
  if (!src) throw new Error(`Audio #${id} has no src`);
162
182
  return { id, src };
163
183
  }
184
+ function authoredMediaStart(attributes, id) {
185
+ return readMediaOffsetSeconds((name) => {
186
+ const raw = attributes.get(name)?.value;
187
+ if (name === "data-media-start") authoredNumber(raw, 0, name, id);
188
+ return raw;
189
+ });
190
+ }
164
191
  function hasBareAttribute(html, range, name) {
165
192
  const unquoted = html.slice(range.start, range.end).replace(/"[^"]*"|'[^']*'/g, '""');
166
193
  return new RegExp(`\\s${name}(?=[\\s/>=])`, "i").test(unquoted);
@@ -185,12 +212,7 @@ function mediaTagFromRange(html, range) {
185
212
  id,
186
213
  src,
187
214
  volume: authoredNumber(volumeAttribute?.value, 1, "data-volume", id),
188
- mediaStart: authoredNumber(
189
- attributes.get("data-media-start")?.value,
190
- 0,
191
- "data-media-start",
192
- id
193
- ),
215
+ mediaStart: authoredMediaStart(attributes, id),
194
216
  duration: authoredDuration(attributes, id),
195
217
  playbackRate: authoredNumber(
196
218
  attributes.get("data-playback-rate")?.value,
@@ -217,13 +239,7 @@ function audioTags(html) {
217
239
  return tags;
218
240
  }
219
241
  function resolveLocalAudioPath(projectDir, src) {
220
- const withoutSuffix = src.split(/[?#]/, 1)[0] ?? "";
221
- let decoded = "";
222
- try {
223
- decoded = decodeURIComponent(withoutSuffix);
224
- } catch {
225
- throw new Error(`Audio source must be a local project file: ${src}`);
226
- }
242
+ const decoded = requestedProjectPath(projectDir, src);
227
243
  if (!decoded || isAbsolute(decoded) || /^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(decoded)) {
228
244
  throw new Error(`Audio source must be a local project file: ${src}`);
229
245
  }
@@ -358,6 +374,8 @@ function absoluteLoudnessPlan(track, targetLufs = DEFAULT_TARGET_LUFS) {
358
374
  }
359
375
 
360
376
  export {
377
+ requestSubPath,
378
+ requestedProjectPath,
361
379
  audioTags,
362
380
  resolveLocalAudioPath,
363
381
  parseEbur128Summary,
@@ -52,6 +52,7 @@ function downloadFile(url, dest, options = {}) {
52
52
  return new Promise((resolve, reject) => {
53
53
  const follow = (u, hops = 0) => {
54
54
  let activeResponse;
55
+ let responseDiscarded = false;
55
56
  let responsePipelineStarted = false;
56
57
  let requestError;
57
58
  let request;
@@ -61,15 +62,15 @@ function downloadFile(url, dest, options = {}) {
61
62
  if (res.statusCode && REDIRECT_CODES.has(res.statusCode)) {
62
63
  const location = res.headers.location;
63
64
  if (location) {
65
+ responseDiscarded = true;
66
+ res.destroy();
64
67
  if (hops >= MAX_REDIRECTS) {
65
- res.resume();
66
68
  removePartialFile(tmp);
67
69
  reject(
68
70
  new Error(`Download failed: more than ${MAX_REDIRECTS} redirects from ${url}`)
69
71
  );
70
72
  return;
71
73
  }
72
- res.resume();
73
74
  try {
74
75
  follow(redirectTarget(location, u), hops + 1);
75
76
  } catch (error) {
@@ -80,7 +81,8 @@ function downloadFile(url, dest, options = {}) {
80
81
  }
81
82
  }
82
83
  if (res.statusCode !== 200) {
83
- res.resume();
84
+ responseDiscarded = true;
85
+ res.destroy();
84
86
  removePartialFile(tmp);
85
87
  reject(new Error(`Download failed: HTTP ${res.statusCode}`));
86
88
  return;
@@ -107,6 +109,7 @@ function downloadFile(url, dest, options = {}) {
107
109
  request.destroy(new Error(`Download timed out after ${timeoutMs}ms`));
108
110
  });
109
111
  request.on("error", (err) => {
112
+ if (responseDiscarded) return;
110
113
  if (responsePipelineStarted) {
111
114
  requestError = err;
112
115
  activeResponse?.destroy(err);
@@ -6,24 +6,24 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  serveStaticProjectHtml
9
- } from "./chunk-34TXESM7.js";
9
+ } from "./chunk-5FISWJ37.js";
10
10
  import {
11
11
  resolveProject
12
- } from "./chunk-TC2FBZJZ.js";
12
+ } from "./chunk-VIVBA6E6.js";
13
13
  import {
14
14
  AUDIT_SEEK_OPTIONS,
15
15
  installPageFunctionGuard,
16
16
  seekCompositionTimeline,
17
17
  waitForCompositionFonts,
18
18
  waitForRuntimeReady
19
- } from "./chunk-XDSOIJC3.js";
19
+ } from "./chunk-HMT2RPZU.js";
20
20
  import {
21
21
  launchManagedBrowser,
22
22
  resolveManagedGpuMode
23
- } from "./chunk-O3SKIXQK.js";
23
+ } from "./chunk-PJU63L6W.js";
24
24
  import {
25
25
  resolveDiagnosticNavigationTimeoutMs
26
- } from "./chunk-EKA4ZZBI.js";
26
+ } from "./chunk-P7THMINS.js";
27
27
  import {
28
28
  defineCommand
29
29
  } from "./chunk-S3S4TGEH.js";
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  printDeprecationNotice,
36
36
  withMeta
37
- } from "./chunk-IYFKBFTW.js";
37
+ } from "./chunk-Y6QL2LGO.js";
38
38
  import {
39
39
  normalizeErrorMessage
40
40
  } from "./chunk-KNU5COPB.js";
@@ -47,6 +47,36 @@ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
47
47
  import { dirname, join as join2 } from "path";
48
48
  import { fileURLToPath } from "url";
49
49
 
50
+ // src/utils/checkFindings.ts
51
+ var SEVERITY = { info: 0, warning: 1, error: 2 };
52
+ function findingElementKey(finding) {
53
+ return JSON.stringify([finding.sourceFile, finding.selector]);
54
+ }
55
+ function groupSampledFindings(findings, compareEvidence = () => 0) {
56
+ const groups = /* @__PURE__ */ new Map();
57
+ for (const finding of findings) {
58
+ const key = JSON.stringify([findingElementKey(finding), finding.code]);
59
+ const times = finding.times ?? [finding.time];
60
+ const group = groups.get(key);
61
+ if (!group) {
62
+ groups.set(key, { finding, times: new Set(times) });
63
+ continue;
64
+ }
65
+ for (const time of times) group.times.add(time);
66
+ const severity = SEVERITY[finding.severity] - SEVERITY[group.finding.severity];
67
+ if (severity > 0 || severity === 0 && compareEvidence(finding, group.finding) > 0) {
68
+ group.finding = finding;
69
+ }
70
+ }
71
+ return [...groups.values()].map(({ finding, times }) => ({
72
+ ...finding,
73
+ times: [...times].sort((a, b) => a - b)
74
+ }));
75
+ }
76
+ function formatFindingTimes(finding) {
77
+ return `t=${(finding.times ?? [finding.time]).join(", ")}s`;
78
+ }
79
+
50
80
  // src/utils/layoutAudit.ts
51
81
  function buildLayoutSampleTimes({ duration, samples, at }) {
52
82
  if (at?.length) {
@@ -73,7 +103,12 @@ function summarizeLayoutIssues(issues) {
73
103
  };
74
104
  }
75
105
  function formatLayoutIssue(issue) {
76
- const timeLabel = issue.occurrences && issue.occurrences > 1 ? `t=${formatNumber(issue.firstSeen ?? issue.time)}-${formatNumber(issue.lastSeen ?? issue.time)}s (${issue.occurrences} samples)` : `t=${formatNumber(issue.time)}s`;
106
+ let timeLabel = `t=${formatNumber(issue.time)}s`;
107
+ if (issue.times) {
108
+ timeLabel = formatFindingTimes(issue);
109
+ } else if (issue.occurrences && issue.occurrences > 1) {
110
+ timeLabel = `t=${formatNumber(issue.firstSeen ?? issue.time)}-${formatNumber(issue.lastSeen ?? issue.time)}s (${issue.occurrences} samples)`;
111
+ }
77
112
  const parts = [
78
113
  timeLabel,
79
114
  issue.code,
@@ -91,6 +126,7 @@ function dedupeLayoutIssues(issues) {
91
126
  const result = [];
92
127
  for (const issue of issues) {
93
128
  const key = [
129
+ Reflect.get(issue, "sourceFile") ?? "",
94
130
  issue.code,
95
131
  issue.severity,
96
132
  issue.time.toFixed(3),
@@ -152,11 +188,11 @@ function collapseStaticLayoutIssues(issues, totalSampleCount) {
152
188
  ({ issue, firstSeen, lastSeen, occurrences, times }) => applyPersistenceTier(
153
189
  {
154
190
  ...issue,
155
- time: firstSeen,
156
191
  firstSeen,
157
192
  lastSeen,
158
193
  occurrences,
159
- heldMs: longestContiguousRunMs(times)
194
+ heldMs: longestContiguousRunMs(times),
195
+ times: [...new Set(times)].sort((a, b) => a - b)
160
196
  },
161
197
  multiSampleRun
162
198
  )
@@ -234,6 +270,7 @@ function severityRank(severity) {
234
270
  }
235
271
  function staticIssueKey(issue) {
236
272
  return [
273
+ Reflect.get(issue, "sourceFile") ?? "",
237
274
  issue.code,
238
275
  issue.severity,
239
276
  issue.selector,
@@ -670,7 +707,7 @@ async function collectTweenBoundaries(page) {
670
707
  });
671
708
  }
672
709
  async function bundleProjectHtml(projectDir) {
673
- const { bundleToSingleHtml } = await import("./compiler-ACHWOU5N.js");
710
+ const { bundleToSingleHtml } = await import("./compiler-TEXQWW6N.js");
674
711
  return bundleToSingleHtml(projectDir);
675
712
  }
676
713
  async function alignViewportToComposition(page, url) {
@@ -692,8 +729,8 @@ async function alignViewportToComposition(page, url) {
692
729
  async function runLayoutAudit(projectDir, opts) {
693
730
  const { ensureBrowser } = await import("./manager-CT3D67CG.js");
694
731
  const puppeteer = await import("puppeteer-core");
695
- const { buildChromeArgs } = await import("./src-I7UC3JTL.js");
696
- const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalBrowserGpuMode } = await import("./gpuPolicy-LYOVBAJP.js");
732
+ const { buildChromeArgs } = await import("./src-JO5JOV7Y.js");
733
+ const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalBrowserGpuMode } = await import("./gpuPolicy-7N5MCE2G.js");
697
734
  const html = await bundleProjectHtml(projectDir);
698
735
  const server = await serveStaticProjectHtml(
699
736
  projectDir,
@@ -1056,10 +1093,14 @@ function createInspectCommand(commandName) {
1056
1093
  var layout_default = createInspectCommand("layout");
1057
1094
 
1058
1095
  export {
1096
+ findingElementKey,
1097
+ groupSampledFindings,
1098
+ formatFindingTimes,
1059
1099
  buildLayoutSampleTimes,
1060
1100
  formatLayoutIssue,
1061
1101
  dedupeLayoutIssues,
1062
1102
  collapseStaticLayoutIssues,
1103
+ longestContiguousRunMs,
1063
1104
  limitLayoutIssues,
1064
1105
  buildTransitionSampleTimes,
1065
1106
  mergeSampleTimes,
@@ -32,18 +32,18 @@ import {
32
32
  } from "./chunk-S3S4TGEH.js";
33
33
  import {
34
34
  resolveExtractCacheDir
35
- } from "./chunk-E6SDW5FV.js";
35
+ } from "./chunk-33RZPZ4K.js";
36
36
  import {
37
37
  getUpdateMeta,
38
38
  withMeta
39
- } from "./chunk-IYFKBFTW.js";
39
+ } from "./chunk-Y6QL2LGO.js";
40
40
  import {
41
41
  CONFIG_PATH,
42
42
  withFileLock
43
43
  } from "./chunk-XUXGIA7H.js";
44
44
  import {
45
45
  VERSION
46
- } from "./chunk-W6HTOVHU.js";
46
+ } from "./chunk-W35EKBS6.js";
47
47
  import {
48
48
  normalizeErrorMessage
49
49
  } from "./chunk-KNU5COPB.js";
@@ -232,7 +232,7 @@ function checkEnvironment() {
232
232
  return { ok: true, detail: parts.join(" \xB7 ") };
233
233
  }
234
234
  async function checkWhisper() {
235
- const { findWhisper, getInstallInstructions } = await import("./manager-DXB7JDHU.js");
235
+ const { findWhisper, getInstallInstructions } = await import("./manager-GXYF4AVO.js");
236
236
  const result = findWhisper();
237
237
  if (result) {
238
238
  return { ok: true, detail: result.executablePath };
@@ -8,20 +8,20 @@ import {
8
8
  DEFAULT_REGISTRY_URL,
9
9
  fetchItemFile,
10
10
  validRegistryItem
11
- } from "./chunk-Q65ZQFF2.js";
11
+ } from "./chunk-TAMQYQGJ.js";
12
12
  import {
13
13
  publishRegistryFile,
14
14
  registryTargetPath
15
15
  } from "./chunk-GMECXFAN.js";
16
16
  import {
17
17
  validateVariables
18
- } from "./chunk-6E6CM7WS.js";
18
+ } from "./chunk-4M4EC7JX.js";
19
19
  import {
20
20
  realProjectRoot
21
21
  } from "./chunk-OFQWTKPW.js";
22
22
  import {
23
23
  isCompositionVariable
24
- } from "./chunk-HBBJFK6I.js";
24
+ } from "./chunk-APDLWWFG.js";
25
25
 
26
26
  // src/registry/installer.ts
27
27
  import { createHash } from "crypto";
@@ -7,14 +7,14 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  trackLintReport,
9
9
  trackLintRuleStreak
10
- } from "./chunk-7XTZVLE6.js";
10
+ } from "./chunk-QFN7NVWM.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-RCFCZT5O.js";
13
+ } from "./chunk-OSSHSIMD.js";
14
14
  import {
15
15
  LINT_RULE_COUNT,
16
16
  LINT_RULE_GROUP_COUNTS
17
- } from "./chunk-WY5OODN5.js";
17
+ } from "./chunk-XONFUK3M.js";
18
18
 
19
19
  // src/telemetry/lintStreaks.ts
20
20
  import { createHash } from "crypto";