hyperframes 0.8.176 → 0.8.177

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 (111) hide show
  1. package/bin/hyperframes.mjs +3 -0
  2. package/dist/{add-YZGUHLDP.js → add-YVP5YBNV.js} +5 -5
  3. package/dist/api.d.ts +2 -0
  4. package/dist/api.js +5 -5
  5. package/dist/{asset-YPC34MTV.js → asset-CZHAZMDR.js} +2 -2
  6. package/dist/{audio-33JHU37L.js → audio-F37HJPGZ.js} +8 -8
  7. package/dist/{auth-UUIHOS2D.js → auth-CADZEUXD.js} +1 -1
  8. package/dist/{autoUpdate-F747BE3R.js → autoUpdate-46XNDX2V.js} +2 -2
  9. package/dist/{backgroundChecks-3YLO2CSC.js → backgroundChecks-UWDSDJHJ.js} +3 -3
  10. package/dist/backgroundChecksWorker.js +3 -3
  11. package/dist/{beats-DQDV2ZFS.js → beats-COVC2QGG.js} +4 -4
  12. package/dist/{benchmark-ZPPZEIHZ.js → benchmark-HDPPG2FE.js} +5 -5
  13. package/dist/{browser-ZFLEP3E6.js → browser-JEIXZKJN.js} +3 -3
  14. package/dist/{capture-5OW6VNXU.js → capture-YMF7J55W.js} +1 -1
  15. package/dist/captureCompositionFrame-QUYL3DEX.js +88 -0
  16. package/dist/{catalog-3A6KKCWF.js → catalog-DTB6S66P.js} +18 -10
  17. package/dist/{catch-up-KPGCLN4C.js → catch-up-Y4KO7XHK.js} +4 -4
  18. package/dist/{check-I3XLXS77.js → check-3YLTRK6W.js} +41 -30
  19. package/dist/{checkBrowser-KX7LNAFA.js → checkBrowser-LEUOWFNZ.js} +60 -40
  20. package/dist/{chunk-X6ZRZWPZ.js → chunk-2CEIKEFU.js} +1 -1
  21. package/dist/{chunk-SSE6NWZI.js → chunk-2PNLYDGZ.js} +8 -8
  22. package/dist/{chunk-VER46LXI.js → chunk-2YT3SCXL.js} +1 -1
  23. package/dist/{chunk-5TGVURKQ.js → chunk-457OAAL2.js} +1 -1
  24. package/dist/{chunk-OUMYTLPP.js → chunk-4YBNQDZM.js} +1 -1
  25. package/dist/{chunk-7XX4QGQV.js → chunk-6GMZRHYD.js} +50 -14
  26. package/dist/{chunk-J53AJK3Q.js → chunk-6OV3YGZF.js} +1 -1
  27. package/dist/{chunk-MDTMWUJI.js → chunk-7L4JOVV7.js} +1 -1
  28. package/dist/{chunk-HTC3VGU3.js → chunk-AFSBPASX.js} +28 -9
  29. package/dist/{chunk-USEUH5VV.js → chunk-BEX7K4WO.js} +1 -1
  30. package/dist/{chunk-VDUTZXIJ.js → chunk-BHFIITTD.js} +3 -3
  31. package/dist/{chunk-RBOVQRMR.js → chunk-BQTCQ6VN.js} +6 -12
  32. package/dist/{chunk-SURF34CK.js → chunk-HLBAQBHT.js} +1 -1
  33. package/dist/{chunk-HVMHVW5G.js → chunk-JWUKHXM6.js} +1 -1
  34. package/dist/{chunk-R2TVJ4DW.js → chunk-M3MXTYDE.js} +1 -1
  35. package/dist/{chunk-44XBAKKT.js → chunk-MNEC244Z.js} +2 -2
  36. package/dist/{chunk-EEVCXPUA.js → chunk-MPNVXG3J.js} +2 -2
  37. package/dist/{chunk-BVXZYFAL.js → chunk-MXFCQCKE.js} +2 -2
  38. package/dist/{chunk-7LU4ZHYV.js → chunk-P3MMF2JQ.js} +1 -1
  39. package/dist/{chunk-GOOB64LO.js → chunk-S3T3TDAB.js} +1 -1
  40. package/dist/{chunk-MLRCTTSD.js → chunk-SJFA4CZ3.js} +95 -10
  41. package/dist/{chunk-T6NA6TR3.js → chunk-SSYUONVH.js} +2 -2
  42. package/dist/{chunk-KUOUUG33.js → chunk-UEGULMAH.js} +79 -37
  43. package/dist/{chunk-BTCHRQNV.js → chunk-WNQUXBDU.js} +2 -2
  44. package/dist/{chunk-OMUKSCWE.js → chunk-XXHHPB6E.js} +6 -6
  45. package/dist/{chunk-NGRNAF5X.js → chunk-YCRX5APY.js} +1 -1
  46. package/dist/{clean-6REGQY3I.js → clean-BDXOJ4PW.js} +8 -8
  47. package/dist/cli.js +50 -50
  48. package/dist/{cloud-RAQZPMNP.js → cloud-HVG2LUBO.js} +4 -4
  49. package/dist/commands/contrast-audit.browser.js +166 -22
  50. package/dist/{compare-XYFSHHMQ.js → compare-ZXORZDGQ.js} +18 -18
  51. package/dist/{component-CRAO6Q2E.js → component-AZHVBBVP.js} +3 -3
  52. package/dist/{compositions-4SHILZZX.js → compositions-WFILUFC4.js} +5 -5
  53. package/dist/{delete-ZS4AHMTY.js → delete-I34NH2Q4.js} +2 -2
  54. package/dist/{doctor-OL4FYABY.js → doctor-6YID47TF.js} +3 -3
  55. package/dist/{events-Z3XZCRFZ.js → events-G76VOIBQ.js} +3 -3
  56. package/dist/{events-LIJBGTTX.js → events-OKT2KO6S.js} +2 -2
  57. package/dist/{feedback-OE6SB2VE.js → feedback-EGU7SSXF.js} +4 -4
  58. package/dist/{figma-DMUCMO67.js → figma-SUJPNBQQ.js} +3 -3
  59. package/dist/fontLocalizeCli.js +1 -1
  60. package/dist/{get-NQOQVUI5.js → get-7MYYFGO7.js} +2 -2
  61. package/dist/{grade-compare-HLTHHQGH.js → grade-compare-P22VRQLA.js} +18 -18
  62. package/dist/{help-ZAXWHAYF.js → help-HL6QBZMC.js} +1 -1
  63. package/dist/{history-CMY7ZEEW.js → history-OG2IXOQA.js} +7 -7
  64. package/dist/hyperframes-player.global.js +1 -1
  65. package/dist/{info-STR7EYI3.js → info-7P77JIWI.js} +5 -5
  66. package/dist/{init-YSMKK5VG.js → init-JI7QDJV4.js} +15 -15
  67. package/dist/{inspect-QV6DC6GO.js → inspect-7GSF776P.js} +17 -17
  68. package/dist/{keyframes-HN3DW5FG.js → keyframes-6NM477BA.js} +6 -6
  69. package/dist/{lambda-PG3JKNWS.js → lambda-4DNBHUPF.js} +2 -2
  70. package/dist/{layout-O4QAR2XY.js → layout-IBDEMDYP.js} +17 -17
  71. package/dist/{lint-AY55R4UR.js → lint-BGAON4GT.js} +6 -6
  72. package/dist/{list-TH2KCVNN.js → list-PGWNFSLX.js} +2 -2
  73. package/dist/{login-TRCMRV4B.js → login-IAGLU3R3.js} +4 -4
  74. package/dist/{manager-2J4XGDZ3.js → manager-VOGZQSK4.js} +5 -3
  75. package/dist/{media-treatment-ET5QQSWP.js → media-treatment-Z4N3JEDB.js} +6 -6
  76. package/dist/{models-RFUUSCG6.js → models-QUOIJVQI.js} +4 -4
  77. package/dist/{motionShot-2ET565ZV.js → motionShot-GPNESXTN.js} +2 -2
  78. package/dist/{normalize-audio-LUOJSD3W.js → normalize-audio-C264N2QE.js} +5 -5
  79. package/dist/{open-MVEOYQRQ.js → open-HB5F4HSD.js} +4 -4
  80. package/dist/{parakeetRunner-3TG7EHWA.js → parakeetRunner-2ZQOINZQ.js} +4 -4
  81. package/dist/{play-I3WJPYXK.js → play-VQ4HA4CC.js} +10 -10
  82. package/dist/{present-DUZBKUYH.js → present-HU46P43M.js} +9 -9
  83. package/dist/{preview-7J5TBTRP.js → preview-LNTJ62DX.js} +5 -5
  84. package/dist/{render-IYTGM6DE.js → render-DV76TO7S.js} +5 -5
  85. package/dist/{render-JUS2ROIN.js → render-TPE44TOW.js} +21 -21
  86. package/dist/{sherpa-PRI3JLUP.js → sherpa-IBMU4WV6.js} +3 -3
  87. package/dist/skills/media-use/references/operations.md +3 -1
  88. package/dist/{skills-CZ6VW5SZ.js → skills-M2ANTFD6.js} +5 -5
  89. package/dist/{skillsUpdateCheck-K4UKUAOC.js → skillsUpdateCheck-4WNEKKDW.js} +3 -3
  90. package/dist/{snapshot-MPE4GIMJ.js → snapshot-5AKBT5IQ.js} +25 -25
  91. package/dist/{staticProjectServer-DG4VZO4G.js → staticProjectServer-UVFPQEUZ.js} +4 -4
  92. package/dist/studio/assets/{hyperframes-player-DBHpVw8L.js → hyperframes-player-BulZP0_1.js} +1 -1
  93. package/dist/studio/assets/{index-BkDF4Z-5.js → index-B1Gypobp.js} +4 -4
  94. package/dist/studio/assets/{index-DHRXpmtI.js → index-CGncBUsJ.js} +1 -1
  95. package/dist/studio/index.html +1 -1
  96. package/dist/{studio-api-RGNBVLLL.js → studio-api-RVIU7JP2.js} +2 -2
  97. package/dist/{studioServer-FWACRD3Y.js → studioServer-K22MWDLW.js} +16 -16
  98. package/dist/{telemetry-CHJA5JFQ.js → telemetry-SUAMGBFK.js} +3 -3
  99. package/dist/{timeline-TZDMQBSM.js → timeline-SGVBFT36.js} +12 -12
  100. package/dist/{tokens-B5KI7FBA.js → tokens-IFHWY5WC.js} +2 -2
  101. package/dist/{transcribe-VHUDXZET.js → transcribe-GY4JHB7V.js} +9 -8
  102. package/dist/{transcribe-M7NO6XBP.js → transcribe-KAOCI5CW.js} +4 -4
  103. package/dist/{updateCheck-NMD6AFFG.js → updateCheck-YUNDJDLW.js} +2 -2
  104. package/dist/{upgrade-WGFMGJ5O.js → upgrade-PL2BFWTO.js} +2 -2
  105. package/dist/{validate-NM3GLUWX.js → validate-2NALRIFW.js} +14 -14
  106. package/package.json +1 -1
  107. package/dist/{capture-6XCCIPT4.js → capture-QVW6JPTF.js} +0 -0
  108. package/dist/{chunk-5EA4C6RA.js → chunk-GZG3ZZOO.js} +3 -3
  109. package/dist/{chunk-3Q4Y33FT.js → chunk-PIH4P2G6.js} +4 -4
  110. package/dist/{deploy-NKWMPAMH.js → deploy-3TTQZGTF.js} +4 -4
  111. package/dist/{destroy-UKP522AE.js → destroy-BEL232I5.js} +3 -3
@@ -9,6 +9,9 @@ import {
9
9
  reportArtifacts,
10
10
  withProjectLock
11
11
  } from "./chunk-57GN6KWT.js";
12
+ import {
13
+ trackLintRun
14
+ } from "./chunk-SSYUONVH.js";
12
15
  import {
13
16
  beginCheckSnapshots,
14
17
  checkSnapshotDirectory,
@@ -34,44 +37,41 @@ import {
34
37
  mergeSampleTimes,
35
38
  parseAt,
36
39
  readMotionSpec
37
- } from "./chunk-SSE6NWZI.js";
40
+ } from "./chunk-2PNLYDGZ.js";
38
41
  import {
39
42
  captureArtifactRevision
40
- } from "./chunk-USEUH5VV.js";
41
- import "./chunk-VER46LXI.js";
43
+ } from "./chunk-BEX7K4WO.js";
44
+ import "./chunk-2YT3SCXL.js";
42
45
  import "./chunk-X7MTZ4T2.js";
43
46
  import {
44
47
  loadProducer
45
48
  } from "./chunk-MG66UO4N.js";
46
- import {
47
- trackLintRun
48
- } from "./chunk-T6NA6TR3.js";
49
- import "./chunk-KUOUUG33.js";
50
- import "./chunk-FH7WODJH.js";
51
- import {
52
- BrowserCleanupError,
53
- closeManagedBrowser
54
- } from "./chunk-L6XT6GSV.js";
55
- import "./chunk-X4PK5ZXP.js";
56
- import "./chunk-BRHI7EIA.js";
57
- import "./chunk-DQY6WTF7.js";
58
49
  import {
59
50
  resolveProject
60
- } from "./chunk-SURF34CK.js";
61
- import "./chunk-K2FLNJVB.js";
62
- import "./chunk-OUMYTLPP.js";
51
+ } from "./chunk-HLBAQBHT.js";
52
+ import "./chunk-4YBNQDZM.js";
53
+ import "./chunk-6OV3YGZF.js";
63
54
  import "./chunk-X7MTZ4T2.js";
64
- import "./chunk-J53AJK3Q.js";
65
55
  import "./chunk-XUHOIDKG.js";
66
- import "./chunk-3Q4Y33FT.js";
56
+ import "./chunk-PIH4P2G6.js";
67
57
  import "./chunk-TNDNFZOK.js";
68
- import "./chunk-6JR2XUEE.js";
69
58
  import "./chunk-C6TPGUWD.js";
59
+ import "./chunk-6JR2XUEE.js";
70
60
  import "./chunk-QWCXGTOH.js";
71
61
  import {
72
62
  recordArtifacts
73
63
  } from "./chunk-GMJ3ILLW.js";
74
64
  import "./chunk-FFDC5OWV.js";
65
+ import "./chunk-UEGULMAH.js";
66
+ import "./chunk-FH7WODJH.js";
67
+ import {
68
+ BrowserCleanupError,
69
+ closeManagedBrowser
70
+ } from "./chunk-L6XT6GSV.js";
71
+ import "./chunk-X4PK5ZXP.js";
72
+ import "./chunk-BRHI7EIA.js";
73
+ import "./chunk-DQY6WTF7.js";
74
+ import "./chunk-K2FLNJVB.js";
75
75
  import "./chunk-DQBY7FRR.js";
76
76
  import {
77
77
  resolveLocalBrowserGpuMode
@@ -95,8 +95,8 @@ import "./chunk-5CS4T6C6.js";
95
95
  import {
96
96
  trackCheckReport,
97
97
  trackCommandFailure
98
- } from "./chunk-GOOB64LO.js";
99
- import "./chunk-X6ZRZWPZ.js";
98
+ } from "./chunk-S3T3TDAB.js";
99
+ import "./chunk-2CEIKEFU.js";
100
100
  import "./chunk-VWG7OQKU.js";
101
101
  import "./chunk-T6AGUTZJ.js";
102
102
  import {
@@ -121,12 +121,12 @@ import "./chunk-7FMUTGOH.js";
121
121
  import "./chunk-Q5X2B5WT.js";
122
122
  import {
123
123
  withMeta
124
- } from "./chunk-5TGVURKQ.js";
124
+ } from "./chunk-457OAAL2.js";
125
125
  import "./chunk-K4WIOZFP.js";
126
126
  import "./chunk-XUXGIA7H.js";
127
127
  import "./chunk-WERLJGIC.js";
128
128
  import "./chunk-ISN5GRYI.js";
129
- import "./chunk-EEVCXPUA.js";
129
+ import "./chunk-MPNVXG3J.js";
130
130
  import "./chunk-EOVYQ3IG.js";
131
131
  import "./chunk-XT6MXC7A.js";
132
132
  import {
@@ -265,6 +265,7 @@ var CheckDeadline = class {
265
265
 
266
266
  // src/utils/checkPipeline.ts
267
267
  import { mkdirSync, writeFileSync } from "fs";
268
+ import { readFile } from "fs/promises";
268
269
  import { join, relative } from "path";
269
270
 
270
271
  // src/utils/hdrPromotion.ts
@@ -1170,6 +1171,7 @@ async function runAuditGrid(driver, options, motion) {
1170
1171
  }
1171
1172
  async function runCheckPipeline(project, options, dependencies = DEFAULT_DEPENDENCIES2) {
1172
1173
  beginCheckSnapshots(project.dir);
1174
+ const prelaunched = dependencies.prelaunchBrowser?.(project, options).catch(() => void 0);
1173
1175
  try {
1174
1176
  let lintResult;
1175
1177
  const lintStartedAt = Date.now();
@@ -1219,8 +1221,9 @@ async function runCheckPipeline(project, options, dependencies = DEFAULT_DEPENDE
1219
1221
  try {
1220
1222
  let browser;
1221
1223
  try {
1224
+ const browserAhead = await prelaunched;
1222
1225
  browser = await deadline.run(
1223
- () => dependencies.runBrowserCheck(project, options, motion, deadline)
1226
+ () => dependencies.runBrowserCheck(project, options, motion, deadline, browserAhead)
1224
1227
  );
1225
1228
  } catch (error) {
1226
1229
  browser = emptyBrowserResult();
@@ -1266,6 +1269,7 @@ async function runCheckPipeline(project, options, dependencies = DEFAULT_DEPENDE
1266
1269
  if (outcome.kind === "failed") throw outcome.error;
1267
1270
  return outcome.report;
1268
1271
  } finally {
1272
+ await (await prelaunched)?.discard();
1269
1273
  await finishCheckSnapshots(project.dir).catch(() => void 0);
1270
1274
  }
1271
1275
  }
@@ -1615,9 +1619,15 @@ function resolveMotionSpec(projectDir) {
1615
1619
  message: `Invalid motion spec ${path}: ${result.errors.join("; ")}`
1616
1620
  };
1617
1621
  }
1618
- async function runBrowserCheck(project, options, motion, deadline) {
1619
- const module = await import("./checkBrowser-KX7LNAFA.js");
1620
- return module.runBrowserCheck(project, options, motion, runAuditGrid, deadline);
1622
+ async function runBrowserCheck(project, options, motion, deadline, prelaunched) {
1623
+ const module = await import("./checkBrowser-LEUOWFNZ.js");
1624
+ return module.runBrowserCheck(project, options, motion, runAuditGrid, deadline, prelaunched);
1625
+ }
1626
+ async function prelaunchBrowser(project, options) {
1627
+ const html = await readFile(project.indexPath, "utf8").catch(() => void 0);
1628
+ if (html === void 0) return void 0;
1629
+ const { prelaunchCompositionBrowser } = await import("./captureCompositionFrame-QUYL3DEX.js");
1630
+ return prelaunchCompositionBrowser(html, options.browserGpuMode);
1621
1631
  }
1622
1632
  async function writeSnapshot(projectDir, index, time, pngBase64) {
1623
1633
  const snapshotDir = checkSnapshotDirectory(projectDir);
@@ -1628,13 +1638,14 @@ async function writeSnapshot(projectDir, index, time, pngBase64) {
1628
1638
  return relative(projectDir, path);
1629
1639
  }
1630
1640
  async function captureFindingCrops(project, options, requests, deadline) {
1631
- const module = await import("./checkBrowser-KX7LNAFA.js");
1641
+ const module = await import("./checkBrowser-LEUOWFNZ.js");
1632
1642
  return module.captureFindingCrops(project, options, requests, deadline);
1633
1643
  }
1634
1644
  var DEFAULT_DEPENDENCIES2 = {
1635
1645
  lintProject,
1636
1646
  resolveMotionSpec,
1637
1647
  runBrowserCheck,
1648
+ prelaunchBrowser,
1638
1649
  writeSnapshot,
1639
1650
  captureFindingCrops,
1640
1651
  inspectHdrAutoPromotion
@@ -8,7 +8,7 @@ import {
8
8
  auditClipDurations,
9
9
  shouldIgnoreHttpError,
10
10
  shouldIgnoreRequestFailure
11
- } from "./chunk-OMUKSCWE.js";
11
+ } from "./chunk-XXHHPB6E.js";
12
12
  import {
13
13
  checkSnapshotDirectory,
14
14
  rectToBbox
@@ -16,8 +16,28 @@ import {
16
16
  import {
17
17
  ambiguousIssue,
18
18
  loadBrowserScript
19
- } from "./chunk-SSE6NWZI.js";
19
+ } from "./chunk-2PNLYDGZ.js";
20
20
  import "./chunk-X7MTZ4T2.js";
21
+ import "./chunk-HLBAQBHT.js";
22
+ import {
23
+ serveStaticProjectHtml
24
+ } from "./chunk-4YBNQDZM.js";
25
+ import "./chunk-6OV3YGZF.js";
26
+ import "./chunk-X7MTZ4T2.js";
27
+ import "./chunk-XUHOIDKG.js";
28
+ import "./chunk-PIH4P2G6.js";
29
+ import "./chunk-TNDNFZOK.js";
30
+ import "./chunk-C6TPGUWD.js";
31
+ import "./chunk-6JR2XUEE.js";
32
+ import {
33
+ FfmpegUnavailableError,
34
+ decideMediaProxyEligibility,
35
+ proxyVariantFor,
36
+ resolveProxies,
37
+ scanProjectMediaCodecMap
38
+ } from "./chunk-QWCXGTOH.js";
39
+ import "./chunk-GMJ3ILLW.js";
40
+ import "./chunk-FFDC5OWV.js";
21
41
  import {
22
42
  AUDIT_SEEK_OPTIONS,
23
43
  DEFAULT_ZOOM_PADDING_PX,
@@ -31,7 +51,7 @@ import {
31
51
  seekCompositionTimeline,
32
52
  seekInPage,
33
53
  waitForPreferredSeekTarget
34
- } from "./chunk-KUOUUG33.js";
54
+ } from "./chunk-UEGULMAH.js";
35
55
  import "./chunk-FH7WODJH.js";
36
56
  import {
37
57
  BrowserCleanupError,
@@ -40,27 +60,7 @@ import {
40
60
  import "./chunk-X4PK5ZXP.js";
41
61
  import "./chunk-BRHI7EIA.js";
42
62
  import "./chunk-DQY6WTF7.js";
43
- import "./chunk-SURF34CK.js";
44
63
  import "./chunk-K2FLNJVB.js";
45
- import {
46
- serveStaticProjectHtml
47
- } from "./chunk-OUMYTLPP.js";
48
- import "./chunk-X7MTZ4T2.js";
49
- import "./chunk-J53AJK3Q.js";
50
- import "./chunk-XUHOIDKG.js";
51
- import "./chunk-3Q4Y33FT.js";
52
- import "./chunk-TNDNFZOK.js";
53
- import "./chunk-6JR2XUEE.js";
54
- import "./chunk-C6TPGUWD.js";
55
- import {
56
- FfmpegUnavailableError,
57
- decideMediaProxyEligibility,
58
- proxyVariantFor,
59
- resolveProxies,
60
- scanProjectMediaCodecMap
61
- } from "./chunk-QWCXGTOH.js";
62
- import "./chunk-GMJ3ILLW.js";
63
- import "./chunk-FFDC5OWV.js";
64
64
  import "./chunk-L3LJVYXS.js";
65
65
  import "./chunk-442JNXRM.js";
66
66
  import "./chunk-RGHQID2E.js";
@@ -78,8 +78,8 @@ import "./chunk-AWDFDFI3.js";
78
78
  import "./chunk-P6LJ4Y32.js";
79
79
  import "./chunk-GMECXFAN.js";
80
80
  import "./chunk-5CS4T6C6.js";
81
- import "./chunk-GOOB64LO.js";
82
- import "./chunk-X6ZRZWPZ.js";
81
+ import "./chunk-S3T3TDAB.js";
82
+ import "./chunk-2CEIKEFU.js";
83
83
  import "./chunk-VWG7OQKU.js";
84
84
  import "./chunk-T6AGUTZJ.js";
85
85
  import "./chunk-S3S4TGEH.js";
@@ -89,12 +89,12 @@ import "./chunk-ZTZA4UWZ.js";
89
89
  import "./chunk-KLIKCX6Q.js";
90
90
  import "./chunk-EOOEC32M.js";
91
91
  import "./chunk-7FMUTGOH.js";
92
- import "./chunk-5TGVURKQ.js";
92
+ import "./chunk-457OAAL2.js";
93
93
  import "./chunk-K4WIOZFP.js";
94
94
  import "./chunk-XUXGIA7H.js";
95
95
  import "./chunk-WERLJGIC.js";
96
96
  import "./chunk-ISN5GRYI.js";
97
- import "./chunk-EEVCXPUA.js";
97
+ import "./chunk-MPNVXG3J.js";
98
98
  import "./chunk-EOVYQ3IG.js";
99
99
  import "./chunk-XT6MXC7A.js";
100
100
  import "./chunk-YWSXFFO3.js";
@@ -295,7 +295,7 @@ async function preResolveHostileMediaProxies(projectDir, html, autoProxyOverride
295
295
  function proxyFailedDraft(message) {
296
296
  return { code: "media_proxy_failed", severity: "warning", message, time: 0 };
297
297
  }
298
- async function runBrowserCheck(project, options, motion, runGrid, deadline) {
298
+ async function runBrowserCheck(project, options, motion, runGrid, deadline, prelaunched) {
299
299
  const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-PMRGOQWD.js");
300
300
  const html = await bundleWithLocalizedFonts(project.dir);
301
301
  const { findings: drafts, failedPaths } = await preResolveHostileMediaProxies(
@@ -328,6 +328,7 @@ async function runBrowserCheck(project, options, motion, runGrid, deadline) {
328
328
  navigationTimeoutMs: options.timeout,
329
329
  renderReadyTimeoutMs: options.timeout,
330
330
  renderReadyWarningSuffix: "checking the current page state",
331
+ prelaunched,
331
332
  browserGpuMode: options.browserGpuMode ?? resolveCliChromeGpuMode(),
332
333
  signal: deadline?.signal,
333
334
  onBrowser: deadline?.ownBrowser,
@@ -1015,17 +1016,10 @@ async function collectContrast(page, time, snapshotAnnotations) {
1015
1016
  try {
1016
1017
  prepared = parsePreparedContrast(await prepareContrast(page, time));
1017
1018
  if (prepared.length === 0 && !snapshotAnnotations) return { entries: [] };
1018
- const region = textRegion(prepared, page.viewport());
1019
- const measurementShot = await page.screenshot({
1020
- encoding: "base64",
1021
- type: "png",
1022
- omitBackground: true,
1023
- ...region ? { clip: region.clip, captureBeyondViewport: false } : {}
1024
- });
1025
- if (typeof measurementShot !== "string") throw new Error("Contrast screenshot was not base64");
1019
+ const { shot, region } = await measurementShot(page, prepared);
1026
1020
  const raw = await finishContrast(
1027
1021
  page,
1028
- measurementShot,
1022
+ shot,
1029
1023
  time,
1030
1024
  prepared.map((entry) => entry.raw),
1031
1025
  region
@@ -1048,6 +1042,23 @@ async function collectContrast(page, time, snapshotAnnotations) {
1048
1042
  }).catch(() => void 0);
1049
1043
  }
1050
1044
  }
1045
+ async function measurementShot(page, prepared) {
1046
+ const frame = plainFrame(page.viewport());
1047
+ const sampled = prepared.filter((entry) => !entry.knownBackdrop);
1048
+ if (frame && sampled.length === 0) {
1049
+ const clip = { x: 0, y: 0, ...frame };
1050
+ return { shot: null, region: { clip, frameWidth: frame.width, frameHeight: frame.height } };
1051
+ }
1052
+ const region = textRegion(sampled, frame);
1053
+ const shot = await page.screenshot({
1054
+ encoding: "base64",
1055
+ type: "png",
1056
+ omitBackground: true,
1057
+ ...region ? { clip: region.clip, captureBeyondViewport: false } : {}
1058
+ });
1059
+ if (typeof shot !== "string") throw new Error("Contrast screenshot was not base64");
1060
+ return { shot, region };
1061
+ }
1051
1062
  function contrastFailureAnnotations(entries, labelOffset) {
1052
1063
  return entries.filter((entry) => !entry.wcagAA).map((entry, index) => ({
1053
1064
  label: `${labelOffset + index + 1} contrast_aa_failure`,
@@ -1142,9 +1153,12 @@ async function prepareContrast(page, time) {
1142
1153
  });
1143
1154
  }, time);
1144
1155
  }
1156
+ function plainFrame(viewport) {
1157
+ if (!viewport || (viewport.deviceScaleFactor ?? 1) !== 1) return void 0;
1158
+ return { width: viewport.width, height: viewport.height };
1159
+ }
1145
1160
  function textRegion(prepared, viewport) {
1146
- if (!viewport || (viewport.deviceScaleFactor ?? 1) !== 1 || prepared.length === 0)
1147
- return void 0;
1161
+ if (!viewport || prepared.length === 0) return void 0;
1148
1162
  const boxes = prepared.map((entry) => entry.candidate.bbox);
1149
1163
  const x = Math.max(0, Math.floor(Math.min(...boxes.map((box) => box.x))));
1150
1164
  const y = Math.max(0, Math.floor(Math.min(...boxes.map((box) => box.y))));
@@ -1179,9 +1193,15 @@ function parsePreparedContrast(raw) {
1179
1193
  const raw2 = Reflect.get(value, "candidate");
1180
1194
  const candidate = parseContrastCandidate(raw2);
1181
1195
  const anchor = parseAnchor(Reflect.get(value, "anchor"));
1182
- return candidate && anchor ? [{ raw: raw2, candidate, anchor }] : [];
1196
+ return candidate && anchor ? [{ raw: raw2, candidate, anchor, knownBackdrop: knownBackdrop(raw2) }] : [];
1183
1197
  });
1184
1198
  }
1199
+ function knownBackdrop(raw) {
1200
+ if (!isRecord(raw)) return false;
1201
+ const own = Reflect.get(raw, "ownBg");
1202
+ const solid = Reflect.get(raw, "solidBg");
1203
+ return Array.isArray(solid) || Array.isArray(own) && own.length >= 4 && own[3] >= 0.99;
1204
+ }
1185
1205
  function parseContrastCandidate(value) {
1186
1206
  if (!isRecord(value)) return null;
1187
1207
  const selector = stringValue(value, "selector");
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-XUXGIA7H.js";
30
30
  import {
31
31
  VERSION
32
- } from "./chunk-EEVCXPUA.js";
32
+ } from "./chunk-MPNVXG3J.js";
33
33
  import {
34
34
  CANARIES,
35
35
  canaryEnvVar,
@@ -4,13 +4,19 @@ 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
+ resolveProject
9
+ } from "./chunk-HLBAQBHT.js";
10
+ import {
11
+ serveStaticProjectHtml
12
+ } from "./chunk-4YBNQDZM.js";
7
13
  import {
8
14
  AUDIT_SEEK_OPTIONS,
9
15
  installPageFunctionGuard,
10
16
  seekCompositionTimeline,
11
17
  waitForCompositionFonts,
12
18
  waitForRuntimeReady
13
- } from "./chunk-KUOUUG33.js";
19
+ } from "./chunk-UEGULMAH.js";
14
20
  import {
15
21
  gotoWhenSent,
16
22
  launchManagedBrowser,
@@ -19,12 +25,6 @@ import {
19
25
  import {
20
26
  pageNavigationTimeoutMs
21
27
  } from "./chunk-X4PK5ZXP.js";
22
- import {
23
- resolveProject
24
- } from "./chunk-SURF34CK.js";
25
- import {
26
- serveStaticProjectHtml
27
- } from "./chunk-OUMYTLPP.js";
28
28
  import {
29
29
  defineCommand
30
30
  } from "./chunk-S3S4TGEH.js";
@@ -38,7 +38,7 @@ import {
38
38
  import {
39
39
  printDeprecationNotice,
40
40
  withMeta
41
- } from "./chunk-5TGVURKQ.js";
41
+ } from "./chunk-457OAAL2.js";
42
42
  import {
43
43
  normalizeErrorMessage
44
44
  } from "./chunk-KNU5COPB.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveProject
9
- } from "./chunk-SURF34CK.js";
9
+ } from "./chunk-HLBAQBHT.js";
10
10
  import {
11
11
  DEFAULT_HISTORY_ROOT,
12
12
  HistoryBusyError,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-ISN5GRYI.js";
18
18
  import {
19
19
  VERSION
20
- } from "./chunk-EEVCXPUA.js";
20
+ } from "./chunk-MPNVXG3J.js";
21
21
 
22
22
  // src/utils/updateCheck.ts
23
23
  import { existsSync, readFileSync } from "fs";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType,
9
9
  injectMediaCodecMapIntoHtml
10
- } from "./chunk-3Q4Y33FT.js";
10
+ } from "./chunk-PIH4P2G6.js";
11
11
  import {
12
12
  PROXY_VARIANT_CONFIG,
13
13
  ProxyCapacityError,
@@ -11,8 +11,10 @@ import {
11
11
  DEFAULT_MODEL,
12
12
  ensureModel,
13
13
  ensureWhisper,
14
- hasFFmpeg
15
- } from "./chunk-MLRCTTSD.js";
14
+ hasFFmpeg,
15
+ pinnedWhisperModel,
16
+ sha256File
17
+ } from "./chunk-SJFA4CZ3.js";
16
18
  import {
17
19
  findFFmpeg,
18
20
  findFFprobe,
@@ -34,7 +36,7 @@ import { once } from "events";
34
36
  import { createInterface } from "readline";
35
37
  import { existsSync, readFileSync, mkdirSync, rmSync, statSync, unlinkSync } from "fs";
36
38
  import { basename, join, extname } from "path";
37
- import { tmpdir } from "os";
39
+ import { homedir, tmpdir } from "os";
38
40
  import { randomUUID } from "crypto";
39
41
 
40
42
  // src/whisper/modelForLanguage.ts
@@ -302,9 +304,6 @@ async function prepareAudio(audioPath, signal) {
302
304
  );
303
305
  return wavPath;
304
306
  }
305
- function dtwPresetForModel(model) {
306
- return model.replace(/-/g, ".");
307
- }
308
307
  async function prepareWav(inputPath, onProgress, signal) {
309
308
  if (isAudioFile(inputPath)) {
310
309
  onProgress?.("Preparing audio...");
@@ -366,8 +365,6 @@ async function transcribe(inputPath, outputDir, options) {
366
365
  "--output-json-full",
367
366
  "--output-file",
368
367
  outputBase,
369
- "--dtw",
370
- dtwPresetForModel(model),
371
368
  "--suppress-nst"
372
369
  ];
373
370
  whisperArgs.push("--language", language);
@@ -398,11 +395,14 @@ async function transcribe(inputPath, outputDir, options) {
398
395
  } : void 0
399
396
  });
400
397
  } catch (err) {
401
- throw wrapWhisperTimeoutError(err, {
402
- effectiveTimeoutMs: whisperTimeoutMs,
403
- model,
404
- wasOverride: options?.timeoutMs != null
405
- });
398
+ if (isWhisperTimeoutError(err) || stoppedByCancelSignal(err)) {
399
+ throw wrapWhisperTimeoutError(err, {
400
+ effectiveTimeoutMs: whisperTimeoutMs,
401
+ model,
402
+ wasOverride: options?.timeoutMs != null
403
+ });
404
+ }
405
+ throw await diagnoseWhisperFailure(err, whisper, modelPath, model);
406
406
  }
407
407
  const transcriptPath = `${outputBase}.json`;
408
408
  if (!existsSync(transcriptPath)) {
@@ -478,6 +478,42 @@ async function runWhisper(executable, args, options) {
478
478
  const read = (stream, onLine) => stream && onLine ? once(createInterface({ input: stream }).on("line", onLine), "close") : null;
479
479
  await Promise.all([exited, read(stdout, options.onStdout), read(stderr, options.onStderr)]);
480
480
  }
481
+ function withoutPaths(text) {
482
+ return text.split(homedir()).join("~").replace(/(?<=^|[\s'"(=:[])(?:~|[A-Za-z]:)?[\\/](?:[^\s'"`\\/]+[\\/])*([^\s'"`\\/]+)/g, "$1");
483
+ }
484
+ function whisperVersion(executable) {
485
+ try {
486
+ const said = execFileSync(executable, ["--version"], {
487
+ encoding: "utf-8",
488
+ stdio: ["ignore", "pipe", "pipe"],
489
+ timeout: 5e3
490
+ });
491
+ return /version:?\s*(\S+)/i.exec(said)?.[1] ?? "unknown version";
492
+ } catch {
493
+ return "unknown version";
494
+ }
495
+ }
496
+ async function describeModel(modelPath, model) {
497
+ const bytes = statSync(modelPath, { throwIfNoEntry: false })?.size;
498
+ if (bytes === void 0) return `model ${model}: file missing`;
499
+ const sha256 = await sha256File(modelPath).catch(() => "unreadable");
500
+ const pin = pinnedWhisperModel(model);
501
+ const verdict = !pin ? "not a pinned model" : pin.bytes === bytes && pin.sha256 === sha256 ? "matches the pinned file" : `damaged: expected ${pin.bytes} bytes, sha256 ${pin.sha256.slice(0, 12)}; delete it and re-run`;
502
+ return `model ${model}: ${bytes} bytes, sha256 ${sha256.slice(0, 12)} (${verdict})`;
503
+ }
504
+ async function diagnoseWhisperFailure(err, whisper, modelPath, model) {
505
+ const failed = err;
506
+ const how = failed.signal ? `crashed (${failed.signal})` : typeof failed.code === "number" ? `exited with code ${failed.code}` : `failed: ${withoutPaths(err instanceof Error ? err.message : String(err))}`;
507
+ const said = withoutPaths(String(failed.stderr ?? "")).trim().split("\n").slice(-12).join("\n");
508
+ const lines = [
509
+ `whisper-cli ${how}.`,
510
+ `whisper-cli ${whisperVersion(whisper.executablePath)} (${whisper.source}: ${basename(whisper.executablePath)})`,
511
+ await describeModel(modelPath, model),
512
+ said ? `whisper-cli said:
513
+ ${said}` : "whisper-cli printed nothing."
514
+ ];
515
+ return new Error(lines.join("\n"), { cause: err });
516
+ }
481
517
  function isWhisperTimeoutError(err) {
482
518
  return err instanceof Error && err.code === "ETIMEDOUT";
483
519
  }
@@ -504,9 +540,9 @@ export {
504
540
  getPreparedWavDurationSeconds,
505
541
  detectSpeechOnset,
506
542
  isPcm16kMono,
507
- dtwPresetForModel,
508
543
  prepareWav,
509
544
  transcribe,
545
+ withoutPaths,
510
546
  isWhisperTimeoutError,
511
547
  wrapWhisperTimeoutError
512
548
  };
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType
9
- } from "./chunk-3Q4Y33FT.js";
9
+ } from "./chunk-PIH4P2G6.js";
10
10
  import {
11
11
  injectTagsAtHeadStart
12
12
  } from "./chunk-EEXE43II.js";
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
1278
1278
  } catch (err) {
1279
1279
  if (err instanceof Error) {
1280
1280
  try {
1281
- const { trackCommandFailure } = await import("./events-Z3XZCRFZ.js");
1281
+ const { trackCommandFailure } = await import("./events-G76VOIBQ.js");
1282
1282
  trackCommandFailure(
1283
1283
  command,
1284
1284
  err,
@@ -6,25 +6,26 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parakeetRunner
9
- } from "./chunk-NGRNAF5X.js";
9
+ } from "./chunk-YCRX5APY.js";
10
10
  import {
11
11
  DecodeCancelled,
12
12
  prepareSherpaWav,
13
13
  sherpaUnsupportedReason,
14
14
  transcribeWithSherpa
15
- } from "./chunk-RBOVQRMR.js";
15
+ } from "./chunk-BQTCQ6VN.js";
16
16
  import {
17
17
  initialModelForLanguage,
18
18
  transcribe
19
- } from "./chunk-7XX4QGQV.js";
19
+ } from "./chunk-6GMZRHYD.js";
20
20
  import {
21
21
  createRenderCancellationScope,
22
22
  stoppedByCancelSignal
23
23
  } from "./chunk-X6HYBA4A.js";
24
24
  import {
25
25
  DEFAULT_MODEL,
26
+ findWhisper,
26
27
  isWhisperUnavailable
27
- } from "./chunk-MLRCTTSD.js";
28
+ } from "./chunk-SJFA4CZ3.js";
28
29
  import {
29
30
  formatSrt,
30
31
  formatVtt,
@@ -174,10 +175,15 @@ function writeCaptionSidecar(words, { to, outPath, preserveCues, keep }, phraseL
174
175
  const content = to === "srt" ? formatSrt(words, { preGrouped }) : formatVtt(words, { preGrouped });
175
176
  writeFileSync(outPath, content);
176
177
  }
177
- function pickRunner(engine, parakeet, language) {
178
- if (engine === "whisper" || !parakeetSpeaks(language)) return "whisper";
178
+ function pickRunner(engine, parakeet, language, whisperForLanguage = false) {
179
+ if (engine === "whisper" || whisperForLanguage || !parakeetSpeaks(language)) return "whisper";
179
180
  return parakeet() ?? "whisper";
180
181
  }
182
+ function needsWhisperForLanguage(engine, language) {
183
+ const base = language?.trim().toLowerCase().split(/[-_]/, 1)[0];
184
+ if (engine === "whisper" || !base || base === "en" || !parakeetSpeaks(language)) return false;
185
+ return findWhisper() !== void 0;
186
+ }
181
187
  var parakeetFallsBack = (engine) => engine === "auto";
182
188
  function withoutTrailingDots(text) {
183
189
  let end = text.length;
@@ -200,8 +206,14 @@ async function transcribeAudio(inputPath, dir, sidecar, options) {
200
206
  );
201
207
  }
202
208
  const unsupported = sherpaUnsupportedReason();
203
- let runner = pickRunner(engine, () => parakeetRunner({ unsupported }), options.language);
204
- if (engine === "parakeet" && runner === "whisper") {
209
+ const whisperForLanguage = needsWhisperForLanguage(engine, options.language);
210
+ let runner = pickRunner(
211
+ engine,
212
+ () => parakeetRunner({ unsupported }),
213
+ options.language,
214
+ whisperForLanguage
215
+ );
216
+ if (engine === "parakeet" && runner === "whisper" && !whisperForLanguage) {
205
217
  throw new TranscribeError(
206
218
  "parakeet_unavailable",
207
219
  !parakeetSpeaks(options.language) ? `Parakeet does not transcribe --language ${options.language}; it covers ${PARAKEET_LANGUAGES.split(" ").join(", ")}. Use --engine whisper.` : unsupported ?? `Parakeet is not installed. Install it with: ${PARAKEET_INSTALL_COMMAND} (or use --engine whisper)`
@@ -209,7 +221,14 @@ async function transcribeAudio(inputPath, dir, sidecar, options) {
209
221
  }
210
222
  const model = options.model ?? DEFAULT_MODEL;
211
223
  const whisperModel = initialModelForLanguage(model, options.language);
212
- options.onEngine?.({ runner, engine: engineOf(runner), model: whisperModel });
224
+ options.onEngine?.({
225
+ runner,
226
+ engine: engineOf(runner),
227
+ model: whisperModel,
228
+ ...whisperForLanguage && {
229
+ notice: `Parakeet chooses its own language, so whisper transcribes --language ${options.language}.`
230
+ }
231
+ });
213
232
  const { onStatus, onProgress } = options;
214
233
  const startScope = () => options.stopOnProcessSignals ? createRenderCancellationScope() : { signal: options.signal ?? new AbortController().signal, dispose: () => {
215
234
  } };
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  withOwner
9
- } from "./chunk-VER46LXI.js";
9
+ } from "./chunk-2YT3SCXL.js";
10
10
  import {
11
11
  HistoryBusyError,
12
12
  beginArtifactCapture